Skip to content

Configure your Genesis block for your private 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.

  • The initial set of MPC nodes, each MPC node is specified by

    • The identity, which is the blockchain address the node can be identified by. i.e the address sending transactions to verify shares, commit to outputs and open variables to make them public. All of these actions are done by the node, by sending a transaction to the blockchain.
    • The public key that the blockchain address is made from. This is used when sending shares to the nodes, to encrypt the shares for the designated node.
    • The REST endpoint, that the node has exposed so secret shares can be sent directly to the node and secret variables can be fetched from the nodes.

These values are defined in each of initial MPC nodes config files, 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"
    }
  ],
  "zkNodes": [
    {
      "identity": "00c9b5a52a7f873da696793aa50bcbd907e3075dab",
      "publicKey": "AtkJd4XRxKNHzBLT1JT5QgyCxLFUgIurFzRFWbHO7w//",
      "restEndpoint": "http://docker:8180"
    },
    {
      "identity": "008f4d4a995810600e66a98449cfa1ab265c177c12",
      "publicKey": "A+VHax6pm2oIg3MVQno3Ubg9aFs0rMUgHlnptiOsS2lB",
      "restEndpoint": "http://docker:8182"
    },
    {
      "identity": "0093904353c0c42318ad8f71849d0e4ae971331455",
      "publicKey": "AmIteYoNeF0x0z9GDaTMjHy4SNkkYEotA3VyFaZxPXBq",
      "restEndpoint": "http://docker:8184"
    },
    {
      "identity": "00651e030ed39a0578e548876e2c90bf95a02e6aa1",
      "publicKey": "AwQW3N+zofC+Gj/WrVL7HANOJNSMzzTRiefe3qa2WnpK",
      "restEndpoint": "http://docker:8186"
    }
  ]
}

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-conf.json to your needs and run the command

docker compose -f genesis-compose.yaml up

The folder conf/genesis.zip has now been recreated using your conf/genesis-conf.json file.

Partisia All Rights Reserved © 2023