Spec Reference Guide
This guide provides a detailed reference to the various specifications within the Lava Network. It encompasses the structure and definitions of proposals, specs, API collections, service APIs, and associated extensions. The objective is to ensure that developers, validators, and other stakeholders have a clear and consistent understanding of the configurations and functionalities.
📌 File Structure
🔝 Tree Structure
🗋 JSON (Template)
📖 Section Reference
Each section details specific fields with descriptions and examples.
Proposal (proposal
) 📜
Field | Description | Example |
---|---|---|
title | Title of the proposal. | Add Specs: Solana |
description | Brief description about the purpose of the proposal. | Adding new specification support for relaying Solana data on Lava |
Specifications (specs
) 📘
Field | Description | Example |
---|---|---|
index | A unique identifier for the spec. | JUN1 |
name | A human-readable name for the spec. | juno mainnet |
enabled | Indicates if the spec is active. | true |
imports | An array of other spec indices. Allows one spec to inherit settings from another. | ["COSMOSSDKFULL"] |
reliability_threshold | A system parameter for data reliability. | 268435455 |
data_reliability_enabled | Flag indicating if data reliability is enabled. | true |
block_distance_for_finalized_data | The number of blocks considered safe from chain reorganizations. | 0 |
blocks_in_finalization_proof | Number of blocks in the finality proof. | 1 |
average_block_time | The average time (in ms) taken for a block to be produced. | 6500 |
allowed_block_lag_for_qos_sync | Number of blocks a quality of service sync can lag by. | 2 |
min_stake_provider | Minimum amount a provider needs to stake to offer services. | {"denom": "ulava", "amount": "50000000000"} |
min_stake_client | (deprecated) Minimum amount a client needs to stake to access services. | {"denom": "ulava", "amount": "5000000000"} |
API Collections (api_collections
) 🗂️
Field | Description | Example |
---|---|---|
enabled | Indicates if the API collection is active. | true |
collection_data | Contains data related to the collection. | {"api_interface": "rest", "internal_path": "", "type": "GET", "add_on": ""} |
apis | An array containing details of each API in the collection. | Array of API objects |
headers | Headers to be included in the API requests. | [] |
inheritance_apis | An array of APIs inherited from imported specs. | [] |
parse_directives | Directives to parse the API responses. | [] |
verifications | Contains verification details. | {"name": "chain-id", "values": [ { "expected_value": "juno-1" } ]} |
API Collection Data (collection_data
)
Field | Description | Example |
---|---|---|
api_interface | Interface of the API (e.g., rest , grpc ). | rest |
internal_path | Internal path for the API call. | `` |
type | HTTP method for the API request. | GET |
add_on | Name of add-on collection belongs to | debug |
Service APIs (apis
) ⚙️
Field | Description | Example |
---|---|---|
name | Name of the API. | juno.mint.Query/AnnualProvisions |
block_parsing | Describes how block heights are derived from API requests. | {"parser_arg": ["latest"], "parser_func": "DEFAULT"} |
compute_units | Number of compute units required for the API. | 10 |
enabled | Indicates if the API is active. | true |
category | Specifies the category of the API. | {"deterministic": true, "local": false, "subscription": false, "stateful": 0} |
extra_compute_units | Additional compute units if required. | 0 |
Block Parsing(block_parsing
)
Details on how block heights are derived from API requests.
Field | Description | Example |
---|---|---|
parser_arg | Arguments for the parser function. | ["latest"] |
parser_func | The function used for parsing. | DEFAULT |
Service API Categories(category
)
Field | Description | Example |
---|---|---|
deterministic | Indicates if the API's outcome is deterministic. | true |
local | Specifies if the API call is local. | false |
subscription | Indicates if the API supports subscription. | false |
stateful | Describes the statefulness of the API. A value of 0 means it's stateless. | 0 |
Verification(verifications
)
Verification details used to validate the data.
Field | Description | Example |
---|---|---|
name | Name of the verification. | chain-id |
values | Array containing expected values. | [ { "expected_value": "juno-1" } ] |
Extensions (extensions
)
Field | Description | Example |
---|---|---|
name | Name of the extension. | archive |
cu_multiplier | Compute units multiplier for the extension. | 5 |
rule | Specific rules associated with the extension. (e.g., block number) | block: 254 |
Deposit (deposit
) 💰
Represents the amount deposited by the user for the proposal.
Field | Description | Example |
---|---|---|
deposit | Amount deposited for the proposal in a particular denomination. | 10000000ulava |
📖 Glossary
Terms 📚
🗉 average_block_time
🗉 allowed_block_lag_for_qos_sync
🗉 compares_hashes
🗉 deposit
🗉 finalization_criteria
🗉 reliability_threshold
🗉 saved_blocks
Parsing 🧩
Parsing is a critical aspect when interacting with diverse chains, as each chain returns data in a different format. The Lava Network has established parsing protocols to handle these variations effectively.