351 Commits

Author SHA1 Message Date
Justin Traglia
dcab13d23a
Merge pull request #3850 from etan-status/ef-blobp2p
Document `ForkDigest`-context for EIP-4844 `BlobSidecar` in Electra
2024-12-03 11:32:20 -06:00
Justin Traglia
a7ff865bf8
Merge branch 'dev' into issue-3663 2024-12-02 12:32:28 -06:00
Justin Traglia
36bea27ca2
Merge remote-tracking branch 'origin/dev' into p2p-introductiion 2024-12-02 11:00:43 -06:00
Justin Traglia
e519845eb9
Merge branch 'dev' into delete-trailing-whitespace 2024-12-02 08:58:08 -06:00
Katya Ryazantseva
d029ed3092 remove initialize_beacon_state_from_eth1 from bellatrix 2024-11-25 15:30:14 +07:00
Etan Kissling
db8f8529e2
Trim whitespace 2024-11-22 15:18:21 +01:00
Etan Kissling
f9e424360c
Merge branch 'dev' into ef-blobp2p 2024-11-22 13:36:48 +01:00
Katya Ryazantseva
266a64c393 remove initialize_beacon_state_from_eth1 from post-altair forks 2024-11-22 09:27:55 +07:00
Justin Traglia
abbfef5b37
Merge pull request #3885 from etan-status/bf-emptytxspec
Synchronously check all `transactions` to have non-zero length
2024-11-20 09:30:57 -06:00
Hsiao-Wei Wang
62e6a30ec1
Add BLOB_SIDECAR_SUBNET_COUNT_EIP7594, MAX_BLOBS_PER_BLOCK_EIP7594, and MAX_REQUEST_BLOB_SIDECARS_EIP7594 2024-11-13 13:42:15 +07:00
Justin Traglia
c7f7064109
Merge pull request #3864 from tbenr/engine_getBlobV1-clarifications
P2P clarifications when introducing `engine_getBlobsV1`
2024-10-30 16:33:20 -05:00
Justin Traglia
0f964b04d2
Change "modified" to "new" 2024-10-21 08:43:25 -05:00
Etan Kissling
a6095bf498
Update specs/deneb/beacon-chain.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-10-21 13:00:10 +02:00
Justin Traglia
2445bf5194
Move p2p-interface intros to introduction section 2024-10-18 10:33:54 -05:00
Enrico Del Fante
9787a61c88
Update specs/deneb/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-10-16 18:27:56 +02:00
Enrico Del Fante
1767c34493
Update specs/deneb/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-10-16 18:27:42 +02:00
Enrico Del Fante
6c99b0bbf4
Update p2p-interface.md 2024-10-16 18:26:59 +02:00
Enrico Del Fante
cb837f27c3
Update specs/deneb/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-10-16 18:24:59 +02:00
Enrico Del Fante
71b995cdd9
Update specs/deneb/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-10-16 18:24:37 +02:00
Enrico Del Fante
5b55e95984
Update specs/deneb/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-10-16 18:24:19 +02:00
Justin Traglia
68d32accf9
Delete trailing whitespace for markdown files 2024-10-11 07:54:50 -05:00
Etan Kissling
1e96d2370d
Merge branch 'dev' into bf-emptytxspec 2024-10-09 12:44:36 +02:00
Enrico Del Fante
7c31b3ee7a
Update specs/deneb/p2p-interface.md
Co-authored-by: Mehdi AOUADI <mehdi.aouadi@gmail.com>
2024-10-04 14:13:04 +02:00
Enrico Del Fante
5b93d6a041
improvement 2024-10-03 17:52:56 +02:00
Enrico Del Fante
a96065c618
clarification 2024-10-03 17:49:48 +02:00
Enrico Del Fante
2612f7f278
rephrasing 2024-10-03 17:20:37 +02:00
Enrico Del Fante
edd7377b5f
apply suggestions 2024-10-03 10:59:01 +02:00
Enrico Del Fante
97db65eef3
remove another reference 2024-10-02 12:37:17 +02:00
Enrico Del Fante
4531fe629c
remove explicit reference to engine method 2024-10-02 12:33:42 +02:00
Enrico Del Fante
63ad07b450
typos 2024-10-02 12:29:44 +02:00
Enrico Del Fante
918a394ce1
remove usage in RPC serving sentence 2024-10-02 12:28:03 +02:00
Enrico Del Fante
2acf362f81
fix toc 2024-10-02 12:22:48 +02:00
Enrico Del Fante
37d6d37ce4
fix typos 2024-10-02 12:17:09 +02:00
Enrico Del Fante
f1d23ebb85
update 2024-10-02 12:14:50 +02:00
Justin Traglia
a9e3aada7f
Use bls.Scalar as the base class for BLSFieldElement (#3907) 2024-09-27 07:19:04 -05:00
Etan Kissling
c37a28db65
Merge branch 'dev' into ef-blobp2p 2024-09-20 00:08:18 +02:00
Etan Kissling
e1eaa7ffa1
Synchronously check all transactions to have non-zero length
As part of `newPayload` block hash verification, the `transactionsRoot`
is computed by the EL. Because Merkle-Patricia Tries cannot contain `[]`
entries, MPT implementations typically treat setting a key to `[]` as
deleting the entry for the key. This means that if a CL receives a block
with `transactions` containing one or more zero-length transactions,
that such transactions will effectively be skipped when computing the
`transactionsRoot`. Note that `transactions` are opaque to the CL and
zero-length transactions are not filtered out before `newPayload`.

```python
# https://eips.ethereum.org/EIPS/eip-2718
def compute_trie_root_from_indexed_data(data):
    """
    Computes the root hash of `patriciaTrie(rlp(Index) => Data)` for a data array.
    """
    t = HexaryTrie(db={})
    for i, obj in enumerate(data):
        k = encode(i, big_endian_int)
        t.set(k, obj)  # Implicitly skipped if `obj == b''` (invalid RLP)
    return t.root_hash
```

In any case, the `blockHash` validation may still succeed, resulting in
a potential `SYNCING/ACCEPTED` result to `newPayload` by spec.

Note, however, that there is an effective hash collision if a payload is
modified by appending one or more zero-length transactions to the end of
`transactions` list: In the trivial case, a block with zero transactions
has the same `transactionsRoot` (and `blockHash`) as one of a block with
one `[]` transaction (as that one is skipped).

This means that the same `blockHash` can refer to a valid block (without
extra `[]` transactions added), but also can refer to an invalid block.
Because `forkchoiceUpdated` refers to blocks by `blockHash`, outcome may
be nondeterministic and implementation dependent. If `forkchoiceUpdated`
deems the `blockHash` to refer to a `VALID` object (obtained from a src
that does not have the extra `[]` transactions, e.g., devp2p), then this
could result in honest attestations to a CL beacon block with invalid
`[]` transactions in its `ExecutionPayload`, risking finalizing it.

The problem can be avoided by returning `INVALID` in `newPayload` if
there are any zero-length `transactions` entries, preventing optimistic
import of such blocks by the CL.
2024-08-14 22:55:05 +02:00
fradamt
75e601a167 remove redundant copy() 2024-08-09 09:13:13 +02:00
Enrico Del Fante
6f219159e5
typo 2024-08-02 17:04:04 +02:00
Enrico Del Fante
09966cd070
fix method name 2024-08-02 14:23:19 +02:00
Enrico Del Fante
e872fdb936
engine_getBlobV1_clarifications 2024-08-02 14:19:26 +02:00
Etan Kissling
dec28c1322
Rename to ForkDigestValue for Gossipsub topics 2024-07-24 16:53:46 +02:00
Etan Kissling
95ddd1567a
Document ForkDigest-context for EIP-4844 BlobSidecar in Electra
Currently, documentation does not state what determines the `ForkDigest`
for `BlobSidecar`. It makes most sense to use the corresponding slot as
that one determines the `ForkDigest` of the corresponding beacon block.

Furthermore, add "and later" remarks so that `ELECTRA_FORK_VERSION` is
also associated with the `deneb.BlobSidecar` type.

This is in line with how `light-client/p2p-interface.md` is done.
2024-07-22 20:03:40 +02:00
Etan Kissling
460d46ddcd
Merge branch 'dev' into lc-electra 2024-07-17 13:30:30 +02:00
Hsiao-Wei Wang
b4432fbef8
Merge pull request #3817 from dapplion/max-blobs-config
Make MAX_BLOBS_PER_BLOCK a config parameter
2024-07-16 22:27:13 +08:00
Alex Stokes
b7149ef5fa
Update beacon-chain.md
Typo fix in deneb comment
2024-07-08 17:52:06 -06:00
dapplion
9280cc7be9 Update doctoc 2024-06-26 12:46:16 +02:00
dapplion
ded072af40 Make MAX_BLOBS_PER_BLOCK a config parameter 2024-06-25 18:22:56 +02:00
Etan Kissling
2035a9fcad
Update light client specifications for Electra
Electra introduces two changes that affect light client data handling:

1. The `ExecutionPayloadHeader` is extended with new fields.
   This is handled similarly as before with the Deneb fork.

2. The `BeaconState` generalized indices change due to lack of EIP-6493.
   This is handled by making the generalized index be fork dependent via
   a helper function that computes it dynamically. Furthermore, the case
   where pre-Electra light client data is consumed by an Electra based
   `LightClientStore` requires normalizing the shorter proof of the
   pre-Electra data to fit into the Electra data structure by prepending
   a zero hash.
2024-06-21 11:33:52 +02:00
Hsiao-Wei Wang
a526cdf446
Fix: use TypeVar for "point" rather than bytes 2024-04-24 00:22:20 +08:00