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

feat: Add cvm reverse proxy client and server side #19

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MoeMahhouk
Copy link
Collaborator

No description provided.

@MoeMahhouk
Copy link
Collaborator Author

This is just a draft and not final way.
I am thinking to provide the recipes to build the binaries and have different recipes in the meta-evm layer for the init scripts where we start them because I am not sure if it is relevant for the base TDX images to start those two server and client side CVM reverse proxies. But we can discuss this in the team together.

DAEMON=/usr/bin/proxy-server
NAME=cvm-reverse-proxy-server
DESC="CVM Reverse Proxy Server"
DAEMON_ARGS="--listen-addr=localhost:7946 --target-addr=http://localhost:7936 --server-attestation-type azure-tdx"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that one is for public access, proxying to orderflow-proxy?

if so, then it should:

  1. listen on port 7936
  2. proxy to localhost:14727

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have a separate cvm server proxy for the orderflow-proxy and not have them built in a single one directly?
are there any other purposes for the cvm-reverse-proxy-server beside forwarding to the orderflow proxy?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • one receives a request from outside and forwards it to the local orderflow-proxy service
  • the other receives a request from orderflow-proxy or rbuilder, and forwards it to BuilderHub

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant only about the orderflow proxy and cvm-reverse-proxy server. Why separate them instead of have them both in one?

INITSCRIPT_NAME = "cvm-reverse-proxy-client-init"
INITSCRIPT_PARAMS = "defaults 85"

GO_IMPORT = "github.com/flashbots/cvm-reverse-proxy"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the version pinned?

Copy link
Collaborator Author

@MoeMahhouk MoeMahhouk Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently a dev instance which is taking the up-to-date version of the cvm-reverse-proxy.
See line 14, SRCREV = "${AUTOREV}".
If we have a fixed version, we should change SRCREV to point to that exact tag/commit hash.

The AUTOREV placeholder takes automatically the latest commit of the repo and builds it.

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

Successfully merging this pull request may close these issues.

3 participants