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

Commit 7f0a8b1

Browse files
committed
Merge branch 'master' into counted-double-map
2 parents a781be2 + 21d58f6 commit 7f0a8b1

File tree

634 files changed

+38651
-24150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

634 files changed

+38651
-24150
lines changed

.gitlab-ci.yml

Lines changed: 60 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,34 @@ variables:
5353
RUSTY_CACHIER_SINGLE_BRANCH: master
5454
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
5555
RUSTY_CACHIER_COMPRESSION_METHOD: zstd
56-
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.22"
56+
NEXTEST_FAILURE_OUTPUT: immediate-final
57+
NEXTEST_SUCCESS_OUTPUT: final
58+
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.34"
5759

58-
default:
60+
.shared-default: &shared-default
5961
retry:
6062
max: 2
6163
when:
6264
- runner_system_failure
6365
- unknown_failure
6466
- api_failure
65-
interruptible: true
6667
cache: {}
6768

69+
.default-pipeline-definitions:
70+
default:
71+
<<: *shared-default
72+
interruptible: true
73+
74+
.crate-publishing-pipeline-definitions:
75+
default:
76+
<<: *shared-default
77+
# The crate-publishing pipeline defaults to `interruptible: false` so that we'll be able to
78+
# reach and run the publishing jobs despite the "Auto-cancel redundant pipelines" CI setting.
79+
# The setting is relevant because the crate-publishing pipeline runs on `master`, thus future
80+
# pipelines on `master` (e.g. created for new commits or other schedules) might unintendedly
81+
# cancel the publishing jobs or its dependencies before we get to actually publish the crates.
82+
interruptible: false
83+
6884
.collect-artifacts:
6985
artifacts:
7086
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
@@ -213,13 +229,21 @@ default:
213229
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
214230
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"
215231

216-
.scheduled-crate-publishing-pipeline:
232+
.crates-publishing-variables:
233+
variables:
234+
CRATESIO_CRATES_OWNER: parity-crate-owner
235+
REPO: substrate
236+
REPO_OWNER: paritytech
237+
238+
.crates-publishing-pipeline:
239+
extends: .crates-publishing-variables
217240
rules:
218-
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "automatic-crate-publishing"
241+
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "master" && $PIPELINE == "automatic-crate-publishing"
219242

220243
.crates-publishing-template:
221-
stage: test
222-
extends: .docker-env
244+
extends:
245+
- .docker-env
246+
- .crates-publishing-variables
223247
# collect artifacts even on failure so that we know how the crates were generated (they'll be
224248
# generated to the artifacts folder according to SPUB_TMP further down)
225249
artifacts:
@@ -229,12 +253,7 @@ default:
229253
paths:
230254
- artifacts/
231255
variables:
232-
CRATESIO_API: https://crates.io/api
233-
CRATESIO_CRATES_OWNER: parity-crate-owner
234-
GH_API: https://api.github.com
235-
REPO: substrate
236-
REPO_OWNER: paritytech
237-
SPUB_TMP: artifacts
256+
SPUB_TMP: artifacts
238257

239258
#### stage: .pre
240259

@@ -252,6 +271,18 @@ skip-if-draft:
252271
- ./scripts/ci/gitlab/skip_if_draft.sh
253272
allow_failure: true
254273

274+
check-crates-publishing-pipeline:
275+
stage: .pre
276+
extends:
277+
- .kubernetes-env
278+
- .crates-publishing-pipeline
279+
script:
280+
- git clone
281+
--depth 1
282+
--branch "$RELENG_SCRIPTS_BRANCH"
283+
https://github.com/paritytech/releng-scripts.git
284+
- ONLY_CHECK_PIPELINE=true ./releng-scripts/publish-crates
285+
255286
include:
256287
# check jobs
257288
- scripts/ci/gitlab/pipeline/check.yml
@@ -263,6 +294,22 @@ include:
263294
- scripts/ci/gitlab/pipeline/publish.yml
264295
# zombienet jobs
265296
- scripts/ci/gitlab/pipeline/zombienet.yml
297+
# The crate-publishing pipeline requires a customized `interruptible` configuration. Unfortunately
298+
# `interruptible` can't currently be dynamically set based on variables as per:
299+
# - https://gitlab.com/gitlab-org/gitlab/-/issues/38349
300+
# - https://gitlab.com/gitlab-org/gitlab/-/issues/194023
301+
# Thus we work around that limitation by using conditional includes.
302+
# For crate-publishing pipelines: run it with defaults + `interruptible: false`. The WHOLE
303+
# pipeline is made uninterruptible to ensure that test jobs also get a chance to run to
304+
# completion, because the publishing jobs depends on them AS INTENDED: crates should not be
305+
# published before their source code is checked.
306+
- local: scripts/ci/gitlab/crate-publishing-pipeline.yml
307+
rules:
308+
- if: $PIPELINE == "automatic-crate-publishing"
309+
# For normal pipelines: run it with defaults + `interruptible: true`
310+
- local: scripts/ci/gitlab/default-pipeline.yml
311+
rules:
312+
- if: $PIPELINE != "automatic-crate-publishing"
266313

