Secret Network IBC upgrade (Stargate)

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!

30 Likes

Hi @reuven & Enigma team,

We fully support all the points for upgrade highlighted by you in this post.

Looking forward to SecretNetwork Protocol on Cosmos/SDK v0.43 and very excited for its benefits including IBC :nerd_face:

Best Regards,

ChainofSecrets.org Team

14 Likes

Finally IBC incoming!!

Looking forward to all the features incoming with all the Milestones.

We will support testnets nodes on a need to basis that are required for the successful implementation of IBC.

Also if Enigma requires more relayers and/or other infrastructure for a better testnet and mainnet integration feel free to reach out to us.

Cheers,
Secure Secrets family.

11 Likes

OMG this is huge! I was stoked about the xmr and Luna bridge but this is going to bring so many new investors and use cases to our network. I cant wait! Enigma rocks :stuck_out_tongue_closed_eyes:

8 Likes

Exciting news!

I’m looking forward to having pruning methods outside of archive nodes start being reliable and the x/fee_grant module.

6 Likes

This is HUGE news. Very excited for this! We will then be a big part of the Cosmos narrative. Fully support this proposal and we’re standing by to upgrade.

9 Likes

I am supportive of this.

1 Like

Great initiatives taking it to the next level. More power!!! :facepunch:

1 Like

Great news, most excited for the interchain accounts feature! It sounds like it would make it possible to participate in Terra Defi ecosystem from within Secret Network. That would be amazing.

1 Like

Sounds amazing! Looking forward to this! You got my vote :slight_smile:

3 Likes

I’m very excited about this!

Especially looking forward to the 3rd milestone - the additional features. It will open many new possibilities for our ecosystem!

3 Likes

Thanks for this great post, really looking forward to this upgrade. Quite surpised by the timeline (even though it’s an optimistic one), in a good way.

Milestone 3 has some really interesting components, might be worth considering pushing the date back a few weeks if that allows for inclusion.

3 Likes

Citadel.one team fully supports this upgrade. That would be a great step towards interoperability.
As wallet providers, Citadel.one Platform is ready for the update, too.

Looking forward!

4 Likes

Epic news - vote yes from me.

3 Likes

wen governance proposal :crazy_face:

Huge News and great timing. Cosmos ecosystem right now is gathering huge following from its milestone acheivements. This will bring more assets connected with our Privacy hub. Also there a lot of potential collaborations.

4 Likes