* impl async buffer
* clippy
* p2p changes
* clippy
* a few more docs
* init cuprate-p2p
* remove some unrelated code and add some docs
* start documenting client_pool.rs
* add more docs
* typo
* fix docs
* use JoinSet in connection maintainer
* small changes
* add peer sync state svc
* add broadcast svc
* add more docs
* add some tests
* add a test
* fix merge
* add another test
* unify PeerDisconnectFut and add more docs
* start network init
* add an inbound connection server
* remove crate doc for now
* fix address book docs
* fix leak in client pool
* correct comment
* fix merge + add some docs
* review comments
* init block downloader
* fix doc
* initial chain search
* add chain_tracker
* move block downloader to struct
* spawn task whe getting blocks
* check for free peers and handle batch response
* add test bin
* working block downloader
* dynamic batch sizes
* dandelion_tower -> dandelion-tower
* fix async-buffer builds
* check if incoming peers are banned
* add interface methods
* update docs
* use a JoinSet for background network tasks
* dynamic batch size changes
* Keep a longer of queue of blocks to get
* more checks on incoming data
* fix merge
* fix imports
* add more docs
* add some limits on messages
* keep peers that dont have the current need data
* fix clippy
* fix .lock
* fix stopping the block downloader
* clean up API and add more docs
* tracing + bug fixes
* fix panic
* doc changes
* remove test_init
* remove spammy log
* fix previous merge
* add a test
* fix test
* remove test unwrap
* order imports correctly
* clean up test
* add a timeout
* fix tests
* review fixes
* make `BlockDownloader` pub
* make `initial_chain_search` pub
* make `block_downloader` private
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* split some sections into separate modules
* split chain requests
* sort imports
* check previous ID is correct
* fix typos
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
---------
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>
* `database/` -> `storage/`, create skeleton `storage/` crates
* add skeleton root directories
* books: add skeleton
* ci: fix labeler.yml
* fix CONTRIBUTING.md
* fix workspace Cargo.toml
* fix `storage/`
* rename helper fs fn, `cuprate_database` -> `cuprate_blockchain`
* fix Cargo.toml
* cuprate-blockchain: revert find-and-replace
Since it has to be ported to the book anyway, there's not much
reason to update this and create review diffs.
* labeler.yml: remove `A-docs` from `books/` changes
Although books are documentation,
the `A-books` label already exists for this
* cargo: add `pretty_assertions`
* test-utils: add tests to compare data against RPC data, and fix
* small fixes
* database: fix `cumulative_generated_coins` from test data
block had wrong data which offset all of the asserts
* use tokio's delay queue for bans
* document handles
* remove peers from address book when retrieving
* ping inbound peers during handshakes
* support receiving pings during handshakes
* add peer to anchor before reducing whit list
* clippy
* comment handshakes
* typos
* sort `use`
* use `rand::prelude::*`
* review comments
* update macro
* levin: fix fragmented messages & use bitflags
* levin: add a method to fragment a message
* levin: add tests for fragmented messages and fix issues
* fix docs
* tests: don't include bytes length
* levin: add support for sending fragmented
/ dummy messages
* fmt
* add fragmented handshake tests.
* fix handshake detection when fragmented
and alt (non-monero) protocol info
* add tracing logs
* remove `already_built`, this was an old way I was thinking of sending raw buckets
* clippy
* clippy 2
* Update net/levin/src/message.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* review comments
* add timeout to tests
* Update net/levin/src/header.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* monerod: set a random DB and remove dir when done
* add a test for an inbound monerod handshake
* don't fail if can't remove dir on windows
* Update test-utils/src/monerod.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* use `temp_dir`
* use `tempfile`
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* 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
* ci: install boost, include macos + windows
* cryptonight: fix `MSVC`
* cryptonight: use `flag_if_supported()`
* fix cryptonight builds
* update randomX
* fix rx builds
* add memwipe
* include memwipe.c in build
* spawn monerod in msys2 for windows
* fix last commit
* install dependencies before spawning monerod
* remove --detach
* try another way of spawning monerod
* add /I
* download and spawn monerod as a part of tests
* add download.rs
* extend time for monerod spawn
* move sleep and show monerod output
* fix clippy
* change stdin to pipped
* #[cfg(unix)] on bytes::Buf
* fix macos capitalisation
* remove tar.bz2 on macos expected dir
* remove zip on windows expected dir
* fix todo
* add docs
* fix a couple typos
---------
Co-authored-by: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com>
Co-authored-by: Boog900 <boog900@tutanota.com>
* 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
* init
* save
* use macro to create the levin body enum
* add protocol docs and cargo fmt
* add response validation
* add client functionality to connection + fmt
* Add new cuprate-common crate
this crate will hold stuff needed across cuprate crates
+ init handshaker
* add stagenet & testnet hardforks + tests
+ cargo fmt
* split peer and protocol into separate crates
+ add sync state watcher
* finish initial sync states and add some tests
* save
* add initial address book
* cargo fmt
* save
* add pruning module to cuprate-common
* more address book updates
- added an address book client
- add some more address book requests
- add "NetZone"
* lots of changes
* cargo fmt
* combine p2p into one crate
they were all linked anyway
* cargo fmt
* turn the handshaker into a statemachine
* cargo fmt
* reduce the amt of copies when decoding
+ remove reliance on monero-rs
* update time_from_timestamp func
* cargo fmt
+ change qr code link
+ remove clippy.toml