-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Mempool and BP using different State Services #243
base: develop
Are you sure you want to change the base?
Conversation
@@ -337,6 +337,107 @@ describe("block production", () => { | |||
expect(newState).toBeUndefined(); | |||
}, 30_000); | |||
|
|||
it("should produce txs in non-consecutive blocks", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ejMina226 What is the unique thing of this test that isn't covered in the others? Can this be modeled using the multiple blocks test in line 471(ish)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted the txs to appear in non-consecutive blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The should produce multiple blocks with multiple batches with multiple transactions
has consecutive blocks of txs, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to remove if you think it overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by non-consecutive? If I understand it correctly, you have 1 tx per block here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two different senders. I wanted the first sender to have their txs in non-consecutive blocks. The second sender is just to ensure the interim blocks are non-empty.
A community member reported seeing an issue where a tx was stuck in pending, i.e. never included in a block. This was because when a block is produced it checks to see if a tx is valid, which involves checking the nonce (amongst other things). A previous tx had already been sent from the same sender, but this was not being noticed by the BP and so expected the tx in the mempool to have nonce 0, rather the the correct nonce of 1, which it in fact had. Consequently, the tx was never picked up and just sat there in the mempool.