-
Notifications
You must be signed in to change notification settings - Fork 38.8k
[RPC] verifytxoutproof returns object including blockhash #11120
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
kallewoof
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 d77cded0b1d026f030ee424b89a01cfd6b7b9000
src/rpc/rawtransaction.cpp
Outdated
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.
Remove or maybe? I.e. Result: (empty if proof is invalid)\n
d77cded to
e7f9824
Compare
|
updated with nit fix |
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.
src/rpc/rawtransaction.cpp
Outdated
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.
Nit, , in the above line?
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.
I was gonna mention that but chose not to. Agree though, I think that would look better.
src/rpc/rawtransaction.cpp
Outdated
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 block hash and ...
src/rpc/rawtransaction.cpp
Outdated
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.
Nit, add curly braces.
e7f9824 to
57d35ff
Compare
|
fixed @promag nits, curly-bracketed the surrounding statements since I'm touching it already |
src/rpc/rawtransaction.cpp
Outdated
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.
Push blockhash first.
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.
I'm curious about the reason for this request. Alphabetical ordering?
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.
Also matches the documentation above.
57d35ff to
9efd4fe
Compare
9efd4fe to
a371696
Compare
|
rebased, re-added legacy behavior under deprecation |
|
ping @kallewoof |
kallewoof
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-utACK a3716960de5555572408efdab4eba75484c8c1e3
src/rpc/rawtransaction.cpp
Outdated
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.
I'm not sure about the in v0.17 instead wording -- what about when bitcoin hits v0.18?
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.
I thought the same, but there are other occurrences in the code. I would remove the version though.
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.
I'm a bit confused, if this is merged now, it definitely would be the way to see the old text for 0.17. Now, perhaps the note should also say when it will be removed?
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.
Pushed a new wording, hopefully clearer and more pertinent to the user.
a371696 to
c1c3631
Compare
|
fixed up deprecation message, added release notes |
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.
Could add a test for the empty response {}, at least I don't see it?
doc/release-notes.md
Outdated
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.
Nit, missing period, sorry.
423c9d6 to
954ec5b
Compare
|
fixed up release note nit. I think the only way to return |
|
@instagibbs here is one Maybe it should throw an error in this case? |
kallewoof
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 - looks good
|
@promag yeah I'll catch the deprecated case of |
0d9330b to
ce6ae10
Compare
src/rpc/rawtransaction.cpp
Outdated
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.
s/RPC_INVALID_ADDRESS_OR_KEY/RPC_INVALID_PARAMETER?
Add a test for the error, like:
assert_raises_rpc_error(-8, 'No valid transaction commitments are found in the proof', self.nodes[2].gettxoutproof,
'0000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')ce6ae10 to
7045e31
Compare
|
done |
|
Needs rebase to fix travis (sorry) |
7045e31 to
ec1695e
Compare
|
rebased |
kallewoof
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 ec1695eedc545545e5273e19f1e1b80aaebecf28
|
utACK ec1695e. |
|
Needs rebase (after merge of |
ec1695e to
d43e00a
Compare
|
rebased |
|
@instagibbs Travis is timing out. I tried restarting the two jobs that timed out but it still fails. Not sure what's up. |
|
master should be fixed after #12681. |
|
@promag I think that's unrelated (and I don't think @instagibbs merged the commit that triggered the error that was fixed). |
src/rpc/rawtransaction.cpp
Outdated
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.
Is the RPC user at fault when this happens? If not, I don't think this should be an RPC error.
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.
We already error out when the block is not found in the chain, which is just as much the users' fault.
I'll leave this up to others to chime in.
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.
Ok, fair. Let's keep it this way then.
|
re-utACK d43e00a |
d43e00a to
b761342
Compare
|
rebased due to release notes conflict |
b761342 to
5f63fa9
Compare
|
rebased again... |
5f63fa9 to
674b877
Compare
|
rebased again for yet another release notes conflict |
| "[\"txid\"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid\n" | ||
| "{\n" | ||
| " \"blockhash\" (string) The blockhash the included proof commits to\n" | ||
| " [\"txid\"] (array, strings) The txid(s) which the proof commits to\n" |
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.
Should mention response key: \"txids\".
Allows direct use of the proof to get block header related info without additional parsing, and more directly mirrors
gettxoutproofarguments.