Commit Graph

98 Commits

Author SHA1 Message Date
Daniel Sanchez Quiros 634249674d Merge branch 'master' into da-verifier-protocol 2024-03-08 15:28:41 +01:00
Daniel Sanchez Quiros b9eec90823 Implement verier verify test
Extend verify test for all columns
2024-03-08 15:22:59 +01:00
Daniel Sanchez Quiros 5c037d663c Implement verier verify test
Fixed small issues
2024-03-08 15:20:04 +01:00
Daniel Sanchez Quiros 0329b55e66 Added verify column test 2024-03-08 14:57:40 +01:00
Daniel Sanchez Quiros 102d9f1b4b Fill up verifier implementation 2024-03-08 14:57:27 +01:00
Daniel Sanchez Quiros c416b173d4 Make encoder hashing method public 2024-03-08 14:57:16 +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 Quiros 0337a12733 Use sha3 for hashing 2024-03-08 10:11:20 +01:00
Daniel Sanchez Quiros 7921f2c706 Added compute columns aggregated commitment
Added aggregated commitment test
Fixed and expanded encode test
2024-03-07 15:41:37 +01:00
Daniel Sanchez Quiros a421df9566 Add column type to columns method 2024-03-06 17:53:27 +01:00
Daniel Sanchez Quiros 3019a92460 Use square size data for encoder tests 2024-03-06 17:18:13 +01:00
Daniel Sanchez Quiros 6d8a370ee7 Added compute column kzg commitments 2024-03-06 16:56:47 +01:00
Daniel Sanchez Quiros 9bb5a6270f Implement chunks matrix transposed method 2024-03-06 16:56:23 +01:00
Daniel Sanchez Quiros 02ed35596b Refactor interpolate 2024-03-06 16:09:51 +01:00
Daniel Sanchez Quiros eecda172b8 Use chunks for verification 2024-03-06 16:02:48 +01:00
Daniel Sanchez Quiros 0f27a16468 Fix polynomial from/to evaluations 2024-03-06 16:02:36 +01:00
Daniel Sanchez Quiros 7dbd5ef351 Use same polynomials for commitment and proof creation after extend 2024-03-06 08:40:32 +01:00
Daniel Sanchez Quiros 3fddca075c Implement compute row proofs (not working on extended data) 2024-03-05 19:02:19 +01:00
Daniel Sanchez Quiros 0fa9f5edd2 Update encode row test 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros 17947ef74b Implement encode rows and test 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros 547cdedf5f Fix poly from evaluations method 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros e72935ec49 Added compute row commitments
Added row commitments size test
2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros f3097a6be4 Added chunkify and test 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros 5d3182eace Added columns property to chunks matrix
Added test for columns
2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros a2e9382b49 Update docs 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros 3632275521 Move and rename kzg and rs test modules 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros 99086151fe Remove fft, use evaluations instead 2024-03-05 18:37:35 +01:00
Daniel Sanchez Quiros f6b7d5bd3e Use lagrange for interpolation 2024-03-05 18:37:34 +01:00
Daniel Sanchez Quiros d75eb2949f Implement encode/decode+test using fft. Non-working 2024-03-05 18:37:12 +01:00
Daniel Sanchez Quiros 8ea2fb1fa3 Implement generator polynomial and rs encoding 2024-03-05 18:37:09 +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
Daniel Sanchez bcde60a97f
Arkworks dependency utility script (#71)
* Added install script for building in arm64 in osx arkworks bls dep

* Added install script for building in arm64 in osx arkworks bls dep
2024-02-11 23:15:15 +01:00
Giacomo Pasini 495e0c119a
Add orphan proofs validation (#69)
* Add orphan proofs validation

* Update cryptarchia/cryptarchia.py

Co-authored-by: davidrusu <davidrusu.me@gmail.com>

---------

Co-authored-by: davidrusu <davidrusu.me@gmail.com>
2024-02-09 15:12:12 +01:00
Youngjoon Lee 5dd7b2730a
Embed Robustness into `mixnet.py` (#61) 2024-02-08 15:39:50 +09:00
davidrusu cde1e92c9e
Leader VRF uses coin nonce as well as sk (#68)
* standardize endianness to "big"

* slot.encode()

* include coin nonce in leader election VRF

---------

Co-authored-by: David Rusu <davidrusu@Davids-MacBook-Pro.local>
2024-02-07 18:28:36 +04:00
Giacomo Pasini 6f05392693
Add slot contribution to nonce (#67) 2024-02-07 12:31:31 +01:00
davidrusu 0c447881ca
Merge pull request #65 from logos-co/evolve-leader-coin
Spec. Leader Coin Evolution
2024-02-07 01:53:26 +04:00
David Rusu 2a9ec4bc86 distinguish thew two commitments in the leader prf abnf 2024-02-06 22:21:16 +04:00
David Rusu bddaa40d63 test coin minting and stake stabilizing 2024-02-06 22:19:08 +04:00
David Rusu 3f681fc51f update block id spec; typo 2024-02-06 20:19:30 +04:00
David Rusu 5c3de9ab84 implement support for leader-proofs generated from evolved coins 2024-02-06 20:07:26 +04:00
Giacomo Pasini 8a82517fdd
Add nonce specification (#64)
* Add nonce specification

* tweak nonce definition
2024-02-06 16:37:49 +01:00
David Rusu eebf439a30 feat(leader_coin): add nonce and coin.evolve() api 2024-02-06 19:31:34 +04:00
Giacomo Pasini c1e12d6ce8
Add epoch transition to spec (#63)
* Add epoch transition to spec

* add tests

* Add block to fork after validation

* Add configs for steps inside an epoch

* rename get_last_valid_state to state_at_slot_beginning
2024-02-06 14:38:20 +01:00
Youngjoon Lee fe7d47caee
Mixnet: integrate all the pieces together (#57) 2024-02-05 09:04:02 +01:00
Youngjoon Lee b1ffb4d62d
Mixnet: topology update (#56) 2024-02-05 07:47:36 +01:00
davidrusu d7b5e0b529
Merge pull request #62 from logos-co/epoch-state-spec
Follower maintains ledger state as it follows the blockchain
2024-02-02 13:29:41 +04:00
David Rusu 9f6b9eb242 Specify mock-leader-proof in message spec 2024-02-02 01:16:14 +04:00