x/supernode module to the EVM at a single fixed address. Contracts can look up registered SuperNodes, list them with pagination, rank them for a block, and read their reported hardware metrics and module parameters.
The EVM is live on testnet (lumera-testnet-2) only. Mainnet runs v1.12.0 and gains the EVM with its upgrade.
Address
0x0900. See the precompiles overview for the full address map.
SuperNode states
ThecurrentState field in query results uses these values.
Design notes
- Validator addresses stay strings. A
lumeravaloper...address has no meaningful 20-byte EVM representation, so the ABI usesstringfor validator and account addresses instead of a lossyaddressmapping. - Metrics are integers. The module stores hardware metrics as floats. Solidity has no floating-point type, so the precompile rounds them to
uint32anduint64values. Percentages are whole numbers, so 45 means 45 percent. - Latest state wins. The module stores state history. Queries return the latest state entry and the block height where it changed.
Solidity interface
The interface below comes fromISupernode.sol in the lumera repo.
ISupernode.sol
The precompile also implements six transaction handlers (
registerSupernode, deregisterSupernode, startSupernode, stopSupernode, updateSupernode, reportMetrics) and emits SupernodeRegistered, SupernodeDeregistered, and SupernodeStateChanged events. The shipped interface exposes queries only, because operators manage SuperNodes with Cosmos SDK transactions through lumerad and sn-manager, not through the EVM. See the registration guide.Read SuperNode state from a contract
SupernodeDashboard.sol
getParams returns the minimum stake, metric reporting thresholds, and minimum hardware requirements. Governance can change these parameters, so query them on chain instead of hardcoding values.
Call it from JavaScript
query-supernodes.ts
Behavior notes
- Pagination.
listSuperNodescaps at 100 results per call. A largerlimitis silently capped, so page withoffset. - Gas. Calls meter gas from the underlying Cosmos gas usage converted to EVM gas units. Reads through
eth_callare free.
Next steps
SuperNodes overview
What SuperNodes do and how they earn fees.
Action precompile
Request the actions that SuperNodes process.
CosmWasm bridge
Call CosmWasm contracts from Solidity.