Add execution_payload and execution_payload_gossip event - #588
Conversation
|
we should probably add versions to this too... |
| event: data_column_sidecar | ||
| data: {"block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "index": "1", "slot": "1"} | ||
| execution_payload: | ||
| description: The node has received a `SignedExecutionPayloadEnvelope` (from P2P or API) that is successfully imported on the fork-choice `on_execution_payload` handler |
There was a problem hiding this comment.
May I know the difference between this and execution_payload_available?
This one emits when the payload is fully imported, execution_payload_available emits when payload is available for PTC vote.
Is there a gap/delay between the occurrence of these two events?
There was a problem hiding this comment.
I guess you are right, there shouldn't be much of a difference in the timing and would at most be minimal based on how the client specific import pipeline works.
We can probably remove it and only stick to execution_payload_gossip and execution_payload_available
execution_payload_available is emitted when the execution payload + all data (based on custody) is available, it does not require the execution payload to be valid, while execution_payload does since it is emitted after successful import into fork choice via on_execution_payload handler, so it includes the time it takes for the EL to execute and verify the execution payload
was thinking about that, I am not that convinced that versioning here makes sense as the schema is not based on a spec container |
execution_payload and execution_payload_gossip eventexecution_payload_gossip event
still, we might be better off being consistent? |
but that means not having the version/data container here? eg. I am open to adding a version here too if that's really what we want |
|
@michaelsproul thoughts? |
execution_payload_gossip eventexecution_payload and execution_payload_gossip event
|
I'm not Michael, but implementing this in Lighthouse. I agree with @nflaig, let's version only the directly embedded consensus objects. Versioning the others by fork name as well would be inconsistent as noted above, and would be strange to use in cases where we e.g. want to add some field to an event outside of the fork lifecycle. |
|
haven't started implementing this yet but looks good to me |
Adds execution payload events from ethereum/beacon-APIs#588 --------- Co-authored-by: Matthew Keil <github@mail.matthewkeil.com>
Implement boilerplate for new SSE events as specified in - ethereum/beacon-APIs#588 While that one is not merged yet, I believe the SSE events might be utilized in Dora already. Implement the boilerplate, i.e. subscription tracking and publish queues. A PR to implement to fully implement already implementable events will follow. Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
Implement boilerplate for new SSE events as specified in - ethereum/beacon-APIs#588 While that one is not merged yet, I believe the SSE events might be utilized in Dora already. Implement the boilerplate, i.e. subscription tracking and publish queues. A PR to implement to fully implement already implementable events will follow. Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
|
applied changes due to ethereum/consensus-specs#5094, the events no longer emit the |
**What type of PR is this?** > Feature **What does this PR do? Why is it needed?** Adds event emission for `execution_payload_gossip` as per ethereum/beacon-APIs#588. **Which issues(s) does this PR fix?** N/A **Other notes for review** https://github.com/OffchainLabs/prysm/blob/e94d46b8c175530cac4deb5e0b082366ba9fb6be/beacon-chain/sync/validate_beacon_blocks.go#L276-L283 `execution_payload_gossip` mirrors `block_gossip` event, so you can see exactly same pattern as our implementation like above. **Testing** ``` ➜ kurtosis-config curl -X 'GET' \ 'http://<beacon-node-rpc-url>/eth/v1/events?topics=execution_payload_gossip' \ -H 'accept: text/event-stream' event: execution_payload_gossip data: {"slot":"65","builder_index":"18446744073709551615","block_hash":"0x36b193697ddff3ece883e04a554e108c280ff5cb1c101aed886cb15bd76515bb","block_root":"0x765c25b8e75955f3f1eabbe6ab9bebc3a05f5fb94dcbbef20b1ddde4192c5244"} ``` with this config: ```yaml participants: - el_type: ethrex el_image: ethpandaops/ethrex:glamsterdam-devnet-4 el_extra_params: - --http.api=eth,net,web3,admin cl_type: prysm cl_image: prysm-bn-custom-image:latest vc_image: prysm-vc-custom-image:latest supernode: true count: 3 cl_extra_params: - --subscribe-all-subnets - --verbosity=debug vc_extra_params: - --verbosity=debug network_params: fulu_fork_epoch: 0 gloas_fork_epoch: 2 seconds_per_slot: 6 genesis_delay: 40 additional_services: - dora global_log_level: debug ``` **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [x] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).
When processing an execution payload envelope, the data availability (DA) check previously ran sequentially after consensus verification and EL validation had both completed. This moves the DA check into the same `errgroup` so it runs concurrently with payload verification and EL `newPayload` validation. - The DA check only runs when the latest bid carries blob KZG commitments (unchanged behavior). - Uses the group context (`gCtx`) so a failure in any of the three cancels the others. This enables ethereum/beacon-APIs#588 to emit `execution_payload_available`
**What type of PR is this?** > Feature **What does this PR do? Why is it needed?** Adds event emission for `execution_payload` as per ethereum/beacon-APIs#588. Refactors `ReceiveExecutionPayloadEnvelope` by decoupling EL validation from signature verification+DA check to satisfy the event emission timing for `execution_payload_available`. **Which issues(s) does this PR fix?** N/A **Other notes for review** - Renames the existing struct names clearly to indicate whether it is for `execution_payload` or `execution_payload_available`. **Testing** Kurtosis config file: ```yaml participants: - el_type: ethrex el_image: ethpandaops/ethrex:glamsterdam-devnet-4 el_extra_params: - --http.api=eth,net,web3,admin cl_type: prysm cl_image: prysm-bn-custom-image:latest vc_image: prysm-vc-custom-image:latest supernode: true count: 3 cl_extra_params: - --subscribe-all-subnets - --verbosity=debug vc_extra_params: - --verbosity=debug network_params: fulu_fork_epoch: 0 gloas_fork_epoch: 2 seconds_per_slot: 6 genesis_delay: 40 additional_services: - dora global_log_level: debug ``` You can receive **both** events with this command: ```bash ➜ prysm git:(feat/execution-payload-event) curl -X 'GET' \ 'http://127.0.0.1:32813/eth/v1/events?topics=execution_payload&topics=execution_payload_available' \ -H 'accept: text/event-stream' ``` Result: ``` event: execution_payload_available data: {"slot":"64","block_root":"0x0ef955bd61d0e402bc71d6b97f223fa9377683dce64561069c408c5c2e0d548d"} event: execution_payload data: {"slot":"64","builder_index":"18446744073709551615","block_hash":"0xbf648d1f316e6d8284ed74c97c4942af1daf052f7517c5fca8b00836151e1d3d","block_root":"0x0ef955bd61d0e402bc71d6b97f223fa9377683dce64561069c408c5c2e0d548d","execution_optimistic":false} event: execution_payload_available data: {"slot":"65","block_root":"0xfec09760c4bd83adcff905cb95b732bfcef7c00f529f5e2471ff34db512fbdbe"} event: execution_payload data: {"slot":"65","builder_index":"18446744073709551615","block_hash":"0x6c327ec9e4de925b28eb5e127fbfae8d6082590199d35423ea95f8f0300c0423","block_root":"0xfec09760c4bd83adcff905cb95b732bfcef7c00f529f5e2471ff34db512fbdbe","execution_optimistic":false} ``` **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [x] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).
**What type of PR is this?** > Feature **What does this PR do? Why is it needed?** Adds event emission for `execution_payload_gossip` as per ethereum/beacon-APIs#588. **Which issues(s) does this PR fix?** N/A **Other notes for review** https://github.com/OffchainLabs/prysm/blob/e94d46b8c175530cac4deb5e0b082366ba9fb6be/beacon-chain/sync/validate_beacon_blocks.go#L276-L283 `execution_payload_gossip` mirrors `block_gossip` event, so you can see exactly same pattern as our implementation like above. **Testing** ``` ➜ kurtosis-config curl -X 'GET' \ 'http://<beacon-node-rpc-url>/eth/v1/events?topics=execution_payload_gossip' \ -H 'accept: text/event-stream' event: execution_payload_gossip data: {"slot":"65","builder_index":"18446744073709551615","block_hash":"0x36b193697ddff3ece883e04a554e108c280ff5cb1c101aed886cb15bd76515bb","block_root":"0x765c25b8e75955f3f1eabbe6ab9bebc3a05f5fb94dcbbef20b1ddde4192c5244"} ``` with this config: ```yaml participants: - el_type: ethrex el_image: ethpandaops/ethrex:glamsterdam-devnet-4 el_extra_params: - --http.api=eth,net,web3,admin cl_type: prysm cl_image: prysm-bn-custom-image:latest vc_image: prysm-vc-custom-image:latest supernode: true count: 3 cl_extra_params: - --subscribe-all-subnets - --verbosity=debug vc_extra_params: - --verbosity=debug network_params: fulu_fork_epoch: 0 gloas_fork_epoch: 2 seconds_per_slot: 6 genesis_delay: 40 additional_services: - dora global_log_level: debug ``` **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [x] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).
When processing an execution payload envelope, the data availability (DA) check previously ran sequentially after consensus verification and EL validation had both completed. This moves the DA check into the same `errgroup` so it runs concurrently with payload verification and EL `newPayload` validation. - The DA check only runs when the latest bid carries blob KZG commitments (unchanged behavior). - Uses the group context (`gCtx`) so a failure in any of the three cancels the others. This enables ethereum/beacon-APIs#588 to emit `execution_payload_available`
**What type of PR is this?** > Feature **What does this PR do? Why is it needed?** Adds event emission for `execution_payload` as per ethereum/beacon-APIs#588. Refactors `ReceiveExecutionPayloadEnvelope` by decoupling EL validation from signature verification+DA check to satisfy the event emission timing for `execution_payload_available`. **Which issues(s) does this PR fix?** N/A **Other notes for review** - Renames the existing struct names clearly to indicate whether it is for `execution_payload` or `execution_payload_available`. **Testing** Kurtosis config file: ```yaml participants: - el_type: ethrex el_image: ethpandaops/ethrex:glamsterdam-devnet-4 el_extra_params: - --http.api=eth,net,web3,admin cl_type: prysm cl_image: prysm-bn-custom-image:latest vc_image: prysm-vc-custom-image:latest supernode: true count: 3 cl_extra_params: - --subscribe-all-subnets - --verbosity=debug vc_extra_params: - --verbosity=debug network_params: fulu_fork_epoch: 0 gloas_fork_epoch: 2 seconds_per_slot: 6 genesis_delay: 40 additional_services: - dora global_log_level: debug ``` You can receive **both** events with this command: ```bash ➜ prysm git:(feat/execution-payload-event) curl -X 'GET' \ 'http://127.0.0.1:32813/eth/v1/events?topics=execution_payload&topics=execution_payload_available' \ -H 'accept: text/event-stream' ``` Result: ``` event: execution_payload_available data: {"slot":"64","block_root":"0x0ef955bd61d0e402bc71d6b97f223fa9377683dce64561069c408c5c2e0d548d"} event: execution_payload data: {"slot":"64","builder_index":"18446744073709551615","block_hash":"0xbf648d1f316e6d8284ed74c97c4942af1daf052f7517c5fca8b00836151e1d3d","block_root":"0x0ef955bd61d0e402bc71d6b97f223fa9377683dce64561069c408c5c2e0d548d","execution_optimistic":false} event: execution_payload_available data: {"slot":"65","block_root":"0xfec09760c4bd83adcff905cb95b732bfcef7c00f529f5e2471ff34db512fbdbe"} event: execution_payload data: {"slot":"65","builder_index":"18446744073709551615","block_hash":"0x6c327ec9e4de925b28eb5e127fbfae8d6082590199d35423ea95f8f0300c0423","block_root":"0xfec09760c4bd83adcff905cb95b732bfcef7c00f529f5e2471ff34db512fbdbe","execution_optimistic":false} ``` **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [x] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).
This adds
execution_payloadandexecution_payload_gossipto the eventstream.The events mirror the existing
blockandblock_gossipevents.execution_payload_gossipis emitted when an execution payload passes gossip validationexecution_payloadis emitted when an execution payload is successfully importedexecution_payload_availableis emitted when an execution payload and all data are available for payload attestation without verifying the execution payload itselfThese events enable measuring execution payload timings via sidecar software such as contributoor.