Skip to content

feat(apis/vara-eth): add support for uploading codes in EIP-7594 format#2405

Merged
StackOverflowExcept1on merged 21 commits intomainfrom
av/fix-upload-code
Apr 2, 2026
Merged

feat(apis/vara-eth): add support for uploading codes in EIP-7594 format#2405
StackOverflowExcept1on merged 21 commits intomainfrom
av/fix-upload-code

Conversation

@StackOverflowExcept1on
Copy link
Copy Markdown
Member

@StackOverflowExcept1on StackOverflowExcept1on commented Mar 28, 2026

This works in apis/vara-eth and passes all tests. It also fixes the blob codec to support codes larger than 128 KiB (this is AI-generated code, so it would be nice to test it).

Currently, this fix in apis/vara-eth relies on wevm/viem#4022. I forked viem here and resolved all merge conflicts: https://github.com/StackOverflowExcept1on/viem/tree/feat/eip-7594-support-for-blob-txs. It would be nice to create our own package like @vara-eth/viem and use it everywhere instead of the current fork.

As for the frontend, since apis/vara-eth uses kzg-wasm, we need to load this .wasm in the browser. It works in production builds, but is broken in yarn start (dev builds). Therefore, I added serveKzgWasmFromViteCachePath as a temporary solution. kzg-wasm also doesn't work well with nodePolyfills(): ethereumjs/kzg-wasm#28, so I disabled process in nodePolyfills(). This is also a temporary solution, so we need to somehow make the frontend configs configurable.

There is also an issue that MetaMask currently doesn't support EIP-4844 transactions: MetaMask/core#8331. I think we could solve this based on this context:

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements code validation functionality, including a new frontend upload feature and updates to the RouterClient to support EIP-4844 transactions. Key changes involve adding the UploadCodeButton component, the useUploadCode hook, and updating the viem dependency to a specific PR build across multiple packages. Review feedback focuses on the risks of using non-standard dependency versions and wildcard peer dependencies, a potential race condition in the frontend transaction logic, and the importance of maintaining a pinned Rust toolchain for build reproducibility. Suggestions were also made to improve error handling and avoid hardcoding transaction parameters.

Comment thread apis/vara-eth/package.json
Comment thread apis/vara-eth/package.json Outdated
Comment thread idea/gear/faucet/package.json Outdated
Comment thread idea/vara-eth/frontend/package.json Outdated
Comment thread idea/vara-eth/frontend/src/features/codes/lib/use-upload-code.ts Outdated
Comment thread idea/vara-eth/indexer/package.json Outdated
Comment thread apis/vara-eth/src/eth/router.ts
Comment thread idea/vara-eth/frontend/src/features/codes/lib/use-upload-code.ts Outdated
Comment thread rust-toolchain.toml
Comment thread apis/vara-eth/test/router.test.ts
@osipov-mit osipov-mit requested a review from vraja-nayaka March 31, 2026 09:36
Comment thread utils/frontend-configs/src/vite.ts Outdated
@StackOverflowExcept1on StackOverflowExcept1on changed the title feat(apis/vara-eth, idea/vara-eth): return back button for uploading codes feat(apis/vara-eth): add support for uploading codes in EIP-7594 format Mar 31, 2026
@StackOverflowExcept1on StackOverflowExcept1on removed the request for review from nikitayutanov March 31, 2026 15:33
@StackOverflowExcept1on StackOverflowExcept1on marked this pull request as ready for review April 1, 2026 11:17
@StackOverflowExcept1on StackOverflowExcept1on removed the D1-idea Gear Idea label Apr 1, 2026
@StackOverflowExcept1on StackOverflowExcept1on merged commit e9fd7ab into main Apr 2, 2026
14 checks passed
@StackOverflowExcept1on StackOverflowExcept1on deleted the av/fix-upload-code branch April 2, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants