-
Notifications
You must be signed in to change notification settings - Fork 38.8k
policy: Report reason inputs are nonstandard from AreInputsStandard #13525
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
Conversation
promag
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.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
a1a07ae to
7298231
Compare
|
@promag Addressed your comments, including tests for each case. |
|
utACK 7298231aa8faaff65c261eac557448c223b76500 |
|
This is already part of #7533 At the very least, please try to use the short rejection reasons therein... |
7298231 to
dab2384
Compare
dab2384 to
b39bc02
Compare
|
Also moved the string instantiation out of the bench loop. |
b39bc02 to
54f120c
Compare
|
Might be better to have the index at the end, not sure. |
54f120c to
bf785af
Compare
|
@luke-jr moved the input index to the end. Now I'm questioning the need for the |
3135078 to
7986ccf
Compare
|
Removed |
|
Why do you want to limit it to debug output? Reasons should be in the reason field. |
7986ccf to
781c350
Compare
|
@luke-jr Good point - split the reason and debug fields, and replaced |
781c350 to
54020f6
Compare
84bc9d3 to
d152d78
Compare
d152d78 to
8383577
Compare
|
Concept ACK |
df4089e to
631d3c9
Compare
631d3c9 to
1f3c017
Compare
theStack
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.
CI fails, seems like some functional tests need to be adapted to match the more specific failure reason string (https://cirrus-ci.com/task/6048174287618048?logs=ci#L3337):
...
AssertionError: [node 1] Expected messages "['bad-txns-input-script-nonstandard']" does not partially match log:
...
This adds specific debug information including the input index and manner of failure.
1f3c017 to
dfa1943
Compare
@theStack fixed: https://github.com/bitcoin/bitcoin/compare/1f3c017cce798bdcee1d719bf160dc07783239f2..dfa194343fde1557420a3b4a52b6a93e42adb848 |
achow101
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.
The more descriptive reason strings seem to have gotten lost in the past couple of years.
| txWitnessUnknown.vin.resize(1); | ||
| txWitnessUnknown.vin[0].prevout.n = 9; | ||
| txWitnessUnknown.vin[0].prevout.hash = txFrom.GetHash(); | ||
| txWitnessUnknown.vin[0].scriptSig << std::vector<unsigned char>(witnessUnknown.begin(), witnessUnknown.end()); |
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.
In ba538fb "Propagate validation debug information from AreInputsStandard"
nit: setting scriptSig is unnecessary as the thing being checked is the scriptPubKey of the output being spent.
aureleoules
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.
Instead of returning an option would the Result class make more sense?
Also, instead of a pair of strings, maybe create a new struct?
|
Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened. |
This results in a more informative debug string to the validation state in the
case of failure.