mirror of
https://github.com/MAGICGrants/cuprate-for-explorer.git
synced 2026-01-08 19:27:54 -05:00
* Define Tor Zone, add onion addressing, extend AddressBook, adapt `handle_timed_sync_request`, changes in cuprated + some cleanup In `cuprated`: - Added `Z: NetworkZone` as a generic requirement for `address_book_config`. Now takes the optional node address in argument. - Added `tor_net_seed_nodes` fn for obtaining tor seed nodes. - Added `CrossNetworkInternalPeerId::Tor(_)` variant and `From<InternalPeerId<OnionAddr>>` In `cuprate-wire`: - Added `src/network_address/onion_addr.rs` implementing `OnionAddr` type used by `Tor` network zone. - Implemented parsing, formatting, conversion and validation of `OnionAddr`. - Implemented 2 validation tests and 2 parsing tests for `OnionAddr`. - Documented and cleaned up `src/network_address/epee_builder.rs`. - Changed `u8` `type` field of `TaggedNetworkAddress` to `AddressType` enum equivalent to monerod's `address_type`. - Added additional `host` and `port` fields to `AllFieldedNetworkAddress` collection type. - Added `NetworkAddress:Tor` variant and added conversion to related functions. In `cuprate-address-book`: - Added `our_own_addr: Z::Addr` field to AddressBookConfig. This adds a `Z: NetworkZone` requirement to `AddressBookConfig`. - Adapted code to the new generic requirement. - Implemented handling of new `AddressBookRequest::OwnAddress` for querying the node self specified address for the zone. In `cuprate-p2p`: - If `Z::BROADCAST_OUR_OWN_ADDR` = `true`, `handle_timed_sync_request` will insert the node's address to the peerlist being sent. In `cuprate-p2p-core`: - Removed `#[async_trait::async_trait]` attribute to `impl NetworkZone for *`. - Added `AddressBookRequest::OwnAddress` and `AddressBookResponse::OwnAddress(Option<Z::Addr>)`. - Defined new `Tor` `NetworkZone` * fmt * fix typo and fmt * final edits? * fix test * forgor
32 lines
1009 B
TOML
32 lines
1009 B
TOML
[package]
|
|
name = "cuprate-wire"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
authors = ["Boog900"]
|
|
repository = "https://github.com/SyntheticBird45/cuprate/tree/main/net/monero-wire"
|
|
|
|
[features]
|
|
default = []
|
|
tracing = ["cuprate-levin/tracing"]
|
|
|
|
[dependencies]
|
|
cuprate-levin = { workspace = true }
|
|
cuprate-epee-encoding = { workspace = true }
|
|
cuprate-fixed-bytes = { workspace = true }
|
|
cuprate-types = { workspace = true, default-features = false, features = ["epee"] }
|
|
cuprate-helper = { workspace = true, default-features = false, features = ["map"] }
|
|
|
|
bitflags = { workspace = true, features = ["std"] }
|
|
bytes = { workspace = true, features = ["std"] }
|
|
thiserror = { workspace = true }
|
|
|
|
arbitrary = { workspace = true, features = ["derive"], optional = true }
|
|
|
|
[dev-dependencies]
|
|
hex = { workspace = true, features = ["std"]}
|
|
proptest = { workspace = true }
|
|
|
|
[lints]
|
|
workspace = true
|