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

Panic at epoch boundary #1277

Closed
joe-bowman opened this issue Mar 13, 2024 · 0 comments · Fixed by #1278
Closed

Panic at epoch boundary #1277

joe-bowman opened this issue Mar 13, 2024 · 0 comments · Fixed by #1278
Assignees
Labels
bug Something isn't working module: participationrewards Participation Rewards Module

Comments

@joe-bowman
Copy link
Contributor

Summary of Bug

A panic occurs if there is no PR allocation, in the participation rewards hook.

We refer to err.Error in a log, but err is nil at this point.

Stack trace:

Mar 13 17:00:10 test01 quicksilverd[4146983]: 5:00PM ERR recovered (runtime.Error) panic: runtime error: invalid memory address or nil pointer dereference
Mar 13 17:00:10 test01 quicksilverd[4146983]: 5:00PM ERR stack trace: goroutine 839 [running]:
Mar 13 17:00:10 test01 quicksilverd[4146983]: runtime/debug.Stack()
Mar 13 17:00:10 test01 quicksilverd[4146983]:         runtime/debug/stack.go:24 +0x5e
Mar 13 17:00:10 test01 quicksilverd[4146983]: github.com/quicksilver-zone/quicksilver/third-party-chains/osmosis-types/osmoutils.PrintPanicRecoveryError({{0x31e9f08, 0x4758280}, {0x31fd680, 0xc18e08d380}, {{0xb, 0x0}, {0xc00bf91770, 0xd}, 0x615afb, {0x638d4db, ...}, ...}, ...}, ...)
Mar 13 17:00:10 test01 quicksilverd[4146983]:         github.com/quicksilver-zone/quicksilver/third-party-chains/osmosis-types/osmoutils/cache_ctx.go:41 +0x45
Mar 13 17:00:10 test01 quicksilverd[4146983]: github.com/quicksilver-zone/quicksilver/third-party-chains/osmosis-types/osmoutils.ApplyFuncIfNoError.func1()
Mar 13 17:00:10 test01 quicksilverd[4146983]:         github.com/quicksilver-zone/quicksilver/third-party-chains/osmosis-types/osmoutils/cache_ctx.go:20 +0x78
Mar 13 17:00:10 test01 quicksilverd[4146983]: panic({0x2257020?, 0x4602040?})
Mar 13 17:00:10 test01 quicksilverd[4146983]:         runtime/panic.go:914 +0x21f
Mar 13 17:00:10 test01 quicksilverd[4146983]: github.com/quicksilver-zone/quicksilver/x/participationrewards/keeper.(*Keeper).AfterEpochEnd(_, {{0x31e9f08, 0x4758280}, {0x31fd680, 0xc197af3580}, {{0xb, 0x0}, {0xc00bf91770, 0xd}, 0x615afb, ...}, ...}, ...)
Mar 13 17:00:10 test01 quicksilverd[4146983]:         github.com/quicksilver-zone/quicksilver/x/participationrewards/keeper/hooks.go:79 +0x87d
Mar 13 17:00:10 test01 quicksilverd[4146983]: github.com/quicksilver-zone/quicksilver/x/participationrewards/keeper.Hooks.AfterEpochEnd({_}, {{0x31e9f08, 0x4758280}, {0x31fd680, 0xc197af3580}, {{0xb, 0x0}, {0xc00bf91770, 0xd}, 0x615afb, ...}, ...}, ...)

Expected Behaviour

Nil allocation exits quietly and completes the epoch.

Version

v1.5.0

@joe-bowman joe-bowman self-assigned this Mar 13, 2024
@joe-bowman joe-bowman added bug Something isn't working module: participationrewards Participation Rewards Module labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: participationrewards Participation Rewards Module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant