Initial Proposal: Cronos v1.2 Network Upgrade #1383
lezzokafka
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Authors and Credit
Cronos Team and Community
Status
DRAFT
Proposal
Dear community members, we are pleased to propose the scheduled
v1.2
Cronos mainnet upgrade. The Cronos Mainnet versionv1.2
introduces improvements to backward compatibility and RPC improvements.The tentative upgrade block height is set to 13520000 which is expected around
7 AM GMT on the 17th of April 2024 (3 PM HKT/SGT).
This proposes a breaking network upgrade for the Cronos Chain mainnet "cronosmainnet_25-1". This implies that validators and full nodes must upgrade their
cronosd
binary from the current versionv1.1.*
to the latest v1.2 binary at block height13520000
, the block countdown timer can be found here.What is this upgrade about?
The Cronos v1.2 upgrade focuses on two major goals:
block.prevrandao
orblock.difficulty
in their contractsIn the Titan upgrade, we have implemented Ethereum's "Shanghai" upgrade as part of Cronos' roadmap of Ethereum compatibility. This introduced a breaking change for some smart contracts deployed on Cronos, which were utilizing the
block.difficulty
and/orblock.prevrandao
expressions in their smart contracts:Before the Titan upgrade:
These expressions returned a meaningless constant value on Cronos (not a random number).
After the Titan upgrade:
The
block.prevrandao
opcode does not exist and these expressions were returning an error at execution.In the v1.2 upgrade, the opcode associated with
block.difficulty
and/orblock.prevrandao
(which are interchangeable depending on the Solidity version) returns a constant value again. This fixes the behavior of legacy smart contracts without impacting new ones.As a reminder, this constant value is meaningless and smart contract developers should not use these expressions in their smart contracts going forward, especially as a source of randomness. Depending on future evolutions of go-ethereum and Solidity, it is possible that
block.difficulty
and/orblock.prevrandao
may become inoperative again in the future.As described in this pull request, v1.2 includes:
This v1.2 upgrade supports RPC querying for blocks generated in previous versions of Cronos.
Testing
The proposed upgrades and changes have been tested on both internal testnets and the Cronos testnet (currently at v1.2.0-rc1) to ensure the achievement of expected outcomes.
Action required
Node hosts must apply the new v1.2 binary at the upgrade height; otherwise, the node will stop operating;
DO NOT upgrade your node before the upgrade block height, as the new binary is incompatible before the upgrade height.
References:
Pull request for legacy PRC quering
Pull request for prevrando opcode supports
Beta Was this translation helpful? Give feedback.
All reactions