Sitelet https://github.com/init4tech/node-components/tree/main/crates/genesis
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Signet Genesis

Genesis configuration and utilities for the Signet Node.

This library contains the following:

  • GenesisSpec - An enum representing different genesis specifications (Mainnet, Parmigiana, Gouda, Pecorino, Test, or custom file paths), which can be used to load genesis data.
  • NetworkGenesis - A struct containing both rollup and host genesis configurations.
  • PARMIGIANA_GENESIS / PARMIGIANA_HOST_GENESIS - The Parmigiana genesis data.
  • GOUDA_GENESIS - The Gouda rollup genesis. Host side reuses PARMIGIANA_HOST_GENESIS.
  • PECORINO_GENESIS / PECORINO_HOST_GENESIS - The Pecorino genesis data.
  • TEST_GENESIS / TEST_HOST_GENESIS - Local test genesis for testing purposes.
  • GenesisError - Errors that can occur when loading or parsing genesis data.

Example

# use signet_genesis::GenesisSpec;
# use signet_constants::KnownChains;
# fn _main() -> Result<(), Box<dyn std::error::Error>> {
let genesis = GenesisSpec::Known(KnownChains::Parmigiana).load_genesis()?;
// Access rollup (L2/Signet) genesis
let rollup = &genesis.rollup;
// Access host (L1/Ethereum) genesis
let host = &genesis.host;
# Ok(())
# }