Commit Graph

1647 Commits

Author SHA1 Message Date
Pedro Miranda f9e44b2a3b
Improved electra attestations packing (#6498)
* test disjoint comittee bits

* test for aggregated attestations with disjoint bits

* improved attestation pool on-chain collecting and packing

* addressed format issues

* improved sorting method

* updated AllTests-mainnet file

* updated AllTests-mainnet file

* review corrections

* review corrections

* removed old phase0 artifacts

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
2024-08-23 13:26:35 +02:00
tersec 44cc72c104
refactor engine API conversions out of EL manager (#6507) 2024-08-22 16:12:03 +02:00
tersec 21aeeaf561
automated consensus spec URL updating to v1.5.0-alpha.5 (#6504) 2024-08-21 14:25:19 +02:00
tersec f258cba816
some v1.5.0-alpha.4 consensus spec URL updates (#6485) 2024-08-10 07:09:37 +02:00
tersec 904318cf83
automated consensus spec URL updating to v1.5.0-alpha.4 (#6483) 2024-08-09 18:24:49 +02:00
Etan Kissling 3375875e05
remove option to select Capella fork choice algo (#6478)
* remove option to select Capella fork choice algo

With Deneb having run stable for quite a while now, it's time to remove
the option to select the prior fork choice algo from Capella.

* also remove usage from test
2024-08-07 14:48:05 +00:00
tersec c0fc0f41dd
calculate next slot's withdrawals properly even across epoch boundary (#6470) 2024-08-06 13:33:16 +02:00
Etan Kissling 9749e186df
Merge branch 'stable' into feat/eip-7495 2024-08-05 18:07:23 +02:00
tersec 8333365848
replace validator Bloom filter with partial bucket sort (#6469) 2024-08-02 07:30:22 +02:00
Etan Kissling ea16edd886
add test for shuffled attestation signatures (#6459)
Followup of #3212 to test proper signature verification. Also document
possible further optimization based on blst `v0.3.13`.
2024-07-26 23:31:05 +00:00
Etan Kissling c373e3ab35
reduce code repetition in `test_toblindedblock` (#6453)
Use `withAll` to generate the tests for various blinded block types
instead of copy pasting them for every fork.
2024-07-26 22:03:11 +00:00
Etan Kissling 6062bde5e5
fixes 2024-07-26 04:50:57 +02:00
Etan Kissling 6e80561080
Electra `BlobSidecar` for EIP-7688 2024-07-26 04:03:42 +02:00
Etan Kissling 48c3761530
Add more EIP-7688 SSZ tests 2024-07-26 04:02:38 +02:00
Etan Kissling 02fd912f92
Merge branch 'dev/etan/df-forkedblobs' into feat_eip-7688 2024-07-26 02:01:28 +02:00
Etan Kissling 2183c3cacc
explicitly mention Deneb in SSZ test 2024-07-26 01:56:19 +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 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 159f57f27e
LC constant rename 2024-07-22 14:13:56 +02:00
Kim De Mey cd008ba7ef
Bump NimYAML + bump related changes (#6431) 2024-07-17 21:50:29 +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
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 1fd246b23e
explicitly refer to attestation fork in SSZ consensus object tests (#6399)
Use fully qualified types when referring to attestation related types
in tests. We should also consider to merge these to a single runner.
2024-07-03 01:40:47 +00:00
tersec 13e766d4df
add database electra block tests (#6394) 2024-07-01 04:18:41 +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 ba5efbfa5c
Merge branch 'stable' into feat/eip-7495 2024-06-26 15:23:33 +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 0c4e87a40b
Merge branch 'unstable' into dev/etan/lc-electra 2024-06-24 12:51:51 +02: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 4e8e316012
Merge branch 'unstable' into dev/etan/lc-electra 2024-06-23 15:54:46 +02:00
Etan Kissling 6d0c9d37fa
produce Elctra attestations when running tests (#6383)
Test blocks don't include Electra attestations currently so finality
breaks and tests fail if prolonged. Fix that.
2024-06-23 13:06:58 +00:00
Etan Kissling 347c88972d
adjust fork schedule in light client data tests 2024-06-22 10:19:51 +02:00
Etan Kissling c0d07e1b24
try reduce stack size in test 2024-06-21 18:36:54 +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
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 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
tersec 05d2271a9f
Revert "Revert "bump nim-bearssl for gcc-14 compatibility (#6337)" (#6346)" (#6359)
This reverts commit 3d65bdcb09.
2024-06-14 19:06:58 +02: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 728d7db66e
Merge branch 'dev/etan/bd-serialization' into feat/eip-7495 2024-06-13 13:41:04 +02:00
Etan Kissling 2915833ce8
Merge branch 'dev/etan/cc-fieldname' into feat_eip-7688 2024-06-13 12:43:49 +02:00
tersec 3d65bdcb09
Revert "bump nim-bearssl for gcc-14 compatibility (#6337)" (#6346)
This reverts commit 45d50f041a.
2024-06-12 14:30:17 +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
tersec 77d926525f
stop using deprecated stew/results (#6343)
* stop using deprecated stew/results

* exception tracking linting
2024-06-11 02:34:56 +00:00
tersec 45d50f041a
bump nim-bearssl for gcc-14 compatibility (#6337)
* bump nim-bearssl for gcc-14 compatibility

* Bump chronos.

* Fix flaky test.

---------

Co-authored-by: cheatfate <eugene.kabanov@status.im>
2024-06-10 19:13:15 +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
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 22efdd85a5
add tests for EIP-7495: SSZ StableContainer
Implement test runner for new consensus-spec tests:

- https://github.com/ethereum/consensus-specs/pull/3777
2024-05-24 17:14:29 +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
tersec b56a671122
fix most ConvFromXtoItselfNotNeeded hints and unhide remaining ones (#6307) 2024-05-22 13:56:37 +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 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 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 69f13eaa51
add electra gossip transition 2024-05-15 13:30:49 +00: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
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
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 e70fa6d6de
rename ElectraIndexedAttestation/ElectraAttesterSlashing for consistency (#6252) 2024-04-29 04:19:10 +02: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 9ba6b8d8a7
add Electra epoch rewards test fixture (#6231)
* add Electra epoch rewards test fixture

* version-2-0 still has another issue
2024-04-23 15:47:39 +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 67a22b3887
add Electra BLS to Execution Change, Block Heaer, Sync Aggregate, and Withdrawals operations test fixtures (#6226) 2024-04-22 12:37:38 +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
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 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 bd3c9af0f8
implement EIP-7002 (#6206)
* implement EIP-7002

* fix linting
2024-04-16 18:09:39 +00:00
tersec 361be082ae
add Electra toSignedBlindedBlock tests (#6182) 2024-04-08 10:34:15 +02:00
tersec 937cc62b85
block_sim runs electra (#6181) 2024-04-07 09:58:11 +02:00
tersec 0d534224b3
remove some debugRaiseAsserts and fill in Electra functionality (#6178) 2024-04-06 07:46:02 +00:00
tersec 06894dd2f6
remove some debugRaiseAsserts and fill in Electra functionality (#6177) 2024-04-05 21:30:06 +02:00
tersec 0b6f75b88b
remove some debugRaiseAsserts and fill in actual Electra functionality (#6172) 2024-04-04 05:17:31 +02:00
tersec 13a70e9d69
rm built-in Goerli beacon chain support (#6057) 2024-04-03 23:25:36 +00:00