consensus: Hornet rule matrix — happy path and boundary pins - #322
Merged
Conversation
Structure now rejects stripped size > 1MB, empty vin, per-tx oversize, duplicate inputs, and null prevouts (Core CheckTransaction / Hornet L03, L06, L08, L11, L13). Named tests cover happy path and exact boundaries for every Hornet block-validation rule. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the peer-clients gap-hunt stub with an ID-by-ID happy/boundary table against Hornet main spec.h (S02 folded into S03) and published spec.html. Inventory S14–S18 in consensus-tests.md. Co-authored-by: Cursor <cursoragent@cursor.com>
The rules are ours; Hornet is a checklist. Keep happy/boundary pins under structure_rule_tests, header, and consensus_rules, and select that set with scripts/test-hornet-rules.sh. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
spec.honmain@151462fa) against published spec.html. Unreleased difference: S02 is folded into S03 (ValidateInputPrevoutsUnspent). Full ID-by-ID happy/boundary table is indocs/peer-clients.md.CheckTransactionalready requires: stripped size ≤ 1 MB (L03), emptyvin(L06), per-tx stripped size (L08), duplicate inputs (L11), null prevouts (L13).structure_rule_tests,header.rsmedian_time_past_tests,consensus_rules). Named selector:./scripts/test-hornet-rules.sh.Test plan
cargo test -p rbitcoin-consensus --lib -- structure_rule_tests::s14_ structure_rule_tests::s15_ structure_rule_tests::s16_ structure_rule_tests::s17_ structure_rule_tests::s18_ s4_weight h8_timestamp h9_versioncargo test -p rbitcoin-test --test consensus_rulesfmt,deny,clippy,ast-grep,test,windows,macos,multinode,coverage)Made with Cursor