Comments (4)
It might also be neat to support blake3, which winterfell uses, since it's so fast. I'm not sure we'd have a concrete use for it ourselves, just if someone very fast proofs that didn't need to be recursion-friendly or Ethereum-friendly.
from plonky2.
I was thinking we could have a hash trait like PlonkyHash
, for hashes that plonky2 itself supports, but not necessarily in circuits. And then another one like PlonkyCircuitPermutation
which can be used in circuits, and is specifically a permutation, so we can do sponges/duplexes, e.g. in Challenger
. add_recursive_verifier
could take <InnerHash: PlonkyCircuitPermutation>
as a parameter.
I experimented a bit with <C: GenericConfig>
a bit. I was hoping to have something like
pub trait GenericConfig where [(); { Self::D }]: {
type F: RichField;
const D: usize;
type FE: FieldExtension<{ Self::D }, BaseField = Self::F>;
type Hash: PlonkyHash;
}
(This is just a start. We could potentially move more fields from CircuitConfig
into this new config type later, especially if we notice performance reasons, like allowing certain code to use arrays instead of Vecs.)
so that most definitions in our code base could have a single <C: GenericConfig>
generic. But this doesn't work; it gives "cycle detected". We can instead do
pub trait GenericConfig<const D: usize> {
type F: RichField;
type FE: FieldExtension<D, BaseField = Self::F>;
type Hash: PlonkyHash;
}
Then we'd have <C: GenericConfig<D>, const D: usize>
on many definitions throughout our codebase. I suppose that's a bit better than the current <F: RichField + Extendable<D>, const D: usize>
, although it's also worse in a way since F
s would be replaced with C::F
s.
from plonky2.
Good idea. Would we make PlonkyHash
generic over the input/output types? Something like:
trait PlonkyHash<T> {
fn compress(x: T, y: T) -> T;
}
so that we could have T = [F; 4] or [F; 3]
for algebraic hashes and T = [u8; 32] or [u8;25]
for Sha3/Blake3?
from plonky2.
Alternatively, maybe we could configure hashing in CircuitConfig
(i.e. without using generics), and have the branching for various hashes occur at a high level to avoid the performance hit. E.g. maybe MerkleTree:new
could take a hash config parameter, then branch into hash-specific methods like MerkleTree:new_with_poseidon
(or MerkleTree:new_with_hash::<PoseidonHash>()
).
from plonky2.
Related Issues (20)
- Inquiry about Serialization and Deserialization of the "data" Variable in plonky2-ecdsa HOT 1
- Documentation in plonky2 crate HOT 11
- The `Solidity` Verifier for `Plonky2` Proofs HOT 7
- what is the most expensive part of `compute_quotient_polys` under `plonky2/plonk2/src/plonk/prover.rs`
- Panic when trying to generate proof with invalid witness
- Understanding selected gate for each row in the trace table
- Add Prometheus metrics support to the prover
- Increase testing in starky crate HOT 3
- Allow larger constraint degrees for logUp HOT 1
- Add workspace CHANGELOG for future releases
- Deal with `CompressedStarkProof` on `starky` side
- Failed to build for wasm32-unknown-unknown with no_std
- Move `README`'s contribution guidance into a `CONTRIBUTING.md`
- Support monolith hash instead of Poseidon. HOT 1
- Amortize serialization size bloat
- Question: why BaseSumGate takes up the whole row while the other gates can share the same row across multiple instances? HOT 1
- plonky2 works very slow after MacOS Sonoma 14.4 has beed updated HOT 3
- Fix CTLs with exactly two looking tables
- Solving cross verification of n-recursed circuits using Domain Separator HOT 4
- CTL's looking table grouping is wonky
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plonky2.