Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add other state used to ConflictFinder #226

Open
bertmiller opened this issue Oct 24, 2024 · 2 comments
Open

feat: Add other state used to ConflictFinder #226

bertmiller opened this issue Oct 24, 2024 · 2 comments
Labels
A-builder Issues related to the core block building protocol enhancement New feature or request help wanted Extra attention is needed

Comments

@bertmiller
Copy link
Member

bertmiller commented Oct 24, 2024

The job of the conflict finder is to identify potential conflicting orders. Currently it does this by looking at storage read and write overlaps. We need to add the other possible state access patterns too. Luckily we already have these in the UsedStateTrace but they need to be reflected in the ConflictFinder.

Also, we should add nonces to this.

@bertmiller bertmiller added enhancement New feature or request help wanted Extra attention is needed A-builder Issues related to the core block building protocol labels Oct 24, 2024
@grasphoper
Copy link

grasphoper commented Nov 2, 2024

Hi @bertmiller, can I take this?

@grasphoper
Copy link

grasphoper commented Nov 3, 2024

I've taken a look at the code and other possible conflicts to add. They are:

  • read_balances can conflict with sent_amount, received_amount
  • read_slot, write_slot can conflict with destructed_contracts
  • destructed_contracts can conflict with each other
  • created_contracts can conflict with each other

Do we want to add all of these? And did you have any other combinations in mind?

As for the nonces, they seem to be partially taken care of already, as they're recorded as read_slot + write_slot for EOA at 0th slot here. There's a corner case though: right now, if we have 2 TXs that are using different nonces for the same EOA, we deem them "conflicting", which should not be the case. Not obvious how to work around this yet (other than changing how the nonce usage is recorded into the UsedStateTrace)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builder Issues related to the core block building protocol enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants