-
Notifications
You must be signed in to change notification settings - Fork 5
MEV SIP (v2) #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
MEV SIP (v2) #25
Changes from 17 commits
6fcc45e
9b5bd2a
00f1cd0
bf06ad9
ac863a8
b01c288
f53811a
7fe7735
c96fad8
9499615
ba47a5a
ce6003a
d6bb03d
e4fbdfc
f555751
03b53d1
c415c11
27a0063
ae3eb60
c37e351
93278c7
01bfe8e
6372076
48b2e64
d2fd60c
405b15e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| | Author | Title | Category | Status | | ||
| | ------------------------- | ------------------------------- | -------- | ------------------- | | ||
| | Moshe Revah (@moshe-blox) | Support externally built blocks | Core | open-for-discussion | | ||
|
|
||
| ## Summary | ||
|
|
||
| Support the production and proposal of blocks built by external entities, allowing operators to access blocks from a marketplace of builders such as [Flashbots](https://boost-relay.flashbots.net/). | ||
|
|
||
| ## Rational & Design Goals | ||
|
|
||
| Block building is a computationally intensive task, and even more so when blockspace utilization and profit maximization are in mind. Additionally, many of the more profitable transactions, so-called MEV, are private and only accessible to validators through external block builders. | ||
|
|
||
| Currently, operators wishing to offer competitive returns must be sophisticated block builders with private transaction flows. This SIP aims to change that by allowing them to register with and propose blocks from external builders who comply to [ethereum/builder-specs](https://github.com/ethereum/builder-specs). | ||
|
|
||
| ## Specification | ||
|
|
||
| ### Configuration | ||
|
|
||
| Operators who wish to propose blinded blocks must configure their SSV node to do so, otherwise it would only propose standard blocks and reject QBFT proposals containing blinded blocks. | ||
|
|
||
| Therefore, validators should solely select operators with matching configuration, otherwise consensus might be unreachable. | ||
moshe-blox marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Validator registration | ||
|
|
||
| Builders require validators to publish a [`builder-specs/SignedValidatorRegistration`](https://ethereum.github.io/builder-specs/#model-SignedValidatorRegistration) to set their `fee_recipient` and `gas_limit` preferences. | ||
|
||
|
|
||
| When building a block for a validator, builders refer only to the registration with the highest timestamp. | ||
|
|
||
| In the wild, some Ethereum validator clients currently publish this message every epoch. | ||
|
|
||
| #### Fee recipients | ||
|
|
||
| Validators may set their preferred `fee_recipient` address by calling `setFeeRecipientAddress` in the `SSVNetwork` contract. Validators may repeat this call as their preference changes over time. | ||
|
||
|
|
||
| #### Signing | ||
|
|
||
| At the start of every slot, operators select their active validators with `ShouldRegisterValidatorAtSlot`, and for those, produce a [`builder-specs/SignedValidatorRegistration`](https://ethereum.github.io/builder-specs/#model-SignedValidatorRegistration) with their preferred `fee_recipient`. | ||
moshe-blox marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```go | ||
| ValidatorRegistrationSlotInterval = 10 * SlotsPerEpoch | ||
|
|
||
| func ShouldRegisterValidatorAtSlot(index phase0.ValidatorIndex, slot phase0.Slot) bool { | ||
| return (index + slot) % ValidatorRegistrationSlotInterval == 0 | ||
alonmuroch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| ``` | ||
|
|
||
| #### Publishing | ||
|
|
||
| Every epoch, operators should publish the most recent successfully signed registration for their entire validator set. | ||
|
|
||
| This SIP suggests to spread registrations between slots. For example, at every slot, operators may publish only for a fraction of their validators (corresponding to `1/SlotsPerEpoch`), ensuring a more evenly distributed load on the Beacon node and builder(s). | ||
nkryuchkov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| > Note: Since relays/builders can have some delay with registrations, producing a blinded block before and shortly thereafter publishing the first registration may result in either: | ||
| > | ||
| > 1. Builder is unfamiliar with the validator yet and doesn't build a block, and Beacon node falls back to locally-built block from it's execution layer. | ||
| > 2. Builder doesn't reward the validator's `fee_recipient` because it isn't aware of it yet. | ||
| > 3. Builder rewards a potentially different `fee_recipient` from the validator's latest registration (such as a registration prior to onboarding to SSV.) | ||
|
|
||
| > Note: Currently, implementation publishes registration differently: right after producing signatures. We're following the performance of that, and will either revise this SIP or the implementation accordingly. | ||
|
|
||
| #### Issue: Gas limits | ||
|
|
||
| Gas limits are set by operators rather than validators, unlike in standard validator clients. | ||
|
|
||
| This SIP proposes to hardcode the gas limit to 30 million (which is the default in Prysm and Lighthouse), but recommends to keep watching it and modify if necessary. | ||
|
||
|
|
||
| ### Blinded block proposals | ||
|
|
||
| When a validator has a proposal duty, their operators: | ||
|
|
||
| 1. Produce a `BlindedBeaconBlock` from their Beacon node at [/eth/v1/validator/blinded_blocks](https://ethereum.github.io/beacon-APIs/#/Validator/produceBlindedBlock) | ||
| 2. Reach consensus on and sign the round leader's `BlindedBeaconBlock` | ||
| 3. Submit the `SignedBlindedBeaconBlock` to their Beacon nodes at [/eth/v1/beacon/blinded_blocks](https://ethereum.github.io/beacon-APIs/#/Beacon/publishBlindedBlock) | ||
|
|
||
| Under the hood, each operator's Beacon node would attempt to unblind the block from it's connected builder(s) by revealing the signature to them, which would fail if they haven't built or don't know of this block. | ||
|
|
||
| Therefore, for unblinding to succeed, operators' Beacon nodes must share the same builder(s) with the round leader's Beacon node. | ||
alonmuroch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Since SSV can't enforce a specific set of builder(s) at the protocol-level, operators would have to reach social consensus on which builder(s) to configure their Beacon nodes with. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens if there is a mix of both ssv operators proposing blinded and non blinded blocks in the same cluster?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently nodes with blinded proposals disabled are not rejecting blinded blocks.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and viceversa? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we discussed it should be strict. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. viceversa should be allowed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lior-blox Also why would some operators oppose to use MEV? I can only think of idealogical reasons or deep mistrust of relays. In this case, I think it is more of the validator's choice and not the operator. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GalRogozinski The operators will use metadata to let the validators If they MEV support and which relays
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to have a writeup somewhere on why we are doing this. This feature may break consensus. Maybe there are good reasons to add the feature despite the risk, but they should be super clear to us!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This discussion can continue here: |
||
|
|
||
| #### Locally-built blinded blocks | ||
|
|
||
| Sometimes, a Beacon node falls back to a locally-built `BlindedBeaconBlock` from it's execution layer, either because it's configured to do so under certain conditions (profitability threshold; chain is unstable) or because the builder(s) are unavailable. | ||
|
|
||
| A locally-built blinded block can only be unblinded by the same Beacon node which built it, which unfortunately means that only the round leader would successfully submit the block, thereby reducing the total network outreach of the proposal down to a single Beacon node. | ||
|
|
||
| We should consider pushing operators to configure their node for less harsh fallback conditions, so that more of their blocks are externally-built and can be successfully submitted by other operators' Beacon nodes. | ||
GalRogozinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #### Blinded block validation | ||
|
|
||
| Nowadays, there's no meaningful validation we can do on blinded blocks, but there's [active discussion](https://github.com/flashbots/mev-boost/issues/99) about requiring builders to attach payment proofs on bids so that they can't cheat and reward themselves instead of the validator's `fee_recipient`. | ||
|
|
||
| Ideally, payment proof validation should be handled by [mev-boost](https://github.com/flashbots/mev-boost), as it already examines the builders' bids, in which case operators would only have to ensure their Beacon nodes are always updated with the latest [`builder-specs/SignedValidatorRegistration`](https://ethereum.github.io/builder-specs/#model-SignedValidatorRegistration). | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this mean if you mix MEV and non MEV operators it doesn't work?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, originally I wanted blinded/non-blinded to be a property operators set in the contract with a cooldown period to make them commit to their claim for at least a week or two.
So for example if an operator switches from non-blinded to blinded in the contract, but also switches it in his node before the cooldown period is over, his blocks would be rejected by other operators.
Cooldown period helps validators rest assured that their operators aren't switching modes rapidly.
Eventually, we didn't go this way, so now rejecting blocks sounds less appealing.
Still, I can think of a few reasons for rejections:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moshe-blox
can you please elaborate on the motivation for cool down period?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GalRogozinski Cooldown period is a commitment between operators to validators. When validators choose a non-blinded operator, they can rest assured that it would not suddenly change it's mind and start proposing blinded blocks. Validators would know of this change a week in advance (or however long the cooldown period is) and can migrate over to other operators before it takes effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the relay/operator case be added to the SIP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chiming in here to mention that beacon API specs has changed since this SIP, the separate API calls to the beacon node about getting a full or blinded block have been deprecated, the new V3 api call will get you a blinded block if your beacon node is connected to MEV relays and possible and the blinded block is more profitable than a local one, otherwise it will get you a local full block.
this means its not straight forward anymore to config the SSV operator node to support or not support MEV, this responsibility is now on the beacon node.