Expand description
The pmonitor tool tracks the balances of Penumbra wallets, as identified
by a FullViewingKey (FVK), in order to perform auditing. It accepts a JSON file
of FVKs and a pd gRPC URL to initialize:
pmonitor init --grpc-url http://127.0.0.1:8080 --fvks fvks.jsonThe audit functionality runs as a single operation, evaluating compliance up to the current block height:
pmonitor auditIf regular auditing is desired, consider automating the pmonitor audit action via
cron or similar. pmonitor will cache view databases for each tracked FVK, so that future
audit actions need only inspect the blocks generated between the previous audit and the
current height.
Modulesยง
- config ๐
- Logic for reading and writing config files for
pmonitor, in the TOML format. - genesis ๐
- Logic for inspecting the [CompactBlock] at genesis of the target chain.
Used to compute balances for tracked FVKs at genesis time. The initial genesis balance is
stored in the
pmonitorconfig file, so that audit actions can reference it.
Structsยง
Enumsยง
Constantsยง
- ALLOWED_
DISCREPANCY ๐ - The permitted difference between genesis balance and current balance, specified in number of staking tokens.
- MAX_
CB_ ๐SIZE_ BYTES - The maximum size of a compact block, in bytes (12MB).
- VIEW_
FILE_ ๐NAME - The name of the view database file
Functionsยง
- check_
wallet_ ๐compliance - Check whether the wallet is compliant.
- default_
home - The path to the default
pmonitorhome directory. - emit_
summary_ ๐message - Prepare a human-readable text summary at the end of the audit run. This is important, as errors logged during scanning are likely to be off-screen due to backscroll.
- init_
tracing ๐ - Configure tracing_subscriber for logging messages
- main ๐