-
Notifications
You must be signed in to change notification settings - Fork 69
Polkadot v1.6.0 upgrade #413
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 all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
9ab7d7c
Simple template compiles
3ef4d8f
Simple template cleanup
d8c9bcd
Simple template chainspec
ac5fea8
Complete build green
35cf56c
fmt
e2c616b
Fix deps
0f3297b
Tests builds
fc012bb
impl GenesisBuilder
07b1d11
Updated polkadot-sdk commit
e32171e
Missing deps
766140f
Unit tests ok!
8b1003f
bring serde regardless of std feature
girazoki fea9133
api-augment
0ee0a6e
Fix container chain chain spec using set_storage
tmpolaczyk bbcbecc
Merge branch 'master' into fg/polkadot-v1.6.0
36274a4
Merge branch 'master' into fg/polkadot-v1.6.0
d9e272a
Fix frontier node and identity tests
9125148
Fix xcm tests for message queue
1121930
use build_storage from emulated_integration_tests
girazoki 98ec012
Merge branch 'master' into fg/polkadot-v1.6.0
d027f6c
fmt
e44ca0f
Update moonkit ref
1b75b68
try-runtime builds
ce7ae5c
Ts lint
30fd8cd
toml maid
f35ea5d
merge
girazoki fdc1a26
fix runtime-benchmarks compilation
girazoki 8e3ece1
try-runtime to pallet-balances
girazoki e1ea242
XcmpQueue migrations
33f74cd
Migrations
e4c461f
try-runtime
e59d5cb
zepter
a66e937
toml-maid
4dfe83e
Review
bb99085
Merge remote-tracking branch 'origin/master' into fg/polkadot-v1.6.0
d5f17a5
try runtime subcommand
e6ba443
MessageQueueServiceWeight to 25%
b60d095
Unused import
017af80
Fix clippy
9e058e4
increase sleep time for first block in parathread
girazoki c2fe33c
be a bit more mindful about times in parachains
girazoki 98fd437
increment even more timeout
girazoki 4b534dc
Formatting and API augment
34f4c04
Update forks refs
c538141
Merge branch 'master' into fg/polkadot-v1.6.0
2e91399
Increase grcov version in coverage
e412943
Remove ignores from coverage
917d08a
Remove ignores from coverage
996d4a8
Revert coverage changes
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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,58 @@ | ||
| // Copyright (C) Moondance Labs Ltd. | ||
| // This file is part of Tanssi. | ||
|
|
||
| // Tanssi 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. | ||
|
|
||
| // Tanssi 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 Tanssi. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| use parity_scale_codec::Encode; | ||
| use sc_chain_spec::ChainSpec; | ||
| use sp_runtime::{ | ||
| traits::{Block as BlockT, Hash as HashT, Header as HeaderT, Zero}, | ||
| StateVersion, | ||
| }; | ||
|
|
||
| /// Generate the genesis block from a given ChainSpec. | ||
| pub fn generate_genesis_block<Block: BlockT>( | ||
| chain_spec: &dyn ChainSpec, | ||
| genesis_state_version: StateVersion, | ||
| ) -> Result<Block, String> { | ||
| let storage = chain_spec.build_storage()?; | ||
|
|
||
| let child_roots = storage.children_default.iter().map(|(sk, child_content)| { | ||
| let state_root = <<<Block as BlockT>::Header as HeaderT>::Hashing as HashT>::trie_root( | ||
| child_content.data.clone().into_iter().collect(), | ||
| genesis_state_version, | ||
| ); | ||
| (sk.clone(), state_root.encode()) | ||
| }); | ||
| let state_root = <<<Block as BlockT>::Header as HeaderT>::Hashing as HashT>::trie_root( | ||
| storage.top.clone().into_iter().chain(child_roots).collect(), | ||
| genesis_state_version, | ||
| ); | ||
|
|
||
| let extrinsics_root = <<<Block as BlockT>::Header as HeaderT>::Hashing as HashT>::trie_root( | ||
| Vec::new(), | ||
| genesis_state_version, | ||
| ); | ||
|
|
||
| Ok(Block::new( | ||
| <<Block as BlockT>::Header as HeaderT>::new( | ||
| Zero::zero(), | ||
| extrinsics_root, | ||
| state_root, | ||
| Default::default(), | ||
| Default::default(), | ||
| ), | ||
| Default::default(), | ||
| )) | ||
| } |
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 |
|---|---|---|
|
|
@@ -15,3 +15,5 @@ | |
| // along with Tanssi. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| pub mod service; | ||
|
|
||
| pub mod command; | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn it, I hate that they keep changing this part of the code