Skip to content

Refuse relayed mutations of fields the block hash does not cover. - #1090

Merged
seanPhill merged 6 commits into
Veil-Project:masterfrom
seanPhill:consensus/unhashed-header-fields
Oct 2, 2026
Merged

seanPhill merged 6 commits into
Veil-Project:masterfrom
seanPhill:consensus/unhashed-header-fields

Conversation

@seanPhill

Copy link
Copy Markdown
Collaborator

After the PoW update, stake type, the proof-of-full-node fields, pre-update hashVeilData on stake blocks, and the post-update accumulator body can be rewritten without moving the hash. Reject those copies as a possible corruption before storage, and only connect the copy this call stored. All credit belongs to @ohcee! Many thanks.

After the PoW update, stake type, the proof-of-full-node fields, pre-update
hashVeilData on stake blocks, and the post-update accumulator body can be
rewritten without moving the hash. Reject those copies as a possible
corruption before storage, and only connect the copy this call stored.
The previous download path is no longer available.
The previous download path is no longer available.
Previous download path is no longer available.

@seanPhill seanPhill left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a necessary vulnerability fix. The code has been thoroughly checked by multiple of us, and it will be further tested on testnet before it becomes an official release. It will be done quickly.

@nik343

nik343 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Looks good, just two small issues: right now CheckProofOfFullNode() accepts missing PoFN fields without checking whether the coinstake has blinded outputs. Since those fields aren’t hashed, they can be stripped without changing the block hash; the stripped copy gets stored, later fails normally, and causes the honest same-hash block to be rejected. Also CheckBlock() still routes PoW from the body and can hit bad-pos-version before checking the body commitments. I can forward fixes to @seanPhill shortly

* validation: close remaining block mutation paths

* test: initialize synthetic transaction outputs

* validation: order authenticated block checks before signatures

---------

Co-authored-by: Nik <69503704+nik343@users.noreply.github.com>
@seanPhill

Copy link
Copy Markdown
Collaborator Author

The version current at this moment will be running on testnet shortly along with other non-upgraded nodes.

As this is also the release candidate for v1.4.5.0 bump master to v1.4.5.99.

This will help identify peers as upgraded or not.
@seanPhill
seanPhill merged commit 9b9b5cd into Veil-Project:master Oct 2, 2026
8 checks passed
@seanPhill
seanPhill deleted the consensus/unhashed-header-fields branch October 2, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants