ethereum / web3.py

A python interface for interacting with the Ethereum blockchain and ecosystem.
http://web3py.readthedocs.io
MIT License
4.89k stars 1.67k forks source link

Add blob / eip-4844 KZG verifications for sending type 3 transactions #3391

Closed PatrickAlphaC closed 1 month ago

PatrickAlphaC commented 1 month ago

What feature should we add?

Right now, it's very unclear how one could easily send a type 3 / EIP-4844 transaction. It would be great if there was something like:

w3.build_blob_transactions({
# params here...
})

Where someone could submit their blob data and they'd get a valid tx they could send.

With this, it might make sense to expose the functions defined here so users could also verify any KZG stuff they do.

fselmo commented 1 month ago

Hey @PatrickAlphaC. The eth-account implementation has a pretty powerful API that allows for submitting blob data along with signed transactions, and this is exposed via web3.eth.account. Does this blog post help with type 3 tx use? Would you like to see it made simpler? If so, how?

PatrickAlphaC commented 1 month ago

This was very helpful, thank you!

Maybe we could add this example to the docs?

fselmo commented 1 month ago

Maybe we could add this example to the docs?

100%... the docs are getting some much needed love and re-organization right now but this definitely needs to make its way in there. Safe to close this? 👀

PatrickAlphaC commented 1 month ago

Go for it!