From 7a6770a732c35a843aa7d1320f0741e34a09c779 Mon Sep 17 00:00:00 2001 From: fradamt Date: Wed, 7 Aug 2024 16:52:06 +0200 Subject: [PATCH] fix headers Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> --- specs/_features/eip7594/das-core.md | 20 +++++++++---------- specs/_features/eip7594/fork-choice.md | 12 +++++------ specs/_features/eip7594/peer-sampling.md | 11 ++++++---- .../test/deneb/fork_choice/test_on_block.py | 2 +- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/specs/_features/eip7594/das-core.md b/specs/_features/eip7594/das-core.md index 18a12e398..3d43db483 100644 --- a/specs/_features/eip7594/das-core.md +++ b/specs/_features/eip7594/das-core.md @@ -18,11 +18,11 @@ - [Containers](#containers) - [`DataColumnSidecar`](#datacolumnsidecar) - [`MatrixEntry`](#matrixentry) - - [Helper functions](#helper-functions) - - [`get_custody_columns`](#get_custody_columns) - - [`compute_extended_matrix`](#compute_extended_matrix) - - [`recover_matrix`](#recover_matrix) - - [`get_data_column_sidecars`](#get_data_column_sidecars) +- [Helper functions](#helper-functions) + - [`get_custody_columns`](#get_custody_columns) + - [`compute_extended_matrix`](#compute_extended_matrix) + - [`recover_matrix`](#recover_matrix) + - [`get_data_column_sidecars`](#get_data_column_sidecars) - [Custody](#custody) - [Custody requirement](#custody-requirement) - [Public, deterministic selection](#public-deterministic-selection) @@ -101,9 +101,9 @@ class MatrixEntry(Container): row_index: RowIndex ``` -### Helper functions +## Helper functions -#### `get_custody_columns` +### `get_custody_columns` ```python def get_custody_columns(node_id: NodeID, custody_subnet_count: uint64) -> Sequence[ColumnIndex]: @@ -133,7 +133,7 @@ def get_custody_columns(node_id: NodeID, custody_subnet_count: uint64) -> Sequen ]) ``` -#### `compute_extended_matrix` +### `compute_extended_matrix` ```python def compute_extended_matrix(blobs: Sequence[Blob]) -> List[MatrixEntry, MAX_CELLS_IN_EXTENDED_MATRIX]: @@ -156,7 +156,7 @@ def compute_extended_matrix(blobs: Sequence[Blob]) -> List[MatrixEntry, MAX_CELL return extended_matrix ``` -#### `recover_matrix` +### `recover_matrix` ```python def recover_matrix(partial_matrix: Sequence[MatrixEntry], @@ -183,7 +183,7 @@ def recover_matrix(partial_matrix: Sequence[MatrixEntry], return extended_matrix ``` -#### `get_data_column_sidecars` +### `get_data_column_sidecars` ```python def get_data_column_sidecars(signed_block: SignedBeaconBlock, diff --git a/specs/_features/eip7594/fork-choice.md b/specs/_features/eip7594/fork-choice.md index 1c2fe89c1..a0fc8b952 100644 --- a/specs/_features/eip7594/fork-choice.md +++ b/specs/_features/eip7594/fork-choice.md @@ -6,9 +6,9 @@ - [Introduction](#introduction) - - [Helpers](#helpers) - - [Modified `is_data_available`](#modified-is_data_available) - - [Modified `get_head`](#modified-get_head) +- [Helpers](#helpers) + - [Modified `is_data_available`](#modified-is_data_available) + - [Modified `get_head`](#modified-get_head) - [Updated fork-choice handlers](#updated-fork-choice-handlers) - [Modified `on_block`](#modified-on_block) @@ -19,9 +19,9 @@ This is the modification of the fork choice accompanying EIP-7594. -### Helpers +## Helpers -#### Modified `is_data_available` +### Modified `is_data_available` ```python def is_data_available(beacon_block_root: Root) -> bool: @@ -37,7 +37,7 @@ def is_data_available(beacon_block_root: Root) -> bool: ) ``` -#### Modified `get_head` +### Modified `get_head` *Note*: children of the current `head` are required to be available in order to be considered by the fork-choice. diff --git a/specs/_features/eip7594/peer-sampling.md b/specs/_features/eip7594/peer-sampling.md index 26aa7ab99..a57575ef6 100644 --- a/specs/_features/eip7594/peer-sampling.md +++ b/specs/_features/eip7594/peer-sampling.md @@ -8,8 +8,9 @@ - - [Helper functions](#helper-functions) - - [`get_extended_sample_count`](#get_extended_sample_count) +- [Introduction](#introduction) +- [Helper functions](#helper-functions) + - [`get_extended_sample_count`](#get_extended_sample_count) - [Peer discovery](#peer-discovery) - [Peer sampling](#peer-sampling) - [Sample selection](#sample-selection) @@ -20,11 +21,13 @@ +## Introduction + The purpose of this document is to complement [EIP-7594 -- Data Availability Sampling Core](das-core.md), by specifying the peer sampling functionality of the full PeerDAS protocol. This functionality may initially not be implemented, or only implemented by some clients, in which case it is replaced by [subnet sampling](das-core.md#subnet-sampling), an extension of the custody component of the protocol. -### Helper functions +## Helper functions -#### `get_extended_sample_count` +### `get_extended_sample_count` ```python def get_extended_sample_count(allowed_failures: uint64) -> uint64: diff --git a/tests/core/pyspec/eth2spec/test/deneb/fork_choice/test_on_block.py b/tests/core/pyspec/eth2spec/test/deneb/fork_choice/test_on_block.py index 83f7346e3..2334fcdc8 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/fork_choice/test_on_block.py +++ b/tests/core/pyspec/eth2spec/test/deneb/fork_choice/test_on_block.py @@ -180,4 +180,4 @@ def test_invalid_wrong_blobs_length(spec, state): assert spec.get_head(store) != signed_block.message.hash_tree_root() - yield 'steps', test_steps \ No newline at end of file + yield 'steps', test_steps