Skip to content

fix: panic verifying evidence due to missing pubkey#684

Merged
lklimek merged 1 commit intov0.13-devfrom
fix-evidence-verify-panic
Sep 14, 2023
Merged

fix: panic verifying evidence due to missing pubkey#684
lklimek merged 1 commit intov0.13-devfrom
fix-evidence-verify-panic

Conversation

@lklimek
Copy link
Collaborator

@lklimek lklimek commented Sep 14, 2023

Issue being fixed or feature implemented

{"level":"error","module":"evidence","err":"panic in processing message: runtime error: invalid memory address or nil pointer dereference","stack":"goroutine 139 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x64\ngithub.com/tendermint/tendermint/internal/evidence.(*Reactor).handleMessage.func1()\n\tgithub.com/tendermint/tendermint/internal/evidence/reactor.go:143 +0x90\npanic({0x1072d00, 0x1d915a0})\n\truntime/panic.go:884 +0x20c\ngithub.com/tendermint/tendermint/internal/evidence.VerifyDuplicateVote(0x40093e9d80, {0x4001ebcc70, 0xf}, 0x400941fa40)\n\tgithub.com/tendermint/tendermint/internal/evidence/verify.go:137 +0x5b8\ngithub.com/tendermint/tendermint/internal/evidence.(*Pool).verify(0x4000154240, {0x15cd698, 0x4001ef4210}, {0x15d3378, 0x40093e9d80})\n\tgithub.com/tendermint/tendermint/internal/evidence/verify.go:67 +0x314\ngithub.com/tendermint/tendermint/internal/evidence.(*Pool).AddEvidence(0x4000154240, {0x15cd698, 0x4001ef4210}, {0x15d3378?, 0x40093e9d80})\n\tgithub.com/tendermint/tendermint/internal/evidence/pool.go:163 +0x258\ngithub.com/tendermint/tendermint/internal/evidence.(*Reactor).handleEvidenceMessage(0x4001970180, {0x15cd698, 0x4001ef4210}, 0x40093bde00)\n\tgithub.com/tendermint/tendermint/internal/evidence/reactor.go:117 +0x1d8\ngithub.com/tendermint/tendermint/internal/evidence.(*Reactor).handleMessage(0x4000423ea0?, {0x15cd698?, 0x4001ef4210?}, 0x4000145598?)\n\tgithub.com/tendermint/tendermint/internal/evidence/reactor.go:152 +0x70\ngithub.com/tendermint/tendermint/internal/evidence.(*Reactor).processEvidenceCh(0x4001970180, {0x15cd698, 0x4001ef4210}, {0x15cec80, 0x40003dee10})\n\tgithub.com/tendermint/tendermint/internal/evidence/reactor.go:166 +0x78\ncreated by github.com/tendermint/tendermint/internal/evidence.(*Reactor).OnStart\n\tgithub.com/tendermint/tendermint/internal/evidence/reactor.go:91 +0x140\n","time":"2023-09-13T14:46:51.971559126Z","message":"recovering from processing message panic"}

What was done?

Added check as a workaround; proper solution would be to not process evidence on non-validators (similar to votes).

How Has This Been Tested?

Run unit tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek lklimek enabled auto-merge (squash) September 14, 2023 12:30
@lklimek lklimek merged commit 8d75f16 into v0.13-dev Sep 14, 2023
@lklimek lklimek deleted the fix-evidence-verify-panic branch February 1, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants