-
Notifications
You must be signed in to change notification settings - Fork 692
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: panic on export zero-height because variable-length addresses #1015
Merged
okwme
merged 2 commits into
cosmos:main
from
dongsam:dongsam/1014-fix-export-zero-height-panic
Oct 13, 2021
Merged
fix: panic on export zero-height because variable-length addresses #1015
okwme
merged 2 commits into
cosmos:main
from
dongsam:dongsam/1014-fix-export-zero-height-panic
Oct 13, 2021
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
Codecov Report
@@ Coverage Diff @@
## main #1015 +/- ##
=======================================
Coverage 10.44% 10.44%
=======================================
Files 11 11
Lines 1082 1082
=======================================
Hits 113 113
Misses 964 964
Partials 5 5 |
okwme
approved these changes
Oct 7, 2021
okwme
requested review from
alessio,
alexanderbez,
jgimeno,
yaruwangway and
zmanian
as code owners
October 7, 2021 20:10
alexanderbez
approved these changes
Oct 8, 2021
going to merge this as golangci-lint works locally |
okwme
pushed a commit
that referenced
this pull request
Oct 13, 2021
okwme
added a commit
that referenced
this pull request
Nov 4, 2021
* go version to 1.17 * Update go.mod * dependency: bump ibc-go from v1.2.0 to v1.2.1 * cherry-pick: d76c62d, adding router module * fix: add router module to upgrade handler * fix: testnet cli command update genesis supply * refactor!: drop support for command 'gaiad migrate' * Update go.mod * dependency: bump ibc-go from v1.2.0 to v1.2.1 * cherry-pick: d76c62d, adding router module * fix: add router module to upgrade handler * fix: testnet cli command update genesis supply * refactor!: drop support for command 'gaiad migrate' * fix: lint * chore: bump sdk, run lint * fix: panic on export zero-height because validator addr length parsing (#1015) * update packet-forward-middleware * chore: bump sdk * build: bump liquidity from v1.4.0 to 1.4.1 * go mod tidy * fix: golangci-lint version * packet-forward-middleware version bump: v1.0.0 Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com> Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com> Co-authored-by: dongsam <dongsamb@gmail.com>
iloveanyujin
added a commit
to iloveanyujin/bcna
that referenced
this pull request
Sep 6, 2022
If this is not implement, executing export with --for-zero-height will encounter error: "panic: expected validator, not found" Credit: cosmos/gaia#1015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes: #1014
Description
Panic occurs when
gaia export --for-zero-height
gaia/app/export.go
Line 160 in 56db57c
because of current
prepForZeroHeightGenesis
function usingaddr := sdk.ValAddress(iter.Key()[1:])
to casting variable-length addresses,It should be
addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key()))
to cover addresses of length > 20 bytes ADR-028For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)