Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
18 stars 10 forks source link

SNARK fees get credited to recipient even when payment is invalid #1316

Closed trevorbernard closed 1 month ago

trevorbernard commented 1 month ago

SNARK fees are being credited to the recipient's account even when the payment is invalid.

https://minasearch.com/blocks/3NLB3wvGTmXasCS3Vo6PYU5nr3v5LggQPQEDFpJbNnyReRqeNX68/snark-jobs

This is an example of SNARK fees being 6,000,000 MINA each being applied 4 times.

Add logic to validate SNARK fees before issuing payment.

robinbb commented 1 month ago

This may be fixed by commit c7db06cf

trevorbernard commented 1 month ago

This may be fixed by commit c7db06c

The issue still exists. The problem is the Internal command fee transfer is invalid yet we still apply it.

robinbb commented 1 month ago

This may be fixed by commit c7db06c

The issue still exists. The problem is the Internal command fee transfer is invalid yet we still apply it.

How are you checking to see if the issue still exists? The commit mentioned has not been deployed to prod, nor has produced a ledger on tier3 testing.

How could a fee transfer that appears inside a precomputed block be invalid? The PCB is just a log of what has already been true for a Mina node, after all, so the node must have applied the fee transfer.