mirror of
https://github.com/logos-storage/logos-storage-proofs.git
synced 2026-01-06 23:43:07 +00:00
* wip rust ffi * proper test component instantiation * adding quick&dirty poseidon implementation * update gitignode * gitignore * adding rust circuit tests * gitignore * rename * add storer tests * move utils under circuit_tests * fix storage proofs * wip: ffi * instantiate storer * enable ark-serialize * delete js tests * update CI to run cargo tests * keep the artifacts dir * update .gitignore * build circuits * remove package json * place built circuits in correct dirs * update gitignore * remove node * fix ci * updating readme * storageproofs.rs to storage_proofs.rs * flatten tests chunks by default * add ffi * fix digest * minor fixes for ffi * fix storer test * use random data for chunks * debug optimizations to speed witness generation * clippy & other lint stuff * add back missing unsafe blocks * release mode disables constraint checks * fix ffi * fix hashes serialization * make naming more consistent * add missing pragma * use correct circuits * add todo * add clarification to readme * silence unused warning * include constants file into exec * remove unused imports
18 lines
367 B
Plaintext
18 lines
367 B
Plaintext
pragma circom 2.1.0;
|
|
|
|
include "../../node_modules/circomlib/circuits/poseidon.circom";
|
|
|
|
template PoseidonHash(SIZE) {
|
|
signal input in[SIZE];
|
|
signal input hash;
|
|
|
|
component hasher = Poseidon(SIZE);
|
|
for(var i = 0; i < SIZE; i++) {
|
|
hasher.inputs[i] <== in[i];
|
|
}
|
|
|
|
hasher.out === hash;
|
|
}
|
|
|
|
component main { public [hash] } = PoseidonHash(1);
|