Marker genesis is a developer utility to easy running atlas blockchain testnets and related jobs around testnets.
Its main advantage over previous solutions is that it's able to create a genesis.json where all core conctracts are already deployed in it.
Generating a genesis.json file
First you need to config the markerConfig.json like this: set your own keys.
MarkerConfig.json params instruction
Address: This account address will be registered to the validator list as a validator account
SignerAddress: It is authorized by account address to replace the validator to make consensus with other nodes on the MAP network
ECDSASignature: Signeraddress ecdsasignature for account address
PublicKeyHex: Signeraddress`s Publickeyhex
BLSPubKey: Signeraddress`s Blspubkey
BLSG1PubKey: Signeraddress`s BLSG1PubKey
BLSProofOfPossession: BLS signature data of signeraddress to account address
note:If you use the same account address as Address and SignerAddress, signeraddress and blsproofofpossession are the default values of the account address.
Second you need compile your atlas-contracts project,we need the bytecode about atlas-contracts to make genesis.json file.
then to do so run:
ps: you can use this genesis.json init MAP validator nodes
you can update the chainid in the genesis.json
the one way: like this ./atlas --datadir ./node-1 init ./genesis.json
the other way: copy the alloc info in the genesis.json to core/chain/genesis_alloc_mainnet.go file overwrite mainnetAllocJSON info
USAGE$./markergenesisOPTIONS--buildpath:buildpathisthepathtotrufflecompileoutputfolder.--newenv:thegenesis.jsonwillbegeneratedunderthisfolder --markercfg: this your markerConfig.json path default to github.com/mapprotocol/atlas/marker/config/markerConfig.json
EXAMPLES:marker genesis --buildpath ./root/atlas-contracts/build/contracts --newenv ./root/atlasEnv --markercfg "./root/atlas/marker/config/markerConfig.json"
Thiswillcreatea`genesis.json` in the ./root/atlasEnv folder