refactor: dedupe CallRequest/TransactionRequest#178
Merged
Conversation
Member
Author
|
@DaniPopes where do I note breaking changes for the checklist? |
mattsse
requested changes
Feb 2, 2024
Member
mattsse
left a comment
There was a problem hiding this comment.
I'm for unifying them, not worth having duplicate versions of the same thing. especially if we want to use this type as the foundation for building transactions.
before we merge this here, I'd like companion prs on foundry and reth so we can merge them in one go.
3 tasks
Evalir
approved these changes
Feb 6, 2024
Contributor
Evalir
left a comment
There was a problem hiding this comment.
This is fine w/ me. I'll take care of the foundry companion PR
Contributor
|
gm @onbjerg can this be merged? |
289128b to
0964673
Compare
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.
Motivation
CallRequestandTransactionRequestare basically the same type, with very few differences:TransactionRequestwas missing an optional chain IDTransactionRequestwas missingmax_fee_per_blob_gasCallRequestandTransactionRequesthad different blob fieldsSince they also serve the same purpose, this PR dedupes them, to make sure there is only one tx request type, which is important for the network abstraction.
Solution
Dedupe them, porting over fields missing from either.
I removed the blob transaction sidecar, but only because I didn't really know if it is actually a part of the spec. As far as I could tell, only
blob_versioned_hashesand the gas field is. I asked @mattsse for direction in case he knew, but ultimately we didn't land on anything.This is a breaking change for obvious reasons, and it not simply a "import new type" migration path, as I also ported over
CallInputforTransactionRequestPR Checklist