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

client: add WebRTC transport #2

Closed
wants to merge 162 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
f793dad
client: add WebRTC transport
melekes Jun 30, 2022
1e6f631
put webrtc certificate within base, not network config directory
melekes Nov 22, 2022
18ead61
Fix pallet's integration (#13056)
jsidorenko Jan 4, 2023
2967726
Disallow burning externally locked nfts (#13054)
jsidorenko Jan 4, 2023
d1fe09c
Allow to clear attributes via traits (#13055)
jsidorenko Jan 4, 2023
a052224
Selectable on-runtime-upgrade checks (#13045)
ggwpez Jan 4, 2023
da3a34f
grandpa: pass the actual best block to voting rules (#12477)
andresilva Jan 4, 2023
68fc275
Remove `Copy` from `Ensure*` traits (#13043)
ggwpez Jan 4, 2023
ea387c6
Aura: Do not verify on state import (#13058)
bkchr Jan 4, 2023
05fe10b
upgrade libp2p to 0.50.0 (#12734)
melekes Jan 5, 2023
fb22096
grandpa: remove deprecated afg log target (#13064)
andresilva Jan 5, 2023
6376f13
Return `RuntimeVersion` of overwritten/substituted wasm binary (#13066)
bkchr Jan 5, 2023
e4a4436
aura: remove stale check to skip execution (#13074)
andresilva Jan 5, 2023
934d42a
Kademlia: Speed-up the record fetching (#13081)
bkchr Jan 5, 2023
8d17a16
[contracts] Add docs generator for the contracts API to the `#[define…
agryaznov Jan 5, 2023
bc73ebf
Update trybuild to avoid random test failures. (#13073)
hirschenberger Jan 6, 2023
363ce0a
Do not leak records (#13086)
bkchr Jan 6, 2023
90ffe71
Only use `substrate-wasm-builder` when `std` feature is enabled. (#12…
nazar-pc Jan 6, 2023
4692572
grandpa: bump version to v0.16.1 (#13080)
andresilva Jan 6, 2023
19da111
Remove unused finalization_displaced variable in db (#13090)
skunert Jan 6, 2023
e7814a3
Remove unused types (#13091)
ggwpez Jan 7, 2023
5cbd126
Run `frame_system` integrity tests in Externalities (#13092)
ggwpez Jan 8, 2023
911f65b
add note on usage of twox hash (#13089)
Ank4n Jan 9, 2023
f31588b
Remove unused code in state-db (#13103)
skunert Jan 9, 2023
6c7e941
EPM and staking events improvement (#13035)
gpestana Jan 9, 2023
dc18d13
CI: configure `cargo-nextest`'s reporter options explicitly (#13104)
rcny Jan 9, 2023
b85246b
Add ensure_pow method (#13042)
lemunozm Jan 9, 2023
27ef639
Merge branch 'master' into anton/webrtc-transport
melekes Jan 10, 2023
a955481
fixes after the merge
melekes Jan 10, 2023
82fd633
fix docs
melekes Jan 10, 2023
75d10c7
Add solution hint to error message (#13111)
Jan 10, 2023
4e38342
Avoid unintentionally canceling the scheduled crate publishing job (#…
joao-paulo-parity Jan 10, 2023
ad844be
introduce log-target constant to more frame pallets (#13116)
tonyalaribe Jan 10, 2023
cb63d3d
Update tests for 1.66 and switch CI to stable Rust 1.66 (#13118)
rcny Jan 10, 2023
c6eb8c8
better vars names in tests
melekes Jan 11, 2023
f964453
Merge branch 'master' into anton/webrtc-transport
melekes Jan 11, 2023
0db37d0
always give preference to tcp transport
melekes Jan 11, 2023
946507b
remove update-node-template (#13100)
joao-paulo-parity Jan 11, 2023
2c029fd
Allow duplicate topics in smart contract events (#13065)
xgreenx Jan 11, 2023
293c1f2
[NFTs] Track item's metadata depositor (#13124)
jsidorenko Jan 11, 2023
e752af1
`IntegrityTest` implementation should be feature gated (#13094)
bkchr Jan 11, 2023
ad58606
Bump git2 from 0.14.4 to 0.16.0 (#13123)
dependabot[bot] Jan 11, 2023
6d3596f
Scheduler is already at V4 (#13105)
ggwpez Jan 11, 2023
f9d1dcd
Optimize merkle proofs for efficient verification in Solidity (#12857)
doubledup Jan 12, 2023
e9b0fac
client/beefy: fix logs (#13130)
acatangiu Jan 12, 2023
2bfc1dd
Stop keeping track of epoch changes for the sync gap (#13127)
davxy Jan 12, 2023
d92281a
CI: Unpin `ci-linux` and use Rust 1.66.1 (#13134)
rcny Jan 13, 2023
88be4b6
sp-beefy: align authority id key type with its signature type (#13131)
acatangiu Jan 13, 2023
cbc525f
Use the balance trait as we have one (#13136)
gilescope Jan 13, 2023
30641ee
CI: Code mark to request a pipeline failure (#13139)
rcny Jan 13, 2023
49962f7
Annotate thiserror for sp_core::crypto::SecretStringError (#13144)
jasl Jan 15, 2023
70f2e36
pallet-offences-benchmarking: Box events in verify (#13151)
bkchr Jan 16, 2023
ea00240
More improvements for the crate publishing pipeline (#13153)
joao-paulo-parity Jan 16, 2023
7ff6fa2
txpool: don't maintain the pool during major sync (#13004)
michalkucharczyk Jan 16, 2023
2893730
[client/network] Add support for `/wss` addresses (#13152)
melekes Jan 17, 2023
b7070e0
Merge branch 'master' into anton/webrtc-transport
melekes Jan 17, 2023
6bac243
NIS should retain funds in reserve (#12928)
gavofyork Jan 17, 2023
414caff
Refactory of `next_slot` method (#13155)
davxy Jan 17, 2023
f7e53fe
Breakout mock runtimes to separate files (#13150)
gilescope Jan 17, 2023
42f38db
frame-benchmarking: Macros should not force a particular env (#13161)
bkchr Jan 17, 2023
cfe9262
Fix the `storage_size`/`state_getStorageSize` RPC call (#13154)
koute Jan 18, 2023
a447f03
[contracts] Adapt storage reading host functions to Weights V2 (#12976)
agryaznov Jan 18, 2023
af5a499
zobmienet tests are not supposed to fail (#13015)
michalkucharczyk Jan 18, 2023
cba5977
[contracts] Add integrity checks by pallet hook (#12993)
agryaznov Jan 18, 2023
911c9ab
Expose `UnknownBlock` error via `ApiError` (#12707)
tdimitrov Jan 19, 2023
d4384f2
Notification-based block pinning (#13157)
skunert Jan 19, 2023
0b6aec5
Make DispatchError impl MEL (#13169)
gavofyork Jan 19, 2023
b85d631
Remove fixtures from crate (#13181)
athei Jan 19, 2023
d7acf9e
txpool: LOG_TARGET const added (#13180)
michalkucharczyk Jan 19, 2023
de943ee
Fix potential huge allocation as a result of `validate_block` output …
mrcnski Jan 20, 2023
593c76b
sc-network: Ensure private addresses are disabled if requested (#13185)
bkchr Jan 20, 2023
38ec2d8
Warn validators with slow hardware (#12620)
Szegoo Jan 20, 2023
2c16842
Use year 2023 in the License headers (#13193)
ggwpez Jan 20, 2023
355e4a9
Move slow hardware warning print logic to CLI (#13198)
ggwpez Jan 21, 2023
79cb2e6
Fix flaky BABE test (#13199)
bkchr Jan 21, 2023
1f70226
Add debug info in assert_has_event and assert_last_event (#12979)
zjb0807 Jan 22, 2023
ed3f055
new proc-macro-based benchmarking syntax (#12924)
sam0x17 Jan 23, 2023
d0a2c4a
Rename `*-private-ipv4` to `*-private-ip` CLI args (#13208)
bkchr Jan 23, 2023
e72f72f
Remove dead code (#13213)
koute Jan 23, 2023
419b840
[Fix] CountedMap::set now takes Counter into account (#13214)
ruseinov Jan 23, 2023
52d72b3
debug assert events at genesis (#13217)
muharem Jan 23, 2023
9052607
BlockId removal: refactor: CallExecutor trait (#13173)
michalkucharczyk Jan 24, 2023
ca5a505
service: storage monitor added (#13082)
michalkucharczyk Jan 24, 2023
84af672
beefy: Add LOG_TARGET constant (#13222)
al3mart Jan 24, 2023
09de7b4
Upgrade wasm-opt to 0.111.0 (#13038)
brson Jan 24, 2023
5749760
storage-monitor: statvfs arithmetic bug fixed (#13234)
michalkucharczyk Jan 24, 2023
d2afb5d
Bump parity-db (#13226)
arkpar Jan 24, 2023
1314eec
pallet-assets: Rename `total_supply` to `amount` (#13229)
bkchr Jan 25, 2023
e393874
Babe: bad epoch index with skipped epochs and warp sync (#13135)
davxy Jan 25, 2023
1a1600b
contracts: Deprecate random interface (#13204)
athei Jan 25, 2023
d74eab8
[contracts] Add upfront weight of merkle trie proofs for storage read…
agryaznov Jan 25, 2023
d22e68c
CI: Rewrite `check-each-crate` in python (#13238)
bkchr Jan 25, 2023
d029225
Fix try-runtime with create-snapshot (#13223)
zjb0807 Jan 25, 2023
8b4331c
reduce exec time of fast-unstake benchmarks (#13120)
kianenigma Jan 25, 2023
9db957c
Rework the trie cache (#12982)
koute Jan 26, 2023
64a1a36
Add task type label to metrics (#13240)
sandreim Jan 26, 2023
05238ab
Merge branch 'master' into anton/webrtc-transport
melekes Jan 26, 2023
2f404a4
use udp protocol, not tcp for webrtc
melekes Jan 26, 2023
f4bc993
upgrade nix to 0.26.1 (#13230)
michalkucharczyk Jan 26, 2023
05fb813
copy warp-sync zombienet test
melekes Jan 26, 2023
ce05840
rename test files
melekes Jan 26, 2023
f929b72
update test name
melekes Jan 26, 2023
7781776
remove generate-warp-sync-database from webrtc test
melekes Jan 26, 2023
2dbf625
Add WeightToFee and LengthToFee impls to transaction-payment Runtime …
notlesh Jan 26, 2023
495cc0e
Correct arithmetical semantic of `PerDispatchClass` (#13194)
ggwpez Jan 26, 2023
65d1d03
Aura: Fix warp syncing (#13221)
bkchr Jan 26, 2023
ff9921a
Add Proof Size to Weight Output (#11637)
shawntabrizi Jan 26, 2023
248fdf0
Use non-binary pronouns in comments. (#13209)
DanHenton Jan 27, 2023
1e153d2
change listen addr in zombienet tests
melekes Jan 27, 2023
ce2cee3
migrate new benchmarking syntax from `frame_support::benchmarking` to…
sam0x17 Jan 27, 2023
9762613
mutate_exists for StorageValue with ValueQuery (#13245)
muraca Jan 27, 2023
1e6b892
Fix derive PassByInner with generics (#13247)
conr2d Jan 28, 2023
ece32a7
docs: Fix broken documentation links for pallets (#13241)
Jonathas-Conceicao Jan 28, 2023
0100b3b
sc-finality-grandpa: Warp proof generation can not expect justificati…
bkchr Jan 28, 2023
6c11190
update criterion to v0.4.0 (#13142)
koushiro Jan 28, 2023
f4caddb
fix up template (#13205)
shawntabrizi Jan 29, 2023
fdff2b2
Remove `uncles` related code (#13216)
bkchr Jan 29, 2023
a9c4334
Implement RIType traits for u8 array with an arbitrary size (#13256)
conr2d Jan 30, 2023
dcd00f4
Apply suggestions from code review
melekes Jan 30, 2023
1c7a375
bump zombienet version
melekes Jan 30, 2023
129fee7
grandpa: cleanup stale entries in set id session mapping (#13237)
andresilva Jan 30, 2023
8cfe326
Benchmark's successful origin api update (#13146)
muharem Feb 1, 2023
c4b2db5
hooks default impl missing where clause (#13264)
kianenigma Feb 1, 2023
b2b2e65
implemented `contains_prefix` for StorageDoubleMap and StorageNMap (#…
muraca Feb 1, 2023
3bc3742
Calling proxy doesn't remove announcement (#13267)
Szegoo Feb 1, 2023
68d00e2
Fee and tip represented as asset ID inside `AssetTxFeePaid` (#13083)
Szegoo Feb 2, 2023
5d0867c
Move beefy-merkle-tree to utils/binary-merkle-tree and make it generi…
DaviRain-Su Feb 2, 2023
a69a08e
Metadata V15: Derive `TypeInfo` for describing runtime types (#13272)
lexnv Feb 2, 2023
9c00c90
benchmarks: EnsureRankedMember must add ranked members (#13297)
ggwpez Feb 2, 2023
83de509
Minor: Update output validity tests (#13190)
mrcnski Feb 2, 2023
1d67b0f
BEEFY: define on-chain beefy-genesis and use it to coordinate voter i…
acatangiu Feb 3, 2023
12823c2
feat: add event SkepticsChosen event in society (#13291)
gitofdeepanshu Feb 3, 2023
09ae0e0
feat(client): significantly increase wasm instance limits (#13298)
hussein-aitlahcen Feb 3, 2023
8186c51
Remove in-tree bounded types and use bounded-collections crate (#13243)
KiChjang Feb 3, 2023
dfc9223
update linregress in frame-benchmarking to 0.5.1 (#13310)
sam0x17 Feb 5, 2023
727b487
Merge branch 'master' into anton/webrtc-transport
melekes Feb 6, 2023
550e6a1
[client/network] remove peer entry from `ephemeral_addresses` (#13084)
melekes Feb 6, 2023
f5e370d
rpc-spec-v2/tx: Fix error typo (#13307)
lexnv Feb 6, 2023
51cf2e7
BEEFY: client support for detecting equivocated votes (#13285)
acatangiu Feb 6, 2023
47ecdb6
Bump `wasmtime` to 5.0.0 (and a few other deps) (#13160)
koute Feb 6, 2023
fe7f0a9
Fix: Off-chain-worker example (#13300)
cuteolaf Feb 6, 2023
dd4497d
Rename `pallet-random-collective-flip` to Insecure... (#13301)
ggwpez Feb 6, 2023
41ae908
`zombienet`: warp-sync tests for validators (#13078)
michalkucharczyk Feb 7, 2023
3d60070
Disable default features for `strum` (#13326)
koute Feb 7, 2023
b549d2b
Update zombienet version.
pepoviola Feb 7, 2023
38c3e5e
Fix block pruning (#13323)
arkpar Feb 7, 2023
35b971a
Merge branch 'master' into anton/webrtc-transport
melekes Feb 8, 2023
2f16448
Referendum proposal's metadata (#12568)
muharem Feb 8, 2023
2a636e2
Improve test coverage of the `Notifications` protocol (#13033)
altonen Feb 8, 2023
6a504b0
Configurable voting-degree in council elections pallet (#13305)
kianenigma Feb 8, 2023
6f72780
Rework generated API docs (#13178)
athei Feb 8, 2023
0d611e0
pallet-scheduler: Ensure we request a preimage (#13340)
bkchr Feb 9, 2023
2ced413
[Fix] Try-state feature-gated for BagsList (#13296)
ruseinov Feb 9, 2023
6e9c7ea
Update zombienet/0004-webrtc/test-webrtc.toml
pepoviola Feb 10, 2023
4516910
Update zombienet/0004-webrtc/test-webrtc.toml
pepoviola Feb 10, 2023
41fc433
Update zombienet/0004-webrtc/test-webrtc.toml
pepoviola Feb 10, 2023
722ccad
Update .gitlab-ci.yml
pepoviola Feb 10, 2023
21d58f6
bump version of zombienet and update snaps links (#13359)
pepoviola Feb 10, 2023
ccd768f
Fix longest chain finalization target lookup (#13289)
davxy Feb 11, 2023
11bd6cd
SetMembers configurable origin (#13159)
girazoki Feb 12, 2023
be72387
bump version of zombienet and update snaps links (#13359)
pepoviola Feb 10, 2023
22c1a15
Merge branch 'master' into anton/webrtc-transport
melekes Feb 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
73 changes: 60 additions & 13 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,34 @@ variables:
RUSTY_CACHIER_SINGLE_BRANCH: master
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
RUSTY_CACHIER_COMPRESSION_METHOD: zstd
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.22"
NEXTEST_FAILURE_OUTPUT: immediate-final
NEXTEST_SUCCESS_OUTPUT: final
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.34"

default:
.shared-default: &shared-default
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
interruptible: true
cache: {}

.default-pipeline-definitions:
default:
<<: *shared-default
interruptible: true

.crate-publishing-pipeline-definitions:
default:
<<: *shared-default
# The crate-publishing pipeline defaults to `interruptible: false` so that we'll be able to
# reach and run the publishing jobs despite the "Auto-cancel redundant pipelines" CI setting.
# The setting is relevant because the crate-publishing pipeline runs on `master`, thus future
# pipelines on `master` (e.g. created for new commits or other schedules) might unintendedly
# cancel the publishing jobs or its dependencies before we get to actually publish the crates.
interruptible: false

.collect-artifacts:
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
Expand Down Expand Up @@ -213,13 +229,21 @@ default:
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"

.scheduled-crate-publishing-pipeline:
.crates-publishing-variables:
variables:
CRATESIO_CRATES_OWNER: parity-crate-owner
REPO: substrate
REPO_OWNER: paritytech

.crates-publishing-pipeline:
extends: .crates-publishing-variables
rules:
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "automatic-crate-publishing"
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "master" && $PIPELINE == "automatic-crate-publishing"

.crates-publishing-template:
stage: test
extends: .docker-env
extends:
- .docker-env
- .crates-publishing-variables
# collect artifacts even on failure so that we know how the crates were generated (they'll be
# generated to the artifacts folder according to SPUB_TMP further down)
artifacts:
Expand All @@ -229,12 +253,7 @@ default:
paths:
- artifacts/
variables:
CRATESIO_API: https://crates.io/api
CRATESIO_CRATES_OWNER: parity-crate-owner
GH_API: https://api.github.com
REPO: substrate
REPO_OWNER: paritytech
SPUB_TMP: artifacts
SPUB_TMP: artifacts

#### stage: .pre

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

check-crates-publishing-pipeline:
stage: .pre
extends:
- .kubernetes-env
- .crates-publishing-pipeline
script:
- git clone
--depth 1
--branch "$RELENG_SCRIPTS_BRANCH"
https://github.com/paritytech/releng-scripts.git
- ONLY_CHECK_PIPELINE=true ./releng-scripts/publish-crates

include:
# check jobs
- scripts/ci/gitlab/pipeline/check.yml
Expand All @@ -263,6 +294,22 @@ include:
- scripts/ci/gitlab/pipeline/publish.yml
# zombienet jobs
- scripts/ci/gitlab/pipeline/zombienet.yml
# The crate-publishing pipeline requires a customized `interruptible` configuration. Unfortunately
# `interruptible` can't currently be dynamically set based on variables as per:
# - https://gitlab.com/gitlab-org/gitlab/-/issues/38349
# - https://gitlab.com/gitlab-org/gitlab/-/issues/194023
# Thus we work around that limitation by using conditional includes.
# For crate-publishing pipelines: run it with defaults + `interruptible: false`. The WHOLE
# pipeline is made uninterruptible to ensure that test jobs also get a chance to run to
# completion, because the publishing jobs depends on them AS INTENDED: crates should not be
# published before their source code is checked.
- local: scripts/ci/gitlab/crate-publishing-pipeline.yml
rules:
- if: $PIPELINE == "automatic-crate-publishing"
# For normal pipelines: run it with defaults + `interruptible: true`
- local: scripts/ci/gitlab/default-pipeline.yml
rules:
- if: $PIPELINE != "automatic-crate-publishing"

#### stage: deploy

Expand Down
35 changes: 28 additions & 7 deletions .maintain/frame-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//! Autogenerated weights for {{pallet}}
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}

Expand Down Expand Up @@ -38,7 +39,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
{{/if}}
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
/// {{comment}}
{{/each}}
{{#each benchmark.component_ranges as |range|}}
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
Expand All @@ -48,24 +49,34 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
// Proof Size summary in bytes:
// 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()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.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()))
{{/each}}
}
{{/each}}
}
Expand All @@ -74,7 +85,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
impl WeightInfo for () {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
/// {{comment}}
{{/each}}
{{#each benchmark.component_ranges as |range|}}
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
Expand All @@ -84,24 +95,34 @@ impl WeightInfo for () {
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
// Proof Size summary in bytes:
// 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()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}))
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}))
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}_u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.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()))
{{/each}}
}
{{/each}}
}
Loading