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

[CHIA-1087] Simplify batch pre validate blocks #18602

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Sep 18, 2024

This PR is best reviewed one commit at a time.

Purpose:

We currently use NPCResults in many places where the error cannot be set. This PR is a small step towards using the (inner) SpendBundleConditions directly in those cases.

Specifically, it makes batch_pre_validate_blocks() take a dict of SpendBundleConditions instead of NPCResults.
It also introduces an early exit in case get_name_puzzle_conditions() returns a failure.

The PreValidationResults still contains an NPCResult, as it's a bit more work to make it use SpendBundleConditions directly. Although, it could; the error is not allowed to be set.

Current Behavior:

batch_pre_validate_blocks() takes a dict of uint32 -> NPCResult.

New Behavior:

batch_pre_validate_blocks() takes a dict of uint32 -> SpendBundleConditions.

@arvidn arvidn added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Sep 18, 2024
@arvidn arvidn force-pushed the simplify-batch_pre_validate_blocks branch from 4e40404 to 456c4d5 Compare September 18, 2024 11:39
@arvidn arvidn marked this pull request as ready for review September 18, 2024 12:13
@arvidn arvidn requested a review from a team as a code owner September 18, 2024 12:13
AmineKhaldi
AmineKhaldi previously approved these changes Sep 19, 2024
@github-actions github-actions bot added the merge_conflict Branch has conflicts that prevent merge to main label Sep 23, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@arvidn arvidn force-pushed the simplify-batch_pre_validate_blocks branch from 456c4d5 to 63489b6 Compare September 23, 2024 23:45
@github-actions github-actions bot removed the merge_conflict Branch has conflicts that prevent merge to main label Sep 23, 2024
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@arvidn arvidn changed the title Simplify batch pre validate blocks [CHIA-1087] Simplify batch pre validate blocks Sep 24, 2024
Copy link
Contributor

@wjblanke wjblanke left a comment

Choose a reason for hiding this comment

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

aok

@arvidn arvidn added the ready_to_merge Submitter and reviewers think this is ready label Sep 26, 2024
@pmaslana pmaslana merged commit 0059b5e into main Sep 26, 2024
374 checks passed
@pmaslana pmaslana deleted the simplify-batch_pre_validate_blocks branch September 26, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog ready_to_merge Submitter and reviewers think this is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants