Skip to content

Commit 9a88ee8

Browse files
authored
fix: rename groth16/plonk to gnark_groth16 and gnark_plonk to avoid ambiguity with circom (#1999)
1 parent f1d207d commit 9a88ee8

38 files changed

+176
-176
lines changed

Makefile

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -578,77 +578,77 @@ batcher_send_risc0_burst: ## Send a burst of Risc0 fibonacci proofs to Batcher.
578578
--rpc_url $(RPC_URL) \
579579
--network $(NETWORK)
580580

581-
batcher_send_plonk_bn254_task: crates/target/release/aligned ## Send a Groth16Bn254 1!=0 proof to Batcher. Parameters: RPC_URL, NETWORK
582-
@echo "Sending Groth16Bn254 1!=0 proof to Batcher..."
581+
batcher_send_gnark_plonk_bn254_task: crates/target/release/aligned ## Send a Gnark Plonk Bn254 1!=0 proof to Batcher. Parameters: RPC_URL, NETWORK
582+
@echo "Sending Gnark Plonk Bn254 1!=0 proof to Batcher..."
583583
@cd crates/cli/ && cargo run --release -- submit \
584584
--proving_system GnarkPlonkBn254 \
585-
--proof ../../scripts/test_files/gnark_plonk_bn254_script/plonk_0_12_0.proof \
586-
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input_0_12_0.pub \
587-
--vk ../../scripts/test_files/gnark_plonk_bn254_script/plonk_0_12_0.vk \
585+
--proof ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.proof \
586+
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_pub_input_0_12_0.pub \
587+
--vk ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.vk \
588588
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
589589
--rpc_url $(RPC_URL) \
590590
--network $(NETWORK)
591591

592-
batcher_send_plonk_bn254_burst: crates/target/release/aligned ## Send a burst of Groth16Bn254 1!=0 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
593-
@echo "Sending Groth16Bn254 1!=0 proof to Batcher..."
592+
batcher_send_gnark_plonk_bn254_burst: crates/target/release/aligned ## Send a burst of Gnark Plonk Bn254 1!=0 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
593+
@echo "Sending Gnark Plonk Bn254 1!=0 proof to Batcher..."
594594
@cd crates/cli/ && cargo run --release -- submit \
595595
--proving_system GnarkPlonkBn254 \
596-
--proof ../../scripts/test_files/gnark_plonk_bn254_script/plonk_0_12_0.proof \
597-
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input_0_12_0.pub \
598-
--vk ../../scripts/test_files/gnark_plonk_bn254_script/plonk_0_12_0.vk \
596+
--proof ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.proof \
597+
--public_input ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_pub_input_0_12_0.pub \
598+
--vk ../../scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.vk \
599599
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
600600
--repetitions $(BURST_SIZE) \
601601
--rpc_url $(RPC_URL) \
602602
--network $(NETWORK)
603603

604-
batcher_send_plonk_bls12_381_task: crates/target/release/aligned ## Send a Groth16 BLS12-381 1!=0 proof to Batcher. Parameters: RPC_URL, NETWORK
605-
@echo "Sending Groth16 BLS12-381 1!=0 proof to Batcher..."
604+
batcher_send_gnark_plonk_bls12_381_task: crates/target/release/aligned ## Send a Gnark Plonk BLS12-381 1!=0 proof to Batcher. Parameters: RPC_URL, NETWORK
605+
@echo "Sending Gnark Plonk BLS12-381 1!=0 proof to Batcher..."
606606
@cd crates/cli/ && cargo run --release -- submit \
607607
--proving_system GnarkPlonkBls12_381 \
608-
--proof ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_0_12_0.proof \
609-
--public_input ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input_0_12_0.pub \
610-
--vk ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_0_12_0.vk \
608+
--proof ../../scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_0_12_0.proof \
609+
--public_input ../../scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_pub_input_0_12_0.pub \
610+
--vk ../../scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_0_12_0.vk \
611611
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
612612
--rpc_url $(RPC_URL) \
613613
--network $(NETWORK)
614614

615-
batcher_send_plonk_bls12_381_burst: crates/target/release/aligned ## Send a burst of Groth16 BLS12-381 1!=0 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
616-
@echo "Sending Groth16 BLS12-381 1!=0 proof to Batcher..."
615+
batcher_send_gnark_plonk_bls12_381_burst: crates/target/release/aligned ## Send a burst of Gnark Plonk BLS12-381 1!=0 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
616+
@echo "Sending Gnark Plonk BLS12-381 1!=0 proof to Batcher..."
617617
@cd crates/cli/ && cargo run --release -- submit \
618618
--proving_system GnarkPlonkBls12_381 \
619-
--proof ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_0_12_0.proof \
620-
--public_input ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input_0_12_0.pub \
621-
--vk ../../scripts/test_files/gnark_plonk_bls12_381_script/plonk_0_12_0.vk \
619+
--proof ../../scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_0_12_0.proof \
620+
--public_input ../../scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_pub_input_0_12_0.pub \
621+
--vk ../../scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_0_12_0.vk \
622622
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
623623
--repetitions $(BURST_SIZE) \
624624
--rpc_url $(RPC_URL) \
625625
--network $(NETWORK)
626626

627-
batcher_send_groth16_bn254_task: crates/target/release/aligned ## Send a Groth16Bn254 1!=0 proof to Batcher. Parameters: RPC_URL, NETWORK
628-
@echo "Sending Groth16Bn254 1!=0 proof to Batcher..."
627+
batcher_send_gnark_groth16_bn254_task: crates/target/release/aligned ## Send a Gnark Groth16 Bn254 1!=0 proof to Batcher. Parameters: RPC_URL, NETWORK
628+
@echo "Sending Gnark Groth 16Bn254 1!=0 proof to Batcher..."
629629
@cd crates/cli/ && cargo run --release -- submit \
630-
--proving_system Groth16Bn254 \
631-
--proof ../../scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.proof \
632-
--public_input ../../scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.pub \
633-
--vk ../../scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.vk \
630+
--proving_system GnarkGroth16Bn254 \
631+
--proof ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.proof \
632+
--public_input ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.pub \
633+
--vk ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.vk \
634634
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
635635
--rpc_url $(RPC_URL) \
636636
--network $(NETWORK)
637637

638-
batcher_send_groth16_bn254_burst: crates/target/release/aligned ## Send a burst of Groth16Bn254 1!=0 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
639-
@echo "Sending Groth16Bn254 1!=0 proof to Batcher..."
638+
batcher_send_gnark_groth16_bn254_burst: crates/target/release/aligned ## Send a burst of Gnark Groth16 Bn254 1!=0 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
639+
@echo "Sending Gnark Groth16 Bn254 1!=0 proof to Batcher..."
640640
@cd crates/cli/ && cargo run --release -- submit \
641-
--proving_system Groth16Bn254 \
642-
--proof ../../scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.proof \
643-
--public_input ../../scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.pub \
644-
--vk ../../scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.vk \
641+
--proving_system GnarkGroth16Bn254 \
642+
--proof ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.proof \
643+
--public_input ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.pub \
644+
--vk ../../scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.vk \
645645
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
646646
--repetitions $(BURST_SIZE) \
647647
--rpc_url $(RPC_URL) \
648648
--network $(NETWORK)
649649

650650
## TODO: send_burst_tasks.sh and send_infinite_tasks.sh does a similar thing. We could delete one
651-
batcher_send_groth16_bn254_infinite: crates/target/release/aligned ## Send a different Groth16 BN254 proof using the client every 3 seconds. Parameters: BURST_SIZE, START_COUNTER
651+
batcher_send_gnark_groth16_bn254_infinite: crates/target/release/aligned ## Send a different Gnark Groth16 BN254 proof using the client every 3 seconds. Parameters: BURST_SIZE, START_COUNTER
652652
@echo "Sending a burst of proofs to Batcher..."
653653
@mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
654654
@./crates/cli/send_burst_tasks.sh $(BURST_SIZE) $(START_COUNTER)
@@ -685,10 +685,10 @@ batcher_send_burst_with_random_address: ## Send a burst of proofs with random ad
685685
__TASK_SENDER__:
686686
BURST_TIME_SECS ?= 3
687687

688-
task_sender_generate_groth16_proofs:
688+
task_sender_generate_gnark_groth16_proofs:
689689
@cd crates/task-sender && \
690690
cargo run --release -- generate-proofs \
691-
--number-of-proofs $(NUMBER_OF_PROOFS) --proof-type groth16 \
691+
--number-of-proofs $(NUMBER_OF_PROOFS) --proof-type gnark_groth16 \
692692
--dir-to-save-proofs $(CURDIR)/scripts/test_files/task_sender/proofs
693693

694694
# ===== DEVNET =====
@@ -1088,40 +1088,40 @@ docker_batcher_send_risc0_burst:
10881088
--rpc_url $(DOCKER_RPC_URL) \
10891089
--max_fee 0.1ether
10901090

1091-
docker_batcher_send_plonk_bn254_burst:
1092-
@echo "Sending Groth16Bn254 1!=0 task to Batcher..."
1091+
docker_batcher_send_gnark_plonk_bn254_burst:
1092+
@echo "Sending Gnark Plonk Bn254 1!=0 task to Batcher..."
10931093
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
10941094
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
10951095
--proving_system GnarkPlonkBn254 \
1096-
--proof ./scripts/test_files/gnark_plonk_bn254_script/plonk_0_12_0.proof \
1097-
--public_input ./scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input_0_12_0.pub \
1098-
--vk ./scripts/test_files/gnark_plonk_bn254_script/plonk_0_12_0.vk \
1096+
--proof ./scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.proof \
1097+
--public_input ./scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_pub_input_0_12_0.pub \
1098+
--vk ./scripts/test_files/gnark_plonk_bn254_script/gnark_plonk_0_12_0.vk \
10991099
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
11001100
--rpc_url $(DOCKER_RPC_URL) \
11011101
--repetitions $(DOCKER_BURST_SIZE) \
11021102
--max_fee 0.1ether
11031103

1104-
docker_batcher_send_plonk_bls12_381_burst:
1105-
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
1104+
docker_batcher_send_gnark_plonk_bls12_381_burst:
1105+
@echo "Sending Gnark Plonk BLS12-381 1!=0 task to Batcher..."
11061106
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
11071107
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
11081108
--proving_system GnarkPlonkBls12_381 \
1109-
--proof ./scripts/test_files/gnark_plonk_bls12_381_script/plonk_0_12_0.proof \
1110-
--public_input ./scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input_0_12_0.pub \
1111-
--vk ./scripts/test_files/gnark_plonk_bls12_381_script/plonk_0_12_0.vk \
1109+
--proof ./scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_0_12_0.proof \
1110+
--public_input ./scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_pub_input_0_12_0.pub \
1111+
--vk ./scripts/test_files/gnark_plonk_bls12_381_script/gnark_plonk_0_12_0.vk \
11121112
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
11131113
--repetitions $(DOCKER_BURST_SIZE) \
11141114
--rpc_url $(DOCKER_RPC_URL) \
11151115
--max_fee 0.1ether
11161116

1117-
docker_batcher_send_groth16_burst:
1117+
docker_batcher_send_gnark_groth16_burst:
11181118
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
11191119
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
11201120
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1121-
--proving_system Groth16Bn254 \
1122-
--proof ./scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.proof \
1123-
--public_input ./scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.pub \
1124-
--vk ./scripts/test_files/gnark_groth16_bn254_script/groth16_0_12_0.vk \
1121+
--proving_system GnarkGroth16Bn254 \
1122+
--proof ./scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.proof \
1123+
--public_input ./scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.pub \
1124+
--vk ./scripts/test_files/gnark_groth16_bn254_script/gnark_groth16_0_12_0.vk \
11251125
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
11261126
--repetitions $(DOCKER_BURST_SIZE) \
11271127
--rpc_url $(DOCKER_RPC_URL) \
@@ -1144,9 +1144,9 @@ docker_batcher_send_circom_groth16_bn128_burst:
11441144
docker_batcher_send_all_proofs_burst:
11451145
@$(MAKE) docker_batcher_send_sp1_burst
11461146
@$(MAKE) docker_batcher_send_risc0_burst
1147-
@$(MAKE) docker_batcher_send_plonk_bn254_burst
1148-
@$(MAKE) docker_batcher_send_plonk_bls12_381_burst
1149-
@$(MAKE) docker_batcher_send_groth16_burst
1147+
@$(MAKE) docker_batcher_send_gnark_plonk_bn254_burst
1148+
@$(MAKE) docker_batcher_send_gnark_plonk_bls12_381_burst
1149+
@$(MAKE) docker_batcher_send_gnark_groth16_burst
11501150
@$(MAKE) docker_batcher_send_circom_groth16_bn128_burst
11511151

11521152
docker_batcher_send_infinite_groth16:
@@ -1161,10 +1161,10 @@ docker_batcher_send_infinite_groth16:
11611161
aligned submit \
11621162
--rpc_url $(DOCKER_RPC_URL) \
11631163
--repetitions $(DOCKER_BURST_SIZE) \
1164-
--proving_system Groth16Bn254 \
1165-
--proof scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16_0_12_0.proof \
1166-
--public_input scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16_0_12_0.pub \
1167-
--vk scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16_0_12_0.vk \
1164+
--proving_system GnarkGroth16Bn254 \
1165+
--proof scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_gnark_groth16_0_12_0.proof \
1166+
--public_input scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_gnark_groth16_0_12_0.pub \
1167+
--vk scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_gnark_groth16_0_12_0.vk \
11681168
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS); \
11691169
--max_fee 0.1ether
11701170
sleep $${timer}; \

