Skip to content

Plugin Overview

VIZ Ledger uses the AppBase plugin framework. Each plugin has a lifecycle (plugin_initializeplugin_startupplugin_shutdown), may register JSON-RPC methods, may store data in the chainbase database, and may subscribe to chain signals (e.g., applied_block).


Plugin Categories

CategoryDescription
CoreRequired for any node operation
InfrastructureNetworking, web server, snapshots
APIExpose JSON-RPC endpoints for clients
IndexIndex chain data into chainbase for fast queries
ProducerBlock signing and production
Debug/TestDevelopment only; not for production

Plugin Inventory

Core

PluginStatusDepsJSON-RPC
chainRequiredjson_rpc
json_rpcRequired

Infrastructure

PluginStatusDepsJSON-RPC
webserverRequired for APIjson_rpc
p2pRequired for networkchain
snapshotRecommendedchain
validator_guardRecommended for validatorschain, p2p

API

PluginStatusDepsJSON-RPC
database_apiActivejson_rpc, chainYes
network_broadcast_apiActivejson_rpc, chain, p2pYes
validator_apiActivejson_rpc, chainYes
account_by_keyActivejson_rpc, chainYes
account_historyActivejson_rpc, chain, operation_historyYes
operation_historyActivejson_rpc, chainYes
committee_apiActivejson_rpc, chainYes
invite_apiActivejson_rpc, chainYes
paid_subscription_apiActivejson_rpc, chainYes
custom_protocol_apiActivejson_rpc, chainYes
auth_utilActivejson_rpc, chainYes
block_infoActivejson_rpc, chainYes
raw_blockActivejson_rpc, chainYes

Producer

PluginStatusDepsJSON-RPC
validatorActivechain, p2p

Debug / Test

PluginStatusDepsJSON-RPC
test_apiTest onlyjson_rpc

Core Plugins

chain

Manages the chainbase database, applies blocks and transactions, and emits signals to all other plugins.

Key config options:

OptionDefaultDescription
shared-file-size2GInitial shared memory file size
shared-file-dirstateDirectory for shared memory files
inc-shared-file-size2GGrowth increment when space is low
min-free-shared-file-size500MTrigger auto-grow below this threshold
flush-state-interval10000Force flush to disk every N blocks
skip-virtual-opsfalseSkip virtual operations (reduces memory)
dlt-block-log-max-blocks100000Rolling DLT block log capacity

Key CLI flags:

FlagDescription
--replay-from-snapshotImport snapshot then replay DLT block log (crash recovery)
--snapshot-auto-latestAuto-discover latest snapshot in snapshot-dir
--auto-recover-from-snapshotEnable automatic recovery from shared memory corruption
--resync-blockchainWipe chainbase and block log; start from genesis or snapshot

json_rpc

Framework plugin; no config. Registers and dispatches all JSON-RPC methods. Must be loaded first.

All JSON-RPC requests use the 2.0 format:

json
{
  "jsonrpc": "2.0",
  "method": "api_name.method_name",
  "params": {},
  "id": 1
}

Infrastructure Plugins

webserver

HTTP and WebSocket server that forwards requests to json_rpc. Includes a read-only response cache.

Key config options:

OptionDefaultDescription
webserver-http-endpointHTTP listen address (e.g., 0.0.0.0:8090)
webserver-ws-endpointWebSocket listen address (e.g., 0.0.0.0:8091)
webserver-thread-pool-size32Worker threads for HTTP/WS handling
webserver-cache-enabledtrueEnable response caching
webserver-cache-size10000Maximum cached entries

Cache keys are derived from method + params (not id), preventing bypass by rotating the request id. Mutating methods (network_broadcast_api.*) are never cached. The cache clears on each new applied block.

See Webserver for full details.


p2p

DLT P2P networking — block and transaction propagation, peer management, minority fork recovery.

Key config options:

OptionDefaultDescription
p2p-endpointListen address (e.g., 0.0.0.0:2001)
seed-nodeStatic seed peer(s)
p2p-max-connectionsMaximum simultaneous connections
dlt-block-log-max-blocks100000Rolling DLT log capacity
dlt-stats-interval-sec300Peer stats log interval

See P2P Overview for the full P2P architecture.


snapshot

