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.json
The audit functionality runs as a single operation, evaluating compliance up to the current block height:
pmonitor audit
If 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
pmonitor
config 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 whether the wallet is compliant.
- The path to the default
pmonitor
home 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 ๐