Skip to content

Consensus: Reject trailing reissue data - #1314

Open
Tabakkui wants to merge 3 commits into
RavenProject:developfrom
Tabakkui:fix/issue-517-reissue-trailing-data
Open

Tabakkui wants to merge 3 commits into
RavenProject:developfrom
Tabakkui:fix/issue-517-reissue-trailing-data

Conversation

@Tabakkui

Copy link
Copy Markdown

Problem

Issue #517 asks for investigation of malformed reissue scripts carrying a trailing 00 byte after the serialized reissue fields. The parser currently includes the terminal OP_DROP in the deserialization stream and does not verify that the payload is fully consumed, so trailing payload bytes can be ignored.

Change

  • Require the output script to end in OP_DROP.
  • Deserialize only the payload bytes before OP_DROP.
  • Reject the reissue when any payload bytes remain after deserialization.

The valid serialized reissue format is unchanged. The added regression test keeps the valid empty-IPFS form and verifies that a payload with a trailing 00 byte is rejected.

Test plan

  • git diff --check
  • Python syntax check for the existing raw-asset functional test.
  • Added serialization_tests coverage for a malformed trailing byte.

A full Ravencoin build and C++ test binary run were not attempted on the ARM64 development host because the checkout is unconfigured and project policy reserves heavyweight builds for the authorized PC. No local Ravencoin node or mainnet data directory is available to verify whether malformed scripts exist in the wild; maintainers should perform that compatibility check before merge.

Refs #517

Require the reissue payload to consume all bytes before OP_DROP. This rejects malformed payloads with a trailing has_ipfs byte while preserving the existing serialized form for valid reissues.

Refs RavenProject#517
Declare the restricted-asset clear handlers as Qt slots so the existing button connections resolve through the meta-object system.

Refs RavenProject#968
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