Multiversion-Cosmos-Client is a versatile gRPC client crafted in Golang to effectively manage various versions of the Cosmos SDK. This innovative implementation addresses the limitations posed by Golang's go.mod system, which restricts the usage of multiple versions of the same package within a single module. Often, developers are forced to maintain separate branches for different SDK versions. However, with Multiversion-Cosmos-Client, you have a seamless and efficient alternative for handling multiple SDK versions within a single codebase.
Multiversion-Cosmos-Client offers several compelling advantages:
-
Golang gRPC Client for Cosmos SDK: It provides a reliable and feature-rich gRPC client tailored specifically for the Cosmos SDK ecosystem.
-
Elegant Version Management: Overcoming the limitations of go.mod, this implementation allows you to manage multiple Cosmos SDK versions seamlessly, eliminating the need for maintaining separate branches.
To harness the power of Multiversion-Cosmos-Client, follow these straightforward steps:
-
Configure SDK Version: In the
.env
file, set the desired Cosmos SDK version by modifying theSDK_VERSION
variable. (Currently supporting versions 45 and 46). -
Build and Run:
- Execute
make build
to utilize version-specific predefinedgo.mod
andgo.sum
files. - Launch the client with
make run
.
- Execute
When managing packages and dependencies, keep the following in mind:
-
Running
go get ./...
andgo mod tidy
may attempt to include all files, including those with different tags. To avoid conflicts, consider commenting out or removing code related to other tag files before running these commands. You can uncomment these files once the commands have been executed. -
Be vigilant about updating the predefined
go.mod
andgo.sum
files whenever new dependencies are added or existing ones are updated. -
Different packages may maintain version-specific files using tags, so it's important to stay aware of these nuances when working with various versions and go build tags.