10199 Commits

Author SHA1 Message Date
Hsiao-Wei Wang
7259a6cf23
Merge pull request #3878 from mkalinin/remove-compute_state_by_epoch_processing_to
Get rid of compute_state_by_epoch_processing_to
2024-08-28 14:38:11 +08:00
Jacek Sieka
0833551328
spelling 2024-08-28 07:35:12 +02:00
Jacek Sieka
5761fb4d97
update list of checks 2024-08-28 07:31:49 +02:00
terence tsao
d4f27aff1f Fix some EIP-7732 typos 2024-08-27 13:32:46 -07:00
Mikhail Kalinin
0526592fe8 Do state.pending_deposits update in a single line 2024-08-27 17:46:43 +06:00
Mikhail Kalinin
22bb1de62d Fix code spell 2024-08-27 17:32:38 +06:00
Mikhail Kalinin
ad8f54ff7d Update pending deposits tests 2024-08-27 17:26:54 +06:00
Justin Traglia
725f96349b
Add blank lines to fix linter 2024-08-26 17:02:42 -05:00
Jacek Sieka
0b95012c2e
Separate type for unaggregated network attestations
As a complement to
https://github.com/ethereum/consensus-specs/pull/3787, this PR
introduces a `SingleAttestation` type used for network propagation only.

