Skip to content

fix: pre-allocate AccessList slice in SetSenderTx before copying - #115

Merged
hmlee-wm merged 2 commits into
devfrom
fix/feedelegate-accesslist-copy
Jul 22, 2026
Merged

hmlee-wm merged 2 commits into
devfrom
fix/feedelegate-accesslist-copy

Conversation

@eomti-wm

Copy link
Copy Markdown
Contributor

Overview

Fix a bug where the AccessList in a fee-delegated transaction is lost during RPC assembly, causing signature recovery to fail.

Problem

When copying the AccessList via copy, the destination slice was zero-initialized with no allocated memory, causing all entries to be silently lost and subsequent signature recovery to fail.

Solution

Pre-allocate memory for the destination AccessList slice before copying to prevent data loss.

Changes

  • core/types/tx_fee_delegation.go: pre-allocate AccessList slice with make before copy in SetSenderTx

eomti-wm added 2 commits July 15, 2026 17:03
Pre-allocate AccessList with make before copying to fix missing memory
allocation in zero-initialized SenderTx, which caused all entries to be
lost and sender signature recovery to fail.
Add a test reproducing the RPC assembly path to verify that AccessList
is preserved through SetSenderTx and that sender/feePayer signatures
can be recovered correctly.
@eomti-wm
eomti-wm requested review from 0xmhha, colinkim and hmlee-wm July 21, 2026 12:23
@eomti-wm eomti-wm self-assigned this Jul 21, 2026
@eomti-wm eomti-wm added the bug Something isn't working label Jul 21, 2026

@colinkim colinkim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@hmlee-wm hmlee-wm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@hmlee-wm
hmlee-wm merged commit f4c9490 into dev Jul 22, 2026
3 checks passed
@eomti-wm
eomti-wm deleted the fix/feedelegate-accesslist-copy branch July 22, 2026 02:59
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.

3 participants