Skip to content

Add scenario access list support#581

Closed
karlfloersch wants to merge 4 commits into
flashbots:mainfrom
karlfloersch:scenario-access-list-support
Closed

Add scenario access list support#581
karlfloersch wants to merge 4 commits into
flashbots:mainfrom
karlfloersch:scenario-access-list-support

Conversation

@karlfloersch

@karlfloersch karlfloersch commented May 12, 2026

Copy link
Copy Markdown

Summary

⚠️ AI generated code

Adds first-class EIP-2930 access-list entries to scenario-generated transaction requests. Scenario authors can now specify [[spam.tx.access_list]] entries with an address and storage keys, and Contender threads those entries into Alloy TransactionRequest.access_list.

The implementation keeps access lists generic and compatible with EIP-1559 transaction completion.

Validation

  • cargo +1.94.0 fmt --check
  • cargo +1.94.0 test -p contender_core access_list --lib
  • cargo +1.94.0 test -p contender_testfile access_list --lib
  • cargo +1.94.0 test -p contender_testfile --lib

Note: cargo +1.94.0 test -p contender_core --lib was also run and had 36 passing tests with 4 existing Anvil/provider-style failures unrelated to this change.

@zeroXbrock zeroXbrock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR @karlfloersch!

Comment thread crates/core/src/generator/function_def.rs Outdated
@karlfloersch
karlfloersch marked this pull request as ready for review May 12, 2026 22:47

@zeroXbrock zeroXbrock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks @karlfloersch!

@karlfloersch

Copy link
Copy Markdown
Author

Thank you!

@karlfloersch

Copy link
Copy Markdown
Author

I should have mentioned this earlier:

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

THIS CODE WAS AI GENERATED (5.5 high fwiw)

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

@zeroXbrock

Copy link
Copy Markdown
Member

I should have mentioned this earlier:

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

THIS CODE WAS AI GENERATED (5.5 high fwiw)

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

😂 no problem, all code is welcome here.
Approving optimistically -- code looks good, but I still need to test it myself before merging. Running out of time to do so today, but I'll have time tomorrow to wrap this up.

@zeroXbrock zeroXbrock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @karlfloersch!
I confirmed locally that it works, but I realized it only works with hard values, not placeholders.

I'd like to be able to use placeholder values in the address and storageKeys fields, so we could do this in scenario files:

[[spam.tx.access_list]]
address = "{SpamMe5}"
storageKeys = [
    "{testkey1}",
    "{testkey2}",
]

This should just be a matter of running replace_placeholders on the inputs, but now that we're using alloy's AccessListItem, placeholder strings are not valid, so I think unfortunately we'll have to go back to using a proprietary AccessListItem definition that uses strings. Sorry for the confusion, I misjudged the situation on my last review.

jelias2 added a commit to jelias2/contender that referenced this pull request May 29, 2026
Supersedes flashbots#581. Adds an `access_list` field to FunctionCallDefinition
that accepts {placeholder} strings in `address` and `storageKeys`,
resolved during the loose-to-strict conversion via the existing
templater + DB map.

Coexists with max_priority_fee_per_gas (flashbots#580) and alloy 2.0 (flashbots#561).
jelias2 added a commit to jelias2/contender that referenced this pull request Jun 2, 2026
Supersedes flashbots#581. Adds an `access_list` field to FunctionCallDefinition
that accepts {placeholder} strings in `address` and `storageKeys`,
resolved during the loose-to-strict conversion via the existing
templater + DB map.

Coexists with max_priority_fee_per_gas (flashbots#580) and alloy 2.0 (flashbots#561).
jelias2 added a commit to jelias2/contender that referenced this pull request Jun 4, 2026
Supersedes flashbots#581. Adds an `access_list` field to FunctionCallDefinition
that accepts {placeholder} strings in `address` and `storageKeys`,
resolved during the loose-to-strict conversion via the existing
templater + DB map.

Coexists with max_priority_fee_per_gas (flashbots#580) and alloy 2.0 (flashbots#561).
zeroXbrock added a commit that referenced this pull request Jun 5, 2026
* feat: add scenario access_list with placeholder resolution

Supersedes #581. Adds an `access_list` field to FunctionCallDefinition
that accepts {placeholder} strings in `address` and `storageKeys`,
resolved during the loose-to-strict conversion via the existing
templater + DB map.

Coexists with max_priority_fee_per_gas (#580) and alloy 2.0 (#561).

* support scenario [env] placeholders in access list fields

* chore: clippy

---------

Co-authored-by: zeroXbrock <2791467+zeroXbrock@users.noreply.github.com>
@zeroXbrock

Copy link
Copy Markdown
Member

absorbed by #588

@zeroXbrock zeroXbrock closed this Jun 5, 2026
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.

2 participants