You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To meet on-chain development needs and embrace latest ZK and rollup techniques, the XDC network should fully support Solidity V0.8.23. To achieve this, we need to upgrade XDC's EVM, which mainly involves adding new opcodes. This post specifies the EVM upgrade plan.
V0.8.24 is a huge yet very recent upgrade. For the timebeing and for system reliability, we will not consider it for now.
2. Methodology
2.1 opcodes
To support solidity v0.8.23, the following opcodes must be added to EVM:
BASEFEE: exposes the block's base fee
RANDOM, PREVRANDAO: return arbitrary values in the full 256-bit range
PUSH0: smaller code size and gas savings
2.2 Special note about EIP-1559
The opcode BASEFEE was implement in EIP-3198, which is part of the gigantic EIP-1559 upgrade. However, EIP-1559 is mainly about adaptive fees, which is not of high priority for XDC. Therefore, we will only impellent EIP-3198 without implementing the entire EIP-1559. But we can implement the JSONRPC API for EIP-1559 based on fixed gas price.
3. Detailed Operations
3.1 Preparation
Upgrade package vm by pick some new commits from Ethereum codebase after 2018. Our vm package is updated by the PR new EVM Upgrade on 2019-01-04. Our code is a bit outdated now. We reviewed all new commits about vm package, and plan to apply the following PR from Ethereum into XDC chain. This will not only improve the performance of our network, but will also make further EIP upgrade on XDC much easier.
We will work from the latest commit of the dev-upgrade branch. Each PR will also be merged into the dev-upgrade branch.
In terms of role, Dan Liu and Gerui Wang will develop the code. Galaxy Deng will provide test smart contracts. The protocol team will also provide infra support.
id
task
develop
local test
owner
helper
3.1
preparation
1-2 week
1-2 week
Dan
3.2
EIP-3198
1-2 weeks
1-2 weeks
Dan
Galaxy
3.3
EIP-4399
1-2 weeks
1-2 weeks
Gerui
Galaxy
3.4
EIP-3855
1-2 weeks
1-2 weeks
Gerui
Galaxy
The expected total development time will be 6-8 weeks.
5. Test Strategy
5.1 Local test
Each PR should be shipped with comprehensive unit tests and should pass all test cases
Local network will be deployed for each PR
Test cases will include all combinations: network with or without PR, smart contacts with lower or higher solidity version
Use curl, remix, MetaMask for integration test
5.2 Online test
After the development:
a switch block number will be set for XDC devnet, Apothem testnet, and XDC mainnet, separately
one-month of devnet test: documentation on the upgrade and API change
two-month of apothem test: coordinate with the foundation to invite the community to try out and provide feedback
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
EVM upgrade plan
Authors: Dan Liu, XDC Protocol Team
Note: this post is an updated and more detailed version of a previous EVM upgrade post.
1. Context
The XDC network currently only supports solidity v0.8.6 in ful and v0.8.19 partially. Here is the current support status:
To meet on-chain development needs and embrace latest ZK and rollup techniques, the XDC network should fully support Solidity V0.8.23. To achieve this, we need to upgrade XDC's EVM, which mainly involves adding new opcodes. This post specifies the EVM upgrade plan.
V0.8.24 is a huge yet very recent upgrade. For the timebeing and for system reliability, we will not consider it for now.
2. Methodology
2.1 opcodes
To support solidity v0.8.23, the following opcodes must be added to EVM:
2.2 Special note about EIP-1559
The opcode BASEFEE was implement in EIP-3198, which is part of the gigantic EIP-1559 upgrade. However, EIP-1559 is mainly about adaptive fees, which is not of high priority for XDC. Therefore, we will only impellent EIP-3198 without implementing the entire EIP-1559. But we can implement the JSONRPC API for EIP-1559 based on fixed gas price.
3. Detailed Operations
3.1 Preparation
Upgrade package vm by pick some new commits from Ethereum codebase after 2018. Our vm package is updated by the PR new EVM Upgrade on 2019-01-04. Our code is a bit outdated now. We reviewed all new commits about vm package, and plan to apply the following PR from Ethereum into XDC chain. This will not only improve the performance of our network, but will also make further EIP upgrade on XDC much easier.
OpCode.String()
3.2 EIP-3198
We can pick codes from Ethereum in the implementation of EIP-1559:
3.3 EIP-4399
We can pick codes from Ethereum in the implementation of EIP-4399:
3.4 EIP-3855
We can pick codes from Ethereum in the implementation of EIP-3855:
4. Develop schedule
We will work from the latest commit of the dev-upgrade branch. Each PR will also be merged into the dev-upgrade branch.
In terms of role, Dan Liu and Gerui Wang will develop the code. Galaxy Deng will provide test smart contracts. The protocol team will also provide infra support.
The expected total development time will be 6-8 weeks.
5. Test Strategy
5.1 Local test
5.2 Online test
After the development:
6. Future Work
Beta Was this translation helpful? Give feedback.
All reactions