Weekly Wings: How to Upgrade to Cosmos SDK v0.47.1 and how to MEV Swap to collect Free GRAINs on PalomaSwap

This week we celebrate the completion of a big step for Paloma, the upgrade of Paloma. Also, we celebrate the continued release of new trading routes with Arbitrum DEXes on PalomaSwap. These two hatchlings are very important so catch up on our progress, below.
Now that we are passing all our Cosmos-SDK v0.47.1 tests and we can now successfully create blocks, we’d like to take this Weekly Wings Update to share how Volume and Vitwit completed the upgrade. Cosmos-SDK v0.47.1 is essentially a new Cosmos blockchain standard! Let’s dive in.
Custom Mempool: Welcome the mempool app. Paloma now has a Custom Mempool with priority ordering for transactions. No more Account Sequence Mismatch
errors. Paloma messages are now prioritized in the mempool to put consensus messages and job messages as highest priority with valset updates and job deletion messages as lowest priority.
Migrate to CometBFT: This change is huge. This breaking change is a full migration away from Tendrmint consensus to CometBFT consensus. The change required that the Volume team replace the Tendermint modules. A name change for reference to the module won’t be needed until v0.48.
gRPC: A new gRPC service, proto/cosmos/base/node/v1beta1/query.proto
, has been introduced which exposes various operator configuration. Make sure to register this new service
IBC-Go v7: Update IBC-go modules to IBC-Go v7. New improvements to the IBC client include increased flexibility and lower code complexity. “As part of the client refactor, the most important decision made was to require light clients to handle all management of client state (contains the parameters required to verify headers) and consensus state (contains the header with the application’s root hash, next validator set hash, and timestamp).” IBC upgrades are critical for Paloma Interchain Security messaging. Learn more about IBC-go v7 upgrades here: https://medium.com/the-interchain-foundation/cosmos-sdk-introducing-twilight-v0-47-c606c2191726
AppModule Interface and SimApp: AppModule has moved a number of methods. Queriers have been moved. Will be subject to upgrades.
Constructor(CRITICAL): The constructor, NewSimApp
has been simplified. However, this means that an important dependency: GoLevelDB must be DOWNGRADED! The GoLevelDB
version must pinned to v1.0.1-0.20210819022825-2ae1ddf74ef7
in the application, following versions might cause unexpected behavior. This can be done by adding replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
to the go.mod
file. Failure to complete this important step may result in the failure to query any blockchain state even though the blockchain generates blocks. This is a critical step that may catch seasoned devs.
Protobuf: Gogo protobuf is now replaced with Cosmos version of gogo protobuf. Given the journey from Amino, make sure to upgrade. This means you should replace all imports of github.com/gogo/protobuf
to github.com/cosmos/gogoproto
. This allows you to remove the replace directive replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
from your go.mod
file.
Transactions: Remember broadcast mode? It’s gone! We now use sync
mode. When upgrading your tests from block
to sync
and checking for a transaction code, you need to query the transaction first (with its hash) to get the correct code.
Module Upgrades:
All Modules: EventTypes are now emitted directly at message execution. No more having to declare the EventManager in your custom modules. Write less boilerplate code and get more from your chain.
Gov: Prevent proposal spamming. Gov module is now updated to support a minimum proposal deposit at submission time
Consensus: Get ready to rename your custom consensus modules! x/consensus is now a default module that will handle Tendermint consensus parameters. This is where the x/params from old Tendermint now go to die as we continue to migrate to CometBFT.
More New Modules: There are more new modules that will be important for Paloma, particularly the NFT base module and the new x/group module.
errors
should replace types/errors
when registering errors or wrapping SDK errors.
math
contains the Int
or Uint
types that are used in the SDK.
x/nft
an NFT base module.
x/group
a group module allowing to create DAOs, multisig and policies. Greatly composes with x/authz
.
Ledger: Hardware support improves with more coverage for Ledger. Ledger support has been generalized to enable use of different apps and keytypes that use secp256k1
. The Ledger interface remains the same, but it can now be provided through the Keyring Options
, allowing higher-level chains to connect to different Ledger apps or use custom implementations
These are what we consider the most important changes that impact Paloma validators, developers, and users. Validators will expect Paloma to be able to ensure that message delivery is done with highest priority in the mempool. Developers on Paloma will now have more functionality and easier paths to building features on Paloma from the Cosmos SDK protocol team.
Stay up to date and follow the Paloma public repositories and the commits of ongoing upgrades to Paloma Cosmos-SDK blockchain here:
https://github.com/palomachain/paloma
https://github.com/palomachain/pigeon
Many visitors of Paloma’s Telegram and Discord still express confusion on how to MEV swap with Paloma. As such, we want to share again how easy it is to collect Paloma GRAINs from swapping with MEV protection.
MEV Front Protection: Paloma uses MEV front-run or sandwich bot attack protection from bloXroute. All ETH, BNB, and Polygon Transactions are first run through bloXroute and submitted to searchers and bundlers who receive a fee for putting transactions into the mempool ahead of other transactions. To enjoy front-run protection, just make sure to add the ETH-Protect or BNB-Protect RPC endpoint on your Metamask. Without changing the endpoint, your transactions will not receive front-run protection.
MEV Back Run Profits: Most altcoins and memecoin season tokens are very high risk. Due to very low levels of liquidity, market players may find themselves also at risk for very high slippage, either built into pool contracts or simply due to low liquidity. Paloma checks all swaps with its back-run partner Wallchain.xyz. If Wallchain identifies back-run opportunity, it will execute the back-run swap which happens after the initial swap. Back-run MEV profits are shared with PalomSwap users as additional GRAINs on top of their swap.
Swap, Claim, and Stake: GRAIN rewards are delivered to the Nest Wallet. This Chrome extension is available for download at the Google Chrome Store: https://chrome.google.com/webstore/detail/paloma-nestbeta/cjmmdephaciiailjnoikekdebkcbcfmi. All PalomaSwap transactions are linked to your Paloma address, thus making it easy to collect GRAIN rewards for interacting with the Paloma blockchain. GRAINs are the utility token used for paying to have messages relayed via Paloma to any other public blockchain.
The passenger pigeon or wild pigeon (Ectopistes migratorius) is an extinct species of pigeon that was endemic to North America. Its common name is derived from the French word passager, meaning "passing by", due to the migratory habits of the species. The scientific name also refers to its migratory characteristics. The morphologically similar mourning dove (Zenaida macroura) was long thought to be its closest relative, and the two were at times confused, but genetic analysis has shown that the genus Patagioenas is more closely related to it than the Zenaida doves.
Upgrading to Cosmos SDK v.0.47.1 is an extensive effort requiring awareness of module changes and dependency on critical packages, such as goleveldb. Developers and protocol maintainers need to also refactor and prepare for new workflows for event emitters and tracking. We recommend that all Cosmos-SDK chains upgrade to Cosmos-SDK v0.47.1 and we’ll continue to share how we are using this new software to make the Paloma nest even more valuable. Look out for more updates on Pigeon’s ongoing upgrade as we share that progress next week.
We encourage everyone to get free GRAINs with PalomaSwap at https://www.palomaswap.com/uniswap/ We continue to add new Decentralized Exchanges to encourage more users to take advantage of the MEV protection against front-run and sandwich attacks. Also, if there are fees available for back-run MEV on low-liquidity pools, users will receive even more GRAINs for their transactions.
To learn more about Paloma, please visit https://palomachain.com
To follow the project on Github, please star the project https://github.com/palomachain/paloma
To participate in the community, please join the Paloma Discord: https://discord.gg/HtUvgxvh5N