Commit Graph

11 Commits

Author SHA1 Message Date
Kewei
01e4969f85
fix concurrent rw on map in operation_pool (#10140)
relates to https://github.com/ledgerwatch/erigon/issues/10139
2024-04-30 16:08:40 +07:00
Giulio rebuffo
2fe4b37fc2
Optimized attestation processing (#10020)
* Decrease memory footprint on chain tip
* Fix a race
* Better times on `Attestation` processing. 1 sec -> 54 ms
2024-04-25 14:59:48 +08:00
Kewei
991230e43c
move more services out from ForkchoiceStore (#9981)
- voluntary_exit
- bls_to_execution_change
- proposer_slashing
- expirable lru

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2024-04-22 12:19:13 +00:00
Giulio rebuffo
183dbf78ae
Caplin: Add sync committees aggregation (#9829)
# Sync Committee Contribution pooling

First of all, a distinction:
* Sync Committee Messages are single unaggregated messages from a
specific validator
* Sync Committee Contributions are aggregated messages from many
validators.

We get these 2 messages from 2 different gossip sources, and then after
validating the Gossip rules, we send everything to the pool which
aggregate the `sync committee` or `contribution` into another aggregate.

## Sync Committee subscription:
/eth/v1/validator/sync_committee_subscriptions

The subscription just starts to subscribe to the `Sync Committee`'s
Gossip channel. it is actually really simple, here is the pseudo-code
for how the subscription happen for each `ValidatorIndex` requested:

```vb
Function PostEthV1ValidatorSyncCommitteeSubscriptions
    Request: ValidatorIndicies []uint64


    Get the head state of the blockchain


    For each subRequest in ValidatorIndicies do

        
        Compute the subnets for the validator index from subRequest using the headState

        For each subnet in syncnets do
            Construct a topic name for the sync committee subnet
                    Subscribe to the topic with the sync committee subnet the topic with the calculated expiry time in sentinel
            
End Function
```

### Extras

* /eth/v1/validator/contribution_and_proofs - Submit to the node a
contribution to be republished on the Gossip.
* /eth/v1/validator/sync_committee_contribution - Retrieve a
contribution (from the pool) that we have aggregated from the gossip.
* /eth/v1/beacon/pool/sync_committees - Submit to the node a sync sync
committee messages to be republished on the Gossip.

---------

Co-authored-by: Kewei <kewei.train@gmail.com>
2024-04-06 12:15:42 +08:00
Bayram Guvanjov
fd65637720
Caplin: ContributionAndProof handling (#9575)
This PR is to add the `ContributionAndProof` Handling to Caplin.

Validation of the messages according to the Ethereum consensus
specifications.
https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/p2p-interface.md#sync_committee_contribution_and_proof
2024-03-29 00:56:38 +01:00
a
48a60b6676
events endpoint (#9258) 2024-01-19 21:02:41 -06:00
Giulio rebuffo
b2fa618f74
Caplin: Fixed crash in OnAttestation (#9159)
* Added handling of AggregateAndProof
2024-01-08 17:13:25 +01:00
a
436493350e
Sentinel refactor (#8296)
1. changes sentinel to use an http-like interface

2. moves hexutil, crypto/blake2b, metrics packages to erigon-lib
2023-10-22 01:17:18 +02:00
Giulio rebuffo
10746eb376
Added BLS_TO_EXECUTION_CHANGES pool (#8332)
Adds BLS_TO_EXECUTION_CHANGES
2023-10-01 17:16:55 +02:00
Giulio rebuffo
72ba18bd36
Beacon: Added basic operations pool (#8309)
Added operation pools for beacon chain. operations are the equivalent of
txs for eth2

Added operation pools for:

* Attester Slashings
* Proposer Slashings
* VoluntaryExits
* BLSExecutionToChange
* Postponed to later: Attestations (or maybe not)
2023-09-29 23:42:07 +02:00
Giulio rebuffo
d555fc450d
Fixed ungraceful shutdown (#8307) 2023-09-27 19:09:36 +02:00