Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 0 additions & 7 deletions fork_choice/.pages

This file was deleted.

41 changes: 0 additions & 41 deletions fork_choice/safe-block.md

This file was deleted.

28 changes: 28 additions & 0 deletions specs/bellatrix/fast-confirmation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Bellatrix -- Fast Confirmation

<!-- mdformat-toc start --slug=github --no-anchors --maxlevel=6 --minlevel=2 -->

- [Introduction](#introduction)
- [Safe execution block](#safe-execution-block)
- [`get_safe_execution_block_hash`](#get_safe_execution_block_hash)

<!-- mdformat-toc end -->

## Introduction

This is the modification of the fast confirmation accompanying Bellatrix.
Comment thread
mkalinin marked this conversation as resolved.
Outdated

## Safe execution block

With Bellatrix introducing execution payload, `get_safe_execution_block_hash`
function is introduced. This function returns the block hash of the payload
included into the most recent confirmed block. This block hash is communicated
to ExecutionEngine as a hash of a safe block.

### `get_safe_execution_block_hash`
Comment thread
mkalinin marked this conversation as resolved.
Outdated

```python
def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32:
safe_block = fcr_store.store.blocks[fcr_store.confirmed_root]
return safe_block.body.execution_payload.block_hash
```
2 changes: 1 addition & 1 deletion specs/bellatrix/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ MUST be set to the hash of a terminal PoW block in this case.
##### `safe_block_hash`

The `safe_block_hash` parameter MUST be set to return value of
[`get_safe_execution_block_hash(store: Store)`](../../fork_choice/safe-block.md#get_safe_execution_block_hash)
[`get_safe_execution_block_hash(fcr_store)`](./fast-confirmation.md#get_safe_execution_block_hash)
function.

##### `should_override_forkchoice_update`
Expand Down
28 changes: 28 additions & 0 deletions specs/gloas/fast-confirmation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Gloas -- Fast Confirmation

<!-- mdformat-toc start --slug=github --no-anchors --maxlevel=6 --minlevel=2 -->

- [Introduction](#introduction)
- [Safe execution block](#safe-execution-block)
- [`get_safe_execution_block_hash`](#get_safe_execution_block_hash)

<!-- mdformat-toc end -->

## Introduction

This is the modification of the fast confirmation accompanying Bellatrix.
Comment thread
jtraglia marked this conversation as resolved.
Outdated

## Safe execution block

### `get_safe_execution_block_hash`
Comment thread
mkalinin marked this conversation as resolved.
Outdated

*Note:* Starting with Gloas only the parent payload of a confirmed beacon block
can be deemed safe.
Comment thread
mkalinin marked this conversation as resolved.
Outdated

```python
def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32:
safe_block = fcr_store.store.blocks[fcr_store.confirmed_root]
# [Modified in Gloas:EIP7732]
safe_block_bid = safe_block.body.signed_execution_payload_bid.message
return safe_block_bid.parent_block_hash
Comment thread
mkalinin marked this conversation as resolved.
Outdated
```
7 changes: 5 additions & 2 deletions specs/gloas/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ computed as the following. All other semantics of `notify_forkchoice_updated`
and its invocation are inherited from prior forks.

- `finalized_block_hash = finalized_block_bid.parent_block_hash`,
- `safe_block_hash = get_safe_execution_block_hash(store)`.
- `safe_block_hash = get_safe_execution_block_hash(fcr_store)`.

Where:

- `finalized_block = store.blocks[store.finalized_checkpoint.root]`,
- `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`.
- `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`,
- `get_safe_execution_block_hash(fcr_store: FastConfirmationStore)` is modified
in Gloas, see
[Fast Confirmation](./fast-confirmation.md#get_safe_execution_block_hash).
Comment thread
jtraglia marked this conversation as resolved.
Outdated

## Helpers

Expand Down