Skip to content

Add Solana/Anchor port of Vow event attestation protocol#2

Open
open-inspect-reednaa[bot] wants to merge 1 commit intomainfrom
solana-port
Open

Add Solana/Anchor port of Vow event attestation protocol#2
open-inspect-reednaa[bot] wants to merge 1 commit intomainfrom
solana-port

Conversation

@open-inspect-reednaa
Copy link
Copy Markdown

Ports the Vow EVM event attestation protocol to a Solana Anchor program.

Architecture

Solidity file Anchor module
VowLib.sol vow.rs + crypto.rs
WitnessDirectory.sol directory.rs
IWitnessDirectory.sol lib.rs

Key design decisions

  • Byte-identical vow payloads — the same vow_data bytes accepted by VowLib.processVow on Ethereum work on Solana
  • ECDSA secp256k1 — signs via secp256k1_recover syscall, same as EVM witnesses
  • SignerSlot PDAs store 20-byte Ethereum addresses — no Solana keypairs needed
  • Library-first — process_vow_bare() takes raw bytes + caller-provided ETH addresses, with zero Anchor coupling. Downstream programs can import and compose it, matching the Solidity VowLib pattern
  • Viem + ESNext/NodeNext TypeScript config for tests

Ports VowLib.sol, WitnessDirectory.sol, and IWitnessDirectory.sol
to an Anchor program with byte-identical vow payload support.

- ECDSA secp256k1 signature recovery via secp256k1_recover syscall
- EVM event encode/decode (emitter | topic_count | topics | data)
- Merkle tree verification with sorted-pair keccak256 hashing
- EIP-712 bare-domain typed data hash for witness signatures
- SignerSlot PDAs store 20-byte Ethereum addresses
- process_vow_bare() library function (no Anchor coupling) for
  composability into downstream programs
- TypeScript tests using Viem with ESNext/NodeNext configuration
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.

1 participant