In `workspace`:
- New dependencies: `arti_client`, `Cuprate/tokio-socks.git`, `tor-cell`, `tor-config-path`, `tor-hsservice`, `tor-persist`, `tor-proto`, `tor-rtcompat` (yes nothing was exported).
- In `deny.toml`, whitelisted `Unlicense` license for `arti_client`.
In `cuprate-p2p-transport`:
- Implemented `Transport<ClearNet>` and `Transport<Tor>` for `Arti`. New `ArtiClientConfig`, `ArtiServerConfig` configuration. New `OnionListener` for accepting inbound connections from arti's generated onion service.
- Implemented `Transport<Tor>` for `Daemon`. New `DaemonClientConfig`, `DaemonServerConfig` configuration. New `DaemonInboundStream` listening for incoming TCP connections from the tor daemon.
- `DisabledListener` as a polyfill for transports with inbound disabled, such as `Transport<ClearNet> for Arti` and in the future `Transport<ClearNet> for Socks5`.
In `cuprate-p2p-core`:
- Removed `Default` and `Debug` bound from `Transport::ClientConfig` and `Transport::ServerConfig`.
- Removed `Clone` bound from `Transport::ServerConfig`.
In `cuprate-p2p`:
- Changed some function visibility to `pub(super)` instead of `pub`.
In `cuprate-wire`:
- Added `borsh` dependency and `BorshSerialize` and `BorshDeserialize` derived implementation to `OnionAddr` for `BorshNetworkZone` requirement in address book.
In `cuprated`:
- New `tor` module containing the initialization of Arti, config helpers and context structure `TorContext` to pass down to p2p initialization function and other helpers.
- New `config/tor` module containing the `[tor]` configuration table. It define tor daemon related variables, as well as arti settings.
- Added `enable_inbound` field to `ClearNetConfig` to disable incoming listener by default.
- Added `proxy` field to `ClearNetConfig` for enabling clearnet over arti and in the future proxy urls.
- Added `TorNetConfig` for setting `Tor` network zone parameters such as listening ports, enabling arti inbound server, or setting an anonymous inbound onion address from an external daemon.
- Modified `initialize_zones_p2p` to now start Tor network zone and use the correct transport depending on user configuration.
- In `txpool/*`, generalized `DiffuseService`, `OutboundPeerStream` and `ConcreteDandelionRouter` for `Z: NetworkZone`. Created a new `MainDandelionRouter` service that will route local txs to a Tor router instead of clearnet if available. Adapted initialization to the changes.
---------
Co-authored-by: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com>
* rpc/types 32 bit support
* fix docs
* add 32 bit check to CI
* remove `cuprate-types`
* add comments to CI
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.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
* 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
* 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