Giter VIP home page Giter VIP logo

kzg-ceremony-sequencer's Introduction

KZG Ceremony Rest API

lines of code dependency status codecov CI

This implements KZG Ceremony Specification.

The latest build is available as a container on ghcr.io/ethereum/kzg-ceremony-sequencer:

docker run ghcr.io/ethereum/kzg-ceremony-sequencer:latest

Setup

Generate keypair for signing

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out private.key
openssl rsa -in private.key -pubout -out publickey.pem

Build, lint, test, run

cargo fmt && cargo clippy --all-targets --all-features && cargo build --all-targets --all-features && cargo test --all-targets --all-features && cargo run -- -vvv

Database

  1. Run cargo install sqlx-cli
  2. Set DATABASE_URL=sqlite:/path/to/sequencer.db
  3. Run sqlx database create
  4. Migrations will be run automatically on server startup

Requirements

  • OAuth Client App : Currently we require users to sign in with either Ethereum or Github, which requires an OAuth client application that the user gives read access to their profile to.

  • Keypair generation algorithm : The sequencer signs JWTs that can be verified by external parties. Openssl is recommended.

Live URL

  • kzg-ceremony-poc.fly.dev
  • You can use the endpoint /hello_world to check that the server is running

Registering for Sign-in-with-Ethereum

See the documentation here.

To register, use the REST API:

curl -X POST https://oidc.signinwithethereum.org/register \
   -H 'Content-Type: application/json' \
   -d '{"redirect_uris": ["http://127.0.0.1:3000/auth/callback/eth"]}'
{
  "client_id": "9b49de48-d198-47e7-afff-7ee26cbcbc95",
  "client_secret": "...",
  "registration_access_token": "....",
  "registration_client_uri": "https://oidc.signinwithethereum.org/client/9b49de48-d198-47e7-afff-7ee26cbcbc95",
  "redirect_uris": [
    "http://127.0.0.1:3000/auth/callback/eth"
  ]
}
fly secrets set ETH_RPC_URL="..."
fly secrets set ETH_CLIENT_ID="..."
fly secrets set ETH_CLIENT_SECRET="..."
fly secrets set GH_CLIENT_ID="..."
fly secrets set GH_CLIENT_SECRET="..."
fly volumes create kzg_ceremony_sequencer_dev_data --size 5

kzg-ceremony-sequencer's People

Contributors

recmo avatar gswirski avatar kustosz avatar kevaundray avatar tkmct avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.