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

taprpc: move ImportProof from tapdevrpc to taprpc #1139

Closed
wants to merge 1 commit into from

Conversation

bhandras
Copy link
Member

This commit turns theImportProof API to be publicly available as it is required for some use cases.

@coveralls
Copy link

coveralls commented Sep 30, 2024

Pull Request Test Coverage Report for Build 11240704007

Details

  • 0 of 24 (0.0%) changed or added relevant lines in 3 files are covered.
  • 35 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.006%) to 40.379%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rpcserver.go 0 1 0.0%
itest/utils.go 0 2 0.0%
cmd/tapcli/proofs.go 0 21 0.0%
Files with Coverage Reduction New Missed Lines %
tapdb/addrs.go 2 79.04%
asset/asset.go 2 81.8%
commitment/tap.go 4 84.17%
tapgarden/caretaker.go 8 68.5%
universe/interface.go 19 47.09%
Totals Coverage Status
Change from base Build 11218781069: -0.006%
Covered Lines: 24259
Relevant Lines: 60078

💛 - Coveralls

@jharveyb
Copy link
Contributor

Relevant existing discourse:

#804 (comment)

Is the use case manually importing a proof for an asset that the importing node actually owns?

In that case, maybe we can improve the existing InsertProof call to 'take ownership' of the inserted assets, if we know that we own the relevant internal and script keys.

Not sure if that covers your use or you're looking at something more involved? Either way, sidestepping the local universe will probably cause issues later.

@dstadulis
Copy link
Collaborator

Core user need: when importing a proof and recognize and if the node owns the asset that's being imported
Custom channels side steps the introspection need

@bhandras
Copy link
Member Author

bhandras commented Oct 3, 2024

Relevant existing discourse:

#804 (comment)

Is the use case manually importing a proof for an asset that the importing node actually owns?

In that case, maybe we can improve the existing InsertProof call to 'take ownership' of the inserted assets, if we know that we own the relevant internal and script keys.

Not sure if that covers your use or you're looking at something more involved? Either way, sidestepping the local universe will probably cause issues later.

IIUC InsertProof wouldn't work in our case as what we need is that a receiver who doesn't own the internal and script keys to be able to spend the corresponding anchor and sweep the asset (an HTLC sweep).

@dstadulis dstadulis added this to the v0.4.3 (temporary) milestone Oct 8, 2024
@bhandras
Copy link
Member Author

Closing this as we managed to emulate the same functionality by iterating on the whole proof with InsertProof plus setting the anchor derivation upon sweep. Thanks again to @guggero for all the insights and debugging help!

@bhandras bhandras closed this Oct 16, 2024
@bhandras bhandras deleted the importproof branch October 16, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants