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

Support group keys on HTLC Interceptor & Invoice HTLC Modifier #1416

Open
wants to merge 4 commits into
base: rfq-negotiation-groupkey
Choose a base branch
from

Conversation

GeorgeTsagk
Copy link
Member

Description

With this PR we extend the rfq.OrderHandler and tapchannel.AuxInvoiceManager sub systems to be able to read groupkey specifiers and handle HTLCs with multiple asset balances.

Based on #1382

We add a new interface to the HTLC SumAssetBalance method, which helps
check the identifier of the asset against a specifier. This allows for
checking asset inclusion in a group, which is a bit involved and not the
responsibility of the HTLC model.
We extend the interface of the rfq Policy in order to allow the
specifier checker to be involved. This extends certain checks, and
allows us to use asset specifiers that only have a group key.
We add the specifier checker interface to the AuxInvoiceManager too, as
it is needed to validate incoming HTLCs which may use asset IDs that
belong to a group, while the RFQ is based on a group key.
Adds some coverage to the invoice manager unit tests, which involve an
RFQ quote over a group key, plus an HTLC with multiple asset balances,
which may belong or not to the group.
@GeorgeTsagk GeorgeTsagk self-assigned this Feb 27, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13567296814

Details

  • 28 of 60 (46.67%) changed or added relevant lines in 4 files are covered.
  • 19226 unchanged lines in 118 files lost coverage.
  • Overall coverage decreased (-13.6%) to 41.0%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tapchannel/aux_invoice_manager.go 18 19 94.74%
rfqmsg/records.go 10 12 83.33%
rfq/manager.go 0 5 0.0%
rfq/order.go 0 24 0.0%
Files with Coverage Reduction New Missed Lines %
asset/witness.go 2 91.38%
address/log.go 3 0.0%
commitment/log.go 3 0.0%
mssmt/node.go 3 98.01%
proof/file.go 3 77.41%
rfq/log.go 3 0.0%
tapchannel/log.go 3 0.0%
tapsend/log.go 3 0.0%
universe/log.go 3 0.0%
vm/error.go 3 48.94%
Totals Coverage Status
Change from base Build 13504659506: -13.6%
Covered Lines: 27352
Relevant Lines: 66713

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

2 participants