-
Notifications
You must be signed in to change notification settings - Fork 973
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
Rework Shard transition processing
#1856
Conversation
5695cb9
to
0aec204
Compare
###### Updated `process_attestation` | ||
|
||
```python | ||
def process_attestation(state: BeaconState, attestation: Attestation) -> None: |
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.
To reviewers: only moving the function block to here. Nothing was changed in this function.
@@ -695,7 +696,7 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None: | |||
# See custody game spec. | |||
process_custody_game_operations(state, body) | |||
|
|||
process_crosslinks(state, body.shard_transitions, body.attestations) | |||
process_shard_transitions(state, body.shard_transitions, body.attestations) |
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.
Would be neat to convert to:
for_ops(body.shard_transitions, body.attestations, process_shard_transitions)
But it doesn't look feasible today 😅
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.
But for_ops
is mainly for executing operation one-by-one, and we need all body.shard_transitions
and body.attestations
to process crosslinks.
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.
Makes sense!
… `process_shard_transitions`
0aec204
to
327deb4
Compare
Pending on #1854
New Attestation processin
section andShard transition processing
sectionprocess_crosslinks
andverify_empty_shard_transition
intoprocess_shard_transitions
verify_empty_shard_transition
returnbool
as otherverify_*
functions/cc @terencechain