-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix bech32 prefix in evidence #8461
Conversation
technically, this may be a consensus-breaking change for non-gaia live networks on 0.41 but probably ok to go with that? |
Hi @yihuang, and thanks for taking the time the submit this patch and help make Cosmos SDK better. If the bug is confirmed and it is reproducible in Thus, would you mind re-targeting this PR to master please? |
d99db72
to
cecc19e
Compare
Done. I didn't confirmed in master, because master needs some extra changes for our tests to run. But the patch should be good in master too. |
Codecov Report
@@ Coverage Diff @@
## master #8461 +/- ##
==========================================
+ Coverage 61.47% 61.49% +0.01%
==========================================
Files 630 630
Lines 36398 36399 +1
==========================================
+ Hits 22377 22384 +7
+ Misses 11671 11664 -7
- Partials 2350 2351 +1
|
41e9023
to
03521ef
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.
I confirm, this indeed causes problem, and the changeset is a proper fix.
@yihuang - thanks for catching this and contributing back to the SDK. @alessio , indeed , the problem is in the following lines:
Above, the Another fix would be to use I approved this PR, because it solves the issue, we can think if we would prefer to alternative solution I mentioned above (I slightly prefer a solution with two types: one for model / operations, and one for presentation) - it's more bulletproof, we avoid bugs with wrong cons/val etc... prefixes. Finally we have to add a test - ideally in this PR, but I'm OK to do it in a new PR. The test should be more or less following:
|
@yihuang feel like adding a test by chance? |
03521ef
to
556ed19
Compare
unit test added, manually confirmed that without the change, the test fails. |
556ed19
to
d0d778a
Compare
@tomtau dixit:
This would go right away into v0.42 I suppose |
Breaking change term is a ambiguous. This change is backward compatible, but creates valid state changes which were not valid before. So it's a soft fork. |
Yep, the change is potentially state breaking |
Isn't it a hard fork? old version won't jail the faulting validator, new version will, they won't agree on the state ever after? |
d0d778a
to
4f55c93
Compare
Done |
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
4f55c93
to
c722083
Compare
@alessio & @robert-zaremba was this backported? |
@marbar3778 - this is scheduled f the upcoming release. |
fix bech32 prefix in evidence (cosmos#8461) Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
For the record:
|
cc: @clevinson , @zmanian - check above. |
fix bech32 prefix in evidence (cosmos#8461) Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
fix bech32 prefix in evidence (cosmos#8461) Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@Mergifyio backport release/v0.42.x |
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit d6e4a2e) # Conflicts: # CHANGELOG.md
Command
|
Description
When decoding the consensus address, it should use the dynamic configured prefix, rather than the constant.
Problem:
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes