Skip to content

Commit

Permalink
chore: small update
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Nov 13, 2023
1 parent a50cc8e commit 909923a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# mevboost relay api

> **Important**
> Work in progress. Many features are not implemented yet.
This crate implements the [PBS Relay API](https://flashbots.github.io/relay-specs/#/) specs in Rust.
You can import this as a crate in your Cargo project, or use the CLI tool to run queries manually.
> This crate implements the [PBS Relay API](https://flashbots.github.io/relay-specs/#/) specs in Rust.
> You can import this in your Cargo project, or use the CLI tool to run queries manually.
## Use as a library

Expand Down Expand Up @@ -41,4 +38,4 @@ MIT.

## Contributions

Contributions are welcome and encouraged. Just open an issue on Github or submit a PR.
Contributions are welcome and encouraged. Please open an issue or submit a pull request.
16 changes: 9 additions & 7 deletions crates/mevboost-relay-api/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
# mevboost-relay-api lib

### List of available relays
## List of available relays

You can find the updated list defined as a constant [here](../mevboost-relay-api/src/constants.rs).

### Available API methods on the `Client`
## Available API methods on the `Client`

#### `get_validators_for_current_and_next_epoch`
### `get_validators_for_current_and_next_epoch`

Relay endpoint: `/relay/v1/builder/validators`.
[Link to the specs](https://flashbots.github.io/relay-specs/#/Builder/getValidators).

Returns all the validators for the current and next epoch for a given relay name.

#### `get_validator_registration`
### `get_validator_registration`

Relay endpoint: `/relay/v1/data/validator_registration`.
[Link to the specs](https://flashbots.github.io/relay-specs/#/Data/getValidatorRegistration).

Returns the validator registration info by the given pubkey and relay name.
Will return an error if the validator is not registered with that relay.

#### `get_validator_registration_on_all_relays`
### `get_validator_registration_on_all_relays`

Convenience method that returns a hashmap of relay name to validator registration info, for the given pubkey.
The returned data means that the validator is registered with the relays in the hashmap and not registered with the rest.

This is a good way to check which relays a validator is registered with.

#### `get_validator_registration_for_all_slots_on_all_relays`
### `get_validator_registration_for_all_slots_on_all_relays`

Convenience method that returns a hashmap of slot number to list of relay names that the associated validator
is registered with for that slot.

This is a good way to check, for the entirety of the next epoch, which relays will be likely to
broadcast the block. If no relays are returned for a slot, it means that that slot is likely to be
broadcast the block. If no relays are returned for a slot, it means that that slot is _likely_ to be
built without MevBoost (aka, a "Vanilla block").

0 comments on commit 909923a

Please sign in to comment.