83 Commits

Author SHA1 Message Date
Katya Ryazantseva
d029ed3092 remove initialize_beacon_state_from_eth1 from bellatrix 2024-11-25 15:30:14 +07: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
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
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
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
Potuz
38bf699c4b Remove wip messages on shipped forks 2024-04-03 10:37:48 -03:00
dapplion
38f269ca12 Update spec with @mkalinin suggestions 2024-03-05 20:58:05 +08:00
dapplion
e8e00f332a move attestation index outside signed message 2023-12-05 14:16:07 +02:00
Etan Kissling
9338d37c15
Update toc 2023-11-03 11:47:30 +01:00
Etan Kissling
3ef362ce90
Remove unused DOMAIN_BLOB_SIDECAR
Blob sidecars are no longer signed, remove signing domain.
2023-11-03 11:30:28 +01:00
Alex Stokes
35e22702f3
remove BLOB_TX_TYPE from spec (and move to tests) 2023-10-28 11:11:27 -06:00
Hsiao-Wei Wang
264dfadfe0
Merge branch 'dev' into pr3499 2023-09-18 18:07:39 +08:00
Hsiao-Wei Wang
26d3fa3efd
Apply suggestions from code review
Co-authored-by: danny <dannyjryan@gmail.com>
2023-09-15 22:02:34 +08:00
Hsiao-Wei Wang
468ae9aae4
Update the link of EIP-7044 2023-09-15 11:04:08 +08:00
Hsiao-Wei Wang
e5e50e3e40
Add EIP-7514 into Deneb 2023-09-15 10:49:06 +08:00
Hsiao-Wei Wang
01c358c873
Rename "data gas" to "blob gas" 2023-07-25 13:28:34 +08:00
Danny Ryan
fa649e5430
Update specs/deneb/beacon-chain.md 2023-06-22 10:02:23 -06:00
Danny Ryan
ad4f1def32
Apply suggestions from code review 2023-06-22 10:01:49 -06:00
Alex Stokes
2660af0539
move 4788 feature to deneb specs 2023-06-22 09:00:50 -06:00
Alex Stokes
57a75d033f
formatting 2023-06-21 11:40:54 -06:00
djrtwo
668568ea22 spelling 2023-06-19 12:05:49 -06:00
djrtwo
919052081b toc 2023-06-19 08:33:05 -06:00
djrtwo
ec4bdae2d4 build EIP 7045 into Deneb fork 2023-06-14 15:03:28 -06:00
Hsiao-Wei Wang
420f8baf67
Rework tests. Move all process_voluntary_exit tests to Deneb 2023-06-14 23:04:46 +08:00
Lion - dapplion
12fabf5854
Update specs/deneb/beacon-chain.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2023-06-14 16:47:17 +03:00
Hsiao-Wei Wang
99f294cdd8
Add link to EIP PR7044. Need to change it to eips.ethereum.org path once the EIP is merged 2023-06-12 16:02:28 +08:00
Hsiao-Wei Wang
4f839b7b79
Merge branch 'dev' into pr3288-comment 2023-06-12 15:51:52 +08:00
Hsiao-Wei Wang
45f3432019
Update MAX_BLOBS_PER_BLOCK to 6 and add Deneb networking configs to yaml files (#3410) 2023-06-09 23:10:00 +08:00
Hsiao-Wei Wang
b7e21d6caf
PR feedback and make the marks italic 2023-06-08 15:05:46 +08:00
Hsiao-Wei Wang
bab93e8d44
specially mark EIP7044 changes 2023-06-07 18:54:04 +08:00
Hsiao-Wei Wang
5f241bb7a4
Merge branch 'deneb-4844-clean' into pr3288-comment 2023-06-07 18:38:20 +08:00
Hsiao-Wei Wang
a547d47264
specially mark the EIP4844 changes 2023-06-07 17:48:26 +08:00
Hsiao-Wei Wang
69ce4bb531
Merge branch 'dev' into excess_data_gas-type 2023-06-01 23:15:02 +08:00
Hsiao-Wei Wang
60721b9d8a
switch order 2023-06-01 22:39:01 +08:00
Hsiao-Wei Wang
653e03e702
Fix ToC 2023-05-30 21:12:47 +08:00
Hsiao-Wei Wang
be33c4008a
Merge branch 'dev' into pr3288 2023-05-30 21:08:12 +08:00
Hsiao-Wei Wang
f6fe8e2729
Change ExecutionPayload.excess_data_gas type from uint256 to uint64 2023-05-30 20:36:58 +08:00
Hsiao-Wei Wang
296efec256
Add data_gas_used field to ExecutionPayload 2023-05-30 00:39:13 +08:00
Hsiao-Wei Wang
a10affa245
Fix preset table 2023-05-24 21:15:01 +08:00
djrtwo
9bc27bad30 a couple of minor cleanups 2023-05-24 05:41:42 -06:00
Hsiao-Wei Wang
e9cc8dcc05
PR feedback of Danny + verify MAX_BLOBS_PER_BLOCK size in unittest 2023-05-24 16:32:39 +08:00
Hsiao-Wei Wang
a05b689b4c
Merge branch 'dev' into pr3338 2023-05-24 15:38:55 +08:00
Hsiao-Wei Wang
7a827638e6
Ensure verify_and_notify_new_payload returns bool 2023-05-24 12:56:10 +08:00
Hsiao-Wei Wang
ec1ee74edb
Fix typo
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2023-05-24 12:17:07 +08:00