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

[crash] unhandled exception IndexError when parsing ProposerSlashing #1323

pventuzelo opened this issue Jul 14, 2020 · 2 comments


Copy link

pventuzelo commented Jul 14, 2020

This bug has been found by the community using beacon-fuzz and reported in our repository here.

Kudos to @Daft-Wullie for the finding !!

Please, find some extra information below for debugging ;)



Traceback (most recent call last, using override)
/home/scop/Documents/consulting/sigmaprime/nim-beacon-chain/vendor/nim-confutils/confutils.nim(1020) confutils
/home/scop/Documents/consulting/sigmaprime/nim-beacon-chain/ncli/ncli_query.nim(24) CLI
/home/scop/Documents/consulting/sigmaprime/nim-beacon-chain/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim(407) reportUnhandledError
/home/scop/Documents/consulting/sigmaprime/nim-beacon-chain/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim(358) reportUnhandledErrorAux
Error: unhandled exception: index -4703124616608923521 not in 0 .. 255 [IndexError]

Reproducing code:

  confutils, os, strutils, chronicles, json_serialization,

cli do(beacon: string, container: string):
  try :
    var b = SSZ.loadFile(beacon, BeaconState)
    var c = SSZ.loadFile(container, ProposerSlashing)
    var cache = get_empty_per_epoch_cache()
    discard process_proposer_slashing(b, c, {}, cache)
  except SSZError:
    quit 1
  quit 0


./ nim c -r -d:release -d:ETH2_SPEC="v0.12.1" -d:BLS_ETH2_SPEC="v0.12.x" -d:preset=mainnet debug.nim


./debug --beacon=beacon.ssz  --container=propo.ssz

branch: "devel"
commit: a82c38d

Copy link

tersec commented Jul 14, 2020

As a small note,

-d:ETH2_SPEC="v0.12.1" -d:BLS_ETH2_SPEC="v0.12.x"

Isn't necessary anymore since we've switched to being v0.12.1-only. It's harmless, so feel free to include it if you'd prefer, but arguably excluding it makes it clearer that one is, in fact, dealing with the default configuration, and not some exotic/untested combinatoin.

Copy link

tersec commented Jul 15, 2020

Fixed by #1325

@tersec tersec closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants