feat(network-primitives): add blob_versioned_hashes to TransactionBuilder4844#3730
Closed
figtracer wants to merge 6 commits intoalloy-rs:mainfrom
Closed
feat(network-primitives): add blob_versioned_hashes to TransactionBuilder4844#3730figtracer wants to merge 6 commits intoalloy-rs:mainfrom
figtracer wants to merge 6 commits intoalloy-rs:mainfrom
Conversation
- Renamed methods for setting and getting blob sidecars to specify EIP-4844 and EIP-7594 format variants. - Merged the TransactionBuilder7594 trait into TransactionBuilder4844. - Updated tests and transaction request implementations to reflect the new method names and structure.
96c0217 to
3ae9e01
Compare
3 tasks
mablr
reviewed
Feb 23, 2026
Contributor
mablr
left a comment
There was a problem hiding this comment.
For more context: this is not anymore on the Foundry Cast refactor hotpath. See foundry-rs/foundry#13512.
But I still think it's a nice a "nice-to-have" feat, to add not before Alloy 2.0 and its TransactionBuilder4844 unification #3600
Contributor
Author
will note this down since we might have more cases after release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
blob_versioned_hashesgetter/setter/builder methods to theTransactionBuilder4844trait.TransactionRequestalready storesblob_versioned_hashesas a field and uses it extensivelyfor EIP-4844 type detection, validation, and tx building. However, the
TransactionBuilder4844trait only exposes
max_fee_per_blob_gasandblob_sidecar— there is no way for generic code(
T: TransactionBuilder4844) to read or write blob versioned hashes.This is needed by downstream consumers (e.g. Foundry) that have functions generic over
T: TransactionBuilder4844and need to populate EVMTxEnv.blob_hashesfrom the transactionrequest.
Changes
blob_versioned_hashes(&self) -> Option<&[B256]>(default:None)set_blob_versioned_hashes(&mut self, Vec<B256>)(default: no-op)with_blob_versioned_hashes(self, Vec<B256>) -> Self(builder pattern)WithOtherFields<T>delegation for the new methodsTransactionRequestbacked by the existingblob_versioned_hashesfieldAll defaults are no-ops so existing trait implementations are unaffected.