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

Set the SigHashType of htlc signatures w/ anchors to SinglePlusAnyoneCanPay #5

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

ksedgwic
Copy link

@ksedgwic ksedgwic commented Dec 29, 2021

Survey of Needed Unit Tests

  • channelmonitor.rs

    • tests:
      • test_claim_txn_weight_computation
  • keysinterface.rs

    • InMemorySigner
      • sign_counterparty_commitment
      • sign_counterparty_htlc_transaction
  • package.rs

    • PackageSolvingData::finalize_input:
      • CounterpartyOfferedHTLCOutput
      • CounterpartyReceivedHTLCOutput
  • chan_utils.rs

    • TrusTrustedCommitmentTransaction
      • get_htlc_sigs
      • get_signed_htlc_tx
  • channel.rs

    • commitment_signed
  • enforcing_trait_impls.rs

    • EnforcingSigner:
      • sign_holder_commitment_and_htlcs

Related Issue and Unit Test Implications

  • chan_utils.rs
    • hide HTLC_{SUCCESS,TIMEOUT}_TX_WEIGHT
      • Channel<Signer>:
        • build_commitment_transaction
        • get_inbound_pending_htlc_stats
        • get_outbound_pending_htlc_stats
        • next_local_commit_tx_fee_msat
        • next_remote_commit_tx_fee_msat
        • update_add_htlc
        • send_htlc
        • tests::test_timeout_vs_success_htlc_dust_limit
      • functional_tests.rs:
        • tests::test_chan_reserve_dust_inbound_htlcs_outbound_chan
        • tests::do_test_max_dust_htlc_exposure

TheBlueMatt and others added 7 commits December 18, 2021 20:20
...as otherwise the struct is rather useless.
The bindings generation really should support generic bounds other
than Deref::Target in where clauses, but currently does not. To
avoid needing to add support during the current release process,
we simply swap around the arguments to move them to the first <>
instead of the where.
This further reduces noise at the TRACE level during initial gossip
sync.
…lightningdevkit

update repo name to use lightningdevkit
@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch from 212c41a to 071cfad Compare December 29, 2021 20:00
@ksedgwic ksedgwic requested a review from devrandom December 29, 2021 20:11
@ksedgwic ksedgwic marked this pull request as ready for review December 29, 2021 20:12
Copy link
Collaborator

@devrandom devrandom left a comment

Choose a reason for hiding this comment

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

I also reviewed all uses of SigHashType::All, and it seems we got all the relevant ones.

@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch 2 times, most recently from 541d6f6 to b9d4a0c Compare December 31, 2021 20:33
@devrandom
Copy link
Collaborator

devrandom commented Jan 2, 2022 via email

@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch from b9d4a0c to 1781b28 Compare January 2, 2022 17:58
@ksedgwic
Copy link
Author

ksedgwic commented Jan 2, 2022

Prefer .iter() in that case

Well, you still have to have the deref *opt_anchors, so the &[] is less chars ... but ok

nm - I figured it out

@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch 2 times, most recently from 883626f to 2d87938 Compare January 2, 2022 23:29
…e-update-gossip-log

Log gossip rejections due to stale channel_updates at GOSSIP level
@ksedgwic ksedgwic marked this pull request as draft January 5, 2022 04:34
This will be needed for JavaScript bindings eventually.
TheBlueMatt and others added 2 commits January 5, 2022 21:01
@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch 2 times, most recently from f6b6880 to dd4f402 Compare January 5, 2022 22:54
@ksedgwic ksedgwic marked this pull request as ready for review January 5, 2022 22:54
Copy link
Collaborator

@devrandom devrandom left a comment

Choose a reason for hiding this comment

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

ACK

@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch 2 times, most recently from 372bae7 to 38550ee Compare January 6, 2022 18:58
…-invoice-nostd

Adapt lightning-invoice to no_std
@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch 3 times, most recently from 5291a52 to 1d59f65 Compare January 13, 2022 17:37
@ksedgwic ksedgwic force-pushed the 2021-12-htlc-anchor-sighashtype branch from 1d59f65 to 9c2270c Compare January 13, 2022 23:03
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.

4 participants