267314
#### stage: deploy
268315

.maintain/frame-weight-template.hbs

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//! Autogenerated weights for {{pallet}}
33
//!
44
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
5-
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
5+
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
6+
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
67
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
78
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
89

@@ -38,7 +39,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
3839
{{/if}}
3940
{{#each benchmarks as |benchmark|}}
4041
{{#each benchmark.comments as |comment|}}
41-
// {{comment}}
42+
/// {{comment}}
4243
{{/each}}
4344
{{#each benchmark.component_ranges as |range|}}
4445
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
@@ -48,24 +49,34 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
4849
{{~#each benchmark.components as |c| ~}}
4950
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
5051
) -> Weight {
52+
// Proof Size summary in bytes:
53+
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
54+
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
5155
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
56+
{{#if (ne benchmark.base_calculated_proof_size "0")}}
57+
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
58+
{{else}}
5259
Weight::from_ref_time({{underscore benchmark.base_weight}})
60+
{{/if}}
5361
{{#each benchmark.component_weight as |cw|}}
5462
// Standard Error: {{underscore cw.error}}
5563
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
5664
{{/each}}
5765
{{#if (ne benchmark.base_reads "0")}}
58-
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
66+
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
5967
{{/if}}
6068
{{#each benchmark.component_reads as |cr|}}
6169
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
6270
{{/each}}
6371
{{#if (ne benchmark.base_writes "0")}}
64-
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
72+
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
6573
{{/if}}
6674
{{#each benchmark.component_writes as |cw|}}
6775
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
6876
{{/each}}
77+
{{#each benchmark.component_calculated_proof_size as |cp|}}
78+
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into()))
79+
{{/each}}
6980
}
7081
{{/each}}
7182
}
@@ -74,7 +85,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
7485
impl WeightInfo for () {
7586
{{#each benchmarks as |benchmark|}}
7687
{{#each benchmark.comments as |comment|}}
77-
// {{comment}}
88+
/// {{comment}}
7889
{{/each}}
7990
{{#each benchmark.component_ranges as |range|}}
8091
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
@@ -84,24 +95,34 @@ impl WeightInfo for () {
8495
{{~#each benchmark.components as |c| ~}}
8596
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
8697
) -> Weight {
98+
// Proof Size summary in bytes:
99+
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
100+
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
87101
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
102+
{{#if (ne benchmark.base_calculated_proof_size "0")}}
103+
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
104+
{{else}}
88105
Weight::from_ref_time({{underscore benchmark.base_weight}})
106+
{{/if}}
89107
{{#each benchmark.component_weight as |cw|}}
90108
// Standard Error: {{underscore cw.error}}
91109
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
92110
{{/each}}
93111
{{#if (ne benchmark.base_reads "0")}}
94-
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}))
112+
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
95113
{{/if}}
96114
{{#each benchmark.component_reads as |cr|}}
97115
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
98116
{{/each}}
99117
{{#if (ne benchmark.base_writes "0")}}
100-
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}))
118+
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}_u64))
101119
{{/if}}
102120
{{#each benchmark.component_writes as |cw|}}
103121
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
104122
{{/each}}
123+
{{#each benchmark.component_calculated_proof_size as |cp|}}
124+
.saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into()))
125+
{{/each}}
105126
}
106127
{{/each}}
107128
}

0 commit comments

Comments
 (0)