OpenLens v0.3.0 — Verify with Consensus
Verify with Consensus
Check on-chain events using math + majority agreement — no payments, no trust, no excuses.
✅ This is not a product. It's a promise:
"You deserve to know the truth — without asking permission."
This tool is free because knowledge should be free.
Verifies blockchain events by:
- Asking 3 independent RPCs for the same data
- Checking they all agree (if not → security alert)
- Proving the receipt exists mathematically (MPT proof when available)
- Verifying the event signature matches
No API keys. No subscriptions. No daemon. No trust.
The blockchain ethos is "don't trust, verify" — but verification has become gatekept by infrastructure costs. Running an Ethereum full node requires hundreds of GB of storage and significant bandwidth. Commercial RPC providers charge for API access or impose rate limits. Light clients are still experimental.
OpenLens makes verification practically possible for everyone:
- ✅ Zero-cost: No API keys, no subscriptions, no hidden dependencies
- ✅ Self-contained: Proofs can be cached and re-verified offline
- ✅ Lightweight: <10 MB RAM, works on Raspberry Pi
- ✅ Open-source: MIT licensed, fork-friendly, community-owned
- ✅ Educational: Clear code and examples to understand how verification works
This is a public good project, not a product.
# Clone the repository
git clone https://github.com/openlens/openlens.git
cd openlens
# Install (requires Python 3.9+)
pip install .# Verify any transaction (uses 3 RPC quorum by default)
openlens verify \
--tx 0x1c08d40f5e48299cc6d94bf8b9edb15c09bc7fffff2a3cf2c13ea9a31b4e8b8e \
--event "Transfer(address,address,uint256)" \
--chain ethereum
# Output:
# ✅ VERIFIED (Level: HIGH)
# 3/3 RPCs agree | MPT proof confirmed | Event signature matchesThat's it. Simple, honest verification.
OpenLens is trust-minimized, not trustless. Here's exactly what we verify cryptographically and what we currently trust:
| Verification | How It Works | Trust Required |
|---|---|---|
| Event Signature | Computes keccak256 of event signature, matches against log topic[0] | None - pure cryptography |
| Bloom Filter | Verifies log address and topics appear in receipt's bloom filter | None - deterministic algorithm |
| Receipt Structure | Validates receipt has all required fields and succeeded | None - data validation |
| Block Header (Trustless Mode) | RLP-encodes header fields, computes keccak256, matches block hash | You verify 1 block hash from multiple sources |
| Data | Current Status | Reason | Roadmap |
|---|---|---|---|
| Receipt Content | ❌ Not cryptographically proven | Requires MPT proof from receiptsRoot |
✅ Planned for v0.3 |
| Log Data | ❌ Not cryptographically proven | Logs are inside receipt (see above) | ✅ Planned for v0.3 |
| Transaction Ordering | ❌ Not cryptographically proven | Would require full MPT traversal | ✅ Planned for v0.4 |
What this means in practice:
- ✅ We CAN detect if RPC sends you a log with the wrong event signature or address
- ✅ We CAN detect if RPC gives you a block header that doesn't match the block hash you verified
- ❌ We CANNOT detect if RPC fabricates an entire log with a matching event signature (requires MPT proof)
- ❌ We CANNOT detect if RPC gives you the wrong receipt for a transaction (requires MPT proof)
- Use multiple RPC providers - Verify same transaction from 2-3 different RPCs
- Verify block hash independently - Check Etherscan + your own node + another RPC
- Use
--trustlessmode - Verifies block headers cryptographically - Run your own archive node - Full control (when MPT proofs are implemented)
- Wait for v0.3+ - Full MPT proof verification (see roadmap below)
By default, OpenLens uses free public RPCs. You can override these:
# Via CLI flag
openlens verify --tx 0x... --event "Transfer(...)" --rpc https://your-rpc-url.com
# Via environment variable
export OPENLENS_RPC_ETHEREUM=https://your-ethereum-rpc.com
export OPENLENS_RPC_BASE=https://your-base-rpc.com
openlens verify --tx 0x... --event "Transfer(...)"When you verify a log event, OpenLens:
-
Fetches blockchain data via RPC:
- Transaction receipt (contains logs)
- Block header (contains cryptographic roots)
-
Locates the specific log:
- Computes expected topic[0]:
keccak256("Transfer(address,address,uint256)") - Finds matching log in receipt
- Computes expected topic[0]:
-
Verifies cryptographically:
- ✅ Log exists at claimed index in receipt
- ✅ Event signature matches (topic[0] verification)
- ✅ Log appears in receipt's Bloom filter (probabilistic check)
- ✅ Receipt integrity (all required fields present, transaction succeeded)
-
Caches proof to
~/.openlens/proofs/for offline re-verification
The path to full trustless verification:
OpenLens has a clear roadmap to achieve full cryptographic verification without trusting RPC providers. This requires implementing Merkle Patricia Trie (MPT) proofs.
Ethereum blocks contain three Merkle Patricia Trie roots:
stateRoot- All account statestransactionsRoot- All transactions in blockreceiptsRoot- All transaction receipts in block
An MPT proof is a cryptographic proof that a specific receipt exists in the receiptsRoot trie. With this, you only need to trust a single block hash (verified from multiple sources), and everything else is mathematically proven.
Phase 1 - v0.2 (CURRENT): Design & Documentation ✅
- Comprehensive MPT algorithm design (
src/openlens/mpt.py) - Trie node decoding pseudocode
- Proof verification algorithm
- Clear documentation of current limitations
Phase 2 - v0.3 (Q2 2025): Basic MPT Implementation 🚧
- Implement trie node decoding (RLP + HP encoding)
- Implement proof verification algorithm
- Integration with archive node RPC providers
- Tests using real blockchain data
Phase 3 - v0.4 (Q3 2025): Light Client Integration 🔮
- Integrate with Helios or similar light client
- Use consensus layer (Beacon Chain) for full verification
- No archive node needed - works with any RPC
Phase 4 - v0.5 (Q4 2025): Production 🚀
- Portal network integration
- Decentralized proof distribution
- Multi-chain support (Optimism, Arbitrum, Polygon)
Verify a log event in a transaction.
openlens verify --tx <hash> --event <signature> [options]Options:
--tx: Transaction hash (required for online mode)--event: Event signature, e.g.,"Transfer(address,address,uint256)"(required for online mode)--chain: Chain to verify on (ethereumorbase, default:ethereum)--rpc: Custom RPC URL (overrides defaults)--proof: Path to cached proof file (for offline verification)--offline: Enable offline mode (requires--proof)--json: Output as JSON (default: human-readable)
Verify Optimism bridge flow (L1→L2).
openlens bridge-check --tx <l1_hash> --l2-tx <l2_hash> [options]Options:
--tx: L1 transaction hash (required)--l2-tx: L2 transaction hash (required)--chain: L2 chain (base, default:base)--l1-rpc: Custom L1 RPC URL--l2-rpc: Custom L2 RPC URL--json: Output as JSON
Export verification proof to file.
openlens export-proof --tx <hash> --event <signature> --output <path> [options]Options:
--tx: Transaction hash (required)--event: Event signature (required)--output: Output file path (required)--chain: Chain (ethereumorbase, default:ethereum)--rpc: Custom RPC URL
OpenLens does one thing well: verify that a specific on-chain event happened as claimed.
We do NOT:
- ❌ Index all blockchain data
- ❌ Provide block explorers or analytics dashboards
- ❌ Aggregate or search across transactions
- ❌ Run servers or databases
We DO:
- ✅ Fetch minimal data needed for cryptographic verification
- ✅ Cache proofs locally for offline access
- ✅ Provide understandable, educational verification
- ✅ Respect user sovereignty (no telemetry, no tracking)
If you need to explore blockchain data, use a block explorer.
If you need to verify data is authentic, use OpenLens.
What you must trust:
- ✅ One block hash - Verified from 2+ independent sources (Etherscan + RPC + your node)
- ✅ RPC provider honesty - For receipt and log content (until MPT proofs in v0.3+)
What you don't need to trust:
- ❌ Third-party indexers or explorers (we verify directly)
- ❌ API aggregators
- ❌ Off-chain databases
- ❌ Event signature correctness (we compute it ourselves)
- ❌ Bloom filter integrity (we verify it against block header)
- Use
--trustlessmode - Cryptographically verify block headers - Query multiple RPCs - Cross-check same transaction from 2-3 providers
- Verify block hash - Check against Etherscan, another RPC, your own node
- Run your own RPC - Maximum control (archive node for future MPT proofs)
- Inspect the code - OpenLens is fully open-source (MIT license)
See MPT Proof Roadmap above. When MPT proofs are implemented (v0.3+), you will only need to trust a single block hash verified from multiple sources. Everything else will be cryptographically proven.
- Language: Python 3.9+ (for wide compatibility)
- Dependencies (all MIT/BSD licensed):
web3.py- Ethereum RPC clientrlp- RLP encodingeth-hash[pycryptodome]- Keccak-256 hashing
No frameworks, ORMs, or heavy abstractions. Just pure, readable code.
OpenLens is a community project. Contributions welcome:
- Found a bug? Open an issue
- Want a feature? Propose it (aligned with our minimalist philosophy)
- Fixed something? Submit a PR
- Used OpenLens for research? Share your findings
git clone https://github.com/openlens/openlens.git
cd openlens
pip install -e . # Editable install for development- Clarity over cleverness - code should be educational
- Minimalism - no unnecessary dependencies
- Zero telemetry - respect user privacy
- Honest documentation - document limitations transparently
MIT License - See LICENSE for details.
Copyright (c) 2025 OpenLens Contributors
This is a public good. Use it freely. Fork it. Improve it. Make verification accessible.
Built for developers, auditors, and researchers in:
- 🌍 Everywhere
Because verification shouldn't be a luxury.
Have questions, suggestions, or collaboration ideas? Feel free to reach out!
- Email: logiccrafterdz@gmail.com
- Website: https://www.logiccrafterdz.site
- Farcaster: https://farcaster.xyz/esta
- Twitter/X: https://x.com/Arana_lib
No Discord. No Telegram. No "community manager."
Just code, docs, and GitHub issues. Simple.
Don't trust. Verify. 🔍