Modify "when" section

This commit is contained in:
Paul Hauner 2022-01-13 07:17:57 +11:00
parent b7c332f0ee
commit 8522f27b8e
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF
1 changed files with 7 additions and 6 deletions

View File

@ -78,13 +78,14 @@ behaviours without regard for optimistic sync.
### When to optimistically import blocks ### When to optimistically import blocks
A block MAY be optimistically imported when either of the following A block MAY be optimistically imported when
conditions are met: `should_optimistically_import_block(store, current_slot, block)` returns
`True`. This ensures that blocks are only optimistically imported if either:
1. The justified checkpoint has execution enabled. I.e., 1. The justified checkpoint has execution enabled.
`is_execution_block(get_block(get_state(head_block).current_justified_checkpoint.root))` 1. The current slot (as per the system clock) is at least
1. The current slot (as per the system clock) is at least `SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY` ahead of `SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY` ahead of the slot of the block being
the slot of the block being imported. I.e., `should_optimistically_import_block(current_slot, block) == True`. imported.
*See [Fork Choice Poisoning](#fork-choice-poisoning) for the motivations behind *See [Fork Choice Poisoning](#fork-choice-poisoning) for the motivations behind
these conditions.* these conditions.*