Skip to content

Add EIP-4844 transaction reading - #177

Merged
alisinabh merged 2 commits into
ExWeb3:mainfrom
BlazeWasHere:eip-4844
Jan 8, 2025
Merged

Add EIP-4844 transaction reading#177
alisinabh merged 2 commits into
ExWeb3:mainfrom
BlazeWasHere:eip-4844

Conversation

@BlazeWasHere

Copy link
Copy Markdown
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?

@alisinabh alisinabh left a comment

Copy link
Copy Markdown
Member

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?

Comment thread lib/ethers/transaction/eip4844.ex Outdated
@BlazeWasHere

BlazeWasHere commented Jan 7, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
@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