Commit Graph

4095 Commits

Author SHA1 Message Date
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
tersec e51c5ec783
add Electra blob support to block/blob quarantines, block processor, and request manager (#6201) 2024-04-11 09:31:39 +00:00
tersec 205d63a897
fill in executionpayload for/from GetPayloadV4 (#6200) 2024-04-10 23:34:34 +00:00
Etan Kissling 9bffc51cf6
allow frontfilling finalized CP block from era file (#6164)
Add support for using era file for the initial checkpoint block.
This should also avoid an error when the beacon node is restarted
before the backfill process has made any progress (#6059).
2024-04-10 14:11:07 +02:00
Etan Kissling a561024d88
rank peers by their score instead of their memory address (#6149)
The `<` function to compare peers was not exported, leading to the same
peer be acquired over and over again until kick. `mixin` doesn't pull it
into `peerCmp` without `*` export, and with the export no mixin needed.
2024-04-10 14:09:37 +02:00
tersec e7dede344a
bump nim-web3 to get updated Pectra GetPayloadV4 types (#6191) 2024-04-10 11:38:38 +02:00
tersec 1bf4058e22
add Electra support to beacon API produceBlindedBlock and produceBlockV3 endpoints; add further VC publish(Blinded)Block Electra support (#6190) 2024-04-10 10:54:00 +02:00
tersec 8a30cffbcc
initial VC Electra publishBlock support (#6189) 2024-04-09 16:54:05 +02:00
tersec 749a45695f
support engine_newPayloadV4 (#6188) 2024-04-09 12:44:03 +02:00
tersec 6ce5d5814c
support electra block proposals for internal BN validators (#6187) 2024-04-09 12:04:33 +02:00
tersec ba45a1821c
implement Electra beacon API publishBlindedBlock (#6185) 2024-04-08 18:03:20 +02:00
Etan Kissling 41a3b62fe2
update `wss_sim` for Bellatrix, Capella and Deneb (#6170)
The `wss_sim` was not properly maintained since Bellatrix. The missing
functionality is now added, including:

- Bellatrix: Connect to an EL for execution payload production
- Capella: Correct withdrawals processing, is mandatory to do
- Deneb: Dump blob sidecars into the output directory

See https://ethresear.ch/t/insecura-my-consensus-for-the-pyrmont-network/11833
2024-04-08 15:28:46 +02:00