Skip to content

Commit

Permalink
integrate pallet teerex refactoring (#180)
Browse files Browse the repository at this point in the history
* build succeeds

* ran benchmarks on thinkpad T14s to get initial reasonable weight files

* rebenchmarked after optimizations

* rerun benchmarks with shield unshield

* lift patches and bump version

* rerun benchmarks

* fmt

* remove skip-ias-check flag from CI, but leave the dev build because of extrinsic filtering

* upgraded pallet deps again. added new genesis and new benchmark for set_security_flags

* lifted patches again

* fmt
  • Loading branch information
brenzi authored Jul 16, 2023
1 parent 2c13d1f commit 31b72e1
Show file tree
Hide file tree
Showing 13 changed files with 406 additions and 186 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-skip-ias-check
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-with-ias

- name: Release
if: ${{ matrix.binary == 'release' }}
run: cargo build --release --locked --features skip-ias-check,skip-extrinsic-filtering
run: cargo build --release --locked --features skip-extrinsic-filtering

# Upload artifacts
- name: Upload integritee-node-dev
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-skip-ias-check
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-with-ias

- name: Build benchmarking binary
if: ${{ matrix.binary == 'release' }}
Expand Down
93 changes: 77 additions & 16 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@ members = [

#[patch."https://github.com/integritee-network/pallets.git"]
#pallet-claims = { path = '../pallets/claims' }
#pallet-enclave-bridge = { path = '../pallets/enclave-bridge' }
#pallet-teerex = { path = '../pallets/teerex' }
#pallet-sidechain = { path = '../pallets/sidechain' }
#sgx-verify = { path = '../pallets/teerex/sgx-verify' }
#pallet-teeracle = { path = '../pallets/teeracle' }
#test-utils = { path = '../pallets/test-utils' }
#claims-primitives = { path = '../pallets/primitives/claims' }
#enclave-bridge-primitives = { path = '../pallets/primitives/enclave-bridge' }
#teerex-primitives = { path = '../pallets/primitives/teerex' }
#teeracle-primitives = { path = '../pallets/primitives/teeracle' }
#common-primitives = { path = '../pallets/primitives/common' }
4 changes: 1 addition & 3 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = 'Apache-2.0'
name = 'integritee-node'
repository = 'https://github.com/integritee-network/integritee-node'
# Align major.minor revision with the runtimes, bump patch revision ad lib. Make this the github release tag.
version = '1.0.36'
version = '1.1.0'
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

Expand Down Expand Up @@ -71,7 +71,5 @@ runtime-benchmarks = [
"integritee-node-runtime/runtime-benchmarks",
"sc-service/runtime-benchmarks",
]
# allow workers to register without remote attestation for dev purposes
skip-ias-check = ["integritee-node-runtime/skip-ias-check"]
# lift filters for development binaries
skip-extrinsic-filtering = ["integritee-node-runtime/skip-extrinsic-filtering"]
2 changes: 1 addition & 1 deletion node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ fn genesis_config(
// Assign network admin rights.
key: Some(root_key),
},
teerex: TeerexConfig { allow_sgx_debug_mode: true },
teerex: TeerexConfig { allow_sgx_debug_mode: true, allow_skipping_attestation: true },
claims: Default::default(),
treasury: Default::default(),
vesting: Default::default(),
Expand Down
6 changes: 4 additions & 2 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = 'Apache-2.0'
name = 'integritee-node-runtime'
repository = 'https://github.com/integritee-network/integritee-node'
# keep patch revision with spec_version of runtime
version = '1.0.33'
version = '1.1.34'

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -31,6 +31,7 @@ pallet-utility = { default-features = false, git = "https://github.com/paritytec
pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }

pallet-claims = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
pallet-enclave-bridge = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
pallet-sidechain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
pallet-teeracle = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
pallet-teerex = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
Expand Down Expand Up @@ -67,7 +68,6 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git",

[features]
default = ["std"]
skip-ias-check = ["pallet-teerex/skip-ias-check"]
skip-extrinsic-filtering = []
std = [
"codec/std",
Expand Down Expand Up @@ -102,6 +102,7 @@ std = [
"sp-version/std",
"pallet-teerex/std",
"pallet-claims/std",
"pallet-enclave-bridge/std",
"pallet-proxy/std",
"pallet-utility/std",
"pallet-teeracle/std",
Expand All @@ -122,6 +123,7 @@ runtime-benchmarks = [
"pallet-scheduler/runtime-benchmarks",
"pallet-teerex/runtime-benchmarks",
"pallet-claims/runtime-benchmarks",
"pallet-enclave-bridge/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
Expand Down
Loading

0 comments on commit 31b72e1

Please sign in to comment.