Skip to content

Commit 572f7a1

Browse files
authored
Merge pull request #963 from KomodoPlatform/dev
Merge dev to mm2.1
2 parents 419f36e + a839d2f commit 572f7a1

File tree

131 files changed

+23806
-1472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+23806
-1472
lines changed

Cargo.lock

+873-69
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+18-12
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ version = "0.1.0"
99
edition = "2018"
1010
default-run = "mm2"
1111

12-
# Deprecated
1312
[features]
13+
# Deprecated
1414
native = []
15+
zhtlc = ["coins/zhtlc"]
1516

1617
[[bin]]
1718
name = "mm2"
@@ -48,10 +49,10 @@ async-std = { version = "1.5", features = ["unstable"] }
4849
async-trait = "0.1"
4950
atomic = "0.4"
5051
bigdecimal = { version = "0.1", features = ["serde"] }
51-
bitcrypto = { git = "https://github.com/artemii235/parity-bitcoin.git" }
52+
bitcrypto = { path = "mm2src/mm2_bitcoin/crypto" }
5253
blake2 = "0.9.1"
5354
bytes = "0.4"
54-
chain = { git = "https://github.com/artemii235/parity-bitcoin.git" }
55+
chain = { path = "mm2src/mm2_bitcoin/chain" }
5556
coins = { path = "mm2src/coins" }
5657
common = { path = "mm2src/common" }
5758
crc = "1.8"
@@ -64,9 +65,6 @@ enum-primitive-derive = "0.1"
6465
fomat-macros = "0.2"
6566
futures01 = { version = "0.1", package = "futures" }
6667
futures-cpupool = "0.1"
67-
# NB: tokio-timer 2+ is targeted at "Tokio runtime" and heavy load (spawns several timer threads there),
68-
# whereas futures-timer works with any reactor and spawns one global timer thread (fits out load better).
69-
futures-timer = "0.1"
7068
futures = { version = "0.3.1", package = "futures", features = ["compat", "async-await"] }
7169
gstuff = { version = "0.6", features = ["nightly"] }
7270
hash256-std-hasher = "0.15.2"
@@ -75,34 +73,34 @@ hex = "0.3.2"
7573
hex-literal = "0.3.1"
7674
http = "0.2"
7775
itertools = "0.9"
78-
keys = { git = "https://github.com/artemii235/parity-bitcoin.git" }
76+
keys = { path = "mm2src/mm2_bitcoin/keys" }
7977
lazy_static = "1.3"
8078
libc = "0.2"
8179
metrics = "0.12"
8280
mm2-libp2p = { path = "mm2src/mm2_libp2p" }
8381
num-rational = { version = "0.2", features = ["serde", "bigint", "bigint-std"] }
8482
num-traits = "0.2"
85-
rpc = { git = "https://github.com/artemii235/parity-bitcoin.git" }
83+
rpc = { path = "mm2src/mm2_bitcoin/rpc" }
8684
parking_lot = { version = "0.11", features = ["nightly"] }
8785
parity-util-mem = "0.7"
8886
# AP: portfolio RPCs are not documented and not used as of now
8987
# so the crate is disabled to speed up the entire removal of C code
9088
# portfolio = { path = "mm2src/portfolio" }
91-
primitives = { git = "https://github.com/artemii235/parity-bitcoin.git" }
89+
primitives = { path = "mm2src/mm2_bitcoin/primitives" }
9290
rand = { version = "0.7", features = ["std", "small_rng"] }
9391
rmp-serde = "0.14.3"
9492
# TODO: Reduce the size of regex by disabling the features we don't use.
9593
# cf. https://github.com/rust-lang/regex/issues/583
9694
regex = "1"
97-
script = { git = "https://github.com/artemii235/parity-bitcoin.git" }
95+
script = { path = "mm2src/mm2_bitcoin/script" }
9896
serde = "1.0"
9997
serde_bencode = "0.2"
10098
serde_json = { version = "1.0", features = ["preserve_order"] }
10199
serde_derive = "1.0"
102100
ser_error = { path = "mm2src/derives/ser_error" }
103101
ser_error_derive = { path = "mm2src/derives/ser_error_derive" }
104-
serialization = { git = "https://github.com/artemii235/parity-bitcoin.git" }
105-
serialization_derive = { git = "https://github.com/artemii235/parity-bitcoin.git" }
102+
serialization = { path = "mm2src/mm2_bitcoin/serialization" }
103+
serialization_derive = { path = "mm2src/mm2_bitcoin/serialization_derive" }
106104
sp-trie = "2.0.0"
107105
sql-builder = "3.1.1"
108106

@@ -143,6 +141,14 @@ regex = "1"
143141
members = [
144142
"mm2src/coins",
145143
"mm2src/floodsub",
144+
"mm2src/mm2_bitcoin/crypto",
145+
"mm2src/mm2_bitcoin/chain",
146+
"mm2src/mm2_bitcoin/keys",
147+
"mm2src/mm2_bitcoin/rpc",
148+
"mm2src/mm2_bitcoin/primitives",
149+
"mm2src/mm2_bitcoin/script",
150+
"mm2src/mm2_bitcoin/serialization",
151+
"mm2src/mm2_bitcoin/serialization_derive",
146152
"mm2src/mm2_libp2p",
147153
"mm2src/gossipsub",
148154
"mm2src/derives/ser_error",

azure-pipelines-build-stage-job.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
ALICE_PASSPHRASE: $(${{ parameters.alice_passphrase }})
5757
ALICE_USERPASS: $(${{ parameters.alice_userpass }})
5858
RUST_LOG: debug
59-
condition: or( eq( variables['Build.Reason'], 'PullRequest' ), eq( variables['Build.SourceBranchName'], 'mm2.1' ) )
59+
condition: or( eq( variables['Build.Reason'], 'PullRequest' ), eq( variables['Build.SourceBranchName'], 'mm2.1' ), eq( variables['Build.SourceBranchName'], 'dev' ) )
6060
- bash: |
6161
cargo clippy -- -D warnings
6262
displayName: 'Check Clippy warnings'

js/defined-in-js.js

-20
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,6 @@
44
export function host_ensure_dir_is_writable(ptr, len) {
55
}
66

7-
// fn host_electrum_connect(ptr: *const c_char, len: i32) -> i32;
8-
export function host_electrum_connect(ptr, len) {
9-
return 0;
10-
}
11-
12-
// fn host_electrum_is_connected(ri: i32) -> i32;
13-
export function host_electrum_is_connected(ri) {
14-
return 0;
15-
}
16-
17-
// fn host_electrum_request(ri: i32, ptr: *const c_char, len: i32) -> i32;
18-
export function host_electrum_request(ri, ptr, len) {
19-
return 0;
20-
}
21-
22-
// fn host_electrum_reply(ri: i32, id: i32, rbuf: *mut c_char, rcap: i32) -> i32;
23-
export function host_electrum_reply(ri, id, rbuf, rcap) {
24-
return 0;
25-
}
26-
277
// pub fn host_env(name: *const c_char, nameˡ: i32, rbuf: *mut c_char, rcap: i32) -> i32;
288
export function host_env(name, name2, rbuf, rcap) {
299
return 0;

mm2src/coins/Cargo.toml

+20-10
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@ name = "coins"
33
version = "0.1.0"
44
edition = "2018"
55

6+
[features]
7+
zhtlc = ["zcash_client_backend", "zcash_primitives", "zcash_proofs"]
8+
69
[lib]
710
name = "coins"
811
path = "lp_coins.rs"
912
doctest = false
1013

1114
[dependencies]
15+
async-std = { version = "1.5", features = ["unstable"] }
1216
async-trait = "0.1"
1317
base64 = "0.10.0"
1418
bigdecimal = { version = "0.1.0", features = ["serde"] }
15-
bitcrypto = { git = "https://github.com/artemii235/parity-bitcoin.git" }
19+
bitcoin-cash-slp = "0.3.1"
20+
bitcrypto = { path = "../mm2_bitcoin/crypto" }
1621
byteorder = "1.3"
1722
bytes = "0.4"
18-
chain = { git = "https://github.com/artemii235/parity-bitcoin.git" }
23+
cfg-if = "1.0"
24+
chain = { path = "../mm2_bitcoin/chain" }
1925
common = { path = "../common" }
2026
derive_more = "0.99"
2127
ethabi = { git = "https://github.com/artemii235/ethabi" }
@@ -28,30 +34,31 @@ fomat-macros = "0.2"
2834
futures01 = { version = "0.1", package = "futures" }
2935
# using select macro requires the crate to be named futures, compilation failed with futures03 name
3036
futures = { version = "0.3", package = "futures", features = ["compat", "async-await"] }
31-
futures-timer = "0.1"
3237
gstuff = { version = "0.6", features = ["nightly"] }
3338
hex = "0.3.2"
3439
http = "0.2"
3540
itertools = "0.9"
3641
jsonrpc-core = "8.0.1"
37-
keys = { git = "https://github.com/artemii235/parity-bitcoin.git" }
42+
keys = { path = "../mm2_bitcoin/keys" }
3843
lazy_static = "1.3"
3944
libc = "0.2"
4045
libsecp256k1 = "0.3.5"
4146
metrics = "0.12"
4247
mocktopus = "0.7.0"
4348
num-traits = "0.2"
44-
primitives = { git = "https://github.com/artemii235/parity-bitcoin.git" }
49+
primitives = { path = "../mm2_bitcoin/primitives" }
4550
rand = { version = "0.7", features = ["std", "small_rng"] }
4651
rlp = { git = "https://github.com/artemii235/parity-common" }
47-
rpc = { git = "https://github.com/artemii235/parity-bitcoin.git" }
48-
script = { git = "https://github.com/artemii235/parity-bitcoin.git" }
52+
rpc = { path = "../mm2_bitcoin/rpc" }
53+
script = { path = "../mm2_bitcoin/script" }
54+
secp256k1_bindings = { version = "0.20", package = "secp256k1" }
55+
ser_error = { path = "../derives/ser_error" }
56+
ser_error_derive = { path = "../derives/ser_error_derive" }
4957
serde = "1.0"
5058
serde_derive = "1.0"
5159
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
52-
serialization = { git = "https://github.com/artemii235/parity-bitcoin.git" }
53-
ser_error = { path = "../derives/ser_error" }
54-
ser_error_derive = { path = "../derives/ser_error_derive" }
60+
serialization = { path = "../mm2_bitcoin/serialization" }
61+
serialization_derive = { path = "../mm2_bitcoin/serialization_derive" }
5562
sha2 = "0.8"
5663
sha3 = "0.8"
5764
# One of web3 dependencies is the old `tokio-uds 0.1.7` which fails cross-compiling to ARM.
@@ -73,3 +80,6 @@ rustls = { version = "0.18", features = ["dangerous_configuration"] }
7380
tokio = { version = "0.2" }
7481
tokio-rustls = { version = "0.14.1" }
7582
webpki-roots = { version = "0.19.0" }
83+
zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.git", optional = true }
84+
zcash_primitives = { features = ["transparent-inputs"], git = "https://github.com/KomodoPlatform/librustzcash.git", optional = true }
85+
zcash_proofs = { features = ["bundled-prover"], git = "https://github.com/KomodoPlatform/librustzcash.git", optional = true }

0 commit comments

Comments
 (0)