Commit Graph

13 Commits

Author SHA1 Message Date
gusto 4d49fba52a
Direct DA connection protocol (#100)
* WIP: Direct DA connection protocol

* Dispersal wrapper messages for executor to node communication

* Reusable types in dispersal.proto

* Add helper methods for dispersal errors

* Remove redundant BlobId type

* Write to connections in parallel

* Explicite package name for dispersal proto messages

* Parse length+message in the proto module

* Move dispersal proto into subnets poc

* Test for protocol message helper functions

* Use dispersal proto message in poc executor
2024-07-19 10:10:56 +03:00
davidrusu 2c7c483707
CL spec (#92)
* feat(cl/noir): provide an ergonomic Noir api for use within Python.

* Add a python wrapper over the bigger constraint

* Add the Bigger wrapper

* cl/noir: document the NargoConstraint wrapper api

* rewrite Bigger constraint as a dataclass

* WIP: Cl/executable spec (#93)

* wip: executable spec

* WIP: test_1_to_1_transfer

* hack: Vacous hash function

* crypto: make sure prf returns field elements, fix ECC math in pedcom

* hack(crypto): mock up a hash_to_curve implementation

* feat(cl/1to1_xfr): fungibility domain uses hash_to_curve

* cl: add type checking to InnerNote

* cl/ptx: get balance commitments working

* cl/noir: mv noir_constraint wrapper into cl/constraints/...

* cl/ptx-note-proofs: start data modelling input and outputs

* cl/ptx: 1-to-1 test is passing, but still, not quite finished

* cl: remove tx_output from 1-to-1 transfer

* cl: remove unused classes

* cl: testing the balance commitments

* wip: cl

* cl: split main.rs into crypto.rs and note.rs

* cl: split balance test

* cl: add nullifier module

* cl: partial_tx; input; output

* cl: output proof tests

* cl: partial transactions can now be built and verified

* drop python cl spec

* cl: test partial transaction balance commitment

* cl: reverse partial tx balance (inputs are neg, outputs are pos)

* cl: bundle of ptx

* cl: verify bundle isn't balanced with just one unbalanced partial tx

* cl: swap out ExtendedPoint for SubgroupPoint

* cl: integrate groth16 death constraint validation

* add risc0 zone

* refactor risc0 zone

* fix zone PoC

* Add separate bin for stark2snark conv

* cl: rename Note to NoteWitness

* cl: merkle proofs

* cl: merkle tree helper to pad elements

* cl: ptx root implemented via merkle roots over inputs and outputs

* cl: move from Commitment::from_witness to Witness::commit()

* cl: tests passing again

* cl: turn data model into library

* cl: partial tx can compute paths to inputs / outputs

* cl: begin integrating zone into cl data modal

* cl: integrate simple zone into CL data model

* cl: add missing cl patches

* cl: swap jubjub for accel k256

* cl: pre-compute balance unit point outside stark

* switch balance commitment to linear combination

* cl: pre-compute pederson blinding

* fix risc0 patching

* switch to curve25519-dalek

* cl: drop blake2; print prover time

---------

Co-authored-by: Giacomo Pasini <g.pasini98@gmail.com>

---------

Co-authored-by: Giacomo Pasini <g.pasini98@gmail.com>
2024-07-09 17:10:32 +04:00
Daniel Sanchez 422359acd7
Da: fk20 proof generation (#95)
* Kickstart fk20

* Implement i/fft from ethspecs

* Expand test to different sizes

* Implement toeplizt

* Finish implementing fk20

* Fix roots of unity generation

* Implement fft for g1 values

* Fix fk20 and tests

* Add len assertion in test

* Fix roots computations

* Fix test

* Fix imports

* Fmt

* Docs and format
2024-06-17 09:20:11 +02:00
Daniel Sanchez d15eaa2d98
KZG core functionality (#73)
* Added polynomial class

* Added common types and constants

* Implement commitment and proof generation

* Added basic tests

* Use custom polynomial

* use evaluation form for building polynomial

* Use fast division on polynomials

* Fix poly operations

* Add non working verification

* Make verification work

* Expand verify test

* Cleanup imports

* Update deps

* Update common.py

added verify setup mechanism

* Added trusted setup, updated common to use gp generator and added setup verification test

* Added comments

---------

Co-authored-by: megonen <146561843+megonen@users.noreply.github.com>
2024-02-27 17:49:27 +01:00
davidrusu 0c4bfa4d03
Merge branch 'master' into cryptarchia 2024-01-26 00:14:22 +04:00
Youngjoon Lee ebc069b112
Mixnet: Refactor with asyncio (#53) 2024-01-25 18:04:55 +09:00
David Rusu b8966762e0 feat(lottery): spec out basic leader slot check 2024-01-25 02:04:35 +04:00
Youngjoon Lee d963d6cb51
Mixnet: Packet delay in mix node (#49) 2024-01-23 10:29:14 +09:00
Youngjoon Lee 1fc319de9e
Mixnet: Sphinx packet builder for mix clients (#47) 2024-01-15 15:17:35 +09:00
Youngjoon Lee 2263327320
Use Python 3.12 and install setuptools (#48) 2024-01-12 19:27:09 +09:00
Youngjoon Lee ef65355bf7
Mixnet: Add basic structure and topology construction (#44) 2024-01-10 20:47:13 +09:00
Daniel Sanchez 9b87f8e733
Committee sizes computation (#33)
* Added optimal number of committees and sizes function

* Remove main

* Extract common scope code snippet

* Fmt
2023-06-27 17:39:31 +02:00
Daniel Sanchez 5a169039b5
Random beacon v1 (#24)
* Implement beacon verification and handling module

* Create beacon tests and fix encountered problems

* Refactor tests

* Add mixed happy/unhappy test

* Clean unused import

* Add requirements.txt

* Add beacon to package

* Resolve relative import

* Fmt

* Refactor BeaconHandler -> RandomBeaconHandler
Remove unused verification calls

* Change view bytes encoding
Extract generating private key

* Bring back old trusty carnot

* Added beaconized carnot module

* Implement flat overlay

* Refactor overlay next leader

* Implement beaconized carnot

* Fill proposed block on beaconized carnot

* Sketch and update for testing purposes

* Step up beaconized test

* Fix missing leader selection

* Fix random beacon test

* Use recovery mode for random beacon initialization

* Expose entropy as constructor parameter
2023-05-18 18:29:28 +02:00