Events & Fingerprinting
Every ZeroStyl contract speaks a common on-chain language so that explorers, indexers, and the
technical dashboard can track privacy activity without ever
seeing a witness. Two primitives make that possible, both defined in the zerostyl-runtime crate:
the standardized ZeroStylPrivacyTransaction event and the bytecode fingerprint.
The ZeroStylPrivacyTransaction event
A single canonical event, emitted by every ZeroStyl contract on an accepted privacy transaction.
event ZeroStylPrivacyTransaction(
bytes32 indexed circuit,
bytes32 indexed nullifier,
bytes32 indexed commitment,
bytes32 merkle_root,
bytes32 proof_hash,
uint256 timestamp
);
Its canonical signature — the string an indexer hashes to get the log topic — is:
ZeroStylPrivacyTransaction(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)
| Field | Type | Indexed | Meaning |
|---|---|---|---|
circuit | bytes32 | yes | Fingerprint of the circuit that produced the proof. |
nullifier | bytes32 | yes | Double-spend marker, unlinkable to the spent commitment. |
commitment | bytes32 | yes | New commitment created by the transaction. |
merkle_root | bytes32 | no | Merkle root the spent note was proven against. |
proof_hash | bytes32 | no | keccak256 of the proof bytes (audit trail). |
timestamp | uint256 | no | Block timestamp (seconds) when recorded. |
topic0
Indexers filter logs by topic0, the keccak256 of the canonical signature:
0x84cd6ecc9e8e48ed1f47bf9ed020f9121737d0802583f74dc7f0fd2749294098
This value is stable and computed as keccak256(SIGNATURE) — the exact digest the runtime exposes
via ZeroStylPrivacyTransaction::topic0(). The indexed fields become additional topics
(topic1..3); the rest are ABI-encoded in the log data.
Bytecode fingerprint
A BytecodeFingerprint is keccak256(bytes) of a circuit's name or deployed bytecode — a
compact, deterministic id for "which circuit produced this proof". The circuit field of the event
carries it, so an indexer can group activity by circuit without any registry lookup.
For example, keccak256("deposit") is:
0x48c73f681176fc7b3f9693986fd7b14581e8d540519e27400e88b8713932be01
You can compute a fingerprint for any name interactively with the dashboard's fingerprint tool.
Deployment status
The demo contracts on Arbitrum Sepolia (see Verifier Integration) record a proof hash and do not emit the standardized event, so there is no live indexer feed. The event schema, topic, and fingerprint are the stable contract that on-chain verification and a live dashboard feed build on.