Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cuprated: config & args #304

Merged
merged 33 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a280221
init config
Boog900 Oct 6, 2024
5236ede
split sections
Boog900 Oct 17, 2024
8d0c26c
Merge branch 'main' into cuprated-config
Boog900 Oct 17, 2024
5906e7d
finish initial config.
Boog900 Oct 17, 2024
0d29b1c
Merge branch 'main' into cuprated-config
Boog900 Oct 26, 2024
3dc0049
fix clap
Boog900 Oct 26, 2024
d1f3eb4
misc changes
Boog900 Oct 26, 2024
d7d7541
fix doc
Boog900 Oct 26, 2024
cf34a8d
fix test & clippy
Boog900 Oct 26, 2024
65223dc
fix test 2
Boog900 Oct 26, 2024
2751831
try fix windows
Boog900 Oct 26, 2024
54f0bde
testing
Boog900 Oct 27, 2024
52305ff
testing 2
Boog900 Oct 27, 2024
fe28c70
fix windows test
Boog900 Oct 27, 2024
06b7429
fix windows: the remix.
Boog900 Oct 27, 2024
26653d4
review comments
Boog900 Nov 5, 2024
352dac6
fix imports
Boog900 Nov 5, 2024
5a5f4d1
Merge branch 'main' into cuprated-config
Boog900 Nov 5, 2024
3664eb1
rename & fix default config file
Boog900 Nov 5, 2024
623ba49
fix cargo hack
Boog900 Nov 5, 2024
21f6287
enable serde on `cuprate-helper`
Boog900 Nov 5, 2024
e652c18
changes from matrix chats
Boog900 Nov 10, 2024
7c5fa6d
fix ci
Boog900 Nov 10, 2024
6680954
fix doc
Boog900 Nov 10, 2024
318cf94
fix doc test
Boog900 Nov 10, 2024
8e941f5
move Cuprated.toml
Boog900 Dec 2, 2024
509d5cb
remove default.rs
Boog900 Dec 2, 2024
c947cf6
`size` -> `bytes`
Boog900 Dec 2, 2024
bd00c92
`addressbook_path` -> `address_book_path`
Boog900 Dec 2, 2024
1dd1ed1
fix config output
Boog900 Dec 2, 2024
22aa7a9
Merge branch 'main' into cuprated-config
Boog900 Dec 2, 2024
0d88244
fix ci
Boog900 Dec 2, 2024
b9e26bb
Update binaries/cuprated/src/config/args.rs
Boog900 Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ members = [
]

[profile.release]
panic = "abort"
lto = true # Build with LTO
strip = "none" # Keep panic stack traces
codegen-units = 1 # Optimize for binary speed over compile times
Expand Down Expand Up @@ -119,6 +120,7 @@ tokio-util = { version = "0.7", default-features = false }
tokio-stream = { version = "0.1", default-features = false }
tokio = { version = "1", default-features = false }
tower = { git = "https://github.com/Cuprate/tower.git", rev = "6c7faf0", default-features = false } # <https://github.com/tower-rs/tower/pull/796>
toml = { version = "0.8", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false }
tracing = { version = "0.1", default-features = false }

Expand Down
67 changes: 67 additions & 0 deletions Cuprated.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ____ _
# / ___| _ _ __ _ __ __ _| |_ ___
# | | | | | | '_ \| '__/ _` | __/ _ \
# | |__| |_| | |_) | | | (_| | || __/
# \____\__,_| .__/|_| \__,_|\__\___|
# |_|
#

## The network to run on, valid values: "Mainnet", "Testnet", "Stagenet".
network = "Mainnet"

## Tracing config.
[tracing]
## The minimum level for log events to be displayed.
level = "info"

## Clear-net config.
[p2p.clear_net]
## The number of outbound connections we should make and maintain.
outbound_connections = 64
## The number of extra connections we should make under load from the rest of Cuprate, i.e. when syncing.
extra_outbound_connections = 8
## The maximum number of incoming we should allow.
max_inbound_connections = 128
## The percent of outbound connections that should be to nodes we have not connected to before.
gray_peers_percent = 0.7
## The port to accept connections on, if left `0` no connections will be accepted.
p2p_port = 0
## The IP address to listen to connections on.
listen_on = "0.0.0.0"

## The Clear-net addressbook config.
[p2p.clear_net.address_book_config]
## The size of the white peer list, which contains peers we have made a connection to before.
max_white_list_length = 1_000
## The size of the gray peer list, which contains peers we have not made a connection to before.
max_gray_list_length = 5_000
## The amount of time between address book saves.
peer_save_period = { secs = 90, nanos = 0 }

