Skip to content

POC for serving proofs for finalised Ethereum Beacon states

License

Notifications You must be signed in to change notification settings

silentFred/ethereum-pudding

Repository files navigation

Ethereum Pudding 🍮

Ethereum Pudding is a proof-of-concept service to download beacon states, generate proofs and pre-emptively cache proofs for quick access. Pudding is build with Rust, Docker Compose, and Redis.

Features

  • Download cryptographic proofs for finalised beacon states.
  • Pre-emptively download finalised states, generate and cache proofs in the background.
  • Dockerized setup for easy deployment and testing.

Prerequisites

Ensure you have the following installed:

Running the Project

To run the project locally, use Docker Compose:

docker-compose up

Note: it might take some time for lodestar to sync a finalised state and for pudding to then generate and cache the first proof. You can check the logs to see the progress.

API Usage

Once the project is running, you can access the API to generate and retrieve proofs.

Endpoint

GET /proof/state

Query Parameters

state_id: The ID of the state (or head) you want to retrieve the proof for. path: The path within the state for which you need the proof. Currently, only finalized_checkpoint,root is pre-cached. If you have common paths you need proofs for, please open an issue or submit a pull request.

Example Request

curl "http://localhost:9000/proof/state?state_id=8865728&path=finalized_checkpoint,root"

Response

{
  "state_id": "8865728",
  "path": "finalized_checkpoint,root",
  "proof": "base64_encoded_proof_data"
}

Contributing

I'm learning how to build Rust projects, so any feedback is appreciated. Contributions are welcome too so please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE-MIT file for details.

About

POC for serving proofs for finalised Ethereum Beacon states

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published