flashbots / relay-specs

MEV-Boost Relay API Specs
https://flashbots.github.io/relay-specs
Creative Commons Zero v1.0 Universal
28 stars 12 forks source link

add validator_index to ValidatorsResponseEntry #13

Closed metachris closed 1 year ago

metachris commented 1 year ago

Adding validator_index to the builderGetValidators response: https://flashbots.github.io/relay-specs/#/Builder/getValidators

metachris commented 1 year ago

@jtraglia great question, thanks, I should have added it in the beginning!

There is a PR for the relay that adds a proposerIndex check: https://github.com/flashbots/mev-boost-relay/pull/366

To pass the proposer index around, it's added to the internal data structure, which automatically exposes it in the relay API. (Sidenote: proposerIndex is already coming from the beacon API, but previously we just didn't use it.)

We could choose to not expose it in the JSON encoding, but I don't see a reason for it as it's strictly additive and backwards compatible.

metachris commented 1 year ago

Fwiw, you can see it in action here: https://boost-relay-goerli.flashbots.net/relay/v1/builder/validators