eth2353/eth2-staking-rewards-calculator

Traceback error - v2.0.2 Prysm

Closed this issue · 4 comments

Traceback (most recent call last):
  File "main2.py", line 512, in <module>
    main()
  File "main2.py", line 507, in main
    datapoints = get_all_datapoints()
  File "main2.py", line 407, in get_all_datapoints
    for dp in tqdm(
  File "/home/xx/.local/lib/python3.8/site-packages/tqdm/std.py", line 1166, in __iter__
    for obj in iterable:
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 868, in next
    raise value
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "main2.py", line 301, in get_datapoints_for_slot
    datapoints = _datapoints_prysm(slot, slot_datetime, validator_indexes)
  File "main2.py", line 213, in _datapoints_prysm
    m = re.match(r"^Validator index (\d+) >= balance list \d+$", data["error"])
KeyError: 'error'

Hi, can you post a little more info? Do you get this error for active validators or are you trying to retrieve rewards for validators that are not active yet? Without any reproduction steps it is hard to say what causes this, all I can tell is that the beacon node returns a 400 (bad request) status code, but does not contain an error message.
Could you try setting the Prysm API flag to False? That will force the script to use the standard API, it could (should) work, Prysm says it supports the standard API already.

Once I set the Prysm flag to false, it is working... interesting..

further... it works until it gets to 90% .. and then fails again.. let grab the error.. but this might be because I have the end-date as 12/31/2021... so it might be timing out on an out of scope date..

confirmed that if I select dates that do not end in the future (e..g 2021-12-31), then it works just fine with the Prysm flag set to false.