How do I retrieve the genesis block for my chain?
The genesis block for a Kaleido chain can be retrieved locally by invoking the /genesis
API. The block contains environmental configuration data such as EIP implementations, block period, target gas limit, etc…
To retrieve the block use the GET
method against the /genesis
endpoint, with the consortia and environment IDs specified in the path. For example:
curl -X GET -H 'Authorization: Bearer {APIKEY}' -H 'Content-Type: application/json' https://console.kaleido.io/api/v1/consortia/{consortia_id}/environments/{environment_id}/genesis | jq
If your environment’s home region is outside of the US, update the baseline URL accordingly. For example:
- EU Frankfurt –
https://console-eu.kaleido.io/api/v1
- APAC Sydney –
https://console-ap.kaleido.io/api/v1
- APAC Seoul –
https://console-ko.kaleido.io/api/v1
A successful call will return a parsed block, optionally displayed as a JSON object if you leverage jq
. The following is the genesis block for a Geth clique PoA created against a 1.0.10
versioned environment:
{"alloc":{"62a338f7c9e30c1b9cef3312107fdcfd173afaa0":{"balance":"1000000000000000000000000000"}},"coinbase":"0x0000000000000000000000000000000000000000","config":{"homesteadBlock":1,"eip150Block":2,"eip155Block":3,"eip158Block":3,"byzantiumBlock":4,"clique":{"period":5,"epoch":30000},"chainId":589523943},"difficulty":"0x1","extraData":"0x000000000000000000000000000000000000000000000000000000000000000062a338f7c9e30c1b9cef3312107fdcfd173afaa00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","gasLimit":"0x2FEFD800","mixhash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","timestamp":"0x00"}
Refer to the API Documentation for the full specification.
Was this article helpful?
0 out of 0 found this helpful