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

doc: Assert that assumed-valid blocks are not fully valid in CheckBlockIndex() #29355

Closed
wants to merge 1 commit into from

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Jan 31, 2024

It does not make sense for a block to be fully-valid and assumed-valid at the same time.

Check it in CheckBlockIndex() and fix the tests that violate this assumption.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 31, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK fjahr, ryanofsky
Concept ACK delta1, epiccurious

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29370 (assumeutxo: Get rid of faked nTx and nChainTx values by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@delta1
Copy link

delta1 commented Feb 2, 2024

Concept ACK fa027e0

@epiccurious
Copy link

Concept ACK fa027e0.

@fjahr
Copy link
Contributor

fjahr commented Feb 19, 2024

Seems reasonable, code review ACK fa027e0

Not sure why this is marked as a "doc" change though.

@delta1
Copy link

delta1 commented Feb 20, 2024

@fjahr i think drahtbot added that label because the commit starts with “doc:”

@fjahr
Copy link
Contributor

fjahr commented Feb 20, 2024

@fjahr i think drahtbot added that label because the commit starts with “doc:”

Yes, my question is why the "doc" is there in the commit desciption

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK fa027e0. This change makes sense and is an improvement over the status quo. I think it could be considered it a "doc" change since it is just adding an assert, which is a form of documentation, and not changing actual code. Not sure if that is how "doc" has been used other places, though.

This PR is a little redundant with #29370, which drops the BLOCK_ASSUMED_VALID flag entirely, so there is no way it could conflict with BLOCK_VALID_SCRIPTS. But it makes sense to check for conflicting flags as long as both flags exist.

@maflcko
Copy link
Member Author

maflcko commented Feb 21, 2024

This PR is a little redundant with #29370, which drops the BLOCK_ASSUMED_VALID flag entirely, so there is no way it could conflict with BLOCK_VALID_SCRIPTS. But it makes sense to check for conflicting flags as long as both flags exist.

Yeah, makes sense. I forgot to close this pull when the other was opened.

@maflcko maflcko closed this Feb 21, 2024
@maflcko maflcko deleted the 2401-doc-au-fully-valid- branch February 21, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants