Skip to content

Conversation

@fselmo
Copy link
Collaborator

@fselmo fselmo commented Apr 3, 2024

What was wrong?

Closes #3321

How was it fixed?

  • Update documentation to reflect actual behavior and params
  • Update request formatters to properly format storage keys if they are passed in as HexBytes or bytes

Todo:

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

@fselmo fselmo force-pushed the fix-eth-create-access-list branch 2 times, most recently from ed1047d to a34ca84 Compare April 3, 2024 18:13
@fselmo fselmo force-pushed the fix-eth-create-access-list branch from a34ca84 to d9c4d69 Compare April 3, 2024 18:16
@fselmo fselmo marked this pull request as ready for review April 3, 2024 18:35
@fselmo fselmo requested review from kclowes and pacrob April 3, 2024 18:37
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@fselmo fselmo merged commit 6cda682 into ethereum:main Apr 3, 2024
@fselmo fselmo deleted the fix-eth-create-access-list branch April 3, 2024 20:38
@fselmo fselmo mentioned this pull request Apr 3, 2024
3 tasks
assert int(response["gasUsed"]) >= 0

# assert the result can be used directly in a transaction dict
txn["accessList"] = response["accessList"]
Copy link

@barakman barakman Apr 4, 2024

Choose a reason for hiding this comment

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

Well, if this works out of the box, then you can probably revert some of your fixes in the documentation.
Specifically, where the documentation describes this is part in the output of that function:

            'accessList': [
                AttributeDict({
                    'address': '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
                    'storageKeys': [
                        HexBytes('0x0000000000000000000000000000000000000000000000000000000000000003'),
                        HexBytes('0x0000000000000000000000000000000000000000000000000000000000000007'),
                    ]
                }),
                AttributeDict({
                    'address': '0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413',
                    'storageKeys': []
                }),
            ],

If the AttributeDict and HexBytes are really part of this output, then I'd expect txn to become illegal (cannot be unmarshalled by Go, or something similar to that).

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should be handling that in our formatters before it gets passed to the client

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.

Function create_access_list - incorrect behavior and documentation

3 participants