Skip to content
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

Update bitcoin crate to 0.28.1 #1389

Merged
merged 2 commits into from May 5, 2022

Conversation

devrandom
Copy link
Member

@devrandom devrandom commented Mar 27, 2022

  • keys
  • witness
  • deprecations

@devrandom
Copy link
Member Author

is this a good time to do this? is the rust-bitcoin release imminent?

@TheBlueMatt
Copy link
Collaborator

Yea, I hear its coming so update is always good. One question before we pull the trigger on anything though is the WASM issues in rust-secp - rust-bitcoin/rust-secp256k1#427 and rust-bitcoin/rust-secp256k1#419

@devrandom
Copy link
Member Author

Looks like the 427 is really just the dev missing feature flag. And 419 seems to be progressing.

@devrandom devrandom marked this pull request as ready for review May 3, 2022 12:01
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2022

Codecov Report

Merging #1389 (a650159) into main (e3a305c) will increase coverage by 0.50%.
The diff coverage is 98.36%.

@@            Coverage Diff             @@
##             main    #1389      +/-   ##
==========================================
+ Coverage   90.89%   91.40%   +0.50%     
==========================================
  Files          75       75              
  Lines       41624    45218    +3594     
  Branches    41624    45218    +3594     
==========================================
+ Hits        37834    41330    +3496     
- Misses       3790     3888      +98     
Impacted Files Coverage Δ
lightning-invoice/src/de.rs 82.38% <ø> (ø)
lightning-invoice/src/utils.rs 96.85% <ø> (ø)
lightning-net-tokio/src/lib.rs 82.32% <ø> (+6.43%) ⬆️
lightning/src/ln/peer_handler.rs 59.45% <ø> (+6.83%) ⬆️
lightning/src/util/events.rs 33.21% <ø> (-0.35%) ⬇️
lightning/src/util/macro_logger.rs 85.48% <ø> (ø)
lightning/src/util/ser.rs 91.28% <ø> (-0.19%) ⬇️
lightning/src/util/test_utils.rs 87.94% <ø> (+5.51%) ⬆️
lightning-block-sync/src/test_utils.rs 93.46% <85.71%> (-0.42%) ⬇️
lightning/src/routing/network_graph.rs 89.88% <90.00%> (ø)
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3a305c...a650159. Read the comment docs.

@devrandom
Copy link
Member Author

Note that MSRV for no-std changed to 1.53.0 because of https://github.com/lightningdevkit/rust-lightning/runs/6272782644 - DebugStruct::finish_non_exhaustive

@dunxen
Copy link
Contributor

dunxen commented May 3, 2022

Light review ACK

LGTM. Will take a closer look at the larger diffs in little while!

@devrandom
Copy link
Member Author

Note that MSRV for no-std changed to 1.53.0 because of https://github.com/lightningdevkit/rust-lightning/runs/6272782644 - DebugStruct::finish_non_exhaustive

Looks like that was an accident. Hopefully rust-bitcoin/rust-bitcoin#690 will be included in a point release - I'll revert the MSRV changes once that's done.

@TheBlueMatt
Copy link
Collaborator

If upstream is gonna do a point release soon lets just wait for that here, IMO.

@TheBlueMatt
Copy link
Collaborator

TheBlueMatt commented May 4, 2022

Upstream cut a point release so this should be good now, I think, need to re-add the MSRV changes in CI.

@devrandom
Copy link
Member Author

Upstream cut a point release so this should be good now, I think, need to re-add the MSRV changes in CI.

Done.

@devrandom devrandom changed the title Update bitcoin to 0.28.0 Update bitcoin to 0.28.1 May 4, 2022
@devrandom devrandom changed the title Update bitcoin to 0.28.1 Update bitcoin crate to 0.28.1 May 4, 2022
lightning/src/chain/channelmonitor.rs Outdated Show resolved Hide resolved
lightning/src/ln/functional_tests.rs Outdated Show resolved Hide resolved
TheBlueMatt
TheBlueMatt previously approved these changes May 5, 2022
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for tackling this one!

$sum_actual_sigs += $sighash_parts.access_witness($idx)[0].len();
let sighash = hash_to_message!(&$sighash_parts.segwit_signature_hash($idx, &redeem_script, $amount, EcdsaSighashType::All).unwrap()[..]);
let sig = secp_ctx.sign_ecdsa(&sighash, &privkey);
let mut ser_sig = sig.serialize_der().to_vec();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was gonna nag about the extra allocation here, but instead I just did the util method upstream so we can fix it later - rust-bitcoin/rust-bitcoin#989

tnull
tnull previously approved these changes May 5, 2022
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT looks good to me. Only added two minor remarks and a question. Feel free to ignore!

lightning-block-sync/src/test_utils.rs Outdated Show resolved Hide resolved
lightning/src/chain/channelmonitor.rs Outdated Show resolved Hide resolved
lightning/src/chain/keysinterface.rs Show resolved Hide resolved
dunxen
dunxen previously approved these changes May 5, 2022
Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!

tnull
tnull previously approved these changes May 5, 2022
lightning-block-sync/src/test_utils.rs Outdated Show resolved Hide resolved
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
lightning/src/ln/onion_route_tests.rs Outdated Show resolved Hide resolved
lightning/src/ln/script.rs Outdated Show resolved Hide resolved
lightning/src/ln/chan_utils.rs Show resolved Hide resolved
@jkczyz jkczyz merged commit 6592081 into lightningdevkit:main May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants