Skip to content

refactor: introduce BalEvm - #357

Open
klkvr wants to merge 3 commits into
mainfrom
klkvr/bal-db-internally
Open

refactor: introduce BalEvm#357
klkvr wants to merge 3 commits into
mainfrom
klkvr/bal-db-internally

Conversation

@klkvr

@klkvr klkvr commented May 11, 2026

Copy link
Copy Markdown
Member

introduces BalEvm which allows EthBlockExecutor to drive BAL building/verification internally, and adds BAL to BlockExecutionResult

@klkvr
klkvr requested a review from mattsse as a code owner May 11, 2026 12:00
@klkvr
klkvr force-pushed the klkvr/bal-db-internally branch from cc45f5b to 5cd9393 Compare May 22, 2026 11:10

if let Some(provided_bal) = &self.ctx.block_access_list {
if bal.as_ref() != Some(provided_bal.as_ref()) {
return Err(BlockValidationError::msg("invalid BAL provided").into());

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.

should we make this a dedicated error?

@klkvr
klkvr force-pushed the klkvr/bal-db-internally branch from f8ba82e to 743650a Compare May 22, 2026 14:13
Comment thread crates/evm/src/evm.rs
Comment on lines +195 to +198
/// Returns this EVM as a mutable BAL-capable EVM, if supported.
fn as_bal_evm_mut(&mut self) -> Option<&mut dyn BalEvm> {
None
}

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.

I like this approach, this should be sufficient enough, and usually we only ever have one implementation of this, if this fails to support bals at runtime this would then always indicate an implemantation issue, imo it's fine to enfrce this at runtime

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