consensus-shipyard / ipc

🌳 Spawn multi-level trees of customized, scalable, EVM-compatible networks with IPC. L2++ powered by FVM, Wasm, libp2p, IPFS/IPLD, and CometBFT.
https://ipc.space
Apache License 2.0
44 stars 39 forks source link

feat(node): consistent genesis #1016

Closed cryptoAtwill closed 2 months ago

cryptoAtwill commented 5 months ago

This PR follows this discussion to address #1002.

The flow is simpler now with:

This PR is just an implementation of the flow, it's a quick way to show if the flow actually works. Pending items to make it ready for review:

To actually try it out, perform the following:

# generate the fendermint genesis first, then seal the genesis state
cargo run -p fendermint_app --release -- genesis --genesis-file test-network/genesis.json \
  ipc \
    seal-state \
    --builtin-actors-path <FULL PATH TO YOUR BUILT_IN BUNDLE> \
    --custom-actors-path  <FULL PATH TO YOUR CUSTOM BUNDLE> \
    --artifacts-path  <FULL PATH TO YOUR CONTRACT OUT FOLDER> \
    --output-path <FULL PATH TO YOUR SEALED STATE OUTPUT PATH>

# convert to cometbft genesis
cargo run -p fendermint_app --release -- \
  genesis --genesis-file test-network/genesis.json \
  into-tendermint --out ~/.cometbft/config/genesis.json --sealed  <FULL PATH TO YOUR SEALED STATE OUTPUT PATH>
raulk commented 3 months ago

TODO

cryptoAtwill commented 3 months ago

@karlem I have updated based on the review feedback, please take another look. I will remove old implementation in a follow up PR.