Snapshot creation, loading, and P2P snapshot sync for fast bootstrap and crash recovery.

See Snapshot and Plugin: Snapshot for details.


API Plugins

database_api

Primary read API. Query blocks, transactions, accounts, chain state, hardfork version, delegations, proposals.

See Database API for the full method reference.


network_broadcast_api

Submit and broadcast signed transactions and blocks.

MethodDescription
broadcast_transactionSubmit a transaction (async)
broadcast_transaction_synchronousSubmit and wait for inclusion in a block
broadcast_transaction_with_callbackSubmit with callback on inclusion or expiry
broadcast_blockSubmit a signed block (validators only)

validator_api

Query validator state: active set, schedule, individual validators, vote rankings.

MethodDescription
get_active_validatorsCurrent 21-validator active set
get_validator_scheduleFull schedule object
get_validatorsValidators by database IDs
get_validator_by_accountSingle validator by account name
get_validators_by_voteValidators sorted by total vote weight
get_validators_by_counted_voteValidators sorted by counted vote weight
get_validator_countTotal number of registered validators
lookup_validator_accountsList validator account names by prefix

account_by_key

Reverse-lookup accounts by public key.

MethodDescription
get_key_referencesGet account names that use given public keys

account_history

Per-account operation history, paginated.

MethodDescription
get_account_history(account, from, limit)Get operations; from=-1 returns newest; max 1000 per call

Config options:

  • track-account-range — account name range to index (default: all accounts)
  • history-count-blocks — retain N blocks of history

operation_history

All-operations index for block-level and transaction queries.

MethodDescription
get_ops_in_block(block_num, virtual_ops)Operations in a block; virtual_ops=true includes virtual ops
get_transaction(tx_id)Transaction by ID

Config options:

  • history-whitelist-ops / history-blacklist-ops — filter which op types are stored
  • history-start-block — start indexing from this block number
  • history-count-blocks — retain N blocks of history

committee_api

Query committee worker requests and votes.

MethodDescription
get_committee_request(id)Request by ID
get_committee_request_votes(id)Votes on a request
get_committee_requests_list(from, limit, status)Paginated request list

invite_api

Query active invite codes.

MethodDescription
get_invites_listAll invite IDs
get_invite_by_id(id)Invite by database ID
get_invite_by_key(pub_key)Invite by public key

Query subscription offerings and subscriber status.

MethodDescription
get_paid_subscriptionsAll active subscription offerings
get_paid_subscription_options(account)Subscription config for an account
get_paid_subscription_status(subscriber, account)Status of a specific subscription
get_active_paid_subscriptions(subscriber)Active subscriptions for a subscriber
get_inactive_paid_subscriptions(subscriber)Expired subscriptions

Producer Plugin

validator

Block signing and production. Runs a 250 ms timer loop; produces when the next slot is assigned to a configured validator account.

Key config options:

OptionDefaultDescription
validatorValidator account name(s)
private-keyWIF private key(s) for signing
emergency-private-keyEmergency consensus signing key
enable-stale-productionfalseProduce even when chain is stale (testnet only)
required-participation3300Min participation in basis points (3300 = 33%)
fork-collision-timeout-blocks21Deferrals before forcing production past a collision

required-participation is always in basis points (0–10000 = 0%–100%).

See Validator Plugin for full production timing and fork handling details.


Minimal API node

ini
plugin = chain
plugin = json_rpc
plugin = webserver
plugin = p2p
plugin = database_api
plugin = network_broadcast_api

Full API node

ini
plugin = chain
plugin = json_rpc
plugin = webserver
plugin = p2p
plugin = database_api
plugin = network_broadcast_api
plugin = validator_api
plugin = account_by_key
plugin = account_history
plugin = operation_history
plugin = committee_api
plugin = invite_api
plugin = paid_subscription_api

Validator node

ini
plugin = chain
plugin = p2p
plugin = validator
plugin = json_rpc
plugin = webserver
plugin = database_api
plugin = network_broadcast_api
plugin = validator_api
plugin = snapshot

snapshot-every-n-blocks = 28800
snapshot-dir = /data/snapshots
dlt-block-log-max-blocks = 100000

See also: Chain Plugin, Validator Plugin, Snapshot Plugin, P2P Overview, JSON-RPC API.