Skip to content

fuzzamoto-ir: prefill with more txs when building compact blocks#128

Open
brunoerg wants to merge 1 commit intodergoegge:masterfrom
brunoerg:2026-02-ir-compactblocks
Open

fuzzamoto-ir: prefill with more txs when building compact blocks#128
brunoerg wants to merge 1 commit intodergoegge:masterfrom
brunoerg:2026-02-ir-compactblocks

Conversation

@brunoerg
Copy link
Contributor

No description provided.

@brunoerg brunoerg force-pushed the 2026-02-ir-compactblocks branch 2 times, most recently from 1dc8607 to d1e766e Compare February 15, 2026 18:42
@brunoerg brunoerg marked this pull request as ready for review February 16, 2026 15:05
.expect("BeginBuildCompactBlock should always produce a var");
.expect("LoadNonce should always produce a var");

let num_prefill = rng.gen_range(0..=8);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. We generate a block (at this point we don't think about compact block at all)
  2. 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)
  3. When we run the testcase in ProbingStage we 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"
  4. 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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the approach.

@brunoerg brunoerg marked this pull request as draft February 23, 2026 13:28
@brunoerg brunoerg force-pushed the 2026-02-ir-compactblocks branch 6 times, most recently from f7f482f to 1572f95 Compare February 25, 2026 13:16
@brunoerg brunoerg marked this pull request as ready for review February 25, 2026 13:57
@brunoerg brunoerg force-pushed the 2026-02-ir-compactblocks branch from 1572f95 to ab0b89e Compare February 25, 2026 14:05
@brunoerg brunoerg force-pushed the 2026-02-ir-compactblocks branch from ab0b89e to 8786b33 Compare February 27, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants