Skip to content

Commit

Permalink
Fix sync (#679)
Browse files Browse the repository at this point in the history
* Replace substrate dependencies source

* Use custom wasm substitute to fix block sync

* Add aarch64 compilation support

* Bump version to v5.2.0

---------

Co-authored-by: icodezjb <[email protected]>
  • Loading branch information
icodezjb and icodezjb authored Nov 9, 2023
1 parent c989780 commit 243f570
Show file tree
Hide file tree
Showing 56 changed files with 685 additions and 678 deletions.
402 changes: 201 additions & 201 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chainx"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"
description = "Fully Decentralized Interchain Crypto Asset Management on Polkadot"
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ build:
release:
@cargo build --release #--features "${ENABLE_FEATURES}"

release-arm64:
@BINDGEN_EXTRA_CLANG_ARGS='--sysroot /usr/aarch64-linux-gnu' \
cargo build --release --target=aarch64-unknown-linux-gnu

test-opreturn:
cargo test --release -p xp-gateway-bitcoin --lib -- --test-threads 1

Expand Down
58 changes: 29 additions & 29 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chainx-cli"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
description = "Implementation of protocol https://chainx.org in Rust based on the Substrate framework."
edition = "2021"
Expand All @@ -18,38 +18,38 @@ serde_json = "1.0"
clap = { version = "3.0", features = ["derive"] }

# Substrate client
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-authority-discovery = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-basic-authorship = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-chain-spec = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-client-api = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-consensus = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-consensus-babe = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-consensus-slots = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-executor = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-finality-grandpa = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-network = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-rpc = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-sync-state-rpc = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-transaction-pool = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-telemetry = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }

frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", optional = true }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", optional = true }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", optional = true }
frame-benchmarking-cli = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", optional = true }
sc-cli = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", optional = true }
sc-service = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", optional = true }
try-runtime-cli = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", optional = true }

# Substrate primitives
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sp-authority-discovery = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-core = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-consensus = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-consensus-babe = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-finality-grandpa = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-inherents = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sp-transaction-pool = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }

# Substrate pallets
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
pallet-im-online = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }

chainx-executor = { path = "../executor" }
chainx-primitives = { path = "../primitives" }
Expand All @@ -67,7 +67,7 @@ xpallet-gateway-common = { path = "../xpallets/gateway/common" }
xpallet-btc-ledger = { path = "../xpallets/btc-ledger" }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
substrate-build-script-utils = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }

[features]
default = ["cli"]
Expand Down
3 changes: 3 additions & 0 deletions cli/src/res/chainx_regenesis.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "chainx-executor"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

[dependencies]
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
frame-benchmarking = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }
sc-executor = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18" }

# ChainX runtime
chainx-runtime = { path = "../runtime/chainx" }
Expand Down
12 changes: 6 additions & 6 deletions primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chainx-primitives"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand All @@ -10,13 +10,13 @@ serde = { version = "1.0", features = ["derive"], optional = true }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }

# Substrate primitives
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-application-crypto = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-core = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# Substrate pallets
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
frame-system = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

[features]
default = ["std"]
Expand Down
6 changes: 3 additions & 3 deletions primitives/assets-registrar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-assets-registrar"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand All @@ -11,8 +11,8 @@ scale-info = { version = "2.0.1", default-features = false, features = ["derive"
impl-trait-for-tuples = "0.2.1"

# Substrate primitives
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# ChainX primitives
chainx-primitives = { path = "../../primitives", default-features = false }
Expand Down
10 changes: 5 additions & 5 deletions primitives/gateway/bitcoin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-gateway-bitcoin"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand All @@ -11,10 +11,10 @@ serde = { version = "1.0", features = ["derive"], optional = true }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }

# Substrate primitives
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-core = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
frame-support = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# ChainX primitives
chainx-primitives = { path = "../../../primitives", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions primitives/gateway/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-gateway-common"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand All @@ -11,8 +11,8 @@ hex = { version = "0.4", default-features = false }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }

# Substrate primitives
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-core = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
frame-support = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# ChainX primitives
xp-io = { path = "../../io", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion primitives/genesis-builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-genesis-builder"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand Down
8 changes: 4 additions & 4 deletions primitives/io/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "xp-io"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }

# Substrate primitives
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-core = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime-interface = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

[dev-dependencies]
hex = "0.4"
Expand Down
6 changes: 3 additions & 3 deletions primitives/mining/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "xp-mining-common"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

[dependencies]
# Substrate primitives
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-arithmetic = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# ChainX primitives
chainx-primitives = { path = "../../../primitives", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions primitives/mining/staking/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "xp-mining-staking"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

[dependencies]
# Substrate primitives
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# ChainX primitives
chainx-primitives = { path = "../../../primitives", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions primitives/protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-protocol"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand All @@ -10,7 +10,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }

# Substrate primitives
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# ChainX primitives
chainx-primitives = { path = "..", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion primitives/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-rpc"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand Down
8 changes: 4 additions & 4 deletions primitives/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xp-runtime"
version = "5.1.1"
version = "5.2.0"
authors = ["The ChainX Authors"]
edition = "2021"

Expand All @@ -10,9 +10,9 @@ serde = { version = "1.0", optional = true, features = ["derive"] }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }

# Substrate primitives
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-core = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-runtime = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }
sp-std = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18", default-features = false }

# EVM
fp-rpc = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc", default-features = false }
Expand Down
Loading

0 comments on commit 243f570

Please sign in to comment.