Cronos Testnet v0.7.0 Upgrade — Release Notes
The Cronos development team has been working on upgrades to our Cronos testnet and building the latest Cronos Testnet binaries for v0.7.0…
The Cronos development team has been working on upgrades to our Cronos testnet and building the latest Cronos Testnet binaries for v0.7.0, from v0.7.0-rc0 to v0.7.0-rc3.
These 0.7.0 series binaries include several significant upgrades, bug fixes, new features and performance improvements.
Following-up on the recent blog post Network Upgrade on Cronos Testnet v0.7.0, today we will dive deeper into the technical notes for each binary.
v0.7.0-rc0
v0.7.0-rc0
is the first release candidate of the upcoming v0.7.0 version
. It’s a major breaking version, containing multiple bug fixes, major new features and significant performance improvements.
Specifically, the binary is upgraded to Cosmos SDK v0.45.0, including critical changes in gas consumption and API. The gas fee is charged on .Seek()
, even if there are no entries. It is also charged for the key length on top of the value length. Another change is that when the block gas limit is exceeded, the maximum gas possible is consumed for the performed computation. We also fixed a bug when the last transaction in a block exceeded the block gas limit, it returned an error result even though the tx was actually committed successfully.
In terms of API, there are changes to the interface of BankKeeper
(which has a new HasSupply
method to ensure that input denom actually exists on-chain), CommitMultiStore
(which contains a new SetIAVLCacheSize
method for a configurable IAVL cache size), and AuthKeeper
( x/auth
now includes a function HasAccount
). Moreover, when using the SetOrder
functions in simapp, it is now required that all modules be present in the function arguments, or else the node panics at startup.
Also, Ethermint is updated to v0.10.0-alpha1-cronos-2. The major changes are:
Ethermint is enhanced with a new
feemarket
module which introduces a dynamic fee structure to the network;Ethermint includes refactored EVM StateDB implementation to expand the capacity and boost the speed. This new implementation greatly increases the speed of execution of message calls and of accessing deep context stacks. Execution of message calls is up to 300 times faster than before. Additionally, the speed of emitting logs has been doubled;
EVM state transition can be achieved by
MsgEthereumTx
, which encapsulates an Ethereum transaction as an SDK message and contains the necessary transaction data fields. This version supports batching multipleMsgEthereumTx
‘s in a single cosmos transaction which enhances efficiency.
v0.7.0-rc1 & V0.7.0-rc2
In v0.7.0-rc1 and v0.7.0-rc2, multiple bug fixes have been resolved. In v0.7.0-rc1, the developer team found that min-gas-price
change in Ethermint was not merged and worked on a merge on this to compile with the last Ethermint.
V0.7.0-rc2 serves as a consensus-breaking upgrade based on v0.7.0-rc1.
To fix the issue that batchTxExecuted
uses an incorrect contract address in the gravity bridge module, V0.7.0-rc2 is integrated with the later gravity bridge version of 0.3.9 which contains a bug fix on batchTxExecuted
.
With the Cosmos-SDK v0.45.1, the config parameter iavl-cache-size
fixed OOM failures and helped to solve the large memory usage issue that existed in previous binaries. On top of v0.7.0-rc1, this version fixed the base fee check logic in Ethermint and supported eth_call
for blocks prior to the upgrade.
Other updates in this version include a new swagger UI version which disabled the URL query parameter in swagger-UI, and the newer Ethermint/Cosmos-sdk
dependencies for bug fixes and improvements, such as subscription deadlock issues in Ethermint fix and data races in traceContext
.
v0.7.0-rc3
Following the consensus-breaking upgrade based on v0.7.0-rc2, multiple dependency upgrades (Ibc-go, Ethermint, Cosmos-SDK) and new app configs have been applied. The key updates are as follows.
There was no integration test for the WebSocket RPC endpoint previously. In this binary, we have updated Ethermint to fix a WebSocket bug as well as implemented WebSockets integration tests, in which we added the cronos-ws provider to run exiting test cases on WebSocket endpoint.
In addition, the core developer team backport the feature to 0.45.x in Cosmos-SDK to solve the problem on the debugs mode query results don’t show panic details. Now it is able to display detailed panic information in query results when —-trace
is enabled.
Other major Ethermint bug fixes in this binary include the following:
1) gas
is a simple alias for uint64
in the Cosmos SDK, and is managed by an object called a gas meter which implements the GasMeter
interface. AnteHandler
is generally used for performing basic validity checks on a transaction, such that it could be thrown out of the mempool, which also can be seen as a set of decorators that check transactions within the current context. This binary fixes GasMeter
reset in AnteHandler
, which solves the transaction inclusion issue by reporting the correct gasWanted
of eth transaction.
2) One frequent report in the past weeks was that Metamask kept failing to send transactions that resulted from the feemarket base fee issue, as Metamask did not add any buffer and used the base fee specified in the block. Specifically, this is because our feemarket design did not have any “prioritization fee” compared to Ethereum EIP-1559 design. (Cosmos SDK does not have prioritisation mechanism). Prioritization fee being always 0, the gas price value does not have any buffer. and if the value of the gas price increases between the time the transaction is sent and the time the transaction is received, then the transaction will fail with not enough gas price error. The solution is to always increase the estimation by a small buffer value, hence the team has built a buffer to eth_gasPrice
response.
3) For the recent reported eth_feeHistory
error of ERR RPC method eth_feeHistory crashed: runtime error: invalid memory address or nil pointer dereference
, we implemented a quick fix on this when the reward is nil
.
4) The previous returnValue
is hardcoded to an empty string when using the default tracer for debug_traceTransaction
, which requires MsgEthereumTxResponse
to replicate the behaviour on Go Ethereum. We add returnValue
message on tracing to solve this issue.
Extra Ethermint bug fixes include additional configurable MaxTxGasWanted
and timeouts to json-rpc
server, and multiple json-rpc
fixes.
To upgrade to this version, it is required to use upgrade plan v0.7.0-rc3-hotfix-testnet
to upgrade from rc2
to rc3
.