Open kushal-babel opened 1 year ago
Yes, I think we can do it from the correctness point of view. I would challenge a bit whether this will in practice reduce the latency though. Perhaps you can add a metric for a number of blocks suspended in the BlockManager(can be useful anyway) to check if we actually have any blocks there(the good practice here would be to add two counters - when block is suspended and when it is removed from suspended, this way we can estimate both number of blocks in suspended and the rate at which blocks are added to suspended)
cc @LefKok
Let's just be careful to not do too much work about a block with non-existent parents. The important bit is that we cannot issue a vote without having the parents. Also the exec engine will have to realise that some dependencies may be missing and suspend execution (not a big deal, Sui does it)
IIUC from the code, we currently wait for the causal history of a block to be completely synchronized before aggregating votes for transactions and checking if we have a certificate (2f+1 votes). If we can already see that we have a certificate for a transaction (regardless of the position of that block in the DAG), I think we need not wait for sync to be complete in order to process the certificate (e.g. execution). This may help us in bridging some of the latency gap between fast path of Mysticeti and that of Sui Lutris. cc @andll @asonnino @gdanezis