Protocol v2: the before-1.0 change batch (T14) #2
No reviewers
Labels
No labels
Priority
Critical
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amethyst/the-open-network-x!2
Loading…
Reference in a new issue
No description provided.
Delete branch "release/protocol-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Branch:
release/protocol-v2→main(35 commits, 176 files,+26,587 / −6,039). Tip:
c23162f.Merge as one unit. Use a merge commit, not squash, rebase or a
cherry-pick of any part. Every item below changes genesis, the chain ID
or block validity. They ship together so the M8 "protocol has stopped
moving" clock restarts only once. Two intermediate commits are marked
wip(...)(00ee120,a1b3a7c). The commits between them and the tip arenot each green on their own; only the tip was verified. To bisect across
this merge, use
git bisect --first-parent.What this changes
All seven items from "The Before 1.0 change batch" in
docs/research/trajectory-combined.mdare here. They implement theaccepted ADR-0066 to ADR-0069, the new ADR-0071 (T9, upgrade policy) and the
T10 limits. ADR-0072 records the owner's decisions, the implementation
choices where an ADR left room, and errata.
signature is an envelope (
scheme u16 ‖ len ‖ payload), and the scheme IDis in every signed preimage. Supported schemes are Ed25519
0x0001,SLH-DSA-SHA2-128s
0x0201(RustCryptoslh-dsa =0.2.0-rc.5) and thehybrid
0x0402. The chain config carries a disabled-scheme set (max 8),and the new
CHKSIGXopcode is0x63.AuthRoot with a hot leaf and an optional backup leaf. Under the
emergency rule, a disabled hot scheme freezes the hot leaf and the
backup can still recover.
KeyRotatehas a normal modeand a recovery mode. Backup recovery is commit-reveal with a delay
(owner decision O4): a 17,280-block delay, then a 120,960-block window.
record approved by more than 2/3 of stake with 2^19 blocks of notice.
There is a lost-key path. Keys apply per height. The signature-section
budget is parameterized per scheme.
protected transfers with delay and cancel, an allowlist and a co-signer.
New actions are
SetPolicyandCancelPending; there is a pending queueand a release phase.
a quorum and a cancel record. There is an emergency scheme disable
(720 blocks of notice) and a liveness guard. A node that does not
implement the required version halts.
with its code value.
Also in the batch:
block_time ≥ parent + 5, with a15 s drift policy.
root covers accounts, the validator registry and the chain config.
PROTOCOL_VERSION2 and a new genesis and chain ID.Validators now re-send their own round messages every 5 s.
The full list of consensus changes is in
docs/releases/protocol-v2.md.New genesis and chain ID
main)bbf4242b…f559f17dba8bbec994d15ad6176878442f6243f8a6eb7a9e10a821732833ac888d5bf804d04ab232…873773fcb0bc0ab8ab39f46d60f4e03746db2a1252e2ceec313453b80514a82d8df0Nothing migrates. A v2 node refuses v1 databases, ONXBLK05 block files and
v1 genesis documents.
Specs updated to match the code
These specs changed:
protocol-primitives.md,state-model.md,transactions.md,execution.md,blocks.md,consensus.md,economics.md,tvm-instruction-set.md,contract-language.md,networking-dht.mdandnetworking-block-sync.md. So diddocs/research/consensus-limits.md. ADR-0066 to ADR-0069 are now Accepted(2026-10-19), and ADR-0071 and ADR-0072 are new.
Tests, vectors and fuzzing
onx-primitives: scheme vectors, including NIST ACVP for SLH-DSA.onx-stf: account policies, key rotation, system records, blockbuilder, protocol-v2 vectors and wire mutation.
onx-tooling: quorum properties.onx-cli: unit and end-to-end tests.reference/nowcovers schemes, auth, policy, system records and genesis. New vector files
are
protocol_v2.jsonandchksig_v2.json, and every existing vector wasregenerated. Rust agrees with every one.
scheme_envelopeandaccount_message. Stable-toolchain mutation tests run incargo test.Verification (final run on
c23162f's tree)cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --no-fail-fast--check(11)check-doc-links,check-spec-citations,check-research-logbook,version.py check,site.py checkscripts/multinode-sync-test.sh(producer and follower over ADNL, followerkill -9and resume)scripts/soak-test.py, shortened (4 validators, planned SIGKILL restarts)account_message10 min / 57M inputs,scheme_envelope5 min / 9M inputs; no crashfeat/onx-os-protocol-v2)Not implemented
The release notes have the full list, with reasons. In short:
rejected.
CHKSIGXsupports Ed25519 only.signatures or co-signer policy matching; these show as "Not checked".
onx-clihas no chain-state queries.onx-clicannot sign an account action across several machines.SHA256SUMS.enforced in code.
Before merging
.forgejo/workflows/kani.yml).fuzz/README.md).python3 scripts/version.py bump minor(0.3.0 → 0.4.0).The CHANGELOG's Unreleased section already describes v2.
After merging (deployment order)
/root/onxon the devnet VM) and delete its datadirectory. v2 refuses the v1 database.
omit
addressor give the derived v2 address, and a[chain]sectionis optional. Then run the v2
onx-genesis. devnet-1's current chain ID (6b0e9781…) is not theconfig/genesis.tomlone, so its new ID is whatever its own genesisproduces. Record it.
empty_blocks. The v2 default is a block every 5-second slot,or 17,280 block files a day served by nginx from
/root/onx/data/blocks.Set
empty_blocks = falsein/root/onx/onxd.tomlif devnet-1 shouldkeep making blocks only when there is work.
docs/guides/hosting.md("a block only when a message arrives") then needs updating to whichever
you choose.
data.on-x-scan.com/devnet-1/.The v2 explorer rejects ONXBLK05 files.
explorer/index.htmland set the pinned Devnet-1chainIdto thenew chain ID (it is still the v1 value,
6b0e9781…). Then runscripts/site.py buildand deploy the sites.feat/onx-os, thenfeat/onx-os-protocol-v2(its devnetrecreate writes the v2 genesis layout). Deploy it only with v2 binaries.
docs/emergency-runbook) to the shippedmechanisms before merging it.
🤖 Generated with Claude Code
https://claude.ai/code/session_013JUj9jVod9FEqQDNi147PZ
Restored record (DT-22 rebuild, 2026-10-28): this pull request was originally #27 on the previous Forgejo instance, which was lost when the old server was destroyed (2026-10-27/28). Recreated from the preserved API capture with its original title and body. Head branch
release/protocol-v2atc23162f, matching the lost server head.