Commit Graph

638 Commits

Author SHA1 Message Date
tersec 3868365ac0
automated consensus spec URL updating to v1.5.0-alpha.8 (#6617) 2024-10-09 08:37:35 +02:00
tersec 50eed81dcf
electra BN attestation aggregating (#6596) 2024-10-07 07:53:38 +00:00
tersec 17d66118e8
automated consensus spec URL updating to v1.5.0-alpha.7 (#6601) 2024-10-06 14:03:56 +00:00
Pedro Miranda ff0cc8e62e
Electra - Filter aggregated attestations by root/committee (#6594)
* Filter aggregated attestations by root/committee

* fixed validator api documentation link

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
2024-10-04 05:15:48 +00:00
Jacek Sieka 8f0d910422
web: bump to new nim-eth types (#6590) 2024-10-02 15:26:11 +02:00
tersec a441695c51
plumb through Electra attestation callbacks (#6586) 2024-09-27 13:30:26 +02:00
tersec fa8b7e380f
add Electra beacon chain database state tests (#6584) 2024-09-27 07:53:58 +02:00
Pedro Miranda daf7f899c2
Attestation API updates for Electra (#6557)
* new V2 endpoint for beacon getBlockAttestations

* nnew GET endpoint version (V2) for getPoolAttestations

* new POST endpoint version (V2) for submitPoolAttestations

* remove premature ncli tests

* review improvements

* review comments and increased test coverage

* small improvements

* documentation typos

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
2024-09-25 12:33:58 +00:00
tersec d4e441e694
add Electra attester slashing pool (#6579) 2024-09-24 11:01:40 +02:00
tersec ff9d32d30d
some v1.5.0-alpha.6 consensus spec URL updates (#6572) 2024-09-21 06:53:34 +02:00
tersec 256f6b8b89
automated consensus spec URL updating to v1.5.0-alpha.6 (#6571) 2024-09-21 03:22:41 +02:00
Pedro Miranda 1ac9b851b9
Add GetAggregateAttestation V2 endpoint version (#6511)
* attestation pool support and tests

* REST endpoints changes

* initial ncli and validator client support

* updated tests file

* fixed typos

* review improvements

* remove V1 endpoint

* revert v1 removal

* V2 endpoint version available to pre electra

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
2024-09-06 12:15:30 +00:00
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 8c2e8f2b0f
some v1.5.0-alpha.5 consensus spec URL updates (#6509) 2024-08-23 12:43:54 +02:00
tersec e4f18cba09
stop tracking phase0 spec artifact of current/prev target epoch for attestation block packing (#6508) 2024-08-22 20:28:21 +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 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 535819263d
clear old electra attestations from attestation pool 2024-08-07 11:14:57 +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 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
tersec 288540e794
fix UnnamedBreak deprecation build warnings (#6388) 2024-06-26 10:48:49 +02: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 9b6b42c8f9
some consensus spec URL updates to v1.5.0-alpha.3 (#6382) 2024-06-22 07:28:19 +02:00
tersec 88fa8b17ea
automated consensus spec URL updating to v1.5.0-alpha.3 (#6364) 2024-06-16 02:59:25 +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
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 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
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 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 6b8061b5d6
automated consensus spec URL updating to v1.5.0-alpha.2 (#6279) 2024-05-09 05:03:10 +00:00
tersec 1b30dcc165
initial electra attestation pool changes; electra block_sim (#6255) 2024-05-07 15:01:51 +00:00
tersec 6119389c3a
add EF consensus spec test Electra attestation operations fixture (#6248) 2024-04-28 00:52:14 +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 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 e51c5ec783
add Electra blob support to block/blob quarantines, block processor, and request manager (#6201) 2024-04-11 09:31:39 +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
tersec 6ce5d5814c
support electra block proposals for internal BN validators (#6187) 2024-04-09 12:04:33 +02:00
tersec 937cc62b85
block_sim runs electra (#6181) 2024-04-07 09:58:11 +02:00
tersec 27921406e9
remove some debugRaiseAsserts and fill in Electra functionality (#6179) 2024-04-06 15:11:47 +02:00
Etan Kissling df0ff5f0fb
fix initialization of sync committee cache after loading non-epoch state (#6160)
When initializing from a state that's not aligned to an epoch boundary,
an earlier state is loaded that's epoch aligned, and subsequently topped
up with the missing blocks. `dag.headSyncCommittee` is initialized prior
to topping up the missing blocks, though. If the sync committee changes
while applying the blocks (e.g., a sync committee period boundary hits),
the cached information becomes unlinked from `dag.head`, leading to
valid blocks based on that chain being rejected. To fix this, move cache
initialization after the top up with blocks. This has been observed on
Goerli by initializing from 7919502 and attempting to top up 7920111.
The block gets rejected with an invalid state root on nodes that have
restarted after setting 7920111 as head, while it gets accepted by all
other nodes. Error message is `block: state root verification failed`.
The incorrect initialization behaviour was introduced in #4592, before
which the sync committee cache was initialized after applying blocks.
2024-04-03 23:03:06 +02:00
tersec 7fa32b7f02
add Electra to ConsensusFork enum (#6169)
* add Electra to ConsensusFork enum

* fix gnosis check
2024-04-03 16:43:43 +02:00
Etan Kissling 6a318d0f1a
avoid rejecting empty era file in verification (#6163)
`batchVerify`'s precondition is a non-empty signature list:

```nim
  if input.len == 0:
    # Spec precondition
    return false
```

This means that in eras without any blocks (as has happened on Goerli),
calling it leads to era files being reported as invalid.
2024-04-03 10:06:21 +02:00