Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Squashed 'bridges/' changes from d05a98473..ce7cf9a49
Browse files Browse the repository at this point in the history
ce7cf9a49 Removed deprecated `#[pallet::generate_store(pub(super) trait Store)]` according to latest Cumulus (#1964)
897b1c0b2 Bump substrate/polkadot/cumulus (#1962)
7b946da2d Backport xcm bridging extensions to the bridge repo (#1813)
88c1114ec Bump futures from 0.3.26 to 0.3.27
8668f73bf Bump serde from 1.0.152 to 1.0.155
3df8823e1 Bump subxt from `a7b45ef` to `d4545de`
ef1b1bcd0 Some error improvements (#1956)
434c5e014 optimize justifications before they're included into complex transaction (#1949)
7bac365a6 Actually clone client data by reference when cloning the client (#1941)
764ddd4a8 remove lock file after checks are done (#1942)
c18a758f8 Fix invalid messages relay delivery transactions (#1940)
8ad152b06 fix nightly benchmarks test (#1939)
d451b4f84 Bump tokio from 1.25.0 to 1.26.0
8019c50aa Bump async-trait from 0.1.64 to 0.1.66
aa055fcee Bump serde_json from 1.0.93 to 1.0.94
ec2ef31c4 Bump subxt from `1c5faf3` to `a7b45ef`
20026366f Bump sysinfo from 0.28.1 to 0.28.2
fe246d1e3 Bump thiserror from 1.0.38 to 1.0.39
c95e0cf02 Fix deploy step in CI (#1931)
15b41c2dd Improve some relay errors readability (#1930)
792deae5e Added deploy Job (#1929)
d86c3ce21 Reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect (#1927)
4161b51f0 get rid of obsolete weight functions (#1926)
9b3b00e0f cargo update -p clap@4.1.6 (#1925)
13ab28c37 Bump subxt from `9e2acff` to `1c5faf3`
bb6171a05 Remove subxt dependency features (#1924)
66d200abb Verify with-parachain message benchmarks on CI (#1923)
b6af2116f Update BHR and BHW spec version (#1922)
d464e78d9 Fix benchmarks (#1919)
74574d53e fix master compilation (#1920)
1b373dff9 Fix multiple parachain headers submission for single message delivery (#1916)

git-subtree-dir: bridges
git-subtree-split: ce7cf9a4977fe614d35b6a7a84d5057e2c4ccaf5
  • Loading branch information
bkontur committed Mar 14, 2023
1 parent 5c29781 commit f6a606b
Show file tree
Hide file tree
Showing 105 changed files with 3,011 additions and 3,385 deletions.
2 changes: 1 addition & 1 deletion .config/lingua.dic
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ shouldn
source_at_target
source_latest_confirmed
source_latest_generated
sp_finality_grandpa
sp_consensus_grandpa
spawner
sr25519
src
Expand Down
51 changes: 45 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ stages:
- build
- publish
- publish-docker-description
- deploy

variables:
GIT_STRATEGY: fetch
Expand Down Expand Up @@ -77,6 +78,17 @@ default:
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
- if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"

.deploy-refs: &deploy-refs
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $SCHEDULED_JOB
when: never
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
when: manual
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]{4}-[0-9]{2}-[0-9]{2}.*$/ # i.e. v2021-09-27, v2021-09-27-1
when: manual

.nightly-test: &nightly-test
rules:
# 2. another is triggered by scripts repo $CI_PIPELINE_SOURCE == "pipeline" it's for the CI image
Expand Down Expand Up @@ -140,8 +152,9 @@ test:
# RUSTFLAGS: "-D warnings"
script: &test-script
- time cargo fetch
- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"`
- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"`
# Enable this, when you see: "`cargo metadata` can not fail on project `Cargo.toml`"
#- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"`
#- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"`
- CARGO_NET_OFFLINE=true SKIP_POLKADOT_RUNTIME_WASM_BUILD=1 SKIP_KUSAMA_RUNTIME_WASM_BUILD=1 SKIP_POLKADOT_TEST_RUNTIME_WASM_BUILD=1 time cargo test --verbose --workspace

test-nightly:
Expand Down Expand Up @@ -185,7 +198,8 @@ benchmarks-test:
<<: *docker-env
<<: *nightly-test
script:
- time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_messages --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096
- time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=RialtoMessages --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096
- time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=RialtoParachainMessages --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096
- time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_grandpa --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096
- time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_parachains --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096
- time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_relayers --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096
Expand All @@ -211,8 +225,9 @@ build:
# master
script: &build-script
- time cargo fetch
- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"`
- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"`
# Enable this, when you see: "`cargo metadata` can not fail on project `Cargo.toml`"
#- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"`
#- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"`
- CARGO_NET_OFFLINE=true SKIP_POLKADOT_RUNTIME_WASM_BUILD=1 SKIP_KUSAMA_RUNTIME_WASM_BUILD=1 SKIP_POLKADOT_TEST_RUNTIME_WASM_BUILD=1 time cargo build --release --verbose --workspace
after_script:
# Prepare artifacts
Expand Down Expand Up @@ -360,4 +375,28 @@ dockerhub-bridges-common-relay:
variables:
SHORT_DESCRIPTION: "bridges-common-relay"

# FIXME: publish binaries
# FIXME: publish binaries

deploy-bridges-common-relay-testnet:
<<: *deploy-refs
<<: *kubernetes-build
needs:
- job: bridges-common-relay
stage: deploy
image: argoproj/argocd:v2.5.5
environment: parity-testnet
variables:
ARGOCD_OPTS: --grpc-web --grpc-web-root-path /parity-testnet
APP: bridges-common-relay
before_script:
- if [[ "${CI_COMMIT_TAG}" ]]; then
VERSION=${CI_COMMIT_TAG};
elif [[ "${CI_COMMIT_REF_NAME}" ]]; then
VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed -r 's#/+#-#g');
fi
script:
- echo "Starting deploy version=${VERSION}"
- argocd app list
- argocd app set $APP --helm-set bridges-common-relay.image.tag=$VERSION
- argocd app sync $APP
- argocd app wait $APP --timeout 120
16 changes: 4 additions & 12 deletions .maintain/millau-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,10 @@ impl<T: frame_system::Config> WeightInfo for BridgeWeight<T> {
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
{{#if (ne benchmark.base_calculated_proof_size "0")}}
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{else}}
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{/if}}
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
Expand All @@ -91,7 +87,7 @@ impl<T: frame_system::Config> WeightInfo for BridgeWeight<T> {
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into()))
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
Expand All @@ -117,14 +113,10 @@ impl WeightInfo for () {
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
{{#if (ne benchmark.base_calculated_proof_size "0")}}
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{else}}
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{/if}}
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
Expand All @@ -139,7 +131,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into()))
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
Expand Down
Loading

0 comments on commit f6a606b

Please sign in to comment.