Competency Check of Aviral Singh on Non-Standard P2SH: consensus validity vs relay policy#16
Open
Av1ralS1ngh wants to merge 3 commits intorawBit-io:mainfrom
Open
Competency Check of Aviral Singh on Non-Standard P2SH: consensus validity vs relay policy#16Av1ralS1ngh wants to merge 3 commits intorawBit-io:mainfrom
Av1ralS1ngh wants to merge 3 commits intorawBit-io:mainfrom
Conversation
…validity vs relay policy
Author
|
@rawBit-io please review at your comfort. |
Owner
|
Thanks for the submission. The submission has several issues:
Most of what the task asks for is already demonstrated in the legacy transaction flow examples — signing, Opcode Sequence node, TX template nodes, verification. Please study those flows carefully before resubmitting. |
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.
View the video here: Walkthrough (updated)
This PR adds the fifteenth lesson as a competence check submission to rawBit.
The lesson explores one of the more subtle distinctions in Bitcoin: a transaction can satisfy every consensus rule and still never reach a miner, because relay policy and consensus validity are enforced independently.
The flow walks through a complete transaction lifecycle on testnet, deriving a P2PKH address from a private key, parsing the funding transaction with field extract nodes, constructing a non-standard P2SH output whose redeemScript is a simple arithmetic puzzle (OP_2 OP_ADD OP_5 OP_EQUAL), building the spending transaction, and running script verification.
VerifyScript returns true. AreInputsStandard returns false, because Solver cannot classify the redeemScript against any known template and returns NONSTANDARD.
The goal is to make that two-layer enforcement architecture visible and concrete, rather than abstract.
Every step —> the hash commitment, the scriptSig construction, the P2SH execution trace, the Bitcoin Core code path that drops the transaction, is laid out explicitly so the learner can follow the full chain of causality.