nu-node/crates/nu-vm/Cargo.toml
Mukan Erkin 265097375a feat(nu-node): single-validator block production loop
- 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>
2026-04-24 10:54:48 +03:00

13 lines
287 B
TOML

[package]
name = "nu-vm"
version = "0.1.0"
edition = "2021"
[dependencies]
serde.workspace = true
serde_json.workspace = true
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true
nu-state = { path = "../nu-state" }
nu-block = { path = "../nu-block" }