The genesis public key is the public key associated to the genesis block, the first block of your private blockchain.
The genesis block is the first block in any blockchain-based protocol. It is the basis on which additional blocks are added to form a chain of blocks, hence the term blockchain.
FIGURE 1: Genesis block
It differs from other blocks in that it has no predecessor block. Since it has no predecessor, some small parameters have to be specified for its creation.
To fetch Tezos binaries and create a new genesis public key, run the following:
Only 'babylonnet' and 'carthagenet' are supported as a
If you have been provided a genesis public key, instead run:
Baking is the act of signing and publishing blocks to the Tezos blockchain. Therefore bakers are the people participating in the consensus by creating new blocks. Check out the Baking module for more information.
start-baker.sh will do the following tasks:
- generate a node identity
- create a baker account
- start the bootstrap-node baker to bake the chain
This example will walk you through running two bakers, each running in its own Docker container. To run the first, enter the following:
--exposeparameter makes a port available outside of Docker.
-pparameter maps host ports to Docker ports.
8732is used as a rpc node port and exposed by the docker image by default.
RPC is a client-server protocol where the requesting program is the client and the program providing the service is the server.
Tezos nodes provide a JSON/RPC interface to interact with the Tezos network. Although it uses RPC and is JSON-based, it does not follow the JSON-RPC protocol.
After running this command, you should see the following warning:
These warnings can be ignored for now, as all the required components have not yet been started.
This script will print the baker's IP address and public key, both of which will be used in the following steps. First, you should see the IP address:
You will also see some output containing the hash, the public key and the secret key:
At this point, you should also see 'Too few connections (0)' being printed repeatedly on the terminal. Leave this terminal running and open another.
In this second terminal, enter:
Then run the 2nd baker:
If the nodes can communicate, you will see the following lines in both terminals:
This means that each node now has one peer.
Each terminal displays a different hash, private key and public key. Write them down somewhere because we will need them in the next chapter.