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 fiber multiple hops payment in cross chain transaction #511

Open
wants to merge 101 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
1bbf408
Update migrate Cargo.lock
contrun Jan 24, 2025
fb11422
Add CkbInvoiceStatus::PendingSettlement
contrun Jan 24, 2025
0fe35f5
Make preimage in new_invoice optional
contrun Jan 24, 2025
8134184
Add rpc settle_invoice
contrun Jan 24, 2025
48888ea
Settle TLC on settle_invoice called
contrun Jan 24, 2025
f995143
Remove PendingSettlement from invoice status
contrun Jan 24, 2025
bac9270
Allow SendPayment to send zero hash
contrun Jan 24, 2025
56e04ca
Support hold invoice in invoice builder
contrun Jan 24, 2025
368fce5
Add test for settling hold invoice
contrun Jan 24, 2025
721a761
Use ckb hash by default
contrun Jan 24, 2025
b36d049
Check settling invoice very soon will succeed
contrun Jan 24, 2025
62a844c
Check settling invoice with wrong hash
contrun Jan 24, 2025
4cc80e7
Update comments
contrun Jan 24, 2025
37743e2
Remove special logic in try_to_settle_down_tlc
contrun Jan 24, 2025
440b386
Check settle hold invoice idempotency
contrun Jan 24, 2025
fd60e06
Check settle hold invoice suceess while other node offline
contrun Jan 24, 2025
a3e3163
Add more test for settle hold invoice with nodes offline
contrun Jan 25, 2025
e84b874
Simplify hold invoice tests
contrun Jan 25, 2025
8159d47
Simplify obtaining preimage
contrun Jan 26, 2025
421d3cb
Add invoice/payment subscription traits
contrun Jan 27, 2025
a9eef73
Implement some invoice/payment subscription service
contrun Jan 27, 2025
9985f06
Use u64 as payment/invoice subscription id
contrun Jan 27, 2025
914ea07
Add noop store update hook
contrun Jan 27, 2025
43239e1
Add StoreWithHooks
contrun Jan 27, 2025
5e30707
Separate subscription/hook interface from implementation
contrun Jan 27, 2025
a5c2a5e
Implementinvoice/payment subscription in cch actor
contrun Feb 10, 2025
a131fb4
Subscribe to fiber {invoice,payment} updates while {send,receive}_btc
contrun Feb 10, 2025
93a14a7
Subscribe to fiber {invoice,payment} updates while {send,receive}_btc
contrun Feb 10, 2025
3d33f28
Move fiber cross-chain from AddTlc/RemoveTlc to invoice/payment
contrun Feb 10, 2025
ffc4b89
Add help functins to run lnd node
contrun Feb 10, 2025
09920e6
Run two lnd nodes
contrun Feb 10, 2025
1ef77fa
Create channel between two lnd nodes
contrun Feb 10, 2025
e336991
Use feature lnd-tests to control lnd unit tests running
contrun Feb 11, 2025
9a88830
Fix openning lnd channel error
contrun Feb 11, 2025
64993a0
Simplify lnd node
contrun Feb 11, 2025
dcdf3e4
Ignore test test_send_payment_succeed_settle_hold_invoice_when_sender…
contrun Feb 11, 2025
224cd8e
Move cch lnd test helpers to separate mod
contrun Feb 11, 2025
e19bcf2
Add test infra for subscription
contrun Feb 11, 2025
1c37859
Add subscription to test node
contrun Feb 11, 2025
ab1cd4a
Consume self while restarting node
contrun Feb 11, 2025
bedae31
Reuse old store because of rocksdb file lock
contrun Feb 11, 2025
a3a0b0a
Subscribe to normal payment updates
contrun Feb 11, 2025
1b6c38e
Implement get invoice/payment state
contrun Feb 11, 2025
25d34c8
Fix opening Invoice event not pushed
contrun Feb 11, 2025
69d8923
Add unit test for settlement payment subscription
contrun Feb 11, 2025
1646c51
Add test to mock cross chain hub subscription
contrun Feb 11, 2025
6335778
Add settle invoice test for direct payment
contrun Feb 11, 2025
28fa49c
Don't update invoice status when RemoveTlc is not received
contrun Feb 11, 2025
d876a26
Add cch actor to test network node
contrun Feb 12, 2025
45d8f42
Add cross-chain cch transaction test
contrun Feb 12, 2025
418d24d
fixup! Add cross-chain cch transaction test
contrun Feb 12, 2025
307eb81
Allow establishh udt channel
contrun Feb 12, 2025
08b837b
Mock creating udt channels
contrun Feb 12, 2025
1c314b2
Fix script not found for sudt type script
contrun Feb 12, 2025
2d20f83
Use always success script to test udt transfer
contrun Feb 12, 2025
034cd15
Use wrapped btc complete script in cch config
contrun Feb 12, 2025
ae16566
Add more debug info for tlc error
contrun Feb 12, 2025
ff8b269
Fix not using hold payment
contrun Feb 12, 2025
a400cee
Insert invoice to hub
contrun Feb 12, 2025
755d0b8
Fix using too small payment amount in cross chain test
contrun Feb 12, 2025
73de69f
Fix sha256 not specified while exchanging cross-chain invoices
contrun Feb 12, 2025
08fce01
Only handle invoice received in cch send_btc
contrun Feb 12, 2025
df40935
Fix insufficient balance error
contrun Feb 12, 2025
3d36aa8
Assert that lnd node indeed receive the amount
contrun Feb 13, 2025
c2b5990
Sleep some time before sending lnd payment
contrun Feb 13, 2025
5786b5b
Rename test and add attr to ignore test
contrun Feb 13, 2025
69272ed
Fix using the wrong name of contract
contrun Feb 14, 2025
f376539
Add test for sudt cross payment
contrun Feb 14, 2025
03916dd
Properly create sudt funding tx
contrun Feb 14, 2025
84a23e0
Fix dead lock in get ckb test context
contrun Feb 14, 2025
a38f13a
Fix sudt funding tx verification failure
contrun Feb 14, 2025
c474959
Add unit test for cch receiving btc
contrun Feb 14, 2025
b79e64f
Use all the fields in invoice
contrun Feb 14, 2025
469655a
Implement Default for SendPaymentCommand to simplify constructing
contrun Feb 14, 2025
988194b
Generate fiber invoice with payee pubkey in cch
contrun Feb 14, 2025
a2abb3b
Use fiber invoice for cch ReceiveBTC parameter
contrun Feb 14, 2025
ee1ca40
Fix udt type script not set in invoice
contrun Feb 14, 2025
8813ff1
Make variable names more consistent
contrun Feb 14, 2025
b32bd1b
Update udt-init script for new wrapped btc script config
contrun Feb 14, 2025
b92f461
Fix cch e2e tests
contrun Feb 14, 2025
773f0d1
Save invoice to store in cch send_btc
contrun Feb 14, 2025
9ab3aaf
Fix cch e2e test receive btc
contrun Feb 14, 2025
b57c1cd
Add test for multiple hops crosschain payment
contrun Feb 17, 2025
2d9e9dc
Don't print bitcoin info
contrun Feb 17, 2025
ee59e1f
Retry initializing lnd node when server is starting
contrun Feb 17, 2025
d44066f
Save amount to invoice channel info
contrun Feb 17, 2025
dec66d6
Merge remote-tracking branch 'nervosnetwork/develop' into support-fib…
contrun Feb 17, 2025
0b51562
Remove inadvertently added merge temp file
contrun Feb 17, 2025
969f732
chore: Fix clippy, rpc docs
contrun Feb 17, 2025
a044874
Remove hold_payment
contrun Feb 18, 2025
548259b
Remove hold_payment from {rpc,molecule}
contrun Feb 18, 2025
8e676cc
Use ..Default::defafult to construct SendPaymentCommand
contrun Feb 18, 2025
dac7a41
chore: improve some readability
contrun Feb 18, 2025
c53f6df
Remove settle_invoice from store
contrun Feb 18, 2025
fed2e63
Parse cch wrapped btc script as from json mapping
contrun Feb 26, 2025
e76be09
Remove useless code
contrun Feb 26, 2025
8df31f3
Merge remote-tracking branch 'nervosnetwork/develop' into support-fib…
contrun Feb 26, 2025
23cfd47
Fix tests
contrun Feb 26, 2025
412fe2b
Use handle_actor_call to simplify error handling
contrun Feb 26, 2025
6c482c5
Return FinalIncorrectPaymentHash on inserting preimage failure
contrun Feb 26, 2025
ccf1384
Merge establish_channel_between_nodes with establish_udt_channel_betw…
contrun Feb 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Install dependencies
run: |
wget "https://bitcoin.org/bin/bitcoin-core-27.0/bitcoin-27.0-x86_64-linux-gnu.tar.gz"
tar -xvaf "bitcoin-27.0-x86_64-linux-gnu.tar.gz"
echo "$(pwd)/bitcoin-27.0/bin" >> $GITHUB_PATH
wget "https://github.com/lightningnetwork/lnd/releases/download/v0.18.0-beta/lnd-linux-amd64-v0.18.0-beta.tar.gz"
tar -xvaf "lnd-linux-amd64-v0.18.0-beta.tar.gz"
echo "$(pwd)/lnd-linux-amd64-v0.18.0-beta" >> $GITHUB_PATH
- run: |
TEST_TEMP_RETAIN=1 RUST_BACKTRACE=full RUST_LOG=trace cargo nextest run --no-fail-fast
TEST_TEMP_RETAIN=1 RUST_BACKTRACE=full RUST_LOG=trace cargo nextest run --no-fail-fast --features lnd-tests

fmt:
name: Rustfmt
Expand Down
Loading