mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Commit mina header and lib
This commit is contained in:
parent
4da4e7930e
commit
7fb7cda87d
4 changed files with 24 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -10,6 +10,8 @@ GORUN = env GO111MODULE=on go run
|
||||||
|
|
||||||
mina:
|
mina:
|
||||||
cd mina && cargo build --release
|
cd mina && cargo build --release
|
||||||
|
cp mina/target/mina.h mina/lib/mina.h
|
||||||
|
cp mina/target/release/libmina.a mina/lib/libmina.a
|
||||||
|
|
||||||
geth: mina
|
geth: mina
|
||||||
$(GORUN) build/ci.go install ./cmd/geth
|
$(GORUN) build/ci.go install ./cmd/geth
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ package vm
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo LDFLAGS: ${SRCDIR}/../../mina/target/release/libmina.a -ldl
|
#cgo LDFLAGS: ${SRCDIR}/../../mina/lib/libmina.a -ldl
|
||||||
#include "../../mina/target/mina.h"
|
#include "../../mina/lib/mina.h"
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
import (
|
import (
|
||||||
|
|
|
||||||
BIN
mina/lib/libmina.a
Normal file
BIN
mina/lib/libmina.a
Normal file
Binary file not shown.
20
mina/lib/mina.h
Normal file
20
mina/lib/mina.h
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define FIELD_SIZE 32
|
||||||
|
|
||||||
|
bool poseidon(uint8_t network_id,
|
||||||
|
const uint8_t *field_ptr,
|
||||||
|
uintptr_t field_len,
|
||||||
|
uint8_t *output_ptr);
|
||||||
|
|
||||||
|
bool verify(uint8_t network_id,
|
||||||
|
const uint8_t *pubkey_x,
|
||||||
|
const uint8_t *pubkey_y,
|
||||||
|
const uint8_t *sig_rx,
|
||||||
|
const uint8_t *sig_s,
|
||||||
|
const uint8_t *field_ptr,
|
||||||
|
uintptr_t field_len,
|
||||||
|
bool *output_ptr);
|
||||||
Loading…
Reference in a new issue