{"id":17528482,"url":"https://github.com/begmaroman/beaconspot","last_synced_at":"2025-04-23T18:22:46.271Z","repository":{"id":57567206,"uuid":"340612575","full_name":"begmaroman/beaconspot","owner":"begmaroman","description":"Ethereum 2.0 multi Beacon Chain nodes client that works with multiple Beacon Chain implementations such as Prysm, Lighthouse, Teku, etc.","archived":false,"fork":false,"pushed_at":"2021-09-04T06:39:47.000Z","size":381,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T02:21:49.703Z","etag":null,"topics":["beacon-chain","beaconspot","eth2","eth2-beacon-chain","eth2-clients","ethereum","ethereum-blockchain","ethereum2","lighthouse","nimbus","prysm","teku","validator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/begmaroman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T09:19:50.000Z","updated_at":"2024-04-28T03:26:45.000Z","dependencies_parsed_at":"2022-09-15T05:00:49.864Z","dependency_job_id":null,"html_url":"https://github.com/begmaroman/beaconspot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begmaroman%2Fbeaconspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begmaroman%2Fbeaconspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begmaroman%2Fbeaconspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begmaroman%2Fbeaconspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/begmaroman","download_url":"https://codeload.github.com/begmaroman/beaconspot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250488023,"owners_count":21438705,"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":["beacon-chain","beaconspot","eth2","eth2-beacon-chain","eth2-clients","ethereum","ethereum-blockchain","ethereum2","lighthouse","nimbus","prysm","teku","validator"],"created_at":"2024-10-20T15:43:51.202Z","updated_at":"2025-04-23T18:22:46.246Z","avatar_url":"https://github.com/begmaroman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeaconSpot\n\nEthereum 2.0 multi-Beacon-Chain-node validator client written in Go.\n\nThis is the service to communicate with multiple different Beacon Chain nodes such as [Prysm](https://github.com/prysmaticlabs/prysm), [Lighthouse](https://github.com/sigp/lighthouse), etc. \n\nThere are two transports of the BeaconSpot's API: [RPC](./proto/beaconspot/beaconspot.proto) and HTTP (*in development*).\n\nThe purposes of creation of the service are:\n- Aggregate API of all Beacon Chain implementations to provide one common API so there is no needed to develop API clients for each of the Beacon Chain implementations.\n- Improve response time during ETH2 validation process. Meaning a response from faster Beacon Node will be returned.\nFor instance, if Prysm node takes 1 second to get attestation data, and Lighthouse one takes 2 seconds, the response from Prysm node will be returned.\nMultiple Beacon Chain nodes of one type could be configured as well.\n\n## How does it work\n\nService supports multiple clients for multiple Beacon Node implementations. \n\nFor instance, BeaconSpot can be configured to support 2 Prysm Beacon Nodes, 3 LightHouse Beacon Nodes, 2 Tekus, and 1 Nimbus.\n\nAll incoming requests to the BeaconSpot will be translated and sent to each of the configured nodes. \nThe first response from one of the nodes will be returned, so if one of the nodes responds too slow, other node will respond faster so this response will be returned.\nService waits for the response from ALL nodes only for endpoints to submits something to the blockchain such as submitting attestation.\n\nAll needed configuration should be provided via environmental variables.\n\n## Install\n\nFirst, BeaconSpot server should be launched. This step requires running Beacon Chain nodes such as Prysm, Lighthouse, etc.\n\n#### Docker\n\nThis is the example of the command how to run BeaconSpot in Docker container:\n\n```bash\ndocker run \\\n-p 5000:5000 \\\n-e BC_PRYSM_ADDRS=http://lighthouse-address-1:5052,http://lighthouse-address-2:5052 \\\n-e BC_PRYSM_ADDRS=prysm-address-1:4000 \\\nbegmaroman/bea\nconspot:latest\n```\n\nExample of docker-compose definition:\n\n```yaml\nversion: '3.5'\n\nservices:\n\n  beaconspot:\n    image: begmaroman/beaconspot:latest\n    ports:\n      - \"5000:5000\"\n    environment:\n      BC_LIGHTHOUSE_ADDRS: \"http://lighthouse-address-1:5052,http://lighthouse-address-2:5052\"\n      BC_PRYSM_ADDRS: \"prysm-address-1:4000\"\n    restart: always\n```\n\n\n```bash\ndocker-compose up beaconspot\n```\n\n#### Source\n\nOnce there is running BeaconSpot service, the code should be prepared to use a client for the service.\nBeaconSpot is a standard Go module which can be installed with:\n\n```bash\ngo get github.com/begmaroman/beaconspot\n```\n\nExample how to use BeaconSpot gRPC client\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"google.golang.org/grpc\"\n\n\tbeaconspotproto \"github.com/begmaroman/beaconspot/proto/beaconspot\"\n)\n\nfunc main() {\n\t// Open gRPC connection with BeaconSpot instance\n\tconn, err := grpc.Dial(\"beacon-spot:5000\", grpc.WithInsecure())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Create BeaconSpot client for gRPC transport\n\tbeaconSpotClient := beaconspotproto.NewBeaconSpotServiceClient(conn)\n\n\t// Send health request to make sure it works well\n\t_, err = beaconSpotClient.Health(context.Background(), \u0026empty.Empty{})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n## Inspired by\n\n- [Ethereum foundation](https://ethereum.org/en/eth2/)\n- [Prysm](https://github.com/prysmaticlabs/prysm)\n- [Lighthouse](https://github.com/sigp/lighthouse)\n\n## Tech stack\n\n- [gRPC](https://grpc.io/) and [protocol buffer](https://developers.google.com/protocol-buffers)\n- [Swagger (OpenAPI)](https://swagger.io/)\n- [GoLang](https://golang.org/)\n- [Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/)\n\n## Contribute\n\nContributions welcome. Please check out the [issues](https://github.com/begmaroman/beaconspot/issues).\nYou can also create your own issues with bugs or features.\n\n## TODO\n\n- Add more tests\n- ~~Support Pryms client~~\n- ~~Support Lighthouse client~~\n- Support Teku client\n- Support Nimbus client\n\n## License\n\n[Apache-2.0](./LICENSE) © 2020\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegmaroman%2Fbeaconspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbegmaroman%2Fbeaconspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegmaroman%2Fbeaconspot/lists"}