This is a lightweight fork of CosmosSDK. The current version of the forked code resides on the default branch.
- Open a PR against the current default branch (i.e.
dydx-fork-v0.50.3
). - Get approval, and merge. DO NOT SQUASH AND MERGE. PLEASE REBASE AND MERGE
- After merging, update the
v4
repository'sgo.mod
, andgo.sum
files with your merged$COMMIT_HASH
. - (In
dydxprotocol/v4
)go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/dydxprotocol/cosmos-sdk@$COMMIT_HASH
- (In
dydxprotocol/v4
)go mod tidy
- (In
dydxprotocol/v4
) update package references inmocks/Makefile
. See here for an example. - Open a PR in
dydxprotocol/v4
to bump the version of the fork.
We'd like to keep the main
branch up to date with cosmos/cosmos-sdk
. You can utilize GitHub's sync fork button to accomplish this. main
branch, not on the fork branches as it will discard our commits.
Before these steps, please set the upstream
remote to be the cosmos/cosmos-sdk
repo. If you use http auth, you will have to switch the upstream url to be http.
git remote add upstream [email protected]:cosmos/cosmos-sdk.git
Note that this doesn't pull in upstream tags, so in order to do this follow these steps:
git fetch upstream
git push --tags
When a new version of CosmosSDK is published, we may want to adopt the changes in our fork. This process can be somewhat tedious, but below are the recommended steps to accomplish this.
- Ensure the
main
branch and all tags are up to date by following the steps above in "Fork maintenance". - Create a new branch off the desired CosmosSDK commit using tags.
git checkout -b dydx-fork-$VERSION <CosmosSDK repo's tag name>
. The new branch should be named something likedydx-fork-$VERSION
where$VERSION
is the version of CosmosSDK being forked (should match the CosmosSDK repo's tag name). i.e.dydx-fork-v0.50.3
. - Push the new branch (i.e
dydx-fork-v0.50.3
). - Off of this new branch, create a new branch. (i.e
totoro/dydxCommits
) - Cherry-pick each dydx-created commit from the current default branch, in order, on to the new
dydx-fork-$VERSION
branch (note: you may want to consider creating multiple PRs for this process if there are difficulties or merge conflicts). For example,git cherry-pick <commit hash>
. You can verify the first commit by seeing the most recent commit sha for the$VERSION
(i.ev0.50.3
) tag on thecosmos/cosmos-sdk
repo, and taking the next commit from that sha. - The dYdX fork uses an optimized version of
runTx
for handling ABCI CheckTx messages. Ensure that the logic withinrunCheckTxConcurrently
stays up to date with therunTx
counterpart by diffing baseapp.go#runTx current version against the new version copying over relevant changes to baseapp.go#runCheckTxConcurrently. - Open a PR to merge the second branch (
totoro/dydxCommits
) into the first (dydx-fork-v0.50.3
). Get approval, and merge. DO NOT SQUASH AND MERGE. PLEASE REBASE AND MERGE - Update
dydxprotocol/v4
by following the steps in "Making Changes to the fork" above. - Set
dydx-fork-$VERSION
as the default branch in this repository.
Note that the github CI workflows need permissioning. If they fail with a permissioning error, i.e Resource not accessible through integration
, a Github admin will need to whitelist the workflow.
The Cosmos SDK is a framework for building blockchain applications. CometBFT (BFT Consensus) and the Cosmos SDK are written in the Go programming language. Cosmos SDK is used to build Gaia, the implementation of the Cosmos Hub.
WARNING: The Cosmos SDK has mostly stabilized, but we are still making some breaking changes.
Note: We advise to always use the latest maintained Go version for building Cosmos SDK applications.
To learn how the Cosmos SDK works from a high-level perspective, see the Cosmos SDK High-Level Intro.
If you want to get started quickly and learn how to build on top of Cosmos SDK, visit Cosmos SDK Tutorials. You can also fork the tutorial's repository to get started building your own Cosmos SDK application.
For more information, see the Cosmos SDK Documentation.
See CONTRIBUTING.md for details on how to contribute and participate in our dev calls. If you want to follow the updates or learn more about the latest design then join our Discord.
The Cosmos ecosystem is vast. Awesome Cosmos is a community-curated list of notable frameworks, modules and tools.
The Cosmos Hub application, gaia
, has its own cosmos/gaia repository. Go there to join the Cosmos Hub mainnet and more.
The IBC module for the Cosmos SDK has its own cosmos/ibc-go repository. Go there to build and integrate with the IBC module.
This Cosmos SDK project is not related to the React-Cosmos project (yet). Many thanks to Evan Coury and Ovidiu (@skidding) for this Github organization name. As per our agreement, this disambiguation notice will stay here.