-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
82 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
bin | ||
.vscode | ||
.vscode | ||
config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,86 @@ | ||
# WIP: checkpointz | ||
# Checkpointz | ||
|
||
Name TBA | ||
A beacon chain aware Checkpoint Sync provider. | ||
|
||
A checkpoint-sync provider for Ethereum Beacon nodes. | ||
Checkpointz exists to reduce the operational burden of running a checkpoint sync endpoint. Checkpointz only serves a subset of the [beacon APIs](https://ethereum.github.io/beacon-APIs/#/) that are required for all consensus clients to checkpoint sync. | ||
|
||
### Building and running | ||
> :warning: **Checkpointz is still in heavy development** - use with caution | ||
Adjust the configuration file for your needs. An example can be seen in [example_config.yaml](example_config.yaml) | ||
## Features | ||
- Resource reduction | ||
- Adds HTTP cache-control headers depending on the content | ||
- DOS protection | ||
- Never routes an incoming request directly to an upstream beacon node | ||
- Caches all requests | ||
- Support for multiple upstream beacon nodes | ||
- Only serves a new finalized epoch once 50%+ of upstream beacon nodes agree | ||
- Extensive Prometheus metrics | ||
|
||
## Future features | ||
- Web UI | ||
- Public-facing: shows information about the state of the provider, along with all state roots that the instance is aware of for cross-checking against instances. | ||
- Internal: shows information about the internal instance, health checks, etc. | ||
|
||
```sh | ||
go build -o bin/eth-proxy ./cmd/eth-proxy && ./bin/eth-proxy --config example_config.yaml | ||
## What is checkpoint sync? | ||
Checkpoint sync is an operation that lets fresh beacon nodes jump to the head of the chain by fetching the state from a trusted & synced beacon node. | ||
|
||
More info: https://notes.ethereum.org/sWeLohipS9GdgMugYn9VkQ | ||
## Usage | ||
Checkpointz requires a config file. An example file can be found [here](https://github.com/samcm/checkpointz/blob/master/example_config.yaml). | ||
|
||
``` | ||
Checkpoint sync provider for Ethereum beacon nodes | ||
Usage: | ||
checkpointz [flags] | ||
Flags: | ||
--config string config file (default is config.yaml) (default "config.yaml") | ||
-h, --help help for checkpointz | ||
``` | ||
## Getting Started | ||
|
||
### Docker | ||
Available as a docker image at `samcm/checkpointz` | ||
|
||
**Quick start** | ||
``` | ||
docker run -d -it --name checkpointz -v $HOST_DIR_CHANGE_ME/config.yaml:/opt/exporter/config.yaml -p 9090:9090 -p 5555:5555 -it samcm/checkpointz --config /opt/exporter/config.yaml | ||
``` | ||
|
||
|
||
**Building yourself (requires Go)** | ||
|
||
1. Clone the repo | ||
```sh | ||
go get github.com/samcm/checkpointz | ||
``` | ||
2. Change directories | ||
```sh | ||
cd ./checkpointz | ||
``` | ||
3. Build the binary | ||
```sh | ||
go build -o checkpointz . | ||
``` | ||
4. Run the exporter | ||
```sh | ||
./checkpointz | ||
``` | ||
|
||
## Contributing | ||
|
||
Contributions are greatly appreciated! Pull requests will be reviewed and merged promptly if you're interested in improving the exporter! | ||
|
||
1. Fork the project | ||
2. Create your feature branch: | ||
- `git checkout -b feat/new-metric-profit` | ||
3. Commit your changes: | ||
- `git commit -m 'feat(profit): Export new metric: profit` | ||
4. Push to the branch: | ||
-`git push origin feat/new-metric-profit` | ||
5. Open a pull request | ||
|
||
## Contact | ||
|
||
Sam - [@samcmau](https://twitter.com/samcmau) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters