From 7207fbd17b5f4207d6cb5df516b693267b5075d7 Mon Sep 17 00:00:00 2001 From: Boog900 Date: Tue, 20 Aug 2024 22:56:18 +0000 Subject: [PATCH] Binaries: add cuprated skeleton (#258) * add cuprated skeleton * fmt and add deny exception --- Cargo.lock | 4 ++++ Cargo.toml | 1 + binaries/cuprated/Cargo.toml | 13 +++++++++++++ binaries/cuprated/src/blockchain.rs | 6 ++++++ binaries/cuprated/src/blockchain/manager.rs | 1 + binaries/cuprated/src/blockchain/syncer.rs | 1 + binaries/cuprated/src/config.rs | 1 + binaries/cuprated/src/main.rs | 9 +++++++++ binaries/cuprated/src/p2p.rs | 5 +++++ binaries/cuprated/src/p2p/request_handler.rs | 1 + binaries/cuprated/src/rpc.rs | 5 +++++ binaries/cuprated/src/rpc/request_handler.rs | 1 + binaries/cuprated/src/txpool.rs | 3 +++ deny.toml | 2 +- 14 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 binaries/cuprated/Cargo.toml create mode 100644 binaries/cuprated/src/blockchain.rs create mode 100644 binaries/cuprated/src/blockchain/manager.rs create mode 100644 binaries/cuprated/src/blockchain/syncer.rs create mode 100644 binaries/cuprated/src/config.rs create mode 100644 binaries/cuprated/src/main.rs create mode 100644 binaries/cuprated/src/p2p.rs create mode 100644 binaries/cuprated/src/p2p/request_handler.rs create mode 100644 binaries/cuprated/src/rpc.rs create mode 100644 binaries/cuprated/src/rpc/request_handler.rs create mode 100644 binaries/cuprated/src/txpool.rs diff --git a/Cargo.lock b/Cargo.lock index 39458962..052b1ee6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -881,6 +881,10 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cuprated" +version = "0.1.0" + [[package]] name = "curve25519-dalek" version = "4.1.3" diff --git a/Cargo.toml b/Cargo.toml index 71efcca4..06b49a0a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ resolver = "2" members = [ + "binaries/cuprated", "consensus", "consensus/fast-sync", "consensus/rules", diff --git a/binaries/cuprated/Cargo.toml b/binaries/cuprated/Cargo.toml new file mode 100644 index 00000000..b5243906 --- /dev/null +++ b/binaries/cuprated/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "cuprated" +version = "0.1.0" +edition = "2021" +description = "The Cuprate Monero Rust node." +license = "AGPL-3.0-only" +authors = ["Boog900", "hinto-janai", "SyntheticBird45"] +repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated" + +[dependencies] + +[lints] +workspace = true diff --git a/binaries/cuprated/src/blockchain.rs b/binaries/cuprated/src/blockchain.rs new file mode 100644 index 00000000..4abebeb6 --- /dev/null +++ b/binaries/cuprated/src/blockchain.rs @@ -0,0 +1,6 @@ +//! Blockchain +//! +//! Will contain the chain manager and syncer. + +mod manager; +mod syncer; diff --git a/binaries/cuprated/src/blockchain/manager.rs b/binaries/cuprated/src/blockchain/manager.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/binaries/cuprated/src/blockchain/manager.rs @@ -0,0 +1 @@ + diff --git a/binaries/cuprated/src/blockchain/syncer.rs b/binaries/cuprated/src/blockchain/syncer.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/binaries/cuprated/src/blockchain/syncer.rs @@ -0,0 +1 @@ + diff --git a/binaries/cuprated/src/config.rs b/binaries/cuprated/src/config.rs new file mode 100644 index 00000000..d613c1fc --- /dev/null +++ b/binaries/cuprated/src/config.rs @@ -0,0 +1 @@ +//! cuprated config diff --git a/binaries/cuprated/src/main.rs b/binaries/cuprated/src/main.rs new file mode 100644 index 00000000..918429c9 --- /dev/null +++ b/binaries/cuprated/src/main.rs @@ -0,0 +1,9 @@ +mod blockchain; +mod config; +mod p2p; +mod rpc; +mod txpool; + +fn main() { + todo!() +} diff --git a/binaries/cuprated/src/p2p.rs b/binaries/cuprated/src/p2p.rs new file mode 100644 index 00000000..f5b72ba3 --- /dev/null +++ b/binaries/cuprated/src/p2p.rs @@ -0,0 +1,5 @@ +//! P2P +//! +//! Will handle initiating the P2P and contains a protocol request handler. + +mod request_handler; diff --git a/binaries/cuprated/src/p2p/request_handler.rs b/binaries/cuprated/src/p2p/request_handler.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/binaries/cuprated/src/p2p/request_handler.rs @@ -0,0 +1 @@ + diff --git a/binaries/cuprated/src/rpc.rs b/binaries/cuprated/src/rpc.rs new file mode 100644 index 00000000..80b2789e --- /dev/null +++ b/binaries/cuprated/src/rpc.rs @@ -0,0 +1,5 @@ +//! RPC +//! +//! Will contain the code to initiate the RPC and a request handler. + +mod request_handler; diff --git a/binaries/cuprated/src/rpc/request_handler.rs b/binaries/cuprated/src/rpc/request_handler.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/binaries/cuprated/src/rpc/request_handler.rs @@ -0,0 +1 @@ + diff --git a/binaries/cuprated/src/txpool.rs b/binaries/cuprated/src/txpool.rs new file mode 100644 index 00000000..a6f05e75 --- /dev/null +++ b/binaries/cuprated/src/txpool.rs @@ -0,0 +1,3 @@ +//! Transaction Pool +//! +//! Will handle initiating the tx-pool, providing the preprocessor required for the dandelion pool. diff --git a/deny.toml b/deny.toml index 85e7da28..f469d062 100644 --- a/deny.toml +++ b/deny.toml @@ -133,7 +133,7 @@ confidence-threshold = 0.8 # aren't accepted for every possible crate as with the normal allow list exceptions = [ # Cuprate (AGPL-3.0) - # { allow = ["AGPL-3.0"], name = "cuprated", version = "*" } + { allow = ["AGPL-3.0"], name = "cuprated", version = "*" } # Each entry is the crate and version constraint, and its specific allow # list