Skip to content

Commit a20ecaa

Browse files
committed
update cip docs
1 parent 3bca45e commit a20ecaa

File tree

2 files changed

+165
-91
lines changed

2 files changed

+165
-91
lines changed
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# CIP Activation Configuration
2+
3+
Each hardfork may involve two activation points: by **block height** or by **block number**. These terms have different meanings in Conflux:
4+
5+
- **Block height** refers to the height of the pivot chain.
6+
- **Block number** represents the total number of blocks in the full ledger.
7+
8+
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).
9+
10+
## Configuration Hierarchy for CIP Activation Time
11+
12+
The activation time for a CIP is configured through a hierarchical approach:
13+
14+
### Highest Priority: CIP-Specific Configuration
15+
16+
If the CIP has its own configuration parameter, the activation point specified by this parameter takes the highest priority.
17+
18+
### Second Priority: Hardfork Configuration
19+
20+
If the CIP does not have its own configuration parameter or the user has not specified one, the activation point is determined by the configuration parameters of the hardfork to which the CIP belongs.
21+
22+
### Third Priority: Default Transition Time
23+
24+
If the hardfork configuration parameters are not specified, the system uses the default_transition_time parameter. This parameter sets both the transition_number and transition_height of the hardfork to the value of default_transition_time.
25+
26+
### Final Priority: Node Mode
27+
28+
If default_transition_time is not specified, the activation time is determined based on the node's mode:
29+
30+
For nodes in test or dev mode, the activation time is set to 1, meaning all CIPs are activated immediately after the blockchain starts.
31+
For nodes in other modes, the activation time is set to infinity, meaning all CIPs are deactivated by default.
32+
Recommendation
33+
Configuring default_transition_time=1 is sufficient for launching a node with all the latest features, meeting most use cases. Fine-grained CIP activation configurations are primarily intended for developer debugging and are not recommended for mature products.
34+
35+
### Caution
36+
37+
While it is possible to modify the activation time and order of different CIPs using configuration parameters, deviating from the mainnet activation sequence (e.g., activating a CIP from V2.4 before a CIP from V2.1) may lead to unexpected outcomes.
38+
39+
## Hardfork & CIPs Configuration
40+
41+
The following are the hardfork and CIP activation configuration options introduced in each version of Conflux-Rust:
42+
43+
### v1.1
44+
45+
#### Hardfork Configuration
46+
47+
| Configuration Key | CIP(s) |
48+
|---------------------------------|-----------------------|
49+
| tanzanite_transition_height | CIP39, CIP40 |
50+
51+
### v2.0
52+
53+
#### Hardfork Configuration
54+
55+
| Configuration Key | CIP(s) |
56+
|---------------------------------|-----------------------|
57+
| hydra_transition_number | CIP43, CIP64, CIP71, CIP78, CIP92 |
58+
| hydra_transition_height | CIP76, CIP86 |
59+
60+
#### CIP Configuration
61+
62+
| Configuration Key | CIP(s) |
63+
|---------------------------------|-----------------------|
64+
| cip78_patch_transition_number | CIP78 |
65+
| cip90_transition_height | CIP90 point a |
66+
| cip90_transition_number | CIP90 point b |
67+
68+
#### PoS chain Configuration
69+
70+
| Configuration Key | CIP(s) |
71+
|---------------------------------|-----------------------|
72+
| cip43_init_end_number | CIP43 |
73+
| pos_reference_enable_height | |
74+
75+
### v2.1
76+
77+
#### hardfork Configuration
78+
79+
| Configuration Key | CIP(s) |
80+
|---------------------------------|-----------------------|
81+
| dao_vote_transition_number | CIP97, CIP98, CIP94, CIP105 |
82+
| dao_vote_transition_height | CIP94 |
83+
84+
#### CIP Configuration
85+
86+
| Configuration Key | CIP(s) |
87+
|---------------------------------|-----------------------|
88+
| cip105_transition_number | CIP105 |
89+
90+
### v2.2
91+
92+
#### Hardfork Configuration
93+
94+
| Configuration Key | CIP(s) |
95+
|---------------------------------|-----------------------|
96+
| sigma_fix_transition_number | |
97+
98+
### v2.3
99+
100+
#### CIP Configuration
101+
102+
| Configuration Key | CIP(s) |
103+
|---------------------------------|-----------------------|
104+
| cip107_transition_number | CIP107 |
105+
| cip112_transition_height | CIP112 |
106+
| cip118_transition_number | CIP118 |
107+
| cip119_transition_number | CIP119 |
108+
109+
#### PoS chain Configuration
110+
111+
| Configuration Key | CIP(s) |
112+
|---------------------------------|-----------------------|
113+
| cip113_transition_height | CIP113 |
114+
115+
### v2.4
116+
117+
#### Hardfork Configuration
118+
119+
| Configuration Key | Required | CIP(s) |
120+
|---------------------------------|------------------------------------|-----------------------|
121+
| base_fee_burn_transition_number | | CIP131, CIP132, CIP133, CIP137, CIP144, CIP145, CIP-141,142,143 |
122+
| base_fee_burn_transition_height | | CIP130, CIP133, CIP1559 |
123+
124+
#### CIP Configuration
125+
126+
| Configuration Key | CIP(s) |
127+
|---------------------------------|-----------------------|
128+
| cip1559_transition_height | CIP1559 |
129+
| cancun_opcodes_transition_number| CIP-141,142,143 |
130+
131+
### v2.5
132+
133+
#### Hardfork Configuration
134+
135+
| Configuration Key | Required | CIP(s) |
136+
|---------------------------------|------------------------------------|-----------------------|
137+
| c2_fix_transition_height | | |
138+
139+
### v2.6
140+
141+
#### Hardfork Configuration
142+
143+
| Configuration Key | Required | CIP(s) |
144+
|---------------------------------|------------------------------------|-----------------------|
145+
| eoa_code_transition_height | | CIP150 CIP151 CIP152 CIP154 CIP645 CIP7702 |
146+
| align_evm_transition_height | | |
147+
148+
#### CIP Configuration
149+
150+
| Configuration Key | Required | CIP(s) |
151+
|---------------------------------|------------------------------------|-----------------------|
152+
| cip151_transition_height | | |
153+
| cip645_transition_height | | |
154+
155+
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.
156+
157+
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.

docs/running-node/node-configuration.md

Lines changed: 8 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -12,105 +12,22 @@ The configuration file path can be specified using the command-line parameter `-
1212
./conflux --config /path/to/your/config.toml
1313
```
1414

15-
## Hardfork Configurations
15+
## Enable all CIPs in private network
1616

1717
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.
1818

1919
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).
2020

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.
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 and hardcoded in the released Conflux node binaries. 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.
2222

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.:
23+
Most requirements for running a private network are to run an environment that includes all the latest features. Due to the peculiarities of the genesis block, features added by CIP cannot be activated in the genesis block. Therefore, the most common and simplest approach is to activate all features in the block immediately following the genesis block.
5024

5125
```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
26+
default_transition_time = 1
27+
# cip1559 needs to be activated after the pos_reference_enable_height
28+
pos_reference_enable_height = 1
6029
```
6130

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.
31+
This configuration will activate all implemented features at the first block after the genesis block.
11532

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.
33+
More precise control over the activation timing of each feature is mainly used for code integration testing. If you are absolutely certain that you need to use this feature, please read [CIP configuration](./cips-configuration.md).

0 commit comments

Comments
 (0)