This issue is to record the issue which was discussed on the blockchain-development Discord channel.
The issue was checked for a specific hotspot, but then it is seen that this is a more wide spread issue. Below was the hotspot checked:
etl=# select
etl-# reactivated_gw,
etl-# block as "block with reactivated_gw",
etl-# case
etl-# when block = i.last_poc_challenge then 'last_poc_challenge'
etl-# when block = i.last_block then 'last_block'
etl-# else 'did not update'
etl-# end as "field updated",
etl-# i.last_poc_challenge,
etl-# i.last_block
etl-# from transactions t, gateway_inventory i
etl-# cross join lateral jsonb_array_elements_text ( fields -> 'reactivated_gws' ) as reactivated_gw
etl-# where i.address='112rnMxNSvqaAWyXxDg5T8zkcRcpdhdzcEJKiwbzErx2FpXgrcLw'
etl-# and (block = i.last_poc_challenge or block = i.last_block)
etl-# and type = 'validator_heartbeat_v1'
etl-# and reactivated_gw = i.address
etl-# order by block desc;
reactivated_gw | block with reactivated_gw | field updated | last_poc_challenge | last_block
------------------------------------------------------+---------------------------+---------------+--------------------+------------
112rnMxNSvqaAWyXxDg5T8zkcRcpdhdzcEJKiwbzErx2FpXgrcLw | 1355455 | last_block | 1355450 | 1355455
(1 row)
And this is the transaction with different block values for the block column and the fields:
This query is to show how the data for the hotspots are in general:
etl=# select
etl-# case
etl-# when block = i.last_poc_challenge then 'last_poc_challenge'
etl-# when block = i.last_block then 'last_block'
etl-# else 'did not update'
etl-# end as field_updated,
etl-# count(*)
etl-# from transactions t, gateway_inventory i
etl-# cross join lateral jsonb_array_elements_text ( fields -> 'reactivated_gws' ) as reactivated_gw
etl-# where (block = i.last_poc_challenge or block = i.last_block)
etl-# and type = 'validator_heartbeat_v1'
etl-# and reactivated_gw = i.address
etl-# and t.block > 1300000
etl-# and i.last_poc_challenge > 1300000
etl-# and i.last_block > 1300000
etl-# group by field_updated;
field_updated | count
--------------------+--------
last_block | 159615
last_poc_challenge | 1687
(2 rows)
This issue is to record the issue which was discussed on the blockchain-development Discord channel.
The issue was checked for a specific hotspot, but then it is seen that this is a more wide spread issue. Below was the hotspot checked:
And this is the transaction with different block values for the
block
column and thefields
:This query is to show how the data for the hotspots are in general: