Skip to content

fix: fill missing effectiveGasPrice in receipts on derivation#70

Merged
hominlee-wemade merged 5 commits intodevfrom
fix/anzeon-effective-gas-price
Apr 6, 2026
Merged

fix: fill missing effectiveGasPrice in receipts on derivation#70
hominlee-wemade merged 5 commits intodevfrom
fix/anzeon-effective-gas-price

Conversation

@eomti-wm
Copy link
Copy Markdown
Contributor

@eomti-wm eomti-wm commented Apr 1, 2026

Background

In Anzeon, effectiveGasPrice is stored alongside the receipt in the database.
However, receipts received via snap sync are RLP-encoded, which does not include effectiveGasPrice, resulting in a missing value.
The previous DeriveFields logic had no way to recompute it correctly for Anzeon without access to state.

Solution

1. Emit AuthorizedTxExecuted event log (state_transition.go)

At the end of TransitionDb, emit an AuthorizedTxExecuted event log for authorized account transactions.
This log is always added last, allowing DeriveFields to determine authorized account status from the receipt logs alone, without state access.

2. Fill nil effectiveGasPrice in DeriveFields (receipt.go)

Added headerGasTip parameter to DeriveFields.
When effectiveGasPrice is nil in Anzeon, recompute it by checking the last log of the receipt for the AuthorizedTxExecuted event and applying the appropriate gas tip cap.

Changes

  • params: Add AuthorizedTxExecutedEventSig event signature constant
  • core/state_transition: Emit AuthorizedTxExecuted log for authorized accounts at end of TransitionDb
  • core/types/receipt: Add headerGasTip param to DeriveFields; fill nil effectiveGasPrice for Anzeon; add hasAuthorizedTxLog helper

@eomti-wm eomti-wm self-assigned this Apr 1, 2026
@eomti-wm eomti-wm added the bug Something isn't working label Apr 1, 2026
@eomti-wm eomti-wm changed the title [WIP] fix: fill missing effectiveGasPrice in receipts on derivation fix: fill missing effectiveGasPrice in receipts on derivation Apr 2, 2026
@eomti-wm eomti-wm marked this pull request as ready for review April 2, 2026 02:40
@eomti-wm eomti-wm force-pushed the fix/anzeon-effective-gas-price branch from 7a0fdba to 0adb6a6 Compare April 2, 2026 07:05
Copy link
Copy Markdown
Member

@0xmhha 0xmhha left a comment

Choose a reason for hiding this comment

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

LGTM

@eomti-wm eomti-wm force-pushed the fix/anzeon-effective-gas-price branch from 0adb6a6 to faa72d3 Compare April 2, 2026 07:39
@eomti-wm eomti-wm force-pushed the fix/anzeon-effective-gas-price branch from faa72d3 to 8db8eea Compare April 3, 2026 06:02
Copy link
Copy Markdown
Contributor

@colinkim colinkim left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@hominlee-wemade hominlee-wemade left a comment

Choose a reason for hiding this comment

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

LGTM

@hominlee-wemade hominlee-wemade merged commit c55bf2a into dev Apr 6, 2026
3 checks passed
@hominlee-wemade hominlee-wemade deleted the fix/anzeon-effective-gas-price branch April 8, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants