I observe an issue for a long time that I can't explain.
There is a value produced in BlockImport::import_block
that must be included in inherents of n+1
.
Though sometimes it seems like value is not available yet.
I have checked the code multiple times over last months and can't find any issue with it.
This seems to be correlated with blocks produced locally by the node
.
I'm wondering if it is possible that block n
is built locally and block building starts for n+1
(creating inherents, etc) before n
goes through BlockImport::import_block
successfully (it doesn't do full execution there because block.state_action == StateAction::ApplyChanges
)?
Consensus is custom, but based on sc-consensus-slots
.
N
is already there? You are sure that you use the same block import pipeline for import and block production?n + 1
or againn
because the block import wasn't not yet finished?sc-consensus-slots
produces blocks in sequence, I suspect it never tries to produce a block before the previous one succeeds. But concurrent blocks can be created by other nodes on the network (and during last reproduction I observed heavy temporary forking).