-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cosmwasm 0.9 #262
Merged
Merged
Cosmwasm 0.9 #262
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jun 18, 2020
Re "Conflicting files |
Revert ocall size parameter change
Update enclave error handling
Secret prefix change Pulled custom cosmos-sdk into enigmampc/cosmos-sdk Added custom module from upgrade
Cashmaney
previously approved these changes
Jun 30, 2020
Cashmaney
approved these changes
Jun 30, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR, in isolation, is too big to comprehend. What follows is an explanation of how i assemebled its contents:
Background
The
cosmwasm/
,go-cosmwasm/
, andx/compute
andcmd/
directories in this repository (enigmampc/SecretNetwork) started as copies of the CosmWasm/cosmwasm, CosmWasm/go-cosmwasm, and CosmWasm/wasmd repositories respectively, at theirv0.7.0
release.We have since then modified these repositories considerably, according to our custom needs, but in parallel to this, the CosmWasm team kept developing their own projects, fixing bugs, and adding features.
During this period, I (@reuvenpo) also contributed significant amounts of code to their repositories, and helped bring these components to a production-ready state.
Merge Strategy
The time has now come to finally merge all of the work done on both sides back into a coherent version in our repository.
In order to do this, I cloned the three CosmWasm repositories under our namespace:
enigmampc/cosmwasm, enigmampc/go-cosmwasm, and enigmampc/wasmd.
For the
go-cosmwasm
andwasmd
repositories, I first checked out thev0.7.0
tag, created a new branch calledenigma-master
, and then replaced the content there with the relevant content from commit 213e32c in this repository. This represented a squash of all the work we did into one commit. I then used the usualgit merge
tool to perform most of the work, and manually resolved the couple-dozed conflicts that did occur (I merged a commit a little after0.9.0-alpha1
). Later I also tweaked a few lines where necessary because of slight API changes.For the
cosmwasm
repository though, a simple approach like that was not possible, because of the huge amount of work that was put into it on both sides. I worked off of a recent commit in the repository (after0.9.0-alpha1
), creating a branch calledenigma-master
, and started manually copying over the custom content from theSecretNetwork
. Most of the code was a simple copy-paste, as we kept our work mostly in separate repositories (This includesenclave-ffi-types
,wasmi-runtime
, and most ofsgx-vm/wasmi
). For the rest though (most of the changes in thevm
/sgx-vm
directory), I had to do some re-engineering and adjusting to get things to work together again. I gotta say that thanks to the improvements and cleanup on the CosmWasm side, as well as 2-3 months of experience with the codebase on my part, made the result much better and cleaner than the original way we modified their codebase.As this merge process took some time, the
SecretNetwork
repository has had ~170 new commits pushed to itsdevelop
branch, I went back to the first "squash" commit i made ingo-cosmwsam
andwasmd
and added another commit in each, representing the changes from 213e32c to 5164b14. I then merged that commit back into theenigma-master
branch in each repository. In thecosmwasm
repository the changes in that span of commits were almost exclusive to files that i did not change, so i just copied over the new versions of those files to theenigma-master
branch.You can track the difference between our versions and the original versions here:
cosmwasm, go-cosmwasm, wasmd.
Notes
The content here is copied from these commits:
https://github.com/enigmampc/cosmwasm/tree/716f67bbd5fd99750a2a311dbca96ed91175e097
https://github.com/enigmampc/go-cosmwasm/tree/45f82e530a69f1635f246e03954c65e17b762d91
https://github.com/enigmampc/wasmd/tree/e69b1aae31effbd8cfc3567d13d97634fb0d3ba2
The first 3 commits in this PR represent copying from each of those repositories (although in a different order)
In the future, if we need to pull in changes from the CosmWasm repositories again, we will place one more "squash" commit with all our changes from this point onto the
enigma-master
branches of the forked repositories, and then perform agit merge
of the new content from the upstream repositories. we will then copy the result as one commit back in this repo.For each repository, I recommend configuring one directory with both the original and the fork as remotes. It makes these merges much easier.
Future work on this PR
The following commits will be focused on making everything work together again. This will first include making sure everything just compiles together again, and then we will start working on filling in all the missing implementation details that connect our custom code to the new features and ABIs of the upstream version.
List of issues detailing the required work.
CC: #126 #151