Configure your Genesis block for your deployment
Specify the initial state of your blockchain, by specifying what components that should be a part of the blockchain from the start.
The components you can configure in the Genesis block are:
- The initial set of block producer nodes.
Each initial block producer node is defined by 3 values.
- The finalization key is used to sign blocks, so they can be used for creating the next block.
- The network address is the blockchain address that identifies each node, when they are sending transactions to the blockchain.
- The network key is the public key of the key pair used for signing payloads sent between the block producers.
The keys that these values are derived from are defined in the config file for each of the block producers, an overview of the values in the file can be found here.
Here is an example of a config file specifying a Genesis block:
{
"blockProducers": [
{
"finalizationKey": "qA+GrHua7e+xT6y+UUie25IX7NMZM9QdYihIGGoQM6XMDzxT42KoCbopsV2njTuwAQLJq+ZXemh6+O49DZ67F9HMFoI/hhHJiB3/0QUHGdHE2qb8j+LB7peGcTofNs08",
"networkAddress": "007d3bd7a048a7f71c6305791b7a077978ec559b32",
"networkKey": "AtkJd4XRxKNHzBLT1JT5QgyCxLFUgIurFzRFWbHO7w//"
},
{
"finalizationKey": "jdcled0/FFiEZyNeQxwi6jmwjEdqF3QYxON5ltJ8VgzhQJebRVJ9X3YM9VLcPcDiBoLi+80KiP6MrlrhrDDkF8aQe17Iq9LT31ogQRAE2p6OLxheBx59DYXK0fbwDbda",
"networkAddress": "00f473a81432786bc778e3ead949d3866ed34d7b8a",
"networkKey": "A+VHax6pm2oIg3MVQno3Ubg9aFs0rMUgHlnptiOsS2lB"
},
{
"finalizationKey": "snq98g/H3G2m8TqY9OG3rUgYEDL+hOGXO9W6l20I8BK+rI7kurq944KU010VcHXpB+bHjatCZ3oWppkfR/MS7Ji7YBeshIMdTMTbBPulktUhR37qgPloUYv/w/aDQoZc",
"networkAddress": "00f29b29a487bd5c035443918da0494b32921b9c86",
"networkKey": "AmIteYoNeF0x0z9GDaTMjHy4SNkkYEotA3VyFaZxPXBq"
},
{
"finalizationKey": "o9J8GCubS87RKBcgLoe5S/Kix4qjd5SCrXRSEpwgWavV4Bncnf4rTHgypunkDh7zEKI/HgM/TolZ7nu9gGAYYi26PD+cHFl1QBVy4m0US5TWgrqqWKWil+6zbpb14aLS",
"networkAddress": "00b9840707e732ca3c222855064324aceb06bfaeae",
"networkKey": "AwQW3N+zofC+Gj/WrVL7HANOJNSMzzTRiefe3qa2WnpK"
}
]
}
Create a new Genesis block
You can create a new genesis block, with your own configuration in the platform-dev-runner.
Change the file conf/genesis/genesis-conf.json to your needs and run the command
docker run --mount "type=bind,src=$(pwd)/conf/genesis/,dst=//conf" --rm registry.gitlab.com/secata/platform/platform-dev-runner/genesis-creator:<version>
The folder conf/genesis/genesis.zip has now been recreated using your conf/genesis/genesis-conf.json file.