-
Notifications
You must be signed in to change notification settings - Fork 943
Update emergency.recover after every 'commitment_revocation' so that user can sweep funds by penalty transaction. #7772
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
Merged
endothermicdev
merged 9 commits into
ElementsProject:master
from
adi2011:enablepenaltytxn
Feb 22, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9a11a81
tools/gen: Enable Subtypes to have TLVStreams
adi2011 dd6791e
Enable Length-Prefixed TLVs through Generator
adi2011 17b20b5
scb_wire: Define new subtype 'modern_scb_chan' with 'scb_tlvs'
adi2011 b1a5656
lightningd: Modify stub_chan() to accomodate new fields
adi2011 f8f88f1
wallet: Add 'wallet_stub_shachain_init' to persist shachain
adi2011 c445854
peer_control: Update shainchain and basepoints
adi2011 7bfb0d1
Update SCB on every commitment update and handle new format
adi2011 b8a28f0
test_misc.py: Add test_emergencyrecover_old_format_handling
adi2011 b059e88
tests: Added test_emergencyrecoverpenaltytxn
adi2011 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,52 @@ | ||
#include <common/node_id.h> | ||
#include <bitcoin/tx.h> | ||
#include <ccan/crypto/shachain/shachain.h> | ||
#include <common/amount.h> | ||
#include <common/channel_id.h> | ||
#include <common/wireaddr.h> | ||
#include <common/channel_type.h> | ||
#include <common/amount.h> | ||
#include <bitcoin/tx.h> | ||
#include <common/derive_basepoints.h> | ||
#include <common/htlc_wire.h> | ||
#include <common/node_id.h> | ||
#include <common/wireaddr.h> | ||
|
||
tlvtype,scb_tlvs,shachain,1, | ||
tlvdata,scb_tlvs,shachain,their_shachain,shachain, | ||
tlvtype,scb_tlvs,basepoints,3, | ||
tlvdata,scb_tlvs,basepoints,their_basepoint,basepoints, | ||
tlvtype,scb_tlvs,opener,5, | ||
tlvdata,scb_tlvs,opener,opener,enum side, | ||
tlvtype,scb_tlvs,remote_to_self_delay,7, | ||
tlvdata,scb_tlvs,remote_to_self_delay,remote_to_self_delay,u16, | ||
|
||
# scb_chan stores min. info required to sweep the peer's force close. | ||
subtype,scb_chan | ||
subtypedata,scb_chan,id,u64, | ||
subtypedata,scb_chan,cid,channel_id, | ||
subtypedata,scb_chan,node_id,node_id, | ||
subtypedata,scb_chan,unused,u8, | ||
subtypedata,scb_chan,addr,wireaddr, | ||
subtypedata,scb_chan,funding,bitcoin_outpoint, | ||
subtypedata,scb_chan,funding_sats,amount_sat, | ||
subtypedata,scb_chan,type,channel_type, | ||
# legacy_scb_chan stores min. info required to sweep the peer's force close. | ||
subtype,legacy_scb_chan | ||
subtypedata,legacy_scb_chan,id,u64, | ||
subtypedata,legacy_scb_chan,cid,channel_id, | ||
subtypedata,legacy_scb_chan,node_id,node_id, | ||
subtypedata,legacy_scb_chan,unused,u8, | ||
subtypedata,legacy_scb_chan,addr,wireaddr, | ||
subtypedata,legacy_scb_chan,funding,bitcoin_outpoint, | ||
subtypedata,legacy_scb_chan,funding_sats,amount_sat, | ||
subtypedata,legacy_scb_chan,type,channel_type, | ||
|
||
msgtype,static_chan_backup,6135, | ||
msgdata,static_chan_backup,version,u64, | ||
msgdata,static_chan_backup,timestamp,u32, | ||
msgdata,static_chan_backup,num,u16, | ||
msgdata,static_chan_backup,channels,scb_chan,num | ||
msgdata,static_chan_backup,channels,legacy_scb_chan,num | ||
|
||
subtype,modern_scb_chan | ||
subtypedata,modern_scb_chan,id,u64, | ||
subtypedata,modern_scb_chan,cid,channel_id, | ||
subtypedata,modern_scb_chan,node_id,node_id, | ||
subtypedata,modern_scb_chan,addr,wireaddr, | ||
subtypedata,modern_scb_chan,funding,bitcoin_outpoint, | ||
subtypedata,modern_scb_chan,funding_sats,amount_sat, | ||
subtypedata,modern_scb_chan,type,channel_type, | ||
subtypedata,modern_scb_chan,len_tlv,u32, | ||
subtypedata,modern_scb_chan,tlvs,scb_tlvs,len_tlv | ||
|
||
msgtype,static_chan_backup_with_tlvs,6137, | ||
msgdata,static_chan_backup_with_tlvs,version,u64, | ||
msgdata,static_chan_backup_with_tlvs,timestamp,u32, | ||
msgdata,static_chan_backup_with_tlvs,num,u16, | ||
msgdata,static_chan_backup_with_tlvs,channels,modern_scb_chan,num |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
adi2011 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.