-
Notifications
You must be signed in to change notification settings - Fork 242
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
Core domain bundle solution verification #923
Merged
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
liuchengxu
requested review from
nazar-pc,
rg3l3dr and
vedhavyas
as code owners
November 15, 2022 14:42
7 tasks
liuchengxu
force-pushed
the
core-domain-bundle-solution-verification
branch
from
November 16, 2022 02:15
54a2f25
to
4cb2373
Compare
No logical changes.
Also removed the redundant TODO.
All kinds of bundles share the same logic of verifying the threshold, this API will be used later for the core domain bundle verification.
`core_block_hash` and `core_state_root` are added to the struct `ProofOfElection` as we need to the block hash and the corresponding state root of a core domain. They are optional for the sytem domain bundle. Also added a TODO to rename `secondary_hash` to `domain_hash` in the Receipt struct since now the core domain is possible as well.
liuchengxu
force-pushed
the
core-domain-bundle-solution-verification
branch
from
November 16, 2022 08:36
4cb2373
to
70a10d8
Compare
nazar-pc
approved these changes
Nov 17, 2022
Comment on lines
+164
to
+165
// TODO: override the core block info, see if there is a nicer way | ||
// later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have an enum instead of a struct so you don't need to have optional fields?
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.
This PR solves a missing piece from #918 which is to verify the ProofOfElection of core domain bundles, which is done in the pre_dispatch hook. The other checks of the core domain bundle have been performed on the primary chain, only the checks on the state of receipts involved need to be done on the system chain:
I have tested it locally on top of #918.
Close #906
Code contributor checklist: