Skip to content

feat: absorb ant-evm payment types into evmlib#3

Merged
mickvandijke merged 1 commit intomainfrom
feat/merge-ant-evm
Mar 31, 2026
Merged

feat: absorb ant-evm payment types into evmlib#3
mickvandijke merged 1 commit intomainfrom
feat/merge-ant-evm

Conversation

@grumbach
Copy link
Copy Markdown
Contributor

Summary

  • Merges needed types from the external ant-evm crate directly into evmlib
  • Adds data_payments module: EncodedPeerId (native 32-byte), PaymentQuote, ProofOfPayment
  • Adds merkle_payments module: MerklePaymentCandidateNode/Pool/Proof, MerkleTree, MerkleBranch
  • All libp2p and ed25519 signing code stripped — saorsa uses ML-DSA-65 and BLAKE3 PeerIds
  • Unused ant-evm types (AttoTokens, ClientProofOfPayment, EvmError) dropped
  • New deps: xor_name, rmp-serde, tiny-keccak, ant-merkle

Context

ant-node and ant-client both depend on ant-evm (thin wrapper around evmlib) and evmlib simultaneously. ant-evm adds libp2p as a dependency solely for EncodedPeerId encoding, but saorsa uses its own 32-byte PeerId (BLAKE3 of ML-DSA-65 public key). This PR eliminates the wrapper crate and the libp2p dependency by absorbing only the types that consumers actually use.

Test plan

Merge the needed types from the external ant-evm crate directly into
evmlib, eliminating the separate dependency. This adds:

- data_payments module: EncodedPeerId (now [u8; 32] instead of
  libp2p Vec<u8>), PaymentQuote, ProofOfPayment
- merkle_payments module: MerklePaymentCandidateNode/Pool/Proof,
  MerkleTree, MerkleBranch, verify_merkle_proof

All libp2p and ed25519 signing code has been stripped — the saorsa
network uses native 32-byte PeerIds (BLAKE3 of ML-DSA-65 public key)
and ML-DSA-65 signatures instead. Unused ant-evm types (AttoTokens,
ClientProofOfPayment, EvmError) are dropped entirely.

New dependencies: xor_name, rmp-serde, tiny-keccak, ant-merkle.
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.

2 participants