Commit graph

4 commits

Author SHA256 Message Date
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
fd829ba1dd feat(nu-node): implement nu_sendRawTx with mempool integration
- nu-block: TxPayload enum with all variants (user + auto/scheduler)
- nu-mempool: PendingTx wraps RawTransaction; priority derived from TxPayload
- nu-rpc: nu_sendRawTx decodes JSON tx, deduplicates, inserts into mempool
- AppState: holds Arc<Mutex<Mempool>> alongside StateDb
- main.rs: initializes mempool and passes to RpcServer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 10:32:26 +03:00
a42ca0f8d3 feat(nu-node): wire axum RPC server, StateAccessor impl, --dev mode entry point
- nu-rpc: axum HTTP server on /rpc, dispatches JSON-RPC requests
- nu-rpc: nu_chainInfo and nu_getAccount return real state from RocksDB
- nu-state: StateAccessor trait implemented on StateDb (get/set balance, nonce)
- nu-vm: executor uses StateAccessor from nu-state (single source of truth)
- main.rs: clap CLI with --dev --validator --rpc-addr --db-path --chain-id

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 10:25:48 +03:00
5430c34d9e feat(nu-node): initial Faz 0 scaffold
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 00:00:26 +03:00