Skip to content

Conversation

@meyer9
Copy link
Contributor

@meyer9 meyer9 commented Jan 6, 2026

The metadata field used to contain receipts and changed account balances as a performance optimization to be able to serve RPC requests without actually executing the block, but we still need to execute the block in most cases anyway. This removes the receipts and changed_account_balances fields from the response.

These are generated during flashblock execution instead.

This still preserves skipping execution of transactions that were executed in previous flashblocks as long as we have the receipt and state from the previous execution. In either the cached or executed path, cumulative_gas and next_log_index are updated.

The tests also needed to be fixed since they relied on the receipts for logs and the changed balances. Now, since the transactions are actually executed, we need to actually emit logs from the contracts when executed and send balance to the address rather than relying on changed_account_balances.

Fixes CHAIN-2657

@meyer9 meyer9 requested a review from refcell January 6, 2026 18:04
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 6, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@linear
Copy link

linear bot commented Jan 6, 2026

refcell
refcell previously approved these changes Jan 6, 2026
Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

Non-blocking nit: maybe add a test

@meyer9 meyer9 force-pushed the meyer9/make-metadata-receipts-optional branch from 1f45a56 to 362c85f Compare January 6, 2026 18:41
@cb-heimdall cb-heimdall dismissed refcell’s stale review January 6, 2026 18:41

Approved review 3631920391 from refcell is now dismissed due to new commit. Re-request for approval.

@meyer9 meyer9 force-pushed the meyer9/make-metadata-receipts-optional branch 2 times, most recently from bab581f to b50a2c8 Compare January 6, 2026 20:23
@meyer9 meyer9 marked this pull request as draft January 6, 2026 20:23
@danyalprout
Copy link
Collaborator

Instead of making these optional, can we just remove the account balance/receipts completely? These are a holdover from the time when we didn't execute Flashblocks, but rather just stored them in a cache.

@meyer9 meyer9 changed the title feat: make metadata receipts optional feat: remove metadata receipts and account balances Jan 6, 2026
@meyer9
Copy link
Contributor Author

meyer9 commented Jan 6, 2026

I think most of the failing tests are due to relying on passed in receipts rather than actually executing. I'll need to update the EVM bytecode to actually emit logs instead of assuming the receipts are correct.

@meyer9 meyer9 marked this pull request as ready for review January 7, 2026 16:04
@meyer9
Copy link
Contributor Author

meyer9 commented Jan 7, 2026

Updated the PR to remove account balances as well (these should still serialize fine if they exist due to not using strict mode serde). Also, updated tests to actually emit logs instead of depending on receipts/balances passed in from the flashblock.

Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

Very nice!

@cb-heimdall
Copy link
Collaborator

Review Error for refcell @ 2026-01-07 16:56:18 UTC
User failed mfa authentication, see go/mfa-help

Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

oops forgot mfa

The metadata field used to contain receipts and changed account balances
as a performance optimization to be able to serve RPC requests without
actually executing the block, but we still need to execute the block in
most cases anyway. This removes the receipts and
changed_account_balances fields from the response.

These are generated during flashblock execution instead.

This still preserves skipping execution of transactions that were
executed in previous flashblocks as long as we have the receipt and
state from the previous execution. In either the cached or executed
path, cumulative_gas and next_log_index are updated.

The tests also needed to be fixed since they relied on the receipts for
logs and the changed balances. Now, since the transactions are actually
executed, we need to actually emit logs from the contracts when executed
and send balance to the address rather than relying on
changed_account_balances.
@meyer9 meyer9 force-pushed the meyer9/make-metadata-receipts-optional branch from d040dab to 5d35253 Compare January 7, 2026 17:03
@meyer9
Copy link
Contributor Author

meyer9 commented Jan 7, 2026

resolved branch conflicts ^

@refcell refcell merged commit 0262ece into main Jan 7, 2026
19 checks passed
@refcell refcell deleted the meyer9/make-metadata-receipts-optional branch January 7, 2026 17:33
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.

5 participants