Running a Public Network
Running a Public Network
Genesis ceremonies
The endless tool supports bootstrapping new blockchains through what is known as a genesis ceremony. The output of the genesis ceremony is the output of move instructions that prepares a blockchain for online operation. The input consists of:
A set of validators and their configuration
The initial set of Move modules, known as a framework
A unique
ChainId(u8) that distinguishes this from other networksFor test chains, there also exists an account that manages the minting of EndlessCoin
Generating genesis
The genesis organizer constructs a
Layoutand distributes it.The genesis organizer prepares the Endless framework's bytecode and distributes it.
Each participant generates their
ValidatorConfigurationand distributes it.Each participant generates a
genesis.blobfrom the resulting contributions.The genesis organizer executes the
genesis.blobto derive the initial waypoint and distributes it.Each participant begins their
endless-node. Theendless-nodeverifies upon startup that thegenesis.blobwith the waypoint provided by the genesis organizer.The blockchain will begin consensus after a quorum of stake is available.
Prepare endless-core
endless-coreThe following sections rely on tools from the Endless source. See Building Endless From Source for setup.
The layout file
The layout file contains:
root_key: an Ed25519 public key for EndlessCoin management.users: the set of participantschain_id: theChainIdor a unique integer that distinguishes this deployment from other Endless networks
An example:
Building the Endless Framework
From your Endless repository, build the framework and package it:
The framework will be stored within the endless-framework-release directory.
The ValidatorConfiguration file
The ValidatorConfiguration file contains:
account_address: The account that manages this validator. This must be derived from theaccount_keyprovided within theValidatorConfigurationfile.consensus_key: The public key for authenticating consensus messages from the validatoraccount_key: The public key for the account that manages this validator. This is used to derive theaccount_address.network_key: The public key for both validator and fullnode network authentication and encryption.validator_host: The network address where the validator resides. This contains ahostandportfield. Thehostshould either be a DNS name or an IP address. Currently only IPv4 is supported.full_node_host: An optional network address where the fullnode resides. This contains ahostandportfield. Thehostshould either be a DNS name or an IP address. Currently only IPv4 is supported.stake_amount: The number of coins being staked by this node. This is expected to be1, if it is different the configuration will be considered invalid.
An example:
To generate this using the endless CLI:
Generate your validator's keys:
Generate your
ValidatorConfiguration:
The last command will produce a
bob.yamlfile that should be distributed to other participants forgenesis.blobgeneration.
Generating a genesis and waypoint
genesis.blob and the waypoint can be generated after obtaining the layout file, each of the individual ValidatorConfiguration files, and the framework release. It is important to validate that the ValidatorConfiguration provided in the earlier stage is the same as in the distribution for generating the genesis.blob. If there is a mismatch, inform all participants.
To generate the genesis.blob and waypoint:
Place the
layoutfile in a directory, e.g.,genesis.Place all the
ValidatorConfigurationfiles into thegenesisdirectory.Ensure that the
ValidatorConfigurationfiles are listed under the set ofuserswithin thelayoutfile.Make a
frameworkdirectory within thegenesissdirectory and place the framework release.mvfiles into theframeworkdirectory.Use the
endlessCLI to generate genesis and waypoint:
Starting an endless-node
endless-nodeUpon generating the genesis.blob and waypoint, place them into your validator and fullnode's configuration directory and begin your validator and fullnode.
Last updated