Giter Site home page Giter Site logo

ethsupply's People

Contributors

madumas 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  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  avatar  avatar

ethsupply's Issues

Use exact genesis issuance

Hey! The issuance used in this script is 72009990.50. The exact issuance in WEI is 72009990499480000000000000 and in ETH is 72009990.49948. These values can be generated from Geth here (RLP-encoded): https://github.com/ethereum/go-ethereum/blob/48b484c5ac537d1759c9903ce81302c298f03a84/core/genesis_alloc.go Open Ethereum here (json): https://github.com/openethereum/openethereum/blob/master/ethcore/res/ethereum/foundation.json, and Nethermind (json) here: https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Chains/foundation.json

I think it's important to get this exactly right.

ETH Issuance Reconciliation

Hey, I just published my script for total ETH issuance: https://twitter.com/lastmjs/status/1294742341593387008?s=20

I'm trying to collect reconciliations between these scripts. I'm documented the numbers in this table here: https://github.com/lastmjs/eth-total-supply#reconciliation

I would love some help on this! I've been running the numbers on your script, and I've already opened an issue for this, but the biggest problem I see is the genesis information you have is slightly off.

Use something like BigNumber.js, do calculations in WEI

Hey, I think your calculations might start getting off as the cumulative sums increase down the blockchain. Using JavaScript's floating-point numbers is going to be inaccurate when dealing with decimal places. I recommend doing all calculations with BigNumber.js, and in WEI, then dividing by 10**18 to display the final result

Bignumber division

On lines 31,41 Bignumber division might be safer.

          const totalReward = baseReward + baseReward * (1 / 32) * block.uncles.length;

Transaction rewards

Hi,

Please forgive my ignorance as I'm relatively new to Ethereum. I was wondering shouldn't we include transaction fees in block reward calculation?

When looking at various Statistics websites, I always see three numbers adding up to the total block reward:

static block reward + trx fees + uncle inclusion rewards + uncle rewards

Screenshot 2021-05-03 at 2 26 09 PM

Why are transaction fees not included in total supply calculation?

Script is assuming, not verifying

The script only assumes that certain amount of ETH has been issued while ignoring transactions and account balances.

If an account balance was edited, this script would not catch it.

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.