2019-11-27 20:43:02 +00:00
|
|
|
#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.
|
|
|
|
*/
|
2019-11-27 20:43:02 +00:00
|
|
|
void NimMain();
|
|
|
|
|
2019-12-03 12:48:47 +00:00
|
|
|
/** Supported fuzzing tests */
|
2019-12-17 04:50:47 +00:00
|
|
|
bool nfuzz_attestation(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
|
2019-12-17 04:50:47 +00:00
|
|
|
bool nfuzz_attester_slashing(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
|
2019-11-27 20:43:02 +00:00
|
|
|
bool nfuzz_block(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
|
2019-12-17 04:50:47 +00:00
|
|
|
bool nfuzz_block_header(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
|
2019-12-17 03:01:30 +00:00
|
|
|
bool nfuzz_deposit(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
|
2019-12-17 03:01:30 +00:00
|
|
|
bool nfuzz_proposer_slashing(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
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);
|
2019-12-17 03:01:30 +00:00
|
|
|
bool nfuzz_voluntary_exit(uint8_t* input_ptr, size_t input_size,
|
2020-03-05 12:52:10 +00:00
|
|
|
uint8_t* output_ptr, size_t* output_size, bool disable_bls);
|
2019-11-27 20:43:02 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //__LIBNFUZZ_H__
|