This guide covers the advanced configuration options available in Argus. For basic setup, see the Quick Start Guide.
Configuration File Structure
Argus configuration is managed through the standard .NET appsettings.json
file. The main sections relevant to Argus are:
{
"ConnectionStrings": {
// Database connection settings
},
"CardanoNodeConnection": {
// Cardano node connection settings
},
"Sync": {
// Synchronization and dashboard settings
}
}
Database Connection
Configure your database connection in the ConnectionStrings
section:
"ConnectionStrings": {
"CardanoContext": "Host=localhost;Database=argus;Username=postgres;Password=password;Port=5432",
"CardanoContextSchema": "cardanoindexer"
}
Connection String Parameters
Parameter | Description | Default |
---|---|---|
Host | PostgreSQL server hostname or IP | Required |
Database | Database name | Required |
Username | Database user | Required |
Password | User password | Required |
Port | PostgreSQL server port | 5432 |
CardanoContextSchema | Database schema | "public" |
Node Connection
Configure your connection to the Cardano blockchain in the CardanoNodeConnection
section:
"CardanoNodeConnection": {
"ConnectionType": "UnixSocket",
"UnixSocket": {
"Path": "/path/to/node.socket"
},
"NetworkMagic": 764824073, // Mainnet
"MaxRollbackSlots": 1000, // Rollback protection
"RollbackBuffer": 10, // Extra safety buffer
"Slot": 139522569, // Starting slot
"Hash": "3fd9925888302fca267c580d8fe6ebc923380d0b984523a1dfbefe88ef089b66" // 🏁 Starting block
}
Connection Types
Argus supports three connection types:
1. gRPC Provider (U5CProvider)
Remote connection using UtxoRPC:
"ConnectionType": "gRPC",
"gRPC": {
"Endpoint": "https://cardano-preview.utxorpc-m1.demeter.run",
"ApiKey": "your_api_key"
}
2. Unix Socket Provider (N2CProvider)
Direct connection to a local Cardano node:
"ConnectionType": "UnixSocket",
"UnixSocket": {
"Path": "/path/to/node.socket"
}
3. TCP Provider (N2NProvider)
Network connection to a remote Cardano node:
"ConnectionType": "TCP",
"TCP": {
"Host": "192.168.1.100",
"Port": 8090
}
Network Magic Values
Set the NetworkMagic
parameter according to your target Cardano network:
Network | Magic Value | Use Case |
---|---|---|
Mainnet | 764824073 | Production applications |
Preview Testnet | 2 | Testing and development |
PreProd Testnet | 1 | Pre-production testing |
Rollback Settings
"MaxRollbackSlots": 1000, // Maximum number of slots to rollback (hard limit)
"RollbackBuffer": 10, // Number of recent intersections to maintain
The MaxRollbackSlots
parameter sets the limit for how far back your chain can potentially roll back during a chain reorganization. This is a security feature that prevents your application from having to process extremely deep chain reorganizations.
The RollbackBuffer
parameter specifies how many recent intersection points (block hash and slot pairs) Argus should maintain. This is critical for the ChainSync protocol to resume synchronization correctly. If you set this too low and the node cannot find any of your saved intersection points in its history, Argus would have to resynchronize from genesis.
Starting Point
You can specify a starting point for synchronization:
"Slot": 139522569, // Starting slot
"Hash": "3fd9925888302fca267c580d8fe6ebc923380d0b984523a1dfbefe88ef089b66" // Block hash at that slot
If omitted, Argus will start synchronization from the genesis block, which will process the entire blockchain history.
Synchronization Settings
Configure synchronization behavior in the Sync
section:
"Sync": {
"Dashboard": {
"TuiMode": true, // Terminal-based UI
"RefreshInterval": 5000, // Update frequency
"DisplayType": "sync" // Dashboard style
}
}
Dashboard Settings
Setting | Description | Default |
---|---|---|
TuiMode | Enable terminal-based dashboard | true |
RefreshInterval | Dashboard refresh interval (ms) | 5000 |
DisplayType | Dashboard display type ("sync" or "detail") | "sync" |
Complete Configuration Example
Here's a complete configuration example with all available options:
{
"ConnectionStrings": {
// Database settings
"CardanoContext": "Host=localhost;Database=argus;Username=postgres;Password=password;Port=5432",
"CardanoContextSchema": "cardanoindexer"
},
"CardanoNodeConnection": {
// Blockchain connection
"ConnectionType": "UnixSocket",
"UnixSocket": {
"Path": "/path/to/node.socket"
},
"NetworkMagic": 764824073,
"MaxRollbackSlots": 1000,
"RollbackBuffer": 10,
"Slot": 139522569,
"Hash": "3fd9925888302fca267c580d8fe6ebc923380d0b984523a1dfbefe88ef089b66"
},
"Sync": {
// Synchronization settings
"Dashboard": {
"TuiMode": true,
"RefreshInterval": 5000,
"DisplayType": "sync"
}
}
}