EOS inflates their blocktivity stats by massively sending batched transactions with a value of 0.0001 EOS
I used eospy for receiving blocks from the EOS api. The python library can be installed with
pip3 install libeospy
The following script counts all operation on the EOS blockchain for the last hour:
from eospy.cleos import Cleos
from datetime import datetime, timedelta
from dateutil import parser
from timeit import default_timer as timer
ce = Cleos(url='http://eos.greymass.com')
info = ce.get_info()
block_number = info["head_block_num"]
block = ce.get_block(block_number)
start_time = parser.parse(block["timestamp"])
stop_time = start_time - timedelta(seconds=60 * 60)
parse_block_number = 60 * 60
blocksperhour = 60 * 60
start_block = block_number - parse_block_number
total_trx = 0
total_ops = 0
start = timer()
block_count = 0
ops_per_hour = 0
massive_ops = 0
sending_0_0001_op = 0
eosio_token_op = 0
block_time = start_time
while (block_time - stop_time).total_seconds() > 0:
if block_count % 100 == 0:
seconds_remaining = (block_time - stop_time).total_seconds()
print("%.1f seconds remaining... estimated ops per hour: %.1f" % (seconds_remaining, ops_per_hour))
block = ce.get_block(block_number)
block_time = parser.parse(block["timestamp"])
for trx in block["transactions"]:
status = trx["status"]
if isinstance(trx["trx"], str):
continue
total_trx += 1
total_ops += len(trx["trx"]["transaction"]["actions"])
if len(trx["trx"]["transaction"]["actions"]) > 80:
massive_ops += len(trx["trx"]["transaction"]["actions"])
for op in trx["trx"]["transaction"]["actions"]:
if "quantity" in op["data"] and op["data"]["quantity"] == '0.0001 EOS':
sending_0_0001_op += 1
if op["account"] == "eosio.token":
eosio_token_op += 1
block_number -= 1
block_count += 1
ops_per_hour = total_ops / block_count * blocksperhour
duration = timer() - start
print("Received %.2f blocks/s." % (block_count / duration))
print("Bocks: %d, duration %.3f s" % (block_count, duration))
print("Operations per hour: %d" % total_ops)
print("Trx per hour: %d" % total_trx)
print("Massive ops >80 ops in one trx: %d" % massive_ops)
print("Sending 0.0001 EOS ops: %d" % sending_0_0001_op)
print("Op from eosio.token: %d" % eosio_token_op)
After storing the script as blocktivity_eos.py, it can be started with:
python3 blocktivity_eos.py
Results
EOS | percentage of all ops | |
---|---|---|
Blocks | 7201 | |
duration | 3633.908 s | |
Blocks/s | 1.98 blocks/s | |
Trx per hour | 95982 | |
ops per hour | 2335876 | 100.00 % |
Trx with more than 80 ops | 2225403 | 95.27 % |
Transfer Ops with 0.0001 EOS | 2248245 | 96.25 % |
Ops from eosio.token | 2259728 | 96.74 % |
The account eosio.token
account is sending really a lot batched transactions with around 90 transfers operation inside a transaction. Most operations are sending 0.0001 EOS around.
Such a transaction can be seen here: https://bloks.io/transaction/fdfce13288e2ee8948521fa0a1084b9000cbfe6e2d649047862523bc4508c330
Excluding ops by eosio.token
EOS without eosio.token | |
---|---|
ops per hour | 76148 |
ops per day | 1827552 |
Using these stats would mean that EOS drops behind XLM on https://blocktivity.info/.
Why is sending eosio.token so many transfers?
My previous guess was the following (seems to be wrong as the transfer are caused by a smart contract)
The following is just my guess. There could be reasons that I did not see.
As transactions are free on EOS when an account has sufficient CPU and NET, it is important that there is sufficient activity on the EOS chain in order to keep the requirements on CPU and NET sufficient high. Otherwise nobody would need to stake (and lock) EOS when using the EOS blockchain. It would also be easy to spam the blockchain.
So sending massive transfers with 0.0001 EOS leads to:
- Number one on https://blocktivity.info/
- Other accounts cannot easily spam the EOS network
- Users of the EOS network are forced to stake EOS in order to be able to use the blockchain
Another observation is that it is surprisingly difficult to find a EOS fullnode that has the BLOCK API enabled.
All these transfers seems to be part of the EIDO smart contract
The massive op amount seems to be caused by the EIDOS contract on EOS https://www.dapp.com/app/eidos.
In a time duration of 15 month (begin was November 1, 2019, 8am GMT), EIDOS are minted every second. I have no idea why this needs around 600 ops per second, so lets check again in April 2021 when minting should be over.
If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD