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

[r2r] lightning ordermatching wip + library updates and more unit tests #1655

Merged
merged 25 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3965444
add a unit test to test lightning taker getting swap preimage from th…
shamardy Jan 19, 2023
5c94a9f
update rust-lightning to v0.0.111 wip
shamardy Jan 24, 2023
12f265c
update rust-lightning to v0.0.113 wip
shamardy Jan 26, 2023
fe0189e
update uuid to v1.2.2, use uuid instead of rpc_channel_id for lightni…
shamardy Jan 30, 2023
0a9e017
add unit tests for mpp and claiming swaps on-chain
shamardy Feb 2, 2023
31737cf
Add channel confirmation details to rpc response
shamardy Feb 3, 2023
65655c7
add test_lightning_maker_swap_mpp
shamardy Feb 3, 2023
29536be
wip: use protocol info to not match with lightning orders if there ar…
shamardy Feb 7, 2023
f07a9d1
Merge remote-tracking branch 'origin/dev' into ln-onchain-swaps
shamardy Feb 8, 2023
dfa04f0
wip: add amount to protocol info route check
shamardy Feb 8, 2023
e64f422
wip: refactor lightning protocol info code
shamardy Feb 9, 2023
8fdba01
Add max_total_cltv_expiry_delta and final_cltv_expiry_delta to route …
shamardy Feb 10, 2023
155ff64
Fix funding_generated_in_block is Null in DB error when 0 conf is ena…
shamardy Feb 13, 2023
d7a0c34
remove some unneeded todos, write better todos
shamardy Feb 13, 2023
268f2c6
remove more todos
shamardy Feb 13, 2023
a88e3ea
review fixes: use bech32 0.9.1, return error instead of using expect …
shamardy Feb 17, 2023
9f3803e
review fixes: use macro to simplify code, sort by short_channel_id
shamardy Feb 21, 2023
d37b6cc
review fixes: add doc comments for uuid and channel_id
shamardy Feb 21, 2023
9577efc
Merge remote-tracking branch 'origin/dev' into ln-onchain-swaps
shamardy Feb 27, 2023
f7953a7
Fix channel was closed issue but closing transaction wasn't broadcast…
shamardy Mar 3, 2023
e683bea
fix issue in db when retrying to pay an invoice
shamardy Mar 3, 2023
da8d3ad
Merge remote-tracking branch 'origin/dev' into ln-onchain-swaps
shamardy Mar 6, 2023
f92d69a
move converting tx hex to bytes outside send transaction loop in Broa…
shamardy Mar 7, 2023
c5dd404
Merge remote-tracking branch 'origin/dev' into ln-onchain-swaps
shamardy Mar 7, 2023
0daed47
import uuid::Error as UuidError in my_swaps.rs
shamardy Mar 9, 2023
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
91 changes: 46 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions mm2src/coins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async-trait = "0.1.52"
base64 = "0.10.0"
base58 = "0.2.0"
bip32 = { version = "0.2.2", default-features = false, features = ["alloc", "secp256k1-ffi"] }
bitcoin_hashes = "0.10.0"
bitcoin_hashes = "0.11"
bitcrypto = { path = "../mm2_bitcoin/crypto" }
bincode = "1.3.3"
byteorder = "1.3"
Expand Down Expand Up @@ -89,7 +89,7 @@ utxo_signer = { path = "utxo_signer" }
# using the same version as cosmrs
tendermint-rpc = { version = "=0.23.7", default-features = false }
tiny-bip39 = "0.8.0"
uuid = { version = "0.7", features = ["serde", "v4"] }
uuid = { version = "1.2.2", features = ["fast-rng", "serde", "v4"] }
# One of web3 dependencies is the old `tokio-uds 0.1.7` which fails cross-compiling to ARM.
# We don't need the default web3 features at all since we added our own web3 transport using shared HYPER instance.
web3 = { git = "https://github.com/KomodoPlatform/rust-web3", tag = "v0.19.0", default-features = false }
Expand All @@ -114,28 +114,27 @@ web-sys = { version = "0.3.55", features = ["console", "Headers", "Request", "Re

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
dirs = { version = "1" }
bitcoin = "0.28.1"
bitcoin = "0.29"
hyper = { version = "0.14.11", features = ["client", "http2", "server", "tcp"] }
# using webpki-tokio to avoid rejecting valid certificates
# got "invalid certificate: UnknownIssuer" for https://ropsten.infura.io on iOS using default-features
hyper-rustls = { version = "0.23", default-features = false, features = ["http1", "http2", "webpki-tokio"] }
lightning = "0.0.110"
lightning-background-processor = "0.0.110"
lightning-invoice = { version = "0.18.0", features = ["serde"] }
lightning-net-tokio = "0.0.110"
lightning-rapid-gossip-sync = "0.0.110"
lightning = "0.0.113"
lightning-background-processor = "0.0.113"
lightning-invoice = { version = "0.21.0", features = ["serde"] }
lightning-net-tokio = "0.0.113"
rust-ini = { version = "0.13" }
rustls = { version = "0.20", features = ["dangerous_configuration"] }
secp256k1v22 = { version = "0.22", package = "secp256k1" }
secp256k1v24 = { version = "0.24", package = "secp256k1" }
tendermint-config = { version = "0.23.7", default-features = false }
tokio = { version = "1.20" }
tokio-rustls = { version = "0.23" }
tonic = { version = "0.7", features = ["tls", "tls-webpki-roots", "compression"] }
webpki-roots = { version = "0.22" }
zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.git" }
zcash_client_sqlite = { git = "https://github.com/KomodoPlatform/librustzcash.git" }
zcash_primitives = { features = ["transparent-inputs"], git = "https://github.com/KomodoPlatform/librustzcash.git" }
zcash_proofs = { git = "https://github.com/KomodoPlatform/librustzcash.git" }
zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.0.0" }
zcash_client_sqlite = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.0.0" }
zcash_primitives = { features = ["transparent-inputs"], git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.0.0" }
zcash_proofs = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.0.0" }

[target.'cfg(windows)'.dependencies]
winapi = "0.3"
Expand Down
12 changes: 10 additions & 2 deletions mm2src/coins/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4242,9 +4242,17 @@ impl MmCoin for EthCoin {

fn mature_confirmations(&self) -> Option<u32> { None }

fn coin_protocol_info(&self) -> Vec<u8> { Vec::new() }
fn coin_protocol_info(&self, _amount_to_receive: Option<MmNumber>) -> Vec<u8> { Vec::new() }

fn is_coin_protocol_supported(&self, _info: &Option<Vec<u8>>) -> bool { true }
fn is_coin_protocol_supported(
&self,
_info: &Option<Vec<u8>>,
_amount_to_send: Option<MmNumber>,
_locktime: u64,
_is_maker: bool,
) -> bool {
true
}

fn on_disabled(&self) -> Result<(), AbortedError> { AbortableSystem::abort_all(&self.abortable_system) }

Expand Down
Loading