Documentation
¶
Overview ¶
Command perfcorpus builds a replayable corpus of real bstore records for step-load runs on a lab (lab and tests only, never for real use).
The objects are what bstore's clients publish on a records topic, built from the record codecs in storerec and bcommon: object entries (puts of a few sizes, deletes), outcome records and front statements on carriers, mined advertisements and hold outputs, and bucket tokens that anchor entries. The format lets most of it be built offline:
- A carrier needs only its funding tree to be mined (the carrier itself is never mineable), so after one block of funding trees every entry, outcome and front statement is signed offline, as many as wanted. Carriers reuse the trees' outputs: admission reads each submission's own bytes and no host sees a double spend of a funding output that is never broadcast.
- Advertisements, hold outputs and bucket tokens are admitted only when mined, so those are built and broadcast once, at plan time, each spent from a fan-out of one funding payment, and proven before the set is written.
Subcommands, in order:
perfcorpus init -root DIR identities and two perf buckets' names
perfcorpus plan -root DIR [counts] sign every on-chain transaction (nothing sent)
perfcorpus send -root DIR -propagation URL broadcast the plan level by level
perfcorpus prove -root DIR -asset URL wait for the blocks, record each minimal proof
perfcorpus build -root DIR -name SET -shapes ... -count N
write a replay set (offline carriers,
the mined objects, the mix)
perfcorpus check -set DIR -asset URL [-n K] admit the first K objects of each shape
with storerec.Admit against the chain's headers
The root needs two files that no subcommand writes; they are put in it before plan, by hand or by whatever holds the lab's coins (TestCorpusAdmits writes both):
- wallet.json, {"wif": "<WIF>"}: the fee key every fee coin pays.
- funding.json: the one mined payment to that key's P2PKH address that every on-chain transaction descends from, as {"txid", "raw" (the transaction, hex), "bump" (its BRC-74 merkle path, hex), "height", "address", "outputs": [{"vout", "satoshis"}, ...]}. plan refuses a raw that does not hash to txid or an address that is not the fee key's, and draws its coins from the listed outputs.
The set directory is what a corpus replay tool reads: <shape>.bin of length-prefixed BRC-149 submission records, manifest.json, and replay's cursor.