Announcing the Cronos Titan Upgrade
Cronos Mainnet version 1.1 introduces major node and RPC performance improvements. It also lays the foundation for upcoming user-facing features that leverage the best of Cosmos and Ethereum.
We are excited to announce the planned highlights of the upcoming Titan Upgrade for the Cronos mainnet, scheduled to go live on March 26, 2024.
This upgrade brings significant improvements aimed at fine-tuning performance, boosting synchronization speed, and bolstering the overall robustness of the Cronos network.
The Cronos Titan upgrade guide for node operators, including block height and revised estimated date of the upgrade, will be released soon in this blog.
TL;DR
The Cronos Titan upgrade focuses on two major goals:
First, node and RPC performance improvement.
Every user knows how important it is for their experience that the blockchain network stays snappy, responsive and in sync during periods of high transaction activity. It is often during times of high traffic that DeFi traders find the best opportunities, and they want to make sure that their transactions are processed reliably and that transaction confirmations are available quickly, whether it is from the block explorer or directly from a JSON-RPC endpoint.
Titan delivers major performance improvements:
MemIAVL - A performance boost for syncing in Cronos, offering speedy synchronisation with key benefits: local snapshot storage, dramatic snapshot time reduction (16 hours to 5 minutes), optimized block execution (over 10 times faster), and quick snapshot exports (8 minutes instead of 11 hours).
RPC performance - Notably improved for complex requests for contract tracing, with a 78% reduction in response time.
These improvements come in addition to the availability of VersionDB (which was already released with version 1.0.4) - Reduces database size by 63% by eliminating the IAVL tree, improving query performance.
Second, lay the foundation for upcoming user-facing features that leverage the best of Cosmos and Ethereum.
Cronos is committed to the Cosmos SDK ecosystem, which remains one of the most vibrant places in crypto today. Users expect an ever increasing level of interoperability between Cosmos SDK chains, and Titan enables Cronos to stay up to date with Cosmos innovations.
When it comes to the EVM layer of Cronos, it also aims to leverage the best of what Ethereum has to offer, such as account abstraction.
Titan enhances interoperability with the Cosmos SDK ecosystem and prepares future user-facing use cases such as Interchain Accounts and Account Abstraction:
Introduction of CRC21 - Enhances cross-chain interactions, allowing native Cronos token transfers, including VVS, to IBC-enabled Cosmos-SDK chains.
Pre-Compiled and ICA in Cosmos - Enables smart contracts to access Cosmos features, bridging chain ecosystems. Interchain Accounts (ICA) standardises interchain transactions, making cross-chain communication more efficient.
Account Abstraction (experimental stage) - Allows smart contracts to act as user accounts, broadening the range of DApps use cases and facilitating complex actions on Cronos.
Let's dive in.
Sync Speed Boost With MemIAVL
MemIAVL is a drop-in replacement for the current database implementation, unlocking substantial performance enhancements for the export and loading of chain snapshots, making for a speedier synchronization to the latest blocks. Key improvements include:
Local Snapshot Storage: Snapshots can be stored locally and effortlessly shared with others, eliminating the need to fetch them from the network. This solves a known issue with the current Tendermint P2P design, which sometimes fails to complete snapshot fetching.
Dramatic Snapshot Time Reduction: Snapshot restoration time shows a remarkable reduction, with tests showing snapshot restoration time reduction from 16 hours to just 5 minutes. Additionally, the snapshot size is now 35% smaller, down from 22 GB to 14 GB.
Optimised Block Execution: The end-to-end block execution performance is significantly improved with test results showing over 10 times faster execution of Cronos mainnet blocks. The implementation of MemIAVL with VersionDB together enhances the synchronization speed of the RPC node, delivering faster synchronisation capabilities for node hosts.
Quick Snapshot Exports: Exporting snapshots is now a breeze, taking just 8 minutes instead of the previous 10.5 hours, facilitating a more frequent and up-to-date backup and sharing of snapshots.
Improvement of JSON-RPC Performance
JSON-RPC requests have shown a significant improvement in response time, particularly for complex requests that require more state queries to the database. For example, debug_traceBlockByNumber
, used to debug and trace internal contract calls, has shown a 41ms response time on average with VersionDB, compared with 194ms with RocksDB. This is a ~78% reduction in response time. The difference is even more significant for larger queries, as seen in the graphs below.
Note that for simple queries not requiring many state query calls to the database, response times remain similar.
Storage Improvements With VersionDB
While versionDB was already introduced in Cronos V1.0.4, this blog post acts as a reminder of how it contributes to the performance in the context of V1.1. VersionDB offers a substantial reduction in database size. By directly storing multiple versions of on-chain state key-value pairs, it eliminates the need for the bulky IAVL tree structure, resulting in a remarkable 63% reduction in disk size for archive nodes after migration. VersionDB enhances query performance, ensuring faster and more efficient data retrieval compared to the IAVL tree.
Node operators should keep in mind that VersionDB has different implementations and does not support other database backends. Our current implementation, based on RocksDB v7's experimental user-defined timestamp, storing data in a standalone RocksDB instance. However, it does not currently support alternative database backends. Moreover, it lacks root hash and Merkle proof generation for historical data, necessitating the continued use of the IAVL tree for specific use cases. These considerations will help node operators make informed decisions about incorporating VersionDB into their projects, depending on their use case. Do not hesitate to contact Cronos Labs to discuss trade-offs.
For further details, please explore our dedicated VersionDB blogpost and the official doc on VersionDB.
Publication of CRC21 Standard
Built upon the CRC20 standard, the CRC21 standard details two key events (CronosSendToChain
and CronosCancelSendToChain
) essential for facilitating smooth cross-chain transfers of CRC20 tokens between Cosmos chains.
Also, a notable function send_to_ibc
has been enhanced to support cross-chain transactions, opening doors to interactions with various Cosmos chains like Osmosis.
Two new fields: channel_id
(for specifying the target Cosmos chain to perform the cross transfer), and extraData
(to accommodate the additional metadata, such as fee), have been added.
This upgrade allows native Cronos tokens to be transferred to other chains. ‘Bidirectional token transfer’ is enabled so that a CRC20 token (created on Cronos) can be sent to another chain natively using the CRC21 standard. This enhances interoperability and simplified use cases that rely on token transfers.
Further details are available in the ADR Doc.
Pre-Compile for ICA (Interchain Account)
Precompiles serve as specialized, EVM-layer operations designed to facilitate access to Cosmos SDK features through smart contracts. The key distinction is that their execution doesn't occur within a smart contract. This enables the exposure of Cosmos SDK native features at the EVM layer, bridging the gap between two powerful chain ecosystems. One notable relayer precompile is for IBC, which enables developers to trace, filter, or subscribe to IBC-related events, such as recv_packet
or write_ack
.
Interchain Account (ICA) brings cross-chain communication to a new level by providing a standardized method for handling interchain transactions. It allows users to send messages and track their state changes between different appchains. With ICA, users and smart contracts can seamlessly register ICAs and submit transactions on host chains where permitted. Smart contract users receive real-time notifications via callbacks, ensuring an efficient process in managing ICA-related operations.
Cosmos SDK V0.47 and IBC Upgrades
Cronos' integration with Cosmos SDK V0.47, coupled with the latest IBC upgrades, strengthens the foundation of Cronos as a reliable blockchain platform. These upgrades, now incorporated into Cronos via the Titan Upgrade, open doors to new possibilities for developers and users alike. Notable improvements include:
CometBFT V0.37 is now integrated into the Cosmos SDK, replacing Tendermint Core as the official state machine replication engine for the Interchain Stack. It serves as the successor to Tendermint Core and aims to become the preferred choice for robust, secure, and scalable application-specific chains.
The Params Module is now in maintenance mode, and a new approach has been adopted, allowing parameters to be managed by individual modules for enhanced precision and adaptability across various application components. The deprecated Params Module will still be accessible so teams can make a gradual transition. A new module handling Tendermint parameters has also been introduced.
The release includes a vital upgrade to ABCI 1.0, introducing ‘prepareProposal’ and ‘processProposal’ methods for improved application-consensus engine communication. It also adds an App-side mempool, allowing custom mempools and block construction. This enhancement facilitates the creation of specialized use cases, such as allocating a percentage of each block exclusively for IBC transactions, offering flexibility for complex fee market designs.
For the IBC upgrade, Cronos is transitioning directly from version 5.2.1 to 7.3.1. To learn more about the various updates related to migration, please visit the IBC-go migration documentation.
Integration of IBC RPC Into the Blockchain Explorer
Cronos, an Ethereum Virtual Machine (EVM) compatible blockchain built with the Cosmos SDK, has embraced the Inter-Blockchain Communication Protocol (IBC) right from the start. In this upgrade, Cronos is further enhancing IBC's RPC capabilities, making it easier for different blockchain networks to communicate effectively and boosting interoperability at the core.
The commitment of Cronos to Cosmos SDK and IBC is reflected in the development roadmap of Cronos Explorer, the new blockchain explorer. Cronos Explorer will simplify user access to Cronos data, addressing the challenge of viewing transaction details across the EVM and Cosmos layers - a frequent user need. During the coming months, Cronos Explorer will integrate Cosmos Proposals Data, Cosmos Validators Data, and Cosmos IBCs Data. This will allow users to not only access Cronos data but details on Cosmos proposals, validators, and IBCs, as well - all within a single, comprehensive interface.
Some of these enhancements are already available on the Cronos Explorer for Testnet, allowing users to easily view Cosmos layer transactions. For more details, read the Cronos Explorer blog post.
Account Abstraction on Cronos
Account Abstraction simplifies blockchain interactions by allowing smart contracts to serve as user accounts, merging contract capabilities with account management. The Titan upgrade opens the door for Account Abstraction to become reality on Cronos mainnet.
With Account Abstraction, there are two types of accounts: Externally Owned Accounts (EOAs) and Contract Accounts. Traditionally, EOAs, controlled by private keys, have been the norm for executing transactions and managing digital assets. On the other hand, Contract Accounts, defined in the form of smart contracts, are controlled by their contract code. This code specifies which account can be accessed and the actions it can perform, enabling them to perform complex actions on the blockchain, similar to the functionality provided by smart contracts.
Key components have been developed to facilitate further development of Account Abstraction. Some of these components are still at an experimental stage:
User Operations, serve as a new type of transaction object containing additional data, allows for custom transaction and security configurations.
JSON-RPC API debug_traceCall, allows for the simulation of User Operations before their actual execution on the chain.
Bundlers serve as crucial nodes that bundle unsigned User Operations into a single package for signing and subsequent publication on the mainnet. Bundlers estimate transaction fees.
Entry Point Contract, an audited and trusted singleton contract, is functional and can process the execution and validating User Operations.
Account Abstraction opens up possibilities for numerous use cases such as multi-signature transactions, social recovery, contract whitelisting, custom gas tokens, subsidizing gas fees, and much more. It expands the use-case potential of DApps and enables a more intuitive user experience.
Native account abstraction is still at an experimental stage on Cronos, not yet suitable for production use cases. However, there are application-level account abstraction solutions available for developers who need AA functionality now, such as Cometh. Please contact Cronos Labs if you would like to be introduced to the relevant developer tool platforms.
What’s Next
Overall, the Cronos mainnet Titan Upgrade is a significant step forward and shows Cronos' commitment to making a top-notch blockchain experience even better.
The Cronos Titan upgrade guide for node operators will be released soon. Stay tuned for further updates.