GeezerVison is showing github.com — feat(hf4): body commitment, migration path, and gated supply reporting by liqdmetal · Pull Request #139 · DEROFDN/derohe
Conversation
liqdmetal
commented
Oct 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
HF4 implementation branch for public review. This is not an activation proposal. Mainnet HF4 remains unscheduled.
Scope
- v4 transaction-body commitment: HF4 blocks bind ordered serialized transaction bodies to
Block.Proof. This is a breaking v4 block-ID change.
- Seamless migration path: the reserved SCID becomes a stateless
Migrate marker. Native DERO moves through a standard transfer with BurnValue=0 and ring size at least 16.
- HF3-gated reporting-only forensic supply:
DERO.GetInfo may include created_supply_floor and adjusts spendable_supply on real mainnet at or after HF3. No consensus, issuance, or balance changes.
- CI, simulator, wallet, and migration test harness fixes.
Included prerequisites
K0 B1 (min-ring-4 privacy floor) and K0 B2 (NoSigner meta bit) are included because the migration marker uses the NoSigner DVM API and its tests. Unrelated K0/DVM/CI work from the internal 2027 line is excluded.
Not included
- Proof-carrying supply checkpoint
- Corrected full-history accounting
- Claim/nullifier state and repair transition
- Mainnet activation height
Those remain design work. See #138 for the evidence-intake request and checkpoint specification.
Verification
go build ./... passes.
- Full
go test -count=1 -p 1 -timeout 180s ./... passes: all 34 packages, including block, blockchain, dvm, forensicsupply, rpc, transaction, cmd/simulator (47s), walletapi (40s), and walletapi/xswd (55s).
- Live two-node loopback testnet on
028b2a7: v4 blocks 1-3, identical hashes on both nodes, block 1 proof equals SerializedTransactionsCommitment(nil), migration SC installed at testnet genesis, and the forensic supply record is absent on testnet. See docs/hf4-testnet-rehearsal.md.
- Targeted vet and gofmt checks pass for the HF4 packages.
- Reproducible release build produces Linux amd64/arm64, Windows amd64, and macOS amd64/arm64 binaries with checksums.
- CI workflow:
.github/workflows/hf4-ci.yml (build, scoped vet, targeted tests, race, gofmt). GitHub has not started checks on this fork PR; the workflow is validated locally.
Review focus
- Body commitment domain separation and block validation.
- Migration validation,
BurnValue=0, ring >= 16, and the no-value-custody invariant.
- Supply gate: reporting only, mainnet/HF3 only, fail-closed on invalid HF3 height.
- Breaking block-ID change and operator coordination.
Docs
docs/hf4-consensus.md
docs/seamless-migration.md
docs/hf4-activation-runbook.md
docs/hf4-release-process.md
docs/forensics/DERO-GETINFO-SUPPLY.md
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…g-4 floor
- wallet_memory.go: LastRingSizeWarning field (not persisted)
- wallet_transfer.go: TransferPayload0 sets warning when ringsize resolves to 2/<4
- rpc/wallet_rpc.go: Transfer_Result.PrivacyWarning surfaces to programmatic callers
- rpcserver/rpc_transfer.go: wire PrivacyWarning into result
- prompt.go: burn path prints warning, requires explicit confirm
- config.go: K0_MIN_RING4_HEIGHT (mainnet 7,600,000 post-HF3; testnet 0 = genesis)
- transaction_verify.go: k0RingSizeFloorReject - NORMAL/BURN ringsize<4 rejected
post-gate; SC_TX/coinbase/registration/premine exempt until verify_sig migration
- Mainnet baseline: 56.8% of txs at ringsize 2 expose the signer (spec K0)
- Fix A ships immediately (no fork); Fix B1 slots into next HF
- Tests: k0_guard_test.go (4) + k0_ringsize_test.go (3)
… enforcement
SC_META_DATA gains a NoSigner bit in the high bit of the existing Type
byte (33-byte wire format UNCHANGED, existing contracts default to
uses_signer=true — behavior preserved). ContractUsesSigner() scans the
parsed contract's function lines for SIGNER() (case-insensitive, matching
the DVM's dispatch).
- install path (transaction_execute.go + simulator.go): auto-set NoSigner
when the contract never calls SIGNER() — no contract-author change needed
- consensus (transaction_verify.go): ringsize-2 SC_INSTALL rejected when
the code has no SIGNER(); ringsize-2 SC_CALL rejected when the called
contract's stored meta has NoSigner (read from SC_META tree at the tx's
referenced snapshot)
- private-SC checks use IsPrivate() (masks the B2 bit) so the two flags
coexist in one byte
This closes the last legitimate ringsize-2 need for non-SIGNER contracts;
ringsize 2 survives only for genuinely owner-gated contracts until Fix C
(verify_sig) removes even that.
Tests: 7 dvm (detection, bit round-trip, 33-byte legacy compat) + 4
blockchain consensus-rule tests.
Add a domain-separated SHA-256 commitment of ordered serialized transaction bodies to the v4 Proof field. Validate bodies and height-scoped transaction policy through block validation, storage, bootstrap, RPC, and execution.
BREAKING CHANGE: v4 block IDs require the transaction-body commitment; nodes using the previous v4 header interpretation are incompatible.
Expose the evidence-bounded created_supply_floor in DERO.GetInfo only for real mainnet at or after HF3. Keep total_supply on the emission schedule, add the pinned net created-supply floor to spendable_supply, and surface the record in the explorer. Reporting only: no consensus, issuance, or balance changes.
Add the missing daemon-connect and wallet-close helpers, give each simulator test a unique RPC port and data directory, and raise the creation test ring size to the HF4 privacy floor of 4. The simulator package now compiles and all tests pass.
The 4 TX tests shared a package-global rpcport (127.0.0.1:26000) and a
fixed /tmp dir, so running them serially in one process made the second+
simulator chain collide on the port and hang. simulator_chain_start now
allocates a unique port (26001+) and tmpdir per call and returns the port
via params; each test wires SetDaemonAddress to its own chain.
Also fixed two stale absolute balance assertions that the hang used to mask
(both assumed an 800k simulator start the code no longer grants):
- Test_Payload_TX: delta-based (pre + 8x90000)
- Test_Creation_TX_morecheck: delta-based (pre + one confirmed 700000 tx;
the test builds 7 txs but only one confirms given its mine-before-add
ordering)
Verified: all 4 TX tests + DB/generation/K0/token tests pass together in
one process (36s, no hang).
(cherry picked from commit 7e283cf)
Add a testnet/mainnet activation runbook covering the body commitment, migration path, and reporting-only supply. Add a GitHub Actions workflow for build, vet, targeted tests, race tests, and targeted gofmt.
Raise the test ring sizes from 2 to 4, start the proof-collection loop at 4, use SetRingSize, and assert balance deltas instead of the old 800k-based absolutes. The full walletapi suite now completes and passes.
Add a release build script for Linux, Windows, and macOS targets and a release process covering reproducibility, signing, publication, and coordination.
|
Companion docs/evidence PR: #138. This implementation does not include the proof-carrying supply checkpoint; #138 is the evidence-intake request that gates that work.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Full serialized suite is green on d811ac4 (source unchanged from 6388bc3; d811ac4 only scopes the CI vet step).
go test -count=1 -p 1 -timeout 180s ./...
34 package results
ok github.com/deroproject/derohe/astrobwt 19.886s
ok github.com/deroproject/derohe/astrobwt/astrobwt_fast 1.421s
ok github.com/deroproject/derohe/astrobwt/astrobwtv3 21.674s
ok github.com/deroproject/derohe/block 0.372s
ok github.com/deroproject/derohe/blockchain 0.428s
ok github.com/deroproject/derohe/blockchain/mempool 0.401s
ok github.com/deroproject/derohe/blockchain/regpool 0.401s
ok github.com/deroproject/derohe/cmd/dero-miner 0.439s
ok github.com/deroproject/derohe/cmd/dero-wallet-cli 0.514s
ok github.com/deroproject/derohe/cmd/derod 0.517s
ok github.com/deroproject/derohe/cmd/derod/rpc 0.587s
ok github.com/deroproject/derohe/cmd/explorer 0.410s
ok github.com/deroproject/derohe/cmd/explorer/explorerlib 0.398s
ok github.com/deroproject/derohe/cmd/rpc_examples/pong_server 0.437s
ok github.com/deroproject/derohe/cmd/simulator 47.086s
ok github.com/deroproject/derohe/config 0.512s
ok github.com/deroproject/derohe/cryptography/bn256 0.337s
ok github.com/deroproject/derohe/cryptography/crypto 0.352s
ok github.com/deroproject/derohe/dvm 0.494s
ok github.com/deroproject/derohe/errormsg 0.264s
ok github.com/deroproject/derohe/forensicsupply 0.259s
ok github.com/deroproject/derohe/globals 0.358s
ok github.com/deroproject/derohe/glue/rwc 0.335s
ok github.com/deroproject/derohe/metrics 0.330s
ok github.com/deroproject/derohe/p2p 0.426s
? github.com/deroproject/derohe/pow [no test files]
? github.com/deroproject/derohe/premine [no test files]
ok github.com/deroproject/derohe/proof 0.362s
ok github.com/deroproject/derohe/rpc 0.407s
ok github.com/deroproject/derohe/transaction 0.358s
ok github.com/deroproject/derohe/walletapi 40.109s
ok github.com/deroproject/derohe/walletapi/mnemonics 0.255s
ok github.com/deroproject/derohe/walletapi/rpcserver 0.521s
ok github.com/deroproject/derohe/walletapi/xswd 54.975s
Also verified:
go build ./... passes.
gofmt is clean for every HF4 file checked against the LF index content.
- The release build produced Linux amd64/arm64, Windows amd64, and macOS amd64/arm64 binaries plus
SHA256SUMS and BUILD-INFO.
- Mainnet
MAJOR_HF4_HEIGHT is HeightUnscheduled; testnet applies at genesis. No activation height is proposed.
CI note: the workflow is in this branch, but GitHub has not started checks on this fork PR. The fork cannot dispatch it because the workflow is not on the fork's default branch. A maintainer can approve/run it, or it will run after merge.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Race-detector CI-parity run is also green:
go test -race -count=1 -p 1 -timeout 600s ./forensicsupply/... ./block/... ./blockchain/... ./rpc/...
ok github.com/deroproject/derohe/forensicsupply 1.140s
ok github.com/deroproject/derohe/block 1.401s
ok github.com/deroproject/derohe/blockchain 1.319s
ok github.com/deroproject/derohe/blockchain/mempool 1.334s
ok github.com/deroproject/derohe/blockchain/regpool 1.285s
ok github.com/deroproject/derohe/rpc 1.464s
EXIT:0
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Document a two-node loopback testnet run: v4 blocks 1-3 with identical hashes, block 1 proof equal to the empty-body commitment, the migration SC installed at testnet genesis, and the forensic supply record correctly absent on testnet. Record the loopback peer-identity and getwork-port pitfalls and the remaining WAN/migration-transaction gaps.
|
Live two-node loopback testnet rehearsal is recorded in docs/hf4-testnet-rehearsal.md (commit 028b2a7, testnet HF4 active at genesis).
| Check |
Result |
| Blocks 1-3 |
major_version=4, minor_version=4 |
| Cross-node agreement |
identical block hashes at topoheight 1-3 on both nodes |
| Body commitment |
block 1 deserialized: txhashes=0, proof=82d2c124...a618cf7b == SerializedTransactionsCommitment(nil) |
| Migration SC |
installed on both nodes, stateless marker code, balance 0, SCID ...02 |
| Supply gate |
testnet total_supply=12283973, spendable_supply=12283973, forensic_supply absent |
| Follower sync |
N2 reached N1 height and hashes |
Operational findings from the run: peer identity is IP-keyed (loopback nodes need distinct 127.0.0.x addresses), simultaneous start causes mutual dial backoff (start sequentially), --min-peers=0 is rejected (use at least 1), and the miner must target the getwork port rather than JSON-RPC.
Not covered by this rehearsal: WAN multi-operator rehearsal, a live migration transaction from a funded wallet, and a reorg across activation. The migration validation matrix and the reorg path are covered by blockchain/migration_validation_test.go, dvm/seamless_migration_test.go, cmd/simulator/seamless_migration_fork_test.go, and walletapi/rpcserver/rpc_scinvoke_migration_test.go.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 26, 2026
|
RFC opened in #143 for the overall HF4 + archive-intake option. It includes the status table, a candidate anchor (not approved), and the open decision on publishing the replay/accounting code. No activation height is proposed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|