Source Anchors
scenario-yaml-schema
crates/nockchain-testkit/src/scenario.rs
Scenario, Scenario::load_from_path, NodeSpec, Action, WalletCapture, Assert
1-430
Defines the YAML scenario grammar that upstream E2E tests use for nodes, actions, wallet captures, and assertions.
The schema names node topology, fakenet options, wallet operations, partitions, upgrades, gRPC waits, transaction checks, and assertion contracts.
runner-scenario-lifecycle
crates/nockchain-e2e/src/runner.rs
RunOptions, run_scenario, expand_node_env, run_inner, run_steps
33-620
Loads a scenario, seeds runtime ports and env vars, manages a run directory, executes actions/assertions, and writes the final report.
run_scenario creates run_id/run_dir/report state, run_inner starts and shuts down nodes, and run_steps records action and assertion outcomes.
node-manager-process-docker
crates/nockchain-e2e/src/node.rs
NodeMode, NodeManager, NodeManager::start_nodes, stop_nodes, restart_nodes, spawn_process_node, spawn_docker_node
28-230, 729-1045
Controls process-mode and Docker-mode Nockchain nodes with resolved public/private gRPC and p2p ports.
NodeManager starts, stops, and restarts nodes, writes stdout/stderr logs, and maps Docker ports while keeping node ids and data directories explicit.
node-command-args
crates/nockchain-e2e/src/node.rs
build_node_args, build_node_args_docker, topology_peer_arg
826-1045
Materializes scenario node specs into CLI args for fakenet, mining, topology peers, force peers, v1/bythos phases, and genesis/update options.
The builder covers public/private gRPC binds, --fakenet, --new, --mine, --mining-pkh, --no-default-peers, peer flags, and phase-specific fakenet parameters.
grpc-readiness-height
crates/nockchain-e2e/src/grpc.rs
wait_for_ready, wait_for_height, wait_for_height_private
85-160, 262-320
Polls public/private gRPC readiness and height so a scenario can distinguish boot, sync, and endpoint failures.
The helpers retry endpoint probes with deadlines and return observed height/readiness state instead of treating startup timing as a test result.
grpc-transaction-lifecycle
crates/nockchain-e2e/src/grpc.rs
submit_raw_tx, transaction_accepted, wait_for_tx_in_block
452-532, 607-625
Separates raw transaction submission, node acceptance, and observed block inclusion.
The code records submit ack/error, accepted transaction state, and tx-in-block waits as distinct scenario outcomes.
private-poke-mining-controls
crates/nockchain-e2e/src/grpc.rs
poke_private, set_mining_pkh_live, set_mining_enabled
626-712
Exercises private gRPC pokes for live mining key and mining-enabled controls.
The helpers send private pokes to mutate local mining behavior without making public endpoint state or wallet secrets part of the receipt.
report-json-contract
crates/nockchain-e2e/src/report.rs
Report, StepRecord, AssertOutcome, NodeSummary, Report::write_json
1-155
Defines the upstream JSON report vocabulary for scenario status, steps, assertions, node summaries, and timestamps.
Report::write_json persists a pretty JSON report with scenario, seed, run id, status/error, started/finished epoch fields, step records, assert outcomes, and node summaries.
peer-speedup-report
crates/nockchain-e2e/src/peer_speedup.rs
AssertPeerSpeedupOptions, AssertPeerSpeedupReport, assert_peer_speedup
38-120, 194-230
Produces gen1/gen2 peer request/response comparison reports for throughput, request count, and latency ratios.
assert_peer_speedup writes a JSON report and fails when gen2 ratios do not meet the configured threshold.
upgrade-cluster-harness
crates/nockchain-e2e/src/upgrade.rs
UpgradeTestConfig, NockchainCluster, WalletClient
1-360
Builds upgrade-focused fakenet clusters and wallet clients around activation height, phase flags, mining pkh, and private wallet commands.
The harness constructs a single-node fakenet with bythos/v1 phase settings and runs wallet commands against private gRPC ports.
nous-gen2-scenarios
tests/e2e/scenarios/nous_testnet_gen2_send.yaml
nous_testnet_gen2_send.yaml
1-180
Shows upstream testnet-style scenarios for gen2 request/response sends, wallet setup, partition, and reorg behavior.
The YAML scenarios combine miners, full nodes, fakenet ports, gen2 env flags, wallet captures, mining pkh updates, block stuffer commands, and partition/reorg waits.