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

Ensure Transaction Uniqueness in check_next_block #24

Draft
wants to merge 1 commit into
base: mainnet-staging
Choose a base branch
from

Conversation

kpandl
Copy link
Collaborator

@kpandl kpandl commented Aug 23, 2024

Motivation

The check_next_block function, which is executed by syncing nodes, currently lacks a validation step to ensure that new transactions in a block do not already exist in the ledger. Without this check, there is a risk that duplicate transactions could be introduced into the ledger. This PR adds the necessary validation to prevent such scenarios, ensuring that each transaction is only included once.

This only affects syncing nodes.

Test Plan

Ran it locally.

TODOs:

  • add unit test to showcase in which scenario the missing uniqueness check could have been exploited.

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

Successfully merging this pull request may close these issues.

1 participant