You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ethereum_footprint.py needs to be almost completely replaced:
1. In __init__, instead of loading the digiconomist energy consumption and etherscan gasUsed data, load the ethereum-emissions file daily-ktco2.csv which is regularly update on the gh-pages branch. Also, load an instance of the EthereumStats class, which will give you access to the tx_fees dict (mapping dates to total tx_fees).
2. Remove kgco2_per_gas() from EthereumFootprint
3. Remove get_etherscan_data() from EthereumFootprint
3. sum_kgco2() should run a different calculation. First, sum all transactions fees (using tx.get_fees()) based on the date of the transaction (using tx.get_datetime()). Then for each day, divide the total fees from those transactions by the total fees on that day (using tx_fees from the EthereumStats instance). Finally, sum all values, then convert from kilotons to kilograms.
Separately:
1. In contracts_footprint.py: add fees to each row and remove gas. Then re-run contracts_footprint.py and update the table in the readme.
Note: any server that regularly computes these numbers is going to need to run ethereum_stats.py on a daily basis to update the total transaction fees. Also, any emissions estimated for the current day should be treated with suspicion, as different data sources may be out of sync with each other.
The text was updated successfully, but these errors were encountered:
ethereum_footprint.py
needs to be almost completely replaced:__init__
, instead of loading the digiconomist energy consumption and etherscan gasUsed data, load theethereum-emissions
filedaily-ktco2.csv
which is regularly update on the gh-pages branch. Also, load an instance of theEthereumStats
class, which will give you access to thetx_fees
dict (mapping dates to total tx_fees).kgco2_per_gas()
fromEthereumFootprint
get_etherscan_data()
fromEthereumFootprint
sum_kgco2()
should run a different calculation. First, sum alltransactions
fees (usingtx.get_fees()
) based on the date of the transaction (usingtx.get_datetime()
). Then for each day, divide the total fees from those transactions by the total fees on that day (usingtx_fees
from theEthereumStats
instance). Finally, sum all values, then convert from kilotons to kilograms.Separately:
contracts_footprint.py
: addfees
to each row and removegas
. Then re-runcontracts_footprint.py
and update the table in the readme.Note: any server that regularly computes these numbers is going to need to run
ethereum_stats.py
on a daily basis to update the total transaction fees. Also, any emissions estimated for the current day should be treated with suspicion, as different data sources may be out of sync with each other.The text was updated successfully, but these errors were encountered: