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

Remove justified block from optimistic candidate conditions #2881

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions sync/optimistic.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ def is_optimistic_candidate_block(opt_store: OptimisticStore, current_slot: Slot
if is_execution_block(opt_store.blocks[block.parent_root]):
return True

justified_root = opt_store.block_states[opt_store.head_block_root].current_justified_checkpoint.root
if is_execution_block(opt_store.blocks[justified_root]):
return True

if block.slot + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY <= current_slot:
return True

Expand All @@ -111,7 +107,6 @@ This ensures that blocks are only optimistically imported if one or more of the
following are true:

1. The parent of the block has execution enabled.
1. The justified checkpoint has execution enabled.
1. The current slot (as per the system clock) is at least
`SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY` ahead of the slot of the block being
imported.
Expand Down