summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralgoidan <idan@algorand.com>2023-05-04 10:50:43 +0300
committeralgoidan <idan@algorand.com>2023-05-04 10:50:43 +0300
commit44ee2ef7e45eec6de4fbf08eeeeba0d6d85fdc70 (patch)
treec061c436e168d1acdadfa801606bae94c1305b51
parent1e6ca481f3b29a64eff3d5c0f09e0bc791fec3a2 (diff)
-rw-r--r--crypto/stateproof/snarkFriendlyStateProof_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/stateproof/snarkFriendlyStateProof_test.go b/crypto/stateproof/snarkFriendlyStateProof_test.go
index 443ba7a3e..e38ae1fde 100644
--- a/crypto/stateproof/snarkFriendlyStateProof_test.go
+++ b/crypto/stateproof/snarkFriendlyStateProof_test.go
@@ -28,7 +28,7 @@ import (
"github.com/algorand/go-algorand/data/basics"
)
-func TestCertToJSON(t *testing.T) {
+func TestStateProofToInterpreterInput(t *testing.T) {
partitiontest.PartitionTest(t)
a := require.New(t)
@@ -58,7 +58,7 @@ func TestCertToJSON(t *testing.T) {
partcom, err := merklearray.BuildVectorCommitmentTree(basics.ParticipantsArray(parts), crypto.HashFactory{HashType: HashType})
a.NoError(err)
- b, err := MakeBuilder(message, stateProofIntervalForTests, uint64(totalWeight/2), parts, partcom, targetForSampleCert)
+ b, err := MakeProver(message, stateProofIntervalForTests, uint64(totalWeight/2), parts, partcom, targetForSampleCert)
a.NoError(err)
for i := 0; i < npart; i++ {
@@ -67,16 +67,16 @@ func TestCertToJSON(t *testing.T) {
b.Add(uint64(i), sigs[i])
}
- cert, err := b.Build()
+ sp, err := b.CreateProof()
a.NoError(err)
verif, err := MkVerifier(partcom.Root(), provenWt, targetForSampleCert)
a.NoError(err)
- err = verif.Verify(stateProofIntervalForTests, message, cert)
- a.NoError(err, "failed to verify the compact cert")
+ err = verif.Verify(stateProofIntervalForTests, message, sp)
+ a.NoError(err, "failed to verify the compact sp")
- certenc, err := cert.createSnarkFriendlyCert(message[:])
+ certenc, err := sp.createSnarkFriendlyCert(message[:])
a.NoError(err)
fmt.Printf(toZokCode(certenc, verif, testMessage("hello world").IntoStateProofMessageHash(), stateProofIntervalForTests))