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

fix panic in electra duty calculation #198

Merged
merged 1 commit into from
Dec 17, 2024
Merged

fix panic in electra duty calculation #198

merged 1 commit into from
Dec 17, 2024

Conversation

pk910
Copy link
Member

@pk910 pk910 commented Dec 17, 2024

fix panic in electra duty calculation:

panic: runtime error: index out of range [7] with length 2

goroutine 136 [running]:
encoding/binary.littleEndian.Uint64(...)
        /home/pk910/go/pkg/mod/golang.org/[email protected]/src/encoding/binary/binary.go:106
github.com/ethpandaops/dora/indexer/beacon/duties.BytesToUint(...)
        /home/pk910/github/ethpandaops/dora/indexer/beacon/duties/duties.go:55
github.com/ethpandaops/dora/indexer/beacon/duties.GetProposerIndex(0xc001924000, 0xc00162be88, 0x660)
        /home/pk910/github/ethpandaops/dora/indexer/beacon/duties/duties.go:180 +0x40f
github.com/ethpandaops/dora/indexer/beacon.(*EpochStats).parsePackedSSZ(0xc0016481a0, 0x10615a0?, 0xc000000300, {0xc0001d0f00?, 0xc0004802a0?, 0xc0000c2ec8?})
        /home/pk910/github/ethpandaops/dora/indexer/beacon/epochstats.go:247 +0x525
github.com/ethpandaops/dora/indexer/beacon.(*EpochStats).restoreFromDb(0xc0016481a0, 0x4ab84428d4285356?, 0x5c9931237cd56d4a?, 0xcfd406efb2652ee3?)
        /home/pk910/github/ethpandaops/dora/indexer/beacon/epochstats.go:128 +0x37
github.com/ethpandaops/dora/indexer/beacon.(*Indexer).StartIndexer.func2.1()
        /home/pk910/github/ethpandaops/dora/indexer/beacon/indexer.go:260 +0x108
created by github.com/ethpandaops/dora/indexer/beacon.(*Indexer).StartIndexer.func2 in goroutine 1
        /home/pk910/github/ethpandaops/dora/indexer/beacon/indexer.go:252 +0xfb
exit status 2

BytesToUint wasn't able to handle variable length inputs here.

@pk910 pk910 merged commit 948bf7b into master Dec 17, 2024
1 check passed
@pk910 pk910 deleted the pk910/fix-duty-panic branch December 17, 2024 23:16
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