Commit Graph

19 Commits

Author SHA1 Message Date
Daniel Sanchez 5434fcb315
Move eth-specs submodule to da (#111) 2024-07-22 07:44:36 +00:00
Daniel Sanchez 84130ba58a
Da: fk20 fixes (#96)
* Simplify ranges

* Fix and beautify code
2024-06-26 17:27:29 +02: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
gusto c9b2c7c5c5
DA domain specific tag in bls (#94) 2024-05-27 12:38:18 +03:00
Daniel Sanchez 9390d481ba
Use blake2b for 31 bytes digests (#91) 2024-04-15 12:12:50 +02:00
Daniel Sanchez 8bb5160ff2
Fix rs encoding to fit with missing points (#90) 2024-04-09 07:55:17 +02:00
Daniel Sanchez f29869c029
Remove indexing from dablob (#89)
Verifier resolves by syncing with state public keys
2024-03-25 11:30:44 +01:00
gusto 53b8be7a05
DA Api Tests (#83)
* Tests for da api full flow

* Fix test issues

* Da api ext tests (#85)

* Index store links blob to cert_id

* Tests for multiple indexes pointing to the same blob

* Test multiple indexes to the same blob in the full flow

* Update bytes_per_chunk to 31 bytes

---------

Co-authored-by: Daniel Sanchez Quiros <sanchez.quiros.daniel@gmail.com>
2024-03-22 13:01:13 +02:00
Daniel Sanchez 8dd2dabb7d
DA: Verifier skip duplicated blobs intents (#88)
* Make verifier skip duplicated blobs intents

* Add case in where verifier data is the same but column is different
2024-03-22 10:36:00 +01:00
Daniel Sanchez a0175e16f3
Chunkify up to 31byte elements (#87) 2024-03-20 11:03:39 +01:00
gusto b1e13f79c5
Initial DA API Spec structure (#72)
* Initial da_api spec structure

* Node definition for testing different actors in da api

* Connect zone, producer and da nodes in tests

* Remove da mock module

* Add da api module with flow tests

* Comments for read and write methods in BlobStore

* Fix nitpicks (formatting and typing)

---------

Co-authored-by: Daniel Sanchez Quiros <sanchez.quiros.daniel@gmail.com>
2024-03-15 12:37:56 +02:00
Daniel Sanchez 0e142c0888
Added verification to certificate (#82)
* Added verification method to certificate

* Update da/common.py

typo short -> sort

Co-authored-by: gusto <bacv@users.noreply.github.com>

* Fix test imports

* Added verification comment

---------

Co-authored-by: gusto <bacv@users.noreply.github.com>
2024-03-15 11:34:43 +01:00
Daniel Sanchez bd964e7b27
Threshold bitfield on certificate (#81)
* Added threshold bitfield to certificate

* Short nodes_ids and public_keys
2024-03-14 12:20:46 +01:00
Daniel Sanchez 8c34f8a39e
Da Dispersal (#80)
* Added common bls types

* Added verifier attestation build

* Implement verification and aggregation in dispersal

* Added certificate building tests

* Added dispersal test
2024-03-13 14:59:27 +01:00
Daniel Sanchez 7ffb7cc7ed
Da verifier protocol (#78)
* Implement generator polynomial and rs encoding

* Implement encode/decode+test using fft. Non-working

* Use lagrange for interpolation

* Remove fft, use evaluations instead

* Move and rename kzg and rs test modules

* Update docs

* Added columns property to chunks matrix
Added test for columns

* Added chunkify and test

* Added compute row commitments
Added row commitments size test

* Fix poly from evaluations method

* Implement encode rows and test

* Update encode row test

* Implement compute row proofs (not working on extended data)

* Use same polynomials for commitment and proof creation after extend

* Fix polynomial from/to evaluations

* Use chunks for verification

* Refactor interpolate

* Implement chunks matrix transposed method

* Added compute column kzg commitments

* Use square size data for encoder tests

* Add column type to columns method

* Added compute columns aggregated commitment
Added aggregated commitment test
Fixed and expanded encode test

* Use sha3 for hashing

* Make encoder hashing method public

* Fill up verifier implementation

* Added verify column test

* Implement verier verify test
Fixed small issues

* Implement verier verify test
Extend verify test for all columns
2024-03-11 10:01:34 +01:00
Daniel Sanchez cf899d2384
Da encoding protocol (#76)
* Implement generator polynomial and rs encoding

* Implement encode/decode+test using fft. Non-working

* Use lagrange for interpolation

* Remove fft, use evaluations instead

* Move and rename kzg and rs test modules

* Update docs

* Added columns property to chunks matrix
Added test for columns

* Added chunkify and test

* Added compute row commitments
Added row commitments size test

* Fix poly from evaluations method

* Implement encode rows and test

* Update encode row test

* Implement compute row proofs (not working on extended data)

* Use same polynomials for commitment and proof creation after extend

* Fix polynomial from/to evaluations

* Use chunks for verification

* Refactor interpolate

* Implement chunks matrix transposed method

* Added compute column kzg commitments

* Use square size data for encoder tests

* Add column type to columns method

* Added compute columns aggregated commitment
Added aggregated commitment test
Fixed and expanded encode test

* Use sha3 for hashing
2024-03-08 14:16:14 +01:00
Daniel Sanchez 09c9b7e4ec
Da rs core (#75)
* Implement generator polynomial and rs encoding

* Implement encode/decode+test using fft. Non-working

* Use lagrange for interpolation

* Remove fft, use evaluations instead

* Move and rename kzg and rs test modules

* Update docs
2024-03-05 16:53:14 +01: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
Daniel Sanchez 9a54d90d14
Da specs main structure (#70)
* Added da encoder pipeline draft

* Remove unnecessary method

* Added verifier module and blob type

* Fill verifier skeleton

* Add comments on implementation, remove unnecessary intermediary method

* Added dispersal skeleton

* Added test modules for dispersal and verifier

* Added test modules for encoder, implemented basic test

* Added missing test cases

* Added missing calls to encode method

* Use single megabyte test in encoder

* Added basic testcases for dispersal

* Added basic testcases for verifier

* Remove duplicated column proofs from encoding schema

* Remove parameters from test functions in encoder

* Extract common types to common module

* Make test pass

* Remove node id dep from mixnet and fix columns access
2024-02-12 15:35:23 +01:00