Examples Project
This repository now includes a standalone runnable project in examples/.
Location
- Project root:
examples/ - Guide:
examples/README.md
Capstone chapter project (Chapter 5)
- Project root:
examples/capstone_node_demo/ - Guide:
examples/capstone_node_demo/README.md
This project mirrors the final chapter and includes:
blockchain_node: framed networking, JoinSet lifecycle, gossip-like propagation, heavy tracing logs, node API endpoint.orderbook_node: deterministic single-task engine, leader/follower replay, Tower edge middleware, heavy tracing logs.wallet_cli: submit transactions, check approval with configurable confirmation depth, compare consistency across nodes.
Quick run:
cargo run --manifest-path examples/capstone_node_demo/Cargo.toml --bin blockchain_node -- --id n1 --port 7101 --api-port 8101
cargo run --manifest-path examples/capstone_node_demo/Cargo.toml --bin orderbook_node -- --id ob1 --role leader --log ./ob1.log
cargo run --manifest-path examples/capstone_node_demo/Cargo.toml --bin wallet_cli -- status --node 127.0.0.1:8101
Quick start
From repository root:
cargo run --manifest-path examples/Cargo.toml --bin 01_thread_panic
cargo run --manifest-path examples/Cargo.toml --bin 02_tokio_joinset
cargo run --manifest-path examples/Cargo.toml --bin 04_tracing_basics
cargo run --manifest-path examples/Cargo.toml --bin 05_tower_layers
Framed TCP echo (two terminals):
# terminal 1
cargo run --manifest-path examples/Cargo.toml --bin 03_framed_echo -- server
# terminal 2
cargo run --manifest-path examples/Cargo.toml --bin 03_framed_echo -- client "hello framed world"
For full details and explanations, open examples/README.md in the repository.