* add `pop_blocks` to the difficulty cache
* add a rolling median struct
* use RollingMedian in weight cache
* add pop_blocks to weight cache
* add alt context cache
* add getting alt RX vms
* rework alt cache
* add alt block verify function
* keep alt caches around
* add alt checked alt blocks to the cache
* check the alt blocks timestamp
* add docs + cleanup code
* add popping blocks from the context cache
* finish popping blocks + fix tests
* fix doc
* add a test popping blocks from HF cache
* add a request to clear alt caches
* add back lint
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* review fixes
* small changes
* change panic doc
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* change monero-consensus to cuprate-consensus-rules
* document the context service
* remove the mutex on blockchain context
* comment the context caches
* add back tokio
* document block checks
* typo
* keep tha amount of outputs with a certain amount in the output cache
* typo
* nuke cross-block batch verification
* remove RPC scanner
* change how contextual data is got.
* fmt & clippy fixes
* typo
* cargo update
* restore Cargo.lock
* add a verify tx test.
+ fixes an issue with verifying signatures after BPs
* clippy
* remove bad test
* add mores tests and fix a couple bugs
* typos
* move tests and add some more
* typo
* remove scan_chain docs
* fix check for duplicate txs when duplicates are not sequential
* add a proptest for dup txs
* cache tx verification state
* doc updates + move `Vec` to `Arc<[]>`
* clippy
* misc changes
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
Co-authored-by: SyntheticBird <118022351+SyntheticBird45@users.noreply.github.com>
* fix fmt
* review changes
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
Co-authored-by: SyntheticBird <118022351+SyntheticBird45@users.noreply.github.com>
* ci: add separate `typo` job
* add `typos.toml` for false positives
* fix all typos
* ci: add `cargo doc` step
* fix doc errors
* contributing.md: update passing CI steps
* fix more typos, add exception to `cryptonight/`
* ci: move `cargo doc` step within `ci` job
It needs dependencies.
* ci: add https://github.com/Cuprate/cuprate/pull/63
* test-utils: fix typo
* ci: switch `rustup update` and switch order
* ci: only update rust on unix
* ci: set `RUSTDOCFLAGS` env earlier
* ci: only run `cargo doc` on linux
* ci: remove `bash` on `cargo doc`
* ci: remove `--all-targets`
We now have the target OS's in CI, no need to compile for each.
* contributing.md: update ci steps
* ci: add `--all-targets` back to clippy, build
* update contributing.md
* consensus: fix batch handling when we don't have a full list of outputs.
* change `scan_chain` to new API
* clippy
* add a test for calculating multiple difficulties
* fmt
* rx_seed -> rx_vms
* consensus-rules: ring members younger than current block.
* only create rx vms when required.
* fix rx initiation when syncing
* add single block verification (no batch)
* update serai
* start re-working p2p to work with change monero-wire
* start re-working p2p to work with change monero-wire
adds back some changes from #22
* change the peer module to use the new API + fix a couple bugs
* remove peer set for now
* add try_from/from conversion between `Message` and
`Request`/`Response`
* Allow specifying other parameters in levin-cuprate
* add new `LevinCommand` enum and clean up monero-wire message de/encoding
* fix issues with merge
* start splitting up p2p crate into smaller crates.
* add monerod action from serai to test network code
* remove tracing in tests
Before we were using tokio's `spawn_blocking`, which wasn't ideal as this put tasks in a queue to be put on rayon's pool.
Instead, now we create an oneshot and use rayon::spawn.
This means we don't have to rely on people giving the verifier the correct txs for a block.
Also allows some speedup as we can put the fetching of outputs on a different task.