YouthChain’s node is written in Rust and composed of 5 focused crates. Everything plugs into a single binary (yc-node) that serves the JSON-RPC, the REST indexer, and the BFT gossip layer.

Rust workspace

yc-types

Canonical types: Block, Transaction, Hash, Signature, BlsBlockSignature, EngagementAction. Every other crate depends on this.

yc-crypto

Keccak, ed25519, BLS12-381 (bls12_381 + pairing_crypto), signature aggregation.

yc-execution

revm 14 integration, Mempool, WorldState, fee burn/split, engagement precompile.

yc-consensus

Chain + ChainStore (sled), PoeEngine (leader election, view change, BFT vote log).

yc-node

Axum HTTP server, JSON-RPC, REST indexer, BFT gossip, block production loop.

Runtime layout (per node)

Block lifecycle

1

User submits tx

Via eth_sendRawTransaction, yc_sendTransaction, or the mobile REST API. The tx lands in the mempool of at least one node.
2

Gossip

Each node forwards incoming txs to its peers so every mempool converges.
3

Leader production

PoeEngine::select_validator_index_for(beacon, slot, view) picks the leader for the current slot, weighted by stake × (1 + β·ES) (β=0.10) and seeded by a BLS randomness beacon from the parent’s commit signature. The leader assembles a block from its mempool and runs the txs through revm.
4

BFT vote round

The leader broadcasts the proposal to peers on /internal/bft/proposal. Each peer validates, signs with its BLS key, and returns the signature. Once the leader has ⌊2N/3⌋ + 1 signatures, it aggregates them and seals the block.
5

Commit + gossip

The sealed block is stored in sled, applied to WorldState, and gossiped to peers. Rejected txs are evicted from the mempool.
6

View change (fallback)

If the leader fails to produce within 2s × view, any validator can take over by incrementing view. See Consensus.

Persistence

Every node keeps its own sled database under /opt/youthchain/data/<node-id>/. The state is deterministic: same genesis + same sequence of blocks → byte-identical DB on every node. Genesis hash is verified on every boot.

Where the EVM fits

yc-execution wraps revm 14 behind a DatabaseRef adapter over WorldState. Every Solidity contract (YCEToken, EngagementOracle, StakingJars, QuadraticVoting, ValidatorRegistry) is deployed and callable just like on Ethereum — same ABI, same bytecode, same event logs, same eth_call semantics. The only non-standard precompile is 0x0A (EngagementScore), which reads the aggregated score from the EngagementOracle contract at near-zero gas cost so other contracts can gate behavior on a user’s ES without a CALL.