## The block downloader config.
[p2p.block_downloader]
## The size of the buffer of sequential blocks waiting to be verified and added to the chain (bytes).
buffer_size = 50_000_000
## The size of the queue of blocks which are waiting for a parent block to be downloaded (bytes).
in_progress_queue_size = 50_000_000
## The target size of a batch of blocks (bytes), must not exceed 100MB.
target_batch_size = 5_000_000
## The amount of time between checking the pool of connected peers for free peers to download blocks.
check_client_pool_interval = { secs = 30, nanos = 0 }

## Storage config
[storage]
## The amount of reader threads to spawn.
reader_threads = "OnePerThread"

## Txpool storage config.
[storage.txpool]
## The database sync mode for the txpool.
sync_mode = "Async"
## The maximum size of all the txs in the pool (bytes).
max_txpool_byte_size = 100_000_000

## Blockchain storage config.
[storage.blockchain]
## The database sync mode for the blockchain.
sync_mode = "Async"
59 changes: 27 additions & 32 deletions binaries/cuprated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cuprated"
version = "0.0.1"
edition = "2021"
description = "The Cuprate Monero Rust node."
description = "The Cuprate Rust Monero node."
license = "AGPL-3.0-only"
authors = ["Boog900", "hinto-janai", "SyntheticBird45"]
repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated"
Expand All @@ -12,29 +12,29 @@ repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated"
cuprate-consensus = { workspace = true }
cuprate-fast-sync = { workspace = true }
cuprate-consensus-context = { workspace = true }
cuprate-consensus-rules = { workspace = true }
cuprate-constants = { workspace = true }
cuprate-cryptonight = { workspace = true }
cuprate-helper = { workspace = true }
cuprate-epee-encoding = { workspace = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-levin = { workspace = true }
cuprate-wire = { workspace = true }
cuprate-p2p = { workspace = true }
cuprate-p2p-core = { workspace = true }
cuprate-dandelion-tower = { workspace = true, features = ["txpool"] }
cuprate-async-buffer = { workspace = true }
cuprate-address-book = { workspace = true }
cuprate-blockchain = { workspace = true }
cuprate-database-service = { workspace = true }
cuprate-txpool = { workspace = true }
cuprate-database = { workspace = true }
cuprate-pruning = { workspace = true }
cuprate-test-utils = { workspace = true }
cuprate-types = { workspace = true }
cuprate-json-rpc = { workspace = true }
cuprate-rpc-interface = { workspace = true }
cuprate-rpc-types = { workspace = true }
cuprate-consensus-rules = { workspace = true }
cuprate-cryptonight = { workspace = true }
cuprate-helper = { workspace = true, features = ["serde"] }
cuprate-epee-encoding = { workspace = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-levin = { workspace = true }
cuprate-wire = { workspace = true }
cuprate-p2p = { workspace = true }
cuprate-p2p-core = { workspace = true }
cuprate-dandelion-tower = { workspace = true, features = ["txpool"] }
cuprate-async-buffer = { workspace = true }
cuprate-address-book = { workspace = true }
cuprate-blockchain = { workspace = true }
cuprate-database-service = { workspace = true, features = ["serde"] }
cuprate-txpool = { workspace = true }
cuprate-database = { workspace = true, features = ["serde"] }
cuprate-pruning = { workspace = true }
cuprate-test-utils = { workspace = true }
cuprate-types = { workspace = true }
cuprate-json-rpc = { workspace = true }
cuprate-rpc-interface = { workspace = true }
cuprate-rpc-types = { workspace = true }


# TODO: after v1.0.0, remove unneeded dependencies.
anyhow = { workspace = true }
Expand All @@ -44,7 +44,7 @@ borsh = { workspace = true }
bytemuck = { workspace = true }
bytes = { workspace = true }
cfg-if = { workspace = true }
clap = { workspace = true, features = ["cargo"] }
clap = { workspace = true, features = ["cargo", "help", "wrap_help"] }
chrono = { workspace = true }
crypto-bigint = { workspace = true }
crossbeam = { workspace = true }
Expand All @@ -71,15 +71,10 @@ thread_local = { workspace = true }
tokio-util = { workspace = true }
tokio-stream = { workspace = true }
tokio = { workspace = true }
toml = { workspace = true, features = ["parse", "display"]}
tower = { workspace = true }
tracing-subscriber = { workspace = true, features = ["std", "fmt", "default"] }
tracing = { workspace = true }
tracing = { workspace = true, features = ["default"] }

[lints]
workspace = true

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
Loading
Loading