forest
forest copied to clipboard
Set up Genesis State Using Data Imported From Genesis Template File
Add functions to set up the Genesis State based on the file. We are already doing something similar for Genesis with CAR files, so perhaps we just need to modify those functions.
In Lotus they have:
- MakeGenesisBlock
- https://github.com/filecoin-project/lotus/blob/9b1d2f4c137433c1fe1f5ed44ba2e70105a409f0/chain/gen/genesis/genesis.go#L287
MakeGenesisBlock calls the following functions. In Forest we don't have to follow the same structure/architecture, but we should complete the same operations.
- MakeInitialState
- Creates empty state tree
- Create system actor
- Create init actor
- Setup reward actor
- Setup cron actor
- Create empty power actor
- Create empty market actor
- Create verified registry
- Setup burnt-funds
- Create accounts
- https://github.com/filecoin-project/lotus/blob/9b1d2f4c137433c1fe1f5ed44ba2e70105a409f0/chain/gen/genesis/genesis.go#L94
- VerifyPresealData