Skip to content

Fix access list storage key conversion for deployment transaction signing#427

Closed
abchauditor wants to merge 2 commits into
feat/version-5.0.0from
fix/signing-access-list
Closed

Fix access list storage key conversion for deployment transaction signing#427
abchauditor wants to merge 2 commits into
feat/version-5.0.0from
fix/signing-access-list

Conversation

@abchauditor

@abchauditor abchauditor commented Apr 1, 2026

Copy link
Copy Markdown

… hex string during comfirmation

Description

When sending transactions with wake run, eth_createAccessList returns storage keys as hex strings, but the Rust sign_transaction expects them as integers.
This caused a TypeError: 'str' object cannot be interpreted as an integer on every transaction with a non-empty access list.

Fixed by making hex value integer in python for AccessListItem in rust, and still make show hex string during comfirmation.

Note

Medium Risk
Touches transaction access-list handling across deployment, JSON-RPC encoding, and Rust conversion code; incorrect conversion could lead to malformed signed transactions or misleading confirmation output.

Overview
Fixes accessList storageKeys conversion to use consistent 32-byte big-endian encoding/decoding across the stack.

Deployment now converts eth_createAccessList results (hex strings) into integer storage keys for internal tx building, and the confirmation prompt re-encodes those keys back to 0x-prefixed 32-byte hex for display. JSON-RPC tx param encoding similarly serializes accessList.storageKeys from ints to properly padded hex strings, and the Rust tx_params_access_list_convert switches from little-endian to big-endian with left-padding when building B256 keys.

Written by Cursor Bugbot for commit ba1a7b2. This will update automatically on new commits. Configure here.

Comment thread wake/deployment/core.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is kicking off a free cloud agent to fix this issue. This run is complimentary, but you can enable autofix for all future PRs in the Cursor dashboard.

for k in entry["storageKeys"]
],
})
tx["accessList"] = encoded_access_list

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Testing path stores hex strings but encoder expects integers

High Severity

The updated _encode_tx_params now calls k.to_bytes(32, "big") on storageKeys, assuming they are integers. However, wake/testing/core.py line 314 still assigns tx["accessList"] = response["accessList"] directly from eth_createAccessList, where storage keys are hex strings. When a test uses accessList="auto" with a non-empty access list, any call through _encode_tx_params (e.g., send_transaction, estimate_gas, send_unsigned_transaction) will raise an AttributeError because str has no .to_bytes() method. The deployment path was correctly updated to convert hex to int, but the testing path was not.

Additional Locations (1)
Fix in Cursor Fix in Web

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