Repository navigation
Conversation
Bound the verifier context per node, preserve retryable header state on resource errors, and keep network handlers from assuming an index exists. Cover arithmetic boundaries, constrained valid-header retry, and extreme declared heights.
Record exact-SHA CI, five-package inspection, testnet restart, local resource-error regressions, and the release gates that remain open.
Record the contributor whose forged-work report and regression suggestions prompted the review while preserving the pre-activation height rule.
Read raw headers from a local validated mainnet node, verify checkpoint and previous links, and report declared-height differences. Resume replays its prefix before it can claim complete evidence.
Reject a wrong contextual target before building an epoch cache. Preserve the later contextual check and prove the early path with a red-then-green regression.
Document the early difficulty check, canonical history scanner, repeatable-work risk, and pending exact-SHA release qualification.
…osal Integrate the local resource guard, early difficulty check, canonical history scanner, contributor credit, and open release gates.
Compute the final hash from the claimed mix and reject an over-target header or block before building an epoch context. A valid proof has the same final hash under full verification, so only headers that full verification would reject are affected. Under-target claims still require full ProgPoW work.
…ed library symbols Remove the argument manager and its preprocessor branch from hash.cpp. Startup validates -maxkawpowcontextmb and passes it through SetKAWPOWContextBudgetMiB, so zero, negative, or non-numeric values stop startup instead of making every KAWPOW proof a local error. The standalone consensus library keeps the 256 MiB default. Libtool's -no-undefined only rejects unresolved symbols in a Windows DLL. Link the ELF shared consensus library with -Wl,-z,defs when the linker accepts it, outside sanitizer builds, so a node-only symbol fails on Linux as well.
Store full KAWPOW verification results in a bounded exact cache keyed by the claimed-mix final hash, which commits to every header field, the nonce, and the claimed mix. A replayed header can no longer force another epoch context or ProgPoW run. Local budget and allocation errors are not stored, and contextual checks still run on every submission. Add a test-only allocation failure to exercise the local-error branch, and release the startup thread's KAWPOW context after the block index is loaded and verified. Red-then-green regressions show that, without the cache lookup, both replays need a new context.
Document the claimed-target check, exact proof-result cache, allocation-failure regression, peer context bound, startup budget validation, and ELF consensus-library link guard. FINDING-197 remains open only for the canonical mainnet declared-height evidence, and the later source needs exact-SHA qualification.
Read raw mainnet block files, recompute each KAWPOW header's final hash, and walk previous-block links back from the pinned height-gate checkpoint. Neither file order nor a node index is trusted. Report declared-height differences, the largest declared epoch and its context size, off-walk KAWPOW records, and optional UpdateTip cross-checks against a validating node. The self-test binds the checkpoint header to its pinned hash.
The checkpoint-anchored block-file walk found that all 3,268,040 canonical KAWPOW headers before the height gate declare their actual height. The largest declared epoch is 598, which needs 91 MiB of the 256 MiB default context budget, and 41,312 walked heights match the validating replay. Mark FINDING-197 fixed locally, pending exact-SHA qualification under FINDING-067.
The binary built from 6dcf85d accepted 532 new public testnet KAWPOW blocks, passed verifychain 4 2016 before and after a restart, and accepted three more blocks without KAWPOW context, proof, or error lines in its log.
… link guard into upstream proposal
Since 16c2d00 the shared consensus library links with -Wl,-z,defs. Final Gate run 40594373087 then failed on arm32v7 because src/algo/sha2.c marks sha256_transform external on 32-bit ARM and expects an assembly implementation that is not part of this tree. Earlier 32-bit ARM shared libraries were linked with that symbol unresolved. No other source calls the functions in src/algo/sha2.c, so every executable already linked without them. Compiling the existing C transform on all targets resolves the library symbol. The x86_64 preprocessed source, text section, and symbol table are unchanged.
…x into upstream proposal
Build Raven 40599833317 and Final Gate 40599833429 passed on upstream PR head a756574, which merges c86a18d. Every ELF Final Gate variant enabled shared libraries, accepted -Wl,-z,defs and linked the consensus library; the Windows DLL link passed under -no-undefined. The fork PR merge runs 40599829809 and 40599829816 also passed. Mark FINDING-197 and FINDING-199 fixed on that head, record the 32-bit ARM sha256_transform gap that the link guard exposed, and keep FINDING-067 open for the five-bundle review, the bit-12 go/no-go and the release steps.
…to upstream proposal
Record the unsigned v4.8.1-rc2 pre-release built from PR head e3356f3: its exact-SHA Build Raven 40609746431 and Final Gate 40609746325 runs, the five-bundle review against the source checkout, the packaged Linux Qt smokes, and the re-downloaded asset checksums. Note that the RC1 Linux ARM32 consensus library fails to load because sha256_transform is unresolved, and that RC2 supersedes RC1. RC2 is not a stable release; FINDING-067 stays open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose and baseline
This PR merges a Core 4.8.0-based RIP-25 candidate into current RavenProject master (
6d48ae0175b10283248146ae3080e2ba70966739). That master does not yet contain thev4.8.0tag (225491298), so the direct PR diff includes both the Core 4.8.0 baseline and the incremental 4.8.1 work. The sections below describe the 4.8.1 changes relative to Core 4.8.0. For a focused view of those changes, compare v4.8.0 with the fork candidate. The candidate carries native RVN work from the historical PR #1281, adds a separate asset rule, and includes security corrections found while integrating and qualifying the code. The maintained fork candidate and release work are tracked in ALENOC/Ravencoin PR #14.Changes compared with Core 4.8.0
Native RVN post-quantum spending
NODE_PQ_HYBRIDservice flag. The implementation uses pinned liboqs in the depends builds.getnewpqaddressand boundedrecoverpqkeysRPC support. New PQ address generation is gated by activation. A historical RVN output remains spendable under its existing classical rule. An owner migrates voluntarily by sending it to a new witness-v2 PQ address; spending that new output uses ML-DSA without ECDSA.Asset and owner-token protection
getnewpqassetaddressandlistpqassetaddresses. Historical asset and owner-token outputs retain their original classical spending rule until the owner moves them. Neither deployment retroactively protects existing holdings or globally disables classical signatures.fundrawtransactiondoes not choose matching anchors automatically, so raw transaction callers must supply and verify them.Security and reliability corrections
bad-diffbits; localmake checkpassed 540 cases. Each KAWPOW claim must also meet its target before a context is built, and completed proof results are cached, so replaying a header cannot force repeated context work. A checkpoint-anchored scan of the canonical mainnet block files found that all 3,268,040 KAWPOW headers up to the height gate declare their actual height, so the largest canonical context needs 91 MiB of the 256 MiB default. Both scanners are included. FINDING-197 is fixed on the tested PR head.-maxkawpowcontextmb. The old object had unresolvedgArgsandArgsManager::GetArgreferences; the rebuilt object has neither, and the Windows Final Gate link passed onaa5b128c5. Startup now validates-maxkawpowcontextmband passes it to the hash code, and ELF builds link the shared consensus library with-Wl,-z,defs, so an unresolved node symbol fails there too. That check exposed an unresolvedsha256_transformin 32-bit ARM builds of the library, which now compile the existing C implementation. FINDING-199 is fixed on the tested PR head.Verification performed
The current PR head is
2819fbae571dcc1e8a6379d0465571bdd003cb8d, a local no-ff integration of the updated Core 4.8.0-based fork candidate into the older official master baseline. It differs from the RC2 sourcee3356f3f1only in documentation that records the RC2 pre-release, and Build Raven #40645974986 and Final Gate #40645975041 passed on this exact SHA. One3356f3f177be59151edd8de1add19fc61e71d37, Build Raven #40609746431 and Final Gate #40609746325 passed, including required security tests, all five release targets, the aggregate bundle verifier, and all seven Final Gate variants. Every ELF variant linked the consensus library with-Wl,-z,defs, and the Windows library link passed. Its five packages passed an independent download review against the source checkout, the packaged Linux Qt application passed the wallet-disabled smokes, and the packages are published as the unsigned v4.8.1-rc2 pre-release. The earlier heada756574d4passed Build Raven #40599833317 and Final Gate #40599833429. Localmake checkpassed 546test_ravencases on fork sourceccb576e13; undersrc/, this head adds only the 32-bit ARMsha2.ccorrection, which leaves the x86_64 object unchanged. All 29 focused KAWPOW cases passed. The KAWPOW tests cover forged work, checkpoint siblings, saved invalid branches, concurrent epochs, extreme declared heights, claimed-target checks before context allocation, replayed proof results, allocation failure, local resource errors, valid-header retry after raising the budget, and early bad-difficulty checks for headers and complete blocks. Structural and behavioral invariants with their negative controls, all 14 required functional tests under Python 3.10, the release contract, and both scanner self-tests passed locally.A binary built from fork candidate
6dcf85d9e, with the same KAWPOW code as this head, ran on the public unpruned testnet database withassumevalid=0. It accepted 532 new KAWPOW blocks through height 2,571,017, passedverifychain 4 2016before and after a restart, and accepted three more blocks through height 2,571,020. Earlier, the exactaa5b128c5binary passedverifychain 4 2016twice and accepted blocks through height 2,570,490 with bit 12 STARTED and bit 13 DEFINED. These runs confirm historical compatibility and continued validation, not live activation of the proposed rules.PR head
aa5b128c565104c19c9ba9837797acaae4983f4cpassed Build Raven #40499782364 and Final Gate #40499782271, including the Windows consensus-library link, and localmake checkpassed 540 cases there. The next fork candidatec76826b36failed Final Gate #40594373087 only in its two 32-bit ARM variants, on thesha256_transformlink error corrected above.The earlier PR head
30349977b90b8e1743a3948d3f613090b3e78523passed Build Raven #40455702783, including all five release targets and the aggregate bundle verifier. Final Gate #40455702781 passed its required security job and six platform builds, but Windows failed linking the consensus library, as recorded in FINDING-199. Its testnet binary reopened the unpruned chain and passedverifychain 4 2016at height 2,570,118. These results are historical and do not qualify this new SHA.The earlier PR checkpoint
c63cad804e606211b3c87ff84d14ca3dff9c9c44passed Build Raven #40327113350 and RIP-25 v4.8 Final Gate #40327113034. Their required security jobs, all five release targets, aggregate package check, and seven Final Gate variants succeeded. A separate download review of all five bundles passed exact-checkout source, common source archive, manifest, provenance, target binary-format, Windows installer, and complete macOS app checks. Their common source archive SHA-256 is77665286b6a2a5c0a100ae5342b266d7139e0f3160633ca4a0404d2807b3e6b1. The extracted Linux package passed wallet-disabled Qt startup and Options interaction under Xvfb. The unpruned public testnet node reopened its existing history with that binary at height 2,569,434, accepted later blocks, and returned true forverifychain 4 2016. These results do not qualify the new head.The fork source at
1e1dfde159c6feace73459c6b9a1b8dbb87456dfpassed localmake checkand its eight-case release-document contract. Its exact-SHA Build Raven passed its required security job, includingmake checkand all 38 functional tests, all five release target builds, and the aggregate downloaded-bundle verifier. A separate review of its five downloaded bundles confirmed the same checks, with source archive SHA-25667c3d1ff7b5ca759c7d54e47edc51814eec34d46b9e7c1b6e3165f0558d0a151. Its packaged Linux Qt application passed both wallet-disabled smokes. Its Final Gate passed its security job, includingmake checkand all 38 functional tests, and all seven platform build variants. Earlier exact-SHA fork runs passed both workflows and independent five-package provenance checks; the downloaded Linux Qt package passed node-only startup and Options interaction under Xvfb.The unpruned public testnet database was replayed from genesis with
assumevalid=0and synchronized with peers. The current fork binary1e1dfde15reopened it at height 2,567,901 and passedverifychain 4 2016. An earlier full active-chain scan through height 2,563,374 found no witness-v2 outputs or spends. The later1e1dfde15deep check demonstrates continuing historical compatibility, not a live public-network PQ activation. Regtest covers bit-12 and bit-13 activation boundaries, reorganization, wallet, and asset behavior. Public testnet force-enables the native PQ rule from genesis, so its current 16 MWU template cannot prove the mainnet 8-to-12-MWU BIP9 transition.Rollout and review status
The bit-12 weight change is incompatible with Core 4.8.0 validation after activation. Miners, pools, full nodes, exchanges, custodians, and dependent services need to upgrade before ACTIVE; signaling alone does not update validators. An upgraded 4.8.1 miner template automatically signals bit 12 during STARTED and LOCKED_IN, so the operator go/no-go must be settled before that window. FINDING-197 and FINDING-199 are fixed on the tested head. FINDING-067 remains HIGH and OPEN for operator readiness, the bit-12 go/no-go, and final stable release steps. The local KAWPOW budget is an operator resource limit, not a consensus height rule. The fork v4.8.1-rc2 pre-release publishes eight unsigned evaluation distributions from
e3356f3f1andSHA256SUMS-unsigned.txt. All nine uploaded assets were downloaded again and matched their SHA-256 digests. RC2 supersedes v4.8.1-rc1, which predates the KAWPOW corrections and whose Linux ARM32 consensus library fails to load. Native Windows and macOS GUI use has not been tested and is assigned to community testing after publication. Cross-platform compilation and package inspection do not prove native GUI behavior or reproducible builds.Please review consensus compatibility at activation, KAWPOW header verification and its remaining resource limit, asset parsing and anchor enforcement, wallet custody and recovery, raw funding, Qt behavior, and the release checks. This PR requests code review and does not authorize bit-12 activation or a final stable release. The 4.8.1 release notes describe the proposed operator sequence and migration path.
The public status and handoff note summarizes decisions, evidence, and remaining work. It is included in the current PR head; it does not make the RC1 or RC2 artifacts representative of a later head.