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

Verify avm mempool txs against the last accepted state #2569

Merged
merged 1 commit into from
Dec 31, 2023

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Dec 31, 2023

Why this should be merged

This ensures that the X-chain mempool only contains transactions that are valid to be issued or will be removed from the mempool from transactions that are currently in the processing chain.

How this works

Verifies transactions against the last accepted state rather than the currently preferred state.

How this was tested

  • CI

@StephenButtolph StephenButtolph added the vm This involves virtual machines label Dec 31, 2023
@StephenButtolph StephenButtolph added this to the v1.10.18 milestone Dec 31, 2023
@StephenButtolph StephenButtolph self-assigned this Dec 31, 2023
return err
}

return m.VerifyUniqueInputs(m.preferred, executor.Inputs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: BuildBlock still verifies unique inputs (https://github.com/ava-labs/avalanchego/blob/verify-against-accept/vms/avm/block/builder/builder.go#L141)

This PR only removes this check from the mempool verifier.

Copy link
Contributor

@patrick-ogrady patrick-ogrady left a comment

Choose a reason for hiding this comment

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

This is fine as long as there is no way for a tx to become invalid (other than via conflicts) after verifying on the accepted state.

@StephenButtolph StephenButtolph added this pull request to the merge queue Dec 31, 2023
Merged via the queue into dev with commit 89bc40c Dec 31, 2023
17 checks passed
@StephenButtolph StephenButtolph deleted the verify-against-accept branch December 31, 2023 21:18
pull bot pushed a commit to AKAJOKER2/avalanchego that referenced this pull request Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vm This involves virtual machines
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants