Skip to content

Harden fluxnode tx signature-failure handling on the block path - #291

Open
MorningLightMountain713 wants to merge 1 commit into
RunOnFlux:masterfrom
MorningLightMountain713:fix/fluxnode-sig-malleation
Open

Harden fluxnode tx signature-failure handling on the block path#291
MorningLightMountain713 wants to merge 1 commit into
RunOnFlux:masterfrom
MorningLightMountain713:fix/fluxnode-sig-malleation

Conversation

@MorningLightMountain713

Copy link
Copy Markdown
Contributor

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 through CheckFluxnodeTxSignatures.

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

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>
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.

1 participant