nimbus-eth2/nfuzz/libnfuzz.h
Jacek Sieka 9a3db7a81f
[WIP] Fake bls at runtime (#735)
* Initial implementation of runtime bls skipping.

Add libnfuzz skipBLSValidation handling, check that it propagates.

* Rename skipBLSValidation -> skipBlsValidation, start skipStateRootValidation
* Replace skipValidation flags with more granular flags.

Also added skipBlockParentRootValidation flag
Mainly replaced with skipBlsValidation but also StateRoot or
BlockParentRootValidation flags where appropriate.

* Adjust interop test to pass when skipping merkle validation.
* Stop skipping validation for mainchain_monitor.
* Remove comment.
* Also skipMerkleValidation for test_beacon_chain_db.
2020-03-05 13:52:10 +01:00

36 lines
1.3 KiB
C

#ifndef __LIBNFUZZ_H__
#define __LIBNFUZZ_H__
#ifdef __cplusplus
extern "C" {
#endif
/** 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();
/** 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);
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__