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

ExecutionOutcome may return a wrong block count #14007

Open
joshieDo opened this issue Jan 27, 2025 · 0 comments
Open

ExecutionOutcome may return a wrong block count #14007

joshieDo opened this issue Jan 27, 2025 · 0 comments
Labels
A-execution Related to the Execution and EVM C-bug An unexpected or incorrect behavior

Comments

@joshieDo
Copy link
Collaborator

joshieDo commented Jan 27, 2025

Describe the feature

We call the following method to get the block count of a ExecutionOutcome :

/// Number of blocks in the execution outcome.
pub fn len(&self) -> usize {
self.receipts.len()
}

However, we do not enforce/validate self.receipts during initialization. For example, if the Receipts is initialized as follows, ExecutionOutcome::len() will be 0 since self.receipts will be an empty vec.

let execution_outcome = ExecutionOutcome::new_init(
state_init,
all_reverts_init,
contracts,
Receipts::default(),
block,
Vec::new(),
);

Additional context

No response

@joshieDo joshieDo added A-execution Related to the Execution and EVM C-enhancement New feature or request labels Jan 27, 2025
@joshieDo joshieDo added C-bug An unexpected or incorrect behavior and removed C-enhancement New feature or request labels Jan 27, 2025
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-bug An unexpected or incorrect behavior
Projects
Status: Todo
Development

No branches or pull requests

1 participant