dymint
dymint copied to clipboard
refactor EmptyBlock generation due to IBC support
due to https://github.com/dymensionxyz/research/issues/173:
relayer both are expecting at least one more block to be produced after the ibc-transfer tx block before dispatching the ibc-transfer.
we've implemented mechanism that tries to generate empty block on submission
// We try and produce an empty block to make sure relevant ibc messages will pass through during the batch submission: https://github.com/dymensionxyz/research/issues/173.
// Verify the last block in the batch is an empty block and that no ibc messages has accidentially passed through.
// This block may not be empty if another block has passed it in line. If that's the case our empty block request will
// be sent to the next batch.
if !isLastBlockEmpty {
m.logger.Info("Last block in batch is not an empty block. Requesting for an empty block creation", "endHeight", actualEndHeight)
m.produceEmptyBlockCh <- true
}
This mechanism can be improved by the following:
- RDK ante handler will mark IBC transfer packets with defined priority/code (
ResponseCheckTx
) - dymint will treat this field to force next block production.
this improves the mechanism, as it's not looks for empty blocks, but just validates that we have a block post ibc transfer
I think it's a good optimization to have but sounds like a lot of work for now. I think there are lower hanging fruits which relates to either UX or Usability. Lets prioritize it last for the current refactor sprint.
Can we close it? I doubt we'll do it Reopen if you feel different