mirror of
https://github.com/arnaucube/gnark-plonky2-verifier.git
synced 2026-01-12 09:01:32 +01:00
Poseidon BN128 (#20)
* initial commit of poseidon bn128 * got challenger working * deserialize is working * cleaned up deserialization function a bit * fixed challenger * add in the hack to the challenges * fixed some bugs in poseidon_bn128 * fri verification is working * some changes for benchmarking * added decode_block plonky2 data * initial commit for poseidon_mds_gate * updated gate test cases * working poseidon mds gate * full verifier test case working
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type VerifierOnlyCircuitData struct {
|
||||
ConstantSigmasCap MerkleCap
|
||||
CircuitDigest poseidon.Hash
|
||||
CircuitDigest poseidon.PoseidonBN128HashOut
|
||||
}
|
||||
|
||||
type CircuitConfig struct {
|
||||
|
||||
@@ -5,18 +5,18 @@ import (
|
||||
"github.com/succinctlabs/gnark-plonky2-verifier/poseidon"
|
||||
)
|
||||
|
||||
type MerkleCap = []poseidon.Hash
|
||||
type MerkleCap = []poseidon.PoseidonBN128HashOut
|
||||
|
||||
func NewMerkleCap(capHeight uint64) MerkleCap {
|
||||
return make([]poseidon.Hash, 1<<capHeight)
|
||||
return make([]poseidon.PoseidonBN128HashOut, 1<<capHeight)
|
||||
}
|
||||
|
||||
type MerkleProof struct {
|
||||
Siblings []poseidon.Hash // Length = CircuitConfig.FriConfig.DegreeBits + CircuitConfig.FriConfig.RateBits - CircuitConfig.FriConfig.CapHeight
|
||||
Siblings []poseidon.PoseidonBN128HashOut // Length = CircuitConfig.FriConfig.DegreeBits + CircuitConfig.FriConfig.RateBits - CircuitConfig.FriConfig.CapHeight
|
||||
}
|
||||
|
||||
func NewMerkleProof(merkleProofLen uint64) MerkleProof {
|
||||
return MerkleProof{Siblings: make([]poseidon.Hash, merkleProofLen)}
|
||||
return MerkleProof{Siblings: make([]poseidon.PoseidonBN128HashOut, merkleProofLen)}
|
||||
}
|
||||
|
||||
type EvalProof struct {
|
||||
|
||||
Reference in New Issue
Block a user