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

Use SSZ encoding for block validation #600

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

avalonche
Copy link
Collaborator

📝 Summary

Uses SSZ to send block validation payloads to the validation node. Instead of JSON RPC, a new HTTP endpoint is needed to post SSZ payloads, implemented like in flashbots/builder#152.

⛱ Motivation and Context

Improve block submission latency at the relay.

📚 References


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@avalonche avalonche requested a review from metachris April 8, 2024 19:23
}

httpReq.Header.Add("Content-Type", "application/octet-stream")
httpReq.Header.Add("Eth-Consensus-Version", strings.ToLower(req.Version.String()))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

allow future forks to reuse the same endpoint instead of a new endpoint incremented by version number, like in the JSON RPC endpoint.

apiDefaultLogTag = os.Getenv("LOG_TAG")
apiDefaultListenAddr = common.GetEnv("LISTEN_ADDR", "localhost:9062")
apiDefaultBlockSim = common.GetEnv("BLOCKSIM_URI", "http://localhost:8545")
apiDefaultBlockSimHTTP = common.GetEnv("BLOCKSIM_HTTP_URI", "http://localhost:28546")
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add comments to the two BLOCKSIM_URI to clarify what they are used for

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.

2 participants