Git Product home page Git Product logo

eth2-staking-rewards-calculator's People

Contributors

eth2353 avatar vvander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eth2-staking-rewards-calculator's Issues

EVM Fees

Curious. post merge, are you planning to integrate a fee recipient, its block, amount etc into your staking reward engine? thx

Cost basis / LTCG / STCG

Have you looked into expanding your staking reward repository to help folks compute their net cost basis (blended / avg), wash sales / subsequent stcg / ltcg ? Happy to help collaborate on this. @eth2353

Traceback error - v2.0.2 Prysm

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'

Dates outside the range

If a validator activated on 1/1/2021 and we use a date of 12/15/2020, it gives an error. The presents a larger issue if validators were added over different times..

(great tool btw!)

Coingecko throttling

This was with 18 validators and running a report from 2021-01-01 to 2021-12-31

Note, that 1607 from CoinGecko, that seems like it is asking for each day for each validator, which seems like a waste if that is what is actually happening.

`Fetching price data from CoinGecko: 66%|████████████████████████████▍ | 1065/1607 [01:06<00:33, 16.09it/s]
Traceback (most recent call last):
File "/eth2-staking-rewards-calculator.git/main.py", line 426, in write_rewards_to_file
_ = eth_price[dp.datetime.strftime(format="%d-%m-%Y")]
KeyError: '12-03-2021'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/eth2-staking-rewards-calculator.git/main.py", line 511, in
main()
File "/eth2-staking-rewards-calculator.git/main.py", line 507, in main
write_rewards_to_file(datapoints=datapoints)
File "/eth2-staking-rewards-calculator.git/main.py", line 443, in write_rewards_to_file
raise e
File "/eth2-staking-rewards-calculator.git/main.py", line 436, in write_rewards_to_file
raise Exception(f"Non-200 status code received from CoinGecko - "
Exception: Non-200 status code received from CoinGecko -

<title>Access denied | api.coingecko.com used Cloudflare to restrict access</title> `

Something went wrong while fetching price data from CoinGecko

Just tried running this script to pull the info for my validator for Janurary-April and got the following error.

Getting price data and writing rewards to file:   0%|                                                                                                                                                                                                                                                                                                | 0/3 [00:31<?, ?it/s]
Traceback (most recent call last):
  File "main.py", line 188, in <module>
    main()
  File "main.py", line 184, in main
    write_rewards_to_file(datapoint_dict=dp_dict)
  File "main.py", line 159, in write_rewards_to_file
    raise e
  File "main.py", line 156, in write_rewards_to_file
    cg_data = resp.json()
  File "/home/user/.local/lib/python3.8/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.