Skip to content

Ethereum's Power of Tau client CLI implementation written in Java

License

Notifications You must be signed in to change notification settings

StefanBratanov/chotto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chotto

🕯️🕯️🕯️ THE KZG CEREMONY IS CLOSED. THANKS FOR CONTRIBUTING. 🕯️🕯️🕯️ https://twitter.com/CarlBeek/status/1694566774375698789

GitHub license build Quality Gate Status CodeFactor codecov GitHub release (latest by date)

Chotto can be used to participate in the KZG Ceremony which will bring EIP-4844 to life. It is an Ethereum's Powers of Tau (PoT) client CLI implementation written in Java. It follows the spec defined in the KZG ceremony specs.

🕯️🕯️🕯️ The KZG Ceremony is live and the url of the sequencer is https://seq.ceremony.ethereum.org. Check the Install Instructions and Usage to see how to use Chotto to contribute. After contributing, you can check your contribution here. 🕯️🕯️🕯️

Install Instructions

Install Prerequisites

  • Java 11+

Binary Releases

Binary releases are available from the releases page.

Once downloaded and unzipped, executables will be available in the bin/ folder.

Manual Build

You can also manually build the code:

git clone https://github.com/StefanBratanov/chotto.git
cd chotto
./gradlew installDist

This will install ready to use executables in the build/install/chotto/bin folder.

Generating randomness

Generating randomness is an important part of the KZG Ceremony. Each participant needs to generate 4 different random secrets. The user should not have a knowledge of these generated values and also all secrets should be wiped out from memory after the contribution is complete. The way each random secret is generated in Chotto is as follows:

  • User provides an entropy of at least 6 characters when starting the client.
  • An IKM (input keying material) with 256 bytes is initialised with the entropy bytes. (truncated or padded with zeros)
  • Half or more bytes (128 or 256 minus the length of the entropy) are replaced by random bytes. ( based on java.security.SecureRandom)
  • The IKM is passed to a BLS KeyGen function which ultimately generates the secret.

The secrets will only live in the Java process, so won't be exposed when the browser is opened for logging in and signing the contribution. After the Java process is terminated, all secrets will be wiped out from memory.

Usage

Required arguments:

  • sequencer

See CLI Arguments for all available arguments.

Sample Usage

Note: For Windows, use the chotto.bat executable.

Authenticate with Ethereum

./chotto --sequencer=https://seq.ceremony.ethereum.org/

Authenticate with GitHub

./chotto --sequencer=https://seq.ceremony.ethereum.org/ --authentication=github

Run against a local sequencer

./chotto --sequencer=http://localhost:3000/

You can start a local sequencer by following the setup instructions at KZG Ceremony Rest API.

CLI arguments

$ ./chotto --help
  _____ _           _   _
 / ____| |         | | | |
| |    | |__   ___ | |_| |_ ___
| |    | '_ \ / _ \| __| __/ _ \
| |____| | | | (_) | |_| || (_) |
 \_____|_| |_|\___/ \__|\__\___/
Usage: chotto [-hV] [--bls-sign-sub-contributions] [--ecdsa-sign-contribution]
              [--validate-receipt] [--verify-transcript]
              [--authentication=<provider>]
              [--callback-endpoint=<callbackEndpoint>]
              [--contribution-attempt-period=<contributionAttemptPeriod>]
              [--output-directory=<outputDirectory>] --sequencer=<sequencer>
              [--server-port=<serverPort>]
Ethereum's Power of Tau client implementation written in Java
      --authentication=<provider>
                            The authentication provider which will be used for
                              logging in. Valid values: Ethereum, Github
                              Default: Ethereum
      --bls-sign-sub-contributions
                            Sign your sub-contributions using your identity.
                              Doing so is RECOMMENDED.
                              Default: true
      --callback-endpoint=<callbackEndpoint>
                            The URL of the server which is started by this
                              process. Specify this option ONLY if you decide
                              to login and sign from a browser on a different
                              computer. Make sure the URL is accessible from
                              that browser.
      --contribution-attempt-period=<contributionAttemptPeriod>
                            How often (in seconds) to attempt contribution once
                              authenticated
                              Default: 30
      --ecdsa-sign-contribution
                            Sign your contribution using the Ethereum address
                              you logged in with. Doing so is RECOMMENDED. This
                              value is only applicable when you have
                              authenticated with Ethereum.
                              Default: true
  -h, --help                Show this help message and exit.
      --output-directory=<outputDirectory>
                            The directory where the outputs of the ceremony
                              will be saved
                              Default: <user.home>\kzg-ceremony
      --sequencer=<sequencer>
                            The URL of the sequencer which would be used for
                              the ceremony
      --server-port=<serverPort>
                            The port on which to start the local server
                              Default: 8080
  -V, --version             Print version information and exit.
      --validate-receipt    Whether to validate the receipt after contributing
                              against the sequencer transcript or not
                              Default: false
      --verify-transcript   Whether to verify the sequencer transcript at
                              startup or not
                              Default: false