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

tx.toJSON doesn't include 4844 related data #3310

Closed
acolytec3 opened this issue Mar 9, 2024 · 1 comment · Fixed by #3365
Closed

tx.toJSON doesn't include 4844 related data #3310

acolytec3 opened this issue Mar 9, 2024 · 1 comment · Fixed by #3365

Comments

@acolytec3
Copy link
Contributor

I discovered while working on my blobs4every1 project that the implementation of .toJSON in the BlobEIP4844Transaction class doesn't put the versionedHashes field in the JSON object.

We should consider updating the toJSON implementation for BlobEIP4844Transaction to include all the 4844 fields (or some subset of them). We should also think about adding a networkWrapperToJSON function that creates a JSON object with the blobs, commitments, proof, and versioned hashes as well.

@acolytec3
Copy link
Contributor Author

So after conversation with @scorbajio and a review of the relevant piece of the transaction in the execution APIs, I think our current JSON object for blob transactions is probably valid, with the exception of maybe adding blobs as its own field (though that isn't in the 4844 transaction type but a field on the GenericTransaction spec at the bottom so not sure entirely what that means).

I still think it be fruitful to produce a networkWrapperToJson that extends the toJSON function on the 4844 transaction type and adds the blobs, commitments, and proof fields as hexadecimal strings. That would be a nice additional tool for people wanting to create transactions to broadcast to the network. Additionally, we could update blobs4every1 to use this as a demo of how it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants