Skip to content
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

Issue with marker migration in eigengrau upgrade #484

Closed
6 tasks
iramiller opened this issue Sep 16, 2021 · 0 comments · Fixed by #486 or #497
Closed
6 tasks

Issue with marker migration in eigengrau upgrade #484

iramiller opened this issue Sep 16, 2021 · 0 comments · Fixed by #486 or #497
Assignees
Labels
bug Something isn't working marker Marker Module
Milestone

Comments

@iramiller
Copy link
Member

Summary of Bug

Marker clone issue in eigengrau upgrade handler

Version

1.7.0

Steps to Reproduce

During migration of pio-testnet-1 using eigengrau handler the following error occured:

 12:05AM INF Migrating Marker Module from Version 1 to 2
 panic: merger not found for type:big.Word
 goroutine 1 [running]:
 github.com/gogo/protobuf/proto.(*mergeInfo).computeMergeInfo(0xc0000a4f40)
         github.com/gogo/[email protected]/proto/table_merge.go:662 +0xed9
 github.com/gogo/protobuf/proto.(*mergeInfo).merge(0xc0000a4f40, {0xc002000c60}, {0xc0000a7b78})
         github.com/gogo/[email protected]/proto/table_merge.go:113 +0x58
 github.com/gogo/protobuf/proto.(*mergeInfo).computeMergeInfo.func30({0xc0000a4c40}, {0x1afe2e0})
         github.com/gogo/[email protected]/proto/table_merge.go:587 +0x8b
 github.com/gogo/protobuf/proto.(*mergeInfo).merge(0xc0000a4c40, {0x34b8040}, {0x99})
         github.com/gogo/[email protected]/proto/table_merge.go:139 +0x305
 github.com/gogo/protobuf/proto.(*mergeInfo).computeMergeInfo.func28({0xc0000a48c0}, {0x40})
         github.com/gogo/[email protected]/proto/table_merge.go:555 +0x26
 github.com/gogo/protobuf/proto.(*mergeInfo).merge(0xc0000a48c0, {0x1de1e60}, {0xc001714bd0})
         github.com/gogo/[email protected]/proto/table_merge.go:139 +0x305
 github.com/gogo/protobuf/proto.(*InternalMessageInfo).Merge(0x347a000, {0x23c6c88, 0xc0000a7b60}, {0x23c6c88, 0xc0000a7aa0})
         github.com/gogo/[email protected]/proto/table_merge.go:50 +0xb6
 github.com/provenance-io/provenance/x/marker/types.(*MarkerAccount).XXX_Merge(0x1df0060, {0x23c6c88, 0xc0000a7aa0})
         github.com/provenance-io/provenance/x/marker/types/marker.pb.go:204 +0x3a
 github.com/gogo/protobuf/proto.Merge({0x23c6c88, 0xc0000a7b60}, {0x23c6c88, 0xc0000a7aa0})
         github.com/gogo/[email protected]/proto/clone.go:95 +0x3f4
 github.com/gogo/protobuf/proto.Clone({0x23c6c88, 0xc0000a7aa0})
         github.com/gogo/[email protected]/proto/clone.go:52 +0x17f
 github.com/provenance-io/provenance/x/marker/types.MarkerAccount.Clone(...)
         github.com/provenance-io/provenance/x/marker/types/marker.go:94
 github.com/provenance-io/provenance/x/marker/legacy/v042.MigrateMarkerPermissions.func1({0x2432c20, 0xc0000a7a40})
         github.com/provenance-io/provenance/x/marker/legacy/v042/store.go:34 +0xae
 github.com/provenance-io/provenance/x/marker/keeper.Keeper.IterateMarkers({{{0x241e7b8, 0xc000f307d0}, 0xc0010beab0, {0x23b8340, 0xc0010090c0}, {0x23b8390, 0xc0010091a0}, {0xc000f442c0, 0x6, 0x1c}, ...}, ...}, ...)
         github.com/provenance-io/provenance/x/marker/keeper/keeper.go:151 +0x1fc
 github.com/provenance-io/provenance/x/marker/legacy/v042.MigrateMarkerPermissions({{0x23f3fa8, 0xc000052040}, {0x2423d40, 0xc0000a5f00}, {{0xb, 0x0}, {0xc00262f840, 0xd}, 0x342772, {0x110efa67, ...}, ...}, ...}, ...)
         github.com/provenance-io/provenance/x/marker/legacy/v042/store.go:29 +0x185
 github.com/provenance-io/provenance/x/marker/keeper.(*Migrator).Migrate1to2(_, {{0x23f3fa8, 0xc000052040}, {0x2423d40, 0xc0000a5f00}, {{0xb, 0x0}, {0xc00262f840, 0xd}, 0x342772, ...}, ...})
         github.com/provenance-io/provenance/x/marker/keeper/migrations.go:24 +0x158

Remediation

  • Change eigengrau handler to panic and indicate the upgrade height must be skipped
  • Add a new upgrade handler that uses an update migration process for markers that does not use the clone function

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working marker Marker Module
Projects
2 participants