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

Rename ExportGenesisStateCommand to ExportGenesisHeadCommand and make it respect custom genesis block builders #2331

Merged
merged 53 commits into from
Dec 13, 2023

Conversation

JoshOrndorff
Copy link
Contributor

@JoshOrndorff JoshOrndorff commented Nov 14, 2023

Closes #2326.

This PR both fixes a logic bug and replaces an incorrect name.

Bug Fix: Respecting custom genesis builder

Prior to this PR the standard logic for creating a genesis block was repeated inside of cumulus. This PR removes that duplicated logic, and calls into the proper BuildGenesisBlock implementation.

One consequence is that if the genesis block has already been initialized, it will not be re-created, but rather read from the database like it is for other node invocations. So you need to watch out for old unpurged data during the development process. Offchain tools may need to be updated accordingly. I've already filed paritytech/zombienet#1519

Rename: It doesn't export state. It exports head data.

The name export-genesis-state was always wrong, nad it's never too late to right a wrong. I've changed the name of the struct to ExportGenesisHeadCommand.

There is still the question of what to do with individual nodes' public CLIs. I have updated the parachain template to a reasonable default that preserves compatibility with tools that will expect export-genesis-state to still work. And I've chosen not to modify the public CLIs of any other nodes in the repo. I'll leave it up to their individual owners/maintains to decide whether that is appropriate.

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good.

@JoshOrndorff JoshOrndorff changed the title Attempt to Fix ExportGenesisState RenameExportGenesisStateCommand to ExportGenesisHead and make it respect custom genesis block builders Nov 16, 2023
@JoshOrndorff JoshOrndorff changed the title RenameExportGenesisStateCommand to ExportGenesisHead and make it respect custom genesis block builders Rename ExportGenesisStateCommand to ExportGenesisHeadCommand and make it respect custom genesis block builders Nov 16, 2023
@JoshOrndorff
Copy link
Contributor Author

@skunert I've made the change you requested and merged master. Sorry about the hold up, I lost track of this one.

@bkchr bkchr enabled auto-merge (squash) December 13, 2023 08:29
@bkchr bkchr merged commit 8683bbe into paritytech:master Dec 13, 2023
114 of 116 checks passed
@JoshOrndorff
Copy link
Contributor Author

Thank you for your help getting this across the line 🙏

github-merge-queue bot pushed a commit that referenced this pull request Jan 11, 2024
closes #2567 

Followup for #2331

This PR contains multiple internal cleanups:

1. This gets rid of the functionality in `generate_genesis_block` which
was only used in one benchmark
2. Fixed `transaction_pool` and `transaction_throughput` benchmarks
failing since they require a tokio runtime now.
3. Removed `parachain_id` CLI option from the test parachain
4. Removed `expect` call from `RuntimeResolver`
@Polkadot-Forum
Copy link

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/5855/1

bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
closes paritytech#2567 

Followup for paritytech#2331

This PR contains multiple internal cleanups:

1. This gets rid of the functionality in `generate_genesis_block` which
was only used in one benchmark
2. Fixed `transaction_pool` and `transaction_throughput` benchmarks
failing since they require a tokio runtime now.
3. Removed `parachain_id` CLI option from the test parachain
4. Removed `expect` call from `RuntimeResolver`
AurevoirXavier added a commit to darwinia-network/darwinia that referenced this pull request Jun 24, 2024
enddynayn added a commit to frequency-chain/frequency that referenced this pull request Jun 27, 2024
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.
- Modify extrinsic weight test due to an improvement in weights.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand ](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/58550)

issue-1841
enddynayn added a commit to frequency-chain/frequency that referenced this pull request Jun 27, 2024
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.
- Modify extrinsic weight test due to an improvement in weights.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand ](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/58550)

issue-1841
AurevoirXavier added a commit to darwinia-network/darwinia that referenced this pull request Jun 28, 2024
* Setup deps

* Remove Koi from account migration test

* paritytech/polkadot-sdk#1495

* Bump

* paritytech/polkadot-sdk#1524

* !! paritytech/polkadot-sdk#1363

* paritytech/polkadot-sdk#1492

* paritytech/polkadot-sdk#1911

* paritytech/polkadot-sdk#1900

Signed-off-by: Xavier Lau <[email protected]>

* paritytech/polkadot-sdk#1661

* paritytech/polkadot-sdk#2144

* paritytech/polkadot-sdk#2048

* paritytech/polkadot-sdk#1672

* paritytech/polkadot-sdk#2303

* paritytech/polkadot-sdk#1256

* Remove identity and vesting

* Fixes

* paritytech/polkadot-sdk#2657

* paritytech/polkadot-sdk#1313

* paritytech/polkadot-sdk#2331

* paritytech/polkadot-sdk#2409 part.1

* paritytech/polkadot-sdk#2767

* paritytech/polkadot-sdk#2521

Signed-off-by: Xavier Lau <[email protected]>

* paritytech/polkadot-sdk#1222

* paritytech/polkadot-sdk#1234 part.1

* Satisfy compiler

* XCM V4 part.1

* paritytech/polkadot-sdk#1246

* Remove pallet-democracy part.1

* paritytech/polkadot-sdk#2142

* paritytech/polkadot-sdk#2428

* paritytech/polkadot-sdk#3228

* XCM V4 part.2

* Bump

* Build all runtimes

* Build node

* Remove pallet-democracy

Signed-off-by: Xavier Lau <[email protected]>

* Format

* Fix pallet tests

* Fix precompile tests

* Format

* Fixes

* Async, remove council, common pallet config

* Fix `ethtx-forward` test case (#1519)

* Fix ethtx-forward tests

* Format

* Fix following the review

* Fixes

* Fixes

* Use default impl

* Benchmark helper

* Bench part.1

* Bench part.2

* Bench part.3

* Fix all tests

* Typo

* Feat

* Fix EVM tracing build

* Reuse upstream `proof_size_base_cost()` (#1521)

* Format issue

* Fixes

* Fix CI

---------

Signed-off-by: Xavier Lau <[email protected]>
Co-authored-by: Bear Wang <[email protected]>
enddynayn added a commit to frequency-chain/frequency that referenced this pull request Jun 28, 2024
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.
- Modify extrinsic weight test due to an improvement in weights.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand ](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/58550)

issue-1841
enddynayn added a commit to frequency-chain/frequency that referenced this pull request Jun 28, 2024
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.
- Modify extrinsic weight test due to an improvement in weights.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand ](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/58550)

issue-1841
enddynayn added a commit to frequency-chain/frequency that referenced this pull request Jun 28, 2024
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand
](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/5855/2)

#1841
rustadot pushed a commit to rustadot/recurrency that referenced this pull request Sep 5, 2024
- Upgrade Polkadot-sdk to v.1.6.0.
- Update weights to reflect the new version.

Notable Changes:
- [Rename ExportGenesisStateCommand to ExportGenesisHeadCommand
](paritytech/polkadot-sdk#2331)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.6.0)
[Release
Analysis](https://forum.polkadot.network/t/polkadot-release-analysis-v1-6-0/5855/2)

#1841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T9-cumulus This PR/Issue is related to cumulus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cumulus's ExportGenesisState command does not respect custom GenesisBuilder implementations
4 participants