Skip to content

Add EIP-4844 transaction reading #177

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

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

BlazeWasHere
Copy link
Contributor

Closes #79

supports reading EIP-4844 transactions (BLObs) from a chain.

@alisinabh to add writing support will require a KZG library might just use https://github.com/ethereum/c-kzg-4844 as a NIF and add writing support in another PR, wdyt?

Copy link
Member

@alisinabh alisinabh left a comment

Choose a reason for hiding this comment

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

Firstly, thank you for taking to time to add this. 🙏

to add writing support will require a KZG library might just use https://github.com/ethereum/c-kzg-4844 as a NIF and add writing support in another PR, wdyt?

TBH I'm not very familiar with the blobs and their encoding. So far I cannot think of a usecase when creating the blob here would be a common usecase. On the other hand, encoding/decoding EIP-4844 transactions can be a common usecase. I suppose we don't need KZG to just encode/decode the transaction right?

@BlazeWasHere
Copy link
Contributor Author

BlazeWasHere commented Jan 7, 2025

Firstly, thank you for taking to time to add this. 🙏

to add writing support will require a KZG library might just use https://github.com/ethereum/c-kzg-4844 as a NIF and add writing support in another PR, wdyt?

TBH I'm not very familiar with the blobs and their encoding. So far I cannot think of a usecase when creating the blob here would be a common usecase. On the other hand, encoding/decoding EIP-4844 transactions can be a common usecase. I suppose we don't need KZG to just encode/decode the transaction right?

Yes agreed, but ethers.js does something similar so it does have its use cases ethers-io/ethers.js#4650 (comment)

Though for the majority of users they will not be sending blob transactions

EIP-4844 txs post blobVersionedHashes which are commitments (references) to the actual blob data, to get the hashes one must use a KZG library

@alisinabh
Copy link
Member

EIP-4844 txs post blobVersionedHashes which are commitments (references) to the actual blob data, to get the hashes one must use a KZG library

Now I understand what you mean. Yeah I think it would be useful to implement that. I would personally like it as an opt-in library (optional) since it is not going to be useful for everyone. We can create a new issue and discuss it there.

@alisinabh alisinabh merged commit 7dd1305 into ExWeb3:main Jan 8, 2025
4 checks passed
@BlazeWasHere BlazeWasHere deleted the eip-4844 branch January 8, 2025 11:11
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.

Investigate EIP-4844 transactions compatibility
2 participants