Skip to content

Commit

Permalink
feat: global state lock, async leveldb, etc.
Browse files Browse the repository at this point in the history
high level changes:
 * create `GlobalStateLock` and use it for all state locking.
 * remove other locks (except those in storage layer, still a todo)
 * add tokio `AtomicRw` and `AtomicMutex` async lock types.
 * trace (log) all lock events (TryAcquire, Acquire, Release)
 * add `RustyLevelDbAsync` async-friendly DB wrapper
 * simplify `LightState`, now just a type alias for Block
 * add enum `BlockChainState` to distinguish Archival vs Light mode
 * use twenty_first storage iterators where appropriate
 * improve some doc-comments, `cargo doc` runs without warnings
 * general cleanups and refactors
 * log timestamp of each mined block, converted to localtime
  • Loading branch information
dan-da committed Jan 18, 2024
1 parent 6d28e39 commit fa89d04
Show file tree
Hide file tree
Showing 28 changed files with 2,824 additions and 2,961 deletions.
131 changes: 61 additions & 70 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ num-traits = "0"
priority-queue = "1"
rand = "0.8"
ratatui = "0.23"
rs-leveldb = "0.1.5"
semver = "^1.0.21"
serde = { version = "1", features = ["derive"] }
serde_derive = "1"
Expand Down Expand Up @@ -87,3 +86,7 @@ opt-level = 0
# incremental = true
# codegen-units = 256
# rpath = false

[patch.crates-io]
# needed for now.
twenty-first = { git = "https://github.com/Neptune-Crypto/twenty-first.git", rev = "d4ee75bf0b1f7f0ae2b04968b15638899e6f36d4" }
2 changes: 1 addition & 1 deletion src/config_models/cli_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct Args {
///
/// This sets the threshold for when a peer should be automatically refused.
///
/// For a list of reasons that cause bad standing, see <MISSING>.
/// For a list of reasons that cause bad standing, see [PeerSanctionReason](crate::models::peer::PeerSanctionReason).
#[clap(long, default_value = "100", value_name = "VALUE")]
pub peer_tolerance: u16,

Expand Down
Loading

0 comments on commit fa89d04

Please sign in to comment.