In order to have explicit and easily queryable information on whether blocks have already been successfully executed, a new storage BlockMetadaStorage (and BlockMetadataProxy ) was added.
This storage can easily be extended in the future if we need more metadata block information.
Proposed Solution
Added BlockMetadaStorage, BlockMetadataProxy and modified ConsensusImpl to first check for already executed blocks and only executed those blocks not yet executed.
A small step of this implementation is missing, which is to add the initial block metadata with isExecuted=false, because it can only be done once saving blocks is extracted from BlockExecutions and done in a chains manager layers. Follow-up ticket created ETCM-1138
The PR is divided into several commits, that help on the review.
Description
In order to have explicit and easily queryable information on whether blocks have already been successfully executed, a new storage
BlockMetadaStorage
(andBlockMetadataProxy
) was added. This storage can easily be extended in the future if we need more metadata block information.Proposed Solution
Added BlockMetadaStorage, BlockMetadataProxy and modified ConsensusImpl to first check for already executed blocks and only executed those blocks not yet executed. A small step of this implementation is missing, which is to add the initial block metadata with
isExecuted=false
, because it can only be done once saving blocks is extracted from BlockExecutions and done in a chains manager layers. Follow-up ticket created ETCM-1138 The PR is divided into several commits, that help on the review.Testing
Tested again ETC mainnet