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

Deterministic genesis generation #84

Merged
merged 6 commits into from
Feb 24, 2023
Merged

Conversation

adlrocha
Copy link
Contributor

@adlrocha adlrocha commented Feb 24, 2023

Background

Initially we were planning to store the genesis.car for the subnet actor to make it available for new peers joining the network, but this CAR is ~12MiB on average, which may be too big to store it on-chain. As a workaround we can store the genesis template for the subnet and all peers can deterministically generate the genesis.car from the template (1-2 MiB).

Implementation.

This PR:

  • Modifies the genesis implementation to include a deterministic genesis creation mode.
  • It provides a new IPC endpoint that agents can use to generate a template for their subnet from which they can generate the genesis.car for the subnet.

Future work

  • Persist the genesis in IPFS and add the cid of the subnet genesis in the subnet actor
  • Populate the subnet name into the genesis template (we don't know a-priori the subnetID until the actor has been deployed).

chain/gen/gen.go Show resolved Hide resolved
@adlrocha adlrocha merged commit 3194f8f into spacenet Feb 24, 2023
@adlrocha adlrocha deleted the adlrocha/subnet-genesis branch February 24, 2023 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants