nimbus-eth2/nfuzz/libnfuzz.h

36 lines
1.3 KiB
C
Raw Permalink Normal View History

#ifndef __LIBNFUZZ_H__
#define __LIBNFUZZ_H__
#ifdef __cplusplus
extern "C" {
#endif
2019-12-03 12:48:47 +00:00
/** Initialize Nim & Garbage Collector. Must be called before anything else
* of the API. Also, all following calls must come from the same thread as from
* which this call was done.
*/
void NimMain();
2019-12-03 12:48:47 +00:00
/** Supported fuzzing tests */
bool nfuzz_attestation(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
bool nfuzz_attester_slashing(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
bool nfuzz_block(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
bool nfuzz_block_header(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
bool nfuzz_deposit(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
bool nfuzz_proposer_slashing(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
2019-11-28 22:01:12 +00:00
bool nfuzz_shuffle(uint8_t* seed_ptr, uint64_t* output_ptr, size_t output_size);
bool nfuzz_voluntary_exit(uint8_t* input_ptr, size_t input_size,
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
#ifdef __cplusplus
}
#endif
#endif //__LIBNFUZZ_H__