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

Improve Execution trait ergonomics #5767

Closed
mattsse opened this issue Dec 15, 2023 · 0 comments · Fixed by #5771
Closed

Improve Execution trait ergonomics #5767

mattsse opened this issue Dec 15, 2023 · 0 comments · Fixed by #5771
Assignees
Labels
C-debt Refactor of code section that is hard to understand or maintain C-enhancement New feature or request S-needs-design This issue requires design work to think about how it would best be accomplished

Comments

@mattsse
Copy link
Collaborator

mattsse commented Dec 15, 2023

Describe the feature

currently the Executor trait takes the block and the recovered senders as different arguments:

fn execute(
&mut self,
block: &Block,
total_difficulty: U256,
senders: Option<Vec<Address>>,
) -> Result<(), BlockExecutionError>;

this is easy to mess up, resulting in additional sender recovery.

Ideally, these functions should accept a single argument that can have multiple variants.

I think this type should be either a generic or an enum over the block variants.

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled S-needs-design This issue requires design work to think about how it would best be accomplished C-debt Refactor of code section that is hard to understand or maintain and removed S-needs-triage This issue needs to be labelled labels Dec 15, 2023
@onbjerg onbjerg self-assigned this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt Refactor of code section that is hard to understand or maintain C-enhancement New feature or request S-needs-design This issue requires design work to think about how it would best be accomplished
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants