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

refactor: rename BundleStateWithReceipts to BlockExecutionOutcome #8730

Merged
merged 10 commits into from
Jun 11, 2024

Conversation

tcoratger
Copy link
Contributor

This PR:

  • Renames BundleStateWithReceipts to BlockExecutionOutcome
  • Adds with_receipts and with_requests

Should close #8727.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

hmm, this is slightly more nuanced because a ton of variables still refer to this as state and other types also refer to this as state.

I very much prefer this new name because it's accurate.

but this clashes with how we refer to it, referring to this as state is even more confusing...

not sure how to proceed...

@@ -18,7 +18,7 @@ pub struct BundleStateDataRef<'a> {
}

impl<'a> BundleStateDataProvider for BundleStateDataRef<'a> {
fn state(&self) -> &BundleStateWithReceipts {
fn state(&self) -> &BlockExecutionOutcome {
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, while naming is an improvement, this does not fit if we keep using it like this.

Copy link
Contributor Author

@tcoratger tcoratger Jun 10, 2024

Choose a reason for hiding this comment

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

Yes I thought we were saving it for another PR as there were a lot of changes to make but it's true that it doesn't make much sense to merge like that.

So I tried changing the names around BlockExecutionOutcome for overall consistency, hope I didn't forget any.

Let me know what you think about this

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I like this a lot more than Bundlestate,

after looking at this, I would even consider dropping the Block prefix and just do ExecutionOutput this way it's not tied to Block because it could this can represent multiple blocks.

but I'd like more feedback here @Rjected @gakonst @shekhirin @rkrasiuk @rakita

crates/storage/storage-api/src/state.rs Outdated Show resolved Hide resolved
@mattsse mattsse added C-debt Refactor of code section that is hard to understand or maintain A-execution Related to the Execution and EVM labels Jun 10, 2024
@tcoratger
Copy link
Contributor Author

I like this a lot more than Bundlestate,

after looking at this, I would even consider dropping the Block prefix and just do ExecutionOutput this way it's not tied to Block because it could this can represent multiple blocks.

but I'd like more feedback here @Rjected @gakonst @shekhirin @rkrasiuk @rakita

@mattsse

  • On the one hand it will greatly alleviate the writing of the naming so it's not bad.
  • But on the other hand ExecutionResult seems very generic and it may lack information about the interior of the object, right?

@shekhirin
Copy link
Collaborator

I like ExecutionOutput, it also makes names shorter everywhere, which is especially good for types like FullBlockExecutionDataProvider

@gakonst
Copy link
Member

gakonst commented Jun 11, 2024

ExecutionOutput 👍

@mattsse
Copy link
Collaborator

mattsse commented Jun 11, 2024

ExecutionOutput it is then

@mattsse
Copy link
Collaborator

mattsse commented Jun 11, 2024

actually, can we roll this back to Outcome 1bd67d3, I like this more than output.
sorry about this

@tcoratger tcoratger force-pushed the BlockExecutionOutcome branch from ee30a63 to 1bd67d3 Compare June 11, 2024 15:53
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

ty 🫡

@mattsse mattsse added this pull request to the merge queue Jun 11, 2024
Merged via the queue into paradigmxyz:main with commit a5d825e Jun 11, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-execution Related to the Execution and EVM C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename BundleStateWithReceipts
4 participants