Introducing Eden ⚛️
Eden is the v0.50 release of the
@Cosmos_SDK - ushering in an era of enhanced modularity and performance.
This release is set to boost tremendously the performance of Cosmos SDK chains!
In the following post, you will discover Eden's features and witness the disruptive potential 👇
Eden is a powerful confluence of pivotal features, such as the completion of ABCI , which revolutionizes consensus flexibility, and the introduction of AutoCLI, reducing the complexity of module creation, enabling a smoother and more efficient developer experience.
IAVL 1.0 is another highlight, bringing forth substantial improvements in disk storage and overall performance, representing a critical advancement in the Cosmos SDK infrastructure. New additions like Optimistic Execution further enhance performance, enabling the execution of block time ahead of consensus.
Also notable is the introduction of Sign Mode Textual, improving transaction signing experience, ensuring that the Cosmos SDK remains at the forefront of technological innovation.
Let’s explore other key and notable changes in the Eden release in more detail.
ABCI
With this release,
@CometBFT and
@Cosmos_SDK teams will have delivered the final piece of ABCI : Vote Extensions. In the previous release, we delivered the preliminary phases of ABCI : Prepare and Process Proposal. Vote Extensions complete this process by allowing users to add arbitrary data to consensus. Some example use cases include leveraging vote extensions for oracles instead of having validators submit transactions to be included in a block. It also can be applied in conjunction with MEV use cases, addressing front-running issues or implementing Threshold Decryption.
Coinciding with the integration of ABCI , other changes were made to the core layer, including:
BeginBlock and Endblock are private and Finalizeblock is exposed for testing purposes. This allows modules to test in the same way as before.
When upgrading a chain, Preblock is meant to run before BeginBlock. This will upgrade the chain and migrate state. This was meant as a separation of concerns for upgrades to not conflate it with the normal operations of a chain.
AutoCLI
At the beginning of 2023, we set out to reduce the total lines of code needed to create a module. CLI is optional, but many users do implement it as CLI is used heavily by countless users.
With this in mind, we are pleased to announce the release of AutoCLI in Cosmos SDK Eden.
CLI for your custom modules can now be automatically generated when needed, reducing the amount of boilerplate when writing a module.
IAVL 1.0
In conjunction with this release, the rollout of IAVL 1.0 has facilitated significant improvements to disk storage and overall performance, with a fundamental change in the key structure of the IAVL tree. In the earlier versions of IAVL, the original key format was a hash key meaning when the dataset grew, accessing the data became slower and less efficient.
The new key structure combines the version and local nonce within the key. The reason that this change improves data locality is because it reduces the randomness in how data is stored on disk. By including the version in the key, nodes are grouped together based on the version in which they were added to the tree, meaning that nodes from a particular version are stored together on disk. Similarly, the local nonce is used to distinguish nodes that belong to the same version but have different positions within that version allowing the tree to keep a specific order for nodes within the same version, again allowing retrieval to be more structured and organised.
Modules
Writing a module has been notoriously verbose in the past, with this release we have made it simpler with things like Collections and ORM. These packages are abstractions over the state layer providing powerful yet simple ways of interacting with state. In the future these packages will export the on-disk schema to be used with query layers, like GraphQL, to build complex and scalable clients. Additional changes include:
Gov added expedited proposals and stay tuned for multiple choice proposals and optimistic voting coming the next release.
Capability module was moved to the Cosmos SDK module.
BeginBlock signature does not import CometBFT types and returns an error
Endblock does not import CometBFT unless there is a need to return a validator set. This should be handled by the staking module, leaving all chains to not worry about this.
All modules have been migrated to use collections
Validate Basic is no longer required and validation of the method can be performed directly in the message server.
GetSignBytes which was part of sdk.Msg is no longer required. It is automatically inferred based on the protobut message. If you have existing modules and would like to keep the same encoding in Amino, you will need to annotate some of the fields in your proto messages.
Optimistic Execution
As previously stated, we are actively towards enhancing performance further and one of the features contributing to this is optimistic execution.
Optimistic Execution is the ability to be able to execute block time ahead of time, having the response ready prior to the consensus layer requesting it. It is Optimistic as it can still be rejected although we are executing the block.
This feature enables Cosmos SDK chains to build blocks with groundbreaking velocity, pushing the limits of block times and efficiency.
In load tests on Sei Network, Optimistic Execution cut the block time by 50%. On fast block-producing networks like Injective, OE can help the network generate sub-1-second blocks without any extra effort.
Sign Mode Textual
Eden also introduces a new sign mode, sign_mode_textual, which improves the signing of transactions with new hardware devices. The aim is to produce a more human-readable way to approve, review, and view transaction details. Currently, this is only available on Ledger devices.
If Eden got you excited about the future of the Cosmos SDK - be sure to follow
@cosmos_sdk to stay updated on the latest release and upcoming features!