charon

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

Obol Logo

Charon - The Distributed Validator middleware client

This repo contains the source code for the distributed validator client Charon; a HTTP middleware client for Ethereum Staking that enables you to safely run a single validator across a group of independent nodes.

Charon is accompanied by webapp called the Distributed Validator Launchpad, for distributed validator key creation.

Charon is used by Enterprises and DAOs to distribute the responsibility of running Ethereum Validators across a number of different running instances and client implementations.

Example Obol Cluster

A validator deployment that uses the Charon client to hedge client and hardware failure risks

Quickstart

This repo contains the GoLang source code for the middleware, a docker-compose file for deploying the client in a local dev environment, and deployment files for deploying this client to a test cluster. To get started:

# Setup env vars, copy .env.template and then manually enter the correct secrets for the likes of Eth1 nodes etc.
cp .env.template .env

# Local development
make up
Install Githooks

We use pre-commit hooks to ensure that pull requests adhere to a minimum standard and are consistent. To install:

  • Follow installation instructions here
  • Once installed, run pre-commit install in the project's root directory. This will setup the hooks.
  • NOTE: If you don't want to run hooks on every commit, simply disable it by pre-commit uninstall
Compile and Test Locally

First you need to have Go 1.17 installed, then you need to run Go build:

# On mac with homebrew installed
brew install go

# Used for building from source
go build

# Run the charon client
./charon --help
Configuration

In descending order, the Charon client checks the following places for client configuration info:

  • From environment vars beginning with CHARON_, with hyphens substituted for underscores. e.g. CHARON_BEACON_NODE=http://....
  • From the config file specified with the -config-file flag as YAML, e.g. beacon-node: http://...
  • From CLI params, e.g. --beacon-node http://...
Project structure

Charon is written in Go. Notable dependencies:

Release Process

Charon is set up to run a release with Github Actions triggered by a Tag. To tag a commit for release run:

git tag -a v0.1.0 -m "Charon v0.1.0: Getting Started"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
Package app provides the top app-level abstraction and entrypoint for a charon DVC instance.
Package app provides the top app-level abstraction and entrypoint for a charon DVC instance.
errors
Package errors provides errors with structured fields and stack traces.
Package errors provides errors with structured fields and stack traces.
log
Package log provides global logging functions to be used throughout the charon app.
Package log provides global logging functions to be used throughout the charon app.
tracer
Package tracer provides a global OpenTelemetry tracer.
Package tracer provides a global OpenTelemetry tracer.
z
Package z provides an API for structured logging fields by wrapping zap.Field.
Package z provides an API for structured logging fields by wrapping zap.Field.
Package cmd implements Charon's command-line interface.
Package cmd implements Charon's command-line interface.
Package crypto exposes high-level cryptographic functionality.
Package crypto exposes high-level cryptographic functionality.
bls
Package identity stores the ECDSA P2P key and the BLS12-381 DV consensus key.
Package identity stores the ECDSA P2P key and the BLS12-381 DV consensus key.
Package validatorapi defines validator facing API that serves the subset of endpoints related to distributed validation and reverse-proxies the rest to the upstream beacon client.
Package validatorapi defines validator facing API that serves the subset of endpoints related to distributed validation and reverse-proxies the rest to the upstream beacon client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL