Nockchain evidence

Scenario evidence source map

Nockchain Testkit/E2E Trace

Upstream source anchors for YAML scenarios, process and Docker node orchestration, gRPC readiness, transaction lifecycle checks, report JSON, gen2 peer-speedup, and upgrade harness behavior.

Commit
33ba97b1e206
Anchors
11
Capabilities
8
Crates
nockchain-testkit, nockchain-e2e

Source Anchors

scenario-yaml-schema

file

crates/nockchain-testkit/src/scenario.rs

symbols

Scenario, Scenario::load_from_path, NodeSpec, Action, WalletCapture, Assert

lineRange

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

file

crates/nockchain-e2e/src/runner.rs

symbols

RunOptions, run_scenario, expand_node_env, run_inner, run_steps

lineRange

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

file

crates/nockchain-e2e/src/node.rs

symbols

NodeMode, NodeManager, NodeManager::start_nodes, stop_nodes, restart_nodes, spawn_process_node, spawn_docker_node

lineRange

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

file

crates/nockchain-e2e/src/node.rs

symbols

build_node_args, build_node_args_docker, topology_peer_arg

lineRange

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

file

crates/nockchain-e2e/src/grpc.rs

symbols

wait_for_ready, wait_for_height, wait_for_height_private

lineRange

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

file

crates/nockchain-e2e/src/grpc.rs

symbols

submit_raw_tx, transaction_accepted, wait_for_tx_in_block

lineRange

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

file

crates/nockchain-e2e/src/grpc.rs

symbols

poke_private, set_mining_pkh_live, set_mining_enabled

lineRange

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

file

crates/nockchain-e2e/src/report.rs

symbols

Report, StepRecord, AssertOutcome, NodeSummary, Report::write_json

lineRange

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

file

crates/nockchain-e2e/src/peer_speedup.rs

symbols

AssertPeerSpeedupOptions, AssertPeerSpeedupReport, assert_peer_speedup

lineRange

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

file

crates/nockchain-e2e/src/upgrade.rs

symbols

UpgradeTestConfig, NockchainCluster, WalletClient

lineRange

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

file

tests/e2e/scenarios/nous_testnet_gen2_send.yaml

symbols

nous_testnet_gen2_send.yaml

lineRange

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.

Scenario Capabilities

process-and-docker-nodes

Process and Docker nodes

A receipt should say whether the scenario ran local processes or Docker containers before comparing ports, logs, or timing.

sourceAnchorIds

node-manager-process-docker

receiptFields

nodeIds, nodeMode, baseGrpcPort, baseP2pPort

wallet-command-capture-and-retry

Wallet command capture and retry

Wallet evidence belongs in summarized command/capture metadata, never raw wallet exports, seeds, or private spend keys.

sourceAnchorIds

scenario-yaml-schema, runner-scenario-lifecycle

receiptFields

walletAddress, walletCommandName, stepRecords, artifactHash

transaction-accepted-and-in-block

Transaction accepted and in block

Accepted-by-node and included-in-block are distinct assertions and should remain distinct in Nocksperimental receipts.

sourceAnchorIds

grpc-transaction-lifecycle

receiptFields

transactionHash, transactionAccepted, transactionBlockId, assertOutcomes

partition-reorg-and-upgrade

Partition, reorg, and upgrade

Partition, reorg, and upgrade scenarios need explicit phase and activation context before they inform fakenet or testnet assumptions.

sourceAnchorIds

scenario-yaml-schema, upgrade-cluster-harness, nous-gen2-scenarios

receiptFields

scenarioName, fakenetPhase, activationHeight, finalBlockIds

gen2-req-res-peer-speedup

Gen2 request/response peer speedup

Gen2 peer-speedup evidence should cite ratios and report hashes rather than raw sample dumps unless the operator keeps them local.

sourceAnchorIds

peer-speedup-report, nous-gen2-scenarios

receiptFields

peerSpeedupRatio, scenarioName, artifactHash, assertOutcomes

Receipt Contract

scenarioName
scenarioSeed
runId
nockchainCommit
nockchainBuild
nodeIds
nodeMode
baseGrpcPort
basePrivateGrpcPort
baseP2pPort
fakenetPhase
stepRecords
assertOutcomes
finalHeights
finalBlockIds
artifactHash
highlightedField

scenarioName

highlightedField

scenarioSeed

highlightedField

nodeMode

highlightedField

stepRecords

highlightedField

assertOutcomes

highlightedField

artifactHash

reviewRule

Publish scenario names, seeds, node ids, ports, hashes, status labels, and source anchors, not raw node logs or state artifacts.

reviewRule

Keep accepted transaction and block inclusion evidence separate because upstream models them as separate gRPC checks.

reviewRule

Attach fakenet phase, activation height, and upstream build before using an upgrade or partition scenario as a product assumption.

reviewRule

Hash report JSON and local artifacts before linking them to Launch Evidence, VESL, Nockup, or BYO fakenet receipts.

Nocksperimental Implications

Nocksperimental can expose an upstream-compatible scenario and receipt vocabulary for anyone connecting a fakenet.
BYO fakenets should map endpoint, wallet, node, transaction, and peer evidence to the same NodeSpec, Action, Assert, and Report concepts.
Support bundles should publish report JSON summaries and artifact hashes, not raw logs, raw state jams, PMA slabs, or raw transactions.
Nous/gen2 scenario semantics can shape local fakenet sync, peer, partition, reorg, and wrong-commitment diagnostics.
Launch Evidence, VESL, and Nockup receipts can cite scenario capability ids before using a test result as product proof.

Local Verification

status

source-inspected

inspectedSourceCommit

33ba97b1e206dd89b15c61b72b7802caf2136c18

highlightedCommand

cargo check -p nockchain-e2e

command

cargo check -p nockchain-testkit

command

cargo check -p nockchain-e2e

command

cargo test -p nockchain-testkit

command

cargo test -p nockchain-e2e --lib

Forbidden Evidence

forbiddenField

walletSeedPhrase

forbiddenField

privateSpendKey

forbiddenField

rawWalletExport

forbiddenField

rawPmaSlab

forbiddenField

rawStateJam

forbiddenField

rawEventLog

forbiddenField

rawStdoutLog

forbiddenField

rawStderrLog

forbiddenField

rawTransactionPayload

highlightedForbidden

walletSeedPhrase

highlightedForbidden

rawWalletExport

highlightedForbidden

rawStateJam

highlightedForbidden

rawTransactionPayload

symbol

Scenario::load_from_path

symbol

NodeManager::start_nodes

symbol

submit_raw_tx

symbol

wait_for_tx_in_block

symbol

Report::write_json

symbol

NockchainCluster