Commit Graph

1824 Commits

Author SHA1 Message Date
Etan Kissling 4c9da5f1af
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688 2024-07-26 01:39:50 +02:00
Etan Kissling c2d5a55d95
cleanup pre-deneb fallback 2024-07-26 00:03:47 +02:00
Etan Kissling 3ef3db5fb1
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688 2024-07-25 23:05:06 +02:00
Etan Kissling 9c9f2df0ca
`Opt[seq[Forky]]` 2024-07-25 23:03:57 +02:00
Etan Kissling af4d686edb
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688 2024-07-25 22:00:57 +02:00
Etan Kissling 88bdc6ae55
`Opt[Forky]` does not work as it does in `ref` and `seq` / `openArray` 2024-07-25 21:59:49 +02:00
Etan Kissling 4998790ed2
fix LC helpers 2024-07-25 21:28:16 +02:00
Etan Kissling bbe41a250f
fix gindex computation in docs 2024-07-25 21:19:06 +02:00
Etan Kissling 2abfee3488
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688 2024-07-25 21:01:33 +02:00
Etan Kissling 5fe9e93ee7
fix `ncli_db` 2024-07-25 19:30:25 +02:00
Etan Kissling d028baea2a
introduce `ForkedBlobSidecar` for EIP-7688 Electra period before PeerDAS
On `ELECTRA_FORK_EPOCH`, PeerDAS is not yet activated, hence the current
mechanism based on `BlobSidecar` is still in use. With EIP-7688, the
generalized indices of `BeaconBlockBody` get reindexed, changing the
length of the inclusion proof within the `BlobSidecar`. Because network
Req/Resp operations allow responses across fork boundaries, this creates
the need for a `ForkedBlobSidecar` in that layer, same as already done
for `ForkedSignedBeaconBock` for similar reasons.

Note: This PR is only needed if PeerDAS is adopted _after_ EIP-7688.
If PeerDAS is adopted _before_ EIP-7688, a similar PR may be needed for
forked columns. Coincidental `Forked` jank can only be fully avoided if
both features activate at the same epoch, actual changes to blobs aside.
Delaying EIP-7688 for sole purpose of epoch alignemnt is not worth it.
2024-07-25 18:54:38 +02:00
tersec 15cca5f93e
hypergeometric distribution CDF for PeerDAS (#6447) 2024-07-25 01:59:24 +00:00
Etan Kissling a769550db5
rename LC gindex constants to match spec (#6444)
Use `_ELECTRA` suffix for gindex constants to match consensus-specs.
2024-07-23 20:20:15 +00:00
Etan Kissling d8df178a85
LC execution payload gindex 2024-07-22 14:15:53 +02:00
Etan Kissling 159f57f27e
LC constant rename 2024-07-22 14:13:56 +02:00
tersec ebd0217a10
fix is_eligible_for_activation_queue for electra (#6427) 2024-07-15 21:08:20 +02:00
tersec 3db571d182
allow individual calculation of validator balances across epoch boundaries (#6416) 2024-07-07 00:32:50 +02:00
andri lim 0b276315d2
Bump nim-eth: Convert GasInt to uint64 (#6415)
* Bump nim-eth: Convert GasInt to uint64

* Fixes

* Fix libnimbus_lc
2024-07-06 20:25:31 +00:00
Etan Kissling 7f59e80aaa
validate EL block hash in Electra when no EL is connected (#6407)
When no EL is connected, it is still required to validate the block hash
of `ExecutionPayload` to prevent attacks that trick us into attesting to
a circular chain with invalid in-between block hashes. This is already
done through Deneb but was still missing in Electra to be rectified now.
2024-07-05 10:18:50 +02:00
Eugene Kabanov 85c2850971
Fix publishBlockV1() and publishBlockV2() SSZ decoding process. (#6408) 2024-07-04 01:08:07 +00:00
Eugene Kabanov 84a35c85c5
Fix for gcc-14 issues in kzg-4844. (#6403)
* Bump nim-kzg4844.

* Fix code to use proper KZG types.

* Add missing coma.

* Fix compilation issue.

* Bump nim-kzg4844.

* Add debugging output.

* Remove debugging output.

* Restore groupBlobs function.
2024-07-03 10:01:33 +00:00
Etan Kissling 515bd486e6
ensure passing unsigned integer to `rlp.encode` (#6397)
RLP encoding is not defined for signed integers. Make sure to use
unsigned integers when encoding RLP for EL block hash computation.
2024-07-03 01:43:16 +00:00
Etan Kissling fba8cc3ee5
fix EIP reference in Electra type definition (#6398)
The field `withdrawal_requests` is from EIP-7002 instead of EIP-6110.
2024-07-03 01:41:01 +00:00
Etan Kissling 9924aec1e3
extend light client protocol for Electra (#6375)
* extend light client protocol for Electra

Add missing Electra support for light client protocol:

- https://github.com/ethereum/consensus-specs/pull/3811

Tested against PR consensus-spec-tests, the test runner automatically
picks up the new tests once available.

* workaround `version-2-0`: `Error: cannot instantiate: 'SomeUnsignedInt'`

* fix initialization when Electra not scheduled

* try reduce stack size in test

* put correct sync committee branch version into DB

* adjust fork schedule in light client data tests

* further reduce stack size

* split function into multiple parts

* rename variable

* regenerate test reports to cover new Electra tests

* add Nim bug reference
2024-06-26 19:02:03 +00:00
Etan Kissling 3da85e593f
update references for LC related Nim issues (#6389)
Addresses feedback from #6375 that is applicable to pre-existing code
moreso than to the new PR.
2024-06-26 14:31:36 +02:00
Etan Kissling b9d85a0bd5
remove `Consolidation`, `SignedConsolidation` 2024-06-26 11:32:48 +02:00
Etan Kissling 754e9c3b10
Merge branch 'dev/etan/lc-electra' into feat_eip-7688 2024-06-25 14:57:39 +02:00
Etan Kissling 3f83028cf2
Merge branch 'unstable' into dev/etan/lc-electra 2024-06-22 10:48:08 +02:00
tersec 9b6b42c8f9
some consensus spec URL updates to v1.5.0-alpha.3 (#6382) 2024-06-22 07:28:19 +02:00
Etan Kissling 4c242c44aa
workaround `version-2-0`: `Error: cannot instantiate: 'SomeUnsignedInt'` 2024-06-21 15:26:11 +02:00
Etan Kissling 65ae4d8eb1
extend light client protocol for Electra
Add missing Electra support for light client protocol:

- https://github.com/ethereum/consensus-specs/pull/3811

Tested against PR consensus-spec-tests, the test runner automatically
picks up the new tests once available.
2024-06-21 15:02:01 +02:00
Etan Kissling 22b5bc6256
cleanup Electra fork references (#6372)
Adjust two fork references to match surrounding code style.
2024-06-20 21:09:41 +02:00
tersec 350c4eaa39
rm Goerli remnant; add explanatory comment about opt sync validation (#6365) 2024-06-17 09:40:41 +00:00
tersec 88fa8b17ea
automated consensus spec URL updating to v1.5.0-alpha.3 (#6364) 2024-06-16 02:59:25 +02:00
tersec 0fab9682a6
use EF consensus-specs v1.5.0-alpha.3 test vectors (#6362) 2024-06-16 00:15:27 +02:00
tersec a93ab7cf3b
Revert "bump nim-kzg4844 for gcc-14 compatibility (#6342)" (#6360)
This reverts commit c5326619a4.
2024-06-14 23:23:19 +00:00
Eugene Kabanov c5326619a4
bump nim-kzg4844 for gcc-14 compatibility (#6342)
* Bump nim-kzg4844.

* Fix code to use proper KZG types.

* Add missing coma.

* Fix compilation issue.

* Bump nim-kzg4844.
2024-06-14 00:46:03 +00:00
andri lim fb0494e739
Bump nim-eth for revert GasInt back to int64 (#6347)
* Bump nim-eth for revert GasInt back to int64

* Fix libnimbus_lc
2024-06-13 15:25:59 +02:00
Etan Kissling 20af24efdb
align field name across `SomeSig` (#6348)
`ValidatorSig` uses `blob` but `TrustedSig` uses `data`, aligning the
names reduces code duplication and improves clarity. It also simplifies
`StableContainer` compatibility checks.
2024-06-13 13:11:04 +00:00
Etan Kissling 2915833ce8
Merge branch 'dev/etan/cc-fieldname' into feat_eip-7688 2024-06-13 12:43:49 +02:00
Etan Kissling 6346916224
align field name across `SomeSig`
`ValidatorSig` uses `blob` but `TrustedSig` uses `data`, aligning the
names reduces code duplication and improves clarity. It also simplifies
`StableContainer` compatibility checks.
2024-06-13 12:41:56 +02:00
Etan Kissling 388f1cfa7b
align `StableContainer` types with latest EIP-7688 specs 2024-06-13 10:32:55 +02:00
andri lim 238589868c
Bump nim-web3 and nim-eth (#6345)
In nim-web3 all std.Option are replaced by results.Opt. The same goes in nim-eth, with additional fields name changes and GasInt changed from int64 to uint64.
2024-06-12 08:46:39 +07:00
tersec 598485ee1a
add consolidations block body packing plumbing and correct electra MEV block body htr override (#6335) 2024-06-10 05:05:51 +02:00
tersec e3d4ad5d39
properly (re)factor consolidation signature checking (#6334) 2024-06-09 19:37:41 +02:00
Eugene Kabanov 1cdb32222b
VC: Add block scoring (#6303)
* Add scoring for blocks.

* Update Alltests.
2024-05-29 10:07:39 +00:00
Etan Kissling c2777513bb
actually commit `stable.nim` 2024-05-27 14:44:13 +02:00
Etan Kissling d222f11edf
move `StableContainer` to `stable.nim` 2024-05-27 14:33:39 +02:00
Etan Kissling 36f939b514
Merge branch 'dev/etan/im-base' into feat_eip-7688 2024-05-27 14:22:34 +02:00
Etan Kissling 0e734286e4
move `InactivityScores` to `base`
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-27 13:57:47 +02:00