Public Parameters (PP) are the cryptographic foundation of a Token Management System (TMS). They define the rules of the token system, including the cryptographic curves, generators, and authorized participants (issuers, auditors).
This document describes the lifecycle of public parameters in Panurus, from generation to dynamic updates.
Public parameters are generated using the tokengen CLI tool. The generation process is driver-specific because different drivers require different cryptographic setups.
# Generate FabToken public parameters
tokengen gen fabtoken.v1 --auditors ./msp/auditor --issuers ./msp/issuer --output ./params
# Generate ZKAT-DLOG public parameters
tokengen gen zkatdlognogh.v1 --curve bls12_381_bbs --idemix-issuer-pk ./msp/idemix --output ./params- FabToken: Focuses on auditor and issuer identities (X.509).
- DLOG w/o Graph Hiding: Includes Pedersen generators, range proof parameters, and Idemix issuer keys for privacy.
The publication mechanism varies depending on the network driver being used (Fabric vs. FabricX).
In a standard Hyperledger Fabric network, public parameters are managed by the Token Chaincode (TCC).
- Embedding: The parameters are typically embedded into the TCC source code (
params.go) or provided as transient data during chaincodeInit/Upgrade. - Ledger State: The TCC writes the parameters to a specific "Setup Key" in its world state.
- Validation: The TCC uses these parameters to validate all incoming token requests.
In FabricX, public parameters are managed through a dedicated Public Parameters Service and the Vault.
- Publication: Parameters are written to the ledger under a well-known setup key within the token namespace.
- Query Service: FSC nodes use the
FabricXQuery Service to fetch these parameters directly from the vault's world state.
When an FSC node starts or connects to a TMS, it must fetch the current public parameters to initialize its local drivers.
- Fetching: The node uses the
PublicParamsFetcher(provided by the Network Service) to query the ledger (via TCC or the Query Service). - Local Cache: Fetched parameters are cached in the node's local
PublicParametersStorageto ensure they are available even if the network is temporarily unreachable.
Panurus supports dynamic synchronization of public parameter updates across the entire network without requiring node restarts.
The Network Service is responsible for monitoring the ledger for changes to the public parameters.
- Event Listening: For each connected TMS, the Network Service registers a
PermanentLookupListener(using thesetupListener) on the Setup Key. - Notification: When a transaction updates the public parameters on the ledger (e.g., rotating an auditor's key or upgrading the protocol), the underlying blockchain platform triggers an event.
- Auto-Reload: The
setupListenerreceives the new raw parameters and triggersTMSProvider.Update(tmsID, newParams). - Driver Refresh: The node transparently unloads the old driver instance and hot-swaps it with a new instance configured with the updated parameters.
| Stage | Tool/Component | Responsibility |
|---|---|---|
| Generation | tokengen |
Creates the cryptographic blob for a specific driver version. |
| Publication | tcc (Fabric) / Vault (FabricX) |
Persists the blob to the ledger's world state. |
| Monitoring | Network Service | Listens for ledger events on the Setup Key. |
| Synchronization | TMSProvider |
Hot-swaps the driver instance in the FSC node upon update. |