Rename x to z in csharp bindings for verify_kzg_proof

just for consistency
This commit is contained in:
Ramana Kumar 2022-11-21 17:33:59 +00:00
parent bcc138560a
commit 471319fd81
No known key found for this signature in database
GPG Key ID: ED471C788B900433
3 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ public class Ckzg
public static unsafe extern int verify_aggregate_kzg_proof(byte[] blobs, byte[] commitments, int blobCount, byte[] proof, IntPtr ts);
[DllImport("ckzg", EntryPoint = "verify_kzg_proof_wrap", CallingConvention = CallingConvention.Cdecl)] // returns 0 on success
public static extern int verify_kzg_proof(byte[/*48*/] commitment, byte[/*32*/] x, byte[/*32*/] y, byte[/*48*/] proof, IntPtr ts);
public static extern int verify_kzg_proof(byte[/*48*/] commitment, byte[/*32*/] z, byte[/*32*/] y, byte[/*48*/] proof, IntPtr ts);
[DllImport("ckzg", EntryPoint = "load_trusted_setup_wrap")] // free result with free_trusted_setup()
public static extern IntPtr load_trusted_setup(string filename);

View File

@ -60,7 +60,7 @@ C_KZG_RET compute_aggregate_kzg_proof_wrap(uint8_t out[48], const Blob blobs[],
return C_KZG_OK;
}
int verify_kzg_proof_wrap(const uint8_t c[48], const uint8_t x[32], const uint8_t y[32], const uint8_t p[48], KZGSettings *s) {
int verify_kzg_proof_wrap(const uint8_t c[48], const uint8_t z[32], const uint8_t y[32], const uint8_t p[48], KZGSettings *s) {
KZGCommitment commitment;
KZGProof proof;
bool out;
@ -68,7 +68,7 @@ int verify_kzg_proof_wrap(const uint8_t c[48], const uint8_t x[32], const uint8_
if (bytes_to_g1(&commitment, c) != C_KZG_OK) return -1;
if (bytes_to_g1(&proof, p) != C_KZG_OK) return -1;
if (verify_kzg_proof(&out, &commitment, x, y, &proof, s) != C_KZG_OK)
if (verify_kzg_proof(&out, &commitment, z, y, &proof, s) != C_KZG_OK)
return -2;
return out ? 0 : 1;

View File

@ -6,7 +6,7 @@
#ifdef _WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT
#define DLLEXPORT
#endif
DLLEXPORT KZGSettings* load_trusted_setup_wrap(const char* file);
@ -19,4 +19,4 @@ DLLEXPORT int verify_aggregate_kzg_proof_wrap(const Blob blobs[], const uint8_t
DLLEXPORT C_KZG_RET compute_aggregate_kzg_proof_wrap(uint8_t out[48], const Blob blobs[], size_t n, const KZGSettings *s);
DLLEXPORT int verify_kzg_proof_wrap(const uint8_t c[48], const uint8_t x[32], const uint8_t y[32], const uint8_t p[48], KZGSettings *s);
DLLEXPORT int verify_kzg_proof_wrap(const uint8_t c[48], const uint8_t z[32], const uint8_t y[32], const uint8_t p[48], KZGSettings *s);