remove BlindedExecutionPayloadEnvelope - #624
Conversation
eserilev
left a comment
There was a problem hiding this comment.
Seems to be a nice simplification. Blobs were the real bottleneck here, blinding the payload was probably overkill
potuz
left a comment
There was a problem hiding this comment.
Haven't read anything but I do approve the notion of avoid sending the blob data but keeping the payload there to avoid the existence of a blinded object. Blob data is already logically separated in our code base and it makes sense to keep it so here. But blinding the payload is unnecessary extra complexity.
| description: "The active consensus version to which the execution payload envelope being submitted belongs." | ||
| - in: header | ||
| name: Eth-Execution-Payload-Blinded | ||
| name: Eth-Blob-Data-Included |
There was a problem hiding this comment.
we can nit pick the header name, that was the best name I could come up with
There was a problem hiding this comment.
Eth-Contains-Blob-Data ? Eth-Includes-Blob-Data? Eth-With-Blob-Data?
There was a problem hiding this comment.
we do have Eth-Execution-Payload-Included already, so I do prefer the -Included suffix to at least keep consistency between those two headers, but appreciate the suggestions
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| "503": |
There was a problem hiding this comment.
not really related, but this PR has some follow ups for #580, so might as well include that, at least in our implementation we return 503 if node is syncing, and I couldn't come up with a good reason not to do that, we do the same in publishBlockV2 which has the 503 documented on the spec side
beacon-APIs/apis/beacon/blocks/blocks.v2.yaml
Lines 82 to 83 in 4f6a0a7
There was a problem hiding this comment.
What if the beacon node mistakenly thinks it's syncing, like we saw happen during the Holesky incident non-finality when very few blocks were being produced? Should the BN refuse a perfectly valid request to publish a payload envelope?
There was a problem hiding this comment.
this is a bit tricky, the problem is that while the node is syncing it might not be able to validate the payload envelope easily, or have a bad view of the network state since it's not subscribed to gossip usually, so equivocation checks may not be possible
but I see what you are saying, this has been mostly addressed on the beacon node side to be able to configure this, eg. there is a flag in lodestar with which I can force it to build on very old heads. there is a trade-off there, but those scenario are being considered as part of the hardening efforts already
curious about other implementations and whether or not they return 503 currently
| required: false | ||
| required: true | ||
| description: | | ||
| Controls whether the execution payload envelope and blobs are included in the response | ||
| when self-building (using local execution payload). | ||
|
|
||
| When `true` (default), the response includes the full block contents: beacon block, | ||
| When `true`, the response includes the full block contents: beacon block, |
There was a problem hiding this comment.
two reasons for changing this
- (1) I do not like optional parameters in general
- (2) I want to de-opinionate the spec about what should be the default
eg. for (2), in lodestar we look at how many beacon node(s) are connected and if it's > 1, then we default to stateless, otherwise stateful, and allow to override via separate cli flag. All of this is configured on the vc side though, so making this parameter optional would mean the bn would have to decide if omitted, but that's not easily possible since the bn has no good view on whether or not other bns are connected to the vc that is requesting to prodcue a block
| responses so clients can deserialize returned JSON or SSZ data to the correct object, | ||
| and sent in requests on endpoints that accept either blinded or full forms so the | ||
| server can select the correct request schema. | ||
| description: Required in response so client can deserialize returned json or ssz data to the correct object. |
There was a problem hiding this comment.
this just reverts back to pre #580 description
james-prysm
left a comment
There was a problem hiding this comment.
added a small list of suggestions for renames mostly nits
eth2353
left a comment
There was a problem hiding this comment.
Simplifying this seems like a good idea to me too, the main worry was about passing around the much larger blob data which is still addressed 👍
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| "503": |
There was a problem hiding this comment.
What if the beacon node mistakenly thinks it's syncing, like we saw happen during the Holesky incident non-finality when very few blocks were being produced? Should the BN refuse a perfectly valid request to publish a payload envelope?
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** reverts the blinded envelop introduced in OffchainLabs#16943 based on discussion and spec change on beacon api specs. kurtosis test ``` participants: - el_type: ethrex el_image: ethpandaops/ethrex:glamsterdam-devnet-5 el_extra_params: - --http.api=eth,net,web3,admin cl_type: prysm cl_image: gcr.io/offchainlabs/prysm/beacon-chain:latest vc_image: gcr.io/offchainlabs/prysm/validator:latest supernode: true cl_extra_params: - --verbosity=debug vc_extra_params: - --verbosity=debug count: 4 network_params: fulu_fork_epoch: 0 gloas_fork_epoch: 1 seconds_per_slot: 6 genesis_delay: 30 additional_services: - dora - tx_fuzz global_log_level: debug ``` **Which issue(s) does this PR fix?** implements ethereum/beacon-APIs#624 **Other notes for review** **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).
Part of #8828 for the stateful path. Aligns `produceBlockV4` and `POST /eth/v1/beacon/execution_payload_envelopes` with beacon-APIs [#580](ethereum/beacon-APIs#580) and [#624](ethereum/beacon-APIs#624). - Request stateful block production with required `include_payload=false` - Submit `SignedExecutionPayloadEnvelope` with required `Eth-Consensus-Version` and `Eth-Blob-Data-Included: false` headers - Support `broadcast_validation` (`gossip`, `consensus`, `consensus_and_equivocation`) - Return `202` when the envelope is broadcast but not fully imported Co-Authored-By: shane-moore <skm1790@gmail.com>
…as block production (#9595) - per ethereum/beacon-APIs#624 - validator client defaults to the stateless flow if multiple beacon nodes are configured - add `--payloadLocal` flag to configure behavior stateless vs. stateful - `produceBlockV4` now respects `builder_selection` and `builder_boost_factor` - post-gloas the validator client defaults to the `default` builder selection strategy (uses in-protocol p2p bids and local block, selecting by value), explicit `--builder.selection` config is still honored - implement `broadcast_validation` for publishing execution payload envelopes (except `equivocation` checks) - extend oapi spec test framework to support `{schema: type: boolean}` in query params and request headers - remove `builderonly` builder selection option, it's a safety concern and adds unnecessary complexity
While looking at the implementation of #580 I realized using a
BlindedExecutionPayloadEnvelopeadds quite some complexity and I don't think it's warranted to add it to the specmiddleware would all have to support this
BlindedExecutionPayloadEnvelope, the slot was still a top-level field but we moved it topayload.slot_numberso it's not part of the blinded object anymoreThere is probably more, I stopped the implementation when I realized using a blinded object was a bad idea, as it also just optimizes not having to send
transactionsandblock_access_listbetween VC<>BN, everything else in the envelope is a few hundred bytes. While in theory, this seems like the ideal way to do it from a performance perspective (you could even just send the root), I don't think it makes sense as it's rather a micro optimization compared to not sending around the blobs and proofs, which this PR still retains, and previous concerns from #519 are still being addressed in gloas.Note: This PR includes several smaller follow-ups to #580 that are opinionated, please take a look at my comments below with further rationale, I also just polished a few descriptions here and there, shouldn't be too controversial