Skip to content

fix(bal): fix populated account if pre-state was none#3357

Merged
rakita merged 2 commits intobluealloy:mainfrom
jsign:jsign-fix
Jan 27, 2026
Merged

fix(bal): fix populated account if pre-state was none#3357
rakita merged 2 commits intobluealloy:mainfrom
jsign:jsign-fix

Conversation

@jsign
Copy link
Contributor

@jsign jsign commented Jan 27, 2026

When basic was None, the function populated account info from BAL but returned early without writing it back, causing the data to be lost.

Realized about this while doing some experimentation coding a subblock-prover for Reth in the context of zkVMs, and trying to run some BAL tests.

cc @mattsse

@jsign jsign changed the title refactor(bal): fix populated account if pre-state was none fix(bal): fix populated account if pre-state was none Jan 27, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 27, 2026

Merging this PR will not alter performance

✅ 173 untouched benchmarks


Comparing jsign:jsign-fix (67ff8ab) with main (087ac46)

Open in CodSpeed

.expect("Invalid account id");

// if it is not changed, check if it is none and return it.
if is_none {
Copy link
Member

Choose a reason for hiding this comment

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

There was a problem around empty and non existing account for eip7702 this is why this condition exist here.

But condition is not good, it should take bool from let changed = bal.populate_account_info and only if !changed && is_none { return true;} it true (aka it got changed) put basic to Some(bal_basic)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense! Pushed a commit to consider the changed criteria.

@rakita rakita merged commit fedc3fc into bluealloy:main Jan 27, 2026
31 checks passed
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
@jsign jsign deleted the jsign-fix branch January 27, 2026 21:38
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