queryNetwork/genesisConfiguration
Query the genesis configuration for a specific era
Query the genesis configuration for a specific Cardano era. Genesis configuration contains fundamental network parameters that were set at the start of each era.
Request
{
"jsonrpc": "2.0",
"method": "queryNetwork/genesisConfiguration",
"params": {
"era": "shelley"
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
era | string | Yes | Era to query: byron, shelley, alonzo, or conway |
Loading...
Response (Shelley Era)
{
"jsonrpc": "2.0",
"method": "queryNetwork/genesisConfiguration",
"result": {
"era": "shelley",
"networkMagic": 764824073,
"network": "mainnet",
"startTime": "2020-07-29T21:44:51Z",
"securityParameter": 2160,
"epochLength": 432000,
"slotsPerKesPeriod": 129600,
"maxKesEvolutions": 62,
"slotLength": { "milliseconds": 1000 },
"updateQuorum": 5,
"maxLovelaceSupply": 45000000000000000,
"initialParameters": {
"minFeeCoefficient": 44,
"minFeeConstant": { "ada": { "lovelace": 155381 } },
"maxBlockBodySize": { "bytes": 65536 },
"maxBlockHeaderSize": { "bytes": 1100 },
"maxTransactionSize": { "bytes": 16384 },
"stakeCredentialDeposit": { "ada": { "lovelace": 2000000 } },
"stakePoolDeposit": { "ada": { "lovelace": 500000000 } },
"stakePoolRetirementEpochBound": 18,
"desiredNumberOfStakePools": 500,
"stakePoolPledgeInfluence": "3/10",
"monetaryExpansion": "3/1000",
"treasuryExpansion": "1/5",
"extraEntropy": "neutral"
}
}
}Response Fields
Core Network Parameters
| Field | Type | Description |
|---|---|---|
era | string | Era of this configuration |
networkMagic | number | Network identifier (764824073 for mainnet) |
network | string | Network name (mainnet or testnet) |
startTime | string | ISO 8601 timestamp of era start |
securityParameter | number | Number of blocks for finality (k=2160) |
epochLength | number | Slots per epoch (432000 = 5 days) |
slotLength | object | Duration of each slot |
Key Evolving Signature (KES) Parameters
| Field | Type | Description |
|---|---|---|
slotsPerKesPeriod | number | Slots per KES period (129600 = 36 hours) |
maxKesEvolutions | number | Maximum KES evolutions (62) |
KES keys must be renewed every ~93 days (slotsPerKesPeriod × maxKesEvolutions / epochLength).
Code Examples
async function getGenesisConfig(era = 'shelley') {
const response = await fetch('https://api.nacho.builders/v1/ogmios', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': process.env.NACHO_API_KEY
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'queryNetwork/genesisConfiguration',
params: { era }
})
});
const { result } = await response.json();
return result;
}
const genesis = await getGenesisConfig('shelley');
console.log('Network:', genesis.network);
console.log('Start time:', genesis.startTime);
console.log('Max ADA supply:', genesis.maxLovelaceSupply / 1_000_000);Era-Specific Information
Alonzo Era (Smart Contracts)
The Alonzo genesis includes Plutus script parameters:
const alonzoGenesis = await getGenesisConfig('alonzo');
console.log('Cost models:', alonzoGenesis.plutusCostModels);
console.log('Collateral percentage:', alonzoGenesis.collateralPercentage);Conway Era (Governance)
The Conway genesis includes governance parameters for CIP-1694:
const conwayGenesis = await getGenesisConfig('conway');
console.log('DRep voting threshold:', conwayGenesis.dRepVotingThreshold);
console.log('Committee size:', conwayGenesis.committeeSize);Genesis configuration is immutable. Current protocol parameters may differ from initial values. Use queryLedgerState/protocolParameters for current settings.
Use Cases
- Network identification - Verify mainnet vs testnet
- Time calculations - Convert between slots and timestamps
- KES key management - Calculate KES period expirations
- SDK configuration - Initialize Cardano libraries
Full Ogmios API Reference
Was this page helpful?