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

Input and output previous STXO block validation check #1974

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

neonknight64
Copy link
Contributor

@neonknight64 neonknight64 commented Jun 10, 2020

Description

Added a full consensus block validation check that ensures that the inputs and outputs are not part of the STXO set. This duplicate hash check should be performed to ensure that when a block is added to the blockchain backend that it does not leave the backend in an inconsistent state.

I synced my base node from scratch and these changes do not seem to be consensus breaking.

Motivation and Context

As key value stores are used in the blockchain backend, adding of duplicate hashes can cause the backend to be in an inconsistent state.

How Has This Been Tested?

Code similar to transaction validation check, no tests were added.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

… inputs and outputs are not part of the STXO set. This duplicate hash check should be performed to ensure that when a block is added to the blockchain backend that it does not leave the backend in an inconsistent state.

- This change could be consensus breaking.
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

LGTM

I would be surprised if this is consensus breaking. I dont think there is any other implementations running on test net. This test was in the tx checking. But its good to be 100% sure

@CjS77 CjS77 merged commit 1e3ecd6 into development Jun 11, 2020
@sdbondi sdbondi deleted the yuko-block_validation_stxo_check branch June 11, 2020 09:45
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.

None yet

3 participants