Commit Graph

582 Commits

Author SHA1 Message Date
Dmitriy Ryajov e045062620
enable case objects field checks 2024-02-09 18:30:05 -06:00
Dmitriy Ryajov 6f4aa017e9
imports 2024-02-09 18:30:05 -06:00
Dmitriy Ryajov 4c4f64de0e
pass prover options 2024-02-09 18:30:05 -06:00
Dmitriy Ryajov e4d06d9f0e
dissable prover for now 2024-02-09 18:29:32 -06:00
Dmitriy Ryajov d3c0667616
misc 2024-02-09 18:29:32 -06:00
Dmitriy Ryajov df684302f6
wip: wire in prover 2024-02-09 18:29:32 -06:00
Dmitriy Ryajov 29d4ff5556
wip wire in prover and circom config 2024-02-09 18:29:18 -06:00
Dmitriy Ryajov bf8e27317a
misc 2024-02-09 18:29:18 -06:00
Dmitriy Ryajov b949e5001f
remove unneded files 2024-02-09 18:29:18 -06:00
Dmitriy Ryajov 856c2b9dc0
wip merge master 2024-02-09 18:29:17 -06:00
Dmitriy Ryajov 9b390cb152
ignore debug symbols 2024-02-09 18:29:17 -06:00
Dmitriy Ryajov c003b5c7a5
test backends 2024-02-09 18:29:06 -06:00
Dmitriy Ryajov e7be0b956c
move tests to subdirectory 2024-02-09 18:29:06 -06:00
Dmitriy Ryajov 349be069cc
move fixtures to top level 2024-02-09 18:29:06 -06:00
Dmitriy Ryajov de140b7333
init prover 2024-02-09 18:28:43 -06:00
Dmitriy Ryajov 8de2d6d35a
add circom file config options 2024-02-09 18:28:43 -06:00
Dmitriy Ryajov 532e45b951
add prover 2024-02-09 18:28:32 -06:00
Dmitriy Ryajov cc6ebe9123
init node 2024-02-09 18:28:32 -06:00
Dmitriy Ryajov 24c57c9109
move prover logic from node 2024-02-09 18:28:31 -06:00
Dmitriy Ryajov 0da9d51213
rework circom compat 2024-02-09 18:28:15 -06:00
Dmitriy Ryajov 30ab88572d
add tests for circom backend 2024-02-09 18:27:57 -06:00
Dmitriy Ryajov b50e46211c
remove zkey file 2024-02-09 18:27:56 -06:00
Dmitriy Ryajov 959baafd6c
make more egonomic 2024-02-09 18:27:54 -06:00
Dmitriy Ryajov b148a4ecf7
pass proper input 2024-02-09 18:27:43 -06:00
Dmitriy Ryajov bad533e329
drop files 2024-02-09 18:27:18 -06:00
Dmitriy Ryajov 29e884258c
wip rework backend 2024-02-09 18:27:16 -06:00
Dmitriy Ryajov 9697b669e3
wip 2024-02-09 18:25:46 -06:00
Dmitriy Ryajov 3df3b6736c
bump nimbus build system 2024-02-09 18:24:58 -06:00
Dmitriy Ryajov 6c629cfe61
moving prover around 2024-02-09 18:24:36 -06:00
Dmitriy Ryajov 18907e6801
wip 2024-02-09 18:24:10 -06:00
Dmitriy Ryajov 134724f91a
generify sampler and builder 2024-02-09 18:24:08 -06:00
Dmitriy Ryajov e23159b065
wire in circom backend (#698)
* wire in circom backend

* should contain leafs

* adding circom compad and circuits deps

* update windows build

* fix windows build

* improve test names

* move proving defaults to codextypes

* remove unnedded inmports and move defaults to codextypes

* capture error code on backend failure
2024-02-09 21:40:30 +00:00
Dmitriy Ryajov 825766eea0
Rework builder & sampler (#697)
* add proof initializer for poseidon2 and `$`

* fix padding and block selection

* fix sample selection and input construction

* fix sample selection & more descriptive names

* add concrete types for sampler & builder

* add missing digest calls

* use concrete types

* add sample test fixtures

* use concrete types and don't fetch dummy blocks
2024-02-08 02:27:11 +00:00
Dmitriy Ryajov afec86b3cf
cleanup manifest and wire in strategy (#696) 2024-02-07 20:54:57 +00:00
Slava 1e957da109
CI update (#695)
* fix: update codecov action

* fix: remove nim v2 from Nim-matrix
2024-02-07 19:47:40 +00:00
Dmitriy Ryajov 2fc538337b
rework indexing strategy to use an enum (#694) 2024-02-07 11:13:27 -08:00
markspanbroek 2cf892c467
Smart contracts update: Groth16Proof instead of bytes (#683)
* Smart contracts update: Groth16Proof instead of bytes

* Use dummy verifier for now, until we can create ZK proofs

* Fix tests: submit proof only when slot is filled

* Submit dummy proofs for now

* More detailed log when proof submission failed

* Use dummy verifier for integration tests

For now at least

* Fix mistake in blanket renaming to ethProvider

* Update to latest codex-contracts-eth

* feat: zkey-hash from chain

* Fix zkeyHash

---------

Co-authored-by: Adam Uhlíř <adam@uhlir.dev>
2024-02-07 07:50:35 +01:00
Slava 403b9baf9f
Add Nim-matrix workflow to run on merge queue (#693)
* Add Nim-matrix workflow to run on merge queue

* Use reusable workflows for CI and Nim-matrix
2024-02-06 12:56:27 +02:00
Giuliano Mega 591be9446a
remove call to `waitFor` from clock.now and make it async (#691) 2024-02-05 08:36:28 -03:00
Slava ca0660b07e
Use default short commit length for Codex revision (#690) 2024-01-30 19:58:55 +02:00
markspanbroek fd3c566b25
update asynctest to 0.5.1 (#671)
* update asynctest to 0.5.0

Co-Authored-By: gmega <giuliano.mega@gmail.com>

* update remaining package imports

* add asynctest package wrapper

---------

Co-authored-by: gmega <giuliano.mega@gmail.com>
2024-01-29 17:03:51 -03:00
Slava 95a4484de0
fix: update codex help output (#687) 2024-01-29 19:31:29 +00:00
Slava ae61c29b3f
ci: fix docker workflow after actions update (#689)
Signed-off-by: Slava <20563034+veaceslavdoina@users.noreply.github.com>
2024-01-29 20:12:07 +02:00
Slava 34095461ae
ci: update actions to lates major versions (#688) 2024-01-29 17:21:52 +02:00
Ben Bierens 0b8811c98d
Debug/sampling (#681)
* Extra logging in sampler

* wip: Fixing sampling issue in padded slot cells

* Cleanup

* Restores tests
2024-01-25 15:34:38 -08:00
Eric de88fd2c53
feat: create logging proxy (#663)
* implement a logging proxy

The logging proxy:
- prevents the need to import chronicles (as well as export except toJson),
- prevents the need to override `writeValue` or use or import nim-json-seralization elsewhere in the codebase, allowing for sole use of utils/json for de/serialization,
- and handles json formatting correctly in chronicles json sinks

* Rename logging -> logutils to avoid ambiguity with common names

* clean up

* add setProperty for JsonRecord, remove nim-json-serialization conflict

* Allow specifying textlines and json format separately

Not specifying a LogFormat will apply the formatting to both textlines and json sinks.

Specifying a LogFormat will apply the formatting to only that sink.

* remove unneeded usages of std/json

We only need to import utils/json instead of std/json

* move serialization from rest/json to utils/json so it can be shared

* fix NoColors ambiguity

Was causing unit tests to fail on Windows.

* Remove nre usage to fix Windows error

Windows was erroring with `could not load: pcre64.dll`. Instead of fixing that error, remove the pcre usage :)

* Add logutils module doc

* Shorten logutils.formatIt for `NBytes`

Both json and textlines formatIt were not needed, and could be combined into one formatIt

* remove debug integration test config

debug output and logformat of json for integration test logs

* Use ## module doc to support docgen

* bump nim-poseidon2 to export fromBytes

Before the changes in this branch, fromBytes was likely being resolved by nim-stew, or other dependency. With the changes in this branch, that dependency was removed and fromBytes could no longer be resolved. By exporting fromBytes from nim-poseidon, the correct resolution is now happening.

* fixes to get compiling after rebasing master

* Add support for Result types being logged using formatIt
2024-01-22 23:35:03 -08:00
Dmitriy Ryajov 72da534856
Wire sampler (#676)
* Setting up testfixture for proof datasampler

* Sets up calculating number of cells in a slot

* Sets up tests for bitwise modulo

* Implements cell index collection

* setting up slot blocks module

* Implements getting treeCID from slot

* implements getting slot blocks by index

* Implements out-of-range check for slot index

* cleanup

* Sets up getting sample from block

* Implements selecting a cell sample from a block

* Implements building a minitree for block cells

* Adds method to get dataset block index from slot block index

* It's running

* splits up indexing

* almost there

* Fixes test. Implementation is now functional

* Refactoring to object-oriented

* Cleanup

* Lining up output type with updated reference code.

* setting up

* Updates expected samples

* Updates proof checking test to match new format

* move builder to own dir

* move sampler to own dir

* fix paths

* various changes to add support for the sampler

* wip sampler implementation

* don't use upraises

* wip sampler integration

* misc

* move tests around

* Various fixes to select correct slot and block index

* removing old tests

* cleanup

* misc

fix tests that work with correct cell indices

* remove unused file

* fixup logging

* add logscope

* truncate entropy to 31 bytes, otherwise it might be > than mod

* forwar getCidAndProof to local store

* misc

* Adds missing test for initial-proving state

* reverting back to correct slot/block indexing

* fix tests for revert

* misc

* misc

---------

Co-authored-by: benbierens <thatbenbierens@gmail.com>
2024-01-17 11:24:34 -08:00
Dmitriy Ryajov 2fc7c75fd2
Contracts handler (#672)
* get rid of unneeded files

* don't reuse batch callback

* move out storage contract handlers

* wip

* add storage handler, to handle storage contracts interactions

* split out node tests

* a bit more cleanup

* remove storage handler, move back into node

* add missing raises:

* wip: add support for rebuilding slot

* split out tests

* wip

* rework indexing strategy to return an iterator

* convert to seq

* minor api change (meh, might revert)

* steping strategy should not die

* allow fetching batches for manifests and indicies

* restored expiry update

* restored expiry update functionality

* avoid closing datastores twice

* correct wrong rename

* fixes sigsegv
2024-01-15 08:45:04 -08:00
Afri 9b9cf9c450
docs: update api for two client test (#675)
Signed-off-by: Afri <58883403+q9f@users.noreply.github.com>
2024-01-15 12:35:55 +01:00
Dmitriy Ryajov 8b12934fe2
Build slots (#668)
Wiring in slots builder functionality into `requestStorage`
2024-01-11 08:45:23 -08:00