42 lines
2 KiB
Markdown
42 lines
2 KiB
Markdown
# Changelog — nu-node
|
|
|
|
All notable changes to this project will be documented in this file.
|
|
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
|
|
---
|
|
|
|
## [Unreleased]
|
|
|
|
## [0.2.0] — 2026-04-24
|
|
|
|
### Added
|
|
- `nu-vm/engine.rs` — `execute_block`: runs all txs in a block against `StateDb`;
|
|
`TokenTransfer` fully applied, other variants produce a "not implemented" receipt
|
|
- `src/block_loop.rs` — tokio task producing one block per slot (6 s) in dev mode;
|
|
drains mempool, executes txs, removes successful ones, persists block to RocksDB
|
|
- `--dev --validator` flags in `main.rs` trigger block production loop on startup
|
|
|
|
### Changed
|
|
- `StateAccessor` trait: `set_balance` / `inc_nonce` now take `&self` (RocksDB
|
|
provides interior mutability — no `&mut` required at the Rust level)
|
|
- `StateDb` wrapped in `Arc<Mutex<StateDb>>` — block loop holds write lock per block,
|
|
RPC holds read lock for `nu_getAccount`
|
|
- `nu-vm` now depends on `nu-block` (was implicit via engine)
|
|
|
|
## [0.1.0] — 2026-04-24
|
|
|
|
### Added
|
|
- `nu_sendRawTx` — decodes JSON `RawTransaction`, deduplicates by `tx_id`,
|
|
inserts into mempool; returns `{ tx_id }` on success
|
|
- `TxPayload` enum in `nu-block/types.rs` — all variants with `priority_hint()`
|
|
- `TxPriority` derived from `TxPayload` in `nu-mempool` (Critical > High > Normal)
|
|
- `nu-rpc` axum HTTP server on `POST /rpc` — dispatches JSON-RPC 2.0 requests
|
|
- `nu_chainInfo` — returns `chain_id` and `node_version`
|
|
- `nu_getAccount` — reads `AccountState` from RocksDB; returns empty account for
|
|
unknown addresses (zero balance, nonce 0)
|
|
- `StateAccessor` trait implemented on `StateDb` — canonical single source of truth
|
|
for balance and nonce access
|
|
- `--dev`, `--validator`, `--rpc-addr`, `--db-path`, `--chain-id` CLI flags via clap
|
|
- Rust workspace scaffold with six crates: `nu-consensus`, `nu-mempool`, `nu-state`,
|
|
`nu-block`, `nu-rpc`, `nu-vm`
|
|
- `Dockerfile.dev` — multi-stage Rust build (builder: rust:1.79-slim, runtime: debian:bookworm-slim)
|