-
Notifications
You must be signed in to change notification settings - Fork 235
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
Feat: Re-enabling gravity bridge conditionally #210
Feat: Re-enabling gravity bridge conditionally #210
Conversation
Codecov Report
@@ Coverage Diff @@
## main #210 +/- ##
==========================================
+ Coverage 21.51% 25.29% +3.77%
==========================================
Files 27 34 +7
Lines 1729 2554 +825
==========================================
+ Hits 372 646 +274
- Misses 1324 1858 +534
- Partials 33 50 +17
Continue to review full report at Codecov.
|
0cdb96d
to
f87c9c2
Compare
@tomtau should the ADR be updated as well? |
If there's a need for it, yes: the record doesn't say anything about conditional compilation: https://github.com/crypto-org-chain/cronos/blob/main/docs/architecture/adr-001.md#decision The original draft had the conditional compilation, but from the discussion, it turned out that there was no need for it:
|
Per discussion, I thought that we wanted the conditional compilation because we still don't know when gravity will be mature enough to be used in production and there are chances that breaking changes will need to be ported to mainnet before that If we want to avoid maintaining multiple fork or doing cherry picking, this would be the easiest solution? |
There's a need to maintain a release branch for 0.6.x once "main" runs on the latest Ethermint and has /x/feemarket added. So a release branch is likely expected or unavoidable irrespective of GB. |
f87c9c2
to
0ea07e8
Compare
docs/architecture/adr-001.md
Outdated
@@ -3,6 +3,7 @@ | |||
## Changelog | |||
* 12-10-2021: Initial Draft | |||
* 13-10-2021: Code deletion instead of conditional compilation | |||
* 13-10-2021: Conditional compilation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 13-10-2021: Conditional compilation | |
* 16-11-2021: Conditional compilation |
docs/architecture/adr-001.md
Outdated
@@ -23,7 +26,17 @@ In addition to that, the "x/cronos" module contains Gravity Bridge-related code | |||
|
|||
Existing integration tests related to Gravity Bridge can be temporarily disabled and later enabled when Gravity Bridge is added back. | |||
|
|||
Once the Gravity Bridge code is added back, the x/cronos module `ConsensusVersion` should be increased and the corresponding upgrade handler should be added. | |||
Once the Gravity Bridge code is added back (after mainnet launch), the x/cronos module `ConsensusVersion` should be increased and the corresponding upgrade handler should be added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should those (module version + upgrade handler) be conditionally added/changed as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can avoid this for now.
We could keep the same consensus version for both binary (with and without gravity) and increase it when we decide to release gravity to mainnet (at that time, we can also remove the conditional compilation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then it's good to move or rephrase this sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I guess the integration tests running in CI only target one of the modes, the other mode will not be tested.
For example if we pick the gravity-bridge mode to be the default one, the non-gravity-bridge mode won't be tested in CI, and could be silently broken.
Unless we run the tests against both modes, will that be overkill?
Yeah as I mentioned in the PR, we need to open another issue to improve the integration tests. What do you think? |
Do you think the two modes are temporary or permanent? my concern is it's not easy to keep both modes working correctly in the long run, and there could be more |
I guess once we decide to launch main net with gravity bridge, we don't need the conditional build anymore and can just stick with one version |
Then I guess using branches should be good enough?
|
Yeah this is possible but the conditional build is just to avoid us to jungle with two branches and cherry-pick back and forth for them to stay sync for a certain amount of time. Also less risk to mess up during the upgrade? But if we decide to go that way, I can remove the conditional build. What do you think @tomtau @calvinaco |
if this repo follows TBD, then long-lived feature branches aren't desirable. |
It's temporary, it'll be merged to the main branch when we decide to use gravity-bridge in the next release. |
if temporary feature branch == a few days, then it's all right as TBD: https://trunkbaseddevelopment.com/youre-doing-it-wrong/#duration-of-short-lived-feature-branches Otherwise, the contribution guidelines may need changes: https://github.com/crypto-org-chain/cronos/blob/main/CONTRIBUTING.md (which branch should one open a PR against if there are two parallel developments? who/when/what back ports changes from one to the other? how are releases made ? ...) |
I guess before we decide to use gravity bridge, there won't be heavy development on it anyway. |
f8eadb1
to
eafeebe
Compare
151b8d5
to
18f9bbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
18f9bbd
to
59dab41
Compare
We probably needs to add more test in case gravity is not enable
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)