Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancun updates #253

Merged
merged 4 commits into from Apr 1, 2024
Merged

Cancun updates #253

merged 4 commits into from Apr 1, 2024

Conversation

fselmo
Copy link
Contributor

@fselmo fselmo commented Mar 19, 2024

What was wrong?

  • Add support for type 3 blob transactions
  • Refactor typed transactions into separate files for better organization
  • Normalize TypedTransaction.as_dict() so that tupleized or list-based accessList or blobVersionedHashes within a dict all normalize to tuples for consistency and ease of comparison.

Todo:

  • Add or update documentation related to these changes
  • Add entry to the release notes
  • Implement a new API to wrap blob txs with the appropriate blobs, commitments, and proofs
  • Add tests for the wrapped PooledTransaction API

Cute Animal Picture

Screenshot 2024-03-19 at 09 53 18

fselmo added a commit to fselmo/eth-account that referenced this pull request Mar 19, 2024
@fselmo fselmo force-pushed the cancun-updates branch 2 times, most recently from 9c37511 to 8f86c60 Compare March 19, 2024 13:40
@fselmo fselmo marked this pull request as ready for review March 19, 2024 13:53
@fselmo fselmo requested review from kclowes and pacrob March 19, 2024 13:54
Copy link
Collaborator

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

lgtm! Nice reorg

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.

Looks good to me. Just left a few nits

eth_account/_utils/typed_transactions/base.py Show resolved Hide resolved
tests/core/test_typed_transactions.py Outdated Show resolved Hide resolved
eth_account/_utils/typed_transactions/blob_transaction.py Outdated Show resolved Hide resolved
eth_account/_utils/typed_transactions/blob_transaction.py Outdated Show resolved Hide resolved
@fselmo fselmo force-pushed the cancun-updates branch 4 times, most recently from bacefd3 to 438c641 Compare March 24, 2024 16:45
@fselmo fselmo requested review from kclowes and pacrob March 24, 2024 16:45
@fselmo
Copy link
Contributor Author

fselmo commented Mar 24, 2024

New API for generating commitments and proofs from blobs added with pydantic models for validation. RLP serialization and deserialization with the PooledTransaction payload from EIP-4844 added. I want to add more tests but asking for a re-review so we can chat about the API.


edit: more tests added

@fselmo fselmo requested review from wolovim and reedsa March 25, 2024 13:22
- Re-organize typed transactions as a directory with each `_TypedTransactionImplementation`
  as its own file.
- Add support for `BlobTransaction` (type = 3).
- Add relevant tests.

Also:

- Normalize transaction dict for ``TypedTransaction.as_dict()`` so that lists or tuples are converted to tuples for consistency and ease of comparison.
- When a blob transaction is signed, it needs to contain the blob information
  along with commitments and proofs for the consensus layer. We need to be
  able to serialize and deserialize this information.
- Use different serializers for execution layer style `TransactionPayloadBody`
  blob transactions and for `PooledTransaction` blob transactions.
- Add some testing around blob transaction `blobVersionedHashes` validation
  when present in tx dict compared to the computed values from blobs.
- Add testing around the computing of commitment, proofs, and versioned hashes.
- Add testing around the blob count limits for a blob carrying transaction.
Copy link
Collaborator

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

Apart from the comment on fields to add to _TypedTransactionImplementation, lgtm!

@fselmo fselmo merged commit 452b17b into ethereum:main Apr 1, 2024
20 checks passed
@fselmo fselmo deleted the cancun-updates branch April 1, 2024 17:29
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.

None yet

3 participants