-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Policy: Report debug message why inputs are non standard #29060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Policy: Report debug message why inputs are non standard #29060
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29060. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. LLM Linter (✨ experimental)Possible places where named args for integral literals may be used (e.g.
If you want, I can propose the exact comment-style annotations to make these third/fourth literal arguments clearer (e.g., /height=/0, /coinbase=/false). 2025-12-30 |
3fc397a to
6ffb956
Compare
stickies-v
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
6ffb956 to
e032462
Compare
|
Thank you for review @stickies-v I Addressed your comments and taken suggestions. |
e032462 to
814571b
Compare
|
Thanks for reviewing @luke-jr The changes in latest push are:
|
814571b to
0a39b07
Compare
d9e71f0 to
5ef3f9b
Compare
5ef3f9b to
f4c1945
Compare
|
Rebased on master for green CI. |
f4c1945 to
101a308
Compare
101a308 to
3ef7ac6
Compare
sedited
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
There are also some drahtbot llm linter suggestions.
85c6c97 to
db5c7ed
Compare
|
Concept ACK on more descriptive error messages. However, I'm not convinced about changing the error code string from "bad-txns-nonstandard-inputs" to be more granular. My thinking is that the error code is for software to make automated decisions based on, and the more detailed message is for humans to help debugging. In this case, it seems to me just changing the debugging suffices, or do we expect applications to deal differently with different forms of non-standardness. Somewhat related question: are there places where only the error code is reported, and not the more detailed message? |
db5c7ed to
9eea72d
Compare
|
Forced push from db5c7ed388a8eb72247dff015bbf47654f27faf1 to 9eea72d3f3647197c24329b412c7fc71895e3ea2 Compare diff 4f27faf1..9eea72d I addressed @sipa recent #29060 (comment) by maintained the error code "bad-txns-nonstandard-inputs" and add the additional information in the debug message.
After a grep of |
sipa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 9eea72d3f3647197c24329b412c7fc71895e3ea2
sedited
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9eea72d3f3647197c24329b412c7fc71895e3ea2
1eb0b09 to
32a5a84
Compare
32a5a84 to
65d45ac
Compare
|
Forced push from 9eea72d3f3647197c24329b412c7fc71895e3ea2 to 65d45ac 9eea72d3f3...65d45acf283
|
This commit renames AreInputsStandard to ValidateInputsStandardness. ValidateInputsStandardness now returns valid TxValidationState if all inputs (scriptSigs) use only standard transaction forms else returns invalid TxValidationState which states why an input is not standard.
…ring - Test the various input scriptSig non standardness, and ensure ValidateInputsStandardness Returns the reason why the input is nonstandard. Co-authored-by: Ben Woosley <ben.woosley@gmail.com>
65d45ac to
b4db7f3
Compare
sedited
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-ACK b4db7f3
This PR is another attempt at #13525.
Transactions that fail
PreChecksValidation due to non-standard inputs now returns invalid validation stateTxValidationResult::TX_INPUTS_NOT_STANDARDalong with a debug error message.Previously, the debug error message for non-standard inputs do not specify why the inputs were considered non-standard.
Instead, the same error string,
bad-txns-nonstandard-inputs, used for all types of non-standard input scriptSigs.This PR updates the
AreInputsStandardto include the reason why inputs are non-standard in the debug message.This improves the
Precheckdebug message to be more descriptive.Furthermore, I have addressed all remaining comments from #13525 in this PR.