ethereum / beacon-APIs

Collection of RESTful APIs provided by Ethereum Beacon nodes
https://ethereum.github.io/beacon-APIs/
Creative Commons Zero v1.0 Universal
328 stars 167 forks source link

Update attestation related APIs to be compatible with EIP-7549 #445

Open tbenr opened 4 months ago

tbenr commented 4 months ago

attestations for Electra require an additional committee_bits field.

I think these APIs are effected. /eth/v1/beacon/pool/attestations /eth/v1/beacon/blocks/{block_id}/attestations /eth/v1/validator/aggregate_attestation

rkapka commented 4 months ago

Also /eth/v1/validator/aggregate_and_proofs

ensi321 commented 4 months ago

Something minor but I believe attester slashing is affected because the max length of attesting_indices in IndexedAttestation is changed. So get and post /eth/v1/beacon/pool/attester_slashings

tersec commented 4 months ago

Would note that there's a conceptual difference in get/put type APIs. Both worth discussing, but adding polymorphism present challenges to different parts of the stack. The initial list of three all returns an Attestation-like structure for example, which implies a particular type system setup to handle that.

tersec commented 4 months ago

https://ethereum.github.io/beacon-APIs/#/Events/eventstream has an attestation event type, potentially affected

tbenr commented 4 months ago

I suspect we need to move /eth/v1/validator/aggregate_attestation to v2, 'cose committee index parameter is required to BN if we want to produce aggregates only for the committee the validator is in. cc @mkalinin

mkalinin commented 4 months ago

I suspect we need to move /eth/v1/validator/aggregate_attestation to v2, 'cose committee index parameter is required to BN if we want to produce aggregates only for the committee the validator is in. cc @mkalinin

Yes, the committee_index has to be passed explicitly onto this call, because the EIP tends to preserve the network part of the aggregation strategy