fix(antd): plumb evm_defaults through prepare_upload; bump evmlib 0.8.1#32
Merged
Merged
Conversation
build_prepare_response now sources rpc_url + token/vault addresses from evm_defaults::resolve(network) rather than raw env vars, so a mainnet antd launched with only the network preset returns the right addresses to external signers (was returning empty token and 127.0.0.1:8545, making approve() revert at the zero address). evm_defaults now pulls addresses from evmlib::Network accessors instead of duplicated literals — the constants had drifted after the merkle / single-node payment vault unification, and were the cause of the earlier wrong-vault bug. evmlib 0.8.0 -> 0.8.1 (WithAutonomi/evmlib#9) fixes a WrongPoolCount revert in payForMerkleTree for odd-depth merkle trees (chunk counts in the bands 5-8, 17-32, 65-128). Inherited transitively; ant-core stays pinned at ant-cli-v0.2.0. Validated end-to-end on mainnet: 0.0352 ANT external-signer wave-batch upload via indelible, byte-for-byte readback (SHA256 match). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prepare_uploadto return correct mainnet EVM addresses (rpc_url, token, vault) by routing throughevm_defaults::resolveinstead of reading rawEVM_RPC_URL/EVM_PAYMENT_TOKEN_ADDRESS/EVM_PAYMENT_VAULT_ADDRESSenv vars. Previously a mainnet antd launched with only the network preset returned an empty token addr +http://127.0.0.1:8545RPC, causing external signers (e.g. indelible) to call ERC-20approveagainst the zero address and revert at gas estimation.evm_defaultsto source addresses fromevmlib::Networkaccessors instead of duplicated constants. The literals had drifted after the merkle / single-node payment vault unification.evmlib0.8.0 → 0.8.1 (fix: correct midpoint level so odd-depth uploads don't revert evmlib#9) — fixesWrongPoolCountrevert inpayForMerkleTreefor odd-depth merkle trees. Inherited transitively;ant-corestays pinned atant-cli-v0.2.0.Test plan
cargo test evm_defaults::— 8 pass, including new evmlib accessor cross-checks/v1/files/upload/public)Out of scope
The merkle external-signer path (files ≥65 chunks) has a separate ant-core pool-collection bug — storers reject pools with
candidate pub_keys do not match the network's closest peers to the pool midpoint address. Tracked separately upstream; not part of this fix.🤖 Generated with Claude Code