The following post describes our plan for an upcoming IBC/Stargate upgrade of Secret Network. We’ll start off with a forum discussion (this post), followed by a signaling proposal on-chain. Assuming it passes, we (Enigma) plan to put significant resources towards developing this functionality. We’d love to get some community feedback beforehand, here on the forum, as well as our community Discord and Telegram channels. Please read through it, and let us know what you think, what we might be missing, and what we should change. This will be affecting all stakeholders in the network, and we don’t want to leave anyone behind. Other stakeholders, such as wallet and explorer providers, need to be aware that this IBC upgrade would require them to upgrade their software as well, and in a timely fashion.
Secret Network Stargate upgrade proposal
One of the most requested features in the last several months has been integrating Secret Network with the rest of the Cosmos ecosystem through IBC. The time has finally come to shift our focus to upgrading our network to the latest Cosmos-SDK version, and catch up on all the work that has been done upstream in the Cosmos ecosystem since we released our first mainnet in February of last year.
Our current mainnet is based on Cosmos-sdk v0.38, and in this upgrade we’ll be targeting v0.43. The v0.40 upgrade was a massive undertaking for the Cosmos Hub and other chains in the ecosystem, and while we lay out an ambitious timeline here, and we do expect to encounter various unexpected challenges along the way, we believe that together we can achieve it.
We’re still examining the path to upgrading the CosmWasm module. We’re currently on version 0.10, and while we’d like to upgrade to 1.0 (or v0.14), we’re examining the ways to be able to do this without breaking existing contracts. We will be including stability and performance fixes to the CosmWasm module, but at the current moment not upgrading to the next major version. Note: Contracts will still be compatible with IBC.
We see three milestones on our way to releasing the next version of Secret Network:
Milestone 1 - Essential Stargate Updates
As a first step, we will have to complete upgrading our codebase to cosmos-sdk v0.42+ (targeting 0.43 when released). This has been mostly completed by now, as we’ve worked on this on a couple of occasions this year. The following tasks remain:
- Migrating the Foundation Tax module - This is the module responsible for distributing a portion of block rewards to the Secret Foundation. It works similarly to the community pool module, but is a separate module.
- Migrating the Registration module - This is the module responsible for registering new nodes to the network (SGX attestation and key exchange)
- Migrate and fix tests - We have a huge amount of tests in our codebase, constituting a large portion of the line count in the project. These will need to be updated to work with the new cosmos-sdk, and then we’ll have to fix any broken tests.
- Update documentation and tooling - All official docs must be updated to reflect the new tools, and the tools themselves must be updated to work with the new interfaces.
After this milestone is done, we will be releasing a public testnet, allowing node runners & developers to be able to experiment with the new features and interfaces, and test new setups. We’re targeting the 1st of August for this milestone.
Milestone 2 - IBC Integration
Once we have updated our codebase to Stargate, we can start playing around with integrating the new IBC modules into our network. IBC will allow us to use SCRT in cross-chain Cosmos applications such as Osmosis and Gravity DEX, and provide our privacy features to the entire Cosmos ecosystem. This milestone will involve some changes to the code, and a LOT of integration testing. These are the main things that need to happen:
- Integrate IBC core and token module - Integrate the IBC core module into our codebase, enabling connecting IBC channels to our network, followed by enabling transfer of assets from other chains to our network, and vice versa.
- Set up relayers - Relayers are the IBC equivalents of bridge nodes. We will have to set up relayers between SN and other chains, make any needed modifications to accommodate our compute module, and document the process so other chains can bridge to us.
- Minimal CosmWasm changes for IBC interoperability - We’d like to allow contracts to send messages across IBC channels and ports. We have to add this functionality to our current runtime without breaking existing contracts.
Milestone 3 - Additional Features
The two milestones above include features that we see as essential features of the Stargate/IBC upgrade. Once those are completed, we have several other tasks that we’d like to include in the nearest hard fork. Although not required, these are “nice to have” features that should enable many new use cases on our network, and simplify some of the workflows that require workarounds today.
- Integrate x/upgrade, x/authz, and x/fee_grant modules - These three modules have recently been introduced to Cosmos, and should greatly simplify network upgrades, and workflows for companies that want to integrate Secret Network seamlessly in consumer-oriented applications
- Interchain accounts - This is an IBC module which should allow accounts to interact with applications across IBC-connected networks. This includes calling Secret Contracts from other chains, and interacting with the rest of the Cosmos ecosystem from inside Secret Network
- Additional CosmWasm features - As appropriate, and as possible, we want to backport some CosmWasm features to our runtime, without causing breakage to existing secret contracts. The Confio team has made some valuable improvements to programmer ergonomics, which we’d like our developer community to enjoy as well.
- Outstanding minor improvements - There are several outstanding issues and PRs that are open in our repo. We’d like to take this opportunity to include them in the next hard fork.
We expect to complete these three milestones in the next two months, and we’ll be targeting 1st of September to launch the new mainnet. We’ll be releasing several testnets in the coming weeks, giving wallet providers, application developers, node runners, validators, and any other players on the network time to ensure they can migrate to the next network version.
Voting Yes on this proposal indicates agreement with this plan and the features described above.
Voting No on this proposal indicates disagreement with this plan and the features described above.
If this signalling proposal is rejected by the community, we’ll reevaluate our plans and try to lay out a different roadmap for this upgrade.
Thanks for reading all the way through, and thanks for voting! Onwards and upwards!