A STARK-based system for proving that Bitcoin transactions contain legitimate cryptographic material rather than arbitrary spam data.
Bitcoin transactions increasingly contain arbitrary data disguised as legitimate script elements, particularly in Taproot outputs where spammers create fake Taproot trees. Current filtering approaches either allow spam through or break legitimate use cases like BitVM.
PONS implements computational integrity proofs using STARKs to verify that transaction outputs contain valid cryptographic structures. Transaction creators generate proofs attesting to the legitimacy of their script elements. Nodes can verify these proofs to filter spam without examining transaction content.
Examples of valid / non spam materials that could be theoretically proven via a system like PONS:
- Schnorr public keys: Prove knowledge of corresponding private key
- Hash preimages: Prove knowledge of data hashing to claimed values
- Taproot scripts: Prove leaf scripts are valid Bitcoin Script, not arbitrary bytes
- Merkle roots: Prove correspondence to actual Merkle trees of valid elements
Potential integration with Bitcoin infrastructure:
- Mempool policy: Nodes could require proofs for relay
- Mining software: Prioritize transactions with valid proofs
- Light clients: Verify proofs instead of full script validation
The system is composed of three main components that operate off-chain.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ pons_cli │ │ pons_stark │ │ pons_relay │
│ (Rust) ├─────►│ (Cairo) ├─────►│ (Rust) │
│ │ │ │ │ │
│ • Key Management│ │ • STARK Prover │ │ • Proof Verify │
│ • TX Building │ │ • Cairo Program │ │ • TX Relay │
│ • Proof Orchestr│ │ • Sig Verify │ │ • Mempool Policy│
└─────────────────┘ └─────────────────┘ └─────────────────┘
▲ │ ▼
│ (User Input) │ (Proof Generation) │ (To Bitcoin Network)
│ ▼ │
┌───────┴─────────────────────────────────────────────┴───────┐
│ Transaction Flow │
│ User -> CLI -> Prover -> Relay -> Bitcoin Network (if valid)│
└─────────────────────────────────────────────────────────────┘
- pons_stark: Cairo program that verifies Schnorr signatures and generates STARK proofs
- pons_cli: Rust CLI for keypair generation, signing, and proof orchestration
- pons_relay: Rust HTTP server that verifies STARK proofs and relays valid transactions
This project is a proof-of-concept and is highly experimental. It is published for research and educational purposes to demonstrate a potential application of STARKs for filtering transaction data on Bitcoin.
DO NOT use this software in a production environment or with real Bitcoin transactions.
Please be aware of the following limitations in the current implementation:
-
Illustrative use case only: The current system only proves the validity of a single public key. This use case was chosen as a foundational example to demonstrate the end-to-end architecture. In a real-world scenario, verifying a public key this way is completely overkill, as it could be done without a validity proof. The overhead in terms of proof generation time and size is substantial and not practical for this simple task alone. A meaningful, real-world application would require extending the proof to cover the validity of an entire Taproot tree. This would involve proving that each leaf contains a valid Bitcoin Script instead of arbitrary data, which in turn would necessitate a significantly more complex Cairo program.
-
Computational integrity, not Zero-Knowledge: The proofs generated by PONS are STARKs, not ZK-STARKs. They provide computational integrity, proving that the verification computation was executed correctly, but they do not provide privacy. The data being proven (e.g., the public key) is not hidden by the proof. The zero-knowledge aspect is outside the current scope of the project.
- Python 3.10 (required for Garaga)
- Rust nightly-2025-01-02 (required for Stwo)
- Scarb nightly (Cairo toolchain)
# Install dependencies
python3.10 -m pip install garaga
# Clone and build
git clone https://github.com/AbdelStark/pons.git
cd pons
# Build components
cd pons_stark && scarb build && cd ..
cd pons_cli && cargo build --release && cd ..
# Run end-to-end test
./test_e2e.sh# Interactive demo (recommended for first-time users)
./demo.sh
# Generate keypair
./pons_cli/target/release/pons-cli keygen --output keypair.json
# Sign message
./pons_cli/target/release/pons-cli sign --keypair keypair.json --message "Hello PONS!"
# Generate STARK proof (requires cairo-prove)
cairo-prove prove pons_stark/target/dev/pons_stark.executable.json proof.json --arguments-file args.json# Interactive demo with visual feedback
./demo.sh
# Automated end-to-end test
./test_e2e.sh
# Demo mode test (with pauses and enhanced visuals)
./test_e2e.sh --demo
# Individual component tests
cd pons_stark && scarb test # Cairo tests
cd pons_cli && cargo test # Rust testsMIT License - see LICENSE file for details.
PONS stands for both Proof Of Non-Spam and POneglyph Node Service 🏴☠️
Like the indestructible Poneglyphs from One Piece that contain the true history of the world, PONS creates immutable cryptographic proofs that distinguish authentic Bitcoin transactions from the "fake history" of spam data. Just as only those with special knowledge can read the ancient scripts, only valid cryptographic material can generate the STARK proofs that PONS recognizes.
The truth cannot be faked, only proven.