stacks-core
stacks-core copied to clipboard
Two miner rewards per block
The miner_rewards table ingested by the API contains 2 rows per mature_block_height :
- 1 row contains the coinbase_amount, with 0 tx fees & with the correct miner address (i think)
- while the other row has 0 coinbase_amount but a different miner address.
hypotheses is that the stacks-node is sending a dupe event that the API is ingesting and writing that second row where the coinbase_amount is zero.
more details can be found in this thread https://discord.com/channels/621759717756370964/909867922971820102/1363925034690806090
cc @rafaelcr
from the api's miner_reward table:
id | block_hash | index_block_hash | from_index_block_hash | mature_block_height | canonical | recipient | miner_address | coinbase_amount | tx_fees_anchored | tx_fees_streamed_confirmed | tx_fees_streamed_produced
----+--------------------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------+-----------+-------------------------------------------+-------------------------------------------+-----------------+------------------+----------------------------+---------------------------
3 | \x43b56c6c487f0860ac42d25a497027dd99a60822489686a57888f2b6c9c06d8b | \x77d560287130f36d3be2f2ee7f24e56f3fb4fafbeb189ccc39c24cd55bde9848 | \xca4b40509fa64c3676038b2c0f868559d1583c76617dee7b958028b17cc141b1 | 103 | t | SP105ARDW7EQTFTFMYNGMKJTA9JYFHF0FFMW9K815 | SP105ARDW7EQTFTFMYNGMKJTA9JYFHF0FFMW9K815 | 2466400000 | 0 | 0 | 0
4 | \x43b56c6c487f0860ac42d25a497027dd99a60822489686a57888f2b6c9c06d8b | \x77d560287130f36d3be2f2ee7f24e56f3fb4fafbeb189ccc39c24cd55bde9848 | \xca4b40509fa64c3676038b2c0f868559d1583c76617dee7b958028b17cc141b1 | 103 | t | SP105ARDW7EQTFTFMYNGMKJTA9JYFHF0FFMW9K815 | SP105ARDW7EQTFTFMYNGMKJTA9JYFHF0FFMW9K815 | 0 | 0 | 0 | 0
and a recent nakamoto block (which has 2 rows, but the data is slightly different for 2 valid miners):
id | block_hash | index_block_hash | from_index_block_hash | mature_block_height | canonical | recipient | miner_address | coinbase_amount | tx_fees_anchored | tx_fees_streamed_confirmed | tx_fees_streamed_produced
--------+--------------------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------+-----------+-------------------------------------------+-------------------------------------------+-----------------+------------------+----------------------------+---------------------------
415835 | \x4d6b812817b14cca8b439d38c98ff8244db3ad7a32609456b112e4170340100c | \x8568fede2d2a7eb0b5693e204606376bb361ac480e726996f5cd38043580f50a | \x601300ccc162a3dd24f4080f5d0c322152f10222f99fa50130ffabc351c5a287 | 1013278 | t | SP1YAVCV34TT37ACR0ZD9JTASMF915MJMHCN8ENCQ | SP3MCVE3HJP6T8QS4A9R0ETVJVGRZJA04MKJTPHG5 | 2000000000 | 0 | 0 | 0
415836 | \x4d6b812817b14cca8b439d38c98ff8244db3ad7a32609456b112e4170340100c | \x8568fede2d2a7eb0b5693e204606376bb361ac480e726996f5cd38043580f50a | \x601300ccc162a3dd24f4080f5d0c322152f10222f99fa50130ffabc351c5a287 | 1013278 | t | SPHB6E6GNWH55X9PZ3KNYMCEKTVP7YP60A0GBKPK | SPHB6E6GNWH55X9PZ3KNYMCEKTVP7YP60A0GBKPK | 0 | 0 | 0 | 3627564
tx_fees_streamed_producedis the tx fees being paid out to the previous tenure's miner @kantai