- nu-vm/engine.rs: execute_block runs all txs in a block against StateDb; TokenTransfer fully applied, other variants return "not implemented" receipt - StateAccessor trait: set_balance/inc_nonce now take &self (RocksDB interior mutability) - src/block_loop.rs: tokio task that produces a block each slot (6s) in dev mode; drains mempool, executes txs, removes successful ones, persists block to RocksDB - StateDb wrapped in Arc<Mutex> — block loop holds write lock per block, RPC holds read lock for nu_getAccount - main.rs: spawns block_loop when --dev --validator flags are set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
54 lines
1.5 KiB
TOML
54 lines
1.5 KiB
TOML
[workspace]
|
|
members = [
|
|
".",
|
|
"crates/nu-consensus",
|
|
"crates/nu-mempool",
|
|
"crates/nu-state",
|
|
"crates/nu-block",
|
|
"crates/nu-rpc",
|
|
"crates/nu-vm",
|
|
]
|
|
resolver = "2"
|
|
|
|
[workspace.dependencies]
|
|
tokio = { version = "1", features = ["full"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
anyhow = "1"
|
|
thiserror = "1"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
rocksdb = "0.22"
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
axum = "0.7"
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
[package]
|
|
name = "nu-node"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[[bin]]
|
|
name = "nu-node"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
tokio.workspace = true
|
|
serde.workspace = true
|
|
anyhow.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
clap.workspace = true
|
|
sha2.workspace = true
|
|
hex.workspace = true
|
|
chrono.workspace = true
|
|
serde_json.workspace = true
|
|
nu-consensus = { path = "crates/nu-consensus" }
|
|
nu-mempool = { path = "crates/nu-mempool" }
|
|
nu-state = { path = "crates/nu-state" }
|
|
nu-block = { path = "crates/nu-block" }
|
|
nu-rpc = { path = "crates/nu-rpc" }
|
|
nu-vm = { path = "crates/nu-vm" }
|