fuzzamoto-ir: prefill with more txs when building compact blocks#128
fuzzamoto-ir: prefill with more txs when building compact blocks#128brunoerg wants to merge 1 commit intodergoegge:masterfrom
Conversation
1dc8607 to
d1e766e
Compare
| .expect("BeginBuildCompactBlock should always produce a var"); | ||
| .expect("LoadNonce should always produce a var"); | ||
|
|
||
| let num_prefill = rng.gen_range(0..=8); |
There was a problem hiding this comment.
Not sure how to find really good numbers for this, especially because the perfect scenario would be based on the number of txs from the block, but it's not possible to get it here. Anyway, it seems better then the current approach.
There was a problem hiding this comment.
because the perfect scenario would be based on the number of txs from the block,
Exactly. This is not as straightforward as it sounds. There's a way to do it but maybe it is too complicated.
The problem is that the generator doesn't know how many txs are in the block before this testcase is passed to the compiler.
when I wrote this part of code, I discussed with Niklas that "we can just keep the prefill empty for now but we can later add prefills txs using probing"
The probing should work like this:
- We generate a block (at this point we don't think about compact block at all)
- When we compile the testcase we also generate some metadata attached to the testcase. (like this https://github.com/dergoegge/fuzzamoto/blob/master/fuzzamoto-ir/src/compiler.rs#L84)
- When we run the testcase in
ProbingStagewe will get feedback from nyx on these metadata https://github.com/dergoegge/fuzzamoto/blob/master/fuzzamoto-scenarios/bin/ir.rs#L98. For example, here you send the information back to the fuzzer and this information can tell you "which block contains which tx and their variable id in the original (pre-compiled) IR" - In the fuzzer, we can receive this feedback and use it to mutate the prefill in a more sensible way. (This part is not implemented)
There was a problem hiding this comment.
I've changed the approach.
f7f482f to
1572f95
Compare
1572f95 to
ab0b89e
Compare
ab0b89e to
8786b33
Compare
No description provided.