This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
forked from lightningdevkit/rust-lightning
-
Notifications
You must be signed in to change notification settings - Fork 1
[draft] DLC-channels PoC #1
Draft
bonomat
wants to merge
43
commits into
main
Choose a base branch
from
dlcs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bonomat
commented
Oct 26, 2022
lightning/src/ln/channel.rs
Outdated
@@ -5612,6 +5615,10 @@ impl<Signer: Sign> Channel<Signer> { | |||
Ok(Some(res)) | |||
} | |||
|
|||
pub fn add_custom_output<L: Deref>(&mut self, amount_msat: u64, cltv_expiry: u32, logger: &L) -> Result<msgs::UpdateAddCustomOutput, ChannelError> where L::Target: Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need an additional param for the output to be added.
bonomat
commented
Oct 26, 2022
lightning/src/ln/channelmanager.rs
Outdated
} | ||
|
||
if route.paths.len() !=1 { | ||
return Err("Only trivial routing supported".to_owned()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unreachable :)
fixup! [WIP] Implement add_custom_output protocol Just some formattings. [WIP] Continue implementing add_custom_output protocol fixup! [WIP] Continue implementing add_custom_output protocol Some formattings fixup! [WIP] Continue implementing add_custom_output protocol Some formattings Add todo: can this be removed? In this case we did not update the fee rate Fix: mostly using correct variable Impl readable and writable to UpdateAddCustomOutput chore: remove comment This was done now :) chore: some more formattings make tests work We have a test which pretends to add a custom output to the commit transaction. Msgs are being exchanged and commit transactions are being revoked. What is missing is to actually add the output [WIP] Add custom outputs to commit transaction change custom output value to 1234567 to find it easier in logs fixup! [WIP] Add custom outputs to commit transaction pass in a ref of a ref of course :) chore: fix formatting chore: Mark our TODOs with 10101 tag missing docs
To be used in our modified `ldk-sample`.
We are failing to find the route when calling `find_route` i.e. what is commented out with this patch. Since we are not supporting multihop, can we just build the `Route` ourselves?
Subtract the customoutput from local balance
luckysori
force-pushed
the
dlcs
branch
2 times, most recently
from
November 4, 2022 05:38
4704774
to
0768613
Compare
Also, fix all the trivial warnings that were polluting the output of the `cargo check` command.
This information can be used to create transactions that spend from the custom output _before_ the corresponding comit transaction is signed. Also we remove the whole concept of a holding cell for custom outputs because it interfered with this patch and it is unclear if we even need it.
I was debugging against our integration test in `function_tests.rs`.
It is less error prone if the caller only provides the amount they get out of the custom output. The remote party's amount is computed.
It's okay for regtest and testnet.
We were never updating the value of `value_to_self_msat` in `Channel` based on a removed custom output!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.