mohamedmansour / ethereum-burn-stats Goto Github PK
View Code? Open in Web Editor NEWWebsite that showcases EIP-1559 Burn
Home Page: http://watchtheburn.com
License: MIT License
Website that showcases EIP-1559 Burn
Home Page: http://watchtheburn.com
License: MIT License
Right now we listen on each node from the execution client for Proof of Work to get the metadata, and we do some stats to get the data you see today. Since Proof of Stake will come soon, we need to get ready and listen on the beacon node to get the data as well. We need a plan to implement that.
Perhaps the tasks would be broken up by:
stats.go
and hub.go
to use the new wrappers.It is useful to see transaction count when you hover over the block in home page
The idea is to keep historical burn data and plot them in a chart. That requires a daemon to run other than geth. And the idea here is that clients connect to this daemon and that daemon connects to the geth instances locally. That way we can add Geth caching per api call, and we can safely not expose geth to the public.
Right now we just log the error on server side, but it would be nice to have some user feedback. In the client we keep track of the promise calls and match the responses with a sequential id, we should fire a a timeout promise and if it comes back within 5 seconds, show an error/
The graph claims that a block's net_issuance
is equal to its total_rewards - total_burned
, but it should reflect a different metric (and potentially 3 categories):
coinbase (actually issued currency)
rewards (money paid as tip, not actually issued)
burned (amount of base_fee burned)
net_issuance = coinbase - burned
In my screenshot above, we see:
rewards = 3.8125
burned = 0.2562
net_issuance = (rewards - burned) = 3.5563
I'm suggesting it should be:
coinbase = 2
tip = 1.8125
burned = 0.2562
net_issuance = (coinbase - burned) = (2 - 0.2562) = 1.7438
(and, if you want) total_rewards = (coinbase + tip) = 3.8125
Entering the site and just the "connecting to mainnet, please wait" text is visible with the animation.
Console error:
WebSocket connection to 'wss://watchtheburn.com/ws' failed:
Very minor label/info correction.
The burned, I think just to be more clear gas units versus 'gas used'.
The Net Issuance is the main issue, it should be 'rewards - burned' vs 'burned - rewards'.
The actual calculations look correct, just the 'info' description.
In: frontend/src/config.ts
Current:
burned: "Burned is the amount of ETH removed from circulation: gas used x base fee.",
netIssuance: "Net Issuance the amount of new ETH coming into circulation: burned - rewards.",
Should be:
burned: "Burned is the amount of ETH removed from circulation: gas units (limit) x (base fee)."
netIssuance: "Net Issuance the amount of new ETH coming into circulation: rewards - burned.",
When the user switches network, it would be nice to switch the URL entirely so the URLs become shareable. Instead of switching inline in the app.
This only happens on startup while running --race, just once it happens
==================
WARNING: DATA RACE
Read at 0x00c00020a450 by goroutine 98:
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).handleInitialData.func1()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:545 +0xc71
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Client).readPump()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/client.go:134 +0x57c
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).serveWebSocket·dwrap·7()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:347 +0x39
Previous write at 0x00c00020a450 by goroutine 84:
runtime.mapassign_fast64()
/usr/local/go/src/runtime/map_fast64.go:92 +0x0
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).listen()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:258 +0x1ea
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).ListenAndServe·dwrap·5()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:319 +0x39
Goroutine 98 (running) created at:
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).serveWebSocket()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:347 +0x405
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).serveWebSocket-fm()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:331 +0x57
net/http.HandlerFunc.ServeHTTP()
/usr/local/go/src/net/http/server.go:2046 +0x4d
net/http.(*ServeMux).ServeHTTP()
/usr/local/go/src/net/http/server.go:2424 +0xc5
net/http.serverHandler.ServeHTTP()
/usr/local/go/src/net/http/server.go:2878 +0x89a
net/http.(*conn).serve()
/usr/local/go/src/net/http/server.go:1929 +0x12e4
net/http.(*Server).Serve·dwrap·82()
/usr/local/go/src/net/http/server.go:3033 +0x58
Goroutine 84 (running) created at:
github.com/mohamedmansour/ethereum-burn-stats/daemon/hub.(*Hub).ListenAndServe()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/hub/hub.go:319 +0xa4
github.com/mohamedmansour/ethereum-burn-stats/daemon/cmd.root()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/cmd/root.go:90 +0xc9
github.com/mohamedmansour/ethereum-burn-stats/daemon/cmd.newRootCmd.func1()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/cmd/root.go:42 +0x2c6
github.com/spf13/cobra.(*Command).execute()
/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0xa7d
github.com/spf13/cobra.(*Command).ExecuteC()
/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x5da
github.com/spf13/cobra.(*Command).Execute()
/go/pkg/mod/github.com/spf13/[email protected]/command.go:902 +0x29
github.com/mohamedmansour/ethereum-burn-stats/daemon/cmd.Execute()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/cmd/root.go:100 +0x20
main.main()
/go/src/github.com/mohamedmansour/ethereum-burn-stats/daemon/main.go:8 +0x24
==================
I see a lot of people confused about the "Issued" verbiage. I'd like to propose to have 3 metrics: burned, minted, and net issued. This should alleviate the misunderstandings around those numbers. Bonus points if there's a subscript under the net issuance value that says "N% reduction" or something like that.
Current:
Totals since EIP-1559 | |
---|---|
Burned | 37,554.27 ETH |
Issued | 71,974.85 ETH |
Proposed:
Totals since EIP-1559 | |
---|---|
Burned | 37,554.27 ETH |
Minted | 109,529.12 ETH |
Net Issued | 71,974.85 ETH |
Fix the ropsten ws port for nginx web proxy to be 8557
Would be nice to show the USD value. One way to make this happen is to have a cronjob running to get access to current prices and store them in a json file in the same web location. We don't have a backend, just a connection to Geth
Need to figure out how to do reverse proxy for Geth to work on nginx to make SSL work.
Currently it is set to this but it doesn't work it, does anyone have any clue?
upstream websocket_geth {
server 127.0.0.1:8546;
}
map $http_upgrade $connection_upgrade{
default upgrade;
`` close;
}
server {
root /var/www/watchtheburn.com;
# Add index.php to the list if you are using PHP
index index.html;
server_name watchtheburn.com;
error_page 404 = /404.html;
location /ws {
proxy_pass http://websocket_geth;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location / {
try_files $uri $uri/ =404;
}
location /404.html {
internal;
}
listen 80;
listen [::]:80;
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/watchtheburn.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/watchtheburn.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
Records are nice to see top burn per day/week/all etc. And other metrics too. Something like gamification.
Imagine once people are watching, and they experience a record being broken, they can share that moment to Twitter :D
We currently have a setting to switch network, but it does nothing.
We would need to add chainId there to verify the network is correct, otherwise navigate to the right network. It would be nice if the user can use the block explorer, but the burned stuff would just return 0. SO including the block activation would be great.
Make an API so people can retrieve burned / tips / etc information from each block.
Is there a license (e.g. MIT, Apache 2.0) attached to this repo? :)
Use coinbase API to show the USD Fees as well
Use Ether, Gwei, and Wei measurements.
Minimum Gwei should be 0.009 for it to convert
Minimum Either should be 0.009 for it to convert
Website refuses to load because of this. I assume it has to do with Commit e7049f8, should be pretty simple to fix?
Might as well add that it would be nice to handle errors like this (at least show a message or something). First time this happend I waited longer than I want to admit before noticing something was wrong.
SENT: {"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}
RECV: {"jsonrpc":"2.0","id":1,"result":"0x7b"}
SENT: {"method":"eth_blockNumber","params":[],"id":2,"jsonrpc":"2.0"}
RECV: {"jsonrpc":"2.0","id":2,"result":"0x10486"}
SENT: {"method":"eth_getBlockByNumber","params":["0x10486",false],"id":3,"jsonrpc":"2.0"}
RECV: {"jsonrpc":"2.0","id":3,"result":{..., number":"0x10486",...}}
SENT: {"method":"debug_getBlockReward","params":["0x010486"],"id":4,"jsonrpc":"2.0"}
RECV: {"jsonrpc":"2.0","id":4,"error":{"code":-32602,"message":"invalid argument 0: hex number with leading zero digits"}}
Currently the web site displays the fees (base + priority) for a number of blocks up to the current one. Is it possible to see the fees up to a specific block?
I'm asking this because I saw something really interesting last night, but unfortunately I didn't take a screenshot and now I don't have a way to get back to it.
Would it be possible to provide a last block in the url, such as https://watchtheburn.com?last_block=14689112
?
I think you are only using the current block time to calculate the estimate, which doesn't work due to the random nature of mining.
Since you already store blocks in-browser for the chart and list, I would suggest to average their Block time for a more stable estimate.
Would be nice to spice up the UI and add a burn animation somewhere on top. There are many CSS techniques we can do with SVG and what not.
For sharing on Social Media, it would be nice if we have a HTTP GET endpoint that generates an image with some stats on it.
Then we can include it in the meta tags:
<meta property="og:title" content="WatchTheBurn.com">
<meta property="og:image" content="https://watchtheburn.com/api/social.png">
<meta property="og:description" content="Some description">
<meta name="twitter:title" content="WatchTheBurn.com">
<meta name="twitter:description" content="Some description">">
<meta name="twitter:image" content="https://watchtheburn.com/api/social.png">
<meta name="twitter:card" content="summary_large_image">
The image could be 924x461 dimensions to fit Twitter nicely.
The navigation flow is becoming confusing. It would be nice to remove Home entirely and make the main page home page. So we would have just one page that has the stats in one row (header row), the charts in another row, and then the real-time table underneath.
Tasks
Add a countdown till activation of Burns in home page for network not selected
Figure out which wallets / contracts are burned the most.
We need to figure out what the name too
Instead of Watch Ethereum Burn should be, Watch The Burn: Ethereum EIP-1559
This should not render, it should either cut off the decimals or go to ETH unit.
2,327,210.7621 GWEI
From Peter:
You'll probably want to make "burned wei" a bit friendlier (e.g. add 1000 separators and maybe scale with the size (e.g. ~1.234 gwei instead of 1234567890), since once you get into meaningful basefees, those number will have 9 more digits.
Would be nice to place a time ago timestamp on session summary so we know how long we observed the burn
It would be nice to add the average ETH burnt per day since 159 launched. I'd imagine it's a fairly simple calculation, something along the lines of:
average burnt per day = (total burnt) / ( [(current epoch)-(start epoch)] \ 86400)
Current:
Latest Stats | |
---|---|
Base Fee | 56 GWEI |
Watching the Burn | 297 users |
Proposed:
Latest Stats | |
---|---|
Base Fee | 56 GWEI |
Ave Burn Per Day | 4,567.89 ETH |
Watching the Burn | 297 users |
Would be nice to have a base fee and rewards API so we can visualize this better.
We can increase the number of blocks visible by using react-window and improve perf event more.
https://github.com/bvaughn/react-window
It seems it is just showing index not block number
currently it is at GWEI, should be Ether instead
We know the EIP 1559 block was activated, would be nice to showcase that timestamp there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.