Overview

Forge CLI Each chain created will have its own corresponding forge_release.tomlInside is the configuration information for this chain. After each chain is successfully created, the following information will appear to indicate the location of the configuration file, and users can modify it directly in the file.

There are two main types of Forge configuration information.Configuration of the chainwithNode configuration

  • Configuration of the chain It mainly includes the setting of the chain itself. Once the chain is started, these configuration information will be recorded in the state of the chain and synchronized between all nodes.Configuration of the chain The information cannot be changed after the chain is first started.
  • Node configuration It mainly includes the setting of the node itself, so it can be changed at any time even after the chain is started, but it only needs to restart the node to take effect.

The user is using for the first time forge start All must be determined before starting the chainConfiguration of the chain

Forge used toml As the format of the configuration file. Each piece of configuration information is a key-value pair and has its own partition.

[]The content in square brackets represents unique partitions. Such as: [forge]The following configurations represent that these configurations belong to forge[forge.transaction] The following configurations represent that these configurations belong to forge.transaction. Forge will read the configuration contents under the corresponding partition at runtime.

Below is a detailed explanation of each configuration in Forge. If an item is configured in forge_release.toml Does not appear in Forge, Forge will use the default value, otherwise it will start with forge_release.toml In the configuration.

Configuration of the chain

All Transactions

[forge.transaction] Defined under the partition is the configuration for all transactions. The specific configuration for a certain transaction will be in [forge.transaction.*] The configuration will be described later.

areameaningExamples of default values
max_asset_sizeThe maximum value of the custom data field of the assetThe size of the data field that comes with each asset cannot exceed 1000000 bytes。

Declare transactions

areameaningExamples of default values
restrictedcarried out DeclareWhether to restrict users from freely claiming new accounts when trading.The chain does not restrict users from claiming new accounts. For how to declare a new account under limited circumstances, you can refer to Declare transaction.

Admin account

The administrator account has the highest authority on the chain. Many special transactions, such as upgrading the chain, must be performed by the administrator account. When creating a chain, users can choose whether to use their existing account as the administrator account or generate a new administrator account.In either case, users need to protect the administrator account. 私钥

If the user chooses to generate an administrator account through the Forge CLI, after creating the chain, skThe location will be prompted with the following information:

areameaning
addressAdministrator account address
pkAdministrator account public key
balanceAdministrator account initial balance

Chain Holding Account

The chain holding account is a special account, no sk or pk. The coins in the chain holding account can only be transferred out through specific transactions, currently only PokeTransactions can be transferred.

areameaning
balanceChain currency account initial balance

If the chain does not support PokeFor transactions, the initial balance of the chain holding account should be set to 0, otherwise this part of the currency will be trapped in the chain holding account.

Initial account

In addition to the previously mentionedAdmin account with Chain Holding Account, Users can also preset more other accounts. When the chain is initialized, it will automatically declare these accounts and generate corresponding account balances according to the configuration.

[[]]The double brackets represent repeatable partitions. Such as [[forge.accounts]]The partition and the configuration can appear multiple times, representing multiple account configurations.

Token Information

areameaningExamples of default values
nameName of the token-
symbolToken symbol-
unitThe smallest unit of the token, similar to Satoshi on Bitcoin-
descriptionDescription of the token-
iconThe icon of the token needs to be base64 encoded and placed here-
decimalToken Accuracy-
initial_supplyInitial token supply-
total_supplyTotal Supply of Tokens-
inflation_rateExpansion rate of tokens-

Consensus engine

areameaningExamples of default values
genesis_timeThe initial time of the chain must be UTC time in ISO 8601 format.When the chain is generated, the Forge CLI will fill in the corresponding time. If the above time is entered, it means that the chain was created at 5 pm UTC on February 10, 2019.
chain_idID of the chain, all nodes must be consistentThe ID of this chain is forge
max_bytesMaximum amount of data per blockThe size of each block cannot exceed 150000 bytes

Initial verification node

Users can add custom verification nodes (nodes participating in the block). But if more than or equal to two-thirds of the verification nodes fail to operate normally, the entire chain will not operate normally. If there is no initial verification node configuration, this node defaults to the only verification node, so that the chain degenerates into a single node chain.

Node configuration

Forge

areameaningExamples of default values
pathForge's main pathForge related code is stored in ~/.forge_release/coreunder.
logpathForge log path will follow the main pathForge related logs will exist ~/.forge_release/core/logsunder.
sock_grpcForge's gRPC port on this nodeForge's gRPC port on this node will run at tcp://127.0.0.1:28210
pub_sub_keyThe keys that Forge uses to encrypt data when publishing and subscribingForge uses when publishing and subscribing to data ABTTOTHEMOONTo encrypt the data.

Forge Web

areameaningExamples of default values
enabledWhether to run Forge Web automaticallyForge Web will run automatically.
portForge web listening port-

Caching

areameaningExamples of default values
pathForge's cache locationForge's cache will be placed ~/.forge_release/cache/mnesia_data_dirunder.

Consensus engine

areameaningExamples of default values
monikerNode nicknameNodes can be self-explanatory and will be displayed in the Peer list
pathtendermint data storage directory-
keypathTendermint node public and private key storage directory-
logpathtendermint log storage directory, relative to data storage directory-
sock_rpctendermint rpc port-
sock_grpcTendermint's grpc port-
sock_p2pP2P port of tendermint. If networking is needed, pay attention to firewall configuration.-
persistent_peerslist of nodes that tendermint should keep connected-
timeout_commitBlock time-