cardano-scaling / alba

Prototype implementation of Approximate Lower Bound Arguments
Apache License 2.0
8 stars 1 forks source link

ALBA

Prototype implementation of Approximate Lower Bound Arguments from the paper published by IOG Research:

Approximate Lower Bound Arguments, Pyrros Chaidos, Prof Aggelos Kiayias, Leonid Reyzin, Anatoliy Zinovyev, May 2024, Eurocrypt'24

[!IMPORTANT] This code is NOT fit for production, it's not been optimised, thoroughly tested, nor audited by competent cryptographers. Its one and only purpose is to help people who are more familiar with code than equations to have a better understanding of ALBAs

👉 Checkout documentation on https://alba.cardano-scaling.org

Build

This code is written in Haskell with some native libraries dependencies for faster hashing. It requires the following software to be built:

To install sodium, you can follow instructions for cardano-node but please not ALBA does not depend (yet) on Cardano-specific sodium extensions.

GHC and Cabal can be installed through GHCUp.

To build all components, assuming pkg-config is propertly configured and libsodium is installed:

cabal build all

To run tests:

cabal test

Run

This package provides a small executable, unsurprisingly called alba, one can use to generate random data and proofs from those. It can also verify a given proof.

Help is available from the command-line:

$ cabal run alba -- --help
alba: Command-line utility for creating and verifying ALBA proofs
...

Here are a few examples use:

Benchmarks

Running benchmarks

This package comes with criterion-based benchmarks defined in the ALBABench module. To run benchmarks and generate a nice HTML page:

cabal bench --benchmark-options '-o bench.html'

It should be relatively straightforward to tweak the benchmarks for different figures, see the documentation for latest results.