fuzz: Mock CMainSignals in process_message(s) targets#26872
fuzz: Mock CMainSignals in process_message(s) targets#26872dergoegge wants to merge 3 commits intobitcoin:masterfrom
Conversation
|
@MarcoFalke curious about your opinion on this (maybe this has been discussed before?) |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. |
|
For those targets, none of them should be ever hit, practically speaking. It might be better to add a new validationinterface fuzz target |
Ugh, I assumed it's possible because we add those easily spendable coinbase outputs and call I have been working on targets that more specifically fuzz certain protocol flows (e.g. the version handshake, block/tx relay). These targets mostly submit valid headers/blocks/txs to net_processing, so I guess what I am suggesting here makes more sense for them. |
Mocking
CMainSignalsgives us the ability to control when theCValidationInterfacecallbacks are called onPeerManagerin theprocess_message(s)targets. It thereby makes these targets more deterministic/reproducable and slightly faster (per eyeball measurements 5%-10% more execs/s on my machine).Mostly looking for conceptual review on this because there is an argument to be made about fuzzing with the real
CMainSignalsin combination with TSan, so maybe preserving that behavior in another target could also make sense.