From f4f18560c5f9425907aa11830fb7ccfc39cf249e Mon Sep 17 00:00:00 2001 From: Nic Date: Fri, 21 Aug 2026 18:47:40 +0100 Subject: [PATCH] feat(evm): re-export batched merkle payment surface from evmlib Adds MerkleTreePayment, MAX_TREES_PER_PAYMENT and MERKLE_TREES_PER_PAYMENT to the ant_protocol::evm re-export gate so clients can drive the batched payForMerkleTrees path without a direct evmlib dependency. Carries a draft-only [patch.crates-io] git pin on evmlib#15 until that releases. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 10 ++++++++++ Cargo.lock | 5 ++--- Cargo.toml | 8 +++++++- src/lib.rs | 4 +++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77334fd..141923f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to `ant-protocol` will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/). +## [2.4.0] + +### Added +- Re-export `evmlib::merkle_batch_payment::{MerkleTreePayment, MAX_TREES_PER_PAYMENT, MERKLE_TREES_PER_PAYMENT}` + under `ant_protocol::evm`, so clients can drive the batched `payForMerkleTrees` + payment path (one wallet transaction for up to `MERKLE_TREES_PER_PAYMENT` + merkle trees) without a direct `evmlib` dependency. Client-only surface, same + as the existing `Wallet` re-export; requires the `evmlib` release carrying + WithAutonomi/evmlib#15. + ## [2.3.0] ### Changed diff --git a/Cargo.lock b/Cargo.lock index 33ac654..7d6f223 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -794,7 +794,7 @@ dependencies = [ [[package]] name = "ant-protocol" -version = "2.3.2" +version = "2.4.0" dependencies = [ "alloy", "blake3", @@ -2195,8 +2195,7 @@ dependencies = [ [[package]] name = "evmlib" version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83822a94669e50793b583817ed2681b67d2e7059bae652784d34a6ee40fbfd37" +source = "git+https://github.com/WithAutonomi/evmlib?branch=feat/pay-for-merkle-trees#36d1bd4dfb81b919efa67ee740cdce117a1c9442" dependencies = [ "alloy", "ant-merkle", diff --git a/Cargo.toml b/Cargo.toml index 0486662..df9c808 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ant-protocol" -version = "2.3.2" +version = "2.4.0" edition = "2021" authors = ["MaidSafe Developers "] description = "Wire protocol for the Autonomi decentralized network (WithAutonomi fork)" @@ -70,3 +70,9 @@ expect_used = "deny" panic = "deny" # Allow non-const functions — the constructors may gain runtime behaviour. missing_const_for_fn = "allow" + +# DRAFT-ONLY: compile against the unreleased `payForMerkleTrees` evmlib surface +# (WithAutonomi/evmlib#15). Before this PR leaves draft: remove this patch and +# bump the `evmlib` dependency to the release carrying that PR. +[patch.crates-io] +evmlib = { git = "https://github.com/WithAutonomi/evmlib", branch = "feat/pay-for-merkle-trees" } diff --git a/src/lib.rs b/src/lib.rs index cd47dbc..9a52d1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,7 +92,9 @@ pub use payment::{ /// same `evmlib` major version. pub mod evm { pub use evmlib::common::{Address, Amount, QuoteHash, TxHash, U256}; - pub use evmlib::merkle_batch_payment::PoolCommitment; + pub use evmlib::merkle_batch_payment::{ + MerkleTreePayment, PoolCommitment, MAX_TREES_PER_PAYMENT, MERKLE_TREES_PER_PAYMENT, + }; pub use evmlib::merkle_payments::{ MerklePaymentCandidateNode, MerklePaymentCandidatePool, MerklePaymentProof, MerklePaymentVerificationError, MerkleTree, MidpointProof, CANDIDATES_PER_POOL, MAX_LEAVES,