338 Commits

Author SHA1 Message Date
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
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
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
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
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
Hsiao-Wei Wang
bab254b0ba
Add description of multi_exp 2024-04-24 00:08:42 +08:00
Kevaundray Wedderburn
f3302a3836 - return serialized identity points
- result = None initially
2024-04-23 15:11:46 +01:00
Kevaundray Wedderburn
d28a0164d2 add is_zero check 2024-04-23 14:55:37 +01:00
Kevaundray Wedderburn
5eb19b3cef modify g1_lincomb and g2_lincomb 2024-04-23 14:21:54 +01:00
Kevaundray Wedderburn
e7e49ec71a lint fixes 2024-04-23 13:38:14 +01:00
Kevaundray Wedderburn
640675f628 add g1_multi_exp 2024-04-23 12:44:50 +01:00
Hsiao-Wei Wang
128a273586
Merge pull request #3574 from ethereum/peer-das
[WIP] EIP-7594: PeerDAS protocol
2024-04-05 06:00:27 +08:00
Dmitrii Shmatko
dc8e9a775f Remove confusing "due to" on voluntary_exits topic update 2024-04-04 18:32:24 +04:00
Hsiao-Wei Wang
8728561da3
Merge branch 'dev' into peer-das 2024-04-04 22:23:02 +09:00
Potuz
38bf699c4b Remove wip messages on shipped forks 2024-04-03 10:37:48 -03:00
Hsiao-Wei Wang
5d80b1954a
Merge pull request #3559 from dapplion/attestation-index
EIP-7549: Move committee index outside Attestation
2024-03-14 23:54:20 +08:00
danny
7a20cae75e
tiny formatting in deneb p2p 2024-03-11 12:10:44 -06:00
dapplion
38f269ca12 Update spec with @mkalinin suggestions 2024-03-05 20:58:05 +08:00