-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add overhead benchmark to frame-omni-bencher #5891
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
Merged
Merged
Changes from 47 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
4e63b65
Add overhead benchmark to frame-omni-bencher
skunert 61ead77
Add missing license
skunert 8cfa943
Change ExtrinsicBuilder parameter to function
skunert 8b0e4aa
Compilation fixes
skunert 2c5bb6b
Merge remote-tracking branch 'origin/master' into skunert/overhead-be…
skunert e514afb
Compilation Fixes
skunert fbc607e
Remove account generation
skunert b0327b1
Fixes
skunert dc2ab11
Allow to specify runtime_name
skunert 9b6103c
Merge branch 'master' into skunert/overhead-benchmark-again
skunert 32ec53a
PrDoc
skunert 7b3046a
Cleanup
skunert bda1bd1
Remove extrinsic_builder from omni-node-lib
skunert 77c6bc3
Add simple binary test
skunert 6d2067c
Add test to metadata fetching
skunert 88d3b69
Clean up metadata fetching
skunert 9b1886d
Add some more tests
skunert 8188eb9
Use correct proof size
skunert 1081bed
Merge branch 'master' into skunert/overhead-benchmark-again
skunert 170235e
Fmt
skunert 878c156
Apply suggestions from code review
skunert e3deba7
Reintroduce genesis state patching
skunert 2bae757
Intermediate state with state handler
skunert 272341f
Review comments
skunert 4871d44
Merge branch 'master' into skunert/overhead-benchmark-again
skunert a375b68
Review comments
skunert f8f0df4
Improve logging
skunert 0b7c3ea
Fix genesis patching, improve logs, improve tests
skunert 0b96826
PRDOC
skunert a4b989d
Add more integration tests
skunert 0cc2e85
Review comments
skunert 65ae2b2
Reinstate test
skunert a2286d8
Fix license issue
skunert 88812f4
Clap improvements
skunert 2a4726e
Fix all balances merge in cumulus-test-runtime
skunert fc944ac
Merge branch 'master' into skunert/overhead-benchmark-again
skunert 3aeef25
fmt
skunert 420a105
Taplo & Zepter
skunert e3afe94
Bring back `--dev`.
skunert 0ad7cd9
Apply suggestions from code review
skunert 8589d40
cmd -> command
skunert 2eaec10
Move measuring to closure, fix prdoc
skunert ddc1754
Move more validation back to code
skunert 4d1d8b9
Variant `none` should be allowed for runtimes in pallet
skunert ed08f4f
Slight API improvements
skunert f548ce6
prdoc improvements
skunert e1a1e7d
Merge branch 'master' into skunert/overhead-benchmark-again
skunert 9cab200
Update PRDOC Bumps
skunert 52458b8
Move remark builders to own file.
skunert 1858d9a
Merge branch 'master' into skunert/overhead-benchmark-again
skunert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| // Copyright (C) Parity Technologies (UK) Ltd. | ||
| // This file is part of Cumulus. | ||
|
|
||
| // Cumulus is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
|
|
||
| // Cumulus is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
|
|
||
| // You should have received a copy of the GNU General Public License | ||
| // along with Cumulus. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| use super::{ | ||
| AccountId, AuraConfig, AuraId, BalancesConfig, ParachainInfoConfig, RuntimeGenesisConfig, | ||
| SudoConfig, | ||
| }; | ||
| use alloc::{vec, vec::Vec}; | ||
|
|
||
| use cumulus_primitives_core::ParaId; | ||
| use frame_support::build_struct_json_patch; | ||
| use sp_genesis_builder::PresetId; | ||
| use sp_keyring::Sr25519Keyring; | ||
|
|
||
| fn cumulus_test_runtime( | ||
| invulnerables: Vec<AuraId>, | ||
| endowed_accounts: Vec<AccountId>, | ||
| id: ParaId, | ||
| ) -> serde_json::Value { | ||
| build_struct_json_patch!(RuntimeGenesisConfig { | ||
| balances: BalancesConfig { | ||
| balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), | ||
| }, | ||
| sudo: SudoConfig { key: Some(Sr25519Keyring::Alice.public().into()) }, | ||
| parachain_info: ParachainInfoConfig { parachain_id: id }, | ||
| aura: AuraConfig { authorities: invulnerables }, | ||
| }) | ||
| } | ||
|
|
||
| fn testnet_genesis_with_default_endowed(self_para_id: ParaId) -> serde_json::Value { | ||
| let endowed = Sr25519Keyring::well_known().map(|x| x.to_account_id()).collect::<Vec<_>>(); | ||
|
|
||
| let invulnerables = | ||
| Sr25519Keyring::invulnerable().map(|x| x.public().into()).collect::<Vec<_>>(); | ||
| cumulus_test_runtime(invulnerables, endowed, self_para_id) | ||
| } | ||
|
|
||
| /// List of supported presets. | ||
| pub fn preset_names() -> Vec<PresetId> { | ||
| vec![ | ||
| PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET), | ||
| PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET), | ||
| ] | ||
| } | ||
|
|
||
| /// Provides the JSON representation of predefined genesis config for given `id`. | ||
| pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> { | ||
| let patch = match id.try_into() { | ||
| Ok(sp_genesis_builder::DEV_RUNTIME_PRESET) | | ||
| Ok(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET) => | ||
| testnet_genesis_with_default_endowed(100.into()), | ||
| _ => return None, | ||
| }; | ||
| Some( | ||
| serde_json::to_string(&patch) | ||
| .expect("serialization to json is expected to work. qed.") | ||
| .into_bytes(), | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.