go-spacemesh icon indicating copy to clipboard operation
go-spacemesh copied to clipboard

conservative cache: txs are packed with nonce gap when hare output empty layer

Open countvonzero opened this issue 2 years ago • 0 comments

  • hare WakeupDelta in fastnet config (used by systest/longevity test) is 2 seconds. the node's self-published proposal was still being verified while hare preround started. hare went into preround with an empty set and cause the hare consensus to output EmptyBlockID.
  • meanwhile, block proposals for the layer were all correctly saved after the hare preround started
  • conservative cache starts packing txs incorrectly. for example, account A has nonce 10-20 in the mempool. 10-13 is packed in a L10 proposal. 14-20 is packed in a L11 proposal. but if L10 doesn't produce a block, then L11's block (generated from L11 proposals) won't contain nonce 10-13.
  • optimistic filtering was off (https://github.com/spacemeshos/go-spacemesh/issues/3346), causing the txs to be packed into the block without checking nonce/balance. it then causes VM to reject a high percentage of txs, as the metrics shows below

Screenshot from 2022-07-15 09-57-29

countvonzero avatar Jul 16 '22 14:07 countvonzero