alerts/sender_with_alert.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ do
106106
## Send Proof
107107
echo "Submitting $REPETITIONS proofs $x != 0"
108108
submit=$(aligned submit \
109-
--proving_system Groth16Bn254 \
109+
--proving_system GnarkGroth16Bn254 \
110110
--repetitions $REPETITIONS \
111-
--proof "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_groth16_0_12_0.proof" \
112-
--public_input "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_groth16_0_12_0.pub" \
113-
--vk "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_groth16_0_12_0.vk" \
111+
--proof "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_gnark_groth16_0_12_0.proof" \
112+
--public_input "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_gnark_groth16_0_12_0.pub" \
113+
--vk "./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_${x}_gnark_groth16_0_12_0.vk" \
114114
--private_key $PRIVATE_KEY \
115115
--rpc_url $RPC_URL \
116116
--network $NETWORK \

common/proving_systems.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ type ProvingSystemId uint16
1313
const (
1414
GnarkPlonkBls12_381 ProvingSystemId = iota
1515
GnarkPlonkBn254
16-
Groth16Bn254
16+
GnarkGroth16Bn254
1717
SP1
1818
Risc0
1919
CircomGroth16Bn128
2020
)
2121

2222
func (t *ProvingSystemId) String() string {
23-
return [...]string{"GnarkPlonkBls12_381", "GnarkPlonkBn254", "Groth16Bn254", "SP1"}[*t]
23+
return [...]string{"GnarkPlonkBls12_381", "GnarkPlonkBn254", "GnarkGroth16Bn254", "SP1"}[*t]
2424
}
2525

2626
func ProvingSystemIdFromString(provingSystem string) (ProvingSystemId, error) {
@@ -29,8 +29,8 @@ func ProvingSystemIdFromString(provingSystem string) (ProvingSystemId, error) {
2929
return GnarkPlonkBls12_381, nil
3030
case "GnarkPlonkBn254":
3131
return GnarkPlonkBn254, nil
32-
case "Groth16Bn254":
33-
return Groth16Bn254, nil
32+
case "GnarkGroth16Bn254":
33+
return GnarkGroth16Bn254, nil
3434
case "SP1":
3535
return SP1, nil
3636
case "Risc0":
@@ -48,8 +48,8 @@ func ProvingSystemIdToString(provingSystem ProvingSystemId) (string, error) {
4848
return "GnarkPlonkBls12_381", nil
4949
case GnarkPlonkBn254:
5050
return "GnarkPlonkBn254", nil
51-
case Groth16Bn254:
52-
return "Groth16Bn254", nil
51+
case GnarkGroth16Bn254:
52+
return "GnarkGroth16Bn254", nil
5353
case SP1:
5454
return "SP1", nil
5555
case Risc0:
@@ -104,8 +104,8 @@ func (s *ProvingSystemId) UnmarshalCBOR(data []byte) error {
104104
*s = GnarkPlonkBls12_381
105105
case "GnarkPlonkBn254":
106106
*s = GnarkPlonkBn254
107-
case "Groth16Bn254":
108-
*s = Groth16Bn254
107+
case "GnarkGroth16Bn254":
108+
*s = GnarkGroth16Bn254
109109
case "SP1":
110110
*s = SP1
111111
case "Risc0":

crates/batcher/go_verifiers_lib/verifier.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ func listRefToBytes(listRef C.ListRef) []byte {
3535

3636
func main() {}
3737

38-
//export VerifyPlonkProofBLS12_381
39-
func VerifyPlonkProofBLS12_381(proofBytes C.ListRef, pubInputBytes C.ListRef, verificationKeyBytes C.ListRef) bool {
40-
return verifyPlonkProof(proofBytes, pubInputBytes, verificationKeyBytes, ecc.BLS12_381)
38+
//export VerifyGnarkPlonkProofBLS12_381
39+
func VerifyGnarkPlonkProofBLS12_381(proofBytes C.ListRef, pubInputBytes C.ListRef, verificationKeyBytes C.ListRef) bool {
40+
return verifyGnarkPlonkProof(proofBytes, pubInputBytes, verificationKeyBytes, ecc.BLS12_381)
4141
}
4242

43-
//export VerifyPlonkProofBN254
44-
func VerifyPlonkProofBN254(proofBytes C.ListRef, pubInputBytes C.ListRef, verificationKeyBytes C.ListRef) bool {
45-
return verifyPlonkProof(proofBytes, pubInputBytes, verificationKeyBytes, ecc.BN254)
43+
//export VerifyGnarkPlonkProofBN254
44+
func VerifyGnarkPlonkProofBN254(proofBytes C.ListRef, pubInputBytes C.ListRef, verificationKeyBytes C.ListRef) bool {
45+
return verifyGnarkPlonkProof(proofBytes, pubInputBytes, verificationKeyBytes, ecc.BN254)
4646
}
4747

48-
//export VerifyGroth16ProofBN254
49-
func VerifyGroth16ProofBN254(proofBytes C.ListRef, pubInputBytes C.ListRef, verificationKeyBytes C.ListRef) bool {
50-
return verifyGroth16Proof(proofBytes, pubInputBytes, verificationKeyBytes, ecc.BN254)
48+
//export VerifyGnarkGroth16ProofBN254
49+
func VerifyGnarkGroth16ProofBN254(proofBytes C.ListRef, pubInputBytes C.ListRef, verificationKeyBytes C.ListRef) bool {
50+
return verifyGnarkGroth16Proof(proofBytes, pubInputBytes, verificationKeyBytes, ecc.BN254)
5151
}
5252

53-
// verifyPlonkProof contains the common proof verification logic.
54-
func verifyPlonkProof(proofBytesRef C.ListRef, pubInputBytesRef C.ListRef, verificationKeyBytesRef C.ListRef, curve ecc.ID) bool {
53+
// verifyGnarkPlonkProof contains the common proof verification logic.
54+
func verifyGnarkPlonkProof(proofBytesRef C.ListRef, pubInputBytesRef C.ListRef, verificationKeyBytesRef C.ListRef, curve ecc.ID) bool {
5555
proofBytes := listRefToBytes(proofBytesRef)
5656
pubInputBytes := listRefToBytes(pubInputBytesRef)
5757
verificationKeyBytes := listRefToBytes(verificationKeyBytesRef)
@@ -85,8 +85,8 @@ func verifyPlonkProof(proofBytesRef C.ListRef, pubInputBytesRef C.ListRef, verif
8585
return err == nil
8686
}
8787

88-
// verifyGroth16Proof contains the common proof verification logic.
89-
func verifyGroth16Proof(proofBytesRef C.ListRef, pubInputBytesRef C.ListRef, verificationKeyBytesRef C.ListRef, curve ecc.ID) bool {
88+
// verifyGnarkGroth16Proof contains the common proof verification logic.
89+
func verifyGnarkGroth16Proof(proofBytesRef C.ListRef, pubInputBytesRef C.ListRef, verificationKeyBytesRef C.ListRef, curve ecc.ID) bool {
9090
proofBytes := listRefToBytes(proofBytesRef)
9191
pubInputBytes := listRefToBytes(pubInputBytesRef)
9292
verificationKeyBytes := listRefToBytes(verificationKeyBytesRef)

crates/batcher/src/ffi/gnark_ffi.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
use crate::ffi::list_ref::ListRef;
22

33
extern "C" {
4-
pub fn VerifyPlonkProofBLS12_381(
4+
pub fn VerifyGnarkPlonkProofBLS12_381(
55
proof: ListRef,
66
public_input: ListRef,
77
verification_key: ListRef,
88
) -> bool;
9-
pub fn VerifyPlonkProofBN254(
9+
pub fn VerifyGnarkPlonkProofBN254(
1010
proof: ListRef,
1111
public_input: ListRef,
1212
verification_key: ListRef,
1313
) -> bool;
14-
pub fn VerifyGroth16ProofBN254(
14+
pub fn VerifyGnarkGroth16ProofBN254(
1515
proof: ListRef,
1616
public_input: ListRef,
1717
verification_key: ListRef,

0 commit comments

Comments
 (0)