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

Generate genesis.json file from parent #273

Closed
Tracked by #199
aakoshh opened this issue Oct 6, 2023 · 0 comments · Fixed by consensus-shipyard/fendermint#317
Closed
Tracked by #199

Generate genesis.json file from parent #273

aakoshh opened this issue Oct 6, 2023 · 0 comments · Fixed by consensus-shipyard/fendermint#317

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Oct 6, 2023

Once the minimum requirements to bootstrap a subnet are met in the parent in consensus-shipyard/ipc-solidity-actors#223 and consensus-shipyard/ipc-solidity-actors#228 we can generate a Genesis file for the subnet.

Currently this is in the form of a genesis.json file produced by the fendermint CLI. The idea is that instead of putting it together by adding accounts and validators, setting IPC parameters, etc, all the data required is fetched from the parent chain and written to the JSON file, with which CometBFT can be started as we have done before.

One possible way to do this is:

  • There should be some CLI in Fendermint that can produce a genesis.json file from some subnet at a specific height in the parent subnet.
  • It needs as input the SubnetID, and optionally the block height
  • Ideally it should verify that at that height the "bootstrapped" event was emitted.
  • It could fetch the logs of the SubnetActor contract and check at which block height it was emitted, so the user doesn't need to know.
  • It should query some methods in the SubnetActor to fetch the IPC parameters such as: the bottomUpCheckpointPeriod, the initial validator set, ...
  • Set the chain name to the subnet ID in string form.
  • Set the circulating supply to 0
  • We can assume no account have any balance in the genesis, and will fund their accounts later with top-down messages
  • We can create accounts (f1 or f410) for the initial validators according to the address they use in the parent.

Questions:

  • Do we go to the Ethereum API directly, or do we use the IPC SDK for this? Or both?
  • Which Solidity methods need to be called?
  • How can we figure out the Ethereum delegated address of a SubnetActor? Ask the SubnetRegistry? How?

This ticket enables #198

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

Successfully merging a pull request may close this issue.

2 participants