Etan Kissling
02fd912f92
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-26 02:01:28 +02:00
Etan Kissling
97117eb769
add Nim bug reference
2024-07-26 01:54:59 +02:00
Etan Kissling
4c9da5f1af
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-26 01:39:50 +02:00
Etan Kissling
f9624b5e69
`eth2_processor` fix
2024-07-26 01:38:02 +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
2938aa40bf
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-25 22:55:22 +02:00
Etan Kissling
eff1acd1dc
pre-Deneb case for VC block publishing (ff)
2024-07-25 22:53:07 +02:00
Etan Kissling
de0a13a263
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-25 22:46:53 +02:00
Etan Kissling
365b567350
pre-Deneb case for VC block publishing
2024-07-25 22:45:36 +02:00
Etan Kissling
1b62329153
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-25 22:28:32 +02:00
Etan Kissling
7d24e43080
`valueOr` needs explicit fork for default value as well
2024-07-25 22:27:35 +02:00
Etan Kissling
b9154c2e6e
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-25 22:10:23 +02:00
Etan Kissling
5df441d936
`ForkyBlobSidecar` in gossip validation
2024-07-25 22:09:24 +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
5e582cff8f
guard deneb specific ref in workaround
2024-07-25 21:59:15 +02:00
Etan Kissling
bd52c5f644
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-25 21:39:39 +02:00
Etan Kissling
a0cd63697d
add guard to DB initialization
2024-07-25 21:36:10 +02:00
Etan Kissling
e41750aab0
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688
2024-07-25 21:33:56 +02:00
Etan Kissling
a5d2cfea79
`sszdump` support for `ForkyBlobSidecar`
2024-07-25 21:32:34 +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
Etan Kissling
09f3882672
remove unsued `lcDataForkAtEpoch` helper ( #6449 )
...
`lcDataForkAtEpoch(.)` is not used anywhere and can be removed.
`lcDataForkAtConsensusFork(consensusForkAtEpoch(.))` saves same purpose.
2024-07-25 16:27:19 +02:00
tersec
949758ed74
fix some UnusedImport warnings ( #6448 )
2024-07-25 08:49:26 +00:00
tersec
15cca5f93e
hypergeometric distribution CDF for PeerDAS ( #6447 )
2024-07-25 01:59:24 +00:00
Eugene Kabanov
fd4398d4c5
Fix EL requests should do some sleep before repeating request again. ( #6441 )
2024-07-23 22:49:52 +00:00
Etan Kissling
20ede0ab35
use correct fork digest when broadcasting blob sidecars and sync msgs ( #6440 )
...
The fork digest determines the underlying data type on libp2p gossip,
so it's important to use the matching fork digest instead of picking
whatever wall epoch happens to be.
2024-07-23 20:30:44 +00:00
Etan Kissling
9f21182646
construct info object for `BlobSidecar` earlier ( #6445 )
...
To avoid "forked" types creeping into `BlobSidecar`, move the reduction
to `BlobSidecarInfoObject` to the sole caller. The info object is fork
agnostic, so does not need "forked" if `BlobSidecar` ever updates.
2024-07-23 20:22:29 +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
ae0a1488b5
Fix blob syncing for Electra ( #6438 )
...
* Fix blob syncing for Electra
`BlobSidecar` requests on libp2p have a context prefix based on:
> The `<context-bytes>` field is calculated as context =
> `compute_fork_digest(fork_version, genesis_validators_root)`
We currently only process blobs if that indicates Deneb, meaning that
on Electra we incorrectly report `InvalidContextBytes` and refuse to
process the blob response data.
Fix this, and also ensure that the code no longer needs maintenance
with every fork unrelated to blobs.
* fix
2024-07-23 03:10:41 +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
6fa852400d
pause deployment of long-range sync option default ( #6436 )
2024-07-21 07:10:26 +02:00
tersec
ebd0217a10
fix is_eligible_for_activation_queue for electra ( #6427 )
2024-07-15 21:08:20 +02:00
Eugene Kabanov
7853bd2878
BN: User agent recognition and error codes decoding. ( #6414 )
...
* Initial commit.
* Force update remote agent right before disconnect.
* Add handling errors from unknown remote agents.
* Address review comments.
2024-07-15 16:53:41 +02:00
Eugene Kabanov
f751fde417
Use Nimbus specific agent string instead of nim-presto defaults. ( #6424 )
...
* Use Nimbus specific agent string instead of nim-presto defaults.
Use response(code) overload.
* Fix REST API test.
2024-07-15 02:27:23 +00:00
Kim De Mey
ca15c4e433
Replace deprecated ENR functions ( #6419 )
2024-07-12 17:18:24 +02:00
Eugene Kabanov
031033a6f9
Fix REST /eth/v1/node/identity should return proper MultiAddresses (version 2). ( #6422 )
...
* Initial commit.
* Bump nim-libp2p with dualstack fixes.
* Pass announcedAddresses to the `p2p_addresses` list.
2024-07-11 17:39:38 +02:00
tersec
befcf3f56a
bump sepolia for new bootnodes ( #6421 )
2024-07-11 07:13:37 +02:00
Etan Kissling
dc007e3977
nullability annotations for `libnimbus_lc.h` ( #6417 )
...
Annotate functions that may return `NULL` with `_Nullable` to properly
bridge into Swift.
2024-07-09 12:38:16 +02:00
tersec
3db571d182
allow individual calculation of validator balances across epoch boundaries ( #6416 )
2024-07-07 00:32:50 +02:00
Jhett Black
3f051e9ab0
Add beacon node count metrics. ( #6371 )
2024-07-06 21:07:56 +00: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
c59bb71916
Add implementation of publishBlindedBlockV2() REST API endpoint. ( #6413 )
2024-07-04 19:48:12 +00:00
Etan Kissling
abf818a9f3
bump nim-eth to `d8fda55c79dd48ba564f3cb540b968f4a1c1aae6` ( #6405 )
...
* bump nim-eth to `d8fda55c79dd48ba564f3cb540b968f4a1c1aae6`
- Overhaul of ENR implementation - part I
- Rework of ENR decoding code
- Update discv5 to use non deprecated ENR calls and simplify code
- simplify .nimble file
- avoid warnings when processing `GasInt` for RLP
- define Electra types and RLP encoding
* explicitly indicate consensus types over nim-eth types in EL manager
2024-07-04 18:40:11 +00:00
tersec
9f654690b8
update builder API registrations after keymanager API fee recipient change ( #6412 )
2024-07-04 14:08:07 +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
tersec
8c67a265d0
bump nim-web3 to align WithdrawalRequestV1 with EIP-7002 and consensus spec ( #6395 )
2024-07-01 16:07:30 +02:00
tersec
13e766d4df
add database electra block tests ( #6394 )
2024-07-01 04:18:41 +00:00
Eugene Kabanov
190dbfd481
Fix empty status string handling, address #6175 . ( #6391 )
2024-06-28 05:54:51 +02: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
1b59e82e3a
Merge branch 'feat_eip-7688' into feat_eip-6493
2024-06-26 12:09:41 +02:00
Etan Kissling
b9d85a0bd5
remove `Consolidation`, `SignedConsolidation`
2024-06-26 11:32:48 +02:00
tersec
288540e794
fix UnnamedBreak deprecation build warnings ( #6388 )
2024-06-26 10:48:49 +02:00
Etan Kissling
256020037a
Merge branch 'feat_eip-7688' into feat_eip-6493
2024-06-25 16:45:53 +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
0ef4742fd5
fix REST encoding
2024-06-25 13:08:41 +02:00
Etan Kissling
0c4e87a40b
Merge branch 'unstable' into dev/etan/lc-electra
2024-06-24 12:51:51 +02:00
tersec
a787c85589
Merge remote-tracking branch 'origin/stable' into unstable
2024-06-24 09:23:31 +00:00
Etan Kissling
cd4de1357a
during proposal duties, perform sync aggregation duties if not received ( #6384 )
...
Including sync contributions into a block affects validator rewards.
When we have not received aggregate sync contributions, but have seen
individual messages, we can produce the contributions locally, improving
validator rewards when subscribing to all subnets or when having a
non-aggregating attached validator in the sync committee.
2024-06-24 09:13:15 +00:00
tersec
7d00786d5e
version v24.6.0
2024-06-24 07:25:15 +00:00
Etan Kissling
e4efe9ed75
ensure that rarely ran files are compiled on PR ( #6379 )
...
* ensure that rarely ran files are compiled on PR
Add some missing files to `isMainModule` developer internal builds CI.
* fix fork choice compilation
* fix `rest_api_benchmark` compilation
* skip linking
* fix loop
* fix `mock_genesis`
* fix signedness
2024-06-23 23:35:56 +00:00
Etan Kissling
eb8ba1a3ff
rename variable
2024-06-23 23:52:35 +02:00
Etan Kissling
f3e3c0de8f
split function into multiple parts
2024-06-23 15:54:09 +02:00
Etan Kissling
c01fb9f0da
further reduce stack size
2024-06-23 12:29:09 +02:00
Etan Kissling
3f83028cf2
Merge branch 'unstable' into dev/etan/lc-electra
2024-06-22 10:48:08 +02:00
Etan Kissling
e7349be3e5
put correct sync committee branch version into DB
2024-06-22 10:19:35 +02:00
tersec
9b6b42c8f9
some consensus spec URL updates to v1.5.0-alpha.3 ( #6382 )
2024-06-22 07:28:19 +02:00
tersec
b759038ba8
increase TNS state download timeout to 90 ( #6363 )
2024-06-21 22:14:28 +00:00
Etan Kissling
8bc53bde71
bump holesky to `874c199423ccd180607320c38cbaca05d9a1573a` ( #6377 )
...
- Add Chainlens explorer for Holesky
- update repository layout
2024-06-21 21:51:25 +00:00
Etan Kissling
0d89dcd363
fix initialization when Electra not scheduled
2024-06-21 16:20:51 +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
31653d5869
fix DB size estimates for light client data ( #6373 )
...
Addresses two inaccuracies in light client data size documentation:
1. `SyncCommittee` pubkeys serialize are 48 bytes not 64 bytes
2. Some of the estimates used 1000 vs 1024 bytes/KB, aligned to 1024
2024-06-21 12:39:38 +00: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
Eugene Kabanov
61610fd243
BN: Disable genesis sync via long-range-sync argument. ( #6361 )
...
* Initial commit.
* Update options.md.
* Add pre-database initialization weak subjectivity period check.
* Add proper log message.
2024-06-20 18:57:08 +00:00
Kim De Mey
7a8c1d818a
Bump nim-eth for Opt changes and make Opt related adjustments ( #6369 )
2024-06-18 23:46:51 +02:00
tersec
bfd1a36fcf
add engine API consolidation requests support for getPayloadV4/newPayloadV4 ( #6368 )
2024-06-18 07:35:36 +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
Etan Kissling
9fc870777c
remove Bellatrix EL syncing support from light client ( #6352 )
...
Bellatrix light client data does not contain the EL block hash, so we
had to follow blocks gossip to learn the EL `block_hash` of such blocks.
Now that Bellatrix is obsolete, we can simplify EL syncing logic under
light client scenarios. Bellatrix light client data can still be used
to advance the light client sync itself, but will no longer result in
`engine_forkchoiceUpdated` calls until the sync reaches Capella. This
also frees up some memory as we no longer have to retain blocks.
2024-06-14 01:23:17 +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
Etan Kissling
b6d6247fa1
fix light client topic subscriptions ( #6351 )
...
Using `let contextFork = consensusFork` no longer seems to work to avoid
capturing the `var` loop variable; it ends up being `Electra` for all
handlers. Use `closureScope` as a more sustainable fix.
2024-06-14 00:45:40 +00:00
Etan Kissling
176a8117eb
Merge branch 'feat_eip-7688' into feat_eip-6493
2024-06-13 16:27:58 +02: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
Eugene Kabanov
27664291c4
VC/NIMBUS-BN validators protection. ( #6329 )
...
* Beacon node side implementation.
* Validator client side implementation.
* Address review comments and fix the test.
* Only 400 errors could be IndexedErrorMessage, 500 errors are always ErrorMessage.
* Remove VC shutdown functionality.
* Remove magic constants.
* Make arguments more visible and disable default values.
* Address review comments.
2024-06-11 19:38:16 +00:00
Kim De Mey
741075aada
Bump nim-eth module and add async raises for eth2 discovery ( #6344 )
2024-06-11 19:50:08 +02:00
tersec
77d926525f
stop using deprecated stew/results ( #6343 )
...
* stop using deprecated stew/results
* exception tracking linting
2024-06-11 02:34:56 +00:00
Etan Kissling
cccd81a47b
add ANSI art placeholder for Electra 🦒 ( #6338 )
...
Trigger ANSI art on upgrade to Electra
Art created by http://beatscribe.com (beatscribe#1008 on Discord)
2024-06-10 16:45:40 +00: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
0512d02766
VC enable block monitoring by default. ( #6331 )
2024-06-07 15:04:29 +00:00
Etan Kissling
ab892c1a04
bump `mainnet` to `f6b7882618a5ad2c1d2731ae35e5d16a660d5bb7` ( #6310 )
...
* bump `mainnet` to `f6b7882618a5ad2c1d2731ae35e5d16a660d5bb7`
- Initial commit
* fix soft links
2024-05-30 09:28:16 +00: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
Etan Kissling
8910de65a4
move `EpochParticipationFlags, SyncCommittee` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-27 13:56:38 +02:00
Etan Kissling
ea58e9353f
move `(Signed)?Consolidation`, `Pending..(Deposit|Withdrawal)` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-27 13:52:09 +02:00
Etan Kissling
06e4ad5faa
move `KzgCommitments` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-27 13:47:05 +02:00
Etan Kissling
ebf285f3dd
move `BLSToExecutionChange`, `SignedBLSToExecutionChange` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-27 13:38:29 +02:00
Etan Kissling
fe058f9f04
Merge branch 'dev/etan/im-base' into feat_eip-7688
2024-05-26 15:22:12 +02:00
Etan Kissling
1384d7ee22
move `DepositReceipt`, `ExecutionLayerWithdrawalRequest` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-26 15:13:47 +02:00
Etan Kissling
0a0a27399b
move `Withdrawal`, `HistoricalSummary` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-26 15:08:18 +02:00
Etan Kissling
bd0689f048
move `Transaction`, `ExecutionAddress` and `BloomLogs` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-26 14:59:49 +02:00
Etan Kissling
ee5af9f7ee
move `SyncAggregate` to `base`
...
Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
2024-05-26 14:39:24 +02:00
Etan Kissling
0efc81d96d
use correct minimum size when reading block / state headers ( #6263 )
...
`sizeof` also includes padding between fields, while SSZ defines
`fixedPortionSize` (on type) or `sszSize` (on value) to denote
required bytes to encode. Switch forked block/state readers to SSZ size.
As blocks/states are much larger than the padding, this doesn't affect
practical use cases but is slightly more correct this way.
2024-05-25 07:30:05 +02:00
Etan Kissling
d221cd5a6b
Merge branch 'feat/eip-7495' into feat_eip-6493
2024-05-24 17:19:04 +02:00
Etan Kissling
031036f0bc
Merge branch 'feat/eip-7495' into feat_eip-7688
2024-05-24 17:17:40 +02:00
Etan Kissling
0c59f31fd1
latest EIP-6493 changes: switch to vector based fees
...
Consolidate fees in vectors.
2024-05-24 00:40:53 +02:00
tersec
c7bf6fb542
rm debugRaiseAssert; clean up several debugComments ( #6308 )
...
* rm debugRaiseAssert; clean up several debugComments
* exception linting
2024-05-23 23:51:09 +02:00
Etan Kissling
b489adc93e
Merge branch 'stable' into feat_eip-6493
2024-05-23 20:49:35 +02:00
Etan Kissling
02626a13f1
Merge branch 'stable' into feat_eip-7688
2024-05-23 20:47:01 +02:00
tersec
a7b5741163
Merge remote-tracking branch 'origin/stable' into unstable
2024-05-23 13:29:21 +00:00
tersec
a98c119b98
version v24.5.1
2024-05-23 10:52:55 +00:00
tersec
73f56b5026
version v24.5.0
2024-05-23 03:44:54 +00:00
Etan Kissling
26b0524634
add EIP-6493 support
...
- https://eips.ethereum.org/EIPS/eip-6493
2024-05-22 21:57:05 +02:00
Etan Kissling
44d8a8bde0
add EIP-7688 support
...
- https://eips.ethereum.org/EIPS/eip-7688
2024-05-22 16:27:22 +02:00
tersec
b56a671122
fix most ConvFromXtoItselfNotNeeded hints and unhide remaining ones ( #6307 )
2024-05-22 13:56:37 +02:00
tersec
708b23f084
rm unused produceBlockV2Plain() RPC signature ( #6304 )
2024-05-22 07:47:03 +02:00
tersec
3e6990ccc4
rm unused ProduceBlockResponseV2 type ( #6302 )
2024-05-22 04:52:35 +02:00
tersec
dd452f71d3
rm outdated/semi-duplicate execution layer withdrawal request processing ( #6301 )
2024-05-22 01:59:11 +02:00
Eugene Kabanov
34853ca155
VC: Deprecate fallback path to produceBlockV2, use produceBlockV3 always. ( #6300 )
...
* Remove fallback path to publishBlockV2(), use publishBlockV3().
* Update AllTests.md.
2024-05-22 00:03:38 +02:00
Eugene Kabanov
d7c5bc0397
[VC] Add builderBoostFactor support. ( #6294 )
...
* Initial commit.
* Replace localBlockValueBoost with builderBoostFactor.
* Add test.
* Update AllTests.
* Update options.md
* Recover `localBlockValueBoost` for BN-only mode.
* Address review comments.
2024-05-19 04:49:43 +03:00
Jacek Sieka
d191b35e2e
electra: attestatoin sending ( #6296 )
2024-05-17 17:34:46 +02:00
Jacek Sieka
045c4cf185
electra attestation updates ( #6295 )
...
* electra attestation updates
In Electra, we have two attestation formats: on-chain and on-network -
the former combines all committees of a slot in a single committee bit
list.
This PR makes a number of cleanups to move towards fixing this -
attestation packing however still needs to be fixed as it currently
creates attestations with a single committee only which is very
inefficient.
* more attestations in the blocks
* signing and aggregation fixes
* tool fix
* test, import
2024-05-17 15:37:41 +03:00
tersec
826bf4c3ee
be more optimistic about electra
2024-05-17 07:13:30 +00:00
Eugene Kabanov
41db536d63
Fix el-manager warnings and issues. ( #6293 )
2024-05-16 13:54:51 +02:00
tersec
4355f81731
temporarily disable optimistic block hashing on electra
2024-05-16 11:17:31 +00:00
tersec
c7b916fe7b
rename depositReceipts/exits to depositRequests/withdrawalRequests
2024-05-16 00:23:00 +00:00
tersec
b9151d43ce
produce blobs in electra
2024-05-15 14:49:57 +00:00
tersec
111e5d8006
add push raises to nimbus_light_client
2024-05-15 14:01:52 +00:00
tersec
69f13eaa51
add electra gossip transition
2024-05-15 13:30:49 +00:00
Eugene Kabanov
0b8cb4efc4
Add metrics to all RPC {state_id} endpoints. ( #6282 )
2024-05-15 09:52:57 +03:00
tersec
d0400e408b
rename ExitV1 to WithdrawalRequestV1 ( #6290 )
2024-05-15 06:44:52 +02:00
tersec
c0601608f9
rm future_combinators ( #6289 )
2024-05-14 22:14:26 +02:00
tersec
0ca5211f6a
enable nbn electra block processing ( #6288 )
2024-05-14 20:29:03 +02:00
Eugene Kabanov
e6b9bfc9e4
el_manager initial refactor. ( #6228 )
...
* Initial commit.
* Address review comments and fix missing primitive.
* Fix developer build.
* More asyncraises updates.
* Refactor and optimize forkchoiceUpdated() and sendNewPayload().
* Fix runtime assertion.
* Refactor getPayload().
2024-05-14 21:03:30 +03:00
tersec
c1b9e82502
electra attestation gossip plumbing ( #6287 )
2024-05-14 19:01:26 +03:00
tersec
1c3aaa7be2
add (Signed)AggregateAndProof SSZ tests ( #6285 )
2024-05-14 13:51:06 +02:00
tersec
9c669cf57a
some debugRaiseAssert to debugComment; unblock some spec tests ( #6284 )
2024-05-14 12:19:24 +03:00
tersec
3f972a2ca5
add some support for electra aggregated attestations ( #6283 )
2024-05-14 06:12:35 +02:00
Etan Kissling
87605d08a7
bump `nim-eth` to `c482b4c5b658a77cc96b49d4a397aa6d98472ac7` ( #6281 )
...
- Introduce wrapper type for EIP-4844 transactions
2024-05-13 17:58:47 +02:00
tersec
6b8061b5d6
automated consensus spec URL updating to v1.5.0-alpha.2 ( #6279 )
2024-05-09 05:03:10 +00:00
tersec
963e0bb92b
use EF consensus spec v1.5.0-alpha.2 test vectors ( #6272 )
2024-05-08 04:43:05 +02:00
tersec
1b30dcc165
initial electra attestation pool changes; electra block_sim ( #6255 )
2024-05-07 15:01:51 +00:00
tersec
c41fe698cf
small datatypes cleanups ( #6266 )
2024-05-06 10:21:37 +02:00
Eugene Kabanov
a6f68d3edc
Fix POST to /eth/v2/beacon/blocks unable to verify correct block signature. ( #6261 )
2024-05-06 04:15:17 +00:00
Eugene Kabanov
484f48953b
Fix POST to eth/v1/builder/blinded_blocks missing header Eth-Consensus-Version. ( #6256 )
...
* Fix submitBlindededBlock() do not send consensus-version HTTP header.
* Address review comments.
2024-05-03 01:08:16 +00:00
Eugene Kabanov
c9b54bf1aa
Enable IPv6 for discovery5 using dualstack support. ( #6242 )
...
* Make listen-address default to use dualstack.
* Use correct newProtocol().
* Bump nim-eth.
* Bump nim-eth one more time.
* Use `*` instead of IPv6 address for dualstack sockets.
* Bump chronos and nim-eth.
* Use new constructor.
* Fix listenAddress should be Opt[T] not Option[T].
* Fix options.md.
2024-05-01 19:29:39 +00:00
Eugene Kabanov
f3da063510
Fix VC not properly handled getAggregatedAttestation's 404 error. ( #6254 )
...
* Fix VC not properly handled getAggregatedAttestation's 404 error.
* Update AllTests.
2024-05-01 15:32:28 +00:00
tersec
1ab6f1654f
Merge remote-tracking branch 'origin/stable' into unstable
2024-04-29 06:08:43 +00:00
tersec
e70fa6d6de
rename ElectraIndexedAttestation/ElectraAttesterSlashing for consistency ( #6252 )
2024-04-29 04:19:10 +02:00
tersec
f20a21c015
v24.4.0
2024-04-29 01:00:13 +00:00
tersec
abc8bbbf23
add EF consensus spec test Electra fork and transition fixtures ( #6251 )
2024-04-28 16:13:17 +02:00
tersec
a66876c8e5
add EF consensus spec test Electra block sanity fixtures ( #6250 )
...
* add EF consensus spec test Electra block sanity fixtures
* move process_consolidation/process_deposit_receipt before usage
2024-04-28 09:15:03 +00:00
tersec
302f645a01
use EF consensus spec v1.5.0-alpha.1 test vectors ( #6249 )
2024-04-28 03:33:44 +00:00
tersec
6119389c3a
add EF consensus spec test Electra attestation operations fixture ( #6248 )
2024-04-28 00:52:14 +00:00
tersec
8f0a61b964
add EF consensus spec test Electra execution payload operations fixture ( #6246 )
2024-04-26 16:02:15 +00:00
tersec
63d00931a3
add EF consensus spec test Electra deposit receipt operations fixture ( #6245 )
2024-04-26 12:39:09 +00:00
tersec
34ba05f4d3
add EF consensus spec test Electra deposits operations fixture ( #6243 )
2024-04-26 07:18:44 +00:00
tersec
b0f58a58b6
add EF consensus spec test Electra consolidation operations fixture ( #6235 )
2024-04-25 18:50:54 +00:00
tersec
8c4ddd64c0
add EF consensus spec test attester slashing, proposer slashing, voluntary exit, and execution layer withdrawal request tests ( #6234 )
2024-04-25 08:41:17 +00:00
tersec
f53271eaaa
add rest of EF consensus spec test Electra epoch transition fixture(s) ( #6232 )
2024-04-24 12:28:47 +00:00
tersec
e6e95cbab7
add Electra slot sanity tests ( #6230 )
2024-04-23 07:58:32 +00:00
tersec
eb997f4e1f
add 10 sub-test-fixtures for electra epoch transitions; use v2.0.4 for Nim 2.x ( #6229 )
2024-04-23 01:15:55 +00:00
tersec
87452374e4
add Electra SSZ object test fixture ( #6225 )
2024-04-22 09:00:38 +00:00
tersec
d139c92df9
explicitly scope AttesterSlashing and IndexedAttestation types to phase0 ( #6224 )
2024-04-21 05:49:11 +00:00
tersec
caa3b73dbb
move AttesterSlashing and IndexedAttestation from base to phase0 ( #6223 )
2024-04-21 01:17:02 +00:00
tersec
41f8400f97
fix Electra light client objects; use version-2-0 for Nim again ( #6222 )
2024-04-19 19:20:45 +00:00
careworry
2ec82fe3ce
chore: remove repetitive words ( #6219 )
...
Signed-off-by: careworry <worrycare@outlook.com>
2024-04-19 11:31:15 +00:00
tersec
73738c702c
use consensus spec v1.5.0-alpha.0 test vectors; use Nim v2.0.4 specifically for 2.0.x ( #6221 )
2024-04-19 02:55:58 +00:00
tersec
e4b0e24614
add compounding withdrawal helpers ( #6217 )
2024-04-18 10:12:37 +00:00
tersec
645e627b03
add new Electra beacon chain containers and presets ( #6216 )
...
* add new Electra beacon chain containers and presets
* re-enable attestations in electra state transition
2024-04-18 07:30:01 +00:00
tersec
0132f5d689
some consensus spec v1.4.0 spec URL updates ( #6215 )
2024-04-18 03:00:04 +02:00
tersec
603c83522e
explicitly refer to phase0.{Attestation,TrustedAttestation} rather than sans module name ( #6214 )
2024-04-17 20:44:29 +00:00
tersec
867995acd1
some consensus spec v1.4.0 spec URL updates ( #6208 )
2024-04-17 05:51:16 +02:00
tersec
bb2ca747bc
move Attestation-related types/logging from base to phase0 types ( #6207 )
2024-04-16 19:01:30 +00:00
tersec
bd3c9af0f8
implement EIP-7002 ( #6206 )
...
* implement EIP-7002
* fix linting
2024-04-16 18:09:39 +00:00
Etan Kissling
c7d5ad78e1
avoid `--gc:arc` issue in validator key caching ( #6203 )
...
The current implementation of the validator key cache as introduced in
#5883 leads to issues when compiling with `--gc:arc`. Namely, the assert
in `injectdestructors.nim` > `destructiveMoveVar` is triggered:
```nim
assert n.kind != nkSym or not hasDestructor(c, n.sym.typ)
```
`cached == nkSym`, and `n.sym.typ == ref HashedValidatorPubKeyItem` with
`hasDestructor(c, n.sym.typ) == true`.
Inlining the `addr ...[]` avoids the problem and allows `--gc:arc`
compilation as part of LC wasm demo project.
Compilation command:
```sh
nim c \
-d:disable_libbacktrace \
-d:disableMarchNative \
-d:disableLTO \
-d:emscripten \
-d:release \
-d:useGcAssert \
-d:useSysAssert \
--debuginfo:off \
--nimcache:nimcache \
--os:linux \
--cpu:wasm32 \
--cc:clang \
--clang.exe:emcc \
--clang.linkerexe:emcc \
--gc:arc \
--exceptions:goto \
--define:noSignalHandler \
--define:danger \
--panics:on \
--passC:-fpic \
--passL:-Os \
--passL:-fpic \
--passC:'-pthread' \
--passL:'-pthread' \
--passC:'-sASSERTIONS' \
--passL:'-sASSERTIONS' \
--passC:'-sINITIAL_MEMORY=256MB' \
--passL:'-sINITIAL_MEMORY=256MB' \
--passC:'-sSTACK_SIZE=128MB' \
--passL:'-sSTACK_SIZE=128MB' \
--passC:'-sUSE_PTHREADS=1' \
--passL:'-sUSE_PTHREADS=1' \
--passC:'-sPTHREAD_POOL_SIZE_STRICT=0' \
--passL:'-sPTHREAD_POOL_SIZE_STRICT=0' \
--passL:'-sEXPORTED_FUNCTIONS="[_free, _malloc, _NimMain, _ETHRandomNumberCreate, _ETHConsensusConfigCreateFromYaml, _ETHConsensusConfigGetConsensusVersionAtEpoch, _ETHBeaconStateCreateFromSsz, _ETHBeaconStateDestroy, _ETHBeaconStateCopyGenesisValidatorsRoot, _ETHRootDestroy, _ETHForkDigestsCreateFromState, _ETHBeaconClockCreateFromState, _ETHBeaconClockGetSlot, _ETHLightClientStoreCreateFromBootstrap, _ETHLightClientStoreDestroy, _kETHLcSyncKind_UpdatesByRange, _kETHLcSyncKind_FinalityUpdate, _kETHLcSyncKind_OptimisticUpdate, _ETHLightClientStoreGetNextSyncTask, _ETHLightClientStoreGetMillisecondsToNextSyncTask, _ETHLightClientStoreProcessUpdatesByRange, _ETHLightClientStoreProcessFinalityUpdate, _ETHLightClientStoreProcessOptimisticUpdate, _ETHLightClientStoreGetFinalizedHeader, _ETHLightClientStoreIsNextSyncCommitteeKnown, _ETHLightClientStoreGetOptimisticHeader, _ETHLightClientStoreGetSafetyThreshold, _ETHLightClientHeaderCreateCopy, _ETHLightClientHeaderDestroy, _ETHLightClientHeaderCopyBeaconRoot, _ETHLightClientHeaderGetBeacon, _ETHBeaconBlockHeaderGetSlot, _ETHBeaconBlockHeaderGetProposerIndex, _ETHBeaconBlockHeaderGetParentRoot, _ETHBeaconBlockHeaderGetStateRoot, _ETHBeaconBlockHeaderGetBodyRoot, _ETHLightClientHeaderCopyExecutionHash, _ETHLightClientHeaderGetExecution, _ETHExecutionPayloadHeaderGetParentHash, _ETHExecutionPayloadHeaderGetFeeRecipient, _ETHExecutionPayloadHeaderGetStateRoot, _ETHExecutionPayloadHeaderGetReceiptsRoot, _ETHExecutionPayloadHeaderGetLogsBloom, _ETHExecutionPayloadHeaderGetPrevRandao, _ETHExecutionPayloadHeaderGetBlockNumber, _ETHExecutionPayloadHeaderGetGasLimit, _ETHExecutionPayloadHeaderGetGasUsed, _ETHExecutionPayloadHeaderGetTimestamp, _ETHExecutionPayloadHeaderGetExtraDataBytes, _ETHExecutionPayloadHeaderGetBaseFeePerGas, _ETHExecutionPayloadHeaderGetBlobGasUsed, _ETHExecutionPayloadHeaderGetExcessBlobGas, _ETHExecutionBlockHeaderCreateFromJson, _ETHExecutionBlockHeaderDestroy, _ETHExecutionBlockHeaderGetTransactionsRoot, _ETHExecutionBlockHeaderGetWithdrawalsRoot, _ETHTransactionsCreateFromJson, _ETHTransactionsDestroy, _ETHTransactionsGetCount, _ETHTransactionsGet, _ETHTransactionGetHash, _ETHTransactionGetFrom, _ETHTransactionGetNonce, _ETHTransactionGetMaxPriorityFeePerGas, _ETHTransactionGetMaxFeePerGas, _ETHTransactionGetGas, _ETHTransactionIsCreatingContract, _ETHTransactionGetTo, _ETHTransactionGetValue, _ETHTransactionGetInputBytes, _ETHTransactionGetBytes, _ETHTransactionGetEip6493Root, _ETHTransactionGetEip6493Bytes, _ETHTransactionGetNumEip6493SnappyBytes, _ETHReceiptsCreateFromJson, _ETHReceiptsDestroy, _ETHReceiptsGet, _ETHReceiptHasStatus, _ETHReceiptGetBytes, _ETHReceiptGetEip6493Bytes, _ETHReceiptGetNumEip6493SnappyBytes]"' \
--passL:'-sEXPORTED_RUNTIME_METHODS="[lengthBytesUTF8, stringToNewUTF8]"' \
--passL:'-Wl,--no-entry' \
--noMain:on \
--passL:'-o libnimbus_lc.js' \
nimbus-eth2/beacon_chain/libnimbus_lc/libnimbus_lc.nim
```
2024-04-16 11:47:18 +02:00
Eugene Kabanov
c5f04dd237
produceBlockV3 call should send `execution_payload_blinded` value as boolean. ( #6204 )
...
* Fix `execution_payload_blinded` in produceBlockV3 response should be boolean not string.
* Address review comments.
2024-04-15 23:08:41 +00:00
Etan Kissling
c57fcb426a
bump `nim-libp2p` to `89cad5a3ba9088cc721682469a10917903da25a0` ( #6199 )
...
- add support for setting protocol handlers with `{.raises.}` annotation
- fix: valueOr and withValue utilities
- fix: remove explicit param from GossipSubParams constructor
2024-04-12 11:12:44 +02:00