Harden fluxnode tx signature-failure handling on the block path - #291
Open
MorningLightMountain713 wants to merge 1 commit into
Open
Conversation
A fluxnode transaction's operator and benchmark signatures are excluded from the tx hash (SER_GETHASH) and so are not committed to the block hash. Handle a signature-verification failure on the block-validation path the same way the existing block-signature and tx-relay paths already do: reject the offending copy and penalize the sender, but do not mark the block index permanently invalid, so a correctly-signed copy of the same hash can still be validated and accepted. This mirrors the vchBlockSig / PON block-signature handling in ContextualCheckBlock; the relay-path recentRejects carve-out is unchanged. One change covers both the operator and benchmark signatures, since both route through CheckFluxnodeTxSignatures. Adds a regression test covering the signature-failure handling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fluxnode operator and benchmark signatures are excluded from the transaction hash (
SER_GETHASH) and so are not committed to the block hash. On the block-validation path, a signature-verification failure was reported as an ordinary invalidity, which marks the block index permanently invalid (BLOCK_FAILED_VALID).This aligns the block path with the handling the block signature (
vchBlockSig/ PON) and the tx-relay path already use: a signature failure now sets corruption-possible state, so the block-connect paths reject the offending copy and penalize the sender without permanently marking the block hash — a correctly-signed copy of the same hash can still be validated and accepted. One change covers both the operator and benchmark signatures, since both route throughCheckFluxnodeTxSignatures.Adds a regression test asserting the signature failure is flagged corruption-possible.
Verification: unit test (fails without the change, passes with it) plus the full gtest suite. Behavioural recovery across peers is covered at the unit/code level here; end-to-end multi-node coverage will follow with the regtest testbed work.
🤖 Generated with Claude Code