when we stopped or trin-execution crashed we would need to restart from 0
If a download of a era file failed, it would just panic instead of retrying getting the era file
we didn't verify gas used, which means we could commit invalid data to the database, which means we would corrupt our database on invalid state execution
we were running trin-execution from a test which wasn't sustainable
How was it fixed?
I implemented ExecutionPosition which saves our position on every commitment, and is used to initial where to start on starting trin-execution
I implemented EraManager a "Smart" object which will fetch us any block we request by number, it also has log_2 sleep retries which is very nice.
Normally gas used verification is done at the end of block execution, but because we execute from era1 files which contain receipts. We can use the receipts which contain the incremental cumulative_gas_used to verify exactly which transaction failed executing so our database doesn't get corrupted with bad data
I made trin-execution so it could be ran as a standalone application, this will allow us to better build out trin-execution, as running it from a test was just not cutting it anymore.
I am so hyped about this PR because now I can focus on fixing bugs, instead of waiting forever to resync every time
What was wrong?
How was it fixed?
ExecutionPosition
which saves our position on every commitment, and is used to initial where to start on starting trin-executionEraManager
a "Smart" object which will fetch us any block we request by number, it also has log_2 sleep retries which is very nice.I am so hyped about this PR because now I can focus on fixing bugs, instead of waiting forever to resync every time