flashbots / flashbots/mev-boost-relay

[spec proposal] improved API to get validators

Open
#237 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
498
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Context: https://collective.flashbots.net/t/privacy-concerns-with-data-api/568

We'll update the API for getting validators (https://boost-relay.flashbots.net/relay/v1/data/validator_registration?pubkey=) to make it more private, and to allow bulk queries.

Changes:

1. Instead of only providing `pubkey` for the request, it will also require `fee_recipient` (and optionally `gas_limit`). This is to maintain privacy for proposers (you can only query them if you know the fee_recipient).
2. Allow single queries (like currently), as well as bulk queries with POST requests.
3. Return a response only for active proposers (currently the API returns the result if a proposer registered at any time in the past)

Single query:

```
https://boost-relay.flashbots.net/relay/v1/data/validator_registration
?pubkey=
?fee_recipient=
[?gas_limit=]
```

Bulk query:

```json
[
{
"pubkey": "",
"fee_recipient": ""
},
{
"pubkey": "",
"fee_recipient": "",
"gas_limit": ""
}
]
```

Response includes a list of found entries:

```json
[
"",
""
]
```

Possible extensions (please comment if you have a need for that, could be added now or in the future):
1. return not only the pubkey but also `fee_recipient` and `gas_limit` (enable this response format with another query arg?)
2. return not the found entries, but those that are not found (could also be enabled with another query arg).

---

Please comment with any remaining thoughts. Will start implementation soon 🙏

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.