In Electra, the on-chain attestation format introduced in
[EIP-7549](https://github.com/ethereum/consensus-specs/pull/3559)
presents several difficulties - not only are the new fields to be
interpreted differently during network processing and onchain which adds
complexity in clients, they also introduce inefficiency both in hash
computation and bandwidth.

The new type puts the validator and committee indices directly in the
attestation type, this simplifying processing and increasing security.

* placing the validator index directly in the attestation allows
verifying the signature without computing a shuffling - this closes a
loophole where clients either must drop attestations or risk being
overwhelmed by shuffling computations during attestation verification
* the simpler "structure" of the attestation saves several hash calls
during processing (a single-item List has significant hashing overhead
compared to a field)
* we save a few bytes here and there - we can also put stricter bounds
on message size on the attestation topic because `SingleAttestation` is
now fixed-size
* the ambiguity of interpreting the `attestation_bits` list indices
which became contextual under EIP-7549 is removed

Because this change only affects the network encoding (and not block
contents), the implementation impact on clients should be minimal.
2024-08-26 15:54:59 +02:00
Mikhail Kalinin
7afe8e0742 Update eip7732 with pending_deposits 2024-08-26 17:00:45 +06:00
Mikhail Kalinin
c183be4914 Update consolidation tests with pending deposit 2024-08-26 16:33:46 +06:00
Mikhail Kalinin
990de16c0f Add more deposit tests 2024-08-26 16:18:53 +06:00
Mikhail Kalinin
97e6166bf1 Move switch to compounding to process_deposit_request 2024-08-26 16:17:53 +06:00
Parithosh Jayanthi
33a8e197aa
Merge branch 'ethereum:dev' into update-readme-deps 2024-08-23 15:00:59 +02:00
Jacek Sieka
08e020e98d
remove timeout constants 2024-08-23 13:38:12 +02:00
Mikhail Kalinin
a6864d44f1 Merge branch 'dev' into deposit-queue 2024-08-23 14:37:08 +06:00
Mikhail Kalinin
ada5524610 Use the right MaxEB to create validator from deposit 2024-08-23 14:32:50 +06:00
Lucas Saldanha
b8ca7cc87b PR comments 2024-08-23 10:12:19 +12:00
Alex Stokes
87b5f1a969
updates to send maximum blob count 2024-08-22 14:06:48 -06:00
Justin Traglia
bf6f0ce644 Merge remote-tracking branch 'origin/dev' into rebase-eip7594-onto-electra 2024-08-22 10:27:44 -05:00
Hsiao-Wei Wang
ca04b1e94d
Merge pull request #3894 from jtraglia/fix-install_pyspec_test
Fix the install_pyspec_test CI check
2024-08-22 22:55:06 +08:00
Justin Traglia
562798de9e Update cache version and add back line 2024-08-22 09:17:05 -05:00
Justin Traglia
4850a2801e Remove line to pull new py_arkworks wheel 2024-08-22 09:14:17 -05:00
Justin Traglia
92a801a741 Only disable restore_pyspec_cached_venv 2024-08-22 08:26:00 -05:00
Justin Traglia
a9a1d9ad04 Try no restore/save cache 2024-08-22 08:22:24 -05:00
Justin Traglia
f600728dd5 Fix the install_pyspec_test CI check 2024-08-22 08:07:48 -05:00
NC
8e90dd06c3 address comment 2024-08-22 18:35:35 +08:00
Lucas Saldanha
dc1892e113 Updated NewPayloadRequest 2024-08-22 21:08:08 +12:00
Justin Traglia
b24d53f23a Fix comment 2024-08-21 20:04:32 -05:00
Justin Traglia
647a45d3b1 Rebase eip7594 onto Electra 2024-08-21 17:08:14 -05:00
Alex Stokes
8c2a864d59
Merge branch 'dev' into cl-drives-blob-limit 2024-08-21 15:43:21 -06:00
Parithosh Jayanthi
ad91a835c0
Update python to 3.12.4 (#3880)
* update python to 3.12

* drop down to 3.12.4 for compatibility

* setup rust toolchain for deps

* fix typo

* fix linter

* fixing linter

* adding rust dep

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying to fix circleci

* trying new image

* trying new image

* trying new image

* trying new image

* invalidate cache

* bump reqs

* remove cache invalidation

* fix cache name

* update to use latest image
2024-08-22 02:15:57 +08:00
NC
4c9be8978f Randomize validator index in partial withdrawal test 2024-08-22 00:19:02 +08:00
Hsiao-Wei Wang
38df724885
Merge pull request #3889 from ethereum/dev
release `v1.5.0-alpha.5`
2024-08-21 15:31:58 +08:00
Stefan Bratanov
ba99f8bb16
Update specs/_features/eip7732/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-08-20 20:18:55 +03:00
Stefan Bratanov
24aecf554d
Update specs/_features/eip7732/p2p-interface.md
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-08-20 20:18:47 +03:00
Hsiao-Wei Wang
01aab85412
Merge pull request #3891 from ethereum/bump-version
bump version to 1.5.0-alpha.5
2024-08-20 23:56:32 +08:00
Hsiao-Wei Wang
7391de10a8
bump version to 1.5.0-alpha.5 2024-08-20 23:55:52 +08:00
Hsiao-Wei Wang
d7abcdfb58
Merge pull request #3887 from jtraglia/no-extended-matrix
Remove matrix specific configuration value
2024-08-20 23:52:20 +08:00
Hsiao-Wei Wang
5c44de2786
Merge pull request #3883 from potuz/run_deneb_tests_in_electra
Run Deneb on_block tests in Electra but not 7594
2024-08-20 23:49:53 +08:00
Stefan Bratanov
edf0ddea3c change to new 2024-08-20 13:59:29 +03:00
Stefan Bratanov
679cb60ee2 Add to table of contents 2024-08-20 13:58:09 +03:00
Stefan Bratanov
7d0a8c6335 EIP-7732: Modify ExecutionPayloadEnvelopeByRoot 2024-08-20 13:54:36 +03:00
Potuz
fc3640f3c2 Require the builder is active and non-slashed 2024-08-19 09:33:10 -03:00
Lucas Saldanha
98dd1884ae Rename requests to execution_requests 2024-08-16 18:34:22 +12:00
Lucas Saldanha
b84316de3f PR Comments 2024-08-16 18:30:06 +12:00
Justin Traglia
121a3b7b24 Fix mistake 2024-08-14 20:32:11 -05:00
Justin Traglia
4eee3b0c3b Remove matrix specific configuration value
This also removes references to the "extended matrix" in favor of just "matrix"
which I think is better. It's not an extended matrix, it's a matrix of extended
blobs. Technically it's just a matrix of cells/proofs.
2024-08-14 20:19:50 -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
Etan Kissling
99bf3c112d
Avoid generating empty transactions in tests
Transactions cannot be empty, they always have at least 1 byte.
Random tests should produce valid CL data by default.
There are still individual tests for invalid transactions.
2024-08-14 20:33:17 +02:00