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

Support custom genesis block #12291

Merged
merged 18 commits into from
Dec 19, 2022

Conversation

liuchengxu
Copy link
Contributor

@liuchengxu liuchengxu commented Sep 18, 2022

The goal of this PR is to allow the third party to build their custom genesis block.

Close #10360

Polkadot address: 12py2VL5Mn9j28KCLxMCRMe7ons2LPUeJ6STPv9RFhrHrwwp

@liuchengxu
Copy link
Contributor Author

@bkchr Could you please take a look at this PR? I'll prepare the companion PR if you think it's on the right track.

@stale
Copy link

stale bot commented Oct 26, 2022

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Oct 26, 2022
@liuchengxu
Copy link
Contributor Author

ping @bkchr

@stale stale bot removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Oct 26, 2022
@stale
Copy link

stale bot commented Nov 26, 2022

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Nov 26, 2022
@stale stale bot removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Nov 26, 2022
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.

Sooooooorrrrrrryyyyyyyy for all the delay. Looks good so far, just some minor changes.

Please also merge master.

client/service/src/client/genesis.rs Show resolved Hide resolved
client/service/src/client/genesis.rs Outdated Show resolved Hide resolved
client/service/src/client/genesis.rs Outdated Show resolved Hide resolved
client/service/src/builder.rs Outdated Show resolved Hide resolved
@bkchr bkchr requested a review from cheme December 16, 2022 23:18
@liuchengxu liuchengxu requested review from bkchr and removed request for cheme December 18, 2022 05:00
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.

Ty!

@bkchr bkchr added the A0-please_review Pull request needs code review. label Dec 18, 2022
@bkchr bkchr added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Dec 18, 2022
Copy link
Contributor

@cheme cheme left a comment

Choose a reason for hiding this comment

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

Changes looks good to me.

client/service/src/client/client.rs Outdated Show resolved Hide resolved
@liuchengxu
Copy link
Contributor Author

Ping @bkchr

@bkchr bkchr merged commit cad470b into paritytech:master Dec 19, 2022
@bkchr
Copy link
Member

bkchr commented Dec 19, 2022

Ty @liuchengxu

Can you post your polkadot address?

@bkchr
Copy link
Member

bkchr commented Dec 19, 2022

/tip small

@substrate-tip-bot
Copy link

@bkchr ERROR: Error: Contributor did not properly post their account address.

Make sure the pull request description has: "{network} address: {address}".
Error: Contributor did not properly post their account address.

Make sure the pull request description has: "{network} address: {address}".
at parseContributorAccount (/usr/src/app/dist/tip.js:1:850)
at onIssueComment (/usr/src/app/dist/bot.js:1:1023)
at /usr/src/app/dist/bot.js:1:2545
at /usr/src/app/node_modules/@octokit/webhooks/dist-node/index.js:115:14
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)

@liuchengxu
Copy link
Contributor Author

Thanks @bkchr , polkadot address attached!

@bkchr
Copy link
Member

bkchr commented Dec 19, 2022

/tip small

@substrate-tip-bot
Copy link

@bkchr A small tip was successfully submitted for liuchengxu (12py2VL5Mn9j28KCLxMCRMe7ons2LPUeJ6STPv9RFhrHrwwp on polkadot).

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips tip

@liuchengxu liuchengxu deleted the support-custom-genesis-block branch December 19, 2022 14:40
@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-v0-9-37/1736/1

ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
* Set genesis block data using the built genesis block

* Make resolve_state_version_from_wasm a separate function and some small refactorings

Useful for the commit following.

* Introduce trait BuildGenesisBlock

Substrate users can use this trait to implement their custom genesis block when constructing the
client.

* Make call_executor test compile

* cargo +nightly fmt --all

* Fix test

* Remove unnecessary clone

* FMT

* Apply review suggestions

* Revert changes to new_full_client() and new_full_parts() signature

* Remove needless `Block` type in `resolve_state_version_from_wasm`
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Set genesis block data using the built genesis block

* Make resolve_state_version_from_wasm a separate function and some small refactorings

Useful for the commit following.

* Introduce trait BuildGenesisBlock

Substrate users can use this trait to implement their custom genesis block when constructing the
client.

* Make call_executor test compile

* cargo +nightly fmt --all

* Fix test

* Remove unnecessary clone

* FMT

* Apply review suggestions

* Revert changes to new_full_client() and new_full_parts() signature

* Remove needless `Block` type in `resolve_state_version_from_wasm`
liuchengxu added a commit to liuchengxu/substrate that referenced this pull request Mar 5, 2023
bkchr pushed a commit that referenced this pull request Mar 6, 2023
ukint-vs pushed a commit to gear-tech/substrate that referenced this pull request Apr 10, 2023
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

Make the genesis block building more flexible
4 participants