-
Notifications
You must be signed in to change notification settings - Fork 34
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
Vendor Bitcoin Core v26.0
#93
Conversation
Run the vendoring script: `./contrib/vendor-bitcoin-core.sh v26.0`
Gentle bump @apoelstra |
a0e9fbc
to
188d51e
Compare
Current status: some linking error that is likely just brain dead but I can't figure it out right now. |
188d51e
to
d82a902
Compare
Status update: unit test as mentioned in PR description. |
3c74fa0
to
c0ed53a
Compare
Massive props to @Davidson-Souza for debugging this. |
c0ed53a
to
26f488a
Compare
src/lib.rs
Outdated
/// WARNING: This should be the consensus encoded script __without__ the leading var int! | ||
/// | ||
/// ScriptPubkey's in rust-bitcoin are consensus encoded with a variable byte length value | ||
/// prepended to the front - remove the varint then take a pointer to the encoded vector. |
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 33022e2:
I'm ok merging this for now and doing a followup PR (or another release) to update the comment. But this comment seems like it's way overcomplicated things. It looks like you just need a raw pointer to the underlying bytes of the Script
as well as its length. You should be able to just use [..]
to get a byteslice from a Script
(or whatever our accessor is for this) then extract the pointer/length from there.
I don't see why you would need to encode and tweak the encoding.
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 26f488a except the comment about the Utxo struct
Let's fix it before merge, I'll do it today.
…On Fri, Mar 1, 2024, at 08:22, Andrew Poelstra wrote:
***@***.**** commented on this pull request.
In src/lib.rs <#93 (comment)>:
> }
}
+/// Mimics the Bitcoin Core UTXO typedef (bitcoinconsenus.h)
+// This is the TxOut data for utxos being spent, i.e., previous outputs.
+#[repr(C)]
+pub struct Utxo {
+ /// WARNING: This should be the consensus encoded script __without__ the leading var int!
+ ///
+ /// ScriptPubkey's in rust-bitcoin are consensus encoded with a variable byte length value
+ /// prepended to the front - remove the varint then take a pointer to the encoded vector.
In33022e2:
I'm ok merging this for now and doing a followup PR (or another release) to update the comment. But this comment seems like it's way overcomplicated things. It looks like you just need a raw pointer to the underlying bytes of the `Script` as well as its length. You should be able to just use `[..]` to get a byteslice from a `Script` (or whatever our accessor is for this) then extract the pointer/length from there.
I don't see why you would need to encode and tweak the encoding.
—
Reply to this email directly, view it on GitHub <#93 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADAKQ5NUNFYE65BJSES6XG3YV6NZZAVCNFSM6AAAAABDAW67DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMBZHA4TOMJYG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
--
Tobin
http://tobin.cc
|
Now that we have upgraded to Bitcoin Core v26 we can support verification of taproot scripts. Add an initial API to do so - needs iterating upon.
We used the wrong month for the last two release dates, fix them.
Add a changelog entry, bump the version, and update the lock files.
26f488a
to
81515e2
Compare
Should be right to go. |
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 81515e2
Tagged and published. |
Legend, thanks man. I realised late last night that I'd put the version bump in here instead of doing a separate PR, and I'm staying in the middle of nowhere with no mobile/internet coverage. Thanks for handling it. |
Thank you, guys! I wanted to thank you earlier, but after running |
I wonder if this could be related to our msan issues. Possibly bitcoinconsensus' vendored libsecp and rust-secp's libsecp are somehow incompatible? Just speculating. |
It was our own problem: In the |
v26.0
Tested in: rust-bitcoin/rust-bitcoin#2461
Close: #66