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

Allow for trusted inbound 0conf channels #69

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Apr 21, 2023

Based on #25.

We set the peer to manually handle incoming channel request and allow inbound 0conf channels for trusted peers.

Setting this to draft as a) I'm not sure we'd always want to go the manually accept route and b) we want to always expose this as an additional bool on connect methods and c) this needs additional tests.

@tnull tnull marked this pull request as draft April 21, 2023 14:21
danielnordh added a commit to bdgwallet/dailywallet that referenced this pull request Apr 24, 2023
@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from 87a3583 to 9610723 Compare April 25, 2023 09:28
@tnull
Copy link
Collaborator Author

tnull commented Apr 25, 2023

Rebased.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from 9610723 to e0bb02c Compare May 4, 2023 13:07
@tnull
Copy link
Collaborator Author

tnull commented May 4, 2023

Fixed some things and added a rudimentary test to check 0conf actually works. Also rebased on #25 while at it.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from e0bb02c to 2b3959e Compare May 9, 2023 08:01
@tnull
Copy link
Collaborator Author

tnull commented May 9, 2023

Rebased after #25 has been merged.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch 4 times, most recently from 4d90ae4 to 7de34ce Compare May 10, 2023 13:36
@tnull
Copy link
Collaborator Author

tnull commented May 10, 2023

Setting this to draft as a) I'm not sure we'd always want to go the manually accept route and b) we want to always expose this as an additional bool on connect methods and c) this needs additional tests.

Undrafting as both concerns are fixed: trusted peers are now set via Config::peers_trusted_0conf field.

@tnull tnull marked this pull request as ready for review May 10, 2023 13:37
@tnull tnull mentioned this pull request May 10, 2023
47 tasks
@tnull tnull added this to the 0.1 milestone May 11, 2023
@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from 7de34ce to 095e82b Compare May 23, 2023 18:01
@tnull
Copy link
Collaborator Author

tnull commented May 23, 2023

Rebased on main.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch 4 times, most recently from b4fba51 to bb6f5c2 Compare May 27, 2023 07:06
@tnull
Copy link
Collaborator Author

tnull commented May 27, 2023

Rebased on main.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch 3 times, most recently from 0a8a0ff to 72b155c Compare June 1, 2023 19:55
@tnull
Copy link
Collaborator Author

tnull commented Jun 1, 2023

Rebased on main.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from 72b155c to 2b35f53 Compare June 6, 2023 10:34
@tnull
Copy link
Collaborator Author

tnull commented Jun 6, 2023

Rebased on main.

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/peer_store.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from 2b35f53 to db6ede7 Compare June 13, 2023 08:47
Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

LGTM. Feel free to squash fixups.

@tnull tnull force-pushed the 2023-04-allow-manual-0conf branch from db6ede7 to 4c26c25 Compare June 13, 2023 16:04
@tnull
Copy link
Collaborator Author

tnull commented Jun 13, 2023

LGTM. Feel free to squash fixups.

Squashed without further changes.

@tnull tnull merged commit e93f564 into lightningdevkit:main Jun 13, 2023
danielnordh added a commit to bdgwallet/dailywallet that referenced this pull request Jul 13, 2023
* Include LDK Node package, skeleton manager class

* WIP

* make Node published, move build to start()

* Create node in new flow, listen for node to switch to home

* Sync when homescreen opens

* Remove unused blocksocket

* Sync on dispatchQueue

* TEMP: save node seed in keychain and check on start

* Use ldknode for onchain address

* Use ldknode for total and spendable onchain balance

* Remove bdkmanager, ldkmanager

* Remove bdk-swift package

* Move extractNodeSeed to backupmanager

* Tweak temp spacing

* Refactor

* Refactor

* Refactor listeningAddress to one default

* Replace default url

* Use local branch of ldk-node to allow 0conf channels

lightningdevkit/ldk-node#69

* Test Voltage wrapped invoice creation, new file LSP.swift

* Print node id and original invoice for debugging

* Replace request QR code with UnifiedQRCode

* Use amount in lightning invoice (not yet for onchain as it needs conversion)

* Include onchain amount in unified request, extensions for converting from sats to bitcoin

* Replace with official LDKNode package

* Use static file directory path, previous caused errors

* Reduce invoice expiry time to less than 10 minutes set by Voltage

* Refactor BackupManager, use mnemonic with ldkNode (not working)

* Revert to filemanager path

* Update readme
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.

2 participants