-
Notifications
You must be signed in to change notification settings - Fork 27
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-1562] validate block signature as part of run_block_generator()
#745
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arvidn
changed the title
validate block signature as part of
[CHIA-1562] validate block signature as part of Oct 4, 2024
run_block_generator()
run_block_generator()
arvidn
force-pushed
the
run_block_validate_signature
branch
2 times, most recently
from
October 4, 2024 17:03
a8c6f33
to
fe797f6
Compare
Pull Request Test Coverage Report for Build 11259684754Details
💛 - Coveralls |
arvidn
requested review from
Rigidity and
matt-o-how
and removed request for
Rigidity
October 4, 2024 18:50
arvidn
force-pushed
the
run_block_validate_signature
branch
2 times, most recently
from
October 8, 2024 14:43
100ccbe
to
f3dcac8
Compare
…n opt-out for tests and maybe we'll need it in production too
arvidn
force-pushed
the
run_block_validate_signature
branch
from
October 8, 2024 19:23
f3dcac8
to
759c6f0
Compare
note that the meat of this patch is in |
…en DONT_VALIDATE_SIGNATURE is set. For backwards compatibility
matt-o-how
previously approved these changes
Oct 9, 2024
Rigidity
reviewed
Oct 9, 2024
Rigidity
previously approved these changes
Oct 9, 2024
Rigidity
approved these changes
Oct 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is an opt-out for tests and maybe we'll need it in production too.
There are 3 main intentions:
In this first version, theBLSCache
is not thread safe. This would likely be a problem since we userun_block_generator()
from threads in python. It should probably contain aMutex
to serialize access to it.The new flag
DONT_VALIDATE_SIGNATURE
can be passed in to skip the validation.The new field
validated_signature
onSpendBundleConditions
can be used to ensure it was in fact validated.The main changes are in
conditions.rs
. Thepkm_pairs
are collected, as they are parsed, into a single list in theParseState
object. Here: https://github.com/Chia-Network/chia_rs/compare/run_block_validate_signature?expand=1#diff-c93029cf40a6e979ca6c9b02528cfc71cad2e7099818a2deeb92cb9cf5cf344bR788At the end, these key-message pairs are validated against the signature in this new function
validate_signature()
: https://github.com/Chia-Network/chia_rs/compare/run_block_validate_signature?expand=1#diff-c93029cf40a6e979ca6c9b02528cfc71cad2e7099818a2deeb92cb9cf5cf344bR1502