How Many Blocks and Total Rewards for a Steem Witness in the Pas
- 时间:2020-10-11 15:25:20
- 分类:网络文摘
- 阅读:158 次
The blockchain is a public database, this shouldn’t be hard to find out. In this post we know how to call the Steem API to find out the witness that procduce each block and the reward (in VESTS) he/she collects for generating the block (mining).
Let’s create a database in SQLite – with the schema:
sqlite> .schema CREATE TABLE witnessblocks ( witness text, number integer, vests real, time text, block integer, constraint pkey primary key (block) ); CREATE INDEX index_block on witnessblocks(block); CREATE INDEX index_witness on witnessblocks(witness); CREATE INDEX index_time on witnessblocks(time); CREATE INDEX index_vests on witnessblocks(vests); CREATE INDEX index_number on witnessblocks(number);
Then, we can run a SQL to find out the number of blocks and total rewards for each witness. Results are sorted by total rewards in SP (which can be computed by simply roughly divided by 1943 SP) – see this number at: steemyy.com
Query:
select witness, count(1), sum(vests/1943.761) as total
from witnessblocks
where time >= date('now', '-24 hour')
group by witness
order by total desc
limit 30;
Result (a bit surprising, more than expected, different than what the steemworld says @steemchiller): I double check the data and everything seems correct. My understanding is that a lot of misses are re-scheduled and that is why the TOP witnesses get more turns to produce blocks.
justyy|2326|578.82025257632 steemchiller|2324|578.325146664636 hinomaru-jp|2324|578.322147174472 hivei0|2323|578.073978002953 scissor.sisters|2322|577.826185736312 dlike|2321|577.5771644482 steem-supporter|2320|577.328037061142 inwi|2319|577.082116292075 beargame|2319|577.079035895361 smt-wherein|2318|576.832034089068 steem-dragon|2318|576.831055014993 roundblocknew|2318|576.828982039459 rnt1|2317|576.583037687762 hoasen|2317|576.582024700568 symbionts|2317|576.578049543128 steem-agora|2316|576.338157853255 maiyude|2316|576.336006269803 future.witness|2313|575.584969334193 protoss20|2309|574.593023568226 dev.supporters|2305|573.596812309745 matreshka|193|240.560583586665 parse|192|239.309574386974 cryptoking777|191|238.066390513031 menacamel|191|238.066344493484 juddsmith079|190|236.823358969544 enjoylondon|190|236.815291552305 rlawlstn123|187|233.082098971016 leverfile|186|231.834906382009 upeross|185|230.587764003393 roadofrich|30|37.3927565415707
Once this data is verified, I’ll add it to the witness ranking table.
Update: There is a mistake in the SQL: I should have used `datetime(‘now’, ‘-24 hour’)` instead of `date(‘now’, ‘-24 hour’)`. The datetime returns date and time while the date only returns the date string part in SQLite – so when used, it is actually the same as “YYYY-MM-DD 00:00:00” which makes the timespan more than 24 hours.
–EOF (The Ultimate Computing & Technology Blog) —
推荐阅读:数学题:在11次红灯变绿灯之间的黄灯亮起中 奥数题:从这两堆煤中分别运走同样的吨数后 数学题:用4cm长的线段表示实际距离1200km 数学题:一根圆柱形木头小明的爸爸将它锯成4段 奥数题:当王明在100m赛跑冲到终点时,领先刘铭10m 数学题:小敏要买一些圣诞卡 奥数题:一列火车匀速速度向北缓缓驶去 奥数题:小胖和小丁丁骑自行车从一条公路的两端同时出发相向而行 数学题:实际的工作效率是原计划的百分之125 数学题:将圆柱体加工成体积最大的长方体
- 评论列表
-
- 添加评论