Skip to content
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

add debug log for dropped pending txs notifications #300

Closed
wants to merge 1 commit into from

Conversation

joshua-kim
Copy link
Contributor

Why this should be merged

Add a debug log for blocks that we're not building due to the previous block still pending

How this works

Adds a debug log

How this was tested

Did not test

@@ -111,6 +111,7 @@ func (b *blockBuilder) needToBuild() bool {
func (b *blockBuilder) markBuilding() {
// If the engine has not called BuildBlock, no need to send another message.
if b.buildSent {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to bound this somehow as a failsafe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that's an interesting idea. I feel like the invariant should be that if we send PendingTxs to consensus, we are guaranteed that BuildBlock should be called on the VM.

If we do want to bound this by making this something like an atomic int we can as part of a separate PR but it's not something I'm personally inclined towards since I don't feel like the VM should have to worry about this from its perspective. I feel like I'd rather have either extreme of us only sending the notification once until the BuildBlock is called, or just not even track this builtSent flag at all.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the engine should signal this to the VM (probably with BuildBlock taking an extra err or in the block.context) so that VMs can know that proposerVM has failed creating the block. and they can reset buildSent.

Or we can set a safe timeout for this (>30 sec) and reset the buildSent once we timeout on BuildBlock.

cc @darioush @aaronbuchwald

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will currently emit a debug log every time we signal there are new transactions, so each time a new transactions event is issued, which seems more often than we would want imo.

@joshua-kim
Copy link
Contributor Author

Corresponding PR in subnet-evm: ava-labs/subnet-evm#783

@aaronbuchwald
Copy link
Collaborator

Closing since we added logs to cover this edge case in AvalancheGo instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants