Skip to content

Commit 3bca45e

Browse files
committed
add node configuration doc
1 parent b583cf2 commit 3bca45e

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Node Configuration
2+
3+
The Conflux node configuration file is a TOML file. You can modify this file to configure the node's behavior.
4+
5+
The official documentation provides an [introduction to the main configuration options](https://doc.confluxnetwork.org/docs/general/run-a-node/advanced-topics/node-configuration), where you can find the most commonly used configuration options along with their descriptions.
6+
7+
In the `run` directory of this repository, there is a default configuration file, usually named `hydra.toml` (for mainnet) or `testnet.toml` (for testnet). This file contains almost all available configuration options with comments. You can modify this file to configure your node.
8+
9+
The configuration file path can be specified using the command-line parameter `--config`, for example:
10+
11+
```shell
12+
./conflux --config /path/to/your/config.toml
13+
```
14+
15+
## Hardfork Configurations
16+
17+
As the Conflux network evolves, we introduce new features, fix bugs, and improve network performance through hard forks. Any changes involving consensus rule modifications are introduced via [CIPs (Conflux Improvement Proposals)](https://github.com/conflux-chain/cips), and each hard fork may include one or more CIPs.
18+
19+
For a complete list of historically activated CIPs, refer to [this page](https://github.com/conflux-chain/cips?tab=readme-ov-file#activated). The list of all past hard forks can be found [here](https://github.com/conflux-chain/cips?tab=readme-ov-file#list-of-hardforks).
20+
21+
Typically, node operators do not need to manually configure hard fork settings, as the upgrade heights for both the mainnet and testnet are fixed. However, if you are setting up a [private network](https://doc.confluxnetwork.org/docs/general/run-a-node/advanced-topics/running-independent-chain), you may need to specify the activation height for each CIP according to your requirements.
22+
23+
There are two ways to specify activation heights: by **block height** or by **block number**. These terms have different meanings in Conflux:
24+
- **Block height** refers to the height of the pivot chain.
25+
- **Block number** represents the total number of blocks in the full ledger.
26+
27+
Typically, the block height is smaller than the block number. For a deeper understanding, refer to the [Conflux Ledger Structure Overview](https://doc.confluxnetwork.org/docs/general/conflux-basics/consensus-mechanisms/proof-of-work/tree-graph).
28+
29+
The following are the CIP activation configuration options introduced in each version of Conflux-Rust:
30+
31+
### v1.1
32+
33+
| Configuration Key | Required | CIP(s) |
34+
|---------------------------------|------------------------------------|-----------------------|
35+
| tanzanite_transition_height || CIP40 |
36+
37+
### v2.0
38+
39+
| Configuration Key | Required | CIP(s) |
40+
|---------------------------------|------------------------------------|-----------------------|
41+
| hydra_transition_number || CIP43a, CIP64, CIP71, CIP78a, CIP92 |
42+
| hydra_transition_height || CIP76, CIP86 |
43+
| cip43_init_end_number || CIP43b |
44+
| pos_reference_enable_height || |
45+
| cip78_patch_transition_number | | CIP78b |
46+
| cip90_transition_height | | CIP90a |
47+
| cip90_transition_number | | CIP90b |
48+
49+
There are two configuration options for setting the proportion of eSpace transactions in the overall block space.:
50+
51+
```toml
52+
# The following parameter controls how many blocks are allowed to
53+
# contain EVM Space transactions. Setting it to N means that one block
54+
# must has a height of the multiple of N to contain EVM transactions.
55+
evm_transaction_block_ratio=5
56+
# The following parameter controls the ratio of gas limit allowed for
57+
# EVM space transactions. Setting it to N means that only 1/N of th
58+
# block gas limit can be used for EVM transaction enabled blocks.
59+
evm_transaction_gas_ratio=2
60+
```
61+
62+
### v2.1
63+
64+
| Configuration Key | Required | CIP(s) |
65+
|---------------------------------|------------------------------------|-----------------------|
66+
| dao_vote_transition_number || CIP97, CIP98, CIP94n, CIP105 |
67+
| dao_vote_transition_height || CIP94h |
68+
| cip105_transition_number | | CIP105 |
69+
70+
### v2.2
71+
72+
| Configuration Key | Required | CIP(s) |
73+
|---------------------------------|------------------------------------|-----------------------|
74+
| sigma_fix_transition_number || |
75+
76+
### v2.3
77+
78+
| Configuration Key | Required | CIP(s) |
79+
|---------------------------------|------------------------------------|-----------------------|
80+
| cip107_transition_number || CIP107 |
81+
| cip112_transition_height || CIP112 |
82+
| cip118_transition_number || CIP118 |
83+
| cip119_transition_number || CIP119 |
84+
85+
### v2.4
86+
87+
| Configuration Key | Required | CIP(s) |
88+
|---------------------------------|------------------------------------|-----------------------|
89+
| next_hardfork_transition_number || CIP131, CIP132, CIP133b, CIP137, CIP144, CIP145, Cancun Opcodes |
90+
| next_hardfork_transition_height || CIP130, CIP133, CIP1559 |
91+
| cip1559_transition_height | | CIP1559 |
92+
| cancun_opcodes_transition_number| | Cancun Opcodes |
93+
94+
There are two configuration options for setting the minimum base price of Core Space and eSpace.:
95+
96+
```toml
97+
min_native_base_price=1000000000 # 1 GDrip
98+
min_eth_base_price=1000000000 # 1 GDrip
99+
```
100+
101+
### v2.5
102+
103+
| Configuration Key | Required | CIP(s) |
104+
|---------------------------------|------------------------------------|-----------------------|
105+
| c2_fix_transition_height || |
106+
107+
### v2.6
108+
109+
| Configuration Key | Required | CIP(s) |
110+
|---------------------------------|------------------------------------|-----------------------|
111+
| eoa_code_transition_height || CIP7702 |
112+
| align_evm_transition_height | | |
113+
114+
Note: `align_evm_transition_height` is a **devnet** only configuration. When this configuration is set, the node will align the canonical EVM opcodes gas cost. Which means the eSpace EVM is identical to the canonical EVM.
115+
116+
There is a [template file](https://github.com/Conflux-Chain/conflux-docker/blob/master/fullnode-configs/dev-node/devnode.toml) that contains the activation configurations for various CIPs, which can be used as a reference.

0 commit comments

Comments
 (0)