Skip to content

Commit

Permalink
integrate teerdays (#203)
Browse files Browse the repository at this point in the history
* bump versions

* integrated teerdays and ran benchmarks for own pallets only

* run again for enclave bridge

* re-ran all benchmarks

* lift patches

* bump pallets

* pin rustc stable
  • Loading branch information
brenzi authored Aug 11, 2024
1 parent 1a18046 commit bc7e0b4
Show file tree
Hide file tree
Showing 24 changed files with 1,274 additions and 644 deletions.
39 changes: 39 additions & 0 deletions .cargo/zepter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version:
format: 1
# Minimum version of the binary that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.13.2

# The examples in this file assume crate `A` to have a dependency on crate `B`.
workflows:
check:
- [
'lint',
# Check that `A` activates the features of `B`.
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
'--left-side-outside-workspace=ignore',
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
# Auxillary flags:
'--offline',
'--locked',
'--show-path',
'--quiet',
]
# Same as `check`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]

# Will be displayed when any workflow fails:
help:
text: |
This repo uses the Zepter CLI to detect abnormalities in the feature configuration.
It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`.
Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
links:
- "https://github.com/ggwpez/zepter"
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,28 @@ jobs:
- name: ${{ matrix.check }}
run: cargo ${{ matrix.check }}

cargo-zepter:
name: Cargo Zepter
runs-on: ubuntu-latest

steps:
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Don't clone historic commits.

- name: Check features
run: zepter run check

license-check:
runs-on: ubuntu-latest
steps:
Expand Down
70 changes: 55 additions & 15 deletions Cargo.lock

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

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pallet-claims = { default-features = false, git = "https://github.com/integritee
pallet-enclave-bridge = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v1.13.0" }
pallet-sidechain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v1.13.0" }
pallet-teeracle = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v1.13.0" }
pallet-teerdays = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v1.13.0" }
pallet-teerex = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v1.13.0" }

# substrate deps
Expand Down Expand Up @@ -105,18 +106,20 @@ substrate-wasm-builder = "23.0.0"
substrate-build-script-utils = "11.0.0"

#[patch."https://github.com/integritee-network/pallets.git"]
#claims-primitives = { path = '../pallets/primitives/claims' }
#common-primitives = { path = '../pallets/primitives/common' }
#enclave-bridge-primitives = { path = '../pallets/primitives/enclave-bridge' }
#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' }
#pallet-teerdays = { path = '../pallets/teerdays' }
#pallet-teerex = { path = '../pallets/teerex' }
#sgx-verify = { path = '../pallets/teerex/sgx-verify' }
#teeracle-primitives = { path = '../pallets/primitives/teeracle' }
#common-primitives = { path = '../pallets/primitives/common' }
#teerdays-primitives = { path = '../pallets/primitives/teerdays' }
#teerex-primitives = { path = '../pallets/primitives/teerex' }
#test-utils = { path = '../pallets/test-utils' }

[patch.crates-io]
ring = { git = "https://github.com/betrusted-io/ring-xous", branch = "0.16.20-cleanup" }
4 changes: 3 additions & 1 deletion 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 polkadot sdk, bump patch revision ad lib. Make this the github release tag.
version = '1.13.0'
version = '1.13.1'
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

Expand Down Expand Up @@ -76,6 +76,8 @@ runtime-benchmarks = [
"sc-service/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
# for secure launch of a live solo network, do enable extrinsic filtering
extrinsic-filtering = ["integritee-node-runtime/extrinsic-filtering"]
13 changes: 11 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.13.390'
version = '1.13.400'

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down Expand Up @@ -34,6 +34,7 @@ pallet-claims = { workspace = true }
pallet-enclave-bridge = { workspace = true }
pallet-sidechain = { workspace = true }
pallet-teeracle = { workspace = true }
pallet-teerdays = { workspace = true }
pallet-teerex = { workspace = true }

sp-api = { workspace = true }
Expand Down Expand Up @@ -115,14 +116,18 @@ std = [
"pallet-proxy/std",
"pallet-utility/std",
"pallet-teeracle/std",
"pallet-teerdays/std",
"frame-benchmarking?/std",
"frame-system-benchmarking?/std",
"pallet-preimage/std",
"sp-staking/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"sp-runtime/runtime-benchmarks",
# actual pallets to be benchmarked
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-grandpa/frame-benchmarking",
Expand All @@ -139,4 +144,8 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-teeracle/runtime-benchmarks",
"pallet-sidechain/runtime-benchmarks",
"pallet-teerdays/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
]
Loading

0 comments on commit bc7e0b4

Please sign in to comment.