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

feat(chain-spec): add mainnet spec artifacts #476

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

al3mart
Copy link
Collaborator

@al3mart al3mart commented Feb 20, 2025

This PR adds to the repo the genesis spec, code, state and hash for pop mainnet.
Providing an easier way to access this should benefit us and external contributors.

A new directory is created: mainnet to contains these in the previously existing chain-specs folder.

The previously existing specs used for registering the testnet to Paseo are moved to a new directory: testnet.


How can this be reviewed ?

Compare the artifacts in submitted in this PR with the ones submitted on-chain. These can be retrieved by querying:

  • paras.heads. Should contain a value matching the genesis state as the mainnet chain hasn't advanced yet.
  • paras.currentCodeHash returns the hash of the code. This hash can be use to query for the code itself on key paras.codeByHash, the result should match the genesis wasm as the mainnet chain hasn't received any code upgrade yet.
  • The genesis block hash can be easily verified by launching a node with the given spec and comparing the values. (pop-node --chain <mainnet-spec> --tmp)

[sc-2771]

@al3mart al3mart requested a review from a team February 20, 2025 10:18
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.89%. Comparing base (d89d3e7) to head (88cc5f8).

@@           Coverage Diff           @@
##             main     #476   +/-   ##
=======================================
  Coverage   76.89%   76.89%           
=======================================
  Files          89       89           
  Lines       18184    18184           
  Branches    18184    18184           
=======================================
  Hits        13983    13983           
  Misses       3935     3935           
  Partials      266      266           

@Daanvdplas
Copy link
Collaborator

How can we review this best?

Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

Verified the steps you provided above, also created the genesis state and wasm from the chain spec with pop cil.

Everything matched, nice job.

Can we rename 3395-mainnet-head-state to 3395-mainnet-genesis-state or pop-genesis-state.

It is a little bit inconsistent with the file names in testnet, also the mainnet part in the files names seems unnecessary because it is in the mainnet folder.

Perhaps:
pop-wasm
pop-polkadot.plain.json
pop-polkadot.raw.json
pop-genesis-state

@al3mart
Copy link
Collaborator Author

al3mart commented Feb 24, 2025

Verified the steps you provided above, also created the genesis state and wasm from the chain spec with pop cil.

Everything matched, nice job.

Can we rename 3395-mainnet-head-state to 3395-mainnet-genesis-state or pop-genesis-state.

It is a little bit inconsistent with the file names in testnet, also the mainnet part in the files names seems unnecessary because it is in the mainnet folder.

Perhaps: pop-wasm pop-polkadot.plain.json pop-polkadot.raw.json pop-genesis-state

Yeah, that makes sense!
Renamed in: 88cc5f8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants