{"id":20433892,"url":"https://github.com/flashbots/sync-proxy","last_synced_at":"2025-04-08T04:19:50.323Z","repository":{"id":62049989,"uuid":"550801231","full_name":"flashbots/sync-proxy","owner":"flashbots","description":"Proxy from consensus client to block builders ","archived":false,"fork":false,"pushed_at":"2025-03-20T14:30:32.000Z","size":456,"stargazers_count":34,"open_issues_count":2,"forks_count":5,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-24T09:39:30.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flashbots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-13T10:53:31.000Z","updated_at":"2025-02-04T07:37:28.000Z","dependencies_parsed_at":"2025-02-17T19:33:53.165Z","dependency_job_id":"1e888aea-461e-4f42-b0c5-7c30dea50fc0","html_url":"https://github.com/flashbots/sync-proxy","commit_stats":{"total_commits":46,"total_committers":4,"mean_commits":11.5,"dds":"0.10869565217391308","last_synced_commit":"d3a04824f79bb4a5392d5b58428defb6076a1268"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsync-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsync-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsync-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsync-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flashbots","download_url":"https://codeload.github.com/flashbots/sync-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773867,"owners_count":20993655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T08:22:11.202Z","updated_at":"2025-04-08T04:19:50.298Z","avatar_url":"https://github.com/flashbots.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#\n\n[![Goreport status](https://goreportcard.com/badge/github.com/flashbots/sync-proxy)](https://goreportcard.com/report/github.com/flashbots/sync-proxy)\n[![Test status](https://github.com/flashbots/sync-proxy/workflows/Checks/badge.svg)](https://github.com/flashbots/sync-proxy/actions?query=workflow%3A%22Checks%22)\n\nFlashbots proxy to allow redundant execution client (EL) state sync post merge.\n\n* Runs a proxy server that proxies requests from a beacon node (BN) to multiple other execution clients\n* Can drive EL sync from multiple BNs for redundancy\n\n## Getting Started\n\n* Run a BN with the execution endpoint pointing to the proxy (default is `localhost:25590`). \n* Start the proxy with a flag specifying one or multiple EL endpoints (make sure to point to the authenticated port). \n\n```bash\ngit clone https://github.com/flashbots/sync-proxy.git\ncd sync-proxy\nmake build\n\n# Show the help\n./sync-proxy -help\n```\n\nTo run with multiple EL endpoins:\n\n```\n./sync-proxy -builders=\"localhost:8551,localhost:8552\"\n```\n\n### Nginx\n\nThe sync proxy can also be used with nginx, with requests proxied from the beacon node to a local execution client and mirrored to multiple sync proxies.\n\n![nginx setup overview](docs/nginx-setup.png)\n\nAn example nginx config like this can be run with the sync proxy:\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003e/etc/nginx/conf.d/sync_proxy.conf\u003c/code\u003e\u003c/summary\u003e\n\n```ini\nserver {\n        listen 8552;\n        listen [::]:8552;\n\n        server_name _;\n\n        location / {\n                mirror /sync_proxy_1;\n                mirror /sync_proxy_2;\n                mirror /sync_proxy_3;\n\n                proxy_pass http://localhost:8551;\n                proxy_set_header X-Real-IP $remote_addr;\n                proxy_set_header Host $host;\n                proxy_set_header Referer $http_referer;\n                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        }\n\n        #\n        # execution nodes\n        #\n        location = /sync_proxy_1 {\n                internal;\n                proxy_pass http://sync-proxy-1.local:8552$request_uri;\n                proxy_connect_timeout 100ms;\n                proxy_read_timeout 100ms;\n        }\n\n        location = /sync_proxy_2 {\n                internal;\n                proxy_pass http://sync-proxy-2.local:8552$request_uri;\n                proxy_connect_timeout 100ms;\n                proxy_read_timeout 100ms;\n        }\n\n        location = /sync_proxy_3 {\n                internal;\n                proxy_pass http://sync-proxy-3.local:8552$request_uri;\n                proxy_connect_timeout 100ms;\n                proxy_read_timeout 100ms;\n        }\n```\n\u003c/details\u003e\n\n## Caveats\n\nThe sync proxy attempts to sync to the beacon node with the highest timestamp in the `engine_forkchoiceUpdated` and `engine_newPayload` calls and forwards to the execution clients.\n\nThe sync proxy also attempts to identify the best beacon node based on the originating host of the request. If you are using the same host for multiple beacon nodes to sync the EL, the sync proxy won't be able to distinguish between the beacon nodes and will proxy all requests from the same host to the configured ELs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflashbots%2Fsync-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflashbots%2Fsync-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflashbots%2Fsync-proxy/lists"}