Skip to content
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

Allow disabling the relay public key check #499

Closed
parithosh opened this issue Apr 25, 2023 · 10 comments
Closed

Allow disabling the relay public key check #499

parithosh opened this issue Apr 25, 2023 · 10 comments

Comments

@parithosh
Copy link

It would be useful for pure testing purposes to allow for disabling the relay public key check. This would allow us to setup the entire infra in one go rather than setting up the relay, fetching the public key and then configuring the mev-boost instance.

@ralexstokes
Copy link
Collaborator

ralexstokes commented Apr 25, 2023

I think this is what you are looking for? https://github.com/flashbots/mev-boost/blob/main/cli/main.go#L62

edit: or do you mean something around the wellformedness of the public key in the relay's URL?

@parithosh
Copy link
Author

parithosh commented Apr 25, 2023

afaik that's a flag to check for the wellformedness public key, i'd like to pass a flag that lets me provide a relay endpoint without a public key at all. i.e, --relays 192.168.1.1:58100 instead of --relays pubkey@IP:port

@ralexstokes
Copy link
Collaborator

I think several things assume there is always a public key for the relay:

require non-empty pubkey: https://github.com/flashbots/mev-boost/blob/main/server/relay_entry.go#L44

verify pubkey in bid matches relay: https://github.com/flashbots/mev-boost/blob/main/server/service.go#L361

check relay signature over bid: https://github.com/flashbots/mev-boost/blob/main/server/service.go#L367

Can you just have a default public key instead?

@parithosh
Copy link
Author

Is it possible for me to tell the relay to use a priv/pubkey i've defined? Or what did you mean by a default public key? (That'd also solve the problem, we've got no issues with using a known value)

@ralexstokes
Copy link
Collaborator

im not as familiar with the relay ops yet but it looks like you can just provide a BLS secret key, look at the docs to run a relay here: https://github.com/flashbots/mev-boost-relay#running-postgres-redis-and-memcached

so if you can just hardcode a secret key (even just the one in the linked docs), you'll have a known public key you can use in the config

@metachris
Copy link
Collaborator

I think the easiest would be to have an environment variable that simply skips the signature check for bids.

@parithosh
Copy link
Author

parithosh commented May 3, 2023

Yea a skip check variable would be amazing! That's also allow us to use the mock builder from Mario/etc without having to add the functionality of the predefined secret key in there. I can look into how that would work on the mock relay in the mean time.

@metachris
Copy link
Collaborator

added a PR: #504

@metachris
Copy link
Collaborator

The PR is now merged into the main branch, and you can skip relay signature checks by using the env variable SKIP_RELAY_SIGNATURE_CHECK=1.

@parithosh
Copy link
Author

Thank you very much! I'll close this issue in that case :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants