Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

NBnet/nbnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

nbnet

License: GPL-3.0 Rust

An EVM-compatible blockchain built on Hotmint consensus.

nbnet pairs the revm execution engine with Hotmint's HotStuff-2 BFT consensus to deliver a fully Ethereum-compatible chain — with no C/C++ dependencies in the critical path.


Architecture

 ┌─────────────────────┐
 │ JSON-RPC (8545) │
 │ eth_* web3_* net_* │
 └──────────┬──────────┘
 │
 ┌──────────▼──────────┐
 │ EvmExecutor │
 │ (Application trait) │
 └──┬────┬────┬────────┘
 │ │ │
 ┌─────────┘ │ └──────────┐
 │ │ │
 ┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼──────┐
 │ TxPool │ │ State │ │ Precompiles │
 │ (mempool) │ │ (vsdb) │ │ staking/ │
 └───────────┘ └─────┬─────┘ │ balances │
 │ └─────────────┘
 ┌─────▼─────┐
 │ revm │
 └───────────┘
 ┌────────────────────────────────────────┐
 │ Hotmint (HotStuff-2 consensus) │
 └────────────────────────────────────────┘

Crates

Crate Description
nbnet-types EVM type definitions: EvmChainConfig, transactions, receipts
nbnet-state vsdb-backed EVM world state (revm::Database impl)
nbnet-txpool Ethereum mempool with (sender, nonce) semantics and RBF
nbnet-precompile Custom precompiles bridging EVM to Hotmint staking/balances
nbnet-execution EvmExecutor implementing the Hotmint Application trait
nbnet-rpc Ethereum JSON-RPC server (axum-based)
nbnet-node Node binary nb and benchmark binary bench-nbnet

Quick Start

# Initialize node
nb init --home ~/.nbnet
# Start node
nb node --home ~/.nbnet
# Start node with custom RPC address
nb node --home ~/.nbnet --rpc-addr 0.0.0.0:8545

The JSON-RPC endpoint is compatible with MetaMask, Foundry, Hardhat, and Web3.js.

Building

make build # build workspace
make test # run tests
make bench-nbnet # run throughput benchmark

Dependencies

  • hotmint — HotStuff-2 BFT consensus engine
  • vsdb — pure-Rust versioned key-value storage
  • alloy — Ethereum primitives and transaction types
  • revm — EVM execution

License

GPL-3.0-only

About

EVM-compatible blockchain based on the hotmint framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /