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

Fix ita-sgx-runtime standalone build and improve its Cargo.toml #1580

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ jobs:
run: rustup show

- name: Install taplo
run: cargo install taplo-cli --locked
run: cargo install --version 0.8.1 taplo-cli --locked
Copy link
Contributor Author

@clangenb clangenb Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newest taplo requires rustc-v1.7.1, which we don't have

- name: Cargo.toml fmt
run: taplo fmt --check

Expand Down
159 changes: 2 additions & 157 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ dependencies = [
"convert_case",
"proc-macro2",
"quote",
"rustc_version 0.4.0",
"rustc_version",
"syn 1.0.109",
]

Expand Down Expand Up @@ -1754,30 +1754,6 @@ dependencies = [
"sp-weights",
]

[[package]]
name = "frame-system-benchmarking"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec",
"scale-info",
"sp-core",
"sp-runtime",
"sp-std",
]

[[package]]
name = "frame-system-rpc-runtime-api"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"parity-scale-codec",
"sp-api",
]

[[package]]
name = "fs-err"
version = "2.9.0"
Expand Down Expand Up @@ -2820,34 +2796,22 @@ dependencies = [
name = "ita-sgx-runtime"
version = "0.9.0"
dependencies = [
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"itp-sgx-runtime-primitives",
"pallet-aura",
"pallet-balances",
"pallet-evm",
"pallet-insecure-randomness-collective-flip",
"pallet-parentchain",
"pallet-sudo",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"parity-scale-codec",
"scale-info",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
]

Expand Down Expand Up @@ -5126,22 +5090,6 @@ dependencies = [
"sp-std",
]

[[package]]
name = "pallet-aura"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"frame-support",
"frame-system",
"pallet-timestamp",
"parity-scale-codec",
"scale-info",
"sp-application-crypto",
"sp-consensus-aura",
"sp-runtime",
"sp-std",
]

[[package]]
name = "pallet-balances"
version = "4.0.0-dev"
Expand Down Expand Up @@ -5202,20 +5150,6 @@ dependencies = [
"sp-std",
]

[[package]]
name = "pallet-insecure-randomness-collective-flip"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"frame-support",
"frame-system",
"parity-scale-codec",
"safe-mix",
"scale-info",
"sp-runtime",
"sp-std",
]

[[package]]
name = "pallet-parentchain"
version = "0.11.0"
Expand Down Expand Up @@ -5347,18 +5281,6 @@ dependencies = [
"sp-std",
]

[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
"sp-api",
"sp-runtime",
"sp-weights",
]

[[package]]
name = "parity-multiaddr"
version = "0.11.2"
Expand Down Expand Up @@ -6257,22 +6179,13 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6"

[[package]]
name = "rustc_version"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
dependencies = [
"semver 0.9.0",
]

[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver 1.0.18",
"semver",
]

[[package]]
Expand Down Expand Up @@ -6423,15 +6336,6 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "077d73db7973cccf63eb4aff1e5a34dc2459baa867512088269ea5f2f4253c90"

[[package]]
name = "safe-mix"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c"
dependencies = [
"rustc_version 0.2.3",
]

[[package]]
name = "safe_arch"
version = "0.7.1"
Expand Down Expand Up @@ -6690,27 +6594,12 @@ dependencies = [
"libc",
]

[[package]]
name = "semver"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
dependencies = [
"semver-parser",
]

[[package]]
name = "semver"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"

[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"

[[package]]
name = "serde"
version = "1.0.118"
Expand Down Expand Up @@ -7260,18 +7149,6 @@ dependencies = [
"static_assertions",
]

[[package]]
name = "sp-block-builder"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"parity-scale-codec",
"sp-api",
"sp-inherents",
"sp-runtime",
"sp-std",
]

[[package]]
name = "sp-consensus"
version = "0.10.0-dev"
Expand Down Expand Up @@ -7514,16 +7391,6 @@ dependencies = [
"sp-std",
]

[[package]]
name = "sp-offchain"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"sp-api",
"sp-core",
"sp-runtime",
]

[[package]]
name = "sp-panic-handler"
version = "5.0.0"
Expand Down Expand Up @@ -7586,19 +7453,6 @@ dependencies = [
"syn 2.0.32",
]

[[package]]
name = "sp-session"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"parity-scale-codec",
"scale-info",
"sp-api",
"sp-core",
"sp-staking",
"sp-std",
]

[[package]]
name = "sp-staking"
version = "4.0.0-dev"
Expand Down Expand Up @@ -7677,15 +7531,6 @@ dependencies = [
"tracing-subscriber",
]

[[package]]
name = "sp-transaction-pool"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65"
dependencies = [
"sp-api",
"sp-runtime",
]

[[package]]
name = "sp-trie"
version = "7.0.0"
Expand Down
32 changes: 3 additions & 29 deletions app-libs/sgx-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,17 @@ scale-info = { version = "2.10.0", default-features = false, features = ["derive
itp-sgx-runtime-primitives = { path = "../../core-primitives/sgx-runtime-primitives", default-features = false }

# Substrate dependencies
frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-system-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-insecure-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }

# Integritee dependencies
Expand All @@ -46,38 +34,24 @@ pallet-parentchain = { default-features = false, git = "https://github.com/integ

[features]
default = ["std"]
# Compile the sgx-runtime with evm-pallet support in `no_std`.
# Compile the sgx-runtime with evm support.
evm = ["pallet-evm"]
# Compile the sgx-runtime with evm-pallet support in `std`.
evm_std = [
"evm", # Activate the `feature = evm` for the compiler flags.
"std",
"pallet-evm/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]

std = [
"codec/std",
"scale-info/std",
"itp-sgx-runtime-primitives/std",
"frame-executive/std",
"frame-support/std",
"frame-system/std",
"pallet-evm?/std",
"pallet-balances/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"pallet-parentchain/std",
"sp-api/std",
"sp-core/std",
"sp-inherents/std",
"sp-runtime/std",
"sp-std/std",
"sp-version/std",
Expand Down
1 change: 0 additions & 1 deletion app-libs/stf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "po
[features]
default = ["std"]
evm = ["ita-sgx-runtime/evm"]
evm_std = ["evm", "ita-sgx-runtime/evm_std"]
sgx = [
"sgx_tstd",
"itp-sgx-externalities/sgx",
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ itp-utils = { path = "../core-primitives/utils" }

[features]
default = []
evm = ["ita-stf/evm_std", "pallet-evm"]
evm = ["ita-stf/evm", "pallet-evm"]
teeracle = []
sidechain = []
offchain-worker = []
Expand Down
1 change: 0 additions & 1 deletion core/parentchain/light-client/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use std::{
boxed::Box,
fs,
path::{Path, PathBuf},
sgxfs::SgxFile,
sync::Arc,
};

Expand Down
Loading
Loading