Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Overview

Telcoin Network is an EVM-compatible, public blockchain secured by GSMA Operator Member Mobile Network Operators globally using proof of stake consensus. The system serves as underlying blockchain architecture securing private property rights over digital assets and enabling on-chain protocols and applications such as TELx.

This documentation is designed to help familiarize builders with the Telcoin Network. It gives background on the tech behind the Telcoin Network, contains a full list of methods supported by the network, and provides some tutorials for developing some initial projects.

Brief run downs of the docs sections are given below:

  • Getting Started - Guides to help developers start building with Telcoin Network.
    • Installing a Release - Download a signed node binary or Docker image and verify it.
    • Release Notes - Changes in each tagged release, newest first.
    • Reading Blockchain Data - An overview of the simplest types of blockchain interactions.
    • Dapp Development - Let’s start building decentralized apps!
  • Networks and RPC Endpoints - Reference documentation for connecting to Telcoin Network.
  • RPC Methods - Reference documentation providing information on interacting with nodes.
  • Maintainers - How maintainers cut, sign, and publish releases.

Windows users

Windows users are strongly advised to use WSL2. Start with these instructions on installing WSL2 and then follow this tutorial to set it up to work with VS Code (If VS Code is your preferred IDE).

WSL2 gives a linux style environment and avoids some compatibility issues with Windows systems.

Warning

All commands throughout the documentation will be focused on use with Unix-like (e.g. WSL2) systems.

Architecture

Key Components

Telcoin Network is a modular blockchain. This is in contrast to many traditional (monolithic blockchains). While a monolithic blockchain performs a number of functions on a single layer, a modular blockchain separates the blockchain’s services into separate modules, each specializing in one aspect of the blockchain’s offering. This allows for greater flexibility, efficiency, and scalability.

The separate modules, or layers, within Telcoin Network are introduced below.

Consensus Layer

The consensus layer ensures agreement between validator nodes on the state of their common ledger. It handles transactions broadcast to the network by checking each transaction is valid and is ordered correctly. In this way, it is critical to the smooth and secure operation of the blockchain without the need of a centralized party.

Two key technologies, Narwhal and Bullshark, contribute to Telcoin Network’s consensus layer. Narwhal is primarily concerned with the mempool - the initial handling of transactions which are broadcast to the network, while Bullshark handles the finalizing and recording of transactions within the Settlement Layer.

Execution Layer

The Execution Layer acts as the blockchain’s processing unit, analogous to the central processing unit (CPU) of a computer. It processes user initiated transactions, which can range from sending the network’s native token, TEL, between accounts, to the more complex execution of smart contracts that govern decentralized applications (dApps). Telcoin Network uses the Ethereum Virtual Machine (EVM) for its execution layer, meaning it can run any smart contracts present on other EVM chains.

Data Availability Layer

The Data Availability Layer guarantees that all necessary data for validating transactions is readily accessible to all network participants. Telcoin Network utilizes a scalable number of ‘workers’ which share collections of transactions, thus ensuring the data required for processing (execution) and validating (consensus) is available to all nodes. This mechanism supports the data availability layer by making sure that all necessary information for confirming the state of the blockchain is accessible, enabling nodes to execute and validate transactions accurately.

Settlement Layer

The Settlement Layer is akin to the blockchain’s ledger, ensuring the permanence and immutability of transactions. This layer serves as the ultimate source of truth within the blockchain, providing finality and certainty to all operations.

Bullshark is integrated with Narwhal to finalize transactions and ensure they are immutably recorded on the blockchain. It employs a Byzantine Fault Tolerant (BFT) consensus algorithm, optimized for finality and security. Bullshark is responsible for reaching agreement on the state of the blockchain, ensuring all nodes are synchronized and that transactions are irrevocably settled. Settlement happens quickly and efficiently, without the concept of “forks” or “reorganizations”.

Native Token

Overview

Native tokens are what blockchain protocols require users to pay for transaction processing (gas). The native token for Telcoin Network is Telcoin (TEL).

Challenges

Telcoin originated as an ERC-20 token on Ethereum.

The industry is rife with examples of new chains launching their own native tokens, then wrapping them. But other than Polygon and MATIC, there isn’t a good example of an ERC-20 becoming a native token. Polygon’s approach is really complicated, partially because they maintain state with Ethereum via StateSync.

Polygon validators continuously monitor a contract on Ethereum chain called StateSender. Each time a registered contract on Ethereum chain calls this contract, it emits an event. Using this event Polygon validators relay the data to another contract on Polygon chain. This state sync mechanism is used to send data from Ethereum to Polygon.

Additionally, Polygon validators send the transaction hash, namely checkpoint, of each transaction on the PoS chain to Ethereum on a regular basis. You can use this to validate any transaction that took place on Polygon. Once a transaction has been verified to have occurred on the PoS chain, the corresponding action can then be executed on Ethereum.

These two mechanisms can be used together to enable two-way data (state) transfer between Ethereum and Polygon. source

Telcoin Network does not intend to maintain state with Ethereum in the same way. Telcoin Network aims to be an EVM-compatible layer 1 blockchain that uses the ERC-20 Telcoin as its native token. TN is different because core state for the protocol is managed on TN, not Ethereum. The protocol only supports bridging assets, and does not intend to sync state with Ethereum other than passing messages or bridging wrapped tokens.

Bridging

Telcoin already exists on Ethereum, so it must be bridged to Telcoin Network for the network to have access to TEL (the native currency).

Parallelization

It’s possible to optimistically parallelize transactions that do not affect the same state (ie - on-chain programs). However, if bridged Telcoin remains in a smart contract then it becomes nearly impractical to parallelize TEL ↔︎ TEL transfers. As a native token, balances are managed by the node directly so multiple transactions can be processed at the same time which increases transaction throughput. Thus, there is compelling motivation to figure out how to bridge the ERC-20 version of TEL from Ethereum while also using it like ETH (state managed by protocol - not on-chain).

To elaborate, Telcoin and other ERC-20s belong to an address. Ether also belongs to an address. However, when ETH is transferred between accounts, the nodes update the database with that address and a value for Ether. When ERC-20s are transferred, the smart program’s state is updated and the nodes update the database with that address and the storage bytes. State on-chain must be synchronously executed to ensure valid roots are calculated during the state change.

Solution

Telcoin is bridged as an ERC-20 on Ethereum to a wrapped version on Telcoin Network. The wrapped version is not the native token (wTEL), but can easily be converted to the native token TEL.

Axelar

Axelar supports cross-chain transfer of some native tokens via their wrapped ERC-20 versions.

Bridge ERC-20 TEL as ERC-20 wTEL on Telcoin Network

If wTEL on Telcoin Network is bridged, how can users convert it to the native currency TEL without having any TEL for gas?

Axelar supports this through a “Swap Contract”.

The native EVM cross-chain asset transfer feature uses Axelar’s Deposit Service, an ancillary infrastructure contract deployed on all supported EVM chains.

For transactions sending native tokens from an EVM chain, a deposit address is generated by the user or dApp that is set up to receive the native tokens, after which the service kicks in to convert (or “wrap”) the tokens into their ERC-20 equivalent before sending to the users’ specified wallets on the destination chain.

For transactions sending tokens back to their native EVM chain, where users receive native tokens in their wallets, the following flow applies. The funds are first sent from the source chain to a “Swap Contract” on the destination chain. Axelar services then kick in to “unwrap” the tokens before delivering native assets to the intended recipient.

Implementation

Telcoin Network’s TEL could behave like ETH on Ethereum (ie - state managed directly, not through smart program) by bridging the ERC-20 TEL from Ethereum to a wrapped ERC-20 on Telcoin Network then using WETH9 to withdraw the fund to the user’s address.

Axelar’s Interchain Token mechanism would lock/release ERC-20 TEL on Ethereum and mint/burn wrapped TEL (wTEL) on Telcoin Network. Telcoin Network would then support users unwrapping the wTEL to withdraw TEL (on TN) as the native token.

Link to Axelar contract implementation

// @dev This function is used for delegate call by DepositReceiver
// Context: msg.sender == AxelarDepositService, this == DepositReceiver
function receiveAndUnwrapNative(address refundAddress, address recipient) external {
    address wrappedTokenAddress = wrappedToken();
    address refund = IAxelarDepositService(msg.sender).refundToken();

    if (refund != address(0)) {
        if (refundAddress == address(0)) refundAddress = msg.sender;
        _safeTransfer(refund, refundAddress, IERC20(refund).balanceOf(address(this)));
        return;
    }

    uint256 amount = IERC20(wrappedTokenAddress).balanceOf(address(this));

    if (wrappedTokenAddress == address(0)) revert WrappedTokenNotSupported();
    if (amount == 0) revert NothingDeposited();

    // Unwrapping the token into native currency and sending it to the recipient
    IWETH9(wrappedTokenAddress).withdraw(amount);
    (bool sent, ) = recipient.call{ value: amount }('');

    if (!sent) revert NativeTransferFailed();
}

Note: Ensure our implementation of IWETH9 emits a log for bridged TEL. These logs should be used to prove the amount of Telcoin.

Security Considerations

Axelar’s bridge is risky for an early Layer 1 because it provides an easy and efficient escape route for thieves. Ethereum benefited immensely from the fact that it wasn’t bridged “from” anywhere (unlike TN) because after the DAO hack, validators opted to recover funds by forking the network. If a substantial hack took place and Axelar (or any bridge) was a fundamental piece of TN, the affected state would be impossible to rectify without significant changes to both bridged chains. The effect of Axelar’s chain changes would ripple through all other connected ecosystems. It’s impossible to consider forking TN as a realistic solution after an attack unless bridging off TN takes time.

Recoverable Wrapped Tokens

One idea for TN to safeguard the protocol from early exploits tanking TEL is to extend the ERC-20 interface to support asset recovery with the “ERC-20R”. CircleCI has an audited solution for wrapped tokens:

This proposed mechanism revolves around recoverable wrapper tokens. Users can wrap their ERC-20 asset by locking them in the recoverable wrapper token contract in order to receive an equal number of wrapper tokens in return. Wrapping the tokens protects users from thefts, and still maintains most of the utility found in the token’s base form. One core difference, however, is that recoverable wrapper tokens can be recovered back to the sender within a certain time window post-transaction (say, 24 hours). Consequently, each user will have two distinct balances of the token: a settled balance (non-recoverable) and an unsettled balance (recoverable). Only settled tokens may be unwrapped back into their base form.

Building beyond the thesis put forth in the ERC20R paper, we present multiple configuration sets, or ways to implement and design a recoverable wrapper token, each with their own use cases and attributes. For instance, one version is an arbitrated wrapper appropriate for a targeted, designated ecosystem with a trusted governance. Another version offers more of a cancellable send button, where transactions simply take a longer, custom period of time to settle than the chain’s finality. Different configuration sets can still be interoperable with each other, as long as they conform to a shared interface. We provide the IERC20R contract as this interface.

The bridged version of TEL on Telcoin Network would initially be deposited as wTEL then immediately swapped and withdrawn to the user’s account. However, when users initialize a deposit to wTEL they maintain an “unsettled balance” (recoverable) until a certain amount of time has passed.

This seems possible with Axelar’s current implementation because the bridge wraps tokens first on the source chain:

// @dev This method is meant to be called directly by user to send native token cross-chain
function sendNative(string calldata destinationChain, string calldata destinationAddress) external payable {
    address wrappedTokenAddress = wrappedToken();
    uint256 amount = msg.value;

    if (amount == 0) revert NothingDeposited();

    // Wrapping the native currency and into WETH-like token
    IWETH9(wrappedTokenAddress).deposit{ value: amount }();
    // Not doing safe approval as gateway will revert anyway if approval fails
    // We expect allowance to always be 0 at this point
    IWETH9(wrappedTokenAddress).approve(gateway, amount);
    // Sending the token trough the gateway
    IAxelarGateway(gateway).sendToken(destinationChain, destinationAddress, wrappedSymbol(), amount);
}

Note: The wTEL deposit and approve methods should work together to cause this to fail. Although it’s not ideal, in the worst case: user tries to send native through bridge and it fails first time. User comes back after recovery period ends and is able to send again. We can mitigate this poor UX by warning users to wrap their own TEL first and wait for the recovery period. We should also try to work with Axelar to support a recoverable wrapped ERC-20s.

Validator Issuance

Validators are issued native TEL rewards at the end of each epoch, weighted by the number of consensus blocks they led. The current TEL issuance is inside a governance safe. TN needs this TEL bridged at genesis if possible. If not possible, then we should consider manual issuance and upgrading the protocol once bridging is complete.

Security

Security Features

Telcoin Network ensures security of digital assets to asset owners. This is achieved through the following key principles:

  • Private signature keys are required to authorize any transaction on the Telcoin Network.
  • Transactions interacting with a particular asset can only be authorized by the owner of the given asset.
  • Smart contracts contain predefined rules which govern the use of particular assets. These rules are created by the smart contract creator and are written in the Solidity language.
  • Upon transaction finalization, the changes to the assets it operates on or creates will be persisted to the Telcoin Network ledger. Future transactions will then be able to operate on these assets.
  • Telcoin Network’s security is preserved even when a small proportion of validators are adversarial.
  • Every Telcoin Network operation can be audited to validate that assets have been correctly processed. This boosts transparency but also implies all network actions are publicly visible. Users may wish to maintain privacy by using multiple different addresses.
  • Block construction is handled exclusively by known validators, preventing anonymous MEV attacks.

Security Architecture

Telcoin Network is run by a set of distinct validators run by Global Systems for Mobile Communications Association (GSMA) members. They run Telcoin Network software that allows them to reach consensus on valid transactions within the network. Users can stake their native TEL tokens on validator nodes, increasing that validator’s staking power. The use of Byzantine fault tolerant broadcast and consensus ensures Telcoin Network remains secure so long as over 2/3 of the network’s total stake is controlled by honest and non adversarial validators.

Keys

A transaction on the Telcoin Network is only valid if signed with the private key which controls the assets operated on by the transaction. This private key must be kept safe by the user and never shared with other parties. This ensures that even an adversarial validator cannot control assets not owned by them.

Each private key corresponds to a public address to which assets can be sent. Sending assets to a specific address automatically creates that address. It is therefore as though all possible addresses exist from the genesis block.

Smart Contracts

The behaviour of all non native assets on Telcoin Network is defined by a smart contract. Telcoin Network has a few built in system contracts, but also enables anyone to write and deploy their own smart contracts.

This permissionless property enables huge innovation but requires more care to be taken by users; It is recommended users only interact with smart contracts they trust, have been audited by individuals they trust, and they understand the logic of. Smart contracts are immutable, allowing them to be audited by third parties and enabling greater degrees of trust.

Finality

The Byzantine fault tolerant consensus mechanism “Bullshark” ensures transactions on Telcoin Network are confirmed quickly. Successful transactions are immediately finalized, resulting in no unexpected reorganizations of chain data.

Gas must be paid, in the form of TEL, to pay for the compute required to process a transaction. Transactions can be successful or may be aborted - either due to conditions within the smart contract not being met or due to an insufficient amount of gas being paid. Aborted transactions will have no effect on the state of the blockchain, but will still require some gas to execute. This also protects the system against denial of service attacks.

Censorship Resistance

Telcoin Network uses the Delegated Proof of Stake model to select validators. Validators are run by GSMA members and other Mobile Network Operators (MNOs) and allow users to stake their TEL on validators, sharing in revenue from gas fee income. In the rare case of a validator demonstrating poor reliability, the validator and the stakers who have staked to it will receive reduced rewards. The user’s stake will always be safe, and cannot be confiscated by any network user, including the validators with whom they have staked. This mechanism ensures that Telcoin Network will continue to be run to the highest standards of reliability, honesty and liveness.

Transaction lifecycle

  1. Transaction creation - A user creates a transaction. This is typically done through a wallet interface or decentralized application (dApp) user interface. An example may be transferring TEL to another user. The user will use the user interface off the dapp or wallet to signal their intentions. They will then sign their transaction using their private key (most likely through their wallet). The signed transaction is now immutable and ready to be sent to a validator.

  2. Transaction batching - Upon receipt of the transaction, validators check the validity of the transaction. It does this by ensuring the transaction has:

    1. A valid user signature.
    2. Been initiated by a user who has access to all assets the transaction is trying to control. In this case, the user must have at least the amount of TEL they are sending (+ gas) present in their wallet.
    3. Correctly encoded data, if the transaction interacts with a smart contract.
    4. Been sent with sufficient gas.

    If the above conditions are met, the validator places the transaction in the pending pool. When the validator’s worker is ready to propose the next batch, valid transactions are pulled from the transaction pool until a gas limit of 30 million is reached or there are no more transactions in the validators pool. The worker then broadcasts the sealed batch to the workers of the other committee validators, which validate the batch and acknowledge it. Once a supermajority (2f+1 by voting power) of the committee acknowledges the batch, its digest is handed to the validator’s primary for inclusion in consensus.

  3. Transaction finalization - The validator’s primary includes the digests of batches that reached quorum in its next header and broadcasts the header to the other validators. Validators ensure the validity of the header and its batches before returning a signed vote. Once votes from a supermajority of the committee are collected, the primary assembles them into a certificate and broadcasts it to the network. Certificates form a DAG that the Bullshark protocol deterministically orders: when a leader certificate gains enough support, its sub-DAG is committed as consensus output, which every node then executes - each batch becoming a block in the EVM. At this point, the transaction is executed and is irreversible. It is finalized.

Blocks are only produced from committed consensus output, so there are no forks or reorganizations. For this reason, Telcoin Network does not have any concept of pending blocks.

Consensus Layer

Incorporating Bullshark, a DAG-based Byzantine Fault Tolerant consensus mechanism, into the blockchain architecture alongside Narwhal’s DAG-based mempool represents a forward-thinking approach to distributed ledger technology. Bullshark distinguishes itself by being the first Directed Acyclic Graph (DAG) based asynchronous Byzantine Atomic Broadcast protocol, optimizing for common synchronous cases while ensuring robustness in asynchronous environments. Telcoin Network implements Bullshark’s partially synchronous variant, which preserves safety even when the network is asynchronous while relying on periods of synchrony for liveness.

Narwhal: The DAG-based Mempool

Narwhal’s innovative mempool design uses a Directed Acyclic Graph (DAG) structure for efficient transaction management prior to confirmation. This design choice facilitates a more scalable and efficient transaction dissemination process compared to traditional linear mempools.

Key Features:

Parallel Processing: The DAG structure allows for concurrent transaction processing, significantly boosting throughput.

Increased Efficiency: By organizing transactions in a DAG, Narwhal mitigates the inefficiencies of linear mempools, enhancing overall network performance.

Scalability: The design inherently supports scalability, adept at managing high transaction volumes without compromising on performance or resource efficiency.

Bullshark: Byzantine Atomic Broadcast

Bullshark represents a groundbreaking step in consensus mechanisms, offering a secure and efficient way to achieve consensus in distributed networks. As a Byzantine Atomic Broadcast protocol based on a DAG, Bullshark is tailored for high-performance, distributed systems, with optimizations for both synchronous and asynchronous operations.

Key Features:

Safety Under Asynchrony: Bullshark’s safety guarantees do not depend on timing assumptions. Telcoin Network runs the protocol’s partially synchronous variant, which remains safe through network delays and timing attacks, requiring only periods of synchrony to make progress.

Optimized for Synchronous Cases: While Bullshark tolerates asynchrony, it is optimized for the more common synchronous cases, ensuring high throughput and low latency during normal operations.

Security in Asynchronous Networks: Bullshark maintains strong security guarantees, even in asynchronous settings, ensuring the integrity and reliability of the consensus process amidst a wide range of network conditions.

Further Reading

  • Danezis, G., Kogias, E. K., Sonnino, A., & Spiegelman, A. (2021). Narwhal and Tusk: A DAG-based Mempool and Efficient BFT Consensus. ArXiv:2105.11827 [Cs]. http://arxiv.org/abs/2105.11827
  • Spiegelman, A., Giridharan, N., Sonnino, A., & Kokoris-Kogias, L. (2022). Bullshark: DAG BFT Protocols Made Practical. ArXiv:2201.05677 [Cs]. https://arxiv.org/pdf/2201.05677

Peer-to-peer network

Every Telcoin Network node runs the same software and executes every transaction. Nodes differ only in what they do on the peer-to-peer network: which topics they publish on, which they subscribe to, and how they hand accepted transactions to the committee.

This page is for RPC providers, dapp and indexer operators, bridge partners, and validators. It describes the three node roles, the swarms a node runs, and how the chain id isolates one network from every other Telcoin Network deployment. The P2P Network section covers each subsystem in detail.

The swarm and subscription logic lives in crates/network-libp2p/src/consensus.rs, and the per-epoch wiring that decides a node’s role lives in crates/node/src/manager/node/start_epoch.rs.

Node roles

A node’s role is chosen at every epoch boundary and can change mid-epoch. A node is an Observer if it is not in the entering committee. The role is derived from committee membership and is not selectable by a flag; to take a validator out of consensus, exit it on chain. Otherwise it starts the epoch as CvvActive, optimistically assuming it is caught up, and is demoted to CvvInactive later if that turns out to be false. An existing CvvInactive state is sticky: it is carried into the next epoch unchanged until the node finishes catching up.

The current role is readable live over RPC as tn_nodeMode, so callers can observe transient states such as a restarted validator catching up.

CvvActive

An active committee validator is fully synced and voting. It publishes certificates on tn-primary-{chain_id}, a signed consensus result for each committed sub-dag on tn-consensus-output-{chain_id}, and epoch votes on tn-epoch-vote-{chain_id}. Its workers subscribe to their own batch topic, tn-worker-{chain_id}-{worker_id}, so batch bodies are prefetched into a local cache before the vote path needs them.

Batches are not gossiped to reach quorum: a worker reports each sealed batch directly to every committee peer over the worker request-response protocol and waits for a quorum of acknowledgements; only then does it publish the batch digest on the batch topic. See Request-response for that exchange and Gossip for the topics and their publisher allowlists.

CvvInactive

A node in this mode is staked and in the committee but behind the rest of it, typically after a restart or a failure mid-epoch. It does not run consensus; it follows consensus output through state sync until it is past the garbage-collection window, then promotes itself back to CvvActive and restarts the epoch. The promotion is guarded: the node must reach the same consensus block number as the network’s latest known header, and that header’s commit timestamp must be less than five seconds old, so a stale record cannot promote a node that is not actually caught up.

An inactive validator stays subscribed to its worker batch topic: warming the batch cache it will shortly vote against is useful work, and a mode change does not clear that cache, so the warm-up survives promotion.

Observer

An observer is any node that is not in the current committee. It follows consensus output only and never votes.

An observer unsubscribes from the worker batch topic. Batch bodies already arrive inside the verified consensus output and epoch packs it downloads through sync streams, so digest gossip would only fetch the same bytes a second time.

An observer also does not gossip the transactions it accepts; it forwards each one over JSON-RPC to the committee validator whose committee slot owns the sender, using endpoints discovered from validator records on the DHT. Routing by sender keeps a single account’s transactions on one validator, which preserves nonce ordering. Delivery is best-effort on a background task, so batch production is never blocked by a slow or unreachable validator.

Note

If no committee validator has advertised a JSON-RPC endpoint, an observer cannot forward at all. The batch is refused rather than dropped, and its transactions stay pending in the pool for a later attempt.

An observer started with --forward-txs takes its RPC submissions off this path. It relays each eth_sendRawTransaction and eth_sendRawTransactionSync call synchronously to an operator-configured validator endpoint and never inserts the transaction into its own pool, so the node-record forwarder never sees it. See Public RPC nodes.

Swarms and epoch interfaces

A node runs one libp2p swarm for its primary and one more for each configured worker. Every swarm speaks QUIC and runs as a critical task for the life of the process; see Transport. Each worker’s swarm is fully separate, so a batch gossiped by worker k of one validator only ever reaches worker k of the others.

Epoch boundaries do not rebuild swarms; they rebuild the network interface layered on top of them. Each epoch refreshes the previous, current, and next committee membership, re-dials committee peers, and re-subscribes to the gossip topics so their publisher allowlists track the rotation. Listeners bind only on the first epoch of the process.

Because the swarm outlives the epoch, subscription decisions are two-sided rather than skipped. A node that subscribed to a batch topic in one epoch stays subscribed into every later epoch unless it explicitly unsubscribes, which is why an observer issues an unsubscribe rather than simply not subscribing.

Chain namespacing

The chain id comes from genesis and is stamped onto the network configuration at startup. It is not an operator tunable: it is never serialized to the config file, so genesis remains the single source of truth.

Every gossip topic embeds it:

tn-primary-{chain_id}                 certificates
tn-consensus-output-{chain_id}        signed consensus results
tn-epoch-vote-{chain_id}              epoch-boundary votes
tn-worker-{chain_id}-{worker_id}      batch digests

So does every wire protocol, including gossipsub’s own protocol id, which is the one family that would otherwise be shared across chains:

gossipsub        /tn-meshsub-{chain_id}/1.1.0 and /1.0.0
request-response /tn-primary-{chain_id}/0.0.2
                 /tn-worker-{worker_id}-{chain_id}/0.0.2
kademlia         /tn-primary-kad-{chain_id}/0.0.1
                 /tn-worker-{worker_id}-kad-{chain_id}/0.0.1
sync streams     /tn-primary-sync-{chain_id}/0.0.1
                 /tn-worker-{worker_id}-sync-{chain_id}/0.0.1
peer exchange    /tn-primary-peer-exchange-{chain_id}/0.0.1
                 /tn-worker-{worker_id}-peer-exchange-{chain_id}/0.0.1

Two nodes on different chains therefore fail protocol negotiation before exchanging anything, and never share a gossip mesh. The remaining protocol families sit at /0.0.1; only request-response has been bumped to /0.0.2, for a wire-format change that shifted encoded enum discriminants.

Where to read more

  • Transport — QUIC, connection limits, and the protocol id families above.
  • Gossip — topics, publisher allowlists, message validation, and re-propagation.
  • Discovery — the DHT, node records, and how committee endpoints are found each epoch.
  • Peers — scoring, penalties, bans, and the peer exchange sent on a graceful disconnect.
  • Request-response — header votes, batch reports, and epoch record requests.
  • Sync streams — the bulk transfer path for consensus output, epoch packs, and batches.

Source of truth

BehaviorCode
Role definitions and helperscrates/consensus/primary/src/consensus_bus.rs (NodeMode), crates/types/src/primary/node_mode.rs
Role selection, per-epoch subscriptions, swarm interfacescrates/node/src/manager/node/start_epoch.rs (identify_node_mode, should_subscribe_batch_topic)
Per-role consensus following and rejoincrates/consensus/executor/src/subscriber.rs (spawn_subscriber, catch_up_rejoin_consensus)
Gossip topic names and chain idcrates/config/src/network.rs (LibP2pConfig)
Wire protocol idscrates/network-libp2p/src/types.rs
Swarm construction and QUIC transportcrates/network-libp2p/src/consensus.rs (ConsensusNetwork::new)
Process-lifetime swarmscrates/node/src/manager/node.rs (spawn_node_networks)
Observer transaction forwardingcrates/consensus/worker/src/worker.rs (Worker::disburse_txns)
RPC submission forwarding (--forward-txs)crates/tn-reth/src/rpc_tx_forward.rs (EthSubmitForwarded), crates/tn-reth/src/rpc_tx_forward/client.rs (TxForwarder)

Update this page when those files change.

P2P Network

How Telcoin Network nodes behave on the wire: a QUIC-only transport, four permissioned gossip topics, a persistent Kademlia DHT of signed node records, a reputation-scored peer manager, two request-response protocols, and a bulk-sync stream behavior. It is written for RPC providers, dapp and indexer operators, bridge partners, and validators who need to know what a node dials, what it accepts, and what it rejects.

Transport covers the QUIC-only transport, node identities, listener addresses, and the full protocol-ID reference table. Gossip covers the four gossip topics, their committee publisher allowlists, and message validation, while Discovery covers Kademlia, signed node records, and the six ways a node finds the committee. Peers covers peer reputation scoring, connection limits, and bans. Request-Response covers the consensus RPC and peer-exchange protocols and their wire format, and Sync Streams covers the bulk-transfer stream behavior used for catch-up. Network Architecture has the node-role overview that frames all of them.

Transport

Telcoin Network nodes speak libp2p over QUIC and nothing else.

The validated handshake-start accounting contract describes the process budget API and the transport integration and calibration required before enabling it. This page states what a node opens on the wire, the two keys that identify it, where its listener addresses come from, and the full set of chain-namespaced protocol IDs its substreams negotiate.

It is written for RPC providers, dapp and indexer operators, bridge partners, and validators who need to predict what a node dials, what it accepts, and why a peer that looks reachable can still never exchange a message.

The swarm and its QUIC settings live in crates/network-libp2p/src/consensus.rs. The protocol IDs live in crates/network-libp2p/src/types.rs, and the transport defaults live in crates/config/src/network.rs.

The early identity refusal decision records why an additional TLS admission check is not currently selected and the admission and measurement prerequisites for reconsidering it.

QUIC only

The swarm is built with a single transport: QUIC v1 over UDP. There is no TCP listener and no TCP dialer, so a peer that offers only TCP is unreachable.

QUIC carries TLS 1.3 and multiplexes streams itself, so the node installs no noise handshake and no yamux muxer. The libp2p dependency is compiled with only the request-response, gossipsub, tokio, QUIC, macros, and kad features, which is the mechanical reason none of the usual alternatives are available at runtime.

Two behaviours operators commonly expect are also absent. There is no mDNS: a node never discovers peers by LAN broadcast. There is no identify protocol: a node does not learn a peer’s addresses or supported protocols from an identify exchange. Everything a node knows about a peer comes from the signed records in the DHT and from peer exchange, covered in Discovery.

Each node runs the primary and every worker as fully isolated swarms in one process. Seven behaviours compose each swarm: the peer manager, a per-peer connection limiter, gossipsub, the consensus request-response protocol, the peer-exchange request-response protocol, Kademlia, and the bulk-sync stream behaviour.

Connection parameters

The QUIC and swarm rows below are the shipped defaults, read from the node’s network config file with any missing field falling back to the value shown. The per-peer connection ceiling is not a config field: it is fixed in code and identical on every node.

SettingDefaultEffect
QUIC handshake timeout65 sCeiling on the initial handshake
QUIC max idle timeout30 sInactivity before the connection is torn down
QUIC keep-alive interval5 sInactivity before a keep-alive packet is sent
Max concurrent streams10,000Incoming bidirectional streams a remote peer may hold open on one connection
Max stream data50 MiBUnacknowledged bytes in flight on a single stream
Max connection data100 MiBUnacknowledged bytes in flight across all streams of a connection
Swarm idle connection timeout65 sHow long the swarm keeps an idle connection alive
Established connections per peer8Concurrent connections one peer may hold, inbound and outbound combined
Inbound accept taskinlineWhere a listener decides on inbound attempts and accepts them; the spawned mode with a capacity is a measurement prototype (issue #1741), see Inbound capacity qualification

The effective handshake ceiling is the smaller of the handshake timeout and the max idle timeout, so a handshake in practice has 30 seconds, not 65. The keep-alive interval is set well below the idle timeout on purpose: a healthy but quiet connection is refreshed roughly six times before it would expire. The swarm’s own idle timeout is deliberately not the binding constraint — the strategy is to let QUIC keep connections alive rather than add another swarm behaviour for it.

The per-peer ceiling of 8 is generous headroom. A peer needs at most one inbound and one outbound connection at a time, because this node dials only peers it is not already connected to. The remaining slack absorbs reconnection churn while bounding a hostile peer to a fixed, small number of connections instead of an unbounded fan-out. Peer counts are tracked by distinct identity, so without this ceiling one peer could open connections until the operating system ran out of descriptors. Peers covers the peer-count admission gate that sits alongside it.

Losing every listener is fatal. When the last listener closes, the swarm returns an error rather than continuing, and the node stops. A Telcoin Network node does not limp along unreachable.

Two keys, two identities

A node carries two distinct keys, and confusing them is the most common source of “I can see it but I can’t reach it”.

The libp2p network key is the transport identity. It produces the peer ID a node is dialed at, it terminates the QUIC handshake, and it signs every gossip message the node publishes — gossipsub runs in signed-authenticity mode, so an unsigned message is not a valid message. The primary and each worker hold separate network keys, because each runs its own swarm. Worker network keys are derived deterministically from the node’s BLS keypair and a fixed seed, so worker 0’s peer ID is stable across restarts and reinstalls — that identity is advertised on-chain and cached in other nodes’ DHT stores, so it must not change.

The primary’s BLS key is the consensus identity. It signs headers, votes, and certificates, it is the key registered on-chain, and it is the DHT record key under which a node is discoverable. Both the primary’s record and every worker’s record are stored under the primary’s BLS key.

The practical consequence: you look a node up by BLS key and you connect to it by peer ID, and neither value is derivable from the other by a third party. Signed node records are what bind the two together, and Discovery describes how they are published and verified.

Listener addresses

Listener addresses are set once, at key generation. keytool generate --external-primary-addr takes a single multiaddr for the primary and --external-worker-addrs takes a comma-separated list for the workers. Both also read from the environment at generation time, as TN_EXTERNAL_PRIMARY_ADDR and TN_EXTERNAL_WORKER_ADDRS.

An address must be QUIC v1 over UDP, in the form /ip4/HOST/udp/PORT/quic-v1. Do not append a /p2p/ component: the tool derives it from the network public key and appends it, and supplying a different one is an error. When either flag is omitted, the address defaults to /ip4/127.0.0.1/udp/PORT/quic-v1 on a free port, which is useful only for local test networks. The result is written to the node’s info file and is the address advertised to peers.

A node that binds that default accepts connections only from its own host, but it still dials other hosts. A QUIC dial reuses a listener’s UDP socket, but a dial to another host never reuses one bound to a loopback IP, which cannot send there: it leaves from a socket bound to every interface instead.

Two environment variables override the address a node binds at runtime: PRIMARY_LISTENER_MULTIADDR and WORKER_LISTENER_MULTIADDR. Each is read once, when its swarm first starts listening, and the node appends the /p2p/ component the same way key generation does. WORKER_LISTENER_MULTIADDR applies to worker 0 only; worker N above 0 reads WORKER_N_LISTENER_MULTIADDR.

These variables change only what the node binds. The external address advertised to peers still comes from the node’s info file, so an override that does not match what was generated makes the node reachable at one address and discoverable at another.

An observer generated with the default addresses joins a public network as it is: its advertised address is the generated loopback one, so peers cannot dial it, and it needs none to, because its own outbound connections are enough.

Listener settings and bootstrap peers

Operators arriving from other clients go looking for --p2p-port or --listen-addr. Neither flag exists; --bootstrap-peers is available to override bootstrap dial hints for the current process. The node command’s flags cover the named chain, bootstrap dial hints, a consensus-metrics socket, an instance number, state export and its retention limit, the re-pack monitor, unused-port mode, a healthcheck bind (port or socket address), a node name, and a tracing endpoint, plus a global data directory and the JSON-RPC server arguments.

Listener addresses come from the generated node info and the two override variables above. Bootstrap peers come from the network config’s bootstrap_peers map, falling back to the default set when the map is empty: the list built into the binary for --chain, or else the genesis committee file’s. The --bootstrap-peers flag replaces that map for the current process; an explicit {} selects the default set. See Bootstrap peers for the map format and examples. The transport settings in the table above are read from the network config file in the data directory, where any field may be omitted to take its default. The chain id is not an operator tunable at all: it is stamped onto the network config from genesis at startup and is deliberately never written to the config file.

Protocol IDs

Every wire protocol is namespaced by the genesis chain id and by role, so a node advertises a distinct name per (chain, role) pair. {chain_id} is the genesis chain id and {worker_id} is the worker id.

PurposePrimaryWorker
Gossipsub/tn-meshsub-{chain_id}same prefix
Request/response/tn-primary-{chain_id}/0.0.2/tn-worker-{worker_id}-{chain_id}/0.0.2
Peer exchange/tn-primary-peer-exchange-{chain_id}/0.0.1/tn-worker-{worker_id}-peer-exchange-{chain_id}/0.0.1
Kademlia/tn-primary-kad-{chain_id}/0.0.1/tn-worker-{worker_id}-kad-{chain_id}/0.0.1
Bulk sync/tn-primary-sync-{chain_id}/0.0.1/tn-worker-{worker_id}-sync-{chain_id}/0.0.1

The gossipsub row is a prefix, not a complete id. Gossipsub appends its own versions, so a node on adiri, chain id 2017, advertises:

/tn-meshsub-2017/1.1.0
/tn-meshsub-2017/1.0.0

Gossipsub is the one protocol that would otherwise be shared across chains, because it negotiates its own /meshsub name independently of the names below it. Namespacing the topics alone would keep the messages apart but still let cross-chain peers open a gossip substream; folding the chain id into the protocol id closes that gap. Gossip topics covers the topics that ride on the mesh, Request-Response covers what rides on /0.0.2, and Sync Streams covers the bulk-sync protocol.

Why request-response is at /0.0.2

The request-response protocol is the only one above /0.0.1. Issue #739 deleted request and response variants that had been kept alive on the wire during a rollout: the streamed epoch, partial epoch, and consensus-output requests, the missing-certificates request, the worker streamed-batch request, and their acknowledgements and replies.

Those variants were dead but positional. Deleting them shifts the BCS discriminants of every variant that followed, so a message a /0.0.1 node encodes decodes as a different message on a /0.0.2 node. The version bump landed in the same change for exactly that reason: a /0.0.2 node never negotiates request-response with a /0.0.1 peer, so the two never exchange a stale discriminant. Kademlia, bulk sync, and peer exchange were untouched and stay at /0.0.1.

Warning

A node still on /0.0.1 looks healthy against a /0.0.2 network. Gossip, discovery, and bulk sync all negotiate normally, because those protocol names did not change. Only request-response silently fails to negotiate, which surfaces as a node that has peers but never completes a direct request.

Mismatches never negotiate

A chain-id mismatch, a role mismatch, or a worker-id mismatch all produce the same outcome: the substream is never negotiated. This is structural, not a check that runs after connecting. A primary and a worker advertise different names, so they cannot talk to each other even inside the same process. Two nodes on different chains advertise different names for every protocol, so they cannot talk at all. Worker k of one validator reaches only worker k of the others.

The failure mode is quiet by design. There is no error message describing the mismatch, because there is nothing to reject — the two peers simply have no protocol in common. Outbound substreams negotiate optimistically (multistream-select V1Lazy), so a dialer that proposes one protocol sends its first request bytes in the same flight as the proposal, and a listener with no protocol in common answers na and drops the stream without any handler seeing those bytes.

Source of truth

BehaviorCode
QUIC transport, swarm behaviours, per-peer connection ceiling, fatal listener losscrates/network-libp2p/src/consensus.rs
Protocol IDs and the gossipsub prefixcrates/network-libp2p/src/types.rs
QUIC and swarm defaults, chain-id namespacingcrates/config/src/network.rs
Network and BLS key derivationcrates/config/src/keys.rs
--external-primary-addr and --external-worker-addrscrates/telcoin-network-cli/src/keytool/generate.rs
PRIMARY_LISTENER_MULTIADDR and WORKER_LISTENER_MULTIADDRcrates/node/src/manager/node/start_epoch.rs
Node command flagscrates/telcoin-network-cli/src/node.rs

This page mirrors those files. Update this page when those files change.

Established connection calibration

The optional process_budget in the YAML network-config file allocates established QUIC resources across the primary and every configured worker swarm. Production limits and deployment qualification remain pending issue #1433. Omitting this section applies the built-in swarm bound: 128 established connections per swarm, eight per peer, and the quic_config defaults of 256 incoming streams, 2 MiB of stream credit and 4 MiB of connection credit per connection.

Each swarm keeps a privileged reserve of its established connections, 50 of the default 128. Peers without privilege (not committee members, trusted operator peers or Closed admission grants) share only the remainder, at most two connections each, so 78 of the default 128 are public. A process_budget keeps this split: the reserve of a swarm is its allocated total times 50/128, rounded down. So a swarm with 12 established connections reserves 4, and a small budget still admits peers without privilege.

Allocation

The following is an arithmetic example, not a calibrated production recommendation:

process_budget:
  swarm_count: 2
  max_established_connections: 144
  max_established_connections_per_peer: 8
  max_inbound_streams: 4096
  max_receive_credit_bytes: 1073741824

For S swarms and process connection ceiling C, each swarm receives floor(C / S) connections. Let A = S * floor(C / S). Each connection receives at most floor(max_inbound_streams / A) incoming bidirectional streams and floor(max_receive_credit_bytes / A) bytes of connection receive credit. Remainders stay unused. Transport values saturate at u32::MAX, and explicitly lower quic_config settings remain lower. Stream receive credit cannot exceed the effective connection receive credit. In this example there are 72 connections per swarm, 28 streams per connection and 7,456,540 bytes of credit per connection. These are capacities, not observed usage.

The node checks swarm_count against one primary plus every configured worker before spawning any swarm. Include workers currently inactive on chain, since their swarms still run. Changing the worker count requires recalculating the allocation and restarting the node. An allocation too small to give each swarm one connection, or each connection one stream/byte, fails startup.

Inbound and outbound connections, committee members, trusted peers and ordinary peers all consume the same established limits. No peer bypass is installed in the connection-limit behaviour. Peer admission and trust rules remain separate. Swarms cannot borrow each other’s allocation, which preserves primary connection capacity when workers fill their allocation. This does not reserve service within a swarm: hostile peers can occupy its slots, and bulk traffic can still delay votes or epoch records. The inbound service class metrics show this delay, but nothing limits it. Admission policy and message scheduling need joint calibration.

Receive credit is advertised protocol capacity. It is not RSS or a bound on application buffers, tasks, CPU, locally initiated streams, pre-admission handshake state, or transient transport state before an established connection is accepted. Measure those independently. TCP is not configured by the current consensus swarm builder. Other network servers in the process require separate headroom.

Inbound service classes

Each swarm sends inbound requests and gossip to the application through one bounded queue. The swarm puts each inbound message in one service class:

ClassMessages
votePrimary vote requests (critical)
epoch_recordPrimary epoch record requests (critical)
certificate_syncCertificate catch-up requests on the request-response protocol (bulk)
batchWorker batch reports. ReportBatch is the 2f+1 quorum-ack request, so it is critical on worker swarms
gossipGossip messages
otherPeer exchange, stream catch-up, batch fetch and all other requests

No current primary request uses certificate_sync. Certificate catch-up and batch fetch use the stream protocol, and the swarm cannot see their class before it forwards them, so they are other. Thus other is not a low-priority class.

The classes label the swarm metrics below and select the application’s serve budget. They do not change swarm admission, queue space or scheduling. A message is shed, whatever its class, for one of five reasons. queue_full: the queue is full. unsubscribed: no application task receives from the queue. The primary network event queue uses this reason in a gap for all events other than epoch votes, see Primary event queue bounds. queue_budget: the primary network event queue already holds a gap cap for an epoch vote. admission: the application drops the request at its admission check. serve_budget: the application’s serve budget for the class had no free permit. A shed request gets no response: the swarm drops the response channel, libp2p closes the stream, and the requester gets a stream error at once. It does not wait for its request timeout. The swarm does not schedule by priority, so unanswered requests of any class can fill the queue and make the swarm shed votes.

Primary event queue bounds

The primary network event queue holds the requests and gossip that the swarm forwards to the primary. The queue lives for the full process, but its event loop lives for one epoch. A live event loop receives each event when it arrives, so the queue can fill only in a gap with no event loop: between two epochs, and at start before the first epoch. While an event loop receives from the queue, the queue has no caps other than its capacity.

In a gap, the queue holds only gossip on the epoch-vote topic, because the epoch votes arrive as gossip between two epochs and epoch-record voting needs them. The byte weight of a vote is the length of its data. The queue holds a vote only when its data decodes to a vote for the epoch of the last event loop or the epoch before it. These are the epoch records that the vote handler accepts at this boundary: the record that closes, and the previous record when it has no certificate. The share key of a vote is its gossip source and its epoch. The swarm forwards only gossip that an authorized publisher signed, so each forwarded vote has a source.

Before the first event loop, the queue has no epoch and holds no vote. The vote collector republishes each vote until quorum, so a vote shed at start arrives again after the event loop starts.

The queue sheds all other events in a gap as unsubscribed. Thus certificate gossip and consensus-output gossip cannot take the space of the epoch votes. A shed gossip event drops its validation ticket, and the ticket reports Ignore to gossipsub. Thus this node does not relay certificate gossip that arrives in a gap, or a consensus result that a newer result of its author replaces there (#1772). The certificate fetcher and state sync recover the content. The certificate fetcher of the new epoch gets a shed certificate again when a later certificate names it as a parent. State sync gets shed consensus output again. A shed request drops its response channel, and the peer sends the request again. The certifier sends a vote request again until a new proposal replaces it. Peers send epoch-record and stream requests again.

The caps of one gap come from the committee parameters. At a boundary, the members of three committees (the previous, the current and the next) can publish on the epoch-vote topic. The caps are sized for committees of 100 members.

CapValueSource
Copies of one vote2The vote of one author for one epoch record, and one republished copy
Epoch records2The closing epoch record, and the previous record when it has no certificate
Votes1,2003 committees x 100 members x 2 records x 2 copies
Bytes14,400,0001,200 votes x the gossip message limit of 12,000 bytes

The swarm sheds a vote past one of these caps as queue_budget. Thus one member cannot take the space of the other members. The item cap is less than the queue capacity of 10,000, so the votes that the queue holds in a gap do not fill the queue.

Known residual, replay: gossipsub has no freshness check, so a connected peer can replay old vote frames that a member signed. The queue sheds a replayed vote for an epoch outside the window as unsubscribed, so it takes no share. A replayed vote for an epoch in the window is a genuine vote of the member for that record, so the member loses no vote. The policy does not check the vote signature, so a member can publish votes with any epoch, but the window limits the member to 2 records x 2 copies. Replayed votes in the window still count against the item cap of 1,200.

When the event loop of a new epoch subscribes, the queue discards the events other than epoch votes that the previous event loop left. It keeps the votes in order and sets the gap counts to zero, also the count of each author and epoch. If the gap dropped or discarded events, the primary writes one warning with the number of events kept, dropped, over the caps and discarded.

Serve permits

A serve permit covers the application side of one forwarded request. The request handler asks for it after it dequeues the request and before it does any work for it, and the ask does not block. The permit ends when the handler drops it: after it sends the response, when it fails, when the swarm cancels the request after the request-response timeout (10 s) or a closed connection, or when its task is dropped at an epoch boundary. The permit window is distinct from tn_network_inbound_requests_pending, which the swarm measures from the forward to the response and which also spans the event-queue wait. It is also distinct from the event queue, which holds requests that no handler has dequeued yet. Gossip has no response and takes no permit.

The primary vote and epoch record handlers and the worker batch report handler take permits. The certificate_sync and other pools exist and export their series, but no handler takes a permit from them yet, so their held gauge stays at zero. The pools register all six classes at zero when the swarm’s network is built, so a missing series means that the metric is not exported, not zero.

The optional serve_budget in the YAML network-config file sets the permits per class. Every key is optional and zero is the default:

serve_budget:
  vote: 0
  epoch_record: 0
  certificate_sync: 0
  batch: 0
  other: 0

Zero means unbounded: the handler admits every request of that class and the series only observe. A node without this section serves exactly what it served before. A positive value is the number of requests of that class in service at once. When every permit is held, the handler sheds the request before any work: it drops the response channel, the requester gets a stream error at once, and the request counts once under tn_network_inbound_requests_shed_total{reason="serve_budget"}. The dropped channel also counts an omitted failure, as an admission shed does. The primary’s epoch record admission cap runs first, so an epoch record request takes a permit only after it passes that cap.

A positive value also bounds each peer. One peer can hold at most 2 permits of an enforcing class (MAX_PERMITS_PER_PEER). An offer from a peer that already holds 2 is shed under serve_budget, even when the class has free permits. Without this share, one peer could hold every permit of a class, and the node would shed the requests of every other peer in that class. Committee peers are exempt from penalties, so peer scoring does not stop a committee peer that does this.

A permit is held for the whole task. A vote task can wait on the vote lock of its author, behind an earlier vote request of the same peer, so tn_network_serve_permits_held{class="vote"} counts that wait as well as the evaluation of a header. The per-peer share limits the wait to one task per peer. A batch permit is usually held for milliseconds.

To size a budget, run with zero and watch the peaks of tn_network_serve_permits_held per class over honest steady state, catch-up and reconnect overlap. For votes, a capacity of at least two times the committee size gives every committee member its full share, whatever the other peers do. A smaller vote capacity can shed honest proposers while faulty peers hold their shares. Epoch records are bounded by the admission cap of 5 concurrent requests. Batch reports scale with the number of committee workers and their batch rate. Set each class above its honest peak with headroom. A budget below the honest peak sheds honest requests. The swarm does not schedule by priority, so a budget bounds the application’s work for a class but does not reserve queue space for it. Budget values are not calibrated; the calibration record below applies.

Observations

The connection metrics below have the configured network label (primary, worker-0, etc.). The rejection and denial counters also have a reason label:

MetricMeaning
tn_network_established_connectionsCurrent established connections across both directions
tn_network_established_connection_limitPer-swarm ceiling; zero means the legacy unbounded total
tn_network_inbound_streams_per_connection_limitEffective incoming stream capacity per connection
tn_network_receive_credit_per_connection_bytesEffective advertised credit per connection
tn_network_connection_limit_rejections_totalConnections refused by a connection limit. reason: pending_incoming, pending_outgoing, established_incoming, established_outgoing, established_per_peer, established_total or unknown
tn_network_inbound_connections_denied_totalInbound connections the swarm refused, counted once per refusal. stage: transport_cap (a connection limit), pre_auth (before the peer is authenticated), authenticated_policy (a peer manager or source admission policy after authentication) or unknown. reason: pending_incoming_limit, established_per_peer_limit, established_total_limit or other_limit for a limit; peer_manager_local_peer, peer_manager_banned_peer, peer_manager_invalid_ip, peer_manager_closed_admission, peer_manager_public_share or peer_manager_public_peer_connections for the peer manager; the snake-case AdmissionError variant (for example peer_full) for source admission; unknown for any other cause
tn_network_listener_errors_totalNon-fatal listener errors by I/O error kind. reason: address_in_use, address_not_available, permission_denied, connection, timed_out, invalid_data, other or unknown
tn_network_listeners_closed_totalListeners that closed. outcome: ok or error

tn_network_inbound_connections_denied_total is the terminal count of inbound refusals. tn_network_connection_limit_rejections_total counts limit refusals in both directions. The peer manager stage counters tn_network_listen_failures_total, tn_network_source_admission_denied_total and tn_network_closed_admission_denied_total count the same refusals where the peer manager makes the decision, so they overlap the terminal count on purpose. The peer manager registers every series of these three families at zero when it starts, so a rate query reads 0 and not a missing series.

Connection occupancy updates after swarm event processing. Scrapes can miss short peaks, so record the sampling interval and use transport tracing when measuring peak streams or retained buffers. The connection count times the credit ceiling describes configured capacity on established connections, not bytes currently retained. Sum that product over every swarm on the same node. Never interpret missing samples as zero. The connection gauges do not give active-stream occupancy.

The service class metrics also have a class label with the six values above. The shed counter also has a reason label (queue_full, unsubscribed, queue_budget, admission or serve_budget). The failure counter also has an outcome label (timeout, omitted, closed, io or unsupported). The node registers every class, reason and outcome series at zero when the swarm starts, so a missing series means that the metric is not exported, not zero.

MetricMeaning
tn_network_inbound_requests_pendingInbound requests sent to the application that wait for a response
tn_network_inbound_request_service_secondsTime from sending a request to the application to sending its response. Answered requests only
tn_network_inbound_requests_shed_totalInbound messages dropped before service, by the swarm or at application admission
tn_network_inbound_requests_failed_totalInbound requests sent to the application that got no response
tn_network_serve_permit_capacityConfigured serve permits for the class; zero means unbounded
tn_network_serve_permits_heldForwarded requests that hold a serve permit now
tn_network_serve_requests_offered_totalForwarded requests that asked for a serve permit
tn_network_serve_requests_admitted_totalOffered requests that got a serve permit

The exporter can render the service time as a summary (quantiles with _sum and _count) or as buckets. These metrics give queue occupancy and service time by class, not network round-trip time. An admission or serve_budget shed also counts as an omitted failure, so do not add the shed and failure counters.

The serve permit series carry the network and class labels. Occupancy and headroom are defined for bounded classes only, so restrict them to a positive capacity:

# Occupancy ratio, 0 to 1, bounded classes only
tn_network_serve_permits_held / clamp_min(tn_network_serve_permit_capacity, 1)
  and tn_network_serve_permit_capacity > 0
# Headroom in permits, bounded classes only
(tn_network_serve_permit_capacity - tn_network_serve_permits_held)
  and tn_network_serve_permit_capacity > 0
# Offered, admitted and shed rates in requests per second
rate(tn_network_serve_requests_offered_total[5m])
rate(tn_network_serve_requests_admitted_total[5m])
rate(tn_network_inbound_requests_shed_total{reason="serve_budget"}[5m])
# Shed ratio, 0 to 1, only where the offered rate is positive
rate(tn_network_inbound_requests_shed_total{reason="serve_budget"}[5m])
  / ignoring(reason) (rate(tn_network_serve_requests_offered_total[5m]) > 0)

Reproducible calibration record

Use ten validators, one primary and one worker swarm per node, on 8 CPU / 32 GiB hosts as the reference topology. Repeat for other supported worker counts. Record committee size, trusted peer population, admission exemptions, RTT/loss, storage, database size, catch-up distance, load generator revision/commands and the baseline node revision. Keep consensus, execution and storage headroom explicit in the process CPU/RSS/state budgets. Agree vote and epoch-record latency, persistence and catch-up regression thresholds with maintainers before selecting production limits.

tools/network-budget/capture.py records observations for an externally driven workload. It does not start validators, generate hostile traffic, instrument QUIC internals, or certify acceptance. Create a JSON manifest with these fields:

FieldRequired content
revisionFull 40-character commit of the node build
build_commandExact toolchain, flags and build command
topologyInteger validators, workers_per_node, cpus_per_node, ram_bytes_per_node
nodesOne object per validator, with unique name and metrics_url
artifactsPaths relative to the manifest for binaries, lockfile, all node configs, topology and threshold decisions
workloadExact commands, load generator revision, duration, baseline identity and traffic/topology details
decisionsAgreed thresholds, process headroom and rationale, or an explicit pending decision

For example, a node entry is {"name":"validator-0","metrics_url":"http://validator-0:9100/metrics"}. Hash inputs are streamed; the tool records hashes and paths, so archive the corresponding artifacts with the run. Capture the source tree including any patch used to build a dirty revision.

python3 tools/network-budget/capture.py calibration.json results/baseline --phase baseline --samples 600
python3 tools/network-budget/capture.py candidate.json results/catch-up --phase catch-up --samples 600
python3 -m unittest discover -s tools/network-budget -p 'test_*.py'

Use a fresh output directory for every run. The collector saves provenance, timestamped JSONL observations and scrape errors. It accepts only fixed resource metric names and topology-bounded labels, limits each HTTP response to 8 MiB, and exits nonzero if any scrape fails. Missing metrics and swarm labels are listed explicitly. If the exporter does not expose reth_process_resident_memory_bytes or reth_process_cpu_seconds_total, collect RSS and CPU with the deployment’s OS/container observer and archive those traces separately. Include task counts, active streams and retained buffers from dedicated tracing. The collector’s result always leaves acceptance pending. Each node entry can also set rpc_url. The collector then reads eth_blockNumber at each sample for persistence and catch-up, and records a missing value as missing, never as zero.

Harness, evaluation and derivation

tools/network-budget/harness.py runs the phases over ssh from a JSON inventory. plan prints every command and runs nothing. setup generates keys and genesis on the hosts. run stages the network config for one build, starts the nodes and calls capture.py. Only the candidate build writes process_budget, and the harness refuses a template that already sets it. The hostile and mixed phases need a load generator command in the inventory: generator, with a {target} placeholder, and hostile_targets. The generator must print one JSON object. No generator ships with this tool. Without one, the harness does not run these phases, and their thresholds stay pending.

Before the capture starts, run polls each metrics_url until it answers, for at most ready_timeout_secs (default 60). stop sends SIGTERM and waits for at most stop_timeout_secs (default 60). Then it sends SIGKILL. It keeps the pid file until the process exits, and it fails if the process is still alive. begin refuses a pid file that names a live process, and it appends to node.log after a start marker. In the reconnect phase, phase.json records an expected-down window for each restarted node. run ignores scrape failures only when all failures are accounted for inside those windows. An unexplained nonzero collector exit remains a failure.

evaluate.py gives pass, fail or pending for each threshold. Missing data is pending, never zero. A threshold is pending when any manifest node or swarm lacks the metric and class it needs in a phase. Counter deltas and CPU rates require at least two samples per series. A record with a scrape error, missing metrics or missing swarms also makes the phase pending outside an expected-down window. Scrapes overlapping those windows are excluded from measurements. Each service p99 is the worst (node, network) pair. critical-failures does not include the reconnect phase, because planned restarts close in-flight streams. critical-sheds includes it. It exits nonzero on any fail, and acceptance always stays “pending maintainer decision”. derive.py proposes a process_budget from the baseline honest phases: the peak times the headroom, divided like the node allocation. Its transport input is a JSON file with peaks from tracing. It refuses to run when an input is missing or has a gap that keeps evaluate.py pending. thresholds.proposed.json holds the proposed thresholds. Each threshold has the status “proposed” and a rationale that cites the Parameters defaults. Maintainers accept or change them in review.

python3 tools/network-budget/harness.py inventory.json plan --output results
python3 tools/network-budget/harness.py inventory.json run --build baseline --phase steady --output results
python3 tools/network-budget/evaluate.py tools/network-budget/thresholds.proposed.json results
python3 tools/network-budget/derive.py results transport.json --headroom 1.5 --output proposed-budget.json

Run and archive the following phases against baseline and candidate builds with identical state:

  1. Honest steady state, sustained catch-up and reconnect overlap. Measure peaks and tails for all swarms, including trusted peers and configured inactive workers.
  2. Hostile attempts to fill connection and stream ceilings from both one identity and many identities. Confirm rejection counters rise, occupancy stays within allocations, and closing connections allows recovery. Include committee/trusted identities where the test deployment permits it.
  3. Mixed catch-up and ceiling pressure while publishing votes and epoch records. Measure service occupancy and tail latency by message class, persistence throughput and catch-up completion.
  4. Repeat after reconnects and at every supported worker count. Account for handshake/transient state independently from established connection capacity.

Compare each workload with its pinned baseline and agreed thresholds. Record maximum connections, concurrent streams, credit, retained bytes, tasks, RSS, CPU and service occupancy separately. Leave missing measurements and threshold decisions pending. Only a maintainer-approved derivation and passing workload regressions can select defaults or complete #1433.

Vote latency and per-peer requests during catch-up

This page records how the node measures vote latency and per-peer request load while one validator catches up, and how those measurements turn into per-peer limits. It is the written half of issue #1742. The executable half is the catch_up_contention harness in crates/network-libp2p/src/tests/.

A validator that catches up opens sync streams to the committee peers. Those streams share a QUIC connection with the vote requests, the epoch record requests, and every other request-response protocol between the same two peers. A per-peer limit that is set below the honest peak of that shared connection slows votes. A limit that is set without a measured peak protects nothing. The limits need the honest peak, and the honest peak needs a harness that produces it on demand.

What the harness measures

QuantityDefinitionSource
Vote latency, sync connectionRound trip of a Vote request from committee peer 0 to the catch-up peer, while that connection also carries the catch-up sync streamsHarness clock around send_request
Vote latency, sync connection, after catch-upThe same round trip after the catch-up task has completedHarness clock
Vote latency, plain connectionRound trip of a Vote request from committee peer 0 to committee peer 1, a connection with no sync streamsHarness clock
In-flight requests per peerPeak and distribution of concurrent honest requests that a single peer has open at one timeHarness gauge around each round trip
Sync streams per connectionPeak concurrent sync streams the catch-up peer holds open on each committee connectionHarness gauge around each stream
Hostile streams per connectionPeak concurrent streams a hostile peer holds open on each committee connectionHarness gauge around each stream
Established connectionsEstablished peers of the catch-up peer at the end of the armNetworkHandle
Receive credit per connectionThe allocated receive credit, bounded by the QUIC connection data windowNetworkProcessBudget::allocate and QuicConfig
Resident harness bytesPeak sync streams times two frames times the frame sizeDerived from the stream peak
Process resident setPeak and final resident set of the test process/proc/self/status on Linux, ps on macOS
Epoch record serviceCount of EpochRecord requests served and failed on every committee peerHarness counters
Swarm metricsSampled peaks of tn_network.inbound_requests_pending for the vote and epoch_record classes, and the final inbound_requests_shed_total and inbound_requests_failed_total countersmetrics debugging recorder

Each latency series reports the sample count, p50, p99, p99.9 and max in milliseconds with the nearest-rank rule. A p99 needs at least 100 samples and a p99.9 needs at least 1000 samples. Below those counts the field is null, not an estimate.

Declared bounds

The bounds below were declared before the regression run. A bound that is declared after the run is not a bound.

NameBoundEnvironment overrideOwnerDateStatus
vote_p99_sync_connection_ms250 msTN_M3_VOTE_P99_MSOnyeka Obi (MavenRain)2026-10-23proposed; accepted when this page merges
epoch_record_service_percent100 percent served, zero failednoneOnyeka Obi (MavenRain)2026-10-23proposed; accepted when this page merges
catch_up_completion_factorregression completion at most 3 times baseline completionTN_M3_CATCH_UP_FACTOROnyeka Obi (MavenRain)2026-10-23proposed; accepted when this page merges
honest_sync_streams_within_derived_ceilinghonest sync stream peak at or below the derived per-connection ceilingnoneOnyeka Obi (MavenRain)2026-10-23proposed; accepted when this page merges

The harness records every bound, its owner, date, status, the observed value and a verdict in the evidence record. A verdict is pass, fail, unknown when the observation is missing, or not_applicable when the bound needs a baseline that the arm does not have.

Baseline run

The baseline arm runs the workload with the default network configuration and no hostile peers. The workload is one committee of four peers, one catch-up peer, and vote traffic between every pair of honest peers. Each committee peer sends an EpochRecord request to every other committee peer on a fixed interval. The catch-up peer opens a fixed number of sync streams to every committee peer and runs a fixed number of exchanges on each stream. Each exchange streams a fixed number of frames of a fixed size.

Run the report with:

cargo test -p tn-network-libp2p --lib -- --ignored --nocapture --test-threads=1 catch_up_contention_report

The catch_up_contention_smoke test runs both arms with a small workload in the normal test suite. It checks the plumbing. It does not produce evidence.

Regression run

The regression arm runs the same workload, with these changes:

  • The derived limits are applied through a NetworkProcessBudget on every peer.
  • Hostile peers join. Each hostile peer holds twice the derived stream limit open on every committee connection and sends twice the derived in-flight limit of Vote requests in a loop.

Both arms run in one process in one test invocation, so the two arms share the host, the toolchain, the node revision and the workload. The regression evidence record names the baseline evidence record it was derived from.

Derivation of each per-peer limit

Every limit comes from a baseline peak with one rule:

headroom(peak) = ceil(peak * 1.5), floor 1
LimitDerivationWhere it lands
In-flight requests per peerheadroom(max in-flight peak over honest peers)No configuration field exists; the harness records it as a proposed constant
Sync streams per connectionheadroom(max sync stream peak over connections) + 8 + in-flight limitmax_inbound_streams = limit * connections in the budget
Receive credit per connectionmax(headroom(resident harness bytes peak), 2 * frame size * stream limit, 1 MiB)max_receive_credit_bytes = credit * connections in the budget
Connections per peerunchanged, MAX_ESTABLISHED_CONNECTIONS_PER_PEERmax_established_connections_per_peer

The protocol stream allowance of 8 covers the identify, ping, gossipsub, Kademlia and request-response streams that the harness does not count. The in-flight limit is added to the stream limit because every in-flight request-response exchange holds one stream on the same connection.

The budget divides its totals across the swarm count and the connection count with floor division. The harness sets the swarm count to one and the connection count to twice the peer count, so the per-connection values that allocate returns equal the derived limits.

Evidence record

Each arm writes one JSON file. The location is $TN_M3_EVIDENCE_DIR when the variable is set, or target/m3-evidence/<arm>-<unix seconds>.json under the workspace root. Link the files from the issue. Do not paste them.

FieldContent
armbaseline or regression
node_revisionTN_NODE_REVISION when set, else git rev-parse HEAD
cargo_lock_hashgit hash-object Cargo.lock
quic_patch_revisionlast commit that touched patches/libp2p-quic
featuresdebug assertions, target OS and architecture, crate test configuration
configurationthe workload, the applied process_budget, the derived limits and the derivation rule
topologyrole of every peer, swarms and workers per peer, honest and hostile peer counts, shared addresses, admission policy
hostOS, architecture, available parallelism, network, firewall and generator limits
metricsmetric definitions, sampling interval, trial count, the baseline reference, the instrumentation overhead note and the full arm outcome
thresholdsevery declared bound with observed value and verdict
limitationsthe list below, verbatim

Limitations

  • Every peer listens on loopback. Wide-area latency, loss and path MTU are not in the measurement.
  • Each peer runs one swarm. A node runs one primary swarm and one worker swarm, so repeat the run per role when the worker budget matters.
  • The harness serves inbound sync streams itself. The node responder limits, its deny path and its per-peer concurrency cap are not exercised.
  • The resident set is that of the whole test process, which hosts every peer. It is an upper bound for one peer, not a measurement of one peer.
  • A p99 needs 100 samples and a p99.9 needs 1000 samples. Short windows report null for those fields.
  • Hostile peers are cooperative tasks with committee identities. They exercise the limits, not the admission policy for unknown peers.
  • Protocol streams such as identify, ping and gossipsub are not counted. The stream limit carries a fixed allowance for them.
  • The swarm pending gauges are shared across every peer in the process. A sampled peak is the last writer at the sample instant, not a per-peer peak.
  • Every number is host dependent. Compare two runs only when they share the evidence record fields above.
  • A lower constant without a passing regression run does not close this issue. The evidence record is the artefact.

Completion evidence for #1742

Checkbox in the issueEvidence
Baseline measurements with an evidence recordThe baseline evidence record from one report run, linked from the issue
Per-peer limits derived from the baseline with the rule aboveThe derived_limits and derivation_rule fields of the regression evidence record
Regression run under the derived limits with hostile peers and every bound at pass or not_applicableThe thresholds field of the regression evidence record, and the passing catch_up_contention_report test

Validated handshake-start accounting

tn_network_libp2p::admission provides the accounting contract for issue #1434. It does not install a budget, change the shipped transport, or select production rates. The current libp2p pending-inbound swarm hook supplies an address without explicit address-validation evidence. Calling the accountant there would not establish the required boundary before expensive handshake work.

Transport integration contract

The future transport adapter must verify an address-bound QUIC Retry token, construct ValidatedSource from that result, and call HandshakeStartBudget::admit once before starting the expensive handshake. Merely receiving a packet, an address, a claimed PeerId, or a swarm event cannot supply ValidationProvenance::QuicRetry. The provenance type records a trusted in-process assertion; it does not verify tokens or make an arbitrary caller trustworthy. A changed source address needs its own validation.

Install one explicit policy at process startup. Give the same HandshakeStartBudget reference to the primary and every worker transport. Additional listeners and restarted swarms obtain the installed reference through process(); a second installation fails. Proceed only on Ok(StartOutcome::Admitted). Every other outcome or accounting error rejects the start. No PeerId or address allowlist bypasses any allowance. In particular, Retry proves reachability, not committee membership. This contract supplies no priority class or exemption for authenticated traffic.

Accounting and bounded state

Each admitted start atomically spends one process, source, and prefix allowance. A source key ignores ports and peer identities, canonicalizes IPv4-mapped IPv6 to IPv4, and groups IPv4 by /24 and native IPv6 by /64. Pending-occupancy integration must reuse SourceKey and SourcePrefix so it has identical normalization, while keeping its reservations separate. Closing a connection releases occupancy; it never refunds a handshake start. Those prefix widths are the accounting contract, not calibrated production rate values.

StartRate takes a burst and a duration to replenish one start. Debt uses monotonic time with checked arithmetic, retaining fractional refill time. The process allowance starts empty, including after a full restart. After one aggregate refill interval one start becomes eligible; after a full burst duration the whole burst becomes eligible. Per-source and per-prefix allowances start full but remain inside the physical process allowance. Ordinary reconnect bursts need no attacker to hit an undersized policy.

Each source/prefix table has a separate explicit capacity. Each entry has one debt record and one ordered expiry record. Admission and eviction take O(log capacity) work without scanning the table. Only completely refilled debt may be evicted. If every entry still has debt, a new key is rejected without changing any allowance. Existing keys can still spend their remaining credit. Table churn cannot discard debt to regain an early burst.

Policy replacement is rejected until all process, source, and prefix debt has refilled. A successful replacement clears only refilled entries, preserves counters, and starts the new aggregate allowance empty. Continuous traffic can therefore defer a policy change; operators must quiesce admission to guarantee an update. There is no reset or refund API. Future occupancy integration must also respect live reservations when transitioning policy.

snapshot() exports six saturating process counters and two retained-entry counts. StartOutcome::label() supplies the fixed metric label vocabulary; the accountant emits no per-attempt logs and exports no source/identity labels. A metrics adapter should export one process snapshot, rather than summing duplicate snapshots from every swarm. A poisoned accounting lock fails closed with PolicyError::Unavailable.

Calibration and remaining acceptance work

The deterministic tests exercise the contract using synthetic rates. They cover shared NATs and mapped addresses, IPv4 and IPv6 prefixes, concurrent callers, bounded churn, refill boundaries, restarts, policy changes, and fixed-cardinality telemetry. They are not a QUIC reconnect benchmark, proof of the transport boundary, or hardware qualification.

Before enabling a production policy:

  1. Integrate the minimum Retry transport build at the validated pre-handshake boundary. Share normalized keys and transition rules with pending-occupancy accounting.
  2. Measure honest reconnect bursts with primary and worker swarms, the supported worker count, shared NATs, multiple prefixes, restarts, and policy changes.
  3. Agree on peer population, network conditions, CPU/state budgets, and reconnect failure/time bounds, then select explicit rates, bursts, and table capacities.
  4. Repeat reconnect acceptance with those values. Table saturation is deliberately fail-closed and does not guarantee fairness under unlimited source diversity.
  5. Qualify the validator profile on representative hardware with host firewall enforcement disabled. Include source diversity and compare received traffic with generator limits. Treat the larger hub/shared-NAT profile as separate capacity work.

The accounting contract alone does not complete those acceptance criteria or close #1434.

Inbound capacity qualification

This runbook measures how much inbound QUIC traffic a validator on production-class NICs receives before honest service leaves the agreed bounds, for issue #1741. It gates nothing. Its outputs are an uplink sizing figure per node configuration and a decision on the dedicated inbound accept task.

Purpose

Three questions, answered per configuration from the same hosts and workload:

  1. The highest received packet rate at which honest service stays inside the predeclared thresholds (the uplink sizing figure).
  2. Whether a larger UDP receive buffer changes that figure.
  3. Whether a dedicated task for inbound connection accepts changes that figure, and so whether the task is mandatory, optional, or not needed.

The tooling lives in etc/quic-qualification/ beside the passive host collector. Nothing here changes the shipped transport.

Environment

Use a devnet on production-class NICs with the exact node revision under test, including the carried QUIC patch revision. Host firewall enforcement stays off on the qualification hosts, with evidence recorded. Honest committee traffic and fresh honest dials continue throughout every run. Record the link speed, the effective MTU, NIC offloads, the UDP receive-buffer sysctls, the CPU allocation and the kernel; collect.py captures the host side of these at the start and end of each run.

Approvals

Operators approve the hosts, the NICs and the attack range before any run. Forged-source traffic leaves the generator host only inside that approved isolated range. The generator refuses any rate whose wire cost exceeds the declared fraction of the link, so every run stays below saturation.

Configurations

ConfigurationHow it is setWhat is recorded
1. plainThe shipped build with the carried patch and the default receive buffernode revision, carried patch revision, lockfile hash
2. receive_bufferHost sysctls net.core.rmem_max and net.core.rmem_default raised before node startthe requested size and the effective size read from the collector’s ss capture (skmem rb)
3. accept_taskquic_config: { inbound_accept_task: { mode: spawned, capacity: 64 } } in network-configthe node revision and the bound: at most capacity accepted handshakes wait for the swarm

Configuration 2 is a host setting; the repository has no receive-buffer knob. Configuration 3 is an opt-in measurement prototype, default off. With the flag off the listener path is the shipped one. With it on, each listener spawns one task that waits for attempts, applies the Retry policy and queues accepted handshakes in a bounded channel for the swarm. The bound is explicit and recorded with every run.

Traffic

generate.py ships the two swarms. Both use forged IPv4 sources, both stay below saturation, and both report offered figures only.

sudo python3 -I etc/quic-qualification/generate.py initial \
  --template /var/tmp/initial.bin --source-range 198.51.100.0/24 \
  --target 192.0.2.10:9000 --rate 20000 --duration 120 --link-mbps 10000 \
  --output /var/tmp/run-01-initial.json

sudo python3 -I etc/quic-qualification/generate.py peerlist \
  --sources /var/tmp/peer-addresses.txt --size 64 \
  --target 192.0.2.10:9000 --rate 20000 --duration 120 --link-mbps 10000 \
  --output /var/tmp/run-01-peerlist.json

The initial swarm replays one genuine QUIC Initial (captured from the quic-initial fixture in testing/quic-interop) from sources drawn across the approved range. The peerlist swarm sends small datagrams whose forged sources are the addresses on the node’s committee, trusted and bootstrap peer lists, supplied by the operator from the node’s configuration and peer records.

Run one swarm, then the other, then both together, with honest traffic continuing in every arm. Repeat with order varied and matched unloaded baselines.

Measurements

Start the collector and the scrape before the generators and stop them after:

python3 -I etc/quic-qualification/collect.py \
  --pid 12345 --interface enp1s0 --manifest /var/tmp/run-01.json \
  --duration 180 --interval 1 --output /var/tmp/run-01-collector

python3 -I etc/quic-qualification/measure.py \
  --metrics http://127.0.0.1:9101/metrics --duration 180 --interval 1 \
  --generator /var/tmp/run-01-initial.json --generator /var/tmp/run-01-peerlist.json \
  --output /var/tmp/run-01-measurement.json

The node exports metrics only with --metrics <addr>. Each figure and where it comes from:

FigureSourceMeaning
offered rategenerator summarypackets and bits the generator put on the wire, per swarm
received ratemeasure.py, tn_network_quic_incoming_outcomes_totalattempts the validator’s listener observed, by stage and decision, and in total
kernel socket dropscollect.py, per-socket drop deltasdatagrams the kernel dropped before the node read them
process CPU and RSSmeasure.py, reth_process_*CPU cores in use and resident memory over the run
latency on established connectionsmeasure.py, tn_network_outbound_request_duration_secondsp50, p99 and p99.9 of honest request round trips
honest dial success and handshake timemeasure.py, tn_network_connections_established_total, tn_network_dial_failures_total, tn_network_connection_established_secondsfraction of fresh honest dials that established, and how long the handshake took
consensus progressmeasure.py, tn_primary_round, tn_primary_committed_round, tn_primary_subdags_committed_totalrounds advanced and commits per second

Offered and received figures stay separate in every output. Quantiles come from the node’s global histogram buckets (0.005 s to 30 s), so p99.9 resolution is bucket-limited; the measurement reports the bucket bounds it used and flags a quantile that fell into the overflow bucket.

Evidence record

Build one record per run from the manifest and the three outputs:

python3 -I etc/quic-qualification/record.py build \
  --manifest /var/tmp/run-01.json --collector /var/tmp/run-01-collector \
  --measurement /var/tmp/run-01-measurement.json \
  --generator /var/tmp/run-01-initial.json --generator /var/tmp/run-01-peerlist.json \
  --configuration plain --output /var/tmp/run-01-evidence.json

The record carries the five groups the issue asks for: build, topology, host_and_traffic, method and thresholds, plus open_limitations and the SHA-256 of every input under artifacts. Each threshold carries its value, owner and date from the manifest and a pass, fail or unknown result with the reason. A missing input is null plus a limitation, never a guess. Link the full logs and raw artifacts from the record rather than pasting them into it.

Outputs

Per configuration, the capacity figure is the highest received rate among the runs whose thresholds all pass:

python3 -I etc/quic-qualification/record.py capacity \
  --records /var/tmp/run-0*-evidence.json --output /var/tmp/plain-capacity.json

Post the figures in the related security advisory, not on the public issue. Record the accept-task decision there too, and summarize it on the issue without the figures, in this shape:

Dedicated inbound accept task: mandatory | optional | not needed. Reason: the capacity figure for accept_task compared with plain and receive_buffer under the same thresholds, and the open limitations.

Early identity refusal

Decision

Keep identity refusal at the existing established-connection checks. Do not add an earlier TLS admission callback for #1435. This is the issue’s explicit no-change outcome, reviewed against Telcoin Network 5736cc30 on 2026-09-24.

An earlier check can only save work for identities the admission policy already rejects. The current inbound identity check rejects self-connections and banned peers. It does not require an identity to belong to a committee, trusted-peer set, or bootstrap set. Moving that check into TLS would therefore still admit a fresh, unbanned identity at an otherwise admissible address with available connection capacity. It would not establish an authoritative admission policy.

No current-provider benchmark was run for this decision, and no handshake CPU, latency, or throughput savings are asserted. Potential savings on existing refusal cases remain unmeasured. The decision is to avoid adding a second policy enforcement point without a separately defined and tested admission contract or evidence that its benefit justifies the maintenance cost.

This decision does not complete the independent launch requirement for authoritative admission. That requirement needs its own implementation and tests. QUIC Retry, connection limits, and this investigation’s closure do not satisfy it.

Source evidence

The following observations are static source checks, not deployment or performance qualification:

BoundaryObserved behaviorSource
Established inbound identityRejects the local PeerId and banned peers, then returns a connection handler. There is no committee/trusted/bootstrap membership check in this hook.PeerManager::handle_established_inbound_connection
Established connection countThe connection-limit behavior caps connections per PeerId. A new identity has a separate count.connection_limits
QUIC configurationTelcoin configures the QUIC transport through with_quic_config. The pinned transport builds its TLS configurations using libp2p-tls; its TLS configuration fields are private.Telcoin swarm construction, libp2p-quic configuration
TLS providerlibp2p-tls selects the AWS-LC provider for both client and server configurations and installs its certificate verifier.libp2p-tls configuration
Certificate and transcript checksThe verifier parses the presented certificate and verifies the TLS 1.3 handshake signature. An early refusal must not turn a claimed identity into authenticated identity.libp2p-tls verifier

The lockfile pins libp2p 0.57.0, libp2p-quic 0.14.0, libp2p-tls 0.7.0, quinn 0.11.9, quinn-proto 0.11.18, and rustls 0.23.37. These versions and the provider must accompany any later profile. A result from a different provider or dependency revision is not evidence for this baseline.

The established identity hook is only one part of connection management. Address screening, capacity checks, scoring, and subsequent disconnection still apply as described in Peers. This decision does not characterize every unknown peer as guaranteed a usable connection.

Requirements before reconsidering

Authoritative admission first

Define and test the established-connection admission contract separately before introducing an optimization of that contract. Its tests must settle:

  • The allowed identities for each node role, including how committee, trusted, and bootstrap sets combine and behave across committee rotation.
  • How policy revisions become visible to connection admission, including a revision that changes while a handshake is in progress.
  • Whether existing live connections survive a policy change, and how any required disconnections are enforced.
  • The behavior for stale or missing policy inputs, the launch fallback, the explicit condition that closes that fallback, and recovery after stale input.

The established gate must remain authoritative if an earlier refusal is added. Both enforcement points must use the same contract. An early pass is not a reservation or permission to bypass the current policy at connection admission.

One shared handshake profile

Use one current-provider baseline and workload definition with the certificate-verification investigation and the key-exchange investigation. Record the Telcoin commit, lockfile, provider, build options, hardware, instrumentation, workload counts, and raw results so the three investigations do not attribute the same saved work to different changes.

Measure these boundaries and cases separately:

DimensionRequired evidence
Before a peer certificate is availableListener and handshake work already performed before an identity-based refusal could run. Do not credit this work as saved by a certificate-stage check.
After a peer certificate is availableIdentity extraction and policy lookup cost, certificate/extension verification, TLS transcript verification, and remaining work until the established gate. Measure the candidate’s actual refusal point.
Refusal frequencyCounts and reasons for policy refusals, including fresh unknown identities, self-connections, banned peers, and capacity refusals. Keep malformed authentication separate from policy denial.
Full and resumed handshakesCounts, CPU cost, and latency for each path. Determine whether resumption occurs with the shipped configuration; report an unexercised path explicitly rather than assuming coverage.
Honest operationInitial connections and realistic reconnects, including restart and committee rotation, with acceptance rate and latency distributions as well as refused-handshake cost.

Estimate the benefit using measured refusal frequencies and the work actually avoided after the candidate check, including the extra lookup cost on accepted connections. Set an acceptance threshold before comparing the candidate with the baseline. Publish the result even if it supports keeping this no-change decision. A Retry result alone supplies neither identity admission nor evidence of savings from earlier identity refusal.

Conditions for a later implementation

If the admission contract and profile justify a change, require all of the following before shipping it:

  • Treat an identity extracted before signature verification as untrusted. A claimed allowed identity without valid proof must receive no authentication, trusted scheduling, or quota exemption.
  • Preserve certificate, libp2p identity-extension, and TLS transcript verification for accepted peers. Test invalid proofs claiming an allowed identity as well as valid allowed and valid refused identities.
  • Apply current admission policy to resumed connections, including sessions created before a ban, committee rotation, or other policy revision. Test stale input fallback and recovery on the applicable full and resumed paths.
  • Demonstrate the measured benefit while preserving the required stock-peer interoperability matrix and honest reconnect behavior. Coordinate that coverage with the QUIC interoperability work.
  • Record the owner, upstream baseline, regression coverage, and upgrade checks for every additionally modified TLS or transport crate. Do not assume the existing QUIC tuning callback exposes a certificate-verifier hook.

Gossip

Telcoin Network nodes flood four gossipsub topics: certificates, consensus output, epoch votes, and worker batch digests. All four are permissioned. A node accepts a gossip message only when the publisher’s BLS public key is on that topic’s allowlist for the current epoch, and it rejects everything else before re-propagating it.

This page is for RPC providers, dapp and indexer operators, bridge partners, and validators. It gives the topic names, who may publish on each, how a publisher is authenticated, the message size limit, and which peer is penalized when a message is rejected.

The implementation lives in crates/network-libp2p/src/consensus.rs and crates/config/src/network.rs. Transport covers the QUIC transport these topics ride on, Discovery covers the signed node records that resolve publisher identities, and Peers covers the reputation system that the gossip penalties feed.

The four topics

TopicAuthorized publishersPayload
tn-primary-{chain_id}current committeeCertificate
tn-consensus-output-{chain_id}previous, current, and next committeeConsensusResult
tn-epoch-vote-{chain_id}previous, current, and next committeeEpochVote
tn-worker-{chain_id}-{worker_id}current committeebatch digest, (Epoch, BlockHash)

Topics are identity-hashed, so the strings above are exactly what appears on the wire. On the Adiri testnet, whose chain id is 2017, a single-worker node uses these four names:

tn-primary-2017
tn-consensus-output-2017
tn-epoch-vote-2017
tn-worker-2017-0

The gossipsub protocol id is chain-scoped for the same reason the topics are: the builder yields /tn-meshsub-2017/1.1.0 and /tn-meshsub-2017/1.0.0. Without that, meshsub would be the one wire protocol two chains still shared.

What “permissioned” means

Each subscribed topic carries an allowlist of BLS public keys. Verification of an inbound message reads that entry and resolves the message author’s libp2p peer id to a BLS key:

entry absent          -> topic not subscribed here          -> reject
entry is an allowlist -> accept only if the author's resolved BLS key is in it
entry is None         -> subscribed, any publisher accepted

The None case is a real capability of the mechanism: it makes a topic permissionless.

Note

No production topic uses it. All four topics are subscribed with an explicit committee allowlist, on every node, on every epoch. A message from a peer outside the allowlist is rejected and is never re-propagated by an honest node.

Rejection is not the same as ignoring. A rejected message is dropped and, where a culprit can be identified, costs that peer reputation.

Topic scoping

Topics are scoped by chain and, for batch digests, by worker id. They are never scoped by epoch. Epoch scoping happens instead by re-subscribing to the same topic name at the start of every epoch, which overwrites the stored allowlist with the new committee’s keys.

Subscriptions live on a process-lifetime swarm, so a topic subscribed in one epoch stays subscribed until it is explicitly dropped. Unsubscribing must therefore remove the allowlist entry, not merely stop reading. An absent entry means “not subscribed here, reject”, which is the correct state for a topic this node has left. A stale entry left behind would pin the topic to whichever committee was current when the node last subscribed, and honest publishers from every later committee would be rejected as unauthorized.

Why two topics span three committees

Certificates and batch digests are current-epoch traffic, so the current committee is the whole allowlist.

Epoch votes and consensus output are epoch-boundary traffic. An epoch’s closing vote and its final consensus output are authored by the outgoing committee and gossipped into the next epoch. A current-committee-only allowlist would reject exactly those in-flight boundary messages during rotation, and stop re-propagating them, stalling certification of the epoch that just closed. A validator rotating in may likewise start publishing slightly early. Widening the allowlist to the previous, current, and next committee also makes it agree with the window the peer manager already uses for validator penalty exemption, so the propagation-authorization window and the penalty-exemption window cannot disagree. Peers that were never on a committee remain excluded.

The authentication chain

An accepted gossip message has passed three independent checks, in this order.

  1. Message authenticity. Gossipsub runs in Signed authenticity mode, so every message carries the source peer id and a signature over the message made with that peer’s libp2p network key. This proves the author owns the network key, and nothing more.
  2. Identity resolution. The peer manager maps a libp2p peer id to a BLS public key only through a signed node record it has verified, and the record’s signature is bound to a (chain, role) domain so a record signed for one network never verifies on another. A record is accepted only when the network key it advertises matches the identity that published it, so relaying someone else’s record never lets the relayer claim that identity. Discovery covers the record itself, and Peers covers the mapping.
  3. Allowlist membership. The resolved BLS key must appear in the topic’s allowlist for the current epoch.

The chain has no shortcuts. A peer with no resolved BLS identity fails step 3 on every restricted topic, regardless of how well-formed its message is.

Message size

MAX_GOSSIP_MESSAGE_SIZE is 12,000 bytes, sized to hold the largest legitimate gossip payload, a Certificate.

It is a network-wide protocol constant, not a per-node tunable, and it is deliberately not readable from operator configuration. The reason is the penalty path. An oversized message fatally bans the peer that relayed it, and that attribution is sound only when every honest node applies the identical bound. If one operator raised the limit locally, that node would forward payloads its neighbours consider oversized, and those honest neighbours would ban it. If an operator lowered it, that node would ban honest peers forwarding legitimate traffic.

The bound is enforced symmetrically. A node refuses to publish a message larger than the limit rather than emitting one its peers must reject, so on the first hop the originator is never the victim of its own ban.

Frame limits

Every gossip message is signed, and gossipsub verifies one signature for each message in a received frame. That work runs before the duplicate cache and before the MAX_GOSSIP_MESSAGE_SIZE check, so the node sets explicit frame limits that the codec applies first, on the raw bytes, before it decodes the frame or verifies a signature. A frame that breaks a limit closes the stream, and none of its messages are delivered.

  • Frame size: 24,579 bytes. One honest frame is at most 16,387 bytes: one 12,000-byte payload plus a 512-byte bound on its envelope, or one 16 KiB control field plus its length prefix. The node’s own IHAVE gossip fits in that control field because of the cap on message ids per IHAVE below. The codec reads in 8 KiB chunks and checks the size of its whole read buffer, not of one frame, so the limit adds one read chunk. Without that slack, two maximum frames sent back to back can close an honest stream. The 16,387-byte bound covers the frames an author sends and the frames a node forwards, because the node rejects the one unsigned field that a forwarder could grow (see the key item below).
  • Publish entries per frame: 8. An honest peer sends one message per frame. The library default of 500 would let one frame force 500 signature checks. This is a per-frame bound, not a rate bound.
  • Control bytes per frame: 16 KiB. This equals the library default, set explicitly so that an upgrade cannot change it.
  • Message ids per IHAVE sent: 198. Each heartbeat, gossipsub sends one IHAVE per topic to subscribed peers outside the mesh, except explicit peers. The IHAVE lists the validated message ids of the last three heartbeats, and gossipsub puts no byte cap on it. A message id is 71 bytes today, so on a 15-byte topic an IHAVE of 225 ids passes the 16 KiB control limit, and the receiver closes the stream. The library default allows 5000 ids. The node caps the ids per IHAVE at 198, which fits the limit with an 80-byte id on a 64-byte topic. Above the cap, each peer gets a different random subset of the ids, so gossip coverage drops but the stream stays open. The same setting caps the ids that the node requests from one peer with IWANT in one heartbeat. The cap changes only the frames that the node sends, so peers on other versions need no change.
  • Unsigned key field: rejected. The author signs from, data, seqno and topic, but not key. A node forwards a message as it received it, so without this check a peer could add bytes in key to a valid message, and every honest node would forward the larger copy. An ed25519 author never sends key, because its public key is inlined in its peer id, so the node drops every message that carries key (issue #1699). This check drops the message only, and the stream stays open. It runs before the duplicate cache, so a later clean copy of the same message is accepted. The node does not penalize the peer, because a node on an older release forwards such a message without fault.

No topic has its own size limit, because MAX_GOSSIP_MESSAGE_SIZE applies to every topic. The limits and the order in which the library applies them are recorded at gossipsub_config, with the resolved library versions. A dependency upgrade must re-check both.

Penalty attribution

Rejection never propagates the message. The reason for the rejection decides only which peer, if any, loses reputation.

  • Oversized payload: the relayer’s fault. An honest node never originates an oversized message and, under strict validation, never forwards one, so delivering one is misbehavior by the peer that delivered it. The relaying peer takes a fatal penalty.
  • Unauthorized author: the author’s fault, charged only on the author’s own delivery. A forwarder that relayed content authored by someone else is not accountable for that content, so the relayer takes no penalty. The resolved author takes the fatal penalty only when the frame arrived over the author’s own connection, which is the one delivery that is the author’s act. A signed frame is static, and gossipsub remembers its id for only the 60 s duplicate-cache window, so any peer that received the frame while the author held a committee slot could deliver it again after the author left the previous, current and next window. Charging the author for such a delivery would let any connected peer ban an ex-committee validator at will (GHSA-vw36-8f6c-vppp), so a frame delivered by a peer other than its author is dropped and no one is charged.

If the accountable identity has not resolved — a peer can be connected and relaying before its node record arrives — the node skips the penalty entirely rather than charging whichever peer happens to be in hand. The same skip covers an anonymous message, a frame delivered by a peer other than its author, and the case where this node’s committee view lags a neighbour’s. Messages that pass the network-layer checks carry both the relayer and the author onward, as optional identities, so a fault that only deep validation can surface is still charged to the author rather than the forwarder. A certificate whose aggregate signature fails is such a fault: the primary reports Reject and charges the author a fatal penalty. Every author these topics admit holds a committee slot, and the peer manager exempts committee keys from penalties, so the penalty is recorded with outcome=exempt. The cost the author pays is local: the primary ignores that author’s gossip for 10 seconds after the strike, doubling with each further strike in the epoch up to 160 seconds (#1772). The primary strikes an author only for a fatal author fault on a frame that the author delivered itself. A forged frame that another peer relays is rejected and not forwarded, but it strikes no one, which is the rule the network layer applies for GHSA-vw36. A consensus result with a bad signature also strikes its author.

Validation configuration

Gossipsub runs with strict validation mode, manual message validation, and a one-second heartbeat interval. Manual validation is what allows the allowlist check and the primary’s signature check to run before a message is re-propagated: the node reports accept, reject or ignore explicitly, and only an accepted message is forwarded.

Gossipsub’s own peer scoring is deliberately left disabled. The peer manager is the authoritative reputation system, and running gossipsub scoring alongside it would double-count the same misbehavior — once as a gossipsub score decay and again as a peer-manager penalty — with two sets of thresholds that could disagree about when to disconnect. Two gossipsub events do feed the peer manager directly: a peer that does not support gossipsub is fatally penalized, and a peer that persistently fails to keep up with the mesh takes a mild one.

Keeping scoring off has two consequences inside the library. Upstream gossipsub removes an expired IWANT promise only from the scoring branch of its heartbeat, so a peer that advertises ids with IHAVE and never delivers would grow the promise map without bound. Upstream also skips an advertised id while any peer holds a pending promise for it, so one peer’s unanswered promise, renewed with each IHAVE at no cost, would suppress the IWANT to every other advertiser of that id. The node therefore carries patches/libp2p-gossipsub, which expires promises on every heartbeat, applies the broken-promise penalty only while scoring is active, and skips an advertised id only when the advertising peer itself already holds a pending promise for it; patches/libp2p-gossipsub/PATCH.md records the patch and its retirement criteria.

Deferred validation (#1772)

Gossipsub holds each message until the node reports a verdict. With a history length of 12 and a 1 second heartbeat, a held message stays reportable for about 12 seconds. A deferred verdict can land after the primary’s epoch gap. In a gap the primary event queue holds the epoch votes (#1786) and the newest consensus result of each author, so this window covers the verdicts of the gossip held through the gap. Certificate gossip that arrives in a gap, and a consensus result that a newer result of its author replaces there, is shed, its ticket reports Ignore, and this node does not relay it. The author’s flood publish and the committee dials still deliver it to the committee. The network layer admits a message first: it checks the size and that the author is an authorized publisher for the topic. An admitted message goes to the application with a validation ticket, and the network layer does not accept it yet. The primary verifies the signature before it reports a verdict, with at most 4 messages per peer in verification at once. The cap is keyed by the author, or by the relayer when the author has not resolved, and gossip with neither identity shares one bucket with the same cap. The primary reports Accept right after the signature check passes, and only then does gossipsub forward the message. A failed check reports Reject: a bad aggregate signature on a certificate, a bad signature on a consensus result or an epoch vote, a malformed payload, or a message on the wrong topic. The author of a rejected message is charged the penalty, which is fatal for a failed aggregate signature. Committee authors are exempt from peer-manager penalties, so a fatal author fault on a frame that the author delivered itself puts the author’s gossip on a local cooldown instead: 10 seconds, doubling per strike up to 160 seconds, cleared at the epoch change. A consensus result with a bad signature also puts its author on the cooldown. A forged frame that another peer relays is rejected and not forwarded, but it strikes no one, which is the rule the network layer applies for GHSA-vw36. Gossip that the primary cannot verify, such as a certificate for an epoch with no known committee, reports Ignore. A certificate for an earlier epoch reports Ignore before any verification, is not forwarded and charges no one. Observers and ExEx get earlier-epoch certificates through epoch-pack sync. A certificate for the next epoch that fails against the provisional committee also reports Ignore. A certificate that this node already holds or verified recently, or one below its garbage-collection round, is recognized before the aggregate check, so a replayed certificate frame reports Ignore without a verification and is not forwarded. This known-certificate check applies to current-epoch certificates. Duplicate consensus results and epoch votes, stale consensus results and messages over the per-peer cap also report Ignore. Certificate gossip that arrives in the epoch gap, and a consensus result replaced there by a newer result of its author, also reports Ignore, and this node does not relay it. Ignore drops the message without a penalty. A ticket dropped without a verdict reports Ignore, so no message is forwarded by default. The verdict frees the verification slot, so downstream work on verified gossip is not bounded by the cap. The worker accepts batch gossip when it receives it, because its check fetches the batch over the network and can take longer than the validation window.

Topic re-validation in the application layer

Passing network-layer verification is not the end of the check. Every application handler re-reads the topic name on the message it received and confirms it matches the topic that payload type belongs on. A certificate delivered on the epoch-vote topic, or a batch digest delivered on a different worker’s topic, is a mismatch.

A mismatch is a fatal ban, charged to the author rather than the relayer, because the declared topic is part of the content the author produced. The check exists because the two layers are configured independently: the network layer knows only that the publisher was allowlisted for whichever topic the message declared, not that the payload belongs there.

Worker batch subscription is node-mode gated

The batch digest topic is the only one whose subscription depends on the node’s role for the epoch. Committee validators subscribe, which warms the batch cache the voting path reads. Observers unsubscribe.

Observers gain nothing from the digest announcements: batch bodies already reach them inside the verified consensus output and epoch packs they download, so prefetching would refetch bytes already in flight. The decision is two-sided rather than a simple skip, for the reason above — a node that subscribed as a validator in one epoch stays subscribed after it becomes an observer unless the subscription is explicitly dropped, and skipping would also skip the only refresh of that topic’s allowlist. See Network architecture for the node roles this gate reads.

Source of truth

BehaviorCode
Topic namescrates/config/src/network.rs (LibP2pConfig topic constructors)
Message size limitcrates/config/src/network.rs (MAX_GOSSIP_MESSAGE_SIZE)
Gossipsub configuration, frame limits, the IHAVE id cap and key rejectioncrates/network-libp2p/src/gossip_config.rs (gossipsub_config, RejectGossipKey), called from ConsensusNetwork::new
Allowlist check and subscribe/unsubscribecrates/network-libp2p/src/consensus.rs (verify_gossip, NetworkCommand::Subscribe)
Penalty attributioncrates/network-libp2p/src/consensus.rs (RejectReason::penalty)
Per-epoch subscription and allowlistscrates/node/src/manager/node/start_epoch.rs (spawn_primary_network_for_epoch, spawn_worker_network_for_epoch)
Application-layer topic re-validationcrates/consensus/primary/src/network/handler.rs, crates/consensus/worker/src/network/handler.rs

This page mirrors those files. Update this page when those files change.

Discovery

Telcoin Network nodes find each other through a Kademlia DHT of signed node records. A record maps a validator’s BLS public key to the network key and address its swarm is listening on, so a node holding a committee’s key list can resolve every member to a dialable peer.

This page is for RPC providers, dapp and indexer operators, bridge partners, and validators who need to know how a node locates the committee, what it admits into its routing table, and what it rejects. Every value below is the constant the node compiles with.

The record format and its signing domain live in crates/network-libp2p/src/types.rs. The discovery loop lives in crates/network-libp2p/src/consensus.rs. The persistent DHT store lives in crates/network-libp2p/src/kad.rs. Transport covers the protocols these queries negotiate and Peers covers the reputation scoring that discovery feeds.

The node record

A node record is keyed on the primary’s BLS public key, on the primary network and on every worker network alike. One key therefore resolves an entire node: the primary swarm and each worker swarm publish their own record under the same key, on their own DHT.

The value is a signed NetworkInfo: the swarm’s network public key, its advertised multiaddrs, a publication timestamp, and optional RPC endpoint information. Only worker records carry RPC info, and only for validators that choose to advertise it publicly. The timestamp is what lets a node keep the freshest record when several arrive for the same key.

Domain separation

The bytes a record’s BLS signature covers are wider than the bytes on the wire:

signed_payload = label            # "telcoin-network/node-record/v1"
               || chain_id        # from genesis
               || role            # 0 = primary, 1 = worker
               || worker_id       # 0 for a primary record
               || NetworkInfo     # the only part transmitted

The label, chain id, role, and worker id form a domain that is never transmitted. A verifier rebuilds the domain from its own network identity, so a record verifies only where it was meant to be published. A validly signed worker record does not verify on the primary DHT, a worker 0 record does not verify on worker 1, and a record signed for one chain does not verify on another. This is what closes cross-role and cross-chain record replay.

The trailing v1 is the signed-payload schema version. Records signed by software predating the domain do not verify and are dropped after an upgrade, including at startup when the persisted store is reloaded.

What validation requires

An inbound record is accepted only when all of the following hold.

  1. The record key parses as a BLS public key.
  2. The signature verifies against that key over the domain the verifier rebuilt for itself.
  3. The record advertises at most 1 multiaddr. An honest node publishes exactly one address per record, so a longer list is only an attempt to write attacker-chosen bytes into the peer entry.
  4. The record’s publisher equals the peer id derived from the network public key inside the record. Without this, a peer could republish someone else’s stale record under its own connection.

A record that fails any of these earns the sender a Fatal penalty, which bans immediately. A record that is valid but older than the one already stored is ignored without penalty: republication after a restart is normal.

Passing validation is not the same as entering the resolution cache. A record learned from a DHT query is cached only when its BLS key belongs to the previous, current, or next committee. A peer that pushes its own record over its own authenticated connection has its key-to-peer-id binding confirmed so the live connection survives, but a non-committee key never enters the committee resolution cache.

Kademlia configuration

  • Mode::Server, unconditionally. Every node serves DHT queries, including observers and RPC nodes. A node that only consumed the DHT would take routing capacity without returning any.
  • Manual k-bucket inserts. libp2p never adds a peer to the routing table on its own; a peer is added when the node’s own peer manager registers the connection, and removed when it disconnects or is banned. Discovery and reputation therefore share one admission decision.
  • k-bucket size 20, the standard Kademlia replication parameter.
  • Record TTL 48 hours, applied to both records and provider records.
  • Republication every 12 hours, comfortably inside the TTL so a node’s own record never lapses.
  • 60 second query timeout. A closest-peers query that times out still yields the peers it reached, and those are kept: queries are slowest exactly when the node is short of peers and needs them most.
  • FilterBoth record filtering. No inbound record or provider record reaches the store without first passing through the validation above. This makes the node’s own handler the sole write path for peer-supplied data.

The record store

The store is persistent, backed by the consensus database rather than memory, so a restart does not erase what the node learned. Rows are namespaced by the same role discriminant and worker id that the signing domain uses, so a primary and each of its workers keep entirely separate record and provider tables in the shared database.

Sizing bounds the node’s DHT storage duty at 1024 records, a 65 KiB maximum value size, 1024 provided keys, and 20 providers per key. Provider records carry the same 48 hour TTL, which means a saturated provider table expires nothing for two days; the eviction scan that runs when the table is full is therefore throttled to at most once per 60 seconds so a full table cannot be turned into a full-table scan per inbound message.

Rows whose bytes no longer decode — after a schema change or on-disk corruption — are purged at startup instead of failing the read.

Six ways a node finds the committee

  1. Bootstrap peers. The first contacts come from the bootstrap servers selected at startup: --bootstrap-peers, then bootstrap_peers in network-config, then the chain’s default set, which is the list built into the binary for --chain or else the genesis committee file’s (Bootstrap peers). The primary network takes each server’s primary address; a worker network takes that server’s entry for its own worker id, and skips servers that run fewer workers. Bootstrap peers are registered once per process, before committee membership is applied, and are pinned so committee rotation never evicts them.
  2. Trusted and explicit peers. Operator-provisioned peers are pinned the same way and are penalty-exempt: severe and fatal penalties are recorded but never applied, so a trusted peer cannot be scored out of the peer set. See Peers for what exemption covers.
  3. Record lookup on missing authorities. When the committee changes, or when a caller asks for validator RPC endpoints, the node issues a DHT record lookup for every committee key it cannot yet resolve. Polling callers report the same key as missing on every call, so lookups are deduped against in-flight queries: at most one live query per key, re-armed as soon as that query ends. Without the dedupe, one unreachable authority would fan out into duplicate queries for as long as it stayed unreachable.
  4. Closest-peers walk on the discovery heartbeat. The peer manager’s heartbeat runs every 30 seconds. When the pool of dialable discovery candidates is below its target, the node issues a closest-peers query for a random key, which is the standard Kademlia way to sample unfamiliar regions of the routing table. Candidates are dialed at random from the pool until the connection target is met.
  5. Peer exchange on graceful disconnect. A node that is over its peer target disconnects gracefully and sends a peer-exchange map first, which the receiver folds into its discovery pool. Exchange results fill spare capacity only, never displacing existing entries, which keeps DHT-discovered peers ahead of hearsay from a departing connection.
  6. Direct record push to first-time peers. On a first connection the node pushes its own record straight to the new peer, so that peer can resolve its BLS key immediately instead of waiting up to 12 hours for the next republication. The de-dup set behind this is a 10,000-entry LRU, so a peer that reconnects repeatedly is pushed to once, not once per connection.

Every candidate from any source is filtered before it is dialed: never the node’s own identity, at most one address, at least one valid IP, no banned IP, and not already connected or dialing.

Why query results are not written back

A record that arrives as the answer to a lookup is promoted only into the in-memory resolution cache. It is deliberately not written to the persistent store.

The node needs the resolution, not the record. Storing a third-party record would enlist libp2p’s replication job to republish it on every replication run, roughly hourly, turning every node into an hourly replicator of records it was never asked to serve. It would also spend the store’s record cap — the node’s actual DHT storage duty — on query traffic. Nothing is lost, because peers push their own records on first connect, and that is the path that legitimately fills the store.

Rate limits on inbound writes

Two inbound message types write to the consensus database, and both are rate-limited per source before any signature is verified or any row is touched.

MessageBudgetWindowOver budget
PutRecord30 per source60s fixeddropped, Medium penalty
AddProvider5 per provider60s slidingdropped, Medium penalty

Each admitted PutRecord costs a roughly 1 ms BLS verification plus a database write on the same task that relays consensus gossip, and a self-signed record from an unbanned peer passes every other check, so without a budget one peer could starve the event loop with valid records. Honest traffic sits far below both numbers: a node refreshes its record on the 12 hour republication cadence and libp2p’s roughly hourly replication run, which is a handful of messages per minute even after a restart. Each admitted AddProvider costs a row decode, merge, re-encode, and a physical database commit, and repeating it for a key already stored skips the store’s capacity gate entirely; honest traffic peaks at about one message per peer per minute.

Both window maps are capped at 1024 tracked sources. At capacity, a source that is not already tracked is denied rather than evicting a tracked one. The alternative would hand an attacker a reset button: cycle fresh peer identities until your own tracking entry is evicted, then start a fresh budget.

A Medium penalty bans a peer after roughly ten occurrences; Peers has the full scoring model.

Epoch startup

Process startup initializes swarm listeners, registers bootstrap peers and starts bootstrap dials before the epoch loop. Epoch setup refreshes committee membership and starts committee dials without waiting for peers. A process-lifetime monitor samples the primary and every configured worker swarm every five seconds, with a one-second bound on each established-peer probe. When enabled with --healthcheck (a port binds loopback; a socket address binds that interface), GET /health/network returns a cached versioned JSON snapshot: 503 until every configured swarm has an established peer, then 200. Connectivity can recover while the node remains running; this route does not certify consensus, sync readiness or RPC transaction acceptance.

Bootstrap and committee dials retry with backoff doubling to a cap of 120 seconds. Each dial outcome wait is bounded to one second, including command admission; timing out does not cancel the swarm’s transport dial. An already-dialing reply means the attempt is still pending, so retries continue until a dial succeeds or the peer is already connected. A retry task gives up after repeated failures only once at least one other peer is established, so a completely isolated node keeps trying its remaining routes in. Startup dial tasks survive epoch turnover; committee dials started by epoch setup use the epoch task manager and are cancelled at its boundary.

Note

Reaching a peer is only the first step. A connection still has to clear the peer manager’s admission checks and, for gossip, the topic publisher allowlists described in Gossip.

Source of truth

BehaviorCode
Record format, signing domain, validationcrates/network-libp2p/src/types.rs (NodeRecord, RecordDomain)
Kademlia configuration, discovery loop, record pushcrates/network-libp2p/src/consensus.rs
Persistent record and provider store, sizingcrates/network-libp2p/src/kad.rs (KadStore)
Inbound rate limits, discovery heartbeat, peer poolscrates/network-libp2p/src/peers/manager.rs
Advertised address capcrates/network-libp2p/src/peers/peer.rs (MAX_MULTIADDRS_PER_PEER)
TTL, republication interval, k-bucket size, peer targetscrates/config/src/network.rs
Process-lifetime swarm setup, bootstrap registration and dialscrates/node/src/manager/node.rs
Per-epoch committee refresh and dialscrates/node/src/manager/node/start_epoch.rs
Bounded dial retries and isolation recoverycrates/node/src/network_dial.rs
Cached network reachability and health routescrates/node/src/network_readiness.rs, crates/node/src/health.rs

This page mirrors those files. Update this page when those files change.

Peers

Every Telcoin Network node keeps a reputation score for every peer it has met. Malformed responses, failed validation, protocol abuse, and DHT flooding all report a penalty into that one score, and a peer whose score falls far enough is disconnected and then banned. Reputation is the only defense that touches every subsystem, so it is also the answer to “why did that node stop talking to me”.

This page is for RPC providers, dapp and indexer operators, bridge partners, and validators. It documents the score model, the penalty magnitudes, the connection ceilings a node enforces, the two separate ban tables, how IP bans are derived, and the metrics that expose all of it.

The implementation lives in crates/network-libp2p/src/peers/manager.rs, crates/network-libp2p/src/peers/score.rs, and crates/network-libp2p/src/peers/all_peers.rs, with every default in crates/config/src/network.rs. Gossip, Discovery, Request-Response, and Sync Streams describe the subsystems that report the penalties.

The score model

A peer starts at 0.0 and is clamped to the range [-100.0, 100.0]. The score decays exponentially toward zero with a half-life of 300 seconds:

decay_factor = e^(-ln(2) / 300 * seconds_since_last_update)
new_score    = old_score * decay_factor

Decay applies equally to positive and negative scores, so a peer that behaves for ten minutes has shed roughly three quarters of any penalty it accumulated. A peer’s reputation is derived from its current score every time it is read, never stored, so an operator who changes the thresholds changes behavior immediately.

Penalties and thresholds

Penalties have four severities and an explicit cause. Mild, Medium, Severe, and Fatal report attributable protocol or validation failures. Penalty::Load(LoadPenalty) reports transient load, with a typed cause that determines the score change for ordinary peers.

SeverityScore changeExamples
Mild-1.0Invalid requests; LoadPenalty::Timeout and LoadPenalty::SlowPeer.
Medium-5.0Malformed responses; LoadPenalty::StreamRateLimit and LoadPenalty::KademliaRateLimit.
Severe-10.0Invalid validation data; LoadPenalty::KademliaFlood.
FatalSet to -100.0Invalid signatures, invalid encoding, and authenticated protocol violations.

Members of the previous, current, and next committees are exempt from all penalties for now. Operator-provisioned hubs outside those committees ignore load penalties, and protocol penalties apply to them as to every other peer. A peer that is both a hub and a committee member gets the committee exemption. Rate-limited work is still dropped for privileged peers, so an exemption never creates an unlimited service allowance.

The score thresholds remain -20.0 for disconnection and -50.0 for a ban. From a fresh score of 0.0, ignoring decay, 50 mild, 10 medium, or 5 severe penalties cause a ban. Each report is evaluated immediately.

Crossing the ban threshold delays score decay for 30 minutes. Epoch rotation, identity discovery, and repeated hub installation preserve the protocol penalties and bans of a hub outside the committee. Committee admission at each epoch unbans every committee member and resets its score.

A node that replays a historical epoch does not charge an unauthorized gossip author. Its publisher allowlists belong to the replayed epoch, and the live committee of a later epoch publishes on the same topics. The message is still dropped. The node reads its position from its certified epoch records at each epoch entry. A certificate that verifies exists only after the epoch closed. An epoch without a certified record counts as live, and the author penalty applies.

What makes a peer important

A peer’s identity is either Confirmed, carrying its BLS public key, or Unidentified, carrying its libp2p PeerId. Transport authentication proves the remote network key, and signed node records prove their advertised BLS binding. Configuration supplies expected identities and address hints; it does not replace either verification.

Operator allowlisting remains sticky across epoch rotation. Validator membership derives from the previous, current, and next committee sets. Both grant connection-retention privileges, independently of permission to publish committee-only gossip. Committee membership also grants exemption from all penalties for now. Operator allowlisting grants exemption from load-induced penalties only. Finite connection, stream, message, and rate budgets continue to apply.

Bootstrap entries supply discovery hints. They do not acquire operator retention or load privileges automatically. A compatible trusted entry takes precedence for persistent dial addresses. Conflicting BLS/PeerId bindings fail startup with the offending configuration field.

Trusted hub configuration

Add trusted_nodes to the network configuration, keyed by each hub’s BLS public key. Replace the key placeholders with the corresponding values from that hub’s node information. This example is for a node configured with worker IDs 0 and 1:

trusted_nodes:
  "<hub BLS public key>":
    primary:
      network_key: "<hub primary network key>"
      network_address: /ip4/203.0.113.10/udp/9000/quic-v1
    workers:
      0:
        network_key: "<hub worker 0 network key>"
        network_address: /ip4/203.0.113.10/udp/9001/quic-v1
      1:
        network_key: "<hub worker 1 network key>"
        network_address: /ip4/203.0.113.10/udp/9002/quic-v1

Every locally configured worker ID must be present, including workers provisioned ahead of activation. Missing or out-of-range IDs, contradictory BLS/PeerId assignments, and mismatched /p2p address suffixes reject startup before any swarm is spawned. An absent or empty trusted_nodes map preserves existing configurations. The primary uses only primary; worker k uses only workers[k].

Registration succeeds even when a hub is offline. The first dial is immediate, followed by delays of 1, 2, 4, 8, 16, 32, and at most 60 seconds during an outage. A successful connection resets the delay. Dial attempts continue across epoch transitions and while unrelated peers satisfy the discovery population target. An in-flight dial is never duplicated.

Each swarm owns one shared retry timer and one schedule per configured hub. Dropping the network task cancels all its retries. Repeated registration preserves connection state and protocol bans. Learned records cannot replace configured identities; changing a hub’s network key requires updating the configuration and restarting the node.

When a connection becomes available, missing signed records for configured peers are queried through Kademlia. Unresolved records are retried on the existing peer-manager heartbeat, with at most one lookup in flight per key. This also allows a replacement peer-exchange connection to confirm a hub whose first record push was interrupted. Configuration alone never authorizes its gossip.

Connection limits

Every limit derives from one target, which itself derives from Kademlia’s bucket size K_VALUE of 20:

target_num_peers        = (K_VALUE / 2) + K_VALUE     = (20 / 2) + 20    = 30
max_peers               = ceil(30 * (1 + 0.3))                           = 39
max_outbound_dialing    = ceil(30 * (1 + 0.3 + 0.2 / 2))                 = 42
max_priority_peers      = ceil(30 * (1 + 0.3 + 0.2))                     = 45
target_outbound_peers   = ceil(30 * 0.3)                                 =  9
min_outbound_only_peers = ceil(30 * 0.2)                                 =  6
max_discovery_peers     = 30 * 2                                         = 60

Three of these are enforced on the connection path today. An inbound connection is refused once connected-or-dialing peers reach 39. An outbound connection is refused once connected peers reach 42, the higher ceiling reflecting that this node chose to dial. The discovery candidate pool is trimmed to 60. An important peer bypasses both connection ceilings. The remaining three values — 45 priority peers, 9 target outbound, and 6 minimum outbound-only — are configured and resolvable but are not read by any production code path at present.

A separate per-peer ceiling caps concurrent established connections from a single peer at 8. A peer needs at most one inbound and one outbound connection at a time, so eight is headroom for reconnection churn while bounding a hostile peer to a fixed, small fan-out.

Peers without privilege also share a public connection share: each such peer holds at most 2 established connections, and together they hold at most the swarm total minus a privileged reserve of 50 at the default total of 128, so 78 of those connections are public. Privileged peers (members of the previous, current and next committees, trusted operator peers, and peers that an effective Closed admission policy authorizes) take no public slot, so the reserve stays free to them whatever free identities do; they keep the per-peer ceiling of 8 and the swarm total. Bootstrap peers hold no such privilege. A process_budget keeps this split: the reserve is the swarm total times 50/128, rounded down, so a small budget still admits peers without privilege. A refusal counts as peer_manager_public_share when the share is full and as peer_manager_public_peer_connections when the peer already holds its 2 connections.

Each swarm also caps pending inbound connections (handshakes that are not yet established) at 1024. This cap is a memory bound only, not an admission policy. QUIC Retry, enabled by default, validates the source address before a handshake can occupy a slot. If retry_unvalidated_incoming is disabled as an operator rollback, a forged QUIC Initial datagram can hold a slot for the QUIC handshake timeout (10 seconds by default), so a small cap would let a cheap flood refuse honest peers. Refusals show in inbound_connections_denied_total with stage="transport_cap" and reason="pending_incoming_limit".

Signed endpoints are dialed in record order, one at a time. Each endpoint gets its own QUIC handshake window, which defaults to 10 seconds. The outer transport timeout covers MAX_ADVERTISED_MULTIADDRS handshake windows plus 5 seconds of slack, or 45 seconds with the current four-address cap and defaults. This lets a live endpoint connect after earlier endpoints go silent during an address migration, without parallel handshakes. The effective peer-manager timeout is the greater of the configured dial_timeout and the outer transport timeout plus another 5 seconds, or at least 50 seconds by default. The heartbeat marks a peer still dialing past that bound disconnected, because dialing peers count against the inbound limit.

The heartbeat

The heartbeat runs every 30 seconds and does all periodic maintenance. It times out stale dials, decays every non-exempt peer’s score, unbans peers whose decayed score has recovered, updates the peer-count gauges, releases expired DHT rate-limit budgets, and refills the discovery pool. It can never penalize a peer: penalties only arrive from the application layer.

The heartbeat then prunes back to the target of 30 connected peers. Candidates are shuffled first, then sorted by score and then by Kademlia routability, so the lowest-scoring peers that do not participate in routing are dropped first and equal scores are broken without bias. Important peers are filtered out of the candidate list entirely. Pruned peers are disconnected with a peer-exchange payload so they can find other nodes, and are temporarily banned so they do not immediately reconnect.

Two ban tables

A node maintains two ban tables that never merge, because they answer different questions.

Reputation bans live with the peer record. They are earned by score, they carry the peer’s observed IP addresses into the per-IP ban counter, they blacklist the peer in gossipsub, and they end only when decay lifts the score back above the ban threshold. At most 100 reputation bans are retained; when that fills, the oldest are pruned and their peers unbanned, keeping the freshest bans.

Temporary bans live in a separate LRU cache keyed by peer id, with a 600-second timeout and a cap of 100 entries. They are applied for excess-peer disconnects, for reputation disconnects, and alongside reputation bans, and they prevent reconnection at the swarm level without touching the peer’s stored state. They also outlive the peer record, so a peer pruned from the database can still be refused on the basis of its earlier temporary ban. Because the cache is only swept on the heartbeat, the effective ban duration is quantized to the 30-second interval.

Keeping them separate is what lets a peer be refused a connection while its stored reputation is still healthy — an over-capacity node turning peers away is not accusing them of anything. Committee members are lifted out of the temporary-ban cache on every rotation so a follow-up dial can reach them.

IP bans

An IP address is banned once more than one banned peer is associated with it.

The per-IP counter is fed only by IPs observed on real inbound and outbound connections. Self-advertised addresses from signed peer records are never counted, and this is load-bearing: an advertised address is attacker-controlled, so counting it would let a peer get a third party’s IP banned by simply claiming it. The two address sets are deliberately independent — the advertised multiaddr set is capped at 1 entry per peer and drives dialing and peer exchange, while the observed-IP set drives ban accounting and nothing else.

The observed set is capped at 16 IPs per peer, enough for dual-stack, DHCP renewal, and mobile roaming. At the cap a new IP is refused rather than evicting an old one. That keeps the set growing monotonically, which matters because per-IP counts are incremented from the set when a ban starts and decremented from it when the ban ends: an eviction between those two reads would strand a count and leave an IP banned after its peer was unbanned, penalizing every honest peer sharing it.

Committee members have their observed IPs removed from the counter when they join, so a validator’s address cannot be blocked during its initial connection storm.

Layered refusal

The peer manager is the first behaviour in the node’s libp2p behaviour list, and the per-peer connection limiter is second. Behaviour callbacks run in declaration order and short-circuit on the first denial, so a banned peer is rejected before gossipsub, request-response, or Kademlia register any per-peer state for it, and an over-cap connection is denied before those behaviours allocate anything either.

Refusal happens at several points along the same connection: on the pending outbound dial, on the pending inbound connection whose source IP is checked against the IP ban list, and again on each established connection. As a final backstop, a banned peer that nonetheless reaches the PeerConnected event is refused registration and disconnected outright, rather than being added to the routing table where it would drive a redial loop.

Why committee records never expire

The map that resolves a validator’s BLS public key to its network address has no TTL, by design. An expiry-driven resolution failure would be a consensus liveness bug: a validator whose record aged out mid-epoch would simply stop being recognized by its peers.

The map is bounded structurally instead of by time. An entry survives only if it is pinned — an operator-provisioned trusted, bootstrap, or explicit peer, whose count is set by node configuration — or if its key still sits in one of the three tracked committee slots. Every committee rotation prunes the rest. Records restored from local persistence at startup are deliberately not pinned, and records learned from the DHT are cached only for keys already in a tracked committee slot, so neither path can grow the map without bound.

The peer store protects committee records in the same way. Disconnected and banned pruning skip the record of every member of the previous, current, and next committees, because that record holds the binding from the member’s peer id to its BLS key. Without the binding, this node no longer recognizes the member as a validator. Three committee sizes bound the exempt set, so the pruning caps still bound memory. If another path removes a member’s record, the node restores it from the cached network record when a refreshed copy of that record is dropped as stale or identical, and again at every committee update. The restore does not change the cached record or its timestamp, and it binds a key only to the peer id that the cached record names, so a relayed copy cannot bind a member’s key to the relayer.

Metrics

Every series below is exported under the tn_network prefix and carries a network label whose value is primary or worker-{worker_id}, so read each series per label — the primary and worker swarms are independent.

MetricWhat it tells you
connected_peersPeers currently connected, sampled each heartbeat. Compare against the target of 30 and the ceiling of 39.
known_peersCommittee members with a resolved network record. A value below the committee size means discovery is still chasing keys.
discovery_peersDial candidates held in the discovery pool, capped at 60. Persistently low means discovery is starved.
banned_peersSize of the temporary-ban cache, not the reputation-ban table. Rises during excess-peer churn.
peers_banned_totalCumulative reputation bans. This is the flow that matches the ban threshold; banned_peers is a different stock.
peer_penalties_totalPenalties reported, labelled severity (mild, medium, severe, fatal), class (load or protocol), and outcome (applied, or exempt when the peer’s trust basis suppressed the score change). Applied penalties are the leading indicator for bans.
connections_established_totalConnections established, labelled direction with in or out.
connections_closed_totalConnections closed, all directions.
dial_failures_totalFailed dial attempts.
inbound_connections_denied_totalInbound connections refused, counted once per refusal and labelled stage and reason. stage is transport_cap for a connection limit (reason pending_incoming_limit, established_per_peer_limit, established_total_limit or other_limit), pre_auth for peer_manager_invalid_ip, authenticated_policy for the other peer_manager_* reasons and the source admission reasons, and unknown for reason unknown. A sustained pending_incoming_limit rate means the pending ceiling is full.
listen_failures_totalFailed inbound attempts that the peer manager observes, labelled reason: peer_manager_local_peer, peer_manager_banned_peer, peer_manager_invalid_ip, peer_manager_closed_admission, peer_manager_public_share, peer_manager_public_peer_connections, other_behaviour_denied, transport, wrong_peer_id, local_peer_id or aborted. Every reason is registered at zero. The peer_manager_* reasons also count in inbound_connections_denied_total.
closed_admission_denied_totalConnections refused by Closed admission, labelled direction (in or out). Both directions are registered at zero.
listener_errors_totalNon-fatal listener errors, labelled reason with the I/O error kind: address_in_use, address_not_available, permission_denied, connection, timed_out, invalid_data, other or unknown. Every error is counted. The log line fires at most once per interval and reports how many errors it skipped.
listeners_closed_totalClosed listeners, labelled outcome (ok or error).
external_addr_confirmed1 once any external address is confirmed, meaning NAT traversal is possible. Stuck at 0 means inbound connectivity is unlikely.
gossip_published_totalGossip messages published by this node.
gossip_received_totalGossip messages received from peers.
gossip_rejected_totalGossip messages that failed publisher verification. Sustained non-zero means a peer is publishing to a topic it is not authorized for.
add_provider_rate_limited_totalInbound DHT provider announcements dropped by the per-source rate limit.
outbound_requests_pendingOutbound requests in flight.
outbound_request_failures_totalOutbound request failures, labelled kind with the failure cause.
px_disconnects_pendingGraceful peer-exchange disconnects awaiting the peer’s acknowledgement.

Source of truth

BehaviorCode
Score decay, penalty magnitudes, thresholdscrates/network-libp2p/src/peers/score.rs
Penalty severities, trust basis, peer identitycrates/network-libp2p/src/peers/types.rs
Per-peer state, observed IPs, exemptioncrates/network-libp2p/src/peers/peer.rs
Reputation bans, committee slots, pruningcrates/network-libp2p/src/peers/all_peers.rs
Heartbeat, connection limits, temporary bans, known_peerscrates/network-libp2p/src/peers/manager.rs
Per-IP ban counter and thresholdcrates/network-libp2p/src/peers/banned.rs
Temporary-ban LRU cachecrates/network-libp2p/src/peers/cache.rs
Connection denial orderingcrates/network-libp2p/src/peers/behavior.rs, crates/network-libp2p/src/consensus.rs
Metric names and labelscrates/network-libp2p/src/metrics.rs
PeerConfig and ScoreConfig defaultscrates/config/src/network.rs

This page mirrors those files. Update this page when those files change.

Established source admission

Issue #1467 tracks production qualification. This implementation is opt-in. Honest peer populations, shared-NAT measurements, deployment prefix policy, and process resource calibration are still pending. Leaving network_config.source_admission absent disables it.

Validation provenance

The peer manager reserves occupancy only in libp2p’s established inbound and outbound connection callbacks, after the QUIC transport completes its authenticated handshake. The address comes from the transport’s remote endpoint. Peer discovery, signed advertised addresses, Identify messages, and unauthenticated identity claims cannot charge a source. Pending inbound callbacks do not charge occupancy, even when QUIC Retry is disabled. An unsuccessful handshake cannot charge a victim address’s established quota.

The adapter accepts direct /ip4/.../udp/.../quic-v1 and /ip6/.../udp/.../quic-v1 endpoints, with an optional final /p2p/... component. Unsupported transport shapes fail admission when the budget is enabled. The authenticated peer ID supplied by libp2p is the identity key; the address suffix grants no privilege. IPv4-mapped IPv6 addresses use the same counters as native IPv4. The carried QUIC transport disables migration, so the observed source remains stable for the connection. Enabling migration requires a validated address-change accounting contract first.

This established-connection evidence is later than handshake-start validation. The transport work in #1447 defines the separate return-validation contract for start allowances. Its adapter must use transport-produced validation provenance and the same canonical address/prefix policy. An established peer ID or an advertised address cannot substitute for that provenance. This change does not gate handshake starts or charge spoofable pre-validation arrivals.

Ownership, bounds, and expiration

The node constructs one budget before any primary or worker swarm starts. All swarms share its counters for their entire process lifetime, including epoch transitions. Connection IDs belong to a swarm. Each successful reservation owns one non-cloneable lease in that swarm; two swarms may independently use the same connection ID. One atomic admission checks all ceilings before modifying any counter.

Identity replacement leaves existing source and prefix occupancy intact. Distinct sources and prefixes still consume the aggregate process connection ceiling. Every connection counts, including simultaneous inbound and outbound connections to one peer.

The shared address and prefix tables each hold at most max_sources entries. The identity table and the combined live leases across all swarms hold at most max_connections entries. Ordered maps release their entries when removed, so alternating activity across swarms does not retain a separate hash-table high-water allocation in each swarm.

A lease ends on its connection’s close, a later behaviour’s inbound or outbound denial, or swarm shutdown. Closing one connection releases its charge even if that peer has another established connection. A failure before reservation has no lease to release. An address, prefix, or identity entry expires immediately when its last lease ends. Live connections never expire from accounting while still consuming transport resources. This is concurrent occupancy accounting; reconnect rate debt belongs to the transport’s handshake-start policy. No per-source tombstone survives a fully closed population.

Explicit deployment configuration

Every field is required when source_admission is present. There are no historical default limits or prefix lengths to copy into production.

FieldMeaning
max_connectionsEstablished connections and reservations across the whole process
max_connections_per_peerConnections for one authenticated peer ID across all swarms
max_connections_per_addressConnections sharing one observed IP, including shared NATs
max_connections_per_prefixConnections sharing the selected address-family prefix
max_sourcesDistinct observed addresses retained concurrently
ipv4_prefix_lengthIPv4 prefix length, 0 through 32
ipv6_prefix_lengthIPv6 prefix length, 0 through 128

Counts must be positive. The peer limit and source-table size cannot exceed the process limit. The address limit cannot exceed the prefix limit, which cannot exceed the process limit. Invalid configuration fails node startup before any swarm is spawned.

Existing per-swarm transport and peer-manager checks still apply. Effective capacity is the intersection of those checks and this shared budget. Committee, trusted, bootstrap, and ordinary peers all consume these counters; this implementation grants no source or aggregate exemption and creates no trusted reservation. An existing peer-manager privilege cannot exceed the source budget. Production protected-capacity policy remains an acceptance decision, including how it composes with #1448. The established ceiling bounds concurrency, rather than every process resource: pending handshakes, stream buffers, RPC work, and the execution engine need their own finite budgets.

Every denial increments tn_network.source_admission_denied_total with network, direction (in or out), and reason labels. The reason is the snake-case AdmissionError variant, for example peer_full or process_full. Every direction and reason pair is registered at zero when the peer manager starts. An inbound denial also counts once in tn_network.inbound_connections_denied_total with stage="authenticated_policy" and the same reason. A denial logs at warn when the peer manager treats the peer as important (for example a committee member), at error when the accounting lock is poisoned, and at debug otherwise.

A full budget refuses committee members on inbound connections and on our own outbound dials. Node startup therefore logs a warning when this budget is configured. Do not enable it on a validator until a protected-capacity policy exists. Candidate policies: reserve a share of max_connections for important peers; admit important peers past ProcessFull and SourcesFull while they are still charged; or evict the lowest-scored ordinary lease. A committee member is important only after the peer manager learns its network key.

Qualification still required

Record the hardware, memory and descriptor headroom, supported worker counts, honest observer/catch-up populations, simultaneous reconnect multiplicity, measured NAT sharing, and IPv4/IPv6 deployment policy before proposing production values. Account for the primary and every active worker together. Address and prefix limits must admit the measured legitimate population without making identity rotation an escape from occupancy.

Tests exercise a synthetic population of four identities behind one NAT across three budget instances sharing one state, including reconnects. They establish accounting semantics, not measured fair scheduling or representative network liveness. Before enabling production policy, run real primary/worker swarms with shared-NAT observers, reconnect/catch-up traffic, and hostile contention, and record each swarm’s opportunity, failure rate, and convergence time against agreed thresholds. Reserved service capacity and deployment measurements remain open. This draft does not close #1467.

Validation

The production accounting core can be tested without workspace dependencies:

rustc +1.94 --edition=2021 --test --crate-name source_admission \
  tools/source-admission/tests.rs -D warnings -D missing_docs \
  -D missing_debug_implementations -D rust_2018_idioms -o /tmp/source-admission-tests
/tmp/source-admission-tests

The crate’s adapter tests exercise the pinned libp2p failure and close events:

cargo +1.94 test --locked -p tn-network-libp2p source_admission

Full workspace integration checks and the repository’s required attestation are also required before review readiness. A skipped draft CI lane does not provide that evidence.

Local launch committee inventory

Issue #1477 requires validators to find one another without a hub or an existing peer database. The operator-owned committee_peers map in the datadir’s YAML network-config file is the authoritative launch inventory. Distribute the same complete map to every validator before starting the launch network.

Committee membership still comes from chain state. The map binds a BLS key to the expected libp2p network identity and dial address on the primary and every worker swarm. libp2p authenticates the remote transport key when connecting. Adding an inventory entry grants no committee membership, gossip publishing permission, or operator trust classification.

Provisioning

Use the same shape as a bootstrap servers entry (chain-configs/*/bootstrap_servers.yaml, or the bootstrap_servers of a ceremony’s committee.yaml), with an explicit workers list indexed by worker ID. Include every launch validator, including the local validator, and every on-chain worker. Keep primary, worker 0 and worker 1 keys distinct. A two-worker entry looks like this:

committee_peers:
  <validator-BLS-public-key>:
    primary:
      network_key: <primary-network-public-key>
      network_address: /ip4/192.0.2.10/udp/9000/quic-v1
    workers:
      - network_key: <worker-0-network-public-key>
        network_address: /ip4/192.0.2.10/udp/9001/quic-v1
      - network_key: <worker-1-network-public-key>
        network_address: /ip4/192.0.2.10/udp/9002/quic-v1

Replace the placeholders and documentation addresses with operator-provided keys and reachable addresses. Repeat the entry for every validator. A genesis ceremony’s committee.yaml lists the genesis validators as bootstrap servers, and that inventory can be copied as a starting point, but verify that it contains every launch validator and that its endpoints and worker count are current. The built-in bootstrap lists name bootstrap servers, which need not be validators, so they are no starting point. An empty or absent committee_peers map preserves discovery-based startup for existing deployments. It does not qualify a hub-independent Closed launch.

Startup validates local advertised keys, network-key uniqueness across validators and swarms, and any /p2p/<PeerId> address component before spawning networks. A swarm that the local entry lists must match the local identity. Failures include the affected BLS key and swarm in the diagnostic.

Coverage is fail-closed at genesis (epoch 0) only. At genesis, the map must list every committee member with the on-chain worker count, or startup stops. After launch, the committee can change. A new validator or a higher worker count that the map does not list does not stop a restart. Startup logs a warning for each gap, and discovery finds those swarms. Add the missing entries in the next coordinated configuration update. The local worker count sets no requirement for the entries of other validators, so a node can stage a spare worker before governance raises the count.

Selection, union and conflicts

Bootstrap selection is unchanged: a CLI override takes precedence over bootstrap_peers in network-config, which takes precedence over the default set (the built-in list for --chain, else the genesis committee file’s). A selected empty map falls back to the default; a selected nonempty map replaces it in full.

After that selection, startup installs bootstrap hints and then committee hints on the primary and every worker. Unrelated bootstrap and trusted peers remain present, including non-committee hubs. The committee map is independent of the bootstrap replacement rule, so selecting hubs as bootstrap peers cannot erase validator bindings.

  • Repeated entries with the same BLS/network binding are idempotent. The committee inventory’s address takes precedence over a bootstrap or cached address for that binding.
  • Repeated BLS keys within the YAML committee map are rejected, including identical duplicates, so an earlier operator entry is never silently lost.
  • Different network keys for the same BLS key and swarm are errors. A network key assigned to two BLS keys or to different validator swarms is also an error.
  • A configured bootstrap or trusted entry that contradicts the inventory rejects the swarm’s whole seed batch before inserting any committee hint. Correct the configuration before restarting.
  • A cached peer record that contradicts the inventory does not stop startup. Such a record comes from the peer database or from discovery, and any peer can write one. Startup drops the record, logs a warning, and uses the inventory binding. No manual cleanup is necessary.
  • A cached signed record with the same binding is kept. It takes the inventory address and keeps its signed timestamp and RPC metadata.
  • Startup dials each BLS key once per swarm across the bootstrap/committee union, and never dials the local validator. Existing bootstrap and committee retry behavior remains in effect.

Launch invariant and manual changes

For the process lifetime, each seeded BLS key keeps its configured network key and address on each swarm. Signed discovery can refresh RPC metadata but cannot silently change those launch bindings. Chain committee updates still control membership and authorization, including during epoch transitions. Seeded hints survive those transitions so direct dialing needs no hub lookup. The inventory can stay in place after launch. Discovery finds validators that join later until the inventory lists them.

Until automated rotation is qualified, coordinate changes manually:

  1. Arrange the validator’s new address or network keys with all launch operators. Keep the old endpoints available during the coordinated change.
  2. Update the corresponding primary or worker entry in every distributed network-config. Update that validator’s node configuration and key material at the same time. Reconcile matching bootstrap and trusted entries too.
  3. Stop the affected deployment and restart validators with the updated inventory. Startup drops cached peer records that contradict the new bindings. Preserve execution and consensus data.
  4. With all hubs unavailable, verify direct connections to every other committee member on the primary and each configured worker. Repeat on a node with freshly provisioned peer storage. Enable Closed only after its admission policy and this connectivity check have both been qualified.

When a validator joins the committee or governance raises the worker count, add the new entry or worker to every distributed network-config in the next coordinated update. Until then, a restart logs the gap and uses discovery.

The regression test committee_seeding_connects_every_swarm_without_hubs_after_fresh_restart starts all fixture validators on the primary and two worker swarms without a hub. It checks direct connectivity, discards every swarm and peer database, and repeats from the same serialized inventory. Peer-manager regressions pin the union, atomic rejection of configured conflicts, removal of contradictory cached records, preservation of matching signed records, and fixed launch bindings.

Request-response

Telcoin Network runs two independent libp2p request-response behaviours on every node. The consensus RPC carries votes, batch reports, and epoch records between peers of the same role. A dedicated peer-exchange protocol carries the goodbye a node sends before it disconnects. Both share one codec and one bounded read path; they differ in what they carry and in how their failures are scored.

This page is for RPC providers, dapp and indexer operators, bridge partners, and validators who need to know what a node accepts on these protocols, what it rejects, and which rejections cost a peer reputation.

The implementation lives in the libp2p networking crate: the codec and its read-path bounds, the protocol identifiers and message plumbing, and the behaviour wiring and failure handling.

The two protocols

The consensus RPC is namespaced by role, worker index, and chain id, and is currently at protocol version /0.0.2. A primary advertises /tn-primary-{chain_id}/0.0.2; worker k advertises /tn-worker-{k}-{chain_id}/0.0.2. Both sides support the protocol fully, so any node can be requester or responder. Transport explains the /0.0.2 version bump and the full protocol-identifier table.

The peer-exchange goodbye is a separate behaviour on its own name, still at /0.0.1: /tn-primary-peer-exchange-{chain_id}/0.0.1 and /tn-worker-{k}-peer-exchange-{chain_id}/0.0.1. Its request is the disconnecting node’s exchange map and its response is an empty acknowledgement. Splitting it out means the exchange map no longer has to ride inside the consensus request enums, and a node that cannot negotiate the dedicated protocol falls back to the variant still embedded in those enums. A node holds at most 10 goodbyes in flight and waits at most 3 seconds for the acknowledgement before disconnecting anyway.

Wire format

Every message on both protocols, in both directions, is framed identically:

[4-byte LE uncompressed_len][4-byte LE compressed_len][snappy-framed BCS]

The two length prefixes are little-endian u32. They do not count toward the maximum message size; only the decoded payload does. The payload is BCS-serialized and then snappy-compressed in framed format.

Read-path bounds

The decoder validates before it commits memory, in this order.

  1. The declared uncompressed length is checked against the maximum message size before anything is allocated. The default maximum is 1 MiB. A prefix larger than that is rejected at the header, so no buffer is sized from an attacker’s number.
  2. The declared compressed length is checked against snappy’s maximum expansion for that uncompressed size. Snappy bounds how far compressed output can grow relative to its input, so a compressed length past that bound cannot describe the uncompressed length the peer just declared. Catching it at the header means a lying prefix is rejected before the body read starts rather than after it.
  3. The body is streamed in 8 KiB chunks. Committed memory tracks bytes that actually arrived rather than the declared prefix. A peer cannot make a node reserve a megabyte by claiming one: a peer that declares a large body and then withholds it stalls holding only what it sent, until the request timeout reaps the stream. An early end of stream is an error, not a short read.
  4. Decompression is bounded to the validated uncompressed length, so a malformed or hostile snappy stream cannot expand past the maximum message size.
  5. The final decompressed length must equal the declared length exactly. A mismatch in either direction is rejected before deserialization is attempted.

Only after all five checks does the decoder hand the bytes to BCS. A failure at any step surfaces as an I/O error on the stream, which the failure table below classifies.

Configuration

SettingValue
Request timeout, inbound and outbound10 seconds
Concurrent streams per connection100
Maximum message size1 MiB (operator-tunable as max_rpc_message_size)

The timeout and stream cap are libp2p’s defaults and are not overridden. The message size is read from node configuration and applies to the consensus RPC and the goodbye protocol alike.

Message inventory

Primary requests are Vote, PeerExchange, and EpochRecord. Vote carries the proposed header and any parent certificates the requester thinks the responder may be missing. EpochRecord carries an optional epoch number and an optional digest; with neither set, the responder returns the latest epoch record it has.

Primary responses are Vote, MissingParents, EpochRecord, PeerExchange, Error, and RecoverableError. MissingParents is the responder saying it could not verify the header’s parents and naming the digests it needs before it can vote.

Worker requests are ReportBatch and PeerExchange. Worker responses are ReportBatch (an acceptance with no payload), PeerExchange, Error, and RecoverableError.

A response of the wrong shape for the request is a permanent error at the requester, never a retryable condition.

Permanent and recoverable errors

Both roles split application-layer failures into two response variants, and the distinction is load-bearing.

Error is a permanent rejection. The responder evaluated the request and refused it on its merits: an invalid header or batch, a decode failure, a malformed request, a peer that is not in the committee, an unavailable epoch, a batch epoch mismatch, a duplicate batch. An identical request would be refused the same way, so the requester must not retry it.

RecoverableError is a transient responder-side condition: a momentary batch-store write failure, internal channel pressure during an epoch transition, an internal timeout, a database read or commit failure. The request is likely to succeed later, so the requester retries rather than giving up on the peer. A worker retries a batch report up to three times with backoff when the response is recoverable, and stops immediately when it is permanent. The primary’s vote path retries a recoverable response up to six more times at 250 ms intervals before treating it as permanent. Without the split, a peer that hit a one-off internal error would be indistinguishable from a peer that deliberately rejected the payload.

Note

One epoch mismatch is deliberately classified recoverable rather than permanent. When a peer reports an invalid-epoch header and the peer’s epoch is exactly one ahead of ours, the responder returns RecoverableError, because that is a race at the epoch boundary and not a fault. Every other epoch mismatch, including a peer more than one epoch ahead or any epoch behind, is a permanent Error.

Failure classification and penalties

Transport-level failures are not the peer’s fault and carry no penalty. Charging them would ban honest peers on ordinary wide-area conditions: with several requests in flight at disconnect time, one penalty each would compound into an immediate ban. Peers explains what each penalty level costs and how many occurrences reach a ban.

FailureOutboundInbound
Dial failureNoneNot applicable
Connection closedNoneNone
TimeoutMildNone
I/O error of a transport-flap kindNoneNone
I/O error of any other kindMediumMedium
Unsupported protocolsNoneNone
Response omissionNot applicableNone
Any peer-exchange goodbye failureNoneNone

A transport-flap I/O error is a connection reset, connection abort, timed-out read, unexpected end of file, broken pipe, or interrupted call. Anything else is very likely a codec violation, which is why it is the one failure kind that carries a Medium penalty in both directions.

UnsupportedProtocols carries no penalty in either direction, and that exemption is deliberate. Failing to negotiate a common protocol is honest version or role skew: the peer runs an older release, a different role’s protocol set, or a different chain id. Penalizing it would turn a chain-id or version split into a network partition, because the nodes that most need to find each other again during a rolling upgrade would ban each other first. The node logs a warning for operator visibility instead.

Peer-exchange goodbye failures are never penalized in either direction. A goodbye precedes a disconnect, so there is no relationship left to protect. The one failure that changes course is an outbound UnsupportedProtocols, which triggers the fallback to the embedded exchange variant.

Application-layer admission control

Below the network layer, the primary and worker handlers cap the work a peer can commission. Load beyond a cap is shed, not queued: the requester gets a fast denial and tries another peer.

LimitValueWhat it bounds
Pending sync requests per peer2A single peer’s in-flight sync streams, so it cannot fill the global slots and starve other peers. Enforced separately by the primary and the worker.
Concurrent epoch stream operations5Pending plus active epoch streams on a primary, across all peers.
Concurrent epoch-record serves5Concurrent EpochRecord request-response serves on a primary. Its own budget, separate from epoch streams, so an epoch-record flood and the stream paths cannot starve one another.
Concurrent batch stream operations5Pending plus active batch streams on a worker, across all peers.
Concurrent shed tasks8Short-lived tasks that write a denial to a stream refused at admission. Enforced separately by the primary and the worker, so total sync-task fan-out is the admitted cap plus this.
Consensus-result tallies20Distinct pending consensus results a primary tracks while tallying signatures. A floor, not a ceiling: the effective cap is the larger of this and the committee size.
Epoch votes deduplicated1024Distinct verified epoch votes retained for ingress deduplication, so a replayed vote is dropped before a second signature verification.
Batch digests per request500Digests a peer may name in one sync batch request. Sized well above the realistic maximum and roughly sixty-six times below what would fit in a 1 MiB message.

The last three bound the gossip and sync ingress paths of the same handlers rather than the request-response arms, but they are the caps that decide how much work one peer’s traffic can commission from a node, so operators size against them together.

Source of truth

BehaviorCode
Wire format, read-path bounds, chunked body readcrates/network-libp2p/src/codec.rs
Protocol identifiers and versionscrates/network-libp2p/src/types.rs (NetworkType)
Permanent and recoverable error variantscrates/network-libp2p/src/error.rs (NetworkError, RpcFailure)
Behaviour config, failure classification, penaltiescrates/network-libp2p/src/consensus.rs
Message size, goodbye budget and timeoutcrates/config/src/network.rs (LibP2pConfig)
Primary message variants and error classificationcrates/consensus/primary/src/network/message.rs
Worker message variants and error classificationcrates/consensus/worker/src/network/message.rs
Primary admission-control limitscrates/consensus/primary/src/network/mod.rs
Worker admission-control limitscrates/consensus/worker/src/network/mod.rs

This page mirrors those files. Update this page when those files change.

Sync streams

Telcoin Network moves bulk data — sealed batches, epoch pack files, missing certificates, single consensus outputs — over a dedicated stream protocol rather than over request-response. A node opens one substream, writes its request as the first frame, and reads the response off that same stream until the responder ends it. There is no separate handshake and no digest correlation: the request travels in the stream that carries the answer.

This page is for validators, RPC providers, dapp and indexer operators, and bridge partners who need to know how a node catches up and what it accepts while doing so. It covers the exchange shape, the frame tags, the request discriminants, and the limits that bound an open.

The implementation lives in crates/network-libp2p/src/stream/, which holds the custom libp2p behaviour and connection handler, and crates/network-libp2p/src/sync/, which holds the frame layer and the typed requests. Request-response covers the RPC path this one deliberately avoids, and Transport has the full protocol-ID reference table.

Why this is not request-response

The request-response codec caps a single message at 1 MiB by default. That bound is right for a vote, a header, or a peer-exchange map, and wrong for catch-up. A single missing-certificates exchange is allowed to stream up to 64 MiB of encoded certificates, and an epoch pack is chunked at 256 KiB per frame precisely because the whole pack can run to hundreds of megabytes. Expressing those transfers as request-response would mean hundreds of correlated RPCs, each needing its own pending-request entry on both sides.

The stream path is a custom behaviour and connection handler, not libp2p’s libp2p-stream. Writing it in-tree is what makes the open budget, the per-peer inbound rate limit, and the failure classification below possible. Each node advertises exactly one stream protocol, chosen by its role and namespaced by chain id:

primary   /tn-primary-sync-{chain_id}/0.0.1
worker    /tn-worker-{worker_id}-sync-{chain_id}/0.0.1

A worker advertises only its own worker index, so worker 0 of one validator never negotiates a sync stream with worker 1 of another. The chain id in the protocol name means a node on one chain fails negotiation against a node on another rather than exchanging data with it.

The exchange

1. requester opens a substream on the role's sync protocol
2. requester writes  Req(<typed request>)    <- always the first frame
3. responder writes  Ack                     <- accepted
                 or  Deny(<reason>)          <- declined; stream closes
4. responder writes  Data(<bytes>) ...       <- zero or more payload frames
5. responder writes  End                     <- orderly finish
                 or  Err(<reason>)           <- aborted after an error
6. both sides close the stream

The outbound open is lazy. The requester writes Req without waiting for the responder to accept the protocol, so the request frame travels in the same flight as the protocol proposal and is already buffered when the responder starts its opening read. The requester waits 5 seconds for the first response frame. A peer that negotiates the protocol but never answers trips that timeout, and the requester moves to the next peer instead of stalling the whole catch-up. On a primary that probe counts as failed, and the peer is marked for the fetched epoch. A protocol rejection, a clean close or a reset on the first read of a consensus-output request, and a rejection of a partial epoch-pack request, leave no mark only when they come within 1 second of the request write (SYNC_BUSY_DENY_WINDOW); later they count as a failed probe too, so a peer cannot hold every probe for most of the timeout and then close to stay unmarked. On the worker, the whole batch stream is also bounded (95 seconds), so one peer can use at most 120 seconds of a 480-second request_batches call: the batches validated before the bound are kept, and the peer is recorded as stalled for the epoch and asked after the unmarked peers of its tier on later calls; a complete exchange slower than its allowance (15 seconds plus 1 second per batch) is marked too, and an empty answer is marked only when it took 5 seconds or more. Each tier of the connected-peer list is shuffled per request so no peer keeps a fixed early place. On the responding side, a peer that opens a stream and never sends its request frame is dropped after 1 second if it is a public-tier peer and after 5 seconds if it is a committee peer. While it waits it holds only an opening-read slot, never a serve slot. A public-tier peer is charged a mild penalty for a silent, unreadable or unexpected opening, for a valid request that arrives in the second half of its 1-second opening window, for a stalled serve, and, for an epoch pack, for a serve cut at the 200-second hold limit, and, for a missing-certificates or consensus-output serve, for a serve cut at the 60-second hold limit, and, for a worker batch serve, for a serve cut at the 60-second hold limit and for a request above the 500-digest cap. A late request is charged whether it is then admitted or refused; a prompt AtCapacity or Busy refusal is not charged (see Admission). A full pool answers Deny(AtCapacity); on a primary, the per-peer cap and a per-key hold budget answer Deny(Busy). A requester that receives Busy skips that responder for the rest of the walk and does not mark it failed. On a primary the requester probes it after the fresh peers on later walks of that epoch; a Busy that arrives more than 1 second after the request write (SYNC_BUSY_DENY_WINDOW) puts the responder with the peers marked failed for that epoch instead, still without a failure mark.

Frame tags

Every frame is a self-contained encoded unit, and the enum discriminant is the frame tag.

tag   frame           payload
----  --------------  -------------------------------------------
 0    Req(request)    the typed request for this role
 1    Ack             none
 2    Deny(reason)    0 = AtCapacity, 1 = Unavailable, 2 = Busy
 3    Data(bytes)     an opaque chunk of response payload
 4    End             none
 5    Err(reason)     0 = Internal, 1 = Malformed

Deny(Busy) means the per-peer serve cap or a per-key hold budget refused the request; retry later. Data payload encoding is defined by each exchange, not by the frame layer. The frame layer only guarantees that a Data frame arrives whole or not at all.

The typed request inside a Req frame carries its own discriminant, one table per role:

WorkerSyncRequest                    on /tn-worker-{worker_id}-sync-{chain_id}/0.0.1
tag   variant              fields
----  -------------------  ------------------------------------
 0    Batches              batch_digests, epoch
PrimarySyncRequest                   on /tn-primary-sync-{chain_id}/0.0.1
tag   variant              fields
----  -------------------  ------------------------------------
 0    EpochPack            epoch
 1    MissingCertificates  exclusive_lower_bound, skip_rounds
 2    EpochPackPartial     epoch, last_consensus_number
 3    ConsensusOutput      number

Note that the request tags are not in source-declaration reading order by name: MissingCertificates is 1 and EpochPackPartial is 2, because the partial variant was added after the missing-certificates one and appended rather than inserted.

Variant order is the wire format

Warning

Reordering, inserting, or removing a variant in any of these enums changes the bytes a deployed peer sees, without changing a single type signature. The code still compiles, the round-trip tests still pass, and a peer running the old build decodes the wrong variant from the same tag byte. This is silent corruption, not a build break.

The protocol version in the name (0.0.1) is the only thing that can signal such a change, so a variant reorder requires a version bump and the negotiation failure that comes with it. New variants may be appended at the end, because appending leaves every existing tag where it was.

Two tests pin the mapping: one asserts the exact frame tag bytes, the other asserts the leading discriminant byte of each request variant. A reorder that would otherwise pass every behavioural test fails those.

Frame encoding

Each frame is a single codec unit and inherits the encoding described in Request-response: a length-prefixed, snappy-compressed BCS message, read against the bytes that actually arrive rather than against the length a peer declares. The difference is the size bound. Request-response applies one fixed 1 MiB cap to every message, while each sync exchange supplies its own frame cap: a worker batch exchange sizes it from the epoch’s maximum batch size, and a primary epoch-pack exchange sizes it from the 256 KiB pack chunk. The cap bounds one frame, so no peer can force an oversized allocation, but it does not bound the transfer, which is what makes bulk catch-up possible on this path.

An Err frame is a successful read. It reports that the responder gave up, which is different from the transport failing underneath the exchange, and the two are handled differently.

Deny is backpressure, not a fault

A responder admits a bounded number of concurrent sync streams: each serve class has its own slot pool with a separate reserve for each committee key, and one peer can hold at most two in-flight sync streams (see Admission). Past that it does not drop the stream. It writes a Deny and closes. A full pool answers Deny(AtCapacity). On a primary, a refusal by the per-peer cap or by a per-key hold budget answers Deny(Busy): the responder has room, but not for this key now. A requester that receives Busy skips that responder for the rest of the walk at debug level, and does not mark the responder failed or forget it as a sync server. On a primary it probes that responder after every fresh peer on the later walks of the same epoch, and, when the Busy came more than 1 second after the request write, among the peers marked failed for that epoch, so a peer cannot hold every probe for most of the 5-second ack timeout and still sort ahead of them. The 1-second window starts at the requester’s own write, so it also covers the round trip and any queueing on the connection; an honest Busy that arrives late costs its server only that place in the probe order.

That distinction matters to a requester’s wall-clock cost. A dropped stream costs the requester its full 5-second ack timeout before it can try elsewhere; an explicit Deny costs it the open, the request write and one round trip. A node catching up against a busy committee therefore keeps moving instead of serializing on timeouts, and a busy responder sheds load without being scored for it.

Deny(Unavailable) is the other normal case: the peer speaks the protocol and has capacity but does not hold the requested data.

The shed path is itself bounded. Writing a Deny costs a short-lived task, and at most eight of those run at once; beyond that budget the stream is dropped without a Deny, and the requester sees a reset and retries elsewhere.

Admission

A responder admits an inbound sync stream in stages, so a peer that opens streams and stays silent cannot use the slots that serve real requests.

Each peer is in one of two tiers. A peer whose BLS key is in the current committee or the next committee is in the committee tier; every other peer is in the public tier. The committee keys are captured when the network is built for an epoch. The hold books are not: the opening and serve hold books are built once per node process and shared by every epoch’s network, so an epoch boundary or an epoch re-run does not refill a key’s budget; a restart does.

  1. Per-peer cap. One peer can hold at most two in-flight sync streams. A third stream is shed; on a primary it is answered Deny(Busy) where the shed path writes a frame.
  2. Opening read. The stream takes an opening-read slot while the responder reads the request frame, for at most 1 second for a public peer and 5 seconds for a committee peer. A public peer whose valid request arrives in the second half of its 1-second window is charged a mild penalty, whether the request is then admitted or refused. There are 8 slots for any peer and 1 more for each committee key, which only that key can take. The opening-read slot is released as soon as the read ends, before any control write or close; the per-peer slot lasts for the whole task. A stream that never sends a valid request never takes a serve slot. The request frame travels with the protocol proposal, so an honest opening holds its opening-read slot for about the responder’s read time, not a round trip. A public key may hold opening-read slots for 10 seconds per 300-second window (PUBLIC_OPENING_HOLD_BUDGET, PUBLIC_OPENING_HOLD_WINDOW), so the budget meters slow openers only. A key with less than one 1-second read bound of that budget left is shed without a charge and answered Deny(Busy). A full opening pool answers Deny(AtCapacity).
  3. Serve. The request selects its serve class: epoch pack, missing certificates, or consensus output. Each class has its own pool of 5 slots for any peer and 1 more for each committee key, which only that key can take. So public peers that fill one class cannot block a committee peer or a different class. A full class answers Deny(AtCapacity). A public key holds at most one serve slot at a time across all three classes (PUBLIC_SYNC_SERVES_PER_PEER). In each class a public key may hold serve slots for one public hold limit per window: 200 seconds per 1000-second window for an epoch pack (PUBLIC_EPOCH_PACK_SERVE_TIMEOUT, PUBLIC_EPOCH_PACK_SERVE_HOLD_WINDOW), and 60 seconds per 300-second window for missing certificates and for consensus output (PUBLIC_SYNC_SERVE_TIMEOUT, PUBLIC_SYNC_SERVE_HOLD_WINDOW). A key is leased only with a full hold limit of budget left. A second serve, or a serve outside the budget, is refused Deny(Busy) without a charge. A committee key takes no serve cap and no hold budget.

The worker batch sync stream uses the same tiers, with one pool of 5 slots for any peer and 1 more for each committee key.

Each committee key has its own reserve in each pool, and no committee key can take the reserve of another. So committee keys that hold streams without progress cannot stop a different committee key from catching up. The per-peer cap of two lets a committee key open its second stream from the slots for any peer.

These budgets raise the cost of filling the public share; they do not close it while keys cost nothing. In each serve class the hold equals the budget, so a hold of H is followed by 5H of refusal, and a public key holds the class at most 1/6 of the time. So about 30 public keys per class keep the 5 public serve slots of that class busy on one primary. The same 30 keys cover all three classes, because each key is then busy 1/6 of the time in each class and 1/2 in total. The opening pool takes about 240 keys in steady state and about 120 in a book’s first 300-second window. The books belong to each responder, so the same keys do this on every primary.

Each serve is also bounded in time:

  • An epoch-pack serve has a 10-second write timeout per frame, a throughput floor of 1 MiB per 30-second window, and a total deadline of 30 seconds for each started MiB of pack plus 30 seconds. A requester that reads at the floor finishes inside the deadline; a 100 MiB pack gets 50.5 minutes. That floor-derived deadline is the only time bound for a committee-tier serve. A public-tier epoch-pack serve is also cut by its own fixed, size-independent bound, PUBLIC_EPOCH_PACK_SERVE_TIMEOUT (200 seconds), and a serve that outlives it is charged as a stall. That bound is not scaled by pack length: it is the unit the per-key hold budget leases against, and the deadline above already scales with the pack. A public requester whose pack cannot finish inside 200 seconds at its read rate is cut and charged by every responder. So a public requester must read a pack of L bytes at no less than L/200 seconds on each stream. The requester reads a fresh peer at a target of 8 MiB per 30-second window (SYNC_TARGET_MIN_BYTES) and a peer already de-prioritised this epoch at the 1 MiB floor, both prorated over the real window length and checked on the End frame too. Only a serve that completes at the target rate (plus a 1-second latency allowance) makes a peer the preferred sync server; a slower completed serve de-prioritises the peer for the epoch instead. The target is about 2.24 Mbit/s for each stream, so the three epoch fetchers together need about 6.7 Mbit/s. A public key holds at most one serve per responder, and each class at most 1/6 of the time, so across N responders it gets about N/6 concurrent epoch-pack serves and needs about 18 responders to fetch three packs in parallel. When a committee-tier requester (its own key in the current or next committee) cuts a fresh peer at the target rate, it probes that peer again at the floor in the same walk, with no sleep; a timeout or any other failure does not cause this second probe. A public-tier requester skips that same-walk re-probe, because the cut peer refuses it Busy for about five times its hold. It keeps the (peer, epoch) slow mark and reads that peer at the floor in a later walk. The slow marks are keyed by peer and epoch, so a walk on another epoch never clears them. The preference is dropped at epoch rotation, and every 16th walk on one handle (SYNC_PREFERENCE_EXPLORE_EVERY) ignores it, so another peer that serves at the target rate can take the slot. A peer-supplied record whose stored length is more than the zstd worst-case compressed size for its decompressed content is refused as undecodable, so a record of decompressed size n is credited to the rate meter at most about n + n/256 + 127 bytes; the bound does not refuse padding that fits under it, and bytes after the last decoded record are still credited. The import is bounded by what it writes as well as by what it reads: every pack writer compresses its records with zstd, so a pack declared uncompressed is refused as undecodable; an import must write at least 1 MiB to its data log per 300-second window, a tenth of what the reader’s floor delivers, or it stops as stalled and the peer is charged a mild penalty; and it re-checks free disk space every second as well as every 64 MiB it writes, stopping with a local storage-full error (not charged) before free space falls under its floor, the execution database’s largest growth step (--db.growth-step, 1 GiB by default) plus 512 MiB. A stopped import’s files are removed before the requester tries the next peer, and the peer is marked failed for the epoch. These bounds set how fast a peer must stream and an import must write, not how long a transfer runs: a peer that keeps them can stream until it sends the final output or the import reaches the floor. So on every exchange in which the requester is public-tier or the serving peer is not staked, the transfer also has a whole-transfer deadline of 230 seconds from its start (EPOCH_PACK_TRANSFER_DEADLINE: the 200-second public-tier serve cut plus one 30-second rate window), past which the import stops and the peer is charged a mild penalty; the deadline never covers the install that follows. A committee-tier requester served by a staked peer gets no deadline, because responders bound that serve by pack length only, so nothing but the end of the pack or the floor ends that import.
  • A missing-certificates or consensus-output serve is bounded at 200 seconds in total. A public-tier serve of either class is also cut at a fixed 60-second hold limit (PUBLIC_SYNC_SERVE_TIMEOUT) and charged as a stall. So a public requester must read a consensus output of L bytes at no less than L/60 seconds. Pack records are capped at 16 MiB, so the largest output needs about 273 KiB/s, the requester’s own target rate.
  • A worker batch serve has 5 seconds to write its Ack and 30 seconds for each data frame, inside the 200-second total. A public-tier worker batch serve is also cut at a fixed 60-second hold limit (PUBLIC_BATCH_SERVE_TIMEOUT) and charged as a stall; a public key serves on one worker stream at a time and may hold worker serve permits for 60 seconds per 300-second window (PUBLIC_BATCH_SERVE_HOLD_BUDGET, PUBLIC_BATCH_SERVE_HOLD_WINDOW), and is refused AtCapacity outside that budget. A public key may hold worker opening-read permits for 10 seconds per 300-second window (PUBLIC_OPENING_HOLD_BUDGET, PUBLIC_OPENING_HOLD_WINDOW) and is shed AtCapacity, uncharged, outside it; a key is leased only with a full 60-second hold limit of serve budget left.

A public-tier peer is charged a mild penalty for a silent, unreadable or unexpected opening, for a valid request that arrives in the second half of its 1-second opening window (whether the request is then admitted or refused), for a stalled serve, and, for an epoch pack, for a serve cut at the 200-second hold limit, and, for a missing-certificates or consensus-output serve, for a serve cut at the 60-second hold limit, and, for a worker batch serve, for a serve cut at the 60-second hold limit and for a request above the 500-digest cap. A serve stalls when it hits a write timeout or a missed deadline. On the primary, the whole-serve timeout of a missing-certificates or consensus-output serve is a stall. On the primary, a requester that resets or closes the stream during the serve is also a stall: a TimedOut, ConnectionReset or NotConnected stream error counts as a stall, the same set the worker uses. On the worker, a requester that stops or closes the stream after the Ack is a stall. A prompt AtCapacity or Busy refusal is not charged, because an honest peer gets it when a pool is full or its own budget is spent. Committee peers are not charged by admission. A mild penalty lowers the peer score by 1.0; the score thresholds are -20.0 for a disconnect and -50.0 for a ban, so, ignoring decay, twenty stalls disconnect a public peer and fifty ban it. These admission penalties are enforced, unlike the stream-failure penalties under Failure classification.

Limits

LimitValueWhat it bounds
Pending outbound opens1024Opens buffered across the whole behaviour; past this an open is rejected immediately rather than queued
Total open budget15sDial, connection establishment, and substream negotiation combined; on expiry the caller gets a timeout
Substream negotiation10sA single outbound substream negotiation, enforced by libp2p
Stale sweep1sHow often expired pending opens are failed and cleared
Inbound streams per peer256 per secondInbound sync streams accepted from one peer per one-second window; the next one is refused
Pending outbound per connection256Opens buffered by one connection handler before it sheds
In-flight sync streams per peer2Sync streams one peer can hold on a responder at once
Opening reads8 + 1 per committee keyStreams waiting up to 1s (public) or 5s (committee) for their request frame
Requester opening write (primary)1sDeadline for writing and flushing the opening request frame (SYNC_REQUEST_WRITE_TIMEOUT)
Serve slots per class5 + 1 per committee keyConcurrent serves of each class: epoch pack, missing certificates, consensus output
Worker batch serves5 + 1 per committee keyConcurrent worker batch sync serves
Epoch-pack serve deadline30s per started MiB, plus 30sTotal time one epoch-pack serve can take
Epoch-pack import progress1 MiB written per 300sWhat a requester’s import must write to its data log per window (IMPORT_MIN_PROGRESS_BYTES, IMPORT_PROGRESS_WINDOW); an import below it stops as stalled and the serving peer is charged a mild penalty
Epoch-pack import free-space floorexecution growth step + 512 MiB, checked every 1sFree space a requester’s import leaves on the datadir’s filesystem (import_min_free, IMPORT_FREE_CHECK_INTERVAL); 1.5 GiB with the default 1 GiB --db.growth-step; an import that reaches it stops with a local error, not charged
Epoch-pack transfer deadline230sWhole length of a peer’s epoch-pack transfer into a requester’s import, on every exchange in which the requester is public-tier or the serving peer is not staked (EPOCH_PACK_TRANSFER_DEADLINE); a transfer past it stops and the serving peer is charged a mild penalty; a committee-tier requester served by a staked peer has none
Public epoch-pack serve hold limit200sFixed, size-independent bound on one public-tier epoch-pack serve (PUBLIC_EPOCH_PACK_SERVE_TIMEOUT); a serve that outlives it is dropped and charged as a stall; committee-tier serves keep the throughput-floor deadline
Public worker batch serve hold limit60sFixed, size-independent bound on one public-tier worker batch serve (PUBLIC_BATCH_SERVE_TIMEOUT); a serve that outlives it is dropped and charged as a stall; committee-tier serves keep the 200s stream bound
Public worker batch serves per key1Worker batch serves one public key may hold at a time (PUBLIC_BATCH_SERVES_PER_PEER); a second request is refused AtCapacity without a charge
Public worker batch-serve hold budget60s per 300sServe-permit hold time one public key may use per window (PUBLIC_BATCH_SERVE_HOLD_BUDGET, PUBLIC_BATCH_SERVE_HOLD_WINDOW); a key is leased only with a full 60s hold limit left; outside that it is refused AtCapacity without a charge
Public worker opening hold budget10s per 300sOpening-read hold time one public key may use per window (PUBLIC_OPENING_HOLD_BUDGET, PUBLIC_OPENING_HOLD_WINDOW); a key with less than one read bound left is shed AtCapacity without a charge
Public primary opening hold budget10s per 300sOpening-read hold time one public key may use per window on a primary (PUBLIC_OPENING_HOLD_BUDGET, PUBLIC_OPENING_HOLD_WINDOW); a key with less than one read bound left is shed Busy without a charge
Public primary serves per key1Sync serves one public key may hold on a primary at a time, across all three classes (PUBLIC_SYNC_SERVES_PER_PEER); a second request is refused Busy without a charge
Public missing-certificates and consensus-output serve hold limit60sFixed bound on one public-tier serve of either class (PUBLIC_SYNC_SERVE_TIMEOUT); a serve that outlives it is dropped and charged as a stall; committee-tier serves keep the 200s total bound
Public epoch-pack serve hold budget200s per 1000sEpoch-pack serve-permit hold time one public key may use per window (PUBLIC_EPOCH_PACK_SERVE_TIMEOUT, PUBLIC_EPOCH_PACK_SERVE_HOLD_WINDOW); a key is leased only with a full 200s hold limit left; outside that it is refused Busy without a charge
Public missing-certificates and consensus-output serve hold budget60s per 300s, per classServe-permit hold time one public key may use per window in each of the two classes (PUBLIC_SYNC_SERVE_TIMEOUT, PUBLIC_SYNC_SERVE_HOLD_WINDOW); a key is leased only with a full 60s hold limit left; outside that it is refused Busy without a charge

The 15-second and 10-second budgets nest: the total open budget covers a dial that may itself have to establish a connection, while the negotiation timeout applies only once a connection exists. An open that is dispatch-ready when its peer disconnects is re-queued for dialing rather than handed to a handler that no longer exists.

Failure classification

Stream failures are classified into a taxonomy that mirrors the request-response one, so comparable misbehaviour scores comparably on both paths:

failure               penalty   rationale
--------------------  --------  -----------------------------------------
DialFailure           none      transport-level; not the peer's fault
Timeout               mild      a stalled open
UnsupportedProtocol   none      honest version or role skew
Io (transport flap)   none      reset, abort, EOF, broken pipe, interrupt
Io (other)            medium    a genuine protocol or codec violation
InboundRateLimited    medium    abuse of the inbound stream path

A failed negotiation is not even reported to the behaviour. Probing whether a peer speaks the sync protocol is a normal thing to do during a rolling upgrade, and a probe that comes back negative should cost nothing. Because the outbound open is lazy, the open succeeds before the responder answers the protocol proposal, so the “speaks sync” signal comes from the first read instead. A first read that fails because the responder rejected the protocol is classed UnsupportedProtocol and records that the peer does not speak sync. A peer is recorded as speaking sync only after a first frame is read from it.

These stream-failure penalties are classified and logged, not enforced. Every classified failure produces a log line recording the penalty it would incur, and nothing is applied to the peer’s score. Enforcement is gated on telemetry confirming the classification does not fire on healthy peers. The admission penalties in Admission are different: they are applied to the peer’s score. Apart from those admission penalties, nothing on this page changes a peer’s score; see Peers for the scoring that is enforced.

Source of truth

BehaviorCode
Frame tags, deny and error reasons, frame read/writecrates/network-libp2p/src/sync/frame.rs
Typed request enums and their pinned discriminantscrates/network-libp2p/src/sync/request.rs
Open budget, stale sweep, inbound rate limit, pending-open capcrates/network-libp2p/src/stream/behavior.rs
Negotiation timeout, per-connection pending cap, error classificationcrates/network-libp2p/src/stream/handler.rs
Advertised upgrade, failure taxonomy and penalty mappingcrates/network-libp2p/src/stream/upgrade.rs
Peer tiers, tiered slot pools, per-peer stream slotscrates/network-libp2p/src/sync/admission.rs
Primary sync admission, serve classes, admission penaltiescrates/consensus/primary/src/network/mod.rs
Penalty reporting (metrics-only, not enforced)crates/network-libp2p/src/consensus.rs (process_stream_event)
Sync protocol IDscrates/network-libp2p/src/types.rs (sync_protocol)
Shared codec boundscrates/network-libp2p/src/codec.rs
Per-exchange frame and transfer capscrates/consensus/primary/src/network/sync_codec.rs, crates/consensus/worker/src/network/handle.rs

This page mirrors those files. Update this page when those files change.

Getting Started

Guides for connecting to Telcoin Network and building on it. Because the network is EVM-compatible, everything here uses standard Ethereum tooling; if you have built on Ethereum, the workflow will be familiar.

Start with Reading Blockchain Data to query the network using cURL, programmatic JSON-RPC requests, or client libraries. Dapp Development covers development tooling. Faucet explains how to get testnet TEL, and Hardware Requirements lists what is needed to run a node.

Operators start with Installing a release. Release notes lists what changed in each release.

Installing a release

This page is for operators who run Telcoin Network on Linux x86_64. Each release is a signed git tag plus these files on the tag’s GitHub release:

FileContent
telcoin-network-<TAG>-x86_64-unknown-linux-gnu.tar.gzThe telcoin-network binary, with LICENSE-APACHE, LICENSE-MIT and NOTICE
IMAGE_DIGESTThe linux/amd64 image, named by its content digest, in the network’s package: ghcr.io/telcoin-association/tn-mainnet for a mainnet tag, ghcr.io/telcoin-association/tn-testnet for an Adiri tag
SHA256SUMSThe SHA-256 of the tarball, of IMAGE_DIGEST, and of the network’s three chain-config files
SHA256SUMS.ascA maintainer’s detached OpenPGP signature over SHA256SUMS
worker-gateway-<TAG>-x86_64-unknown-linux-gnu.tar.gzReleases that ship the edge services: the worker-gateway binary, with LICENSE-APACHE, LICENSE-MIT and NOTICE
node-record-api-<TAG>-x86_64-unknown-linux-gnu.tar.gzReleases that ship the edge services: the node-record-api binary, with LICENSE-APACHE, LICENSE-MIT and NOTICE
IMAGE_DIGEST-worker-gateway, IMAGE_DIGEST-node-record-apiReleases that ship the edge services: the service’s linux/amd64 image, named by its content digest, in the service’s own package, ghcr.io/telcoin-association/tn-worker-gateway or ghcr.io/telcoin-association/tn-node-record-api, which mainnet and Adiri tags share
SHA256SUMS-edgeReleases that ship the edge services: the SHA-256 of each edge tarball and each IMAGE_DIGEST-<service> file
SHA256SUMS-edge.ascReleases that ship the edge services: the maintainers’ detached OpenPGP signatures over SHA256SUMS-edge, by the same keys as SHA256SUMS.asc

Every release ships the node. A release also ships worker-gateway, node-record-api or both when etc/release-components at the tagged commit names them; a tag without that file ships the node alone. Edge services verifies their files.

There are no release builds for other platforms. On those, build from source as the README describes.

Release channels

The tag name sets the network, the build features, the image package and the image tags.

TagNetworkBuild featuresImage packageImage tags
vX.Y.Zmainnetnonetn-mainnet:vX.Y.Z, :latest
vX.Y.Z-rcNmainnet release candidatenonetn-mainnet:vX.Y.Z-rcN only
vX.Y.Z-adiriAdiri testnetadiritn-testnet:vX.Y.Z-adiri, :adiri
vX.Y.Z-adiri-rcNAdiri release candidateadiritn-testnet:vX.Y.Z-adiri-rcN only

Both packages are under ghcr.io/telcoin-association/. A mainnet release never has its image in tn-testnet, and an Adiri release never in tn-mainnet; the image check below refuses either. The edge services’ images are in neither: each service has one package that both networks share, as Edge services describes.

Running with --chain adiri needs a build with the adiri feature, so Adiri nodes use the -adiri releases. Release candidates are for testing and do not belong in production. :latest and :adiri move to the newest release in their channel when it is published, so deployments should pin the image digest instead (see Path B). GitHub marks every Adiri release and every release candidate as a pre-release, so the repository’s “Latest” release never points at one of them. Release notes lists the changes in each release.

What the signature proves

SHA256SUMS has five lines: IMAGE_DIGEST, which names the image by its content digest, the tarball, and the network’s committee.yaml, genesis.yaml and parameters.yaml by their path in the repository, under chain-configs/testnet/ for an -adiri tag and chain-configs/mainnet/ for any other. One signature over SHA256SUMS therefore covers the binary, the image and the chain configuration. The edge services’ files are not in SHA256SUMS; a second signed manifest, SHA256SUMS-edge, covers them, as Edge services describes. The blocks below extract the chain-config files from the tag, so Path A checks all five lines and Path B checks every line but the tarball’s. SHA256SUMS.asc is made with a maintainer’s OpenPGP signing key, held on a YubiKey, which it never leaves. The git tag carries a signature by a key on the same allowlist. The keys allowed to sign are in keys/ of tn-release-signing, the repository that holds the maintainer keys every signed Telcoin project shares. This repository carries it as the release submodule, and the keys that count are the ones at the commit main records for release. Their fingerprints are in the key table of KEYS.md in that same commit.

A good signature proves that a maintainer on that list approved these exact files. It does not prove that the binary was built from the tagged source. Release builds are not reproducible, and releases have no SBOM and no third-party build provenance. The Commit SHA that --version prints is written in by the build, so it names the commit the build was given; it is not evidence that the binary came from that commit. Before a release is published, the maintainers’ tooling checks that the binary in the tarball is byte-identical to the one in the image and that --version names the tagged commit. Image tags such as :adiri are not signed; only the digest in IMAGE_DIGEST is.

Before you start

You need curl, git and GnuPG (gpg and gpgv), plus Docker for Path B. On Debian or Ubuntu:

sudo apt-get install -y curl git gnupg

Start each path in a new, empty directory and run its commands in one shell. The first command of each block stops on a directory that is not empty, so a file left from an earlier download is never checked in place of this release’s. Set TAG on the first line to the release you are installing.

Both paths take the maintainer keys from main, never from the release’s tag: they clone main, check out its release submodule at the commit main records, and read the keys there. A tag therefore cannot bring its own key, and moving the release pointer on main needs a review from a maintainer who holds a release key. A key removed from the allowlist stops verifying as soon as main records a release commit without it. The tag is fetched into the same checkout by its full name, refs/tags/<TAG>, because git clone --branch <TAG> prefers a branch of the same name, if one exists, and says nothing.

Path A: tarball

In a new, empty directory, these commands clone main and its release submodule for the maintainer keys, fetch the tag, extract the chain-config files from it, download the four release files, stopping at the first download that fails, check the signature over SHA256SUMS, and check every hash in it:

TAG=v0.17.0-adiri
REPO=Telcoin-Association/telcoin-network
BASE="https://github.com/$REPO/releases/download/$TAG"
if [ -n "$(ls -A)" ]; then echo "Run these commands in a new, empty directory" >&2; false; fi &&
git clone --quiet --depth 1 --branch main "https://github.com/$REPO.git" tn-main &&
git -C tn-main submodule update --init --depth 1 -- release &&
git -C tn-main fetch --quiet --depth 1 origin "refs/tags/$TAG:refs/tags/$TAG" &&
git -C tn-main archive "refs/tags/$TAG" chain-configs | tar -xf - &&
for k in tn-main/release/keys/*.asc; do gpg --dearmor < "$k"; done > tn-release-keys.gpg &&
gpg --show-keys --with-fingerprint tn-main/release/keys/*.asc &&
curl -fsSL --fail-early --remote-name-all "$BASE/SHA256SUMS" "$BASE/SHA256SUMS.asc" "$BASE/IMAGE_DIGEST" "$BASE/telcoin-network-$TAG-x86_64-unknown-linux-gnu.tar.gz" &&
gpgv --status-fd 1 --keyring ./tn-release-keys.gpg SHA256SUMS.asc SHA256SUMS |
awk '$2 ~ /^(BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { bad = 1 } $2 ~ /^(GOODSIG|BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { s = $2; print $2 } $2 == "VALIDSIG" && s == "GOODSIG" { print "signed by primary key " $NF; n++ } END { exit (n && !bad) ? 0 : 1 }' &&
sha256sum --check SHA256SUMS &&
echo "Signature and hashes verified"

Each command runs only if the one before it passed. Expect:

  • GOODSIG, then signed by primary key followed by a fingerprint;
  • sha256sum to print OK after IMAGE_DIGEST, after the three chain-configs/ files and after telcoin-network-<TAG>-x86_64-unknown-linux-gnu.tar.gz;
  • Signature and hashes verified as the last line.

gpgv prints Good signature from and exits 0 even when the signing key is revoked or expired, so the block reads gpgv’s status lines instead: it counts only a GOODSIG, and it fails when any signature in SHA256SUMS.asc is BADSIG, ERRSIG, EXPSIG, EXPKEYSIG or REVKEYSIG, even if another one is good. The release pipeline applies the same rule before a maintainer signs and before a release is published. If the last line Signature and hashes verified is missing, the files are not verified; stop, do not extract or run anything from this release, and report it. The lines above it show which check failed, and When verification fails explains each one.

Chain-config files

SHA256SUMS lists the network’s committee.yaml, genesis.yaml and parameters.yaml by their path in the repository: chain-configs/testnet/ for an -adiri tag and chain-configs/mainnet/ for any other. These are the files built into the release’s binary for --chain that a datadir can also hold. The binary also carries the network’s bootstrap_servers.yaml, the servers a --chain node dials to join; the node never reads that file from disk, so it is checked as part of the binary, by the tarball’s hash. The block extracts them from the tag into chain-configs/, so sha256sum checks them against their signed hashes, and you can use these copies. To check copies you already have, run this from the directory that holds their chain-configs/ folder, such as the root of a checkout of the tag, with the path of the verified SHA256SUMS:

grep '  chain-configs/' /path/to/SHA256SUMS | sha256sum --check

It must print OK for all three files.

Check the key fingerprints

The keys come from main, so the tag cannot change them. Check that they are the maintainers’ keys: every primary key fingerprint that gpg --show-keys printed, including the one after signed by primary key, must appear in both of these places:

  • the key table in tn-main/release/KEYS.md, from the same main checkout, with a Status that is not revoked;
  • the maintainer’s GitHub account at https://github.com/<handle>.gpg, where <handle> is the key file’s name without .asc.

git -C tn-main submodule status -- release prints the commit of tn-release-signing that the keys and the table came from. This loop prints the keys GitHub has for each handle:

for k in tn-main/release/keys/*.asc; do
  h=$(basename "$k" .asc)
  echo "== $h"
  curl -fsSL "https://github.com/$h.gpg" | gpg --show-keys --with-fingerprint
done

If a fingerprint is missing from either place, is different, or has the Status revoked, stop and report it.

Check the binary

Run this only after the last line was Signature and hashes verified and the fingerprints matched:

tar -xzf "telcoin-network-$TAG-x86_64-unknown-linux-gnu.tar.gz" &&
cd "telcoin-network-$TAG-x86_64-unknown-linux-gnu" &&
./telcoin-network --version &&
git -C ../tn-main rev-parse "refs/tags/$TAG^{commit}"

The tarball holds one directory, telcoin-network-<TAG>-x86_64-unknown-linux-gnu/, with telcoin-network, LICENSE-APACHE, LICENSE-MIT and NOTICE in it. The --version output must include these lines:

  • telcoin-network-cli Version: X.Y.Z as the first line, where X.Y.Z is the tag without its leading v and without -adiri or -rcN (telcoin-network-cli Version: 0.17.0 for v0.17.0-adiri);
  • Commit SHA: followed by the commit that git rev-parse printed, which is the commit the tag points to;
  • Build Features: with nothing after it for a mainnet tag (vX.Y.Z or vX.Y.Z-rcN); for an -adiri tag, adiri, possibly with faucet, which the adiri feature implies, and nothing else.

Releases cut before this process print Version: 0.1.0 after the program name.

Install the binary:

sudo install -m 0755 telcoin-network /usr/local/bin/telcoin-network

Record the tarball’s SHA-256 from SHA256SUMS and the --version output in your operator inventory, as the release and network update process asks.

Path B: Docker image

The image needs only three of the release files, SHA256SUMS, SHA256SUMS.asc and IMAGE_DIGEST, and the chain-config files from the tag. In a new, empty directory, run the Path A block without the tarball. Its last check drops only the tarball’s line from SHA256SUMS with grep, so sha256sum checks IMAGE_DIGEST and the three chain-config files and fails when one of them is missing:

TAG=v0.17.0-adiri
REPO=Telcoin-Association/telcoin-network
BASE="https://github.com/$REPO/releases/download/$TAG"
if [ -n "$(ls -A)" ]; then echo "Run these commands in a new, empty directory" >&2; false; fi &&
git clone --quiet --depth 1 --branch main "https://github.com/$REPO.git" tn-main &&
git -C tn-main submodule update --init --depth 1 -- release &&
git -C tn-main fetch --quiet --depth 1 origin "refs/tags/$TAG:refs/tags/$TAG" &&
git -C tn-main archive "refs/tags/$TAG" chain-configs | tar -xf - &&
for k in tn-main/release/keys/*.asc; do gpg --dearmor < "$k"; done > tn-release-keys.gpg &&
gpg --show-keys --with-fingerprint tn-main/release/keys/*.asc &&
curl -fsSL --fail-early --remote-name-all "$BASE/SHA256SUMS" "$BASE/SHA256SUMS.asc" "$BASE/IMAGE_DIGEST" &&
gpgv --status-fd 1 --keyring ./tn-release-keys.gpg SHA256SUMS.asc SHA256SUMS |
awk '$2 ~ /^(BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { bad = 1 } $2 ~ /^(GOODSIG|BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { s = $2; print $2 } $2 == "VALIDSIG" && s == "GOODSIG" { print "signed by primary key " $NF; n++ } END { exit (n && !bad) ? 0 : 1 }' &&
grep -v -F "  telcoin-network-$TAG-x86_64-unknown-linux-gnu.tar.gz" SHA256SUMS | sha256sum --check &&
echo "Signature and hashes verified"

Expect GOODSIG, then signed by primary key followed by a fingerprint, then OK after IMAGE_DIGEST and after the three chain-configs/ files, and Signature and hashes verified as the last line. If the last line Signature and hashes verified is missing, the files are not verified; stop, do not pull or run the image, and report it. Then check the key fingerprints as in Path A, and stop if one is missing, different or revoked.

Check the image

Run this only after the signature, the hash and the fingerprints have passed. It takes the image package from TAG, tn-testnet for an Adiri tag and tn-mainnet otherwise, and refuses an IMAGE_DIGEST that does not name an image in that package by digest, such as one in the other network’s package:

case "$TAG" in
  *-adiri | *-adiri-rc*) PACKAGE=tn-testnet ;;
  *) PACKAGE=tn-mainnet ;;
esac
IMAGE_REF=$(cat IMAGE_DIGEST)
case "$IMAGE_REF" in
  "ghcr.io/telcoin-association/$PACKAGE@sha256:"*) docker pull "$IMAGE_REF" && docker run --rm --network none --entrypoint /usr/local/bin/telcoin "$IMAGE_REF" --version ;;
  *) echo "IMAGE_DIGEST does not name an image in ghcr.io/telcoin-association/$PACKAGE by digest: $IMAGE_REF" >&2 ;;
esac

In the image the binary is /usr/local/bin/telcoin, and its --version output must show the same three lines as in Path A, with the commit that git -C tn-main rev-parse "refs/tags/$TAG^{commit}" prints.

Docker checks an image pulled by digest against that digest, so the image you pulled is the one the signature covers. Put the full content of IMAGE_DIGEST (ghcr.io/telcoin-association/tn-mainnet@sha256:... for mainnet, ghcr.io/telcoin-association/tn-testnet@sha256:... for Adiri) in compose files and systemd units, not a tag. The image is linux/amd64 only.

If you already pulled by tag, compare the two lines this prints, with PACKAGE set as in the block above; they must be equal:

docker image inspect --format '{{index .RepoDigests 0}}' "ghcr.io/telcoin-association/$PACKAGE:$TAG"
cat IMAGE_DIGEST

Edge services: worker gateway and node-record API

Some releases also ship the edge services, built from the same commit as the node:

  • worker-gateway: a mostly stateless reverse proxy in front of a worker’s JSON-RPC endpoint, which forwards the calls its method policy allows to a ready worker.
  • node-record-api: a read-only HTTP/JSON directory of the JSON-RPC endpoints that validators advertise, which it reads from their signed node records in the worker DHT.

The notes of such a release have an “Edge services” section with a row for each service it ships and the blocks below, with TAG set and only those services’ files.

Each service’s images are in a package of its own, ghcr.io/telcoin-association/tn-worker-gateway and ghcr.io/telcoin-association/tn-node-record-api, which mainnet and Adiri releases share, so an image’s tag, the release tag, says which release it belongs to. In each of these packages :latest and :adiri move to the newest mainnet and Adiri release when it is published, as the node’s do, and a release candidate moves neither; pin the digest from IMAGE_DIGEST-<service> instead.

The services’ files are listed in a second manifest, SHA256SUMS-edge, which the same maintainer keys sign in SHA256SUMS-edge.asc, and a release needs as many signatures on it as on SHA256SUMS. SHA256SUMS lists none of these files, so Path A and Path B do not cover them. What the signature proves holds for SHA256SUMS-edge as for SHA256SUMS: before a release is published, the maintainers’ tooling checks that each service’s binary in its tarball is byte-identical to the one in its image and that its --version names the tagged commit.

The blocks below are for a release that ships both services. For a release that ships one of them, leave the other’s files out of the curl line and the printf list of names, as that release’s notes do; a file the release does not have stops the block at curl with 404.

Run each edge block in a new, empty directory of its own, not in the directory where Path A or Path B ran. Like the node’s blocks, its first command stops on a directory that is not empty, and it clones main and its release submodule for the maintainer keys and fetches the tag itself, so it checks against the keys on main when it runs.

Edge tarballs

This block downloads SHA256SUMS-edge, SHA256SUMS-edge.asc, each IMAGE_DIGEST-<service> and each tarball, stopping at the first download that fails, checks the signatures over SHA256SUMS-edge with the same rule as Path A, checks that SHA256SUMS-edge names exactly this release’s edge files, and checks every hash in it:

TAG=v0.17.0-adiri
REPO=Telcoin-Association/telcoin-network
BASE="https://github.com/$REPO/releases/download/$TAG"
if [ -n "$(ls -A)" ]; then echo "Run these commands in a new, empty directory" >&2; false; fi &&
git clone --quiet --depth 1 --branch main "https://github.com/$REPO.git" tn-main &&
git -C tn-main submodule update --init --depth 1 -- release &&
git -C tn-main fetch --quiet --depth 1 origin "refs/tags/$TAG:refs/tags/$TAG" &&
for k in tn-main/release/keys/*.asc; do gpg --dearmor < "$k"; done > tn-release-keys.gpg &&
gpg --show-keys --with-fingerprint tn-main/release/keys/*.asc &&
curl -fsSL --fail-early --remote-name-all "$BASE/SHA256SUMS-edge" "$BASE/SHA256SUMS-edge.asc" "$BASE/IMAGE_DIGEST-worker-gateway" "$BASE/worker-gateway-$TAG-x86_64-unknown-linux-gnu.tar.gz" "$BASE/IMAGE_DIGEST-node-record-api" "$BASE/node-record-api-$TAG-x86_64-unknown-linux-gnu.tar.gz" &&
gpgv --status-fd 1 --keyring ./tn-release-keys.gpg SHA256SUMS-edge.asc SHA256SUMS-edge |
awk '$2 ~ /^(BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { bad = 1 } $2 ~ /^(GOODSIG|BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { s = $2; print $2 } $2 == "VALIDSIG" && s == "GOODSIG" { print "signed by primary key " $NF; n++ } END { exit (n && !bad) ? 0 : 1 }' &&
if [ "$(awk 'length($1) == 64 && /^[0-9a-f]+  [^ ]+$/ { print $2; next } { print "malformed" }' SHA256SUMS-edge | LC_ALL=C sort)" != "$(printf '%s\n' "IMAGE_DIGEST-node-record-api" "IMAGE_DIGEST-worker-gateway" "node-record-api-$TAG-x86_64-unknown-linux-gnu.tar.gz" "worker-gateway-$TAG-x86_64-unknown-linux-gnu.tar.gz")" ]; then echo "SHA256SUMS-edge does not name exactly the edge files of $TAG" >&2; false; fi &&
sha256sum --check SHA256SUMS-edge &&
echo "Edge signature and hashes verified"

Expect:

  • GOODSIG, then signed by primary key followed by a fingerprint;
  • sha256sum to print OK after each IMAGE_DIGEST-<service> file and each tarball;
  • Edge signature and hashes verified as the last line.

The same maintainer keys sign the node’s SHA256SUMS and the SHA256SUMS-edge of every release, so a good signature alone does not show that the file is this release’s edge manifest. The if line before sha256sum does: it reads the names in SHA256SUMS-edge and stops unless every line is <64 hex> <name> and the names are exactly this release’s IMAGE_DIGEST-<service> files and tarballs, each once. If the last line Edge signature and hashes verified is missing, the services’ files are not verified; stop, do not extract or run any of them, and report it. Then check the key fingerprints as in Path A, with this directory’s tn-main.

Check the edge binaries

Run this only after the last line was Edge signature and hashes verified and the fingerprints matched:

tar -xzf "worker-gateway-$TAG-x86_64-unknown-linux-gnu.tar.gz" &&
"./worker-gateway-$TAG-x86_64-unknown-linux-gnu/worker-gateway" --version &&
tar -xzf "node-record-api-$TAG-x86_64-unknown-linux-gnu.tar.gz" &&
"./node-record-api-$TAG-x86_64-unknown-linux-gnu/node-record-api" --version &&
git -C tn-main rev-parse "refs/tags/$TAG^{commit}"

Each tarball holds one directory, <service>-<TAG>-x86_64-unknown-linux-gnu/, with the service’s binary, LICENSE-APACHE, LICENSE-MIT and NOTICE in it. Each --version prints these two lines and nothing else, shown here for v0.17.0-adiri, where <commit> is the full commit that git rev-parse printed:

tn-worker-gateway Version: 0.17.0
Commit SHA: <commit>

tn-node-record-api Version: 0.17.0
Commit SHA: <commit>

The version is the tag without its leading v and without -adiri or -rcN, as for the node, and there is no Build Features: line.

Install the binaries:

sudo install -m 0755 "worker-gateway-$TAG-x86_64-unknown-linux-gnu/worker-gateway" /usr/local/bin/worker-gateway &&
sudo install -m 0755 "node-record-api-$TAG-x86_64-unknown-linux-gnu/node-record-api" /usr/local/bin/node-record-api

Record each tarball’s SHA-256 from SHA256SUMS-edge and each --version output in your operator inventory, as for the node.

Edge images

The images need only SHA256SUMS-edge, SHA256SUMS-edge.asc and the IMAGE_DIGEST-<service> files. Run the Edge tarballs block without the tarballs, in a new, empty directory of its own. It checks the names in SHA256SUMS-edge as that block does, the tarballs’ included. Its last check then drops only the tarballs’ lines from SHA256SUMS-edge with grep, so sha256sum checks every IMAGE_DIGEST-<service> file and fails when one of them is missing:

TAG=v0.17.0-adiri
REPO=Telcoin-Association/telcoin-network
BASE="https://github.com/$REPO/releases/download/$TAG"
if [ -n "$(ls -A)" ]; then echo "Run these commands in a new, empty directory" >&2; false; fi &&
git clone --quiet --depth 1 --branch main "https://github.com/$REPO.git" tn-main &&
git -C tn-main submodule update --init --depth 1 -- release &&
git -C tn-main fetch --quiet --depth 1 origin "refs/tags/$TAG:refs/tags/$TAG" &&
for k in tn-main/release/keys/*.asc; do gpg --dearmor < "$k"; done > tn-release-keys.gpg &&
gpg --show-keys --with-fingerprint tn-main/release/keys/*.asc &&
curl -fsSL --fail-early --remote-name-all "$BASE/SHA256SUMS-edge" "$BASE/SHA256SUMS-edge.asc" "$BASE/IMAGE_DIGEST-worker-gateway" "$BASE/IMAGE_DIGEST-node-record-api" &&
gpgv --status-fd 1 --keyring ./tn-release-keys.gpg SHA256SUMS-edge.asc SHA256SUMS-edge |
awk '$2 ~ /^(BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { bad = 1 } $2 ~ /^(GOODSIG|BADSIG|ERRSIG|EXPSIG|EXPKEYSIG|REVKEYSIG)$/ { s = $2; print $2 } $2 == "VALIDSIG" && s == "GOODSIG" { print "signed by primary key " $NF; n++ } END { exit (n && !bad) ? 0 : 1 }' &&
if [ "$(awk 'length($1) == 64 && /^[0-9a-f]+  [^ ]+$/ { print $2; next } { print "malformed" }' SHA256SUMS-edge | LC_ALL=C sort)" != "$(printf '%s\n' "IMAGE_DIGEST-node-record-api" "IMAGE_DIGEST-worker-gateway" "node-record-api-$TAG-x86_64-unknown-linux-gnu.tar.gz" "worker-gateway-$TAG-x86_64-unknown-linux-gnu.tar.gz")" ]; then echo "SHA256SUMS-edge does not name exactly the edge files of $TAG" >&2; false; fi &&
grep -v -F -e "  worker-gateway-$TAG-x86_64-unknown-linux-gnu.tar.gz" -e "  node-record-api-$TAG-x86_64-unknown-linux-gnu.tar.gz" SHA256SUMS-edge | sha256sum --check &&
echo "Edge signature and hashes verified"

Expect GOODSIG, then signed by primary key followed by a fingerprint, then OK after each IMAGE_DIGEST-<service> file, and Edge signature and hashes verified as the last line. If the last line Edge signature and hashes verified is missing, the files are not verified; stop, do not pull or run the images, and report it. Then check the key fingerprints as in Path A, with this directory’s tn-main, and stop if one is missing, different or revoked.

Check the edge images

Run this only after the signature, the hashes and the fingerprints have passed. It refuses an IMAGE_DIGEST-<service> that does not name an image in that service’s package by digest; each service’s images are published there and nowhere else:

IMAGE_REF=$(cat IMAGE_DIGEST-worker-gateway) &&
case "$IMAGE_REF" in
  ghcr.io/telcoin-association/tn-worker-gateway@sha256:*) docker pull "$IMAGE_REF" && docker run --rm --network none --entrypoint /usr/local/bin/worker-gateway "$IMAGE_REF" --version ;;
  *) echo "IMAGE_DIGEST-worker-gateway does not name an image in ghcr.io/telcoin-association/tn-worker-gateway by digest: $IMAGE_REF" >&2; false ;;
esac &&
IMAGE_REF=$(cat IMAGE_DIGEST-node-record-api) &&
case "$IMAGE_REF" in
  ghcr.io/telcoin-association/tn-node-record-api@sha256:*) docker pull "$IMAGE_REF" && docker run --rm --network none --entrypoint /usr/local/bin/node-record-api "$IMAGE_REF" --version ;;
  *) echo "IMAGE_DIGEST-node-record-api does not name an image in ghcr.io/telcoin-association/tn-node-record-api by digest: $IMAGE_REF" >&2; false ;;
esac &&
echo "Edge images pulled by digest"

In each image the binary is /usr/local/bin/<service>, and its --version output must be the same two lines as its tarball’s in Check the edge binaries, with the commit that git -C tn-main rev-parse "refs/tags/$TAG^{commit}" prints. If the last line is not Edge images pulled by digest, do not run the images; the lines above it say which check failed. Put the full content of each IMAGE_DIGEST-<service> (ghcr.io/telcoin-association/tn-worker-gateway@sha256:... or ghcr.io/telcoin-association/tn-node-record-api@sha256:...) in compose files and systemd units, not a tag. The images are linux/amd64 only.

When an edge check fails

Never extract, install or run any of the services’ files when one of these checks failed. When verification fails applies, with SHA256SUMS-edge, SHA256SUMS-edge.asc, IMAGE_DIGEST-<service> and Edge signature and hashes verified in place of SHA256SUMS, SHA256SUMS.asc, IMAGE_DIGEST and Signature and hashes verified. Its table also has rows for the edge blocks’ digest-file refusal, IMAGE_DIGEST-<service> does not name an image in ghcr.io/telcoin-association/tn-<service> by digest, and for an edge service’s --version. Two more failures belong to the edge blocks alone:

  • SHA256SUMS-edge does not name exactly the edge files of <TAG>: the signed manifest lacks one of this release’s edge files, names another file or holds a malformed line, as the node’s SHA256SUMS or another release’s SHA256SUMS-edge would; it is not this release’s edge manifest, so stop and report it.
  • curl fails with 404 for an edge file: besides a wrong TAG, the release may not ship that service; its notes and its files on the release page show which services it ships.

Optional: check the tag signature

The tag carries its own signature, by one key on the allowlist. To check it in a throwaway keyring, from the directory you started in:

GNUPGHOME=$(mktemp -d)
export GNUPGHOME
gpg --quiet --import tn-main/release/keys/*.asc
git -C tn-main verify-tag "$TAG"
unset GNUPGHOME

git verify-tag prints Good signature from and a warning that the key is not certified with a trusted signature. The warning is expected in a fresh keyring; the fingerprint check is what ties the key to a maintainer.

When verification fails

Never extract, install or run anything from a release that failed one of these checks.

SymptomMeaningAction
The last line is not Signature and hashes verifiedA step of the block failed, and the lines above say whichFind that line in this table; do not extract or run anything from the release.
Run these commands in a new, empty directoryThe directory holds files already, possibly from another downloadStart again in a new, empty directory.
git fetch cannot find refs/tags/<TAG>, or curl fails with 404TAG is wrong, or the release is not published yetCheck TAG against the releases page.
BADSIG (gpgv prints BAD signature)SHA256SUMS changed after it was signedStop and report it.
ERRSIG (gpgv prints Can't check signature: No public key)The signing key is not in the allowlist on main: TAG is wrong, the files belong to another release, or the key was removed after this release was signedCheck TAG; if it is right, stop and report it.
REVKEYSIG (gpgv still prints Good signature)The signing key was revoked, for example after a YubiKey was lostStop and report it. A release signed before the revocation can no longer be verified against main, which is intended.
EXPKEYSIG (gpgv still prints Good signature)The signing key has expiredStop and report it. An older release signed before the expiry cannot be verified against main until a maintainer extends the key and main records a release commit that carries the extended key.
EXPSIGThe signature itself has expiredStop and report it.
One of the rows above next to a GOODSIGAnother signature in SHA256SUMS.asc is bad, unverifiable, expired or revoked, and the block refuses the file as a wholeStop and report it.
sha256sum prints FAILEDA file differs from its signed hashCheck TAG and run the block again in a new, empty directory; if it fails again, stop and report it.
sha256sum prints FAILED open or read for a chain-configs/ filegit archive did not extract it from the tagCheck that the tag was fetched; if it was, stop and report it.
A fingerprint is missing from, or differs from, tn-main/release/KEYS.md or GitHub, or its KEYS.md Status is revokedThe keys on main are not the current maintainer keysStop and report it.
IMAGE_DIGEST does not name an image in ghcr.io/telcoin-association/<package> by digestThe signed IMAGE_DIGEST points outside the tag’s package, for example at the other network’s packageStop and report it.
IMAGE_DIGEST-<service> does not name an image in ghcr.io/telcoin-association/tn-<service> by digestThe signed digest file of an edge service points outside that service’s package, for example at the node’s packageStop and report it.
Commit SHA differs from the tag’s commit, Build Features is not empty on a mainnet tag, or on an -adiri tag lacks adiri or lists anything but adiri and faucetThe binary does not match the releaseStop and report it.
An edge service’s --version prints anything but its two lines, tn-<service> Version: X.Y.Z and Commit SHA: with the tag’s commit, such as another version, another commit or a Build Features: lineThe service’s binary does not match the releaseStop and report it.
exec format error, or Docker warns that the image platform does not match the hostThe release is built for Linux x86_64 onlyUse an x86_64 host, or build from source.
docker pull fails with denied or unauthorizedThe image is not publicly readableTell the maintainers.

Report a failed check through the security policy.

Release notes

Each Telcoin Network release has a section below, newest first. The sections come from CHANGELOG.md, which git-cliff generates from commit messages when a release is cut. Tags ending in -adiri are releases for the Adiri testnet. Release candidates have no section of their own; their changes appear under the release they lead to. Each section lists the changes since the previous final release of either channel, so a change first shipped in an Adiri release is not listed again under the next mainnet release. Each tag’s GitHub release also lists its files, the commands to verify them, and any operational notes such as a required resync or configuration change. To install a release, follow Installing a release. To roll one out across validators, follow the release and network update process.

[v0.18.0-adiri] - 2026-11-24

Features

  • Runtime switch list, node switches line and bench observability (#1862)
  • config: Bundled bootstrap servers per named chain (#1848)

Bug fixes

  • release: Start the CHANGELOG section after a final release tagged on a branch (#1897)
  • deps: Bump url to 2.5.9 for RUSTSEC-2026-0592 (#1890)
  • types: Reject roaring run-container bitmaps on decode
  • primary: Skip cert-manager path on inactive CVV (#1516) (#1547)
  • deps: Move the QUIC/libp2p stack past today’s RustSec advisories; dependabot action pins (#1847)
  • primary: Verify fetched certificates before handing them on, and keep checked copies (#1846)
  • primary: Keep this node’s cast vote cached across other decisions about its author (#1844)
  • primary: Follow-ups to #1822: pending attached parents, duplicate parent verification, cancelled vote requests (#1842)
  • primary: Recast a stored vote under the author lock and keep it cached (#1839)
  • primary: Record every author that cites a missing parent, not only the first (#1822)
  • Address the review notes on the benchmark observability stack (#1811-#1821) (#1827)
  • node: Restart replay anchors adiri block 1 on itself instead of the default header (#1790) (#1808)
  • primary: Budget public-tier sync holds on the opening read and every serve class

Tests

  • e2e: Keep node 2 in the process guard for all of do_restarts phase 1 (#1837) (#1840)
  • Cut fixed real-time waits from the slowest unit tests (#1833) (#1838)

Build, CI and chores

  • Bump taiki-e/install-action (#1878)

Batched merges

  • Staging/mavenrain 2026 11 11 (#1843)
    • fix(primary): record every author that cites a missing parent, not only the first (#1822)
    • test: cut fixed real-time waits from the slowest unit tests (#1833) (#1838)
    • fix(network): verify certificate gossip before gossipsub Accept and bound in-flight verification per peer (#1779)
    • fix(node-record): require the network key to co-sign the node record (#1751) (#1753)
    • fix(node-record): require the network key to co-sign the node record (#1751)
    • fix(worker): cheap-first batch validation, rejected-digest set and per-peer report cap (#1778)
    • fix(primary): bound ConsensusResult signers to the committee window and let certified records clear a pinned tip (#1771) (#1775)
    • fix(primary): cool down forging authors, skip known certificates (#1772)
    • fix(worker): remember stalling batch-sync peers and cap each peer’s share of a request (#1777)
    • primary: hold only epoch votes in the event queue gap, capped per author (#1786)
    • fix(node-record): require the network key to co-sign the node record (#1751) (#1753)
    • fix(node-record): require the network key to co-sign the node record (#1751)
    • fix(worker): cheap-first batch validation, rejected-digest set and per-peer report cap (#1778)
    • fix(primary): bound ConsensusResult signers to the committee window and let certified records clear a pinned tip (#1771) (#1775)
    • fix(primary): strike only on own delivery, ignore earlier-epoch certificates (#1772)
    • fix(primary,storage): close the preferred sync server rate gate gaps (#1789)
    • fix(primary): drop previous-epoch consensus results until the epoch record is certified (#1796) (#1823)
    • fix(worker): keep completed signer recoveries and refuse known bad signatures (#1810)
    • test: cut fixed real-time waits from the slowest unit tests (#1833)
    • fix(primary): recast a stored vote under the author lock and keep it cached (#1839)
    • test(e2e): keep node 2 in the process guard for all of do_restarts phase 1 (#1837) (#1840)
    • fix(primary): follow-ups to #1822: pending attached parents, duplicate parent verification, cancelled vote requests (#1842)
    • fix(primary): keep this node’s cast vote cached across other decisions about its author (#1844)
    • fix(primary): verify fetched certificates before handing them on, and keep checked copies (#1846)
  • Staging/mavenrain 2026 11 09 (#1841)
    • fix(network): verify certificate gossip before gossipsub Accept and bound in-flight verification per peer (#1779)
    • fix(node-record): require the network key to co-sign the node record (#1751) (#1753)
    • fix(node-record): require the network key to co-sign the node record (#1751)
    • fix(worker): cheap-first batch validation, rejected-digest set and per-peer report cap (#1778)
    • fix(primary): bound ConsensusResult signers to the committee window and let certified records clear a pinned tip (#1771) (#1775)
    • fix(primary): cool down forging authors, skip known certificates (#1772)
    • fix(worker): remember stalling batch-sync peers and cap each peer’s share of a request (#1777)
    • primary: hold only epoch votes in the event queue gap, capped per author (#1786)
    • fix(node-record): require the network key to co-sign the node record (#1751) (#1753)
    • fix(node-record): require the network key to co-sign the node record (#1751)
    • fix(worker): cheap-first batch validation, rejected-digest set and per-peer report cap (#1778)
    • fix(primary): bound ConsensusResult signers to the committee window and let certified records clear a pinned tip (#1771) (#1775)
    • fix(primary): strike only on own delivery, ignore earlier-epoch certificates (#1772)
    • fix(primary,storage): close the preferred sync server rate gate gaps (#1789)
    • fix(primary): drop previous-epoch consensus results until the epoch record is certified (#1796) (#1823)
    • fix(worker): keep completed signer recoveries and refuse known bad signatures (#1810)
    • test(e2e): finish() on the success path of the three state export/import tests (#1831) (#1832)
    • test(e2e): finish() after the last assert in seven tests that stopped nodes gracefully (#1828) (#1830)
    • fix(worker): bound the uncommitted reported batches each committee reporter can store (#1794) (#1815)
    • fix(worker): bound the uncommitted reported batches each committee reporter can store (#1794)
    • fix(worker): cover ReporterOverQuota in the sync serve outcome match (#1794)
    • fix(worker): box the reporter key in ReporterOverQuota to keep the error enum small (#1794)
    • fix(worker): box the reporter key in the ReporterOverQuota unit test (#1794)
    • fix(worker): count stored batches node-wide and age them out (#1794)
  • Staging/mavenrain 2026 11 06 (#1809)
    • fix(worker): remember stalling batch-sync peers and cap each peer’s share of a request (#1777)
    • primary: hold only epoch votes in the event queue gap, capped per author (#1786)
    • fix(node-record): require the network key to co-sign the node record (#1751) (#1753)
    • fix(node-record): require the network key to co-sign the node record (#1751)
    • fix(worker): cheap-first batch validation, rejected-digest set and per-peer report cap (#1778)
    • fix(primary): bound ConsensusResult signers to the committee window and let certified records clear a pinned tip (#1771) (#1775)
    • fix(primary,storage): close the preferred sync server rate gate gaps (#1789)

Merged from private forks

  • Merge commit from fork
    • fix(types): reject roaring run-container bitmaps on decode
  • Merge commit from fork
    • fix(primary): mark a late sync Busy as failed and rank busy peers
    • test(primary): pass the busy set at the remaining order_probe_peers calls
    • fix(primary): mark a sync peer that closes, resets or rejects late
    • fix(primary): rank a late sync Busy with the marked peers instead of failing it
    • fix(primary): write a refused sync stream’s deny before its late-opening charge
  • Merge commit from fork
    • GHSA-h352-9822-hjqg: two identities that cost nothing could cut a
  • Merge commit from fork
    • fix(network): reserve established connections for privileged peers
    • fix(network): scale the privileged connection reserve with the swarm total
    • network-budget: accept the public share denial labels
  • Merge commit from fork
    • fix(primary): budget public-tier sync holds on the opening read and every serve class

Other

  • Worker gateway for production: signed edge releases, keys from tn-release-signing, honest connection closes behind a reverse proxy (#1879)
  • db commands: fixes from the review of #1871 (load-state, import-epoch, validate, repair, reset-execution (#1876)
  • Small fixes: a flaky vendored RPC test, db validate’s newest epoch, test-only deps, the multi-leaf differential seed (#1875)
  • telcoin-network db: import-epoch, load-state –verify-only, validate –epoch/–all (#1871)
  • Update tn-contracts for mainnet (#1872)
  • Freeze-window fixes: clean stops, pack-damage tooling, getLogs over pointer rows, QUIC dials, v2 genesis resume (#1861)
  • Storage and RPC: tighter resource bounds (#1859)
  • Store each transaction once: Transactions rows point into the consensus pack (new datadirs) (#1855)
  • Storage v2 follow-ups: crash windows, static-file and engine hardening, RPC bounds, operator doc (#1849)
  • Storage v2: tn-lmdb by default, layout v2 without RocksDB, static-file checksums, execution cache, parallel storage roots (#1834)
  • Mainnet chain id 731 guards: faucet refusal and –allow-faucet-on-chain, build features in –version and at startup, cleartext BLS key refusal (#1716)
  • TN-owned storage engine for the reth execution database (behind the tndb-b feature) (#1759)
  • Primary sync: lazy open, Deny(Busy), per-node hold books (review round 2)
  • Arm the sub-second timestamp fork at adiri epoch 747 (#1791)

[v0.16.0-adiri] - 2026-10-08

Features

  • rpc: Make tn selectable and document every namespace (#1593)
  • network: Probe every eligible sync peer and prefer the last one that served (#1574)
  • network: Add validated handshake start accounting (#1447)

Bug fixes

  • state-sync: Re-queue given-up epoch packs without waiting and queue each epoch at most once (#1577)
  • storage: Prune committed batches from the batch cache and count write failures (#1524)
  • storage: Log restart stalls and test crash recovery across a reopen (#1521)
  • network: Use is_none_or in the record TTL refresh check
  • primary: Keep vote collection when the same header is re-sent (#1579)
  • primary: Backpressure consensus_output with a bounded que channel (#1575)
  • storage: Treat an out-of-range final header as an incomplete epoch (#1576)
  • network: Retrieve current peer records on reconnect (#1499)
  • node: Expose recoverable readiness for every network swarm (#1492)
  • Observer catch-up on adiri (backpressured sync_output, local replay, fresh-node anchor) (#1561)
  • tn-reth: Use epoch fees for tip simulations (#1458)
  • node: Report epoch-aware readiness for all workers (#1426)
  • node: Use a read lock when starting batch builders (#1429)
  • node: Stop inactive committee members from sealing unreportable batches (#1523)
  • worker: Record batch metrics only after the primary accepts the report (#1520)
  • node: Tolerate peerless worker lanes at epoch startup (#1424)
  • node: Recover orphaned batches across worker-count changes (#1423)
  • node: Deactivate removed worker RPC servers (#1422)
  • batch-builder: Evict transactions exceeding batch limits (#1412)
  • tn-reth: Reject RPC state below restored snapshots (#1457)
  • node: Bind worker 0 RPC before startup synchronization (#1419)
  • keytool: Configure RPC endpoints for all workers (#1428)
  • types: Declare test utility dependency features (#1413)

Performance

  • network: Profile QUIC key exchange and retain provider defaults (#1451)

Refactoring

  • node: Build RPC node info per worker (#1430)
  • cli: Remove deprecated observer flag (#1417)

Documentation

  • network: Record early identity refusal decision (#1450)
  • Define carried transport patch maintenance (#1446)
  • tn-reth: Explain epoch base fee update ordering (#1425)
  • Evidence-based hardware requirements for validators and observers (#1441)

Tests

  • node: Shorten cold-genesis peer readiness waits (#1491)
  • e2e: Drop the removed –observer flag from the second-worker observer test (#1525)
  • Cover multi-worker isolation and execution (#1421)
  • Make fork fixtures reproducible (#1414)

Build, CI and chores

  • Re-pin the QUIC handshake profile and make pin drift block merges (#1582)
  • Qualify carried QUIC patch maintenance (#1462)
  • Harden the attestation gate, pin actions by SHA, move rust-cache to v2.9.2 (#1461)
  • Restore warmed Rust caches and skip nested submodules (#1445)

Batched merges

  • Staging/mavenrain 2026 10 07 (#1621)
    • fix(node): expose recoverable readiness for every network swarm (#1492)
    • fix(network-libp2p): account for inbound listen failures (#1494)
    • fix(network): scope peer scoring to network instances (#1498)
    • test(node): cover multi-worker shrink and CVV startup (#1427)
    • ci: complete QUIC Retry and release qualification coverage (#1449)
    • fix(network): retrieve current peer records on reconnect (#1499)
  • Staging/mavenrain 2026 10 06 (#1592)
    • fix(network-libp2p): account for inbound listen failures (#1494)
    • fix(network): scope peer scoring to network instances (#1498)
    • test(node): cover multi-worker shrink and CVV startup (#1427)
    • ci: complete QUIC Retry and release qualification coverage (#1449)
    • fix(network): release empty connection-limit peer entries (#1496)
    • feat(network): separate listen and advertised endpoints (#1500)

Merged from private forks

  • Merge commit from fork
    • fix(types): reject committees with fewer than two authorities on decode
    • test(storage): reject single-authority committee meta on stream import
    • fix(node): report the committee file decode error at startup
  • Merge commit from fork
    • Reopening an epoch pack compared the whole on-disk epoch meta with the chain-derived one, committee included.
  • Merge commit from fork
    • fix(network-libp2p): bound pending inbound connections per swarm
    • fix(network-libp2p): make pending inbound cap a memory-only bound
  • Merge commit from fork
    • test(network): add QUIC ingress qualification tooling
    • test(network): address QUIC qualification review feedback
  • Merge commit from fork
    • test(network-libp2p): measure QUIC accept-lock contention (GHSA-5pxp)
    • test(network-libp2p): address contention harness review
  • Merge commit from fork
    • Carry a small patch on libp2p-quic 0.14.0 so that the listener answers
  • Merge commit from fork
    • The swarm stream spends no tokio coop budget. Since tokio 1.44 the

Other

  • Operator docs backlog (#1573)
  • Implements an mmap backend for pack files and benches against direct IO. (#1269)
  • Harden subsecond block times (#1533)
  • Updated test harness for certifier tests (#662)
  • Sub-second consensus timestamps with a seconds-granularity EVM (#1453)
  • Keep cold-genesis validators alive without peers (#1418)
  • Node record discovery (#1416)

[v0.15.0-adiri] - 2026-09-23

Features

  • node: Start all committee workers each epoch (#1390)
  • network: Configure bootstrap peers via YAML and CLI (#1364)
  • node,config,network-libp2p: Per-worker network swarms (#555, PR 2) (#1315)
  • engine: Flag cross-producer transaction re-packing during execution (#1259) (#1268)
  • tn-reth: Draw epoch-close committees region-aware behind a fork gate (#1279) (#1294)
  • consensus,config,network-types: Per-worker LocalNetwork seam (#556, PR 3) (#1267)
  • config,types: Multi-worker configuration foundation (#554, PR 1) (#1219)

Bug fixes

  • txpool: Move canonical update preparation off async threads (#1386)
  • network-libp2p: Derive KadStore::node_key from raw BLS key bytes (#1331) (#1368)
  • tn-reth: Retry forwards after missing inclusion (#1372)
  • node: Validate primary key and correct worker listener identity (#1392)
  • node: Sync epoch records before the first epoch (#1387)
  • node: Derive node role from committee membership (#1385)
  • network: Refresh published node records (#1371)
  • tn-reth: Propagate RPC transaction pool batch size (#1370)
  • tn-reth: Honor transaction pool limits and lifetime (#1345)
  • network-libp2p: Late-joining nodes never learn committee JSON-RPC endpoints (#1389)
  • txpool: Offload batch builds and canonical updates (#1344)
  • network: Wait for established peers during epoch startup (#1361)
  • node: Start epoch pack workers before filling request queue (#1363)
  • node: Add opt-in epoch export retention (#1346) (#1347)
  • node: Seed startup mode from epoch records (#1362)
  • batch-builder: Defer transactions already packed by a peer batch (#1329) (#1330)
  • network: Split kad PutRecord shed threshold from the penalty threshold (#1289) (#1299)
  • node: Validate per-worker network keys and addresses (#1343)
  • node: Keep bootstrap servers out of epoch committees (#1359)
  • network: Sweep expired per-source rate windows at heartbeat (#1290) (#1300)
  • node: Tolerate governance worker-count changes at epoch entry (#1342)
  • tn-reth: Re-arm the residual dirty-sender reload between canonical notifications (#1316)
  • batch-builder: Skip empty batch proposals (#1341)
  • tn-reth: Price blsVerify on the raw calldata length before the decode (#1332) (#1333)
  • metrics: Count inbound sync stream shedding by reason (#1307) (#1317)
  • tn-reth: Floor snapshot-scaffold heights out of the canonical execution check (#1325)
  • node: Stop the restore-time RecentBlocks scan at the real-header floor (#1324)
  • prevrandao: Bring the seed fork up to its siblings’ rollout scaffolding (#1319)
  • primary: Bound the shed-task fan-out for denied inbound sync streams (#1308) (#1318)
  • tn-reth: Quote and fill RPC fee fields from the epoch base fee (#1305, #1313) (#1312)
  • tn-reth: Derive per-worker RPC/IPC endpoints in start_rpc (#1287) (#1298)
  • tn-reth: Reject value-bearing calls to the BLS precompile (#1286) (#1297)
  • primary: Key intra-round commit order on the leader digest behind a fork gate (#1260) (#1270)
  • Resolve eth_feeHistory base fee per query instead of pinning a container clone (#1295)
  • tn-reth: Shuffle the forward fallback dial order per forward (#1277) (#1291)
  • tn-reth: Splice tmp-chain deployed code into genesis to keep EIP712 immutables (#1278) (#1288)
  • tn-reth: Cap forwarder RPC response reads and clamp remote reasons (#1275) (#1280)
  • tn-reth: Label the skipped-invalid-transaction metric by error kind (#1284) (#1296)
  • tn-reth: Pass the base fee container in the IPC transport test (#1326)
  • Source worker pool base fee from the per-worker container (#1273)
  • engine: Drop the cumulative trie overlay from built blocks (#1266) (#1276)
  • engine: Credit batch priority fees to the producer beneficiary (#1222) (#1224)
  • worker: Bound the shed-task fan-out for denied inbound sync streams (#1254) (#1265)
  • batch-builder: Size batches by encoded bytes, not InMemorySize (#1255)
  • network: Bound discovery inserts at max_discovery_peers (#1252) (#1261)
  • network: Bound peer-exchange discovery sampling to the missing target (#1253) (#1258)
  • engine: Derive PREVRANDAO from the epoch seed chain behind a fork gate (#1247) (#1249)
  • primary: Bound the unreadable-frame sync bail close with a timeout (#1250) (#1257)
  • network: Cap a peer’s observed connection IP set (#1251) (#1256)
  • tn-reth: Run reth’s storage consistency check at startup (#1238) (#1246)
  • tn-reth: Detect canon-state broadcast lag in pool maintenance and resync drifted senders (#1243)
  • storage: Fail open_append on an unreadable first pack record (#1226)
  • tn-reth: Default the RPC pending block kind to none (#1231) (#1237)
  • tn-reth: Pass the base-fee argument in the eth_syncing rpc test (#1283) (#1285)
  • engine: Log skipped duplicate transactions at debug with the tx hash (#1263) (#1274)
  • cli: Reject –instance 0 at parse time (#1233) (#1234)
  • tn-reth: Answer eth_syncing from consensus catch-up state (#1231) (#1232)
  • network: Cap a kad provider record’s address list (#1221)
  • tn-reth: Serve eth_feeHistory’s next-block base fee from the epoch schedule (#1231) (#1235)
  • tn-reth: Gate blsVerify on the O(1) gas floor before decoding calldata (#1215)
  • tn-reth: Refuse DELEGATECALL/CALLCODE frames in the TEL precompile dispatcher (#1214)
  • network: Gate kad provider capacity check on new keys only (#1202)
  • snapshot: Enforce the BLOCKHASH lookback floor on restore windows and packs (#1181)
  • Enforce –rpc.txfeecap on RPC transaction submission (#1176)
  • tn-reth: Hold a forwarded tx rejection until a second validator confirms it (#1175)
  • tn-reth: Enforce payability in the TEL precompile dispatcher (#1201)
  • tn-reth: Pin the blob gas price in evm_env to match block execution (#1208)
  • batch-builder: Carry real sender balance in optimistic pool update (#1170)
  • worker: Close the observer transaction loss residuals behind forward admission (#1153)
  • tn-reth: Use saturating_sub for unused_gas in calculate_gas_penalty (#1184)
  • network-libp2p: Cap per-entry multiaddrs on discovery ingest (#1194)

Performance

  • engine: Compact cumulative trie overlays geometrically (#1382)
  • batch-builder: Reuse pending count for build gate (#1391)
  • batch-builder: Read sender balances through one state provider (#1303) (#1306)

Refactoring

  • node: Hoist network bring-up before the epoch loop (#1360)
  • Remove validator regions and the region-shuffle fork gate (#1328)
  • worker: Extract shed_sync_stream generic over the stream (#1314) (#1322)

Documentation

  • evm: Document and surface the gas over-reservation penalty (#1186)

Tests

  • e2e: Align eject_restart with intended ejection semantics (#1271)
  • e2e: Deflake future-committee seating budget accounting (#1204)

Build, CI and chores

  • Build(deps): bump quinn-proto from 0.11.14 to 0.11.18 (#1393)
  • deps: Bump libp2p-quic from 0.13.0 to 0.13.1 (#1394)
  • Run the PR checks on merge_group so main can use a merge queue (#1293)

Merged from private forks

  • Merge commit from fork
  • Merge commit from fork
    • fix(network): decouple KAD identity confirmation from storage
    • fix(network): confirm peers before Kademlia store writes
  • Merge commit from fork
    • fix(network): rate-limit inbound kad AddProvider and throttle provider eviction scan
    • fix(network): preserve KAD rate limits across reconnects
  • Merge commit from fork
    • fix(types): redact the private key in BlsKeypair’s Debug output
    • test(types,config): strengthen the Debug-redaction regression tests
  • Merge commit from fork
    • fix(config): zeroize transient BLS key material in the wrap/unwrap path
    • fix(config): close the remaining key-material cleanup gaps from review
  • Merge commit from fork
    • fix(types): bound roaring bitmap container count at deserialization
    • refactor(types,primary): share one roaring header parser across crates
    • fix(tn-reth): pass the base-fee container in the IPC transport test
  • Merge commit from fork
    • fix(reth): drop debug and trace from what --http.api all enables
    • fix(reth): apply review findings to the RPC module allowlist
  • Merge commit from fork
    • fix(gateway): read the raw-transaction screen’s fields without a full parse
    • fix(gateway): skip the id during screening; recover it only on rejection
  • Merge commit from fork
    • fix(config): create BLS key files and node-keys dir owner-only
    • fix(config): close the review gaps in the owner-only key permissions
  • Merge commit from fork
    • A NodeRecord signature currently covers only the advertised NetworkInfo
  • Merge commit from fork
    • Every inbound kad PutRecord ran a BLS signature verify and, for a newer
  • Merge commit from fork
    • read_sync_batches bounds each response frame with BATCH_STREAM_TIMEOUT

Other

  • Arm adiri forks (#1442)
  • Migrate adiri’s Safe stack to the canonical v1.4.1 suite at a fork boundary (#1410)
  • Update to libp2p v0.57.0 (#1408)
  • Update network docs (#1369)
  • Update docs, tests, and tools for prevrandao adiri fork (#1311)
  • Refactor the epoch vote certifier code. (#1309)
  • TEL precompile follow-ups: event mirror, harness fidelity, rejection gas (#1240)
  • Refactor the epoch vote certification code. (#1230)
  • Surface ConsensusRegistry logs from epoch-boundary system calls (#1220)
  • Tn docs (#1241)
  • Tighten epoch vote gossip to only allow votes for expected EpochRecords. (#1217)
  • Added some comparative benchmarks for cache DB backends. (#1142)
  • Don’t verify the parent hash for consensus block 1- no need and its subject to change. (#1207)

[v0.14.0-adiri] - 2026-08-19

Bug fixes

  • storage: Enforce STORAGE_CHUNK_SLOTS on read and write paths (#1192)
  • tn-reth: Rotate the observer forward fallback dial order (#1180)
  • tn-reth: Seed reth’s process-global RPC defaults and disable IPC for temp chains (#1172)
  • tn-reth: Try the next validator on node-local -32000 refusals (#1171)
  • node: Re-vote stored-but-uncertified epoch record on startup (#1203)
  • tn-reth: Reject blob and set-code txns at pool admission (#1159) (#1169)
  • storage: Sync the write-behind remove in test_remove before the read-back (#1200)
  • storage: Latch the first background write failure, not the last (#1150)
  • metrics: Count transaction forwarding drops by reason (#1146)

Tests

  • storage: Add TN_TEST_MDBX_SYNC runtime override and scheduled Durable e2e lane (#1152)
  • e2e: Cut eject restart test runtime by about 36% (#1151)

Build, CI and chores

  • submodule: Bump tn-contracts to 0fb6b01 and regenerate mainnet chain-configs (#1206)

Other

  • Arm consensus registry fork 407 (#1157)
  • Add a test to codify and confirm that network events are not lost between epochs. (#1216)
  • Close a race in the basefee restart e2e test. (#1209)
  • Do not require certification for an epoch record when starting a new epoch. (#1196)

[v0.13.0-adiri] - 2026-08-12

Features

  • types: Set SEED_SIGNATURE_FORK_EPOCH to 380 for adiri (#1118)
  • worker: Surface a stalled batch fetch with a rate-limited warning (#1035)
  • worker-gateway: Observability and deployment (#712) (#972)
  • network: Delete frozen legacy request-response variants, bump req-res to /0.0.2 (739) (#970)
  • network: Freeze and delete the legacy /tn-stream bulk path (739, step 9c) (#939)
  • worker-gateway: Edge protections (rate/size limits, tx screening) (#712) (#908)
  • network: Cut the primary partial epoch-pack path over to the typed sync protocol with legacy fallback (739) (#884)
  • tn-reth: Expand RethEnv read API for ExEx consumers (#850)
  • network: Move the goodbye exchange to a dedicated peer-exchange protocol (739, step 8) (#825)
  • node: Sync GasAccumulator worker count from on-chain WorkerConfigs (#846)
  • node: Activate per-worker base fees from WorkerConfigs (#844)
  • node: Restore base fee per worker on catchup (#842)
  • node: Seed base fee from chain on sync/restart instead of recomputing (#840)
  • node: Wire EIP-1559 base-fee adjustment with an inert u64::MAX target (#796)
  • batch-validator: Take a u64 base-fee snapshot (#794)
  • network: Cut the primary MissingCertificates path fully over to the typed sync protocol (739, step 7) (#811)
  • Feat(network): drop the legacy full-pack sync fallback (739) (#810)
  • node: Source worker pool base fee from the gas accumulator (#792)
  • Feat(node): per-worker readiness endpoint at GET /health/workers (#712) (#798)
  • network: Cut the primary epoch-pack path over to the typed sync protocol with legacy fallback (739, step 6) (#797)
  • Feat(network): cut the worker batch path over to the typed sync protocol with legacy fallback (739, step 5) (#781)
  • network: Typed sync-frame layer registered alongside /tn-stream (739, step 4) (#768)

Bug fixes

  • tn-reth: Use TN’s DEFAULT_IPC_ENDPOINT in RpcServerArgs::default() (#1164)
  • tn-reth: Apply node_config.rpc.eth_config() when building the EthApi (#1161)
  • worker: Keep observer txs pooled when a batch forward is refused (#1144)
  • storage: Report a queued save failure from CertificatePack flush replies (#1138) (#1143)
  • types: Add one-shot ShutdownNotifier so a subscribe after notify resolves (#1141)
  • network-libp2p: Issue at most one in-flight kad query per missing authority (#1140)
  • tn-reth: Enforce the restored-state floor in read_only_state_db (#1137)
  • tn-reth: Enforce the archive-mode assumption behind pinned registry reads (#1060)
  • storage: Surface consensus-store read failures instead of collapsing them to “not found” (#1083)
  • config: Refuse an unset basefee_address at the production entry points (#1115)
  • tn-reth: Refuse pinned reads below the restored-state floor (#1105) (#1131)
  • tn-reth: Refuse non-public dial targets in observer transaction forwarding (#1114)
  • cli: Verify the epoch-record certificate chain before the state import (#1085)
  • node: Restrict stale temp-export sweep to epoch-{N}.tmp directories (#1099)
  • tn-reth: Bound state-pack export memory with streamed storage chunks (#1112)
  • worker-gateway: Key per-IP rate limit buckets on a network prefix (#956) (#1096)
  • consensus: Round-bound canonical epoch-close seed chain (#1032) (#1062)
  • engine: Roll back the in-memory advance and classify provider faults when the output persist fails (#1110)
  • types: Clamp current_base_fee before alloy’s unchecked fee-increase add (#1108) (#1111)
  • tn-reth: Reject state-mutating TEL precompile selectors under STATICCALL (#1107)
  • storage: Report a queued write failure from EpochRecordDb::persist (#1065) (#1094)
  • epoch: Classify and retry provider faults on epoch-record and epoch-entry committee reads (#1025)
  • worker-gateway: Bound response-body streaming against slow-reading clients (#1055)
  • tn-rpc: Run the proofOfPossessionMessage BLS decompress off the shared runtime (#1058)
  • consensus: Fail-stop on epoch-DB commit error to prevent self-equivocation (#975) (#979)
  • node: Import PrimaryNode in close_epoch (#1071)
  • network-libp2p: Cap concurrent established connections per peer (#1010) (#1029)
  • epoch: Drop the debug_assert shadowing the close-time identity guard (#1026)
  • engine: Hard-error on undecodable BLS keys in the pinned committee read (#1022)
  • epoch: Write and persist the epoch record on replay-and-close and leftover-drain paths (#1021)
  • network-libp2p: Saturate KadStore counter decrements to prevent underflow wedge (#1005) (#1013)
  • network-libp2p: Bound the temporarily-banned peer cache with a size cap (#1023)
  • config: Validate ScoreConfig at startup to prevent a late clamp panic (#1014)
  • network-libp2p: Gate inbound Kademlia AddProvider on peer ban status\nCloses #1001. (#1011)
  • network-kad: Tolerate undecodable kad provider rows (#999) (#1004)
  • network-libp2p: Carry worse reputation across anonymous-inbound merge (#998) (#1002)
  • consensus/executor: Fail-stop the graceful-shutdown drain on a batch-fetch Err (#1000)
  • engine: Roll back in-memory canonical advance on mid-output block failure (#995)
  • config: Reject consensus params below their operational floors (#994)
  • execution: Commit the finalized/safe markers atomically with the blocks (#987)
  • consensus: Close the two anti-equivocation guards #940 left non-durable (#963) (#964)
  • epoch: Anchor recovered epoch records to the locally-trusted committee (#937)
  • Restrict consensus-output and epoch-vote gossip to committee publishers (#912) (#927)
  • Floor the parent-round GC key in insert_pending to avoid a round-0 underflow (#953)
  • consensus: Make anti-equivocation records durable before externalizing (#940)
  • worker: Back off batch fetch retries with no connected worker peers (#865) (#944)
  • node: Keep the healthcheck accept loop alive across transient accept errors (#945)
  • worker: Validate gossip-prefetched batches before caching (#933) (#938)
  • state-sync: Request missing range from peers on observer catch-up stall (#882)
  • consensus/network: Gate gossip cheap-first and set explicit per-topic publisher policy (#898) (#929)
  • consensus: Make the consensus-output batch-count bound symmetric across writer and reader (#902)
  • Charge signed gossip content faults to the author, not the relayer (#889)
  • Enforce the gossip size bound as a protocol constant on both paths (#872) (#892)
  • Reject round-0 headers on the vote path to avoid header.round() - 1 underflow (#888)
  • network-libp2p: Bound published_to_peers with an LRU (#856)
  • engine: Bound the consensus-output execution backlog (#880)
  • primary: Cap sync_output and ExEx broadcast channels (#878)
  • network-libp2p: Prune zero-count banned_peers_by_ip keys (#829) (#860)
  • network-libp2p: Bound known_peers against unbounded peer injection (#827) (#857)
  • network: Attribute gossip faults to the accountable peer across the reject, worker, and primary paths (#819) (#824)
  • primary: Out-of-bounds peer index when logging invalid fetched certs (#826)
  • Stop remove_validator_ip from over-decrementing banned total (#809) (#818)
  • Return error instead of panicking on non-validator vote path (#815)
  • Fix(primary): report peer penalties for failed vote requests (#802) (#814)
  • Fix(worker): do not ban gossip relayer for author-content faults (#812)
  • Evict oldest bans/disconnects on overflow, not newest (#799) (#807)
  • Fix broken worker network test - merge order issue (#816)
  • Fix(network): surface the real DialError to the dialer instead of a hardcoded timeout (#745) (#786)
  • network: Deliver accepted gossip when relayer BLS unresolved (#785)
  • Fix(primary): clear a pre-existing never_loop lint and a broken doc link (#784)
  • network: Do not penalize UnsupportedProtocols; guard against self-dial/self-penalty (#777) (#780)
  • worker: Retry transient RPC errors instead of treating them as rejections (#747) (#778)
  • network: Recover partial peers from GetClosestPeers query timeouts (#744) (#758)
  • network-libp2p: Make operator-set peer-scoring thresholds take effect (#760)
  • Fix(network): handle unresolved peer identity in gossip and response paths (#743) (#754)

Performance

  • storage: Bound per-boundary state-export work (#1078) (#1087)
  • primary: Resolve remaining #822 review findings (missing-certs sync) (#886)

Refactoring

  • engine: Split the epoch boundary into three system calls (#1012)
  • storage: Converge persist and persist_durable into one durable barrier (#962) (#977)
  • network-libp2p: Box Gossip payload, drop large_enum_variant allow (#881) (#974)
  • Push non-validator txns to committee via RPC instead of gossip (#820)
  • cli: Extract BLS passphrase handling into telcoin-network-cli (#848)
  • Replace hand-rolled Future impls with async fns (#808)
  • network: Harden the /tn-stream behaviour (739, step 3) (#750)
  • network: Own ResponseChannel and outbound-failure types (739) (#749)

Documentation

  • consensus: Evaluate reputation schedule reset and byzantine impact (#942) (#983)
  • Correct stale epoch, base-fee and hash references; drop dead topic constants (#1064)
  • engine: Explain why reward accounting is advanced before finalization (#1033)

Tests

  • e2e: Cut state export fee test runtime by about 36% (#1126)
  • e2e: End the post-transfer idle wait in the eject tests (#1117)
  • e2e: Speed up basefee boundary-kill test by ~30% (#1119) (#1120)
  • e2e: Run the eject mid-epoch test on 6 second epochs (#1124)
  • storage: Run shared-batch consensus_pack tests across the adiri dup-batch cutoff (#1130)
  • Pin the zero-word entry fee of the adiri pre-fork epoch close (#1129)
  • engine: Pin the UnknownAuthority fail-stop for the empty epoch-closing beneficiary lookup (#1037)
  • storage: Open test-build MDBX envs in SafeNoSync to drop hot-path fsync (#917) (#982)
  • metrics: Pin the sync-distance gauge trio and certificates_formed_total by name (#1039)
  • e2e: Collapse the redundant warm-up epoch in the mid-epoch-restart eject test (#1009)
  • e2e: Speed up the three heaviest ignored tests (#978) (#990)
  • Build the e2e node binary under an opt-level-2 profile (#916) (#980)
  • storage: Open the epoch data file, not the directory, in test_consensus_pack (#965)
  • Lower e2e round cadence and expose max_batch_delay genesis flag (#946)
  • Test(e2e): floor the epoch-boundary cert deadline above the new-validator quorum window (#936)
  • node: Heal the finalized marker before mid-run accumulator catchup (#947)
  • Test(e2e): cut base-fee e2e runtime via a decoupled epoch-duration cut (#907) (#920)
  • Replace fixed real-time sleeps with condition polling (shared wait_until) (#923)
  • Reuse the prebuilt e2e node binary on every path, not only make (#926) (#928)
  • Cut targeted suite runtime by memoizing fixtures and sharing crypto contexts (#899)
  • Fix faucet e2e ABI + precompile drift via generated bindings (#863) (#885)
  • e2e: Cut runtime of the four ignored e2e tests (#897) (#900)
  • Reserve test ports from per-nextest-slot windows (#830) (#861)
  • Remove wall-clock timing assumptions from test_fetch_cancellation_on_success (#864)
  • Use an injectable clock for BannedPeerCache expiry tests (#862)
  • network-libp2p: Replace fixed real-time sleeps in network_tests with condition polling (#859)
  • Drive test_all_possible_error_outcomes off the rebuild ordering instead of sleep(1s) (#855)
  • Add persistence barrier before iterating in db_simp_bench (#831) (#854)

Build, CI and chores

  • e2e: Derive the e2e –target-dir from CARGO_TARGET_DIR instead of hardcoding it (#1127)
  • deps: Gate rocksdb out of the default build (closes #941) (#948)
  • Build/dev profile compile speedups (#913)
  • Forward adiri feature to tn-types/adiri in storage, engine, executor (#858)
  • Chore(ci): raise e2e slow-timeout period from 120s to 720s (#761)

Merged from private forks

  • Merge commit from fork
    • fix(tn-reth): bound observer forward tasks by count and lifetime
    • fix(tn-reth): count forward outcomes individually, address review nits
  • Merge commit from fork
    • The PrimaryRequest::EpochRecord request-response arm spawned one detached
  • Merge commit from fork
    • test_epoch_vote_non_committee_rejected_before_verify: a non-committee vote for
    • test_epoch_vote_unknown_epoch_dropped_before_verify: an unknown-epoch garbage
    • test_epoch_vote_valid_committee_member_forwarded: a validly signed committee
  • Merge commit from fork
    • The MAX_CONSENSUS_CERTS cap added for GHSA-2r5c-c4h7-gp5h bounds the memory of
  • Merge commit from fork
    • A non-committee observer could inflate a node’s per-peer multiaddr set
  • Merge commit from fork
    • fix(network): count only observed connection IPs toward the per-IP ban
    • test(network): make GHSA-6qcj regression tests deterministic and add observed-IP positive control
  • Merge commit from fork
    • A worker processes each batch-digest gossip in its own spawned task and, on a
  • Merge commit from fork
    • read_and_validate_batches_with_timeout wraps every per-batch read in
  • Merge commit from fork
    • Kademlia runs with StoreInserts::FilterBoth, so libp2p never stores an inbound
  • Merge commit from fork
    • The per-peer batch-stream cap (MAX_PENDING_REQUESTS_PER_PEER) summed a peer’s
  • Merge commit from fork
    • remove test-utils cfg and replace with hard test-labelled const
    • add test-utils feat on cli for e2e tests to use insecure pbkdf2 rounds
    • use new approach for tests - update docs
  • Merge commit from fork
    • fix(primary): bound skip-round cardinality in get_bounds (remote OOM)
    • fix(primary): bound skip_rounds entry count by committee size
  • Merge commit from fork
    • read_and_validate_batches_with_timeout (the legacy batch-sync reader) read the
  • Merge commit from fork
    • Two inbound-stream handlers in the worker network held the global batch-stream
  • Merge commit from fork
    • MissingCertificatesRequest::get_bounds deserialized each peer-supplied
  • Merge commit from fork
    • consensus_certs tallies the committee signatures gossiped for each consensus

Other

  • Set signature seed fork boundary to adiri epoch 383 (#1163)
  • Regenerate mainnet genesis with post-fork registry runtime (#1097)
  • Enforce a batch transaction-type allowlist symmetrically across gateway, builder, and validator (#1104)
  • End the epoch-record waits with a lookup at the deadline (#1098)
  • Propagate non-NotFound remove_file failures in write_bounded_pack (#1088)
  • Docs and tests for the engine/epoch code, plus two bugs the effort surfaced (#1109)
  • Instrument the gas the epoch-boundary system calls spend (#1061)
  • Read entered-epoch base fees from chain instead of re-deriving them (#1103)
  • Refuse a faucet-compiled binary on canonical Telcoin mainnet (#1095)
  • Tn 942 prng pin (#1093)
  • Canonical-DB fallback for wait_for_execution ring miss (#1036) (#1038)
  • Write next-epoch worker base fees to WorkerConfigs at epoch close (#1101)
  • Tn-reth epoch-boundary hardening sweep (#1072)
  • Offload state-export fs work to tokio’s blocking pool (#1081)
  • Saturate reward_beneficiary fee credits to match reimburse_caller (#1047)
  • Gate worker batch-digest gossip subscription on node mode (#1057)
  • Recover the JSON-RPC id without building a Value (#1054)
  • Meter blsVerify by message length and cap it (#1051)
  • Harden always-active assert/expect panics on the commit hot path and startup recovery (defense-in-depth) (#1049)
  • Check parent-hash linkage across the snapshot header window (#1077)
  • Fuse ReplayStream on the first replay error (#1059)
  • Epoch read docs and consolidation (#1024)
  • Add CLI option to import an exported exec block/state. (#985)
  • Tn reth reorg (#1069)
  • Add a cli option and hook up the code to export exec state at the end of every epoch when enabled. (#973)
  • Count transactions dropped during block building (#1056)
  • Seed reth’s txpool defaults so an explicit –txpool.max-account-slots 16 is honored (#1053)
  • Make TNExecution’s never-driven validators fail loudly. Closes #1048. (#1052)
  • Reject undersized committee before building concludeEpoch calldata (#1045)
  • Preserve FinishedHeight reporting on the replay_and_subscribe path (#988)
  • Add reth code to export to or import from new exec state pack. (#969)
  • Add a pack file to store execution state at a specific block (the state tree). (#967)
  • Makefile devnet build (#966)
  • Bound stream-merge starvation with a round-robin schedule (#992) (#997)
  • Guard ExEx manager against empty canonical chains (#991) (#996)
  • Fast-fail unsatisfiable certificate fetch (#866) (#971)
  • Pin epoch-entry reads to the previous epoch’s closing block (#952)
  • Finish the wait_until migration for eject/epoch e2e helpers (#951)
  • Use new pack format to avoid issues with a malicious peer. (#932)
  • Backpressure when engine channel full instead of dropping output (#925)
  • Tolerate mid-epoch validator ejection in epoch records (#922)
  • Add the pack bytes number to gossiped consensus results. (#817)
  • Harden known peers restore (#906)
  • Save consensus in pack files with the header then the batches instead of batches then the header. (#893)
  • Retrieve validator RPCs instead of all known-peer RPCs (#904)
  • Storage memory management (#876)
  • Cut the primary consensus-output path fully over to the typed sync protocol (739) (#895)
  • Limit reth MDBX sizes for temp-chain tests (#911)
  • Fork consensus registry bls precompile (#868)
  • (feat) CLI keytool set rpc (#837)
  • Catchup finalized watermark inconsistency on restart (#891)
  • Feat/basefee 08 e2e (#852)
  • feat(worker-gateway): stateless reverse proxy crate skeleton + proxy core (#712) (#823)

  • Use the pack consensus output bytes for sync. (#813)
  • Generic BLS verify precompile (reusable beyond proof-of-possession) (#759)
  • Bump tn-contracts submodule (#107 -> #123): per-network deployments + genesis.rs repoint (#752)
  • Synchronize() errored on every call that had to fetch a batch from a peer. (#806)
  • This uses partial pack downloads to speed up intra-epoch syncing. (#790)
  • Hardening patches for consensus chain. (#787)
  • Route genesis PoP through the BLS precompile and adopt the integration ConsensusRegistry ABI (#732)
  • Add keytool generate pop for execution-address rotation (#775)
  • Exex2 (#770)
  • Allow partial pack file streaming. (#783)
  • Native BLS proof-of-possession precompile at 0x…b151 (#731)
  • Make sure to only count a consensus sig once per validator. (#779)
  • Incorporate the chain id into every libp2p protocol string and gossip topic (#772)
  • Add server side calls to retrieve consensus bytes for an entire ConsensusOutput. (#773)
  • Results of scan of consensus chain code. (#771)
  • Db debug tool command (#734)
  • Feature - Enable DB Stats Usage (#751)
  • A litte more time before adiri fork. (#766)
  • Result of iterating on core pack file code with Claude. (#762)
  • Serialize epoch pack install against epoch transition (#764)
  • Metrics (#733)
  • Breakdown epoch manager (#737)
  • Reduce the default hash index size (buckets). (#757)
  • Make sure we can not save consensus to the wrong epoch pack file. (#756)
  • Use saturating sub when collecting epoch records and going back one. (#755)
  • Bound codec decode buffers to delivered bytes (#742)
  • Re-key bls_by_peer_id on network-key rotation (#740)
  • Fix two critical/high issues found with a scan. (#748)
  • Separate operator trust from committee (validator) trust on Peer (715) (#720)
  • Peer rpc info (#730)
  • Index so we can access all the bytes (batches plus consensus header) for consensus output in a pack file. (#741)
  • Epoch Info RPC (#736)
  • Use specific types for specific digests. (#724)
  • Track previous/current/next committees in the network layer (#707)
  • Add maintainers to github actions (#727)

[v0.10.0-adiri] - 2026-06-09

Features

  • Stream worker batches (#571)
  • CLI for Staking Info (#546)
  • Observer diagnostics, sync-aware healthcheck and e2e tests (#542)
  • engine: Skip EVM execution for empty non-epoch-closing output (#535)
  • consensus: Make channel send no-op when no receiver subscribed (#534)
  • tn-reth: Parallelize transaction recovery with rayon (#533)

Bug fixes

  • Fix banned peer logic to reduce log flapping (#688)
  • Correct transposed UDP port values in .env.example (#670)
  • Fix sporadic docker build failures - removes stale .cargo-ok files from the registry cache before running cargo build (#617)
  • types: Handle broadcast channel lag instead of silently dropping observers (#541)
  • ci: Align cache-deps env vars with pr workflow (#537)
  • batch-builder: Reset interval after non-fatal error to prevent spurious re-proposals (#538)
  • Fix JSON serialization for tn_latestHeader RPC (#375) (#519)

Refactoring

  • committee: Enforce equal voting power across authorities (#560)
  • Catchup Accumulator (#544)
  • consensus: Replace watch send() with send_replace() and remove stored receivers (#529) (#536)
  • Remove monitored_future, monitored_scope, and related code (#518)

Tests

  • Extend test coverage (#522)

Build, CI and chores

  • Upgrade reth v1.11.3 (#578)
  • submodule: Use HTTPS URL for tn-contracts (#550)

Other

  • Separate protocols for primary and worker (by id) (#726)
  • Preemptive refactors for future sync. (#723)
  • Key AllPeers by domain identity instead of libp2p PeerId. (#716)
  • Pass RethEnv to rpc for expanding rpc calls - replace redundant chainspec field (#721)
  • Security and performance fixes for sync. (#718)
  • This should address the missing pack files (never retrieved) found in testnet observer testing. (#711)
  • Make consensus headers cheap to clone. (#705)
  • Remove unused UpdateAuthorizedPublishers network command (#704)
  • Handle duplicate batch digests in a committed sub-DAG (#701)
  • Fixes some observer issues. (#699)
  • Add rpc tn_info. (#695)
  • Add ConsensusChainReader/Writer facet traits (#698)
  • Fix open_redb test helper for 3-arg CompositeDatabase::open. (#697)
  • Fsync parent directory after file create and rename in archive (#696)
  • Fix observer sync issue. (#692)
  • Reduce penalties to prevent ban cascades on WAN (#690)
  • Improve sync. (#684)
  • Use serde default to deserialize missing fields on network config (#686)
  • Always have bootstraps and dont crash on a network event error. (#681)
  • Remove an needed channel and task. (#678)
  • Kad improvements (#683)
  • Regression tests for observer epoch-0 sync + stale prior-epoch vote (#676)
  • Fix observers getting stuck on epoch 0. (#674)
  • Update adiri testnet chain config (#672)
  • Centralize rust version - update gh action to fix ci for public PRs (#665)
  • Final tn-contracts updates for adiri testnet (#671)
  • Store validator certs in a pack file for diagnostics. (#668)
  • Worker configs patch (#669)
  • Remove erc20 interface from TEL precompile (#667)
  • Add zstd compression to pack file records. (#661)
  • Validator bls key map (#663)
  • Worker configs (#656)
  • Fix a couple of edge cases from testing. (#659)
  • Use a dedicated table for published certs. (#652)
  • Fix download of epoch pack 0. (#655)
  • Validator region (#653)
  • Update worker network handle at epoch boundary (#650)
  • AI suggested race fix. (#648)
  • Fix race uncovered by restart failure. (#645)
  • Only store headers not entire certs in subdags. (#641)
  • Delay remaval from our batches cache until we are sure. (#643)
  • Tighten some of consensus chain data. (#639)
  • Fix task manager so handle task errors. (#635)
  • Clean up batch handling and possible race conditions. (#632)
  • Stream pack files for historic epoch data sync. (#630)
  • Validator node documentation (#628)
  • Cleaned up issues with batch caching. (#625)
  • Patch logic for advancing round with 0 delay for odd rounds - this only happens for even rounds when the node expects to be the leader (#626)
  • Worker network race condition (#613)
  • Remove spurious touches from system calls (#608)
  • Forward transactions based on address (#604)
  • Fix some restart issues. (#607)
  • Punish peers for bad consensus requests. (#603)
  • Update consensus round check (#602)
  • Epoch votes patch (#588)
  • Race condition on subscriber shutdown (#599)
  • Batch builder throughput (#596)
  • Patch for a restart test failure. (#597)
  • Fix race in vote equivocation code. (#594)
  • Return an error when fetching a batch and DB write fails- cause cleaner node shutdown. (#592)
  • Update adiri genesis v0.7.0-adiri (#595)
  • Update tn contracts (#585)
  • Return false when validating with no keys, add some tests. (#590)
  • Native TEL ERC20 precompile (#581)
  • Async epoch streams (#583)
  • Refactor manager. (#582)
  • Use pack files for epoch records. (#579)
  • Couple of restart test fixes. (#575)
  • PR feedback. (#574)
  • Add support for bulk storage of consensus data by epoch. (#510)
  • Stream behavior (#570)
  • Make codec functions pub (#569)
  • RethEnv inner arc (#549)
  • Remove old metrics (#524)
  • Update tests for GH runner (#527)
  • Update GitHub actions (#525)
  • Add helper methods to ConsensusBus (#516)
  • Fix a race that effected nodes catching up. (#514)

[v0.6.0-adiri] - 2026-01-12

Other

  • Update genesis with latest adiri deployment (#512)
  • Update tn-contracts submodule (#511)
  • Add quadratic scaling for gas limit penalty (#498)
  • Remove some gc round complexity. (#507)
  • Fixes for epoch tests. (#509)
  • WIP, need to NOT save all data in memory now that we have ever growing consesnsus chain data. (#501)
  • Fix some bugs in observer syncing and following. (#499)
  • Initial open telemetry hook up. (#487)
  • Task manager cert fetcher (#493)
  • Update faucet address (#492)
  • Log debug params on rpc calls (#497)
  • Remove unused total_fees var during batch execution (#495)
  • Read next committee size from state (#496)
  • Correct inverted logic to filter prev unknown ips for banned ips (#494)
  • Engine execution address empty output (#491)

[v0.5.0-adiri] - 2025-11-17

Bug fixes

  • Fix docker compose for local devnet (#488)
  • Fix tests - reinstating rand for committee to test determinism
  • Fix more tests - remove warnings for other crates outside tn-reth
  • Fix tests
  • Fix clippy nightly

Refactoring

  • Refactor genesis to use rethenv
  • Refactor tests after sporadic failure - remove printlns (#258)

Tests

  • Test-utils feature for pbkdf2 encryption rounds to prevent excessive time constraints during testing (#369)

Reverts

  • Revert “Allow the basefee address to be set on genesis.”

Other

  • Document running an adiri observer, fix small bug. (#489)
  • Update tn-contracts submodule (#486)
  • Healthcheck (#485)
  • Upgrade rust v1.91 (#483)
  • Tweaks to initial peer connections. (#481)
  • Tech debt (#482)
  • Support for Cloud Deployments (#371)
  • Remove parent hash and timestamp from batches and add epoch. (#480)
  • More stable restarts. (#479)
  • Use the parent timestamp for batch gas and size calls. (#478)
  • Finish up issue 297 (#477)
  • Fix worker network event loop. (#476)
  • Cantina 651: Cancel Vote Requests (#475)
  • Reject votes for rounds too far in future. (#471)
  • Cache local batches until they reach consensus. (#474)
  • Remove Validators PendingExit (#473)
  • Upgrade reth v1.8.2 (#469)
  • Cantina 244 (#466)
  • Update libp2p with official upstream (#467)
  • Re-working the leader schedule and swap tables. (#464)
  • Track kad queries (#465)
  • If the network chooses an epoch record other than yours use it. (#463)
  • Validate publisher peer id matches node record’s network key (#462)
  • Update subscribe for dependabot #14 (#461)
  • Node record external addr (#454)
  • Fix cert store delete. (#460)
  • Dont count duplicate kad records against our put limit. (#459)
  • Dont allow a bogus vote to derail the certifier. (#456)
  • Failing to already have or to fetch batches is a fatal error. (#458)
  • Break CommitteeFixture and related structs out of tn-test-utils. (#455)
  • Use a saturating sub call for a gas calc. (#453)
  • Cantina 1045: Finish trustless sync. (#378)
  • Cantina-244 Precursor: Kad uses Peer Manager (#383)
  • Cantina 3.1.15 (745): Ensure Reported Batch Req/Res from Committee Only (#382)
  • Cantina 3.1.4 (165): Quorum Waiter Calculations (#380)
  • Use procs instead of multiple tokio runtimes for a test that sometimes failed. (#381)
  • Fix a regression in test speed, don’t call test_genesis() in loops. (#379)
  • Cantina 3.1.17 - Block Beneficiary (#377)
  • Cantina 1045: Add Epoch records and certs to allow trustless syncing. (#359)
  • Use message size constraints for MissingCertificatesRequest and Missing Batches Request (#374)
  • Cantina 699: Move KAD into the main consensus DB. (#373)
  • Initial migration to an application life timed consensus bus. (#370)
  • Include Issuance contract as explicit precompile (#364)
  • Outbound Request Channels Race Condition (#372)
  • a: Calculate Batch::size (#367)
  • Closing Epoch Batch Index (#366)
  • Catchup Accumulator Rewards (#365)
  • Catchup accumulator blockHeight (#363)
  • Return error when gas limits overflow during batch validation (#362)
  • Sanitize requested max items before allocating memory for vec (#361)
  • Cantina 74 + 845 (#360)
  • Cantina-364, Do not allow base_fee_per_gas on Batches to be None. (#355)
  • Update iteration count for PBKDF2 encryption (#358)
  • Support bls precompiles (#354)
  • Cantina-340, make committee formation less brittle. (#356)
  • Remove abort on panics for release/dev cargo profiles (#357)
  • Update docs (#352)
  • Compose updates (#350)
  • Update testnet configs (#351)
  • Tweak epoch code to hopefully avoid some races. (#348)
  • Config readme (#335)
  • Batch builder readme (#332)
  • Fix local testnet script.
  • Epoch Boundary E2E Test (#344)
  • Add base-fee recipient
  • Make fmt
  • Make clippy
  • Use typed clap CLI API
  • Make clippy
  • Set base fee recipient and consensus registry owner to governance safe precompile by default
  • Update submodule commit
  • Add base fee recipient to test assertions
  • Add governance safe genesis precompile with TEL balance for gas
  • Added chain config readme.
  • Replace rpc lib and tweaks to restart tests.
  • Readme addition
  • Add the ability to add accounts at genesis from a yaml file.
  • PR feedback.
  • Connect block rewards to epoch closing system call.
  • Use multi addrs now instead of host/port settings for p2p.
  • Fix compile, broken non-conflicting merge.
  • Use correct specific network key for node records (#340)
  • Close epochs unit test (#336)
  • Network Configuration (#337)
  • Rework p2p network configs.
  • Shadow RPC cli options from Reth to only provide a subset.
  • Refactor CLI chain/genesis and remove old adiri for a new one.
  • Add a check to restart tests for basefee ditribution.
  • Batch validator readme (#333)
  • Move batch-builder and batch-validator out of execution dir (#331)
  • Sort validator array before close epoch - shuffle test passing (#330)
  • Put the basefee address in a global to work around Reth lib issues.
  • PR feedback- better accumulator sync.
  • PR (previous) feedback.
  • Update comment.
  • Update the base fee on sync.
  • Sync the gas accumulator on a restart.
  • Update tn contracts (#327)
  • Allow the basefee address to be set on genesis.
  • Upgrade reth (#319)
  • Fmt
  • Clippy
  • Cleanup reth and fix faucet test
  • Remove packages
  • Upgrade reth v1.4.8 - use rev key for libp2p - make test passing
  • Update secp256k1 to latest and remove rand_08
  • Compilation checkpoint - all methods impl
  • Commit to transfer to laptop due to power outage
  • Cleanup payload builder to reduce duplicate code
  • Tn-engine it tests passing
  • Combine payload builder branches
  • Process fully executed blocks to storage after consensus output execution
  • Update tests - fix workspace conflicts with rand - working through tn-reth tests
  • Compilation checkpoint
  • Major refactor - upgrade again to 1.4.7
  • Tn block execution ctx
  • Upgrade reth
  • Implement infrastructure for setting base fees per worker per epoch.
  • Rename ValidatorInfo and validator.yaml to reflect they are for a node not just a validator.
  • Allow the basefee address to be set on genesis.
  • PR feedback.
  • Blind faucet fixes.
  • Blind faucet fixes.
  • Blind faucet fixes.
  • Fixed faucet?
  • Allow chain id to be set from command line during chain commisioning.
  • Feedback and faucet fixes.
  • Got tests worxking again with new genesis ceremony.
  • Fix local testnet by cleaning up genesis.
  • Removed commented code.
  • Epoch Transition (#315)
  • Add a tn RPC namespace with a couple of functions, cleanup some human readable serde.
  • PR feedback.
  • Fixed a task restart on epoch rollover.
  • Epoch Dirs (#313)
  • Simplify the peer count.
  • Fill out some the RPC endoint data (issue 189).
  • Include non-critical tasks for task manager (#312)
  • Feedback, better empty task management.
  • Fix soem races in task namager.
  • Remove Rocks as a consensus DB backend option.
  • Disable Reth metrics, just our own metrics now.
  • Spawn all tasks through TaskManagers (#311)
  • Add a persistant kademlia store.
  • Keep engine alive across epochs (#310)
  • Remove unused code in consensus executor (#307)
  • Node records for peers (#293)
  • Remove Circular Deps fortest-utils (#305)
  • Update tn-contracts submodule to v1.0
  • Make fmt
  • Unused import
  • Roll with the precision loss
  • Extraneous debug line
  • Make fmt
  • Make clippy
  • Add second clap parser fn with divisor to preserve decimal precision
  • Use clap default_value rather than default_value_t
  • Improve clap parser, use parse_ether in tn-reth tests
  • Make fmt
  • Make clippy
  • Replace cumbersome match with linear usage of ? operator, make fmt
  • Make a clap_u232_parser wrapper available within tn-reth
  • Clean up u232 usage with modular clap parser
  • Improve json str value fetch name
  • Extraneous println
  • Unwrap or default causing bug
  • Make clippy
  • Make fmt
  • Make clippy
  • Make clippy
  • Update faucet tests with consolidated json fn
  • Update tn-contracts to v1.0, genesis using singletons, consolidate json functions into one
  • Update Registry interface, use singleton for tests
  • Switch blake2 digest for blake3.
  • Add back rpc to some tests.
  • Remove unused worker cache trasnactions address.
  • PR Feedback, Be explicit about reth arg defaults.
  • Remove reth args that are confusing or broken.
  • Fix pbserver test.
  • Read committee from on-chain state (#292)
  • Spawn worker tasks with task spawner (#291)
  • Dont restrict the tnx pub/sub.
  • PR feedback.
  • Update tokio and reqwest (#290)
  • Separate Task Managers for Epoch/Node Related Tasks (#277)
  • Can customize where base fees go now.
  • Observer tests and config.
  • Remove outdated note.
  • Bring over any pre-allocated accounts during genesis.
  • Put TXNs on a seperate topic and remove restrictions.
  • Cleanups.
  • Initial code to publish tnxs if not a CVV.
  • PR feedback.
  • Initial addition of kademlia to netwrok for peer discovery.
  • Fix float precision loss
  • Make clippy && fmt
  • Bring tn-contracts InterchainTEL & json changes through protocol
  • Rename RWTEL -> InterchainTEL
  • Make clippy, fmt
  • Fix floating point precision issues, update tn-contracts commit with better deployments.json structure
  • Epoch Manager (#273)
  • Fix a mistake that got checked into Makefile.
  • If you dont want a passphrase have to be explicit.
  • Tn-contracts update
  • Contracts from merge.
  • Couple simple tests for keyconfig.
  • PR feedback, and minor refactor to highlight wrap/unwrap code.
  • Fix restart tests.
  • Dont be so agressive when missing the passphrase env var.
  • Add CLAP option to specify where the key passphrase comes from and include stdin.
  • Read the passphrase from the env and then remove it as the first thing in main.
  • Added passphrase entry at startup support.
  • Initial BLS keywrapping (encrypting).
  • Add genesis CLI arg to optionally pass genesis config file
  • Add genesis CLI arg to optionally pass genesis config file
  • Include interchain token service in genesis as precompiles
  • Include genesis in local testnet script
  • Copy genesis json to validator dirs
  • Make clippy
  • Make fmt
  • Only spawn block on runtime if one doesn’t already exist - ie normal CLI operations
  • Only spawn runtime if outside of tests
  • Spawn tokio runtime for create-committee to execute pre-genesis
  • Tokio async error due to reth execution env
  • Refactor deployments json fetching, still cargo manifest error
  • Set registry owner in local-testnet script and update submodule to master
  • Fix mismatched help_heading and extraneous comment
  • Make fmt
  • Make clippy
  • Make fmt
  • ITS precompiles in genesis, tests passing
  • Submodule update (#264)
  • Retry test fixes.
  • Add precompile yaml deserialization test, update tn-contracts commit
  • Consume all precompile genesis accounts within create_committee:execute()
  • Remove commented out code
  • Update faucet tests
  • Genesis it test passing
  • Resolve bytecode/deployted_bytecode difference
  • Bump
  • Update submodule - initialization still failing
  • Update sol to use latest config
  • Construct genesis from committee
  • WIP
  • Upgrade rust to 1.86
  • Update to 1.86
  • Flag Epoch Boundary in Consensus (#262)
  • PR feedback, more restart tweaks.
  • Conclude Epoch System Call (#259)
  • Try to improve restart test reliablilty.
  • Allow a node to not be validator (no authiority).
  • PR feedback.
  • Some dir cleanup/docs via code.
  • Fix faucet test 3?
  • Fix faucet test 2?
  • Fix faucet test?
  • PR feedback.
  • Cleanups.
  • Clippy
  • Fmt
  • P2P Network: Peer Manager (#247)
  • Support Custom Network Config (#249)
  • Initial refactor to contain Reth in its own crate.
  • Final small cleanups to committee refactor.
  • PR feedback, remove an extra collect.
  • Clippy.
  • PR feedback, stake -> voting power.
  • Removed old todo and fmt.
  • V0.3.2 adiri patch (#246)
  • Dont need auth id to peer id mappings anymore.
  • Fixed tests, removed Copy from AuthorityIdentifier to reduce size, clippies.
  • Fixed a clippy.
  • Refactor authority id to be a peer id.
  • Rename Stake to VotingPower
  • Add interiour mutablility to Committee so we can update for a new epoch with the current cloning approach.
  • Bump some versions.
  • Tweak SignatureVerificationState.
  • Finish removing fast crypto.
  • Replace fastcrypto BLS keys by using the BLST crate directly.
  • PR Feedback, save a seed for network keys in a file to allow easy changing.
  • Save and load the primary BLS key in base 58 format.
  • Misc refactors and moved network keys to new native libp2p.
  • PR feedback, dont check gossip source because it is already checked at lower level.
  • Publish and use batch gossip.
  • Fix some new clippies from latest nightly.
  • Streamline batch requesting.
  • Tweak batch request algorithm.
  • Fixed a format issue.
  • PR Feedback.
  • Output logs for restart tests.
  • Fetch batch returns an error now.
  • Batch fetching agnostic to peers now.
  • Issue 221, make BatchProvider Worker.
  • Reworked batch fetching to work with NVV and observer nodes.
  • Use triats instead of wrappers for DB functions.
  • Extra comment
  • For non-cvvs we wait to see a signed cert before finalizing a block.
  • Better syncing with network gossip.

[v0.3.1-adiri] - 2025-02-26

Other

  • Configurables for Deployments (#228)
  • Publish consensus headers headers and start using it.

[v0.3.0-adiri] - 2025-02-24

Bug fixes

Tests

  • Tests passing

Reverts

  • Revert previous.
  • Revert unnecessary genesis hash change

Other

  • Update dockerfile to fix open-ssl error - rm jemalloc - fix bin versioning (#226)
  • Agnostic txs worker batch (#225)
  • Verify incoming certs when downloading consensus headers.
  • Added number back to primary header, start to validate consensus header certs on catch up.
  • Drop the exec block number from the sub dag.
  • Add extra 32-byte field to consensus header/output (#223)
  • Move database traits to a new module in tn_types. (#218)
  • Engine cleanup (#217)
  • PR feedback from last tqwo PRs.
  • Fixed a test.
  • Clippy, removed a couple of expects.
  • Clippy
  • Refactors around the new networking.
  • Fix faucet test?
  • Remove some leftover sleeps.
  • PR feedback.
  • Fix restarts, add back some tests.
  • Refactor the worker network to libp2p- still WIP.
  • Rebuild Synchronizer (#208)
  • Missed some anemo code generation.
  • Fixed voting req/res.
  • Remove unused anemo code for Primary.
  • Cleanep some tests but restarts are getting odd wrong responses…
  • Cleanups.
  • Initial port pf primary to libp2p- still WIP.
  • Deal with some todo!
  • PR feedback- use the existing PrimaryNetwork.
  • Certificates aggregator to reduce synchronizer logic (#206)
  • Separate consensus round watch channels into separate commit round updates and gc round updates (#205)
  • Initial framework for hooking up the new libp2p core into consensus.
  • Remove comments from state-sync/Cargo.toml
  • Libp2p impl (#183)
  • Got new state sync tasks working.
  • Missed a last header set.
  • Added state-sync crate and refactored subscriber more to use it.
  • Return the full max consensus header not just some numbers.
  • Refactor subscriber to support future error handling and libp2p migration.
  • PR feedback
  • Tweaks to allow a start with a fresh DB.
  • Fix doc test.
  • Upgrade reth: v1.1.5 (#188)
  • Run some tests that require credentials during attestation.
  • Fixed a swallowed error.
  • Fixed a synchronizer panic.
  • Clean up restarts, panic really panics now- issues.
  • Move to a full node restart on mode change.
  • PR feedback
  • TN contrats hash fix.
  • PR feedback.
  • Removed leftover comment.
  • Refactor proposer from raw future to async loop.
  • WIP, initial attempt to toggle back to an active cvv.
  • Update security.md with new guidelines (#182)
  • Contributor guidelines (#175)
  • Readme bug fix and misc additions
  • Fix readme visibility override for GH and add blurb for supported OS platforms
  • Document submodule update instructions
  • Ignore some faucet tests so cargo test works for non-maintainers.
  • Docker Compose for local testnet (#177)
  • Contracts
  • Update the local test script for public use.
  • Primary network address overwrite + cleanup unwraps (#173)
  • Remove old print statements - switch to tracing::debug in some casees (#171)
  • Rename worker blocks (#170)
  • Better support for claiming ports on host (#169)
  • Updates for licenses and attributions (#168)
  • PR feedback
  • Fix a mode check.
  • Round tweaks.
  • Consensus Network: libp2p (#147)
  • This should clean up restarts a lot.
  • Use epoch and round to create the new block nonce.
  • PR feedback
  • Check consensus output to make sure we are building on our chain not a fork.
  • PR feedback, prime round watches early.
  • Check the block we are building on for consensus headers.
  • Fmt.
  • Refactor synchronizer.
  • Initial certifier refactor.
  • Fix to restart tests?
  • PR feedback.
  • Cover a NVV restart edge case that was causing restart delayed random errors.
  • PR feedback.
  • Remove an Option.
  • PR feedback.
  • Fmt.
  • Determine node mode (CVV/NVV) on start and manage tasks with the mode.
  • NetworkResult type (#141)
  • Gossip network: Validate Messages (#139)
  • WIP
  • Better task manager.
  • Much more solid, still cleaning.
  • WIP, new task manager compiles, kinda works (but not completely).
  • Decouple engine from primay and worker at top level.
  • Add initial task manager.
  • Libp2p Gossip Network (#134)
  • WIP, cleaner but still needs libp2p and better task management to be good.
  • WIP, but improving.
  • Embedd genesis contract files so the binary can start.
  • Sealed Worker Block (#132)
  • WIP, tweaks.
  • WIP, hacked up mess but moving to CVV/NVV split.
  • WIP, improvements to sync.
  • WIP, initial weak consensus sync.
  • Mv Network / Network-Types (#129)
  • TN RPC Namespace (#128)
  • WIP, started sync of consensus chain.
  • Modify intent scope (#127)
  • Engine to primary network interface (#125)
  • Primary/Worker WAN (#126)
  • PR feedback.
  • PR feedback, refactored how the consensus chain is built.
  • Reorg Dirs (#123)
  • Store the committed sub dag directly in the consesus header.
  • Fmt.
  • WIP, cleanups and fix some tests needed.
  • Remove comments.
  • Max worker block size and gas are functions now
  • Remove WorkerBlock::header()
  • Resolve extraneous path
  • Make fmt
  • Use new tn-contracts artifact dir, update pinned submodule commit
  • Add & document foundry build command for gitmodule flow
  • Add ConsensusRegistry to genesis
  • Make fmt
  • Remove leftover deprecation comment
  • Fix a path?
  • Update pinned tn-contracts commit
  • Fix path discrepancies
  • Undocify more titles
  • Anonymize ellided lifetime and undocify titles
  • Fmt again
  • Remove deprecated contract artifacts
  • Make fmt
  • Clippy move errors
  • Faucet json var name
  • Import missing solc struct
  • Import missing alloy macro
  • Make clippy
  • Make clippy
  • Make fmt
  • Remove deprecated contract artifacts
  • Specify json/yaml fmt for config load/store
  • New NetworkGenesis method - storing genesis as yaml - need to support json in store path
  • Update README with tn-contracts submodule info
  • Read yaml and json files for contract info: ready for merge with main
  • WIP merge from main
  • Add submodule commands and use CARGO_MANIFEST_DIR for submodule access
  • WIP merge from main
  • Misc oversights
  • Make fmt
  • Make clippy
  • Make clippy
  • Make clippy
  • Make clippy
  • Make clippy
  • Make clippy
  • Make clippy
  • Make fmt
  • Update genesis hash to reflect registry storage
  • Add tn-contracts submodule, test assertions for registry genesis
  • Improve code structure
  • Write ConsensusRegistry storage at genesis, use new ValidatorFlags struct and schema to generate them
  • WIP insert validator pubkeys, overwriting foundry flags
  • Flesh out construct_registry_genesis_accounts to read from Foundry utility output, WIP conditionally overwriting BTreeMap with info known at genesis time
  • Scaffolding for setting consensus registry storage at genesis using Foundry util
  • Test for adding ConsensusRegistry to genesis; update create_eip1559() to accept gas limit
  • Fix revert caused by duplicate BLS, ed25519, ecdsa keys
  • Move genesis test & utils to telcoin-network binary
  • Bug with alloy-sol abi encoding of arrays containing Solidity structs
  • Move ConsensusRegistry genesis test into narwhal-test-utils
  • Delete unused contract ABIs and add ConsensusRegistry runtimecode
  • WIP test for ConsensusRegistry deployment at genesis
  • Fmt.
  • Remove ommers and worker block provides a Header not SealedHeader.
  • PR feedback, us a function for max block gas.
  • Remove unneeded validations from worker blocks.
  • Fix a couple of tests.
  • Remove sealed header from worker block.
  • Moving to consolidated channels. (#111)
  • Oops.
  • Docs, add another channel.
  • PR feedback.
  • Finish move of tn-types.
  • Fix tests (including a deadlock bug).
  • Expand consensus_bus, some tests hanging…
  • WIP, moving to consilidated channels.
  • PR feedback, adjust key names.
  • Streamline the request_signature function.
  • PR feedback.
  • Keep the primary private key private.
  • More config.
  • More config.
  • More config.
  • Clippies, some comments.
  • Fix to cert order test.
  • Updates for latest adiri deployment (#95)
  • Refactor/block builder (#102)
  • Oops.
  • Test tweaks- getting ports better.
  • Siill WIP, tests a lot better.
  • WIP, compiles but failing tests.
  • WIP, bin compiles not tests.
  • Restart Tests (#104)
  • Attest_block -> verify_block
  • PR feedback.
  • Error comment/cleanup.
  • Channel to seal blocks.
  • WIP, tests compile and pass now.
  • WIP, refactor block sealing/quorum.
  • Added a test to the new Notifier.
  • Refactor quorum waiter, tweaks and docs.
  • Remove dead code.
  • Primary Aggregators (#93)
  • Refactor block_provider with new shutdown notifier.
  • Mutex the IT tests.
  • Make fmt
  • Update sealed header values for genesis in tests
  • Add faucet (StablecoinManager proxy) to genesis funding list
  • PR feedback.
  • Update CI GitAttestationRegistry contract address
  • Use thread not task to persist consensus output.
  • Comment, typo.
  • Catch a few more places that a restart proc chould get lest behind.

[v0.2.0-adiri] - 2024-09-20

Bug fixes

  • Fix docker warning and add TAG to makefile for convenience (#55)

Reverts

  • Revert unnecessary change suggested by clippy nightly bug

Other

  • Remove sol parser patch in main cargo toml (#92)
  • Organize worker network handles (#91)
  • Refactor certifier.
  • Primary Proposer (#82)
  • Typo
  • Added a comment.
  • Persist consensus.
  • Organize Primary Handlers (#86)
  • Consensus Tracing (#85)
  • Fix bench that slipped through.
  • Make fmt
  • Replace bcs with tn-types::encode
  • Remove bcs
  • Diff in nightly vs lts fmt: cargo +nightly fmt – –check
  • More clippy fixes for warning: field assignment outside of initializer for an instance created with Default::default()
  • Make clippy: unresolved bcs crate and field assignment outside of initialize warning
  • Make clippy
  • Delete tel-only test, make fmt
  • Remove unused test helpers
  • Completed faucet tel&xyz test: fixed indefinite hanging and ensure faucet stablecoin functionality
  • WIP stablecoin test
  • Resolve e2e test indefinite hang bug by setting state at genesis
  • Paired down storage deps.
  • Remove cert store cache (DB layer handles this now).
  • Fix test with cert store GC.
  • Added GC to the Database layer.
  • Clean up some noisy logs during testing.
  • PR feedback.
  • PR feedback.
  • PR feedback.
  • Add metrics to memdb.
  • Removed some commented code.
  • Fix encoding for DB keys.
  • Switch to bcs (bincode can not handle some encodings).
  • Remove deps from typed-store, use serde impl in types.
  • This arc needs to drop at a count of 1.
  • Fix mdbx metric names.
  • Add metrics to mdbx db backend.
  • Removed an unused dep.
  • Removed an unused dep.
  • Missed a versioned type…
  • Add compaction to the DB trait and use in the layered DB background thread (for redb).
  • Fix a consensus DB save issue (caused restart issues). (#70)
  • Replace Batch with Block in consensus.
  • Fix faucet test.
  • Track pending worker blocks (#60)
  • Fix sol! macro cargo conflict (#73)
  • Fix issues/make the restart test more robust. (#68)
  • Make fmt && make clippy
  • Make clippy
  • Delete irrelevant engine test
  • Make fmt
  • Review nits + clippy
  • It test passing!
  • Make fmt
  • Make clippy
  • Make clippy
  • Make clippy
  • Make clippy
  • Successful faucet deployment and storage fetch - indefinite pending grantRole(faucet_role, kms_address) call
  • TESTING UTILITIES
  • Storage fetching fails
  • Construct raw transactions for utility function to fetch contract storage
  • Add a method to fetch the http rpc local address, WIP faucet it test
  • Update stablecoin integration test
  • Make fmt
  • Doc paragraphs too long
  • Add debug crate to faucet.rs
  • Pre-merge main
  • Doc comments too long
  • Make fmt
  • Make fmt
  • Resolve make clippy
  • Make fmt
  • Update faucet contract address: tests passing
  • Add faucet role to kms address, track nonces manually, pending faucet service address update
  • Optimizations
  • Package management: minimize dep imports
  • Tel transfer test passing: resolve issue of differing testnet google KMS key signer for tests by granting faucet role
  • Resolve upgrade bug, finalize test
  • Prettify jsons, not sure why they didn’t automatically on save
  • Resolve Alloy::NonceFiller bug with manual mgmt, add admin transfer for create2 since it was set in constructor
  • Resolve issues with onchain transactions- WIP: nonce issue
  • Add arachnid create2 factory deployment via raw single-use tx, extract ugly raw tx bytecode to new artifacts module
  • Cleanup deploy functions with optional Wallet param, add helper function for fetching default signer, fix deployer genesis funding bug
  • Use TransactionFactory defaults to deploy faucet-related contracts, resolve k256<>Secp256k1 overlapping types
  • Implement deploy functions to match onchain environment
  • WIP alloy contract deployment functions
  • Use upgraded faucet contract’s new native token functionality
  • Remove versioning from consesus types Votes.
  • Remove versioning from consesus types Certificate.
  • Remove versioning from consesus types Header.
  • Removed some refs to batches and removed some worker dead code.
  • Rename batch.rs -> worker_block.rs.
  • Remove consensus metadata and fix some clippies.
  • Step 1, Batch to WorkerBlock.
  • Update some comments.
  • Fix an issue with consensus DB not always saving.
  • Added an mdbx backend, test reorgs, basic dumb DB bench. (#67)
  • Clippy Fixes (#64)
  • More robust restart test.
  • Added an mdbx backend, test reorgs, basic dumb DB bench.
  • PR feedback, remove a commented line.
  • Fix rocks compile.
  • Added a layed (mem on persistant) DB.
  • Add ReDb metrics.
  • Back out the mem db open- something weird with a feature combo (?).
  • Add a in-memory DB back, not using it yet.
  • Removed some cruft.
  • PR feedback, remove Database type constraints from structs.
  • Update CI to reduce timing (#53)
  • Remove chain id string parsing issue in test-and-attest.sh
  • Fix lifetime issue by passing PathBuf to NodeStorage::reopen() directly rather than reference
  • To manage faucet drip amounts directly onchain, use newly deployed StablecoinManager proxy with bundled faucet functions
  • Add basic CI. (#35)
  • Use parking lot for the redb wrapper (typed-store).
  • Replace DatabaseType with generics except where reqired at DB creation.
  • Fmt.

[v0.1.1-adiri] - 2024-08-15

Other

  • Clippy fixes
  • Clean up for faucet PR and fix TRANSFER_AMOUNT parsing in faucet test file
  • Remove unused faucet_address code & comments
  • Configure faucet infra to use contract addresses from RPC context
  • PR feedback.
  • Rename the redb database file.
  • Clippies.
  • Ealier PR feedback, clean up the redb/rocksdb feature flag interaction.
  • Port RocksDB to new interface and simplify.
  • Remove the old DB traits, rocks is currently broken.
  • Interim, new and old DB traits.
  • Added some unit tests for redb.
  • Back out broken CI, make rocksdb a feature flag.
  • Initial redb, rocks commented out for now with CI on (WIP).
  • Move rocks metrics into rocks package.
  • Rename a couple things to make more sense with DB agnostic.
  • Add commit back to consensus db.
  • YOLO errors for the Map trait to remove rocks dep.
  • Replace TestDB with MemDB, it sorts keys and is a lot simplier.
  • WIP, initial DB trait port, all tests not passing (TestDB has some issues).
  • Test improvements (more reliable).
  • Use random RPC ports, can start in faucet mode when not configured.
  • Add a restart integration test, does not play nice with other tests yet.

[v0.1.0-adiri] - 2024-07-27

Features

  • TN Engine (#11)
  • Payload Attributes for Consensus Output (#10)
  • Broadcast ConsensusOutput (#14)
  • Dockerize (#35)

Bug fixes

  • Fix batch validator unit tests - need better testing in follow up PR
  • Fix certificate fetcher test - added notes for future understanding
  • Fix bullshark test_determinism - seed authority accounts from rng - seed tx factory from rng
  • Fixing compilation errors - extend error types to support payload building
  • Fix basefee - working through prevrandao since it must be consistent between batch/block execution
  • Fix vote accepted for missing parents primary unit test - still getting metrics error AlreadyReg in typed store - these tests consistently failing

Documentation

  • Batch Design (#9)
  • Docs

Tests

  • Test to make sure max_round shuts down engine - convenience method for retrieving block executor from execution engine
  • Test duplicate transactions ignored
  • Test method for versioned metadata to set sealed header - test batch execution method updating and sealing header from dummy transactions
  • Executing Consensus Output (failing) (#7)

Build, CI and chores

  • Build header - update payload attributes - still need to handle withdrawals
  • Upgrade reth beta.9 (#12)
  • Upgrate reth beta-7 (#8)

Other

  • Update dockerfile to rust:1.79 (#32)
  • Robust batch validation error (#31)
  • Updates for adiri deployment (#30)
  • Update last round of consensus (#29)
  • Make sure to read finalized_block_num from the DB not an in memory watch on startup.
  • Add finalized state to unit tests (#27)
  • Remove file that was got re-added.
  • Fix a temp that sudenly became an issue.
  • Re-remove some unused deps (from merge).
  • Update docs with decisions for repurposing block data
  • Remove redundant hashing of batch digests in consensus output
  • Clarify batch/block
  • Cleanup engine inner
  • Remove reth-stages-api
  • Cleanup engine and fmt
  • Clippy fix
  • Make fmt
  • Cleanup payload builder
  • Cleanup engine lib and unit tests
  • Realization that finalized block number is only updated after entire output executed, so impossible to have inconsistent finalized block number
  • Working through recovering last executed output
  • Cleanup
  • Remove execution executor - new engine only
  • Rename evm to evm_executor for clarity
  • Update to use evm config
  • Store evm config on execution node
  • Add evm config generic to execution node
  • Update genesis to start with min base fee
  • Empty payload unit test
  • Cleanup main test
  • Resolve some warnings from clippy fix
  • Clippy
  • Fmt
  • Cleanup
  • Assert all block fields - test passing for two rounds built off genesis
  • Update tests - add methods to consensus output
  • Several assertions - test passing
  • Initial test passing - batches executing
  • Breakup seeded genesis for batches into smaller function call - update test
  • Optional parameters for executing test batch
  • Working through tests - new certificate test method
  • Cleanup - fix tests
  • Check for max_round and terminate early - measures sub dag index, not block height
  • Async optimization to prevent blocking task from hogging runtime
  • Add Tasks generic to spawn blocking
  • Cleanup logic
  • Update loop logic for engine’s poll fn
  • Move debug impl above tests
  • Impl debug for engine - nonexhaustive
  • Mix hash for empty output - not easy to manipulate
  • Initial attempt at mix hash - possible for node operators to manipulate
  • Decision on mix hash - update docs
  • Clippy
  • Update tests
  • Cleanup
  • Fmt
  • Compilation checkpoint - using sealed header
  • Consolidate approach for empty payload builder - time to fix mix hash
  • Use sealed header instead of block num hash - pass in used values to reduce memory usage
  • Rethink parent block as sealed header or look up using provider
  • Need to consider removing batch block from payload attributes - but where does mix hash come from?
  • Initial attempt at building empty payload - need to consolidate logic for DRY code
  • Quick thought on storing pool for workers after batch-builder for accessing during tests
  • Thoughts on empty payload execution - consider db read to pull canonical sealed header based on parent_block arg to reduce confusion - currently some values come from sealed header and parent, but all could come from sealed header
  • Ensure correct data in payload_builder - new test for empty payload - currently failing because loop skips
  • Add assertion and update comments
  • Set finalized block, safe block, and update chain info after successfully extending canonical tip and committing to db
  • Initial unit test - passing, but bad batch data
  • Compilation checkpoint - started unit test in engine lib
  • Thinking through channel shutdown - ’last_output loop is wrong - need a better approach
  • Update ommers in sealed block
  • Fmt
  • Last executed output recovering
  • Sanity check before trying provider generic
  • Update loop results
  • Return sealed block with senders for blockchain tree
  • Return result in future
  • Update note for checking the last executed output - use blockchain tree to prevent redundant rewrite
  • Payload builder to engine
  • Impl future for executor engine - need to migrate payload methods
  • Error and handle mods - working through new() and what fields to keep
  • Add bt to executor, but decided to build execution engine from scratch
  • Blockchain tree should be good to go for extending the canonical tip - layout some pseudocode
  • Batch digests on consensus output
  • Pass batch digests as part of consensus output
  • Bump
  • Call execute consensus output in build and execute 2 - need to think through how to pass multiple blocks to engine
  • Compilation checkpoint - use block numhash for parent block - consolidating used variables
  • Start creating build and execute v2
  • Formatting
  • Updates to payload builder
  • New section for EIPs - mostly todos
  • Inefficient approach to multiple loops for batch digests, headers, and sealed blocks with sender to get unstuck
  • Set extra data to batch digest - notes for tomorrow
  • Update dependencies to use reth v1.0.0
  • Cleanup execution
  • Additional note on prevrandao
  • More progress - need to investigate how to properly set base fee from batch to canonical block execution env
  • Get withdrawals from batch. update notes with todos
  • Make fmt
  • Update PayloadBuilderAttributes trait methods
  • Take ownership instead of references
  • Ommers and ommers root - update docs with more considerations
  • Update docs
  • Cleanup
  • Cleanup
  • Update docs for values used in final execution
  • Bump
  • New loop through batch transactions
  • Use sealed block from batch instead of batch for execution layer
  • Working through recovering batch transactions with signers
  • Recover transaction signed
  • Working through payload builder - stopping point - broken
  • Impl PayloadBuilderAttributes methods
  • Working through payload builder attributes
  • Update hasher for consensus output
  • Start for build args
  • Execution block data updated in docs
  • Add payload builder impl for executor
  • Back to reth release.
  • Adjust local start params, back to dev and discovery off to avoid spamming eth main nodes. (#26)
  • Local start back to info logs.
  • Use a local reth and update to current main (for next release).
  • PR feedback.
  • Change the metric used in test_connectivity because rtt can be 0 sometimes.
  • More cleanups, start consensus metrics if asked.
  • PR feedback.
  • Put primary metrics in its own crate, cleanups.
  • Extend the new prometheus patterns.
  • Leader Schedule Test Failing (#3)
  • Change prometheus setup so tests should pass. Pattern needs extending.
  • Nightly Clippy (#20)
  • Fix a path in a test.
  • PR feedback, fix the faucet test.
  • Clear nightly clippies.
  • PR feedback.
  • Store Genesis instead of ChainSpec in Config.
  • Another missed code path.
  • Missed a ChainSpec somehow and we do need gcloud for faucet testing.
  • Manual Serde implementation because ChainSpec does not play with Serde anymore…
  • Update to reth 1.0.0, fix stable clippies, need to fix ChainSpec serde…
  • PR feedback.
  • PR feedback.
  • Stabilize Formatting (#16)
  • Auto clippy fixes.
  • Remove the config crate since all the things moved to types.
  • Allow a well funded test account to be added when initializing a new network (for dev testing).
  • Comments for makefile
  • Missing quote
  • Update makefile
  • Remove unused deps
  • Use reth-provider in tn-types, remove as optional dependency
  • Remove unused deps
  • Reth-provider added to tn-types, remove optional
  • Remove txs and update make test
  • Rename test_fetch_certificates_v2_handler to just _handler using v1 certificate
  • Cleanup debug statements
  • Restore leader schedule test - separate PR
  • Add idea
  • Qos idea - special worker
  • Primary header threshold still measured in MS, but consensus working in Sec
  • Upgrade to reth beta (#76)
  • Bridging idea (#75)
  • BatchValidator idea: add valid txs to own pool (#74)
  • Swap order of params passed to faucet contract’s drip method (#70)
  • Use google artifacts registry (#69)
  • Faucet/stablecoin support (#68)
  • Docker Compose - Faucet (#67)
  • Add +1 to system time if it equals the parent (#66)
  • Upgrade/rust 1.76 (#65)
  • Upgrade rocksdb v0.22 - fix reference error - faucet it test passing (#64)
  • Feature/sync node after restart (#62)
  • Update Execution Unit Tests (#61)
  • Faucet option in cli (#57)
  • Refactor/yukon to adiri (#59)
  • Run validators in docker compose (#58)
  • Testing tool - Generate Local Network (#56)
  • Patch/batches failing validation (#55)
  • Deployment tweaks (#54)
  • Node Command (#53)
  • Create committee (#52)
  • Validate Genesis (#51)
  • Genesis/ceremony (#50)
  • Feature/cli validator file (#48)
  • Generate Authority Keys (#47)
  • Engine Node + Cluster Test Util Updates (#46)
  • Batch Validation (#45)
  • Update to reth v0.1.0 alpha.13 (#44)
  • Integration Test for Executor (#43)
  • Execute Consensus Output (#42)
  • Batch Maker - EL -> CL (#41)
  • Refresh consensus (#40)
  • Optimized Dependencies and Non-root User (#34)
  • TxPool Sealed Pool Patch (#38)
  • Spawn task for building header in primary proposer (#36)
  • Append Consensus Output to Canonical Chain (#30)
  • Block Building Job (#29)
  • Move timestampMs to use sec (#28)
  • Add validation docs for header. ensure timestamp is in secs. general cleanup (#27)
  • Validate Peer Batch (#22)
  • Primary to Engine impl (#21)
  • Refactor/worker to engine network client (#19)
  • Tn-network-types (#18)
  • Feature/propose blocks (#13)
  • Worker Proposes Batches (#11)
  • Feature/genesis (#4)
  • Heavy reorganization and documentation (#3)
  • Add all crates as workspace members (#2)
  • Migrate Current Progress into New Repo (#1)
  • Init

Bootstrap peers

Bootstrap peers are dial hints used to discover the network. A new node dials them to make its first contact; once it has peers, kademlia and the peer records it learns take over. They do not grant committee membership or permission to publish gossip; those decisions come from chain state.

The default set

A node started with --chain (adiri, test-net or mainnet) dials the bootstrap servers built into its binary, from the network’s chain-configs/*/bootstrap_servers.yaml. A release can change that list; the node takes the new list when it restarts on the new binary. The list is independent of the genesis committee, and the datadir’s genesis/committee.yaml does not change it.

A node started from datadir genesis files without --chain (a local testnet, or a network made with telcoin-network genesis) dials the bootstrap_servers of its genesis/committee.yaml, which the genesis ceremony fills with the genesis validators.

The node logs the source and the count at startup: bootstrap peers selected servers=5 source=built-in chain list. The other sources are network-config, command line and genesis committee file. A --chain node whose genesis/committee.yaml lists other servers than the built-in list says so in the log, and dials the built-in list. A node left with no bootstrap peers, committee peers or trusted nodes logs a warning: it dials no one, and finds peers only if they dial it.

Overriding the default

Configure your own set in network-config under the node’s Telcoin data directory, without editing the genesis committee file.

Add a bootstrap_peers map keyed by the peer’s BLS public key. Each entry contains the primary endpoint and a nonempty workers list in worker ID order (worker 0 first). Use the same base58 key encodings and multiaddresses as the peer’s advertised node information. Replace the placeholders in this example:

bootstrap_peers:
  <BLS_PUBLIC_KEY>:
    primary:
      network_address: /ip4/192.0.2.10/udp/9000/quic-v1
      network_key: <PRIMARY_NETWORK_PUBLIC_KEY>
    workers:
      - network_address: /ip4/192.0.2.10/udp/9001/quic-v1
        network_key: <WORKER_0_NETWORK_PUBLIC_KEY>
      - network_address: /ip4/192.0.2.10/udp/9002/quic-v1
        network_key: <WORKER_1_NETWORK_PUBLIC_KEY>

A nonempty map replaces the entire default set. Include every seed you want the node to dial. Entries are never merged with the default, so omitted default peers can be deliberately excluded. An absent bootstrap_peers key or an empty map (bootstrap_peers: {}) keeps the default set. Existing config files continue to load unchanged. The legacy single worker: {...} entry is also accepted and becomes a one-element worker list when serialized again.

For a process-only override, pass the map as YAML or JSON to --bootstrap-peers. For example, save the map itself (without the enclosing bootstrap_peers: key) in bootstrap-peers.yaml and run:

telcoin-network node --bootstrap-peers "$(cat bootstrap-peers.yaml)"

Or let the node read the file itself, which keeps the map off the command line:

telcoin-network node --bootstrap-peers-file bootstrap-peers.yaml

The file is read and checked while arguments are parsed, so a missing or invalid file stops the node before it starts. The two flags cannot be combined. A relative path resolves from the node’s working directory, which is / for a systemd service unless the unit sets WorkingDirectory=, so give units an absolute path.

The CLI map takes precedence over network-config and is never written back to disk. An explicitly empty CLI map restores the default set even when network-config contains custom peers:

telcoin-network node --bootstrap-peers '{}'

Invalid map entries fail during CLI parsing or config loading. Valid but unreachable endpoints can prevent the node from joining the network and cause the bootstrap readiness wait to time out. Changes take effect after a restart.

Validator production operations

This page defines the production controls that sit around the node software. The node does not configure the host firewall, update itself, or provide an HSM or remote BLS signer.

Network topology

Use separate network roles so a public service cannot directly expose a consensus validator:

RoleExposurePurpose
Core validatorPrivate networkConsensus primary and worker traffic
Sentry or gatewayPublic P2P, selected RPCAbsorb public connections and provide stable entry points
ObserverPublic P2P and optional RPCRead-only access without a consensus vote
ManagementPrivate operator networkMetrics, logs, SSH, deployment, and backup access

Core validators should accept primary and worker traffic only from the approved validator and sentry address set. Do not expose validator RPC, metrics, health, or management ports to the public internet.

Permissionless observers need public entry points. Provide those through sentries, bootstrap nodes, or RPC gateways. Avoid opening every core validator to anonymous peers simply to support discovery.

Firewall configuration

The node has no default consensus ports: it takes them from the primary and worker addresses recorded in node-info.yaml at key generation. By convention, validators use UDP 49590 for the primary network and UDP 49594 for the worker network. RPC and metrics ports are TCP and should remain private unless a dedicated gateway protects them.

Apply these controls outside the node process:

  • allow core validator P2P ingress only from the current validator and sentry address set;
  • allow management and metrics ingress only from operator networks;
  • give public observers and gateways their own security group or firewall policy;
  • restrict core validator egress to approved peers, DNS, time sources, telemetry, and release infrastructure where the platform supports it;
  • log rejected traffic and alert on sustained scans, unexpected destinations, and connection exhaustion.

Treat DHT records, peer exchange messages, and advertised RPC endpoints as untrusted network data. Never use them to add firewall rules or cloud security group entries.

Distribute validator and sentry addresses through an authenticated operator channel. A production address manifest should include the network, epoch or activation time, peer identity, IP addresses, ports, expiry, and signer set. Stage additions before removals, verify connectivity from every validator, and retain the previous manifest for rollback.

Advertising an RPC endpoint

Validators should advertise a JSON-RPC endpoint. Observers do not gossip the transactions they accept. They forward each one over JSON-RPC to the endpoint advertised by the committee validator whose slot owns the sender’s account, and fall back to another validator’s endpoint when that one has none or cannot be reached (see Observer). A validator without an endpoint receives no forwarded transactions, and if no committee validator advertises one, observers cannot forward at all.

Serve the endpoint from a gateway, as Network topology recommends: bind the node’s RPC server to a private interface that only the gateway can reach, terminate TLS on the gateway, and keep the validator host off the public internet. A TLS reverse proxy on the validator host itself, in front of an RPC server on loopback (--http.addr 127.0.0.1, the default), also works, but it exposes the validator host to the internet. Either way, advertise the gateway’s or proxy’s https:// URL, never the node’s own RPC ports:

telcoin-network keytool set-rpc \
    --datadir /var/lib/telcoin \
    --http https://rpc.validator.example.com/

keytool generate validator --rpc-http <URL> records the same field at key generation. The node reads the endpoint at startup, so restart it after a change.

Choose the URL with these rules:

  • use https://: the node also accepts http://, but observers then send signed transactions in cleartext;
  • use a public hostname or address: observers refuse loopback, private-use (RFC 1918), link-local, unique-local, shared-address-space and unspecified addresses, and the localhost and .local names, so an endpoint on one of them receives no forwarded transactions;
  • make sure the hostname resolves to a public address: the check reads the host as written and does not resolve DNS, so a hostname that resolves to a private address passes it, and observers then dial that address, fail to reach it, and forward nothing to this validator;
  • rate-limit the gateway or proxy, because the endpoint is published in the validator’s node record and anyone can find it.

Networks where one operator runs every validator, such as a single-host test network that advertises 127.0.0.1, can let observers dial private addresses with allow_private_forward_targets. Production networks leave it off.

BLS key custody

The current CLI stores the BLS12-381 key in node-keys/bls.kw when a passphrase is used. The file uses AES-256-GCM-SIV with PBKDF2-HMAC-SHA256. The node decrypts the key into process memory to sign consensus messages.

For production today:

  • use credential (systemd LoadCredentialEncrypted=), env, stdin, or ask passphrase mode and never use no-passphrase;
  • keep the data directory on an encrypted volume with owner-only access;
  • isolate the validator process and host from build jobs, developer tools, and public RPC services;
  • retrieve the passphrase from an operator secret system at startup and avoid shell history, command arguments, and long-lived environment files;
  • keep encrypted offline backups and test recovery on an isolated replacement host;
  • monitor changes to node-info.yaml, node-keys/, startup arguments, and process ownership.

Consumer hardware wallets, phones, and Chromebooks do not currently implement the node’s BLS signing interface. Do not assume they can custody or use the validator key without a dedicated integration.

For stronger isolation, add a reviewed remote signer or HSM interface before mainnet. The interface should expose only the required domain-separated BLS operations, authenticate the validator client, rate limit requests, produce audit logs, and keep private key bytes outside the node host. This requires protocol integration and failure-mode testing. It is not available in the current binary.

BLS identity rotation affects committee registration and peer identity. Treat it as a coordinated protocol and governance operation, not a local file replacement.

Release and network update process

Releases are published as signed git tags. Each release has a Linux x86_64 tarball on its GitHub release page and a linux/amd64 image in its network’s package: ghcr.io/telcoin-association/tn-mainnet for mainnet releases, ghcr.io/telcoin-association/tn-testnet for Adiri releases. There is no automatic update: operators decide when to install a release. Installing a release shows how to download and verify one, and Release notes lists what changed in each.

A release provides:

  • a git tag signed with a maintainer key from the allowlist in tn-release-signing, at the commit main records for the release submodule;
  • a SHA256SUMS file covering the tarball and the IMAGE_DIGEST file, with detached maintainer signatures in SHA256SUMS.asc;
  • the image digest in IMAGE_DIGEST, so the image can be pulled by digest instead of by tag;
  • the changelog section for that tag, also shown on the release notes page.

A release does not yet provide an SBOM, third-party build provenance, reproducible builds, or machine-readable activation data. Activation conditions and the final safe rollback point arrive through the authenticated operator channel and the release notes.

Verify the signature and the digests on the target host before installation. Record the installed tarball checksum or image digest and the --version output in operator inventory.

Use this rollout order:

  1. Test upgrade and rollback on an isolated network using production configuration shapes.
  2. Upgrade an observer or sentry canary and check sync, RPC, metrics, and peer behavior.
  3. Upgrade one validator and observe at least one normal consensus cycle.
  4. Continue in stake-weighted batches without taking enough stake offline to break quorum.
  5. Compare every node’s running version, configuration digest, peer set, and chain progress with the release’s signed checksums and release notes.
  6. Stop before the rollback cutoff if acceptance checks fail, restore the prior artifact and configuration, and verify recovery.

The consensus database moved from MDBX to tndb in v0.17.0-adiri, one-way. On its first start a node copies its consensus database from MDBX into <datadir>/consensus-db/tndb, makes the copy durable, and then deletes the MDBX files.

This release moves the execution (reth) database from MDBX to tn-lmdb, also one-way. On its first start the node copies db/mdbx.dat into db/tn-lmdb.dat, verifies the copy against it, makes it durable, and then deletes the MDBX files. It needs free disk for the database’s live pages plus a quarter plus 1 GiB (or the --db.growth-step, if larger) while it copies, and refuses to start, with nothing changed, when there is less. The migrated datadir keeps reth’s storage layout v1; only a new datadir gets layout v2. A node still on v0.16.0-adiri makes both moves at its first start of this release.

This release also raises the validator disk minimum from 10,000 to 20,000 sustained write IOPS and from 300 MB/s to 800 MiB/s, and turns gap fill on by default on Linux (--db.gap-fill auto), which needs a drive that writes each logical block atomically when the power fails. Check each validator’s volume against Execution database: disk and memory before the upgrade; on any other drive, run with --db.gap-fill off.

Once a node has started this release, rolling it back to an earlier release is not supported. The last rollback point for each node is before it first starts this release. Fix any problem found after that forward, with a later release. An earlier release refuses the migrated execution database before it changes anything, at the version file db/database.version; do not edit or remove that file to get past the refusal. Restoring a backup taken before the upgrade is no way back either: the earlier release computes the state root of some blocks differently (next paragraph), and a restored consensus-db/ has no record of the votes and proposals the validator made since, so it could sign conflicting messages. Whenever a validator’s consensus-db/ is restored from a backup or moved aside, keep the validator stopped until the network has closed the epoch it was last in.

Upgrade the validators from v0.17.0-adiri all at once, not in the rollout order above: stop every validator, then start every validator on this release. This release fixes the state root of a rare trie shape (TN-0140 in vendor/reth/CHANGES.md). On a block where the shape occurs, the two releases compute different block hashes, and a committee that mixes them splits on that block: with five validators and a quorum of four, a split of two and three halts consensus. Adiri’s history up to block 529,583 (the close of epoch 751) holds no such block: an observer on this release synced adiri from genesis and reproduced every certified epoch record’s closing block. A block the old release builds later, during a rolling upgrade included, can still be one. Observers can upgrade first: one on this release that meets such a block stops rather than follow it. No automated test upgrades a whole committee at once; rehearse it, every node stopped and then started on this release, on a test network first. Once every node runs this release, an existing datadir moves to layout v2 only by rebuilding its execution database from genesis. With the node stopped, telcoin-network db reset-execution --datadir <datadir> shows what it would move, and with --force it moves db/, static_files/ and any restored-state-floor into <datadir>/execution-reset-<UTC time>/; the next start re-executes the chain from genesis. The rebuild replays epoch 0 from the node’s own consensus packs, so the command refuses, moving nothing, a datadir bootstrapped with db load-state, which holds consensus only from the restored epoch on; such a node rebuilds as a new one, with consensus-db/ moved aside as well. A validator rebuilt that way stays stopped until the network has closed the last epoch it took part in: its votes and proposals for that epoch leave with consensus-db/. It renames and never deletes: on the same release, moving those entries back (after moving the new ones out) restores the execution database from before the reset, while consensus-db/ keeps what the node wrote meanwhile (see “Rollback” in the tn-reth README’s “Upgrading a testnet node”). It is no way back to an earlier release, which is not supported once this release has started on the datadir. An observer can rebuild in place. On a five-validator committee with a quorum of four, one validator out for a whole rebuild leaves no margin, so a validator syncs an observer on this release in a fresh datadir instead, stops it cleanly at the tip, and copies its db/ and static_files/ into the validator’s datadir after db reset-execution --force --for-swap (never its consensus-db/ or keys); the validator is down only for the swap. --for-swap lets a validator bootstrapped with db load-state through the epoch-0 refusal, because the copied database replaces the rebuild; the validator keeps its consensus-db/, so it needs no wait.

For an emergency patch, name an incident owner, a release owner, and an independent verifier. Freeze unrelated rollout changes, state the affected versions and activation deadline, use the same signature and digest checks, and record each validator’s completion. A protocol fork needs a separately approved activation plan and explicit readiness evidence from enough validator stake.

Capacity monitoring

Resource use rises with network load, and some limits are fixed in the release. Watch these signals on every validator and observer. Hardware requirements explains the model behind each one. The alert levels are starting points; tune them after a week of baseline data.

SignalWhere to read itStarting alertWhat a rising trend meansWhat to do
CPU pressure/proc/pressure/cpu, some avg60Above 20 for 10 minutesRunnable threads are waiting for a coreCheck the engine backlog first. If execution lags, move to a CPU with faster single-thread performance. If RPC load causes it, serve public RPC from an observer instead (see Public RPC nodes).
Memory pressure/proc/pressure/memory, full avg60Above 1The kernel is reclaiming pages the node needs, so all its threads stallAdd RAM. On RPC nodes, lower --rpc-cache.max-blocks. Do not add swap.
IO pressure/proc/pressure/io, full avg60Above 10Execution is waiting on diskMove to faster storage or raise the volume’s provisioned IOPS, then check for throttling.
Disk throttlingThe provider’s volume metrics (GCP reports throttled read and write operations and bytes per disk); iostat -x queue size and awaitAny sustained throttlingThe volume has reached its provisioned IOPS or throughputRaise the volume limits or move to local NVMe.
Free disk spaceFree space on the filesystem that holds the datadir (df, or node_exporter’s node_filesystem_avail_bytes)Below 20% of the volume, or less than a week of growth at the current rateEvery node is an archive node, so disk use only grows. The batch cache also has no fixed maximum: batches consensus has not committed take disk until they are committed or the epoch closesGrow the volume or move to a larger one before it fills: a full disk stops the node (see Full disk). If free space falls faster than the chain grows, check the batch cache size row.
Consensus database stoppedtn_storage_tndb_failed, one series per database (env is epoch, kad or cache); the node exiting with an error that names the database1 on any env, or the node exiting non-zeroA sync or write of that database failed (a full disk, an I/O error), or a read found damage on disk. The database refuses every write, and the node stops itself rather than run on storage it cannot write. Any other storage failure of the node’s own (a consensus pack, the epoch records, the certificate archive) stops it the same wayPage. Read the exit error and the node log (target tndb), check free space (see Full disk) and the disk, fix the cause, and restart the node. If the error names damage, or the restart refuses to open the database, run telcoin-network db tndb-stat and tell the Telcoin Association network team before you delete anything.
Batch cache sizetn_storage_tndb_log_bytes{env="cache"}, the length of the cache’s log under <datadir>/consensus-db/tndb/cache. It grows with each batch written and removed, and drops at each compaction (tn_storage_tndb_compactions_total{env="cache",outcome="switched"})Above 768 MiB for 10 minutesBatches are not leaving the cache (consensus is not committing them), or its compactions are failing (see the next row)Check the next row. If compactions succeed and the log still grows, tell the Telcoin Association network team.
Consensus database compactions failingtn_storage_tndb_compaction_abandons_total, by env and cause, beside tn_storage_tndb_compactions_total{outcome="switched"}2 or more abandons in 3 hours for one env, with no switched compaction in those 3 hours. Retries slow to one an hour, so a plain count such as 3 in an hour goes quiet about 75 minutes into a failure that persists; this one keeps firing until a compaction succeedsThe log is not being compacted, so its disk use keeps growing. cause says why: disk_full (not enough free space for the copy: the database’s current size plus 384 MiB to start one, 256 MiB while it runs), writer_outran (writes faster than a compaction can catch up, an extreme burst), corruption, panic or errordisk_full: free disk space. corruption: stop the node, run telcoin-network db tndb-stat, and tell the Telcoin Association network team. Otherwise tell the network team.
Consensus database syncsp99 of tn_storage_tndb_sync_seconds per env, over 5 minutesAbove 100 msVotes and proposals wait for these syncs before they leave the nodeCheck IO pressure and disk throttling.
Engine backlogtn_engine_queued_outputs, 0 to 84 or more for 5 minutesExecution is falling behind consensusAt 8 the engine queue is full and outputs back up into the 64-slot channel in front of it. Check CPU and IO pressure and tn_engine_execution_duration_seconds.
Resident memoryreth_process_resident_memory_bytesAbove 70% of RAMQueued outputs, RPC caches or the transaction pool are growingCompare with the engine backlog and the RPC request rate. A climb right after a restart is replay and should fall once the node catches up.

Pressure stall information needs a kernel built with PSI support, which mainline Linux added in 4.20. If /proc/pressure is missing, the running kernel lacks it or has it disabled.

The consensus database is tndb: one log per database under <datadir>/consensus-db/tndb/ (epoch, kad and cache), each with an index per table. Removed and overwritten rows stay in a log until a background compaction rewrites its live rows into a new generation (gen-N) and deletes the old one. The cache log compacts once it is at least 256 MiB and twice its size after the last compaction, so its size rises and falls instead of only growing; it can briefly hold two generations while a compaction runs. The epoch log resets when each epoch closes. Committed batches are evicted when their consensus output, already saved to the epoch pack, is forwarded to execution, and the rest are removed at each epoch close, so the cache’s live data is the batches not yet committed (see Per-epoch batch-cache ceiling). With the node stopped, telcoin-network db tndb-stat reports each database’s live and dead bytes, its generation and the state of its indexes. Summed over all validators since the epoch started, tn_worker_batch_size_bytes gives a rough estimate of the batch data a node has written to its cache, and on a node that stayed in sync the estimate runs low. The histogram records each batch once, when its worker reports it to the primary, but a node writes each of its own batches to the cache twice and also writes every peer batch it validates, including ones that failed quorum. It is not the cache’s live data, because committed batches are evicted.

Resident memory includes pages of the memory-mapped databases that the process has touched, so it rises slowly as the database working set grows. Alert on how fast it climbs during load and after restarts, not only on the level.

Execution alerts

The execution layer publishes these series with the node’s other metrics (--metrics). Each should stay at 0: alert on any increase, for example increase(tn_reth_exec_cache_stale_hits_total[15m]) > 0. The release ships no alert rules or dashboard panels for them.

SeriesA nonzero value meansWhat the node doesWhat to do
reth_db_latched (a gauge, 1 or 0)The execution database met damage on disk or an I/O error, and refuses every writeStops at its next persist of executed blocksSee Execution database damage.
tn_reth_exec_cache_stale_hits_totalThe execution cache served a value its sampled check (one hit of each kind in 256) found stale: a bug in the cacheDiscards that block, drops the cache, builds the block again without it, and runs on. Earlier blocks are not checked againSet TN_EXEC_CACHE=0 on this node and restart: it then builds every block without the cache. That is safe on one node, since a node without the cache builds the blocks a correct cache must. Compare the node’s recent block hashes with a peer’s before you trust it: unchecked values it served before the check may have put it on another state, and those blocks are persisted. Such a block forks this node alone; the node goes inactive at its next leader check or stops at an epoch record other than its own, but nothing repairs the blocks short of a sync from scratch. Tell the Telcoin Association network team. A 0 on other nodes clears nothing, since each node checks its own hits.
tn_reth_parallel_state_root_mismatches_totalA sampled block’s parallel state root (block numbers that are multiples of 256, with parallel work) differed from the serial one: a bug in the parallel code. Every node checks the same blocks. The other 255 blocks in 256 commit the parallel result unchecked, so blocks the bug hit before carry its wrong root: on every node for a bug every path shares, on some nodes for a bug in one path that scheduling picksUses the serial result and runs onA network-wide response, which the Telcoin Association network team coordinates: every node sets TN_PARALLEL_STATE_ROOT=0 and restarts. A node that switches alone parts from its peers on the next block the bug hits. Switching off repairs no trie node an unchecked block already persisted; the check cannot see such nodes.
tn_reth_account_walk_fallbacks_total{reason="mismatch"}, tn_reth_storage_walk_fallbacks_total{reason="mismatch"}The mismatch above was on a block where the account walk’s split (or the storage split) ran. It does not say that split was wrong: a block where both ran counts under bothAs aboveAs above. Switching off one split only (TN_PARALLEL_ACCOUNT_WALK=0 or TN_PARALLEL_STORAGE_WALK=0) is the network team’s choice once it has found the fault.
tn_reth_account_walk_fallbacks_total{reason="stored_root_node"}, tn_reth_storage_walk_fallbacks_total{reason="stored_root_node"}The database holds a trie node at the empty path, which reth never writes: the stored trie is not one reth wroteComputes that root on one thread and runs onTell the Telcoin Association network team.
tn_reth_parallel_state_root_task_failures_total{reason="tip_moved"}A parallel state-root task saw another finalized block than its walk: something wrote the state or trie tables while an output’s blocks were built, and the node has no such writerLeaves that part to the serial computation and runs onTell the Telcoin Association network team. The other reasons (provider, database, panicked) cost block time only; read this series first when one node parts from its peers.
tn_reth_unrecoverable_txs_dropped_totalA certified batch carried transaction bytes that do not decode: batch validation was bypassed somewhereDrops the transaction and runs onTell the Telcoin Association network team.
tn_reth_tx_body_inline_rows_totalAn execution database that stores transactions by their position in consensus batches (a new one does: tn-reth README, “Transactions stored by position”) stored some whole instead: their block’s batch did not hash to the digest the block names. Expected only while the node re-executes adiri’s duplicate-batch epochs (up to epoch 160)Stores those transactions whole, which reads correctly and costs the space the format saves; the first such block in a process logs a warning naming it and why. Runs onOutside those epochs, tell the Telcoin Association network team, with the warning’s block. Nothing needs repair.
tn_reth_tx_body_resolve_failures_total (by reason)A read of transactions stored by position could not take them from the consensus packs: a pack missing or damaged (pack_missing, batch_missing, read), a pack left unsealed or mid-install (handoff_timeout), or a stored row or batch that does not match (no_batch_digest, position_out_of_range, decode, batch_too_large), or no packs attached to the process (packs_not_attached); or nothing wrong with the packs, only every pack read busy (permit_timeout: the node runs 4 pack reads at once and lets at most 124 more wait, each for up to a second)Fails that read: the RPC call answers an error, never another transaction. Other reads answer, and the node runs onFollow the tn-reth README (“Transactions stored by position”, “Recovery”): with the node stopped, check the epoch’s pack with telcoin-network db validate --datadir <datadir> --epoch <N>, run telcoin-network db repair --datadir <datadir> --epoch <N> to see what it would do, and then with --force to do it; otherwise put it back from a backup or another node’s sealed copy with telcoin-network db import-epoch (see Consensus database backups). Rebuilding the execution database does not help: it re-executes from the same packs. Without a backup the node starts over as a new one (the execution database and consensus-db/ moved aside), or a validator swaps in the execution database of an observer bootstrapped with db load-state from the pack’s epoch or a later one. A handoff_timeout during an epoch change that does not repeat needs nothing. A permit_timeout needs no repair either: the RPC endpoint was sent more history reads (transactions, receipts, blocks or logs of blocks the node no longer holds in memory) than the node runs at once, and the same read answers when it is retried; if its rate stays above 0, limit the request rate in front of the RPC endpoint. Otherwise tell the Telcoin Association network team. A node whose consensus database lacks a pack its execution database points into does not start, and names the missing epochs and these ways to recover.
tn_reth_canon_state_lagged_totalThe transaction pool’s maintenance fell behind and lost canonical-state notificationsReloads the pool’s sender state and runs onA rate that does not fall back to 0 means the worker cannot keep up: check CPU pressure and the engine backlog.
tn_epoch_final_state_mismatches_totalAn epoch the node re-executed closed on another block than the epoch record it holdsStops, and stops again at every restartKeep the moved-aside execution database, follow the rebuild text of the tn-reth README (“Upgrading a testnet node”: a record of the node’s own from a diverged execution needs a fresh consensus-db/), and tell the Telcoin Association network team.

Execution database damage

The execution database (tn-lmdb, <datadir>/db/tn-lmdb.dat) stops taking writes at its first failure: damage on disk that any read finds, or an I/O error while it writes or syncs. The read can be block execution, an RPC call, or the database gauges the metrics endpoint samples at each scrape. Reads go on, but the node’s next persist of executed blocks fails and the node stops. The damage stays on disk, so after a restart the next read that reaches it stops the node again: a restart does not clear it. The node log names the first failure (target tn_lmdb), and reth_db_latched reads 1 until the process exits. Reads do not recompute most pages’ checksums, so some damage is read as data until a write copies the page or db check runs.

What to do:

  1. Stop the node.
  2. After an I/O error, check the disk, then reboot the host: db check reads through the page cache, which can still hold pages the device never took.
  3. Run telcoin-network db check --datadir <datadir>. It checks every page’s checksum and the structure of db/tn-lmdb.dat, and names what failed. It checks nothing else: not the static files and not the consensus database (see What each check covers). If it passes, the execution database holds no damage, and the failure was something else: a full disk, say (Full disk), or a damaged static file, which the error names (Static file damage). Fix the cause and start the node.
  4. A damaged database is not repaired in place. Move it aside with telcoin-network db reset-execution --datadir <datadir> --force and rebuild it: in place, or for a validator by the side-observer swap (the tn-reth README’s “Upgrading a testnet node”). The rebuild re-executes every epoch from 0 from the node’s own consensus packs, so db reset-execution refuses, moving nothing, a datadir that lacks one of them: one bootstrapped with db load-state (it holds packs only from the restored epoch on), or one that lost a pack. Such a node rebuilds by the swap, with an observer whose database fits its packs (the tn-reth README’s “Transactions stored by position” says which), or starts over as a new one with consensus-db/ moved aside as well (a validator then stays stopped until the network has closed the last epoch it took part in). One damaged page usually means more: check the disk and the memory before you trust the host again.

Static file damage

The execution layer keeps part of the chain’s history (headers and transactions among it) in static files under <datadir>/static_files/, beside db/. In the storage layout new datadirs get (v2), every value in them carries a checksum that each read verifies, so damage shows as an error naming the file, such as static file <path> is damaged: the value at row <r>, column <c> fails its checksum. A datadir in the older layout (v1) has no static-file checksums. No command checks the static files at rest: db check does not read them. Reads of the damaged rows fail (an RPC call answers an error) and other reads answer, but damage under the committee and epoch reads stops the node, and damage in a segment’s latest file stops its next start.

What to do:

  1. Stop the node.
  2. The file is damaged on this node only (a disk or memory fault, or a bad copy), and nothing repairs it in place. Rebuild the execution database as in step 4 of Execution database damage: db reset-execution moves static_files/ aside with db/.
  3. Check the disk: one damaged file usually means more.

Copy or restore whole datadirs, never single static files: a file from another copy can read as this one’s without an error.

Storage tools and recovery

Exit status

The node’s process exits with one of these statuses:

StatusMeaning
0A requested stop (SIGINT or SIGTERM)
1An error. The process prints it to stderr (Error: ...), and the node log names it (Error running node: ...)
2A usage error: an argument or flag the node does not accept
10This node has forked: an epoch record it holds differs from the one the network certified, found at the epoch’s vote or by the epoch record sync

A restart meets the same fork and stops again, so do not restart a node automatically on status 10: keep it stopped, keep its datadir as it is, and tell the Telcoin Association network team. Under systemd, add RestartPreventExitStatus=10 to the unit’s [Service] section, next to Restart=on-failure. A supervisor that cannot filter by exit status restarts a forked node into the same stop every time: cap its restarts (Docker’s restart: on-failure:<max-retries>) and alert on status 10. Other stops that repeat at every restart exit 1, such as a final-state mismatch at an epoch close (tn_epoch_final_state_mismatches_total under Execution alerts).

Database commands

The telcoin-network db commands work on the datadir that --datadir <datadir> names, and on the OS data directory without it. Each prints the datadir it acts on (datadir: <path>) to stderr before anything else; check it. db validate given a pack’s path ignores --datadir, and prints that path (pack: <path>). “Node stopped” means the command refuses to run while a node holds the datadir, and holds the datadir while it runs, so a node started meanwhile is refused. A command exits with status 1 when it fails or finds damage that needs action. The dry runs of db repair and db migrate exit 0 when they find only what --force would fix, and db validate exits 0 for a torn tail of the newest epoch, which the node’s next start truncates (with --all, 1 when any epoch fails).

CommandWhat it doesNode stoppedWrites
db statsReports the execution database: its static files, its storage format, then each table’s rows, pages and sizeYesNo
db checkChecks every page’s checksum and the structure of the execution database, db/tn-lmdb.datYesNo
db tndb-statReports the consensus database (tndb): for each of epoch, kad and cache, its generation, live and dead bytes, and each table’s rows and index stateYesNo
db validate --epoch <N>, db validate --all, or db validate <path>Checks one epoch’s consensus pack (<datadir>/consensus-db/epochs/epoch-<N>; for an interrupted install, the epoch-<N>.replaced copy the next start puts back), every epoch’s in turn from the lowest present to the newest (a missing one fails, except one after the epoch the node resumes from, which its next start fetches), or the pack at a path (an epoch-<N> directory or its data file, anywhere): a torn tail, or damage that loses data, with what to do. With --epoch or --all, a past epoch’s pack is also checked against this node’s epoch records, and fails when it does not end with its epoch’s final outputOnly for the newest epoch, or a pack not sealed yet; a sealed past epoch can be checked while the node runsNo
db repair [--epoch <N>] [--force]Repairs consensus packs: truncates a torn tail, rebuilds indexes, puts back an install that stopped half-way, and heals the epoch records. Without --epoch it skips the newest epochYesOnly with --force; without it, reports what it would do
db migrate [--epoch <N>] [--force]Rewrites consensus packs from before v2 in the v2 formatYesOnly with --force; without it, reports what it would do
db migrate-executionMoves the execution database from MDBX to tn-lmdb now, instead of at the node’s next start; pass the node’s --db.* flagsYesYes
db import-epoch --epoch <N> --from <copy> [--force] [--db.growth-step <size>]Puts back one past epoch’s consensus pack from a copy (this node’s backup of epoch-<N>/, or another node’s sealed one), verified against this node’s certified epoch records before anything is replaced; replaces a missing or damaged pack, or one that lost its last outputs. Keep the copy outside consensus-db/epochs/. A legacy v0 copy (a backup from before the header-first pack format) is converted first with db migrate --force in a scratch datadir (see Consensus database backups). It needs about the pack’s size free beyond the floor a peer’s import keeps (Full disk, step 5); pass the node’s --db.growth-step if it runs with oneYesOnly with --force; without it, verifies the copy and changes nothing
db load-state <bundle> [--verify-only]Restores a state-export bundle into a fresh datadir (the tn-reth README’s “Snapshot export / restore”); --verify-only runs the checks a restore runs before it writes and those it makes as it writes (the state data read whole, its header window, the import of the bundle’s consensus pack), and stops; it reads the whole bundle, so it takes time on a large one, and only the restore recomputes the state root. The import is staged under $TMPDIR (else the system temp directory; an empty TMPDIR or one inside the datadir is refused) and removed on every normal exit (its path goes to stderr; a killed run leaves $TMPDIR/tn-load-state-verify-* to remove by hand); it needs the pack’s size plus the node’s import floor (one default execution-database growth step plus a margin) free there and refuses to start without it, and on many Linux hosts /tmp is a RAM-backed tmpfs or a small partition, so set TMPDIR to a disk with roomYes, except --verify-only, which warns when a node holds the datadirYes, except --verify-only
db reset-execution [--force] [--for-swap]Moves db/, static_files/ and restored-state-floor into <datadir>/execution-reset-<UTC time>/, so the next start rebuilds the execution databaseYesOnly with --force (renames, never deletes); without it, reports what it would move

telcoin-network db <command> --help says what each refuses and why.

What each check covers

DataWhereChecked at rest by
Execution databasedb/tn-lmdb.datdb check
Static filesstatic_files/Nothing: a v2 datadir’s reads verify each value’s checksum, and each start checks the end of every segment’s latest file
Consensus packsconsensus-db/epochs/epoch-<N>/db validate (one pack) and the dry run of db repair (every epoch but the newest, unless named)
Epoch recordsconsensus-db/epochs/epochs.pack, epoch_certs.packThe dry run of db repair
Consensus database (tndb)consensus-db/tndb/db tndb-stat, which reads each log as the node’s open does and reports one it cannot read

Full disk

A full disk stops the node: a write of its own storage failed, and it stops rather than run on storage it cannot write. A full disk does not damage the node’s files: once there is room, a start resumes.

  1. Keep the node stopped (a service manager that restarts it at once only fails again).

  2. Find what grew: du -sh <datadir>/* <datadir>/consensus-db/*, and telcoin-network db tndb-stat --datadir <datadir> for the consensus database’s live and dead bytes. If the batch cache grew, see the batch cache size row under Capacity monitoring.

  3. Grow the volume, or move the datadir to a larger one. That is the fix; deleting files only buys time.

  4. If you must free space on the volume first, these are safe to delete:

    • an execution-reset-<UTC time>/ directory, once the node rebuilt (or swapped) after that reset runs well and you will not undo the reset; keep it while the Telcoin Association network team looks into a divergence. Never an execution-reset-*.partial directory: that reset has not finished;
    • consensus-db.forked/, left by the recovery from a forked epoch record, once its cause is known;
    • state-export bundles you no longer need under consensus-db/state_exports/ (written with --enable-state-export, which --state-export-keep <N> bounds; the node never reads them back);
    • files outside the datadir that share its volume.

    Delete nothing else in the datadir. In particular never delete a consensus-db/epochs/epoch-<N>/ or epoch-<N>.replaced/ directory, the epoch records (epochs.pack, epoch_certs.pack), anything under consensus-db/tndb/ (its gen-<N> and idx-<N> directories included), or the markers load-state-in-progress, restored-state-floor, mdbx-migrated and db/database.version. The node itself deletes tndb’s old generations and unfinished compactions at its next start (db tndb-stat lists them).

  5. Start the node with free space for its next writes:

    • the execution database grows its file by up to one growth step at a time, each step allocated when it is taken: --db.growth-step, 1 GiB by default;
    • each consensus file the node writes (the open epoch’s pack, the epoch records, the tndb logs) allocates up to 128 MiB ahead of its data as it grows;
    • a consensus database compaction starts only with the size of the database it compacts plus 384 MiB free, and gives way below 256 MiB;
    • a node catching up whole epochs from peers stops a pack import when free space is under one growth step plus 512 MiB, plus 320 MiB for each import running (about 1.8 GiB for one with the default step);
    • a node still to move its execution database from MDBX to tn-lmdb refuses to start without the database’s live pages plus a quarter plus 1 GiB (or the growth step, if larger) free.

    Free at least the growth step plus 2 GiB (3 GiB with the default step), and grow the volume as soon as you can.

Consensus database backups

A datadir that stores transactions by their position in the consensus packs (the format new datadirs get: the tn-reth README’s “Transactions stored by position”) needs every pack its execution database points into, and nothing fetches a past epoch’s pack again: a node that loses one refuses to start, naming the missing epochs. The start log line reth datadir: storage format names a datadir’s format (tx_bodies=pointers or inline), and telcoin-network db stats prints it. Its recovery is a backup, or another node’s sealed copy of the lost epoch (db import-epoch verifies one), or starting over as a new node (the tn-reth README’s “Recovery”). db validate and db repair name the same recovery for a pack whose data is damaged. Keep a backup.

To take one:

  1. Stop the node. A copy of a running node is not a backup: it writes the open epoch’s pack, the epoch records and the tndb logs as it runs.
  2. Copy <datadir>/consensus-db/ whole into a new directory on another disk, keeping it as it is: cp -a <datadir>/consensus-db <backup>/consensus-db, or rsync -a into an empty directory. Keep the previous backup until the copy has finished.
  3. To keep a full restore point as well, copy <datadir>/db/, <datadir>/static_files/ and, if there is one, <datadir>/restored-state-floor at the same stop.
  4. Start the node.

A backup holds the packs of the epochs that had closed when it was taken, so take one regularly, at planned stops such as upgrades. Back up the keys separately, as BLS key custody says.

To restore, with the node stopped:

  • A whole restore point (consensus-db/, db/, static_files/ and restored-state-floor from one stop): move the datadir’s entries of those names aside (never delete them), copy the backup’s in, and start the node. It resumes from the backup and catches up from peers, as a node stopped since then does.
  • One lost or damaged past epoch, as the reports of db validate and db repair name it: put back only its epoch-<N>/, from a backup taken after that epoch closed or from another node’s sealed consensus-db/epochs/epoch-<N>/ (a sealed epoch’s pack is the same on every node). Keep the copy outside the datadir’s consensus-db/epochs/ (the import and the node remove directories there; the command refuses a copy inside it). Run telcoin-network db import-epoch --datadir <datadir> --epoch <N> --from <copy>/epoch-<N>: it verifies the copy against this node’s certified record of epoch <N> and changes nothing. It reads a v1 or v2 pack as it is, and refuses a legacy v0 (batches-first) one, such as a backup from before the header-first format: convert that first in a scratch datadir (a new directory outside this one), by copying the copy’s data file to <scratch>/consensus-db/epochs/epoch-<N>/data and running telcoin-network db migrate --datadir <scratch> --epoch <N> --force, and pass --from <scratch>/consensus-db/epochs/epoch-<N>. Then run it again with --force, which installs the verified copy in place of the missing or damaged pack (renamed into place as the node installs an import; a pack that still validates and ends with the epoch’s certified final output is refused, since there is nothing to replace). It refuses the epoch the node resumes, whose pack the node writes; restore that one from a whole restore point. Epoch 0 is put back the same way, with --epoch 0: its copy is checked against this node’s certified record of epoch 0 and the genesis committee in the datadir’s genesis/committee.yaml, which the node opens epoch 0 with. The next start checks again that every pack the execution database points into is there, and names any still missing.
  • consensus-db/ alone, from a backup older than the execution database: the packs of the epochs since the backup are missing from it, so a datadir that stores transactions by position refuses to start, naming them. Restore the execution database from the same stop as well, or rebuild it as in step 4 of Execution database damage.

Whenever a validator’s whole consensus-db/ is restored from a backup, keep the validator stopped until the network has closed the epoch it was last in: the backup holds none of the votes and proposals the validator made since it was taken.

Required evidence before mainnet

  • firewall policy tested from allowed and denied source networks;
  • signed address manifest distribution and rollback rehearsal;
  • BLS backup and isolated recovery rehearsal;
  • release signature and digest verification on every target host;
  • canary, phased rollout, and rollback rehearsal;
  • quorum dashboard based on validator stake and running version;
  • incident contacts and an out-of-band coordination channel.

Private observability listeners

The node has two operator listeners: health (--healthcheck) and metrics (--metrics). Both are off unless configured. Both bind only the address the operator writes. Both log one operator listener bound line at startup, under the tn::listener target, with three fields: listener (healthcheck or metrics), listen_on (the bound socket address) and exposure (how far it reaches). An exposure=all-interfaces bind is also logged at warn.

The listeners are unauthenticated and have no rate limiting. Reach is the control: a loopback bind is reachable only from the host, and a private interface bind only from hosts that route to that interface. A host firewall is defense in depth, not the binding contract.

Bind forms

ValueHealth bindExposure
8080127.0.0.1:8080loopback
127.0.0.1:8080127.0.0.1:8080loopback
[::1]:8080[::1]:8080loopback (IPv6)
10.10.0.21:808010.10.0.21:8080interface
0.0.0.0:8080every IPv4 interfaceall-interfaces (explicit, warned)
[::]:8080every interfaceall-interfaces (explicit, warned)

--metrics takes the socket address forms only; that is unchanged. A bare port is accepted for --healthcheck only, and it binds IPv4 loopback. A wildcard bind is never implied; it has to be written out.

Migration from the port-only flag

CaseBeforeAfter
--healthcheck 8080bound 0.0.0.0:8080binds 127.0.0.1:8080
HEALTHCHECK_TCP_PORT=8080bound 0.0.0.0:8080binds 127.0.0.1:8080
Probe from inside the same container or hostreached the listenerunchanged
Probe from another host, or a kubelet probereached the wildcard listenerrefused; write --healthcheck 0.0.0.0:8080 or the node’s private address
Flag unsetno listenerunchanged
Invalid value (127.0.0.1, nope, 70000)clap errorclap error, exit code 2, nothing starts
Port in use, or address not on this hostlistener silently skippedstartup fails with the OS error naming the address

Routes and readiness semantics are unchanged: liveness on every other path, /health/workers for transaction acceptance, and /health/network for cached swarm reachability (503 while not-ready).

Native deployment

Bind both listeners to loopback and run the collector on the same host:

telcoin-network node --chain mainnet --healthcheck 127.0.0.1:8080 --metrics 127.0.0.1:9101

Prometheus on the same host:

scrape_configs:
  - job_name: telcoin-node
    static_configs:
      - targets: ["127.0.0.1:9101"]

Health from the same host:

curl -sS http://127.0.0.1:8080/health/network

A remote collector reaches a loopback listener through an SSH tunnel (ssh -N -L 9101:127.0.0.1:9101 node-host), or through a local agent that relays, such as Prometheus in agent mode with remote_write.

A host with a separate management network can bind the listeners to that interface instead: --metrics 10.0.0.5:9101 --healthcheck 10.0.0.5:8080. Allow only the collector’s address in the host firewall. The bind is the contract; the firewall is defense in depth.

Container deployment

etc/compose.yaml publishes no health or metrics listener under ports:: each binds its container’s compose-network address, or loopback inside the container. node-record-api is the exception, with no listener of its own for health: its probes share its API listener, which is published on host loopback.

ServiceBridge addressHealthMetrics
validator1..validator410.10.0.21-10.10.0.24--healthcheck 10.10.0.2N:8080--metrics 10.10.0.2N:9101
observer10.10.0.31--healthcheck 10.10.0.31:8080--metrics 10.10.0.31:9101
worker-gateway1..worker-gateway410.10.0.41-10.10.0.44--probe-addr 127.0.0.1:8546, inside the container--metrics 10.10.0.4N:9101
node-record-api10.10.0.51/healthz and /readyz on its API listener, published on 127.0.0.1:809010.10.0.51:9101

The compose healthcheck: probes /health/network on each validator and on the observer, /ready/any on each gateway’s probe listener, and /readyz on node-record-api, each from inside its container.

The observability profile of etc/compose.yaml runs Prometheus in the host network namespace, bound to 127.0.0.1:9090, so on a Linux host it scrapes the bridge addresses without any published metrics port.

docker compose -f etc/compose.yaml --profile observability up --build --remove-orphans --detach

Host network observability lists its targets and dashboards.

Manual health query from inside a validator container (the image has no curl):

docker compose -f etc/compose.yaml exec validator1 bash -c 'exec 3<>/dev/tcp/10.10.0.21/8080; printf "GET /health/network HTTP/1.1\r\n\r\n" >&3; head -c 200 <&3'

Single-container deployments keep loopback binds and run the collector as a sidecar that shares the network namespace (network_mode: "service:<node>").

Port publication review

  • Never add - 9101:9101 or - 8080:8080 under ports:. A published port on 0.0.0.0 republishes the listener on every host interface.
  • Publish to host loopback (127.0.0.1:9101:9101) when a host-local tool needs the listener.
  • --http.addr 0.0.0.0 is the RPC listener. It is governed separately and is not covered here.
  • In etc/compose.yaml only the gateways’ client ports (8545-8542) are published on every interface. The validators’ RPC is published as debug ports on host loopback only (127.0.0.1:18545:8545 to 127.0.0.1:18542:8545), and so are the observer’s RPC (127.0.0.1:8541:8545) and the node-record-api API (127.0.0.1:8090:8080).
  • A wildcard --metrics 0.0.0.0:9101 or --healthcheck 0.0.0.0:8080 is an explicit choice. It shows as exposure=all-interfaces with a warning.

Gateway exposure

A worker gateway has three listeners: the client port (--listen-addr), the probe listener (--probe-addr) and metrics (--metrics). Only the client port is meant for clients; the probe and metrics listeners are unauthenticated, and the probe listener has no connection cap. In etc/compose.yaml each gateway binds its client port to 0.0.0.0:8545, published on host port 8545, 8544, 8543 or 8542 on every interface. It binds its probe listener to 127.0.0.1:8546 inside its container, where only the compose healthcheck reaches it, and its metrics to its bridge address, 10.10.0.4N:9101, unpublished. node-record-api binds its metrics to 10.10.0.51:9101, unpublished, and publishes its API on host loopback only. For production, bin/worker-gateway/README.md (“Firewalling”) keeps the gateway’s metrics port inside the monitoring network and its probe port reachable from the orchestrator only.

Metric label policy

  • No per-address labels: no IP, socket, multiaddr or hostname is ever a label value.
  • Per-peer labels only for committee or trusted peers, with every other peer under one shared value, so the series count stays bounded by the peers that were in the set since the node started.
  • Raw errors, URLs and attacker-supplied identities are never label values.
  • Every label vocabulary is bounded: a static string, a Rust enum with fixed arms, a small worker id, or the BLS key of a peer the previous rule allows.

Audit of the tree at this change

Every labelled series in the twelve metrics modules was classified at the base of this change.

Series (label keys)Value sourceClass
tn_epoch_runs_total (mode)RunEpochMode, 3 armsenum
tn_epoch_provider_fault_retries_total (read)&'static str literalsstatic
tn_info (version)&'static str build versionstatic
tn_node_mode (mode)literal array, 3 valuesstatic
tn_batch_builder_* (worker, reason)WorkerId; BlockSealError, 8 armsworker id, enum
tn_worker_* (worker, reason, source, tier, peer)WorkerId; QuorumWaiterError 6 arms (Rpc payload dropped), ForwardDropReason, SyncShedReason; local / remote; PeerTier, 2 arms; peer on the two batch request counters only: a current committee member’s BLS key, else otherworker id, enum, static, committee key
tn_reth_* (reason, call)InvalidTxSkipReason 5 arms, HandoffDropReason 7 arms, ForwardDropReason 5 arms; &'static str literalsenum, static
tn_network_* (network, kind, class, outcome, reason, direction, severity)primary or worker-{id}; ServiceClass 6 arms, InboundFailureOutcome 5 arms, ConnectionLimitReason 7 arms, InboundDenial 4 arms, ShedReason 3 arms; literalsworker id, enum, static
tn_storage_write_failures_total (env, op)&'static str env constants; WriteOp, 6 armsstatic, enum
reth passthrough (reth_*)reth’s own labels, copied unchangedreth

Result: 0 violations. No label carries a libp2p peer id, hostname, IP, socket, multiaddr, URL, raw error string or remote-supplied topic. One label carries a BLS key: peer on tn_worker_batch_requests_denied_total and tn_worker_batch_requests_failed_total. Its value is the key of a current committee member, and every other peer records under the single value other. The worker’s committee set is replaced when each epoch starts and is empty until the first one starts, so a request denied or failed before then records as other. The worker caches counters for at most the committee plus other, because it drops the members that left the committee before it adds a new entry. The exported series are not cleaned up: the recorder sets no idle timeout, so a departed member’s series stays at its last value until the node restarts. Each of the two counters therefore has, per worker, at most one series for each committee member seen since startup, plus other. The only error Display text that reaches label code (tn_network_connection_limit_rejections_total) is matched against fixed strings, and only the bounded enum becomes the label.

To add a metric: derive the label value from an enum as_str that returns &'static str, register the series at zero where the owning crate registers its handles, and never format a remote-supplied value into a label.

Host network observability

This page documents the host-level network pressure signals and the committee connectivity gauges that issue #1688 asks for. It covers collection, scope, thresholds, alerts, operator actions and the label policy.

Scope

The node exports consensus and networking metrics on --metrics. It does not see what the kernel or the firewall drops before a packet reaches the QUIC listener. This page adds three host signals and one node signal:

  • bounded firewall rule counters from named nft counters;
  • UDP receive buffer errors from the kernel SNMP counters;
  • conntrack occupancy against the configured maximum, with an explicit mode;
  • unique reachable current-committee peers against the committee size, per network.

Every query on the dashboard and in the rules is scoped by job and instance. Node series add network. Interface series add device. No label carries an address, a peer identity, a URL or an error string.

Collection

node_exporter

Run one node_exporter per host in the host network namespace. The compose profile runs prom/node-exporter:v1.12.1 with these flags:

--path.rootfs=/host
--collector.textfile.directory=/textfile
--web.listen-address=127.0.0.1:9100

Keep the exporter on loopback or on the management network. Do not expose port 9100 to the public internet.

Textfile collector

etc/host-metrics/tn-host-network.sh writes the host series the exporter cannot produce itself. Install the script and its units:

sudo install -m 0755 etc/host-metrics/tn-host-network.sh /usr/local/bin/tn-host-network.sh
sudo install -m 0644 etc/host-metrics/tn-host-network.service etc/host-metrics/tn-host-network.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now tn-host-network.timer

The timer runs the collector 30 seconds after boot and every 15 seconds after that. The service writes tn_host_network.prom.<pid> under /var/lib/node_exporter/textfile and renames it into place, so the exporter never reads a partial file. The script needs root for nft. It needs nft and jq for the firewall series. Without them it reports tn_host_firewall_collector_available 0 and no firewall series.

Name the nft counters you want to observe with the tn_ prefix. Use tn_drop_ for drop rules and tn_accept_ for accept rules:

nft add counter inet filter tn_drop_public_udp
nft add rule inet filter input udp dport 49590 ip saddr != @validators counter name tn_drop_public_udp drop

The validators set

The drop rule above admits only the sources in the nft set validators. Fill it from the node’s own view: tn_admissionSnapshot on the node’s loopback RPC lists, for every swarm, the committee window, the committee two epochs ahead, the eligible validator pool and the configured trusted and bootstrap peers, with the addresses the node would use for each. A set built from it opens to a validator once it is eligible and its record resolves, and closes to a departed one once the node stops listing it.

The set leads the node’s own admission on purpose. Under Closed the node refuses an inbound peer it does not admit only after the QUIC/TLS handshake, because the PeerId is known only then, and the peer’s own dial can complete before the connection closes. Its own outbound dials to such a peer are refused before any transport work. The firewall is therefore what spares the host the handshake of a source outside the node’s view, and since it drops a peer before the node can see it, it must already pass every scheduled and eligible validator by the time the node admits one.

Build the set from three sources:

  • the IP literal of every /ip4/ and /ip6/ address in multiaddrs and record_multiaddrs of every entry of every swarm, whatever its slots, source or admitted; skip dns addresses rather than resolving them;
  • the operator’s static allowlist;
  • the configured bootstrap peers.

The static list and the bootstrap peers are always in the set, so a wrong snapshot can never cut the launch set and the set is never empty. IPv4 and IPv6 addresses need separate sets, one of type ipv4_addr matched by ip saddr and one of type ipv6_addr matched by ip6 saddr. Replace the elements in one nft -f transaction, so the kernel applies the new set whole or not at all:

flush set inet filter validators
add element inet filter validators { 198.51.100.7, 203.0.113.10 }

Only an authoritative snapshot, as defined below, may run that transaction.

Fail-open rule

The set never shrinks on bad input. A snapshot is authoritative for membership only when every one of these holds:

  1. The RPC answered with a result, and its version is one the reader knows (1).
  2. The primary swarm ("network": "primary") reports available: true and a non-null admission.
  3. The primary’s tracked_epoch is non-null and not lower than its admission.epoch. A lower value means the node has not published this epoch’s validator pool, and the swarm still lists the previous epoch’s keys.
  4. The primary’s tracked_epoch is not lower than that of the last applied snapshot.
  5. The primary’s admission.fallback is null or "Unresolved".

Missing and Stale mean that no versioned committee window has arrived, for example right after a restart, when the node runs Open with the current committee only. Contradictory means that membership itself is in doubt. The effective admission mode does not matter: the firewall is a cost filter, independent of the node’s own gate.

When the snapshot is authoritative, the addresses of a key it no longer lists leave the set at that apply, unless the static list or the bootstrap peers still hold them. A worker swarm that reports available: false, a null admission, or a tracked_epoch behind its own admission.epoch is not authoritative for its own entries: keep the addresses last applied for it and add any new ones it lists.

When the snapshot is not authoritative, change nothing. That covers an unreachable RPC, a node without the method (JSON-RPC error -32601), the error -32001 (Not Found.) of a node whose networks have not started, an unknown version, and any failed check above. Keep the loaded set, and record since when and why the feed is stale. Never flush the set on an error path.

A key listed with "source": "unresolved" has no addresses. Keep the addresses it last resolved to for 3 epochs after its last resolution, then let it contribute nothing until it resolves again. That absorbs a transient kad miss without pinning a departed peer.

Age policy

  • Poll the snapshot every 5 minutes and after every change to the static list. The node serves a cached snapshot for up to 1 second, so callers cannot load its swarms.
  • The snapshot carries no generation time. The feed’s age is the time since the last authoritative snapshot was applied.
  • Warn when the feed has been stale for more than 2 epochs, and keep the set: the last good view is still a superset of what the node admitted then.
  • Alert at once on a missing method or an unknown version, because neither clears by itself.
  • Do not expire an entry on its record_timestamp. The node lists a record until a newer one supersedes it or the key leaves its sets, and it looks up again every tracked record signed more than two record publication intervals ago (24 hours by default).

Compose profile

etc/compose.yaml has an observability profile with node_exporter, Prometheus (prom/prometheus:v3.15.0) and Grafana (grafana/grafana:13.2.4). The profile is off by default, so make up is unchanged. Start it with:

GF_SECURITY_ADMIN_PASSWORD=change-me docker compose -f etc/compose.yaml --profile observability up -d

All three services bind to loopback: Prometheus on 9090, Grafana on 3000 and node_exporter on 9100. Grafana has anonymous access off. The admin password comes from GF_SECURITY_ADMIN_PASSWORD; the default telcoin-local is for a local stack only. Grafana provisions two dashboards: “Telcoin Node Metrics” (etc/grafana/telcoin-node-metrics.json) and “Telcoin Worker Gateway” (bin/worker-gateway/grafana-worker-gateway.json), whose job variable scopes every panel to the jobs that scrape gateways. Each validator, the observer, each worker gateway and node-record-api binds its metrics listener to its fixed bridge address (10.10.0.x:9101), so the host Prometheus can scrape it on a Linux host. The ports are not published. With every service healthy, Prometheus reports up at 1 for all eleven targets in the table below.

Prometheus jobs

JobTargetsInstance labelSeries
telcoin-node10.10.0.21 to 10.10.0.24 and 10.10.0.31, port 9101validator1 to validator4, observertn_* node series
worker-gateway10.10.0.41 to 10.10.0.44, port 9101worker-gateway1 to worker-gateway4tn_worker_gateway_*, tn_info and reth_process_*
node-record-api10.10.0.51:9101node-record-apitn_node_record_api_*
node127.0.0.1:9100the hostnode_*, up and the tn_host_* textfile series

Rules load from etc/prometheus/rules/*.rules.yaml. The scrape and evaluation interval is 15 seconds.

The observer is not a committee member, so it reports tn_network_committee_peers_expected 0 and the committee alerts skip it; TnNodeDown and TnNodeCommitteeSeriesAbsent cover it like a validator. No rule matches the worker-gateway or node-record-api jobs. The gateway’s own series are described in bin/worker-gateway/README.md (“Observability”), and those of node-record-api in bin/node-record-api/README.md.

Series reference

SeriesSourceScopeReset behaviour
tn_host_firewall_rule_packets_total{rule}nft named counterhost, per ruleresets on reboot or nft reset counters; use rate or increase
tn_host_firewall_rule_bytes_total{rule}nft named counterhost, per rulesame as packets
tn_host_firewall_rules_truncatedcollectorhostgauge; 1 when more than 32 tn_ counters exist and the collector keeps only the first 32 in name order
tn_host_firewall_collector_availablecollectorhostgauge; 0 when nft or jq is missing or nft -j list counters fails
tn_host_conntrack_mode{mode}collectorhostone-hot gauge: tracked, notrack or unsupported
tn_host_udp_rmem_max_bytes/proc/sys/net/core/rmem_maxhostgauge
tn_host_network_collector_info{version}collectorhostgauge; collector version
node_netstat_Udp_RcvbufErrors, node_netstat_Udp6_RcvbufErrorskernel SNMPhostresets on reboot; use rate
node_nf_conntrack_entries, node_nf_conntrack_entries_limitnode_exporter conntrack collectorhostgauges; absent when the module is not loaded
node_network_receive_drop_total{device}, node_network_receive_errs_total{device}node_exporter netdev collectorhost, per interfaceresets on reboot; use rate
node_textfile_mtime_seconds{file}node_exporter textfile collectorhostgauge; collector freshness. file is the path node_exporter reads, for example /textfile/tn_host_network.prom, so the rules match file=~"(.*/)?tn_host_network[.]prom"
up{job="node"}Prometheushost0 when the exporter does not answer
up{job="telcoin-node"}Prometheusnode0 when the node metrics endpoint does not answer
tn_network_committee_size{network}nodenode, per networkgauge; 0 until the first committee is known
tn_network_committee_peers_expected{network}nodenode, per networkgauge; 0 until the first committee is known, and 0 on a node outside the current committee
tn_network_committee_peers_connected{network}nodenode, per networkgauge; 0 until the first committee is known

Recording rules keep the baselines operators use for threshold selection:

Recording ruleMeaning
tn_host:firewall_drop_packets:rate5mpackets per second across all drop_* counters, per host
tn_host:udp_rcvbuf_errors:rate5mUDP receive buffer errors per second, IPv4 and IPv6, per host
tn_host:conntrack_occupancy:ratioentries divided by the limit, per host, in every conntrack mode
tn_network:committee_coverage:ratioconnected divided by expected committee peers, only while a committee is known

Scope caveats

Counter reset

nft counters and the kernel SNMP counters reset on reboot. nft counters also reset on nft reset counters. All rules and panels use rate or increase. Both treat a drop in a counter as a reset and do not alert on the reset alone. The unit test file telcoin-host-network.test.yaml proves it with a counter that resets in the middle of the window.

Network namespace

The collector and node_exporter read the host network namespace. A container that runs them in its own namespace reports the container, not the host. The compose profile uses network_mode: host and pid: host for this reason. A node in a container still shares the host firewall and conntrack table, so the host series describe the pressure the node sees.

Interface

Interface drops and errors are per device. The device variable of the dashboard selects the interface. Pick the interface that carries consensus traffic. The firewall, UDP and conntrack series are host wide and have no interface label.

Exporter scope

One exporter observes one host. Several validators on one host share the same host series under one instance of the node job. The node series keep their own instance under the telcoin-node job. Nothing merges across instances: every rule keeps instance in its result and every panel legend shows it.

Explicit states

A missing signal is never a healthy zero. The state panel of the dashboard shows one of exporter-down, collector-absent, stale, firewall-unavailable or ok for the collector, and one of unsupported, collector-failed, notrack or tracked for conntrack. A host without the conntrack module shows unsupported while the textfile is present and collector-failed without it, because the node_exporter conntrack collector also fails there. An empty drop panel next to a collector-absent state means no data, not no drops.

  • notrack: at least one nft rule has a notrack statement. Flows that match it do not enter the conntrack table; every other flow is still tracked. TnHostConntrackHigh stays active in this mode, because the tracked flows can still fill the table.
  • unsupported: /proc/sys/net/netfilter/nf_conntrack_max is absent. The module is not loaded or the kernel has no conntrack. TnHostConntrackUnsupported fires after 15 minutes so the state is reviewed, not ignored.
  • The collector reads the ruleset with nft -j list ruleset and jq and counts only a notrack statement inside a rule. A counter, chain or comment that is only named notrack does not count. Without nft or jq the mode is tracked. A host that uses iptables NOTRACK targets shows tracked. Document the exception for such hosts.

A notrack rule works only before conntrack sees the packet. Put it in a chain on the prerouting hook, and on the output hook for traffic the host sends, at priority raw (-300). Conntrack runs at priority -200, so a notrack rule in an input chain at priority 0 is too late and exempts nothing. Example for the primary and worker UDP ports:

table inet raw {
    chain prerouting {
        type filter hook prerouting priority raw;
        udp dport { <primary>, <worker> } notrack
    }
    chain output {
        type filter hook output priority raw;
        udp sport { <primary>, <worker> } notrack
    }
}

Committee connectivity semantics

The node sets three gauges per network (primary and worker-{id}):

  • tn_network_committee_size: the number of members of the current committee.
  • tn_network_committee_peers_expected: size - 1 when this node is a current member, else 0. Every network is a full mesh between committee members, so a member expects every other member. A node outside the current committee (an observer, or a validator outside the committee of this epoch) exports 0, so both committee alerts skip it; tn_network_committee_size and tn_network_committee_peers_connected stay exported for the dashboard. The node recomputes membership from its own BLS key on every committee update.
  • tn_network_committee_peers_connected: the number of unique current-committee members with at least one established connection on this network.

All three are 0 until the node learns its first committee. The rules use expected > 0 as the restart guard, so a node that boots fires nothing until the committee is known. At an epoch change the previous committee is not counted: a member that leaves the committee drops out of connected without lowering coverage. A node outside the current committee also exports expected 0, so the guard skips it too.

The generic tn_network_connected_peers and tn_network_known_peers gauges count every peer. The dashboard overlays connected_peers on the committee panel only to show that committee coverage moves on its own. The unit test has connected_peers rising while committee coverage falls, and the alerts still fire.

Alerts

Every alert has a severity label (info, warning or critical), a summary, a description, an action and a runbook_url that points at a section of this page. Every expression carries a job matcher.

The thresholds below are launch defaults. To re-derive one, record the matching recording rule for a quiet launch window of at least one week, take the 99th percentile of that baseline, and add a margin of at least 50 percent. Keep the for duration at or above two scrape intervals so a single scrape cannot fire an alert.

Exporter and collector state

AlertConditionSeverityAction
TnHostExporterDownup{job="node"} == 0 for 2 minutescriticalRestart node_exporter. Check the loopback bind and the scrape target.
TnHostCollectorAbsentexporter up without tn_host_network.prom for 10 minuteswarningInstall the collector script and enable the timer. Check the textfile directory flag.
TnHostCollectorStalefile older than 120 seconds for 5 minuteswarningRead journalctl -u tn-host-network.service. Fix nft, jq or permissions.

Node state

AlertConditionSeverityAction
TnNodeDownup{job="telcoin-node"} == 0 for 2 minutescriticalCheck the node process and its logs. Check the metrics port and the scrape target.
TnNodeCommitteeSeriesAbsentnode up without tn_network_committee_peers_expected for 15 minuteswarningConfirm that the node release exports the committee gauges and that the scrape target is the node metrics endpoint.

The committee alerts read the node gauges, so they cannot fire for a node that is down or does not export them. These two alerts cover that gap. They cover every target of the telcoin-node job, the compose profile’s observer included.

Firewall drops

AlertConditionSeverityAction
TnHostFirewallDropsRisingincrease of a drop_* counter over 5 minutes above 100, for 5 minuteswarningCompare with the QUIC Retry and inbound request panels. A rise that matches committee loss means a blocked peer. A rise with stable committee coverage is a scan or flood the firewall absorbs.
TnHostFirewallCollectorUnavailabletn_host_firewall_collector_available is 0 for 10 minuteswarningInstall nftables and jq. Run nft -j list counters as root to see the error. The drop panel is empty, not zero, while this fires.
TnHostFirewallRulesTruncatedmore than 32 tn_ counters for 10 minuteswarningRemove or merge tn_ counters until at most 32 remain. The collector exports only the first 32 in name order.

Launch default: 100 packets per 5 minutes. Re-derive it from tn_host:firewall_drop_packets:rate5m multiplied by 300.

UDP receive buffer errors

AlertConditionSeverityAction
TnHostUdpRcvbufErrorsincrease of RcvbufErrors over 5 minutes above 0, for 10 minuteswarningCompare tn_host_udp_rmem_max_bytes with the buffer the node requests. Raise net.core.rmem_max and net.core.rmem_default. Check CPU starvation of the node.

Launch default: any sustained error. A host that shows a constant low rate at launch gets its own threshold from tn_host:udp_rcvbuf_errors:rate5m.

Conntrack occupancy

AlertConditionSeverityAction
TnHostConntrackHighentries divided by limit above 0.8 for 5 minutes, in every conntrack modewarningRaise net.netfilter.nf_conntrack_max, block the flow churn at the edge, or add notrack rules for the consensus UDP ports at priority raw (see Explicit states). The alert stays active with notrack, because other flows are still tracked.
TnHostConntrackUnsupportedmode unsupported, or the exporter’s conntrack collector fails, for 15 minutesinfoLoad nf_conntrack or enable the collector. If the host runs without conntrack on purpose, document it and silence the alert for that instance.

Launch default: 0.8. Re-derive it from tn_host:conntrack_occupancy:ratio. The ratio and the alert ignore the conntrack mode, because notrack exempts only the flows it matches.

Committee connectivity

AlertConditionSeverityAction
TnCommitteeConnectivityDegradedexpected above 0 and connected below expected, for 5 minuteswarningFind the missing members from their own gauges. Check firewall drops and QUIC Retry on both sides. Confirm the address manifest.
TnCommitteeConnectivityLostexpected above 0 and connected below two thirds of expected, for 2 minutescriticalTreat as an incident. Check host drops, conntrack and UDP errors on this host. Confirm the advertised addresses. Fail over to a sentry path if the private network is impaired.

Launch default: two thirds. Re-derive it from tn_network:committee_coverage:ratio. A committee of four tolerates one missing member before quorum is at risk.

Controlled scenarios

Run these on a staging host to confirm the signals before launch. The host-scenarios job of .github/workflows/host-network-observability.yaml runs the first four on every pull request that touches the artifacts, checks that node_exporter labels the textfile with its full path, then checks the collector output with promtool check metrics.

ScenarioProcedureExpected observationCI
Firewall dropsAdd a tn_drop_* counter and a drop rule for a probe port. Send 50 datagrams to it. Run the collector.tn_host_firewall_rule_packets_total{rule="drop_<name>"} is at least 50. TnHostFirewallDropsRising fires above the threshold.yes
notrackAdd a notrack rule for the probe port in a prerouting chain at priority raw. Run the collector.tn_host_conntrack_mode{mode="notrack"} is 1. A chain or a comment that is only named notrack leaves the mode tracked. TnHostConntrackHigh still fires if the tracked flows fill the table.yes
UDP receive buffer pressureSet net.core.rmem_max and net.core.rmem_default to 2304. Start a UDP listener that does not read. Send 300 datagrams of 1000 bytes.The RcvbufErrors column of /proc/net/snmp increases. TnHostUdpRcvbufErrors fires after 10 minutes.yes
Conntrack pressureSet net.netfilter.nf_conntrack_max to 64. Open more than 64 UDP flows. When the table is full, the kernel drops each new flow and the sender gets EPERM. This is the expected result, not an error.nf_conntrack_count reaches 80 percent of the limit. TnHostConntrackHigh fires after 5 minutes above the threshold.yes
Committee loss and recoveryBlock one committee member’s address on the primary port. Wait. Unblock it.tn_network_committee_peers_connected falls by one while tn_network_connected_peers is unchanged or rising. TnCommitteeConnectivityDegraded fires after 5 minutes and clears after the unblock.no (needs a committee)

The unit test file etc/prometheus/rules/telcoin-host-network.test.yaml covers the rule side of every scenario: a counter reset, an absent exporter, several instances without merging, a notrack host, an unsupported host, a restart with zero gauges, and committee loss with recovery.

Label vocabulary policy

  • Host series carry only job, instance, rule, mode, device, file, collector and version. Node committee series carry only network.
  • rule values come from nft counter names with the tn_ prefix. The collector sorts them and keeps the first 32. tn_host_firewall_rules_truncated is 1 when it cut the list. An attacker cannot create nft counters, so the operator bounds the vocabulary.
  • mode has three values. network has primary and worker-{id}.
  • Committee connectivity is a count. There is no per-peer label, not even for committee members. A per-peer breakdown needs a bounded lifecycle for the label values and is out of scope here.
  • No host series or node committee series carries a source address, a peer identity, a URL or an error text. The node’s only per-peer label is on series this page does not cover; Metric label policy describes it. The artifact test in crates/network-libp2p/src/tests/ops_artifacts_tests.rs rejects any dashboard query that matches on addr, address, ip, src, peer_id or url, and any node or host query without job and instance matchers.
  • Issue #930: the scoping and label policy on this page applies to the work tracked there.
  • bin/worker-gateway/README.md (“Observability”): the gateway’s series and the “Telcoin Worker Gateway” dashboard, which the compose profile provisions.
  • etc/README.md (“Docker Compose”): the compose testnet’s services, endpoints and the checks of its gateway path.
  • Validator production operations: firewall configuration and capacity monitoring.
  • tn_admissionSnapshot: the admission view that fills the validators set.

Consensus liveness

Connection counts and traffic volume do not establish consensus liveness. Use the primary’s round gauges, quorum observations, and last successful commit handoff together. These metrics describe one node’s local view; compare active validators before diagnosing a network-wide failure.

Metrics and observation rule

The Prometheus exporter replaces dots in Rust metric names with underscores. All metrics below have no application labels; Prometheus supplies target labels such as job and instance.

Prometheus metricMeaning
tn_primary_roundExisting current primary round gauge.
tn_primary_committed_roundExisting highest committed round gauge.
tn_primary_rounds_evaluated_totalNumber of distinct observed rounds finalized by this process.
tn_primary_round_quorum_shortfalls_totalEvaluated rounds below the active committee’s quorum voting power.
tn_primary_quorum_observation_active1 while the active consensus task owns an observer, otherwise 0.
tn_primary_liveness_started_timestamp_secondsLocal Unix time when the current observer started.
tn_primary_last_commit_timestamp_secondsLocal Unix time of the last successful subdag handoff to the consensus output channel in this observer’s lifetime; 0 until the first handoff.

A certificate is observed only after the local Bullshark driver accepts it, after the epoch check. Genesis and rounds at or below the highest recovered DAG or committed round are excluded. Within a round, each current committee author contributes its Authority::voting_power() once, even if duplicate blocks or equivocations are submitted. The sum is compared with Committee::quorum_threshold(), rather than with a guessed number of certificates or a count of certificate signers. With equal voting power this is floor(2n / 3) + 1 distinct-author blocks, or 2f + 1 when n = 3f + 1. The current authority API gives every member one vote. If weighted voting is introduced, the observer already sums the API’s actual voting power and uses the committee’s threshold.

An observed round is finalized at the first of these boundaries serviced by the consensus loop:

  1. An accepted certificate from a strictly higher round.
  2. Thirty seconds after the first accepted certificate of the pending round.

The deadline does not move when more authors, duplicates, or repeated polls arrive. An ordinary partially populated new round contributes nothing to either counter before finalization. At finalization the denominator increases once, and the shortfall counter increases once only if the round is below quorum. Later blocks cannot revise or reopen the result. Missing round numbers, including large jumps during catch-up, are not counted as observed rounds.

The driver checks idle deadlines once per second. Execution or output backpressure can delay servicing the timer while certificate processing awaits those components. The wall-clock commit age remains visible during that delay, even if the loop stops observing rounds completely. The thirty-second window is an observation policy, not a consensus timeout or a rejection rule.

Only one pending round’s committee author set and one monotonic round watermark are retained. Memory is bounded by the current committee size, independently of round count, round-number jumps, duplicate traffic, and polling frequency. No addresses, peer identities, errors, URLs, rounds, or epochs become metric labels.

Startup, recovery and epoch transitions

  • Startup: Before an active consensus driver starts, observation is inactive and timestamps are zero. Once active, the start timestamp is set and the commit timestamp remains zero until a successful output handoff. Give the first commit an explicit startup grace period.
  • Recovery and catch-up: The observer starts beyond the highest round in the restored DAG or committed cursor. This also excludes restored uncommitted rounds: counting only their post-restart arrivals would miss authors already in the DAG and create false shortfalls. Recovered history does not populate observations. Accepted rounds above that baseline are measured locally, including replay during active catch-up; their timing does not prove that the rest of the network is live. Inactive validators and followers do not run this observer.
  • Epoch changes: Shutdown, task error, or cancellation sets observation inactive and drops the pending round without counting it as a failure. The next active task owns a fresh committee, round watermark, start timestamp, and zero commit timestamp. Old-epoch certificates cannot affect the new observer, even when round numbers are reused. The counters remain cumulative across epochs until process restart.
  • No data: Zero evaluated rounds means no finalized sample, not zero failures. An inactive observer is unavailable for quorum diagnosis. A missing scrape is a monitoring failure. A live scrape with an active observer and an old commit/start timestamp is a potential complete stall.
  • Progress semantics: The commit timestamp records successful consensus output channel handoff, not execution, durable storage, or a historical block’s creation time. Monitor executed height separately for an execution stall. Local wall-clock corrections can distort timestamp ages, so keep validator and monitoring clocks synchronized.

Dashboard and alert examples

Use one series per node. Choose operational thresholds for your deployment; the examples use a two-minute startup/stall allowance, separate from the thirty-second observation window.

Round advancement without committing, using the existing gauges:

clamp_min(tn_primary_round - tn_primary_committed_round, 0)
  and (tn_primary_quorum_observation_active == 1)

Plot this beside deriv(tn_primary_round[5m]) and increase(tn_primary_subdags_committed_total[5m]). A growing gap shows round advancement outpacing commits. A flat gap alone cannot rule out a complete stall. Round watches update independently, so alert on sustained lag rather than a single scrape around an epoch change.

Shortfall fraction among finalized observations:

(
  increase(tn_primary_round_quorum_shortfalls_total[5m])
  / increase(tn_primary_rounds_evaluated_total[5m])
)
  and (increase(tn_primary_rounds_evaluated_total[5m]) > 0)
  and (tn_primary_quorum_observation_active == 1)

Display a missing fraction as “no finalized rounds”, not “healthy”. Display the denominator alongside it. increase handles process counter resets; its five-minute window can include the previous epoch’s observations. There is deliberately no per-epoch label.

A stall after at least one commit, including when no new rounds or certificates arrive:

(time() - tn_primary_last_commit_timestamp_seconds > 120)
  and (tn_primary_last_commit_timestamp_seconds > 0)
  and (tn_primary_quorum_observation_active == 1)

An active task that has never committed after its startup allowance:

(tn_primary_last_commit_timestamp_seconds == 0)
  and (time() - tn_primary_liveness_started_timestamp_seconds > 120)
  and (tn_primary_quorum_observation_active == 1)

For alerts, use for: 1m to tolerate scrape jitter and brief handoff delays. Show “starting” instead of “stalled” while the commit timestamp is zero and the start age is at most 120 seconds. Show “inactive” for tn_primary_quorum_observation_active == 0. Use the scrape target’s up == 0 alert for an unreachable process, and detect missing instrumentation on reachable targets with a deployment-scoped expression such as:

(up{job="telcoin"} == 1)
  unless on(job, instance) tn_primary_quorum_observation_active

Controlled loss and recovery evidence

The Rust test quorum_loss_and_recovery_through_consensus_driver drives the production consensus task with a four-member committee and paused Tokio time. It supplies two authors for round one, leaves the driver idle until its real observation timer records one shortfall and one evaluated round, and verifies that no commit timestamp was fabricated. It then restores all authors, including duplicate and late round-one certificates, verifies committed-round advancement and a nonzero commit timestamp, and checks that the original shortfall count stays at one. Shutdown must clear the active gauge.

The quorum_ unit tests also pin the exact deadline, quorum threshold, duplicate identities, weighted accumulation, round jumps, recovered-history exclusion, old-epoch rejection, rollover, and absence of metric labels. The staging workflow confirms every new regression rejects a targeted mutation, restores the original source, and reruns the healthy regression set. It distinguishes test failures from compilation or test-selection errors.

Run the regression set with the repository’s pinned toolchain:

testledger -- cargo +1.94 test --locked -p tn-primary --lib quorum_

Public RPC nodes

A public RPC node is an observer that serves the JSON-RPC API to the internet. It answers reads from its own copy of the chain. With --forward-txs, it also relays every eth_sendRawTransaction and eth_sendRawTransactionSync call to a dedicated validator and returns that validator’s answer to the client. The validator’s RPC address stays private: only the public nodes dial it, and no client ever sees it.

Without --forward-txs, an observer puts a submitted transaction into its own pool and forwards it later, in the background, to the committee validator that owns the sender, at the RPC endpoint that validator advertises in its node record (see Observer). That path needs validators to publish an RPC endpoint, and the client receives a hash before any validator has accepted the transaction. With --forward-txs, the client waits for the validator’s verdict, and the validator receives nothing from the public nodes except transactions.

How forwarding works

The node replaces the two submission methods on every transport that serves the eth namespace: HTTP, WebSocket and IPC. Every other method is served locally, as on any observer.

  • eth_sendRawTransaction: the node runs its local checks (the --rpc.txfeecap guard, plus the sanitize checks when enabled), then sends the client’s bytes to the first target as eth_sendRawTransaction. The target’s hash or error object goes back to the client. The node’s own transaction pool is never touched.
  • eth_sendRawTransactionSync: the node runs the same checks, forwards a plain eth_sendRawTransaction, then waits up to 30 seconds for the transaction’s receipt on its own chain. The validator only ever receives eth_sendRawTransaction, so a client cannot hold a validator connection open for the confirmation wait.

Validator side

Pick one validator, or a small set, to receive the public nodes’ transactions. On each of those validators:

  1. Enable the HTTP RPC server with --http, and bind it with --http.addr to an interface the public nodes can reach. The default address is 127.0.0.1. The default module set includes eth, which is the only namespace forwarding uses.
  2. Firewall the RPC port (TCP, --http.port, default 8545) so that only the public nodes’ static IP addresses can connect. Share the address only with the operators who run the public nodes.
  3. Protect the link. Plain http:// sends every signed transaction in cleartext between the public node and the validator. Use an https:// target or a private link such as a VPN or a peered private network. The node’s RPC server has no TLS option of its own, so an https:// target means a TLS-terminating reverse proxy in front of the validator’s RPC port.

For example, the validator adds these flags to its usual command line:

telcoin-network node \
    --http \
    --http.addr 10.20.0.5 \
    --http.port 8545

A node with several workers serves RPC per worker: worker 0 listens on --http.port and worker k listens 200 × k ports below it. Point the public nodes at the worker 0 port.

A target URL may carry a path for a reverse proxy, and a user:password@ prefix, which is sent as an HTTP basic-auth header. Percent-encoded characters in the userinfo are decoded before the basic-auth header is built, so user:p%40ss@ sends the password p@ss, and userinfo that does not decode to UTF-8 is refused at startup. A username without a password is refused at startup, because the node would send no credentials for it. Over plain http:// those credentials travel in cleartext too.

Public node configuration

FlagDefaultDescription
--forward-txs <TARGET[,TARGET...]>noneComma-separated, ordered failover list of validator RPC targets. Also read from TN_FORWARD_TXS.
--sanitize-txsfalseDecode and check each transaction locally before forwarding. Requires --forward-txs.

The list is one value. Passing --forward-txs twice is an error rather than a merge. When both the flag and TN_FORWARD_TXS are set, the flag wins. Prefer the environment variable: it keeps the targets out of the process command line, which other users on the host can read with ps, and --help never prints its value.

export TN_FORWARD_TXS='https://tx.validator.example.com,10.20.0.5:8545'
telcoin-network node \
    --datadir /var/lib/telcoin \
    --chain adiri \
    --http --http.addr 0.0.0.0 \
    --ws --ws.addr 0.0.0.0 \
    --metrics 127.0.0.1:9101 \
    --sanitize-txs

A malformed list stops the node at startup. The error names the faulty entry by its position in the list, but the command-line parser also quotes the whole value it refused, whether it came from the flag or from TN_FORWARD_TXS. A list that carries user:password@ credentials therefore prints them to stderr, so keep that output out of shared logs and support tickets. The node does not dial any target at startup, so an unreachable target does not stop it; the first submission that reaches it fails over. At startup the node logs one info line, forwarding raw transaction submissions, with the number of targets and the sanitize setting. The node’s own log lines and its metrics name a target by its index in the list, never by its URL, and no client response names a target at all. The HTTP library underneath does log the address it dials: each new connection to a target writes connecting to <ip:port> and connected to <ip:port> at debug. The default --log.file.filter debug puts those lines in the node’s log file, and stdout carries them too whenever it logs at debug, through -vvvv or a RUST_LOG that enables debug. To keep target addresses out of both, add --log.file.filter "debug,hyper_util::client::legacy::connect=info" and --log.stdout.filter "hyper_util::client::legacy::connect=info" to the node’s flags. Treat this as hygiene, not protection: the firewall is what protects the validator, and the setup must stay safe if its address becomes known.

Target syntax

Each entry is trimmed and normalized to the URL the node dials.

EntryDialsRule
https://tx.validator.example.comhttps://tx.validator.example.com, port 443A URL keeps its scheme’s default port: 443 for https, 80 for http.
https://proxy.example.com:9443/tn/rpcas writtenA URL may carry a port and a path. Query strings and fragments are refused.
10.20.0.5:8545http://10.20.0.5:8545/ip:port.
10.20.0.5http://10.20.0.5:8545/An address without a port dials 8545.
fd00::5http://[fd00::5]:8545/A bare IPv6 address always dials 8545 and cannot carry a port: fd00::5:8566 is the address fd00::5:8566 on port 8545.
[fd00::5]:8566http://[fd00::5]:8566/Bracket an IPv6 address to name a port.
[fd00::5]http://[fd00::5]:8545/A bracketed IPv6 address without a port dials 8545.
validator.example.comhttp://validator.example.com:8545/host[:port], where the host is an IPv4 address or a domain name; the port defaults to 8545.
validator.example.com:8566http://validator.example.com:8566/host:port.

The rest of the rules:

  • An entry without a scheme dials plain http://, so a TLS target always needs the https:// prefix.
  • A URL must use http or https and name a host. Port 0 is refused.
  • An entry without a scheme is host[:port] only: no path, no credentials. Use a full URL for those.
  • The list may name at most 8 targets.
  • Empty entries, including the ones a leading, doubled or trailing comma creates, are refused.
  • Two entries that normalize to the same URL are refused. 10.20.0.5, 10.20.0.5:8545 and http://10.20.0.5:8545 are all the same target.
  • Domain names are resolved when the node connects, not at startup, so a DNS change takes effect on the next connection. The name is also what TLS verifies.
  • A target must be a validator that takes submissions itself. Never point a target at the node itself or at another node that forwards. A target that leads back to a forwarding node, directly or through other public nodes, passes each submission around until the attempt times out and this node moves to its next target, so clients receive -32603 only when every target loops. A chain that ends at a validator misbehaves too. The middle node spends up to 15 seconds on its own failover, so this node can give up after its 5-second attempt and move on while the middle node still delivers the transaction. When the middle node reaches none of its targets, its own -32603 reaches this node as a JSON-RPC error, so it goes to the client unchanged, counts as upstream_error and is never failed over.

Failover

The list order is the failover order. For each submission the node tries the targets one at a time, healthy targets first in list order, then demoted targets in list order.

The node moves to the next target only when an attempt fails below the JSON-RPC layer:

  • the connection is refused, reset or cannot be made;
  • no reply arrives within 5 seconds, including the wait for a free request slot;
  • the target answers with a non-2xx HTTP status other than 413;
  • the response body is larger than 64 KiB;
  • the target answers 2xx with a body that is not a JSON-RPC reply to the request.

A JSON-RPC error reply never triggers failover. The target answered, so its verdict (nonce too low, already known, replacement transaction underpriced, and so on) goes back to the client unchanged and no other target is tried. A target that answers HTTP 413 (request too large) does not trigger failover either: the request is at fault, not the target, and every other target would receive the same upload. The client receives the oversized-request error and the target keeps its place.

A target that fails an attempt is demoted for 30 seconds: during that time it is tried only after every healthy target. When the 30 seconds run out, one submission tries the target in its place in the list as a probe, and the others keep trying it last until the probe succeeds or fails. A target that still hangs therefore costs one 5-second wait per cooldown, not one per submission. A target that answers, with a hash or with a JSON-RPC error, returns to its place in the list at once. Demoted targets are still tried, so a list whose targets are all demoted keeps working as soon as one of them recovers.

One submission spends at most 15 seconds across all targets. Each attempt gets 5 seconds or whatever remains of the 15, whichever is less, so at most three targets that time out are tried; a target that refuses the connection fails fast and leaves the budget for the next one. An attempt that the budget cuts short of 5 seconds neither demotes its target nor counts as a failure, since the target never had its full 5 seconds. When every target has failed or the budget runs out, the client receives the fixed unavailable error and the node logs a warn line, at most once every 30 seconds. Each failed attempt, and each JSON-RPC error a target returns, is logged at debug under the target tn::rpc::forward, naming the target by its index in the list.

At most 128 requests are in flight to one target at a time. Further submissions wait for a slot inside their 5-second attempt timeout. This bounds the load one public node can put on its validator. All worker lanes of the public node share one forwarder: one ordered list, one demotion state, one connection pool and one set of metrics per process.

Sanitizing submissions

--sanitize-txs decides how much the public node checks before a transaction reaches the validator.

Off (the default), the node checks only --rpc.txfeecap. With the default cap of 0 it decodes nothing, and the client’s bytes go to the validator exactly as received. With a cap set, it decodes each transaction, without recovering the signer, to price it, so empty and undecodable bytes are refused locally as well. Anything that passes, including junk, reaches the validator, which spends its own CPU on decoding and signature recovery before it refuses it.

On, the node runs these checks in order and refuses the transaction locally at the first one that fails, with the error object a non-forwarding Telcoin Network node returns for a transaction with that one defect:

  1. The bytes are empty.
  2. The bytes do not decode as a signed transaction. The network form of an EIP-4844 transaction decodes here and is refused at step 5.
  3. The maximum fee is above --rpc.txfeecap.
  4. The signer cannot be recovered, which includes signatures with a high s value.
  5. The transaction type is not legacy, EIP-2930 or EIP-1559. EIP-4844 blob and EIP-7702 transactions are refused.
  6. The transaction names a chain id other than the node’s. A legacy transaction without a chain id passes.

Nonce, balance and fee-market checks stay with the validator. So do the data size, gas limit and tip checks, which a validator runs before the chain id check, so a transaction with several defects can receive a different error from the public node than from a validator; both refuse it. Sanitizing costs one decode and one signature recovery per submission on the public node. In return the validator receives only well-formed, signed transactions of an allowed type for this chain. Turn it on for any node that faces the internet.

Errors

SituationClient receives
The validator accepts the transactionThe validator’s transaction hash. For eth_sendRawTransactionSync, the receipt from the public node’s own chain, or reth’s confirmation-timeout error if the transaction does not execute within 30 seconds.
The validator returns a JSON-RPC errorThat error object unchanged: code, message and data.
Over --rpc.txfeecap (with or without sanitizing)-32000 tx fee (X wei) exceeds the configured cap (Y wei), from the public node.
Sanitize: empty, undecodable, or bad signature-32602 empty transaction data, failed to decode signed transaction, or invalid transaction signature.
Sanitize: EIP-4844, EIP-7702, or another type outside the allowlist-32003 transaction type not supported.
Sanitize: wrong chain id-32000 invalid chain ID.
A target answers HTTP 413 (request too large)-32007 Request is too big, with no data. No other target is tried.
One target failsNothing. The next target is tried.
Every target fails, or the 15-second budget runs out-32603 transaction submission unavailable, with no data.

The unavailable error is one fixed object. It names no target and carries no timing detail, so a client cannot learn the validator’s address or which target failed.

A timeout does not mean the validator refused the transaction. If the validator accepted it but its reply took longer than 5 seconds, the public node moves on: the next target may answer already known, and if no target answers, the client receives -32603. Either way the transaction can still execute. A client that retries the same signed bytes receives the validator’s already known error. Treat that as accepted and follow the transaction by hash with eth_getTransactionReceipt. If the retry lands on a different validator, both may hold the transaction; it still executes only once.

Limitations

  • A forwarded transaction is not in the public node’s pool. Until it executes, eth_getTransactionByHash on that node returns null for it, and eth_getTransactionCount with the pending tag does not count it. A wallet that takes its next nonce from the pending count on the same node reuses a nonce when it sends a second transaction before the first executes, so send several transactions in a row only from a client that tracks its own nonces.
  • eth_sendTransaction is not forwarded. It fails with unknown account, as on every Telcoin Network node (see eth_sendTransaction).
  • Every worker lane on the public node forwards to the same list, and a target is the validator’s worker 0 endpoint, so the validator’s worker 0 receives every forwarded transaction.
  • On a public node with several workers, lane k’s eth_gasPrice quotes worker k’s base fee, but the transaction lands on the validator’s worker 0 lane, whose base fee may differ. A transaction priced for lane k can sit below worker 0’s base fee: the client receives a hash, and eth_sendRawTransactionSync times out.
  • A JSON-RPC batch is not forwarded as a batch. Each submission in it is forwarded as its own request and uses its own request slot.
  • Submissions over WebSocket and IPC are forwarded the same way as over HTTP.
  • eth_sendRawTransactionSync waits for the receipt on the public node, so a public node that lags the chain returns the confirmation-timeout error for transactions that did execute.

Metrics

With --metrics, the public node exports two counters. Both are registered at zero at startup, every label combination included, so a missing series means forwarding is off.

MetricLabelsCounts
tn_reth_rpc_tx_forwarded_totaloutcome: accepted, upstream_error, rejected_locally, unavailableEvery submission, by how it ended.
tn_reth_rpc_tx_forward_target_failures_totaltarget: the target’s position in the list, starting at 0; kind: timeout, transport, malformedEvery failed attempt against one target.

The outcomes split all submissions the forwarding handler received:

  • accepted: a target returned a hash.
  • upstream_error: a target returned a JSON-RPC error, which the client received unchanged, or a target answered HTTP 413 and the client received -32007. This is normal traffic: nonce too low, already known, underpriced. Alert when it climbs while accepted stays flat: a target that answers every request with an error, such as method not found from a port that does not serve the eth namespace, is never failed over.
  • rejected_locally: the fee cap or a sanitize check refused the transaction before any target saw it.
  • unavailable: no target answered and the client received -32603. Alert on any increase: while it lasts, the node refuses every submission.

The failure kinds:

  • timeout: no reply within the attempt timeout.
  • transport: the connection failed, the target answered with a non-2xx status other than 413, or the body was over 64 KiB, empty, or not JSON (an HTML error page from a proxy, for example).
  • malformed: the target answered 2xx with JSON that is not a JSON-RPC reply to the request: it does not parse as a JSON-RPC response, carries another request’s id, or its result is not a transaction hash.

Labels name a target by its index, never by its URL. The target list is private configuration, and a metrics endpoint is not.

Running on a committee member

--forward-txs is meant for observers. A committee member started with it keeps running and logs one warn line per process. Its RPC submissions then bypass its own pool and go to the targets, so its own workers never batch the transactions sent to its RPC.

Why the node forwards

Two other designs were considered. A gateway process in front of the observer would put a buffering HTTP/1-only hop in front of every read, with no WebSocket and no HTTP/2, and it would need its own signer recovery, request routing, batch splitting and TLS client. A separate public-RPC binary would duplicate both the gateway and the node. Forwarding inside the node changes only the two submission methods, keeps reads on HTTP, WebSocket and IPC exactly as before, reuses the fee-cap guard and the node’s decode helpers, and runs as one process per public node.

Possible extension

An opt-in pool mirror could also insert each forwarded transaction into the public node’s own pool, without that pool forwarding it a second time, so eth_getTransactionByHash and the pending nonce on the public node see it before it executes. It is not built.

Reading Blockchain Data

Since blockchains only require payment (gas) to change their state, reading from a blockchain is completely free.

Note

‘State’ is the term used to describe the values of all variables stored within the blockchain.

When we read from the blockchain, we simply observe the state of the blockchain, and do not change it. We are therefore not required to pay any gas fees for this action.

Since we do not have to pay gas, we do not need to hold any gas, and we therefore do not even need a wallet! (This will come later).

cURL requests

Certain nodes running the Telcoin Network have a Remote Procedure Call (RPC) endpoint. These endpoints are a type of Application Programming Interface (API) which allows users to execute a procedure ( a piece of code) on the network as if it occurred locally.

RPCs have a few key components:

  • Client - The system initiating the RPC request - i.e. the user/ developer’s machine
  • Server - The system that receives and processes the RPC request - i.e. the Telcoin Network node.
  • Protocol - Defines the rules and conventions for data exchange between the client and server - i.e. the Telcoin network source code running on the Telcoin Network node.

Using cURL to Make RPC Calls

cURL is a command-line tool used to transfer data to and from a server using various protocols, including HTTP, HTTPS, FTP, and more. In the context of RPC, cURL can be used to send HTTP POST requests to an RPC server and receive responses. This is what we will demonstrate here.

Warning

All commands throughout the documentation will be focused on use with Unix-like (e.g. macOS, WSL2) systems.

eth_blockNumber

The eth_blockNumber method is one of the simplest RPC calls to make. From the documentation we see it takes no arguments (parameters) - the ‘parameters’ section shows None, and it returns one value representing the current block number of the network.

Request

To query this method, we can simply copy the code from the ‘Request’ section of the page:

curl https://rpc.adiri.tel \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}'

Let’s break down this command:

  • curl https://rpc.adiri.tel: Specifies the URL of the Ethereum RPC endpoint. This is the URL that one of the Telcoin Network Adiri Testnet nodes is accessible from.
  • -X POST: Indicates that the request is a POST request.
  • -H "Content-Type: application/json": Sets the content type of the request to JSON.
  • --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}': Provides the JSON data for the request. This JSON object includes:
    • "jsonrpc": "2.0": The version of the JSON-RPC protocol being used.
    • "method": "eth_blockNumber": The RPC method being called.
    • "params": []: An empty array, as this method does not require parameters.
    • "id": 83: An arbitrary identifier for the request. This could be any numerical value.

Executing the command

paste the above command into your command line and press ‘Enter’. You should receive a response.

Response

The response should look something like:

{
"jsonrpc":"2.0",
"result":"0x7328cb", //7547083
"id":83
}

Note:

  • "jsonrpc": "2.0": Confirms the JSON-RPC protocol version.
  • "result": "0x7328cb": The hexadecimal value of the current block number.
  • "id": 83: The ID of the request, matching the one sent.

Programmatic Requests

We can also write a simple script to make cURL requests. This will allow us to build around the RPC responses. This will make it easier to call different endpoints with different arguments and handle data that we receive from the RPC calls.

First, let’s set up the typescript project.

  1. check node and npm (node package manager) versions:

In your terminal, enter:

node --version
npm --version

It should give something like:

v18.17.1
10.1.0

If these packages are not installed, run:

sudo apt install nodejs npm
  1. Create a project directory and navigate into it:
mkdir telSimpleCalls
cd telSimpleCalls
  1. Open a new VsCode (or alternative IDE) window of your directory:
code .
  1. Initialise a new project:
npm init -y
  1. As we will need typescript and axios packages, we install them using:
npm install typescript axios
  1. Initialise the TypeScript configuration:
npx tsc --init

This command creates a tsconfig.json file in your project directory. You can leave the settings as default.

You should now have your TypeScript project set up! Let’s get into writing some scripts!

eth_blockNumber

Building the Script

  1. Create a TypeScript file in the project folder you created above:
touch index.ts
  1. Open the file and paste the following code in:
import axios from "axios";

const rpcUrl = "https://rpc.adiri.tel";
const data = {
    jsonrpc: "2.0",
    method: "eth_blockNumber",
    params: [],
    id: 1,
  };

const headers = {
    "Content-Type": "application/json",
  };

async function fetchData() {
    const response = await axios.post(rpcUrl, data, { headers });
    console.log(response.data);
}

fetchData();
  1. Let’s run through what each line does:
import axios from "axios";

This line imports the Axios library, which we installed earlier using npm. It is used for making HTTP requests (similar to curl).

const rpcUrl = "https://rpc.adiri.tel";

This creates a new variable named rpcUrl to which we assign the url of the Telcoin RPC server.

const data = {
    jsonrpc: "2.0",
    method: "eth_blockNumber",
    params: [],
    id: 1,
};

This creates an object named data where we include the data for our request. This layout is standard for JSON-RPC requests within Ethereum Virtual Machine (EVM) based networks (of which Telcoin Network is one). The individual fields are:

  • jsonrpc: Specifies the JSON-RPC protocol version, which is 2.0 for EVM requests.
  • method: Indicates the JSON-RPC method being called, eth_blockNumber in this case. This method returns the number of the most recent block.
  • params: An array of parameters to be passed to the method. As eth_blockNumber takes no input arguments, parameters is left as an empty list.
  • id: A unique identifier for the request. This is used to match responses with requests when multiple JSON-RPC calls are made asynchronously. This can be set to any integer.
const headers = {
    "Content-Type": "application/json",
};

This is used to inform the server that the request body format is JSON. This is always the case with RPC calls.

async function fetchData() {
        const response = await axios.post(rpcUrl, data, { headers });
        console.log(response.data);
}

This is the main function to fetch the desired data. Note that it is labelled as async. This allows us to use the await keyword to handle promises asynchronously. Also note it takes no arguments.

The main thing this does is use axios.post to make a POST request to the RPC URL. It sends the data object we created earlier and includes the headers. This is all required because that’s just how HTTP requests work!

Upon running the line const response = await axios.post(rpcUrl, data, { headers }), axios posts the content to the RPC node and immediately receives a promise. This response will eventually resolve to the response of the HTTP request. The await keyword pauses execution of the script until the promise resolves and returns the desired information. This requested information, which in our case is the blocknumber, is saved to a variable named response.

response is another object containing a number of key-value pairs. Of these keys, we are interested in the data key, so we access this directly using response.data. This is then printed to the console (or terminal in our case).

fetchData();

Finally, fetch data is called. This runs the code within the fetchData function.

Running the Script

To run the script, we first compile the TypeScript to JavaScript by running:

npx tsc

This should create a new file named index.js in your root folder. We then run this with the command:

node index.js

Response

The console should give a response that looks something like:

{ jsonrpc: '2.0', result: '0x789f67', id: 1 }

Here we see the RPC node returns:

  • The JSON-RPC protocol version, which matches the one we specified.
  • The ‘result’ which in this case is the hexadecimal value representing the current integer block number of Telcoin Network.
  • The id, which we had specified as 1 in our request.

If this worked, well done! We’ve covered some fundamentals of getting started in blockchain development. Now we can look at some more involved requests.

If it didn’t, feel free to reach out to one of us in the Telcoin discord.

eth_call

Here we demonstrate how to use eth_call using TypeScript scripts.

Method Parameters

From the RPC method reference we see eth_call takes a number of arguments, some of which are optional. These are recreated below:

Object - The transaction call object:

  • from: DATA, 20 bytes - (optional) The address the transaction is sent from.
  • to: DATA, 20 bytes - The address the transaction is directed to.
  • gas: QUANTITY - (optional) Hexadecimal value of the gas provided for the transaction execution.
  • eth_call consumes zero gas, but this parameter may be needed by some executions.
  • gasPrice: QUANTITY - (optional) Hexadecimal value of the gasPrice used for each paid gas.
  • maxPriorityFeePerGas: QUANTITY - Hexadecimal maximum fee, in Wei, the sender is willing to pay per gas above the base fee.
  • maxFeePerGas: QUANTITY - Hexadecimal maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas.
  • value: QUANTITY - Hexadecimal of the value sent with this transaction.
  • data: DATA - (optional) Hash of the method signature and encoded parameters. See Ethereum contract ABI specification.

block parameter: QUANTITY|TAG [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized. See the default block parameter.

From this description, we can see we are expected to pass two variables:

  • an object, comprised of some or all of the keys within it (e.g. from, to), and their associated values.
  • the block parameter

Selecting Parameters

For this example, we will only use eth_call to read some data. As reading state from the blockchain does not involve changing state, we do not need gas. As a result, we will not include the gas , maxPriorityFeePerGas, maxFeePerGas or gasPrice parameters. Similarly, reading state from the blockchain does not require an account. Therefore, we are not required to provide a from argument to the method call. As we are not writing any values to the blockchain we can also omit the value parameter.

Thus, we only need to provide values for:

  • to, the address of the contract with which we wish to interact.
  • data, the information specifying the manner in which we interact with the contract.
  • block parameter, the block we would like to read from.

Updating Request Script

We can begin by amending our code from the previous example to prepare for this new method call.

Previously, our script was:

import axios from "axios";

const rpcUrl = "https://rpc.adiri.tel";
const data = {
    jsonrpc: "2.0",
    method: "eth_blockNumber",
    params: [],
    id: 1,
  };

const headers = {
    "Content-Type": "application/json",
  };

async function fetchData() {
    const response = await axios.post(rpcUrl, data, { headers });
    console.log(response.data);
}

fetchData();

As we will still be using axios, calling the same URL and using the same protocol (JSON), most of our script remains the same as before. The only changes occur in the data variable, where we want to use the eth_call method instead of eth_blockNumber, and we will need to pass some information into params.

Let’s start by making these changes to the data variable. The new data variable will be of the form:

const data = {
      jsonrpc: "2.0",
      method: "eth_call",
      params: [
        {
          to: "",
          data: "",
        },
        "latest",
      ],
      id: 1,
    };

Here we see we have the toand datakeys in our parameters object, and we will be querying at the latest block. We have also updated the method we are calling to eth_call. We now need to find values for toand data.

For this example, we will consider the Telcoin AUD token which has contract address 0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486. This will be our value for our to parameter.

Function Selector

Telcoin stablecoins are modified ERC-20 tokens. For this example we will use the ERC-20 getter function ‘name()’ to demonstrate the use of eth_call.

Since we know ‘name()’ is a function on the smart contract, and we see it takes no arguments, we can pass this into the data field of our parameters object. There is one slight caveat - the EVM will not understand the function call ‘name()’, but will only accept the ‘0x’ prefixed first four bytes (8 characters in hexadecimal) of the Keccak-256 hash of name(). These four bytes (with the ‘0x’ prefix) are known as the function selector. Let’s run through this:

The function selector for name() can be computed from its signature ("name()"), which hashes to:

06fdde0383f15d582d1a74511486c9ddf862a882fb7904b3d9fe9b8b8e58a796

(This can be computed using an online Keccak-256 hash calculator such as this one). Taking the first 4 bytes (8 characters) gives:

06fdde03

and adding the ‘0x’ prefix gives:

0x06fdde03

This is the string we place in the data field.

Updated Data Variable

Bringing this all together, our new data variable should be:

const data = {
      jsonrpc: "2.0",
      method: "eth_call",
      params: [
        {
          to: "0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486",
          data: "0x06fdde03",
        },
        "latest",
      ],
      id: 1,
    };

Updated Script

Our script should be:

import axios from "axios";

const rpcUrl = "https://rpc.adiri.tel";
const data = {
      jsonrpc: "2.0",
      method: "eth_call",
      params: [
        {
          to: "0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486",
          data: "0x06fdde03",
        },
        "latest",
      ],
      id: 1,
    };

const headers = {
    "Content-Type": "application/json",
  };

async function fetchData() {
    const response = await axios.post(rpcUrl, data, { headers });
    console.log(response.data);
}

fetchData();

Running the Script

To run the script, we first compile the TypeScript to JavaScript by running:

npx tsc

Then run this with the command:

node index.js

Result

The console should give the following response:

{
  jsonrpc: '2.0',
  result: '0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b54656c636f696e20415544000000000000000000000000000000000000000000',
  id: 1
}

Here we see the RPC node returns:

  • The JSON-RPC protocol version, which matches the one we specified.
  • The ‘result’ which in this case is the hexadecimal value representing the name of the token at the contract address 0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486.
  • The id, which we had specified as 1 in our request.

Decoding the Result

The result received from the RPC node is:

0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b54656c636f696e20415544000000000000000000000000000000000000000000

This is likely not the expected result - we expected ‘Telcoin AUD’ as the output. We need to decode this string and see what we get. Starting from the most significant byte (the leftmost) we get:

‘0x’ prefix

The 0x prefix indicates the following string is in hexadecimal format. From this point on, the data is organised into 32 byte (64 character) chunks.

Offset

The first 32 bytes symbolise the offset of the value. In this case, the 32 bytes after the 0x prefix are: 0000000000000000000000000000000000000000000000000000000000000020. This value, converted from hexadecimal, is 32 (it contains a ‘2’ in the ’16’s column, signifying 32). This means that the actual data starts in 32 bytes time (i.e. at byte 64). The 32 bytes in between this offset value and the actual data gives us the length of the data.

Length

The next 32 bytes, 000000000000000000000000000000000000000000000000000000000000000b, tell us the data we are interested in is 11 bytes long.

Actual data

Reading 11 bytes (22 characters) from byte 64 (the next byte along) gives: 54656c636f696e20415544. This can be converted directly from hex to a string using an online tool such as this one. It translates to ‘Telcoin AUD’, exactly as expected!

The remaining zeroes in the response are just padding to ensure each section of data is 32 bytes long.

Conclusion

And there we have it! We’ve learned to use scripts to query more advanced data straight from the blockchain with very few dependencies. We’ve also learned how to decode data we receive from RPC nodes.

Libraries

Ethers.js

Ethers.js is a library which abstracts away many of the complexities associated with interacting with EVM blockchains.

Here we will run through the eth_call example in two different ways, this time using ethers.js.

First, we need to install ethers into our project.

Installation

Simply install ethers using node package manager (npm):

npm install ethers

Setup

Create a new script named ‘ethers_call.ts’ and open it.

We begin by importing ethers into our script. It is easiest to import everything from ethers to begin with. This is done with the line:

import { ethers } from "ethers";

From here, we need to connect to the RPC node (ethers still needs to know where to get the information we need from). This introduces the idea of a provider. A Provider is a read-only connection to the blockchain. Ethers also has another object, the Signer, which uses an RPC node along with a private key to allow write access to the blockchain. We will cover this later.

We create a provider instance with the line:

const provider = new ethers.JsonRpcProvider("https://rpc.adiri.tel");

This establishes the connection to the RPC node and gives us an object on which we can call ethers functions.

Simple use

A simple function to start is just getting the block number. If we write the script:

import { ethers } from "ethers";

// Set up the provider to connect to an Ethereum node
const provider = new ethers.JsonRpcProvider("https://rpc.adiri.tel");

async function fetchData() {
  console.log(await provider.getBlockNumber());
}
fetchData();

and run it, we should print the current block number to the console. Note it prints a decimal integer value, rather than the hexadecimal we got when calling the node using HTTP requests. Ethers handles the conversion automatically.

Using call()

Our eth_call example becomes slightly simpler too:

import { ethers } from "ethers";

// Set up the provider to connect to an Ethereum node
const provider = new ethers.JsonRpcProvider("https://rpc.adiri.tel");

async function fetchData() {
  const result = await provider.call({
    to: "0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486",
    data: "0x06fdde03",
  });

  // Log the result
  console.log("Response Data:", result);
}

fetchData();

This, when run should give the response:

0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b54656c636f696e20415544000000000000000000000000000000000000000000 as before.

Directly calling functions

There is, however, an alternative approach to getting the name of the token, or calling any other read function on a given contract. This involves creating an ethers Contract instance, which requires a contract address, a provider and the contract Application Binary Interface (ABI). We have the first two, and the third is available here. The ABI provides ethers with important context relating to a contract’s functionality and how to interact with it.

Handling the ABI

In your project’s root folder, create a file named ‘ABI.json’ and copy and paste the ABI from the documentation link. The ABI is produced by the solidity compiler and is derived from the solidity smart contract code.

We can then import this information to our script using the built in fs (File System) and path modules:

const abiPath = path.join(__dirname, 'ABI.json');
const abiJson = fs.readFileSync(abiPath, 'utf8');
const abi = JSON.parse(abiJson);

In the above 3 lines we:

  1. create the string representing the path to the ABI.json file
  2. Read the data stored within the ABI.json file
  3. convert the read data to JSON format for use with ethers.

Creating the Contract Object

We now have all the components required to create an ethers Contract object which we can do in the following way:

// Create the contract instance with the provider
  const contract = new ethers.Contract(
    "0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486",
    abi,
    provider
  );

Here we have provided the contract address, ABI and provider to create a new instance of a Contract object which we save to the variable named contract. More information can be found in the relevant section of the documentation.

All that is left is for us to use the contract. We can do this easily by calling the function names as they appear on the smart contract. In our case, we know the token inherits from the ERC 20 token standard. It will therefore have a getter function named name() (this is the one we have been calling up to now). To get the name of the token we write:

const name = await contract.name();

Building the Script

Putting all of these elements together might give us something like:

import { ethers } from "ethers";
import fs from "fs";
import path from "path";

const provider = new ethers.JsonRpcProvider("https://rpc.adiri.tel");

async function fetchData() {
  const abiPath = path.join(__dirname, "ABI.json"); // Adjust the path as necessary
  const abiJson = fs.readFileSync(abiPath, "utf8");
  const abi = JSON.parse(abiJson);

  const contract = new ethers.Contract(
    "0xc9593289e95938FC4170B3Fc51dbcCa0A46b4486",
    abi,
    provider
  );

  const name = await contract.name();
  console.log("Contract Name:", name);
}

fetchData();

Feel free to overwrite the previous code from the ‘Using call()’ section.

Running the Script

We run this with:

npx tsc

which compiles our typescript scripts to JavaScript, followed by:

node ethers_call.js

Response

The script should return:

Contract Name: Telcoin AUD

Note the string has been automatically converted from hexadecimal.

Reading Decimals

It is also very easy to call other functions on the contract - we just change the function name. For example, we can now easily query how many decimals this contract uses, by replacing:

const name = await contract.name();

with:

const name = await contract.decimals();

recompiling and rerunning the script gives:

Contract Name: 6n

Showing the contract uses 6 decimals. This is correct.

Conclusion

Hopefully this series of tutorials has demonstrated how to query a blockchain, and the advantages of using libraries to gather data rather than raw HTTP requests. This should serve as useful context as you continue to learn about Telcoin Network!

Dapp Development

Telcoin Network runs a standard EVM, so dapps are built the same way as on Ethereum: write contracts in Solidity or Vyper, test them locally, and deploy over JSON-RPC.

Development Tools introduces Hardhat and Foundry, the two main development environments, and what each is suited for.

Development Tools

Now that we have an understanding of interacting with the blockchain, we can start to think about dapp development. There are two main tools used by developers in the web3 space; Hardhat and Foundry.

Hardhat

Hardhat builds on Ethers.js’ functionality and introduces more components which together provide a full development environment. Some of the main highlights include:

  • Scripting and testing in TypeScript/ JavaScript, making it useful for integration with front ends.
  • Provides the ability to create local forks of networks at previous or current blocks. This allows developers to test their contracts as if they were deployed on Telcoin Network - similar to a sandbox style environment.
  • Testing using chai and mocha for clean test code.

These features help Hardhat excel at contract deployment, and integration testing.

Hardhat has a thorough walkthrough and setup available here.

Foundry

Foundry is an extremely fast testing environment. Contrary to Hardhat, tests are written in solidity (rather than Type/JavaScript) and it also provides advanced testing features such as fuzzing and invariant testing.

Foundry has useful documentation on getting started here.

Faucet

1. Visit the Telcoin Network TEL Faucet

Visit https://telcoin.network/faucet on a desktop browser.

Mobile users may need to follow a different procedure based on their mobile wallet application. For example, MetaMask users must access the faucet webpage from the MetaMask application browser in order to interact with the faucet.

2. Press “Connect Wallet” Button

Select the wallet you would like to connect.

If your preferred wallet isn’t on the list, use WalletConnect to see additional supported wallets.

You may need to select “View All” to find wallets that are installed as browser extension or desktop applications. Mobile-based wallets are also supported through WalletConnect.

3. Request Tokens

Click on the “Request Tokens” button. The faucet will then send a specific amount of testnet tokens to the connected wallet’s address.

Users may need to import tokens to see updated balances in their wallets. If large amounts of testnet tokens are needed for your project, please email support@telcoin.org for further assistance!

4. Check Your Wallet

Open your wallet, and you should see the testnet tokens with an increased balance.

Telcoin Network: Adiri Testnet Details

You will be prompted to add the new network information. Enter the following details:

  • Network Name: Telcoin Network
  • RPC URLs:
    • https://adiri.tel
    • https://rpc.adiri.tel
    • https://node1.telcoin.network
    • https://node2.telcoin.network
    • https://node3.telcoin.network
  • Chain ID: 2017
  • Currency Symbol: TEL
  • Block Explorer URL: https://telscan.io (alternate: https://www.telscan.xyz)

Important Points to Remember

  • Testnet Tokens: The tokens received from the faucet are for testnet use only and have no real-world value.
  • Exploration and Learning: Use these tokens to explore the features and functionalities of the Telcoin Network, test smart contracts, or try out dApps in a risk-free environment.
  • Limited Quantity: There is a limit to the number of tokens you can request within a specific timeframe to ensure fair distribution among all users.
  • Developers sending multiple transactions in a row should connect to an RPC node directly using: https://node1.telcoin.network, https://node2.telcoin.network, or https://node3.telcoin.network

If you encounter any issues or need further assistance, feel free to email us at support@telcoin.org

Hardware requirements

GSMA MNOs have the exclusive right to operate validator nodes and earn network fees. This section is provided to support Telcoin Association’s authorized validator node operators. Telcoin (TEL) issuance is provided to Telcoin Network validators to incentivize the growth of a secure, compliant, efficient financial platform.

Purpose of node specifications

Minimum hardware, connectivity, and hosting requirements are specified to maintain consistent and efficient performance across Telcoin Network. These ensure that all nodes meet a foundational standard, contributing positively to the overall network’s health.

Pre-installation review

Operators are required to submit detailed specifications of their intended node setup to Telcoin Network development team for approval before installation. Please email support@telcoin.org with your proposed hardware specifications.

Summary

Each figure on this page comes from a code constant, from the resource model in How these numbers were derived, or from the benchmark described in that section. The validator disk IOPS figures instead come from the execution benchmark in Execution database: disk and memory, which ran on this release’s execution database. The benchmark ran on 2026-09-23 on two GCP fleets, and its results are in the benchmark report, also committed as bench/reports/2026-09-bench-10v.html in the tn-transaction-generator repository. On this page, e2 means the e2-custom-4-8192 fleet (4 vCPU, which is 2 physical cores, and 8 GB; run r20260923-0708) and c3 means the c3-highcpu-8 fleet (8 vCPU, which is 4 physical cores, and 16 GB; run r20260923-0515). Each cell below says whether its figure is measured, modelled or provisional, and its note gives the run and the sizing.json field or the formula behind it. The validator CPU and memory cells also name the measured single-worker figure they double (see Why validator CPU and memory are doubled). Benchmark sources and code references are listed at the end of the page.

RoleTierCPU (physical cores, PassMark single-thread)RAMStorage (capacity, sustained IOPS, MB/s, DWPD)Network
ValidatorMinimum8 physical cores (twice the measured 4) 1 232 GB ECC (twice the measured 16 GB) 3 22 TB TLC NVMe, 20,000 sustained write IOPS and 800 MiB/s (about 840 MB/s) (both measured on this release’s execution database in storage layout v2), 2.4 DWPD (modelled from measured demand) 4 5200 Mbps symmetric (measured demand, modelled margin) 6
ValidatorRecommended16 physical cores, PassMark 3,500 or higher (twice the minimum; PassMark modelled) 7 264 GB ECC (twice the minimum) 8 24 TB TLC NVMe: local NVMe, or 40,000 sustained IOPS and 800 MiB/s or more on cloud block storage (measured on this release’s execution database in storage layout v2), 1.2 DWPD (modelled from measured demand) 9 51 Gbps (measured demand, modelled margin) 6
ValidatorHeadroomAs recommended (modelled) 1064 GB ECC (as recommended) 10 212 TB, otherwise as recommended (modelled) 111 Gbps (modelled) 10
Observer (follower)Minimum2 physical cores (measured) 128 GB (measured) 12As validator minimum (measured demand) 1350 Mbps (measured demand, provisional figure kept) 14
Observer (follower)Recommended4 physical cores (measured) 1516 GB (measured) 15As validator recommended (measured demand) 1350 Mbps (measured demand, provisional figure kept) 14
Observer (follower)Headroom4 physical cores (modelled) 1016 GB (modelled) 1012 TB, as validator headroom (modelled) 1150 Mbps (modelled) 14
Observer (public RPC)Minimum4 physical cores (modelled) 1616 GB (modelled) 16As validator minimum (measured demand) 1350 Mbps plus RPC traffic (RPC not measured) 16
Observer (public RPC)Recommended8 physical cores (provisional, RPC not measured) 1632 GB (modelled) 16As validator recommended (measured demand) 13Sized for RPC traffic (not measured) 16
Observer (public RPC)Headroom8 or more physical cores, scaled to RPC load (not measured) 1664 GB (modelled) 1612 TB, as validator headroom (modelled) 11Sized for RPC traffic (not measured) 16

Every validator tier also needs a p95 round-trip time well below 1 s to at least 7 of the 10 committee members (see Networking).

The tiers mean:

  • Minimum: the smallest configuration that kept up with the benchmark’s mixed phase without memory or IO stalls, with enough memory for the restart replay peak described under Memory.
  • Recommended: enough margin that p95 use of CPU, memory, disk IOPS and bandwidth stays below half of capacity at the benchmark load, plus one year of storage growth at the per-epoch batch-cache ceiling (about 260 TPS with the 6-hour epochs mainnet and testnet use). Storage keeps that figure as its planning load, although the batch cache no longer limits throughput to it.
  • Headroom: sized for the same planning load, including restart replay at that load and three years of storage growth. That load is under a thirteenth of what the benchmark ran, so the recommended CPU, memory and network already cover it. Headroom beyond Recommended is about storage growth and RPC caching, not throughput.

Those rules describe the single-worker validators the benchmark ran, and Single-worker figures from the benchmark lists what they gave: 4 physical cores and 16 GB minimum, 32 GB recommended. The validator CPU and memory tiers above are twice that, a margin for the worker count that governance is expected to raise above one over the next 12 months. The minimum tier is twice the measured single-worker minimum, and the recommended tier is twice the minimum. Storage and network keep their derived figures, and the observer tiers are not doubled. Why validator CPU and memory are doubled says what each worker adds, and Expected service life says how long each tier lasts.

Neither fleet’s 100 GB network-attached volume ran free of IO stalls (see Storage), so the disk capacity, throughput and endurance figures come from measured demand plus margin, not from a tested volume. The validator IOPS figures come from cloud volumes tested with this release’s execution database 5.

Cloud vCPUs are usually hyperthreads, so 8 vCPUs are 4 physical cores, and the minimum tier’s 8 physical cores are a 16-vCPU instance. Compare physical cores when reading this table.

Single-worker figures from the benchmark

The tier rules applied to the benchmark’s validators, which ran one worker each, give these figures. The summary doubles the CPU and memory and carries storage and network over unchanged.

TierCPU (physical cores)RAMIn the summary
Minimum4 (measured) 116 GB (measured) 38 cores, 32 GB ECC
Recommended4, PassMark 3,500 or higher (cores measured, PassMark modelled) 732 GB (measured) 816 cores, 64 GB ECC
HeadroomAs recommended (modelled) 1032 GB (modelled) 10As recommended, 64 GB ECC

Why validator CPU and memory are doubled

The benchmark ran one worker per validator, the count adiri runs today 17. The worker count is an on-chain parameter. At each epoch entry the node reads WorkerConfigs at the previous epoch’s closing block and builds the committee with that count 18, and the multi-worker fork lets governance raise it above one 17. The Telcoin Association expects to raise it over the next 12 months, to as many as four workers per validator. The benchmark did not measure a multi-worker node, so the validator CPU and memory tiers carry a margin instead of a measurement: the minimum tier is twice the single-worker minimum, and the recommended tier is twice the minimum 2.

Each worker adds its own copy of these components 19:

  • A transaction pool with its own maintenance tasks, under the same --txpool.* limits as the first, so the pool bound grows by 60 MB per worker 20.
  • A batch builder that seals batches from that pool, and a batch validator for the batches other validators send. Batch validation recovers signatures on the process-wide pool of core count minus two threads 21, next to execution’s own recovery work.
  • A JSON-RPC server on its own ports 22.
  • A libp2p swarm with its own listen address and UDP port, its own network key and its own batch gossip topic, kept for the life of the process 23. Its quorum waiter sends each batch it seals to the other N − 1 committee members 24, so peer connections grow to about W · (N − 1) for W workers, plus the primary’s. Open one worker port per configured worker in the firewall.

These do not change with the worker count:

  • Execution. One engine executes one consensus output at a time on one blocking thread 25, and a header carries at most 10 batch digests in total, shared across the node’s workers in round-robin order 26. More workers let a validator seal batches in parallel, and an output can carry more blocks than the benchmark’s outputs did, but never more than the header cap allows.
  • The batch cache. There is one cache log per process, keyed by batch hash with no worker id 27, so all workers share it.
  • Storage growth and network bandwidth, which follow committed batch bytes, so the tiers size them for the same planning load. Their tier figures are not doubled.

The doubling is a provisioning margin, not a measurement. The per-worker terms are small next to a 32 GB host, and the c3 validators carried 5,384 TPS, about twenty times the 6-hour ceiling, at 25% CPU and 52% memory at p95 with one worker, so twice that host covers a second worker with room to spare. Buy the recommended tier for a host that will run more than two. Four workers need a multi-worker benchmark before this page can size them, and the page will be re-derived from it before the count gets there.

Expected service life

Storage is the resource that runs out. CPU and memory are sized for far more than the planning load.

The table gives the time to fill each tier’s capacity from the growth formula under Storage, with idle growth included: about 8 GB a day at the 6-hour ceiling and 3.2 GB a day at 100 TPS of the benchmark mix. β_reth is a lower bound on growth, so these are the longest each capacity can be expected to last.

TierCapacityAt 100 TPS, benchmark mixAt the 6-hour ceiling, about 260 TPS
Minimum2 TBAbout 1.7 yearsAbout 8 months
Recommended4 TBAbout 3.4 yearsAbout 16 months
Headroom12 TBAbout 10 yearsAbout 4 years

Today’s networks add about 0.07 TB a year, so at today’s load a drive reaches the end of its rated life before it fills. The DWPD ratings in the summary are twice the write rate modelled at the ceiling, so a drive that meets them uses at most half of its rated endurance over its warranty period, usually five years, even at the ceiling.

CPU and memory are not expected to be the limit in any tier. The minimum tier is twice a host that carried 5,384 TPS, about twenty times the 6-hour ceiling, with its engine queue at 3 or below and memory pressure at zero. Two things could exhaust that margin: more workers than the doubling was sized for, or sustained load toward the thousands of TPS the benchmark ran, which the batch cache no longer caps (see Per-epoch batch-cache ceiling). A multi-worker benchmark is due before the worker count reaches four, and this page will be re-derived before sustained load approaches the benchmark’s.

For a three-year hardware cycle, the recommended tier holds at loads up to about 100 TPS of the benchmark mix. At the ceiling its disk fills in about 16 months, so plan a storage upgrade then or start on the headroom tier.

Provisional estimates

These estimates come from the model and from the networks running today. They were made before the benchmark ran, and the single-worker figures above replace them; the summary then doubles the validator CPU and memory.

RoleCPURAMStorageNetwork
Validator, minimum4 physical cores16 GB2 TB TLC NVMe, at least 15,000 sustained IOPS200 Mbps
Validator, recommended8 physical cores, PassMark single-thread 4000 or higher32 GB4 TB TLC NVMe rated for at least 1 DWPD1 Gbps
Observer, follower4 physical cores8 to 16 GBSame as a validator50 Mbps
Observer, public RPC8 physical cores32 GBSame as a validatorSized for RPC traffic

The benchmark moved these provisional figures, before the multi-worker doubling:

  • Recommended validator CPU fell from 8 to 4 physical cores, and its PassMark floor from 4,000 to 3,500.
  • The minimum disk changed from 15,000 sustained IOPS to 10,000 sustained write IOPS plus a 300 MB/s throughput floor, and needs a 2.4 DWPD rating.
  • The recommended disk gained a 20,000 IOPS and 500 MB/s floor, and its endurance rating rose from 1 to 1.2 DWPD.
  • The follower observer minimum fell from 4 to 2 physical cores and settled at 8 GB, with 16 GB recommended.

Validator RAM (16 and 32 GB for one worker), storage capacity (2 and 4 TB) and network (200 Mbps and 1 Gbps) held.

This release’s execution database (tn-lmdb) then moved the validator disk IOPS, measured with the execution benchmark rather than the network benchmark 5:

  • The minimum disk rose from 10,000 to 20,000 sustained write IOPS. Its commits are bound by write IOPS on cloud block storage: at 4,500 IOPS one peak output’s commit took 12.3 s, and at 10,000 IOPS a busy output took 964 ms, which left no margin.
  • The recommended disk changed from 20,000 IOPS to local NVMe, or 40,000 IOPS on cloud block storage.
  • The throughput floor rose to 800 MiB/s (about 840 MB/s) on both tiers, from 300 and 500 MB/s: at 20,000 IOPS, 300 MiB/s made a busy output 28% slower and a peak one 32% slower than 800 MiB/s did.
  • Capacity and endurance held.

Earlier versions of this page asked validators for 16 cores / 32 threads, 128 GB of RAM and 4 to 7.5 TB of NVMe, and observers for 8 cores / 16 threads and 16 to 32 GB. Those figures were not derived from measurement. Against them, validator RAM moved from 128 GB to 32 GB minimum and 64 GB recommended, CPU from 16 cores and 32 threads to 8 physical cores minimum and 16 recommended, and storage from 4 to 7.5 TB to 2 to 4 TB, sized for the batch-cache ceiling of about 260 TPS. The benchmark alone would have set 16 and 32 GB and 4 physical cores; the rest is the multi-worker margin.

Validator

CPU

Architecture: x86-64.

Block execution is sequential. The engine executes one consensus output at a time on a single blocking thread 25, and transactions inside a block run in order. Signature recovery for an output’s transactions runs in parallel 28 on a thread pool sized to the core count minus two 21, and incoming batches are checked on the same pool 29. Single-thread speed therefore sets how fast a node executes. Extra cores help with signature recovery and with the networking, database and RPC work that runs next to execution, and once the worker count rises above one, with the batch builder and batch validator that each worker adds (see Why validator CPU and memory are doubled).

Execution speed also limits consensus speed:

  • A validator votes on a header only after it has executed the block that the header names as its author’s latest executed block 30.
  • A node holds back each commit until it has executed the block the leader had executed when it proposed 31.
  • A header needs votes from ⌊2N/3⌋ + 1 committee members to become a certificate, which is 7 of 10 32.

Rounds therefore advance at the pace of the 7th fastest executor in a committee of 10. A validator slower than that falls behind on its own and does not slow the others. If 4 or more validators are slow, the committee runs at their pace.

The benchmark shows the limit. The e2 validators (2 physical cores) used 44% of their vCPUs on average and 55% at p95, and execution could not keep up with consensus: every e2 validator’s engine queue reached 7 or 8 outputs, against a limit of 8, and pending pools on seven of the ten peaked at 9,480 to 9,850 transactions, near the pool’s default limit of 10,000. The c3 validators (4 physical cores) used 13% on average and 25% at p95, their engine queues never held more than 3 outputs, and the fleet sustained 5,384 TPS against 3,569 on e2. Total CPU percentage understates an execution bottleneck, because one saturated execution thread is only 25% of a 4-vCPU host. Watch the engine queue instead (see Capacity monitoring).

Buy single-thread speed first, then core count. A higher-clocked 16-core part does more for a validator than a 32-core part at a lower clock.

Memory

Steady state does not size memory. On devnet, validators run in 2.2 to 3.6 GB with the node process at about 1.6 GB resident. Memory is sized by two events that hold many consensus outputs at once:

  • Overload: execution falls behind consensus and outputs queue up.
  • Restart replay: a node that stopped mid-epoch re-executes every output it committed but had not executed. Replay has no memory gate. It streams each missed output toward the engine and relies on channel depth alone for backpressure 33.

Under the benchmark load, validators used:

FleetMemory used, p95Node RSS, p95Anonymous RSS, peakFile-backed RSS, peakMemory pressure (PSI some avg10), peak
e2, 8 GB81%7.15 GB5.6 to 6.4 GB1.7 to 1.8 GB0.9 to 4%
c3, 16 GB52%10.8 GB4.1 to 8.1 GB2.1 to 3.1 GB0

The first two columns are the worst validator in each fleet (gcp_by_role.validator.memory_percent_used.p95_max_node, telcoin_rss_bytes.p95_max_node). The last three are the range across validators from the on-node sampler (sampler_by_node.*.rss_anon_kb.run_max, rss_file_kb.run_max, psi_mem_some_avg10.run_max). No node was OOM-killed. On e2 the node filled 7.2 of 8 GB and the kernel was reclaiming pages it needed, so 8 GB fails the minimum rule even though no node ran out. On c3 memory pressure stayed at zero. Its 52% at p95 is just over the half-capacity line, so the single-worker recommended figure is 32 GB, which the summary doubles to 64 GB. Anonymous memory on one c3 validator reached 8.1 GB, more than an 8 GB host holds in total. c3 RSS is higher partly because the node maps its databases into memory and those file-backed pages stay resident while RAM is free, and partly because anonymous memory rose with the higher load.

The model is:

M ≈ (M_base + M_dag + M_pool + M_out + M_notif + M_rpc + M_thr) · (1 + α) + PC_hot
TermWhat it holdsWhat bounds it
M_baseBinary, allocator arenas, static tablesMeasured at idle: 0.3 to 0.5 GB on the fresh benchmark chain before load 34; about 1.6 GB on long-running devnet nodes
M_dagConsensus DAG: certificates for up to 50 rounds per member. Headers carry batch digests, not batch bodiesGarbage-collection depth of 50 rounds 35
M_poolTransaction pool--txpool.pending-max-size, --txpool.basefee-max-size, --txpool.queued-max-size, 20 MB each by default 36
M_outConsensus outputs waiting for or under executionSee below
M_notifCanonical-chain notifications held for slow subscribers (RPC subscriptions, pool maintenance, ExEx)256 notifications 37
M_rpcRPC response caches--rpc-cache.* flags 38; small when RPC is closed to the public
M_thrThread stacks and per-thread buffersCore count minus two for the parallel pool 21, plus async runtime threads
αAllocator fragmentationNot measured: the benchmark did not collect allocator statistics. Measured RSS includes it
PC_hotPage cache that keeps the hot part of the execution database off diskAbout 3 GB at the benchmark’s chain size, growing with state (see below) 39

M_out dominates under overload and replay:

M_out ≈ 2 · N · b_h · S_b · (k_q · I + k_exec)
  • 2 · N · b_h · S_b is the batch data in one consensus output. Leaders are elected on even rounds and commit once f+1 certificates in the next round reference them 40, so an output usually covers two rounds of headers from N validators. Each header carries b_h batches (at most 10, and a header is proposed once 5 are ready 41 42) of S_b bytes (at most 1 MB or 30 million gas per batch 43).
  • k_q is memory per byte of a queued output: not measured separately (see below).
  • k_exec is the extra memory per byte for the output under execution (recovered transactions, EVM state, trie updates): not measured separately.
  • I is the number of outputs held at once. It is 1 or 2 in normal operation. Under overload or replay it reaches about 73: 64 in the channel from the epoch manager to the engine 44, 8 in the engine queue 45, and 1 executing 25.

At the protocol maximum (N = 10, b_h = 10, S_b = 1 MB) one output could hold 200 MB, and 73 of them 14.6 GB. A second, lower limit applies. Replay never crosses an epoch boundary 33, so it holds at most one epoch’s batch data. At the tiers’ planning load, the per-epoch batch-cache ceiling with 6-hour epochs, that is about 1 GiB of batch data, times k_q, on top of the execution working set.

The benchmark could not separate k_q and k_exec from the rest of resident memory. Its consensus outputs averaged 1.0 to 1.25 MB of batch data and never exceeded 5.5 MB (prometheus.tn_primary_consensus_output_bytes), so even a full 73-output backlog held under 0.4 GB of batch data, too little to isolate. It measured the replay peak directly instead. After a 5-minute outage at full load, the restarted e2 validator peaked at 7.0 GB resident with its engine queue at the limit of 8 46. That is the same level as the e2 validators that never stopped (7.2 GB), so at this load the replay peak is the execution working set, not queued outputs. The restarted c3 validator did not resume execution before the run ended (see Benchmark), so there is no c3 replay figure.

PC_hot shows in disk reads. The c3 validators held 2.1 to 3.1 GB of file-backed pages and read almost nothing from disk (5 IOPS at p95). The e2 validators held 1.7 to 1.8 GB, and five of the ten read 1,800 to 3,000 IOPS at p95, most likely page-cache misses. So PC_hot is about 3 GB at the benchmark’s chain size, and it grows with state.

Every node also keeps an execution cache of at most about 260 MiB, which the model above does not count: about 160 MiB of fixed tables plus the code of up to 4,096 contracts (Execution database: disk and memory).

Disable swap. A swapping validator keeps running but executes slowly, and because votes wait on execution it drags on the committee instead of failing visibly. Use ECC memory. Cloud instance hosts generally have it already; on bare metal, specify ECC DIMMs.

Storage

Every node is an archive node. The node refuses to start with any pruning configuration 47, so disk use only grows. Plan capacity from the growth formula, not from the size of the chain today.

Path under the datadirContentsGrowth
db, static_filesExecution database and static filesβ_reth per transaction
consensus-db/epochsConsensus packs: committed outputs with their batches, one directory per epochβ_pack per transaction
consensus-db/tndb/cacheBatch cache (a tndb log)Its uncommitted batches, plus removed ones until the next compaction (see Per-epoch batch-cache ceiling)
consensus-db/tndb/epochCurrent epoch’s consensus tables (a tndb log)Grows through the epoch and resets when it closes: 212 MB measured 28,800 rounds into an epoch at 10 validators 48
consensus-db/tndb/kadPeer records (a tndb log)Small

Paths are set in crates/config 49 and crates/storage 50.

Daily growth is:

G_day = 86400 · λ · (β_reth + β_pack) + G_idle
  • λ is sustained transactions per second.
  • β_reth is bytes added to the execution database and static files per transaction: 251 on e2 and 257 on c3, a lower bound 51.
  • β_pack is bytes added to consensus packs per transaction: 92 on e2 and 94 on c3, also a lower bound 52.
  • G_idle is growth per day with no user transactions: about 0.2 GB (modelled from adiri at idle).

Together the β values are about 345 bytes per transaction. Both are measured on the benchmark mix, whose average transaction is about 190 bytes in a batch (188 on c3, about 190 on e2) 53. Both fleets agree to within 3%. β_reth is a lower bound because the execution database file db/mdbx.dat kept the same 4.3 GB size from node start to teardown in every run: MDBX allocates that file in large steps, so growth inside it did not show, and only static-file growth was counted. These runs predate this release’s execution database: it runs on tn-lmdb (db/tn-lmdb.dat, which grows in steps of at most 1 GiB, --db.growth-step, and gives back its unused tail at a clean close), and a new datadir uses reth’s storage layout v2, which moves change sets and transaction senders out of the database into static files. β_reth has not been measured on that combination yet. The storage growth planning table applies the formula to other loads.

Execution reads state on its single thread, so random-read latency adds directly to execution time. The consensus database also syncs to disk before every vote, header or certificate leaves the node 54. It commits in groups: one sync covers every write made before it starts, and persist returns once every write before it is durable, so writes that arrive together share a sync.

Disk demand at p95 on the busiest validator was 55:

FleetRead IOPSWrite IOPSWrite throughputIO pressure (PSI some avg10), peak
e22,9905,120137 MB/s15 to 37%
c352,440190 MB/s47 to 60%

c3 wrote more bytes in fewer, larger IOs, and its extra memory kept reads in page cache. Disk was the tightest resource in both fleets. On e2, write IOPS ran at 57% to 62% of the volume’s 9,000 IOPS limit, and IO pressure was the highest pressure signal on every node. On c3, every validator’s p95 write rate sat between 181 and 190 MB/s, about 75% of the 240 MiB/s per-VM cap, and IO pressure was around 50% at p95, so the volume was the tightest resource on c3 as well. On the previous execution database (MDBX), sizing write throughput from the c3 plateau with the same 2x margin as the recommended tier gave twice 190, 380 MB/s, and the recommended tier asked for 500. This release’s execution database sets both tiers’ floor at 800 MiB/s, measured 5. On the previous execution database (MDBX), the same margin on these p95 IOPS figures gave 2 × (2,990 + 5,120) = 16,220 IOPS, and the tiers asked for 10,000 and 20,000. This release’s execution database needs more: each consensus output ends in one durable commit whose time on cloud block storage is set by the disk’s IOPS limit, so the minimum asks for 20,000 sustained write IOPS and the recommended tier for local NVMe or 40,000 IOPS 5. Quote sustained figures, not burst. Endurance is covered under Storage: TLC over QLC. This release’s execution database commits are bound by write IOPS on cloud disks: Execution database: disk and memory gives their measured commit times and the --db.gap-fill setting.

Per-epoch batch-cache ceiling

Every batch a validator creates or receives is written to the batch cache in consensus-db/tndb/cache 56. A batch leaves it when the consensus output that commits it, already saved to the epoch’s pack, is forwarded to execution, and a batch that is never committed leaves when the epoch closes 57. The validator’s own uncommitted batches are the exception: they stay until the next epoch starts, which resubmits their transactions and then removes them. So the cache holds batches waiting to be committed and those that never will be, not the epoch’s committed batch data.

The cache is a tndb log with no fixed maximum 58. A removal appends a record, and the log compacts in the background once it is at least 256 MiB and twice its length after the last compaction: the batches still live are rewritten into a new file, and the old one is deleted. So between compactions its log holds the live batches plus removed ones, up to the larger of 256 MiB and twice the live data at the last compaction. Each file also keeps up to 128 MiB of preallocated space, and a running compaction briefly holds a second copy of the live batches.

Releases before tndb kept the cache in an MDBX file with a fixed 1 GiB maximum 59. Mainnet and testnet run 6-hour epochs 60. New genesis files default to 8 hours unless --epoch-duration-in-secs is set 61. Dividing that 1 GiB by the epoch length gave a ceiling on the rate at which batches could be left uncommitted over an epoch, and the tiers keep its 6-hour value as their planning load:

Epoch lengthBatch bytes per secondTPS at 110 BTPS at 188 to 192 B (benchmark mix, measured)TPS at 250 BTPS at 400 B
6 h (mainnet, testnet)49,710452259 to 264199124
8 h (CLI default)37,283339194 to 19814993
1 h298,2622,7111,553 to 1,5861,193746
20 min (benchmark)894,7858,1344,660 to 4,7593,5792,237

The 110, 250 and 400 B columns count raw transaction bytes. The benchmark measured about 190 B of batch data per transaction for its mix, which includes batch encoding 53. At that size the 6-hour figure is about 260 TPS (259 to 264), and an 8-hour epoch gives about 200. tndb removes the limit itself: uncommitted batch data takes more disk until it is committed or the epoch closes, and nothing caps the rate.

A batch write the disk cannot take fails at once and is taken back; the batch is not kept in memory instead 62. The worker’s seal then returns FatalDBFailure for that batch. Log growth preallocates its disk blocks, so on ext4 or xfs a full disk surfaces as a write error, not a crash (see Operating system), and a compaction gives way while less than 256 MiB is free. A failed sync stops that database: every later write fails until the node restarts, and tn_storage_tndb_failed reads 1. Alert on it and on compaction abandons (see Capacity monitoring).

The tiers use the 6-hour figure as their planning load for chain growth; no release enforces it. At that load a committee carries about 4.3 GB of batch data per day, 1.57 TB per year. Disk growth is that amount times m = (β_reth + β_pack) / 190 B, which is about 1.8 on the benchmark mix, plus G_idle. That gives about 7.8 GB a day, or with G_idle about 2.9 TB a year and 8.8 TB over three years (lower bounds, because β_reth is). m is close to 1.8 for transfer-heavy and contract-heavy loads too, so this figure holds whatever the mix. The recommended and headroom tiers use it. A committee that sustains more batch data fills disks sooner (see Storage growth planning).

The 2026-09 benchmarks ran on MDBX, before tndb. At 20-minute epochs the MDBX ceiling was in the thousands of TPS, so a benchmark with short epochs measured hardware limits, not this ceiling. The benchmark stayed below its own 20-minute ceiling: its epochs carried about 0.52 to 0.55 GB of batch data on average. The cache file still reached its 1 GiB maximum on every c3 validator and on four of the ten e2 validators (the other six stopped at 960 MiB), because MDBX never shrinks the file 59. A re-run on 2026-09-29 (r20260929-1647) with faster disks raised throughput enough to fill the cache inside a 20-minute epoch: every validator logged DB Insert node_batches_cache: environment map size limit reached in the last minutes of two epochs. Both runs used a release that kept every batch until the epoch closed. tndb has neither the maximum nor the high-water mark: the cache’s files shrink back to the live batches at each compaction.

Networking

Open the UDP ports and apply the firewall policy in Validator production operations. Use a static public IP address.

Per-node ingress is modelled as:

ingress ≈ λ · S_tx · (1 + N_fetch) + gossip overhead
  • λ · S_tx is transaction data per second. Each batch author sends the batch body directly to every other committee member 24, so a validator receives each transaction once.
  • N_fetch counts extra copies, fetched when a direct send was missed and the node pulls the batch before voting or executing.
  • Gossip overhead is batch digests, headers, votes and certificates. It grows with committee size and round rate, not with λ.

Egress is similar. A validator sends each of its own batches to N − 1 peers, so with load spread evenly its egress is about λ · S_tx · (N − 1) / N, plus gossip, plus what it serves to observers and syncing nodes.

At 1,000 TPS of 250-byte transactions, λ · S_tx is 250 KB/s, about 2 Mbps. Steady-state bandwidth is small. The 200 Mbps minimum is sized for catch-up and for serving consensus output and epoch packs to syncing nodes, which move whole epochs at a time.

In the benchmark, p95 ingress on the busiest validator was 24 Mbps on e2 and 21 Mbps on c3, both on the validator restarted by the kill test; the other validators received 6 to 17 Mbps 6. That matches the ingress model at the benchmark’s rate. p95 egress was 56 Mbps on e2 and 86 Mbps on c3, far above the model. Each validator also served JSON-RPC to its in-zone load generator, which fetched every block and all of its receipts, and the benchmark did not separate RPC traffic from peer traffic. Most of the gap is likely that RPC traffic, so a validator with closed RPC sends less.

Latency matters more than bandwidth. Each round is a header broadcast, votes back, and a certificate broadcast, so about 1.5 round trips to the quorum. Headers are proposed between 1 s and 2.5 s apart by default 63. Keep p95 round-trip time to at least 7 of the 10 committee members well below 1 s. The benchmark spans five GCP regions on three continents but did not measure round-trip time between them. Geography still showed: the two validators in australia-southeast1 had their batches included later than the others, and senders that submitted through them saw p95 latency of 325 to 350 s, against 20 to 27 s through the European validators.

Operating system

Supported: Linux LTS releases (Debian 11+, Ubuntu 20.04+, Red Hat Enterprise Linux 8). Use a kernel with pressure stall information (mainline 4.20 or later) so the checks in Capacity monitoring work.

  • Disable swap (see Memory).
  • Put the datadir on ext4 or xfs, the default filesystems of the supported distributions. As its storage files grow, the node reserves real disk blocks for them with fallocate, so a full disk fails a write with an error and the node stops cleanly. On a filesystem without fallocate (ext2, ext3, NFS, many FUSE filesystems) growth falls back to sparse files, and a full disk can instead crash the node with SIGBUS. Copy-on-write filesystems (btrfs, ZFS) accept fallocate but do not guarantee the space for a later write. Data the node had already synced is kept either way.
  • Leave the node’s virtual address-space limit unlimited, the default. The consensus database reserves address space, not RAM or disk: 16 GiB for each of its three logs and 1 GiB for each of its 14 table indexes, about 62 GiB, and up to about 23 GiB more for each compaction that runs 64 (the three logs compact independently, so up to about 62 GiB more when all three compact at once). Under a lower limit (ulimit -v, systemd LimitAS=, a container’s --ulimit as) the node logs could not reserve ... bytes of address space and maps each file at its length instead, which takes more address space as the files grow. Under a tight limit a later write then fails, tn_storage_tndb_failed reads 1, and the node stops.
  • On bare metal, turn off CPU and NVMe power saving. A validator writes and syncs each consensus output before execution sees it, then idles until the next one, so with power saving on, the CPU and drive wake from low-power states for every output. Set the CPU frequency governor to performance (cpupower frequency-set -g performance, or a tuned profile such as latency-performance, so it lasts across reboots). Disable NVMe autonomous power state transitions (APST) with the kernel parameter nvme_core.default_ps_max_latency_us=0. On a test machine this cut the wait before execution from 18.4 ms to 6.6 ms per output 65. On cloud VMs the provider usually controls both, and the guest cannot change them. Check with cpupower frequency-info and nvme get-feature /dev/nvme0 -f 0x0c -H.
  • Run time sync (chrony or systemd-timesyncd). A validator waits out a header timestamped up to max_header_time_drift_tolerance ahead of its own clock before voting: 250 ms by default, 1 s in a data directory first started by a binary from before sub-second timestamps, and rounded up to whole seconds in epochs before the sub-second timestamp fork. A header further ahead gets no vote yet and costs its proposer nothing, and the proposer retries; only a header more than the tolerance plus vote_timeout ahead (5.25 s at the defaults) is rejected without a score penalty 66. Clock error within the tolerance delays votes by up to that error. Error beyond it holds back a validator’s votes on honest headers, or other validators’ votes on its own headers, until the difference shrinks, and error beyond the tolerance plus vote_timeout makes a validator reject honest headers or have its own rejected.

Email support@telcoin.org to confirm hardware specifications before purchasing any equipment.

Observer

An observer is any node that is not in the current committee. The node picks its role at startup from committee membership 67; to take a validator out of consensus, exit it on chain. An observer receives every consensus output, executes every block, and keeps the same archive data as a validator. It does not vote. Transactions sent to an observer’s RPC are sealed into a local batch and forwarded to the JSON-RPC endpoints that validators advertise 68.

Observers suit developers building on Telcoin Network, businesses that want to verify transactions and account state themselves, auditors and researchers who need direct access to chain data, service providers that submit transactions directly, and community members who want to verify the network.

There are two profiles:

  • A follower verifies the chain for its operator and serves little or no public RPC.
  • A public RPC observer serves JSON-RPC to outside users. Its CPU and memory are sized by RPC traffic, not by consensus.

The benchmark ran one follower in each fleet and sent it no RPC load. It was restarted 25 minutes into the mixed phase and caught up: its static files ended each run the same size as the validators’.

CPU

Architecture: x86-64 or ARM64.

Observers execute the same blocks on the same single thread as validators, so single-thread speed decides whether they keep up. An observer is not on the voting path. If it falls behind, it catches up without slowing the committee. RPC calls such as eth_call and eth_estimateGas run beside execution and scale with core count, which is why the public RPC profile has more cores.

The e2 observer (2 physical cores) used 22% of its vCPUs on average and 27% at p95, and its engine queue reached the limit of 8 at times. The c3 observer (4 physical cores) used 8% on average and 13% at p95, and its queue never held more than 3 outputs 12 15.

Memory

The consensus terms are smaller than on a validator. Observers do not subscribe to batch gossip 69 and have no batches of their own to cache. They queue and replay outputs the same way, so M_out applies unchanged.

In the benchmark the observer held 3.7 GB resident at p95 in both fleets, which was 38% of memory on e2 and 15% on c3. Memory pressure peaked at 1% on e2 and stayed at zero on c3.

On a public RPC observer the main memory risk is RPC caching. The --rpc-cache.* flags bound it 38:

FlagDefaultHolds
--rpc-cache.max-blocks1000Full blocks
--rpc-cache.max-receipts500Receipts, per block
--rpc-cache.max-headers1000Headers
--rpc-cache.max-concurrent-db-requests512Concurrent database reads behind the cache
--rpc-cache.max-cached-tx-hashes30000Transaction hash lookups

The block, receipt and header limits count entries, not bytes. Each block comes from one batch 70, and a batch can be up to 1 MB, so 1000 cached blocks can hold up to 1 GB of transaction data before decoding overhead. At the benchmark’s average batch of about 64 KB, the same 1000 blocks hold about 64 MB. Earlier releases defaulted to 5000 blocks and 2000 blocks’ receipts, up to 5 GB of blocks. If resident memory grows with RPC load, lower --rpc-cache.max-blocks first. Disable swap on observers too.

Storage

An observer stores the same execution database and consensus packs as a validator, so use the same capacity, IOPS and endurance figures. In the benchmark the observer wrote 64 MB/s (e2) and 174 MB/s (c3) at p95, at 4,770 and 1,790 write IOPS 13. It does not write batches into the batch cache from gossip; in the 2026-09 benchmark (on MDBX) its cache file reached only 64 to 192 MiB against 1 GiB on validators.

Networking

A follower downloads consensus output and epoch packs and forwards transactions it receives. The steady-state bandwidth is λ · S_tx plus consensus headers. In the benchmark the follower received 2.7 Mbps (e2) and 4.5 Mbps (c3) at p95 and sent under 1 Mbps 14. A public RPC observer adds its RPC traffic, which depends on its users. Observers need outbound access to each validator’s advertised JSON-RPC endpoint to forward transactions.

Operating system

Linux as for validators. macOS Sequoia 15+ also runs an observer, for development. The pressure stall checks in Capacity monitoring are Linux-only.

Storage growth planning

The table applies G_day = 86400 · λ · 345 B, the benchmark mix’s measured β_reth + β_pack, and scales it by workload. Transfer-heavy loads use 0.6 times that, because a native transfer is about 110 bytes in a batch against the mix’s 190. Contract-heavy loads use 1.3 times, which is about 250 bytes in a batch. Both multipliers are modelled. G_idle adds about 0.07 TB a year at any load and is left out. Every disk figure is a lower bound, because β_reth is.

LoadWorkloadBatch bytes per transactionDisk per dayDisk after 1 yearDisk after 3 yearsUnder the 6 h batch-cache ceiling?
100 TPSTransfer-heavyAbout 110 B1.8 GB0.65 TB1.96 TBYes
100 TPSBenchmark mixAbout 190 B3.0 GB1.09 TB3.26 TBYes
100 TPSContract-heavyAbout 250 B3.9 GB1.41 TB4.24 TBYes
259 to 264 TPSBenchmark mixAbout 190 B7.8 GB2.85 TB8.55 TBAt the ceiling
500 TPSTransfer-heavyAbout 110 B8.9 GB3.26 TB9.79 TBNo
500 TPSBenchmark mixAbout 190 B14.9 GB5.44 TB16.3 TBNo
500 TPSContract-heavyAbout 250 B19.4 GB7.07 TB21.2 TBNo
1000 TPSTransfer-heavyAbout 110 B17.9 GB6.53 TB19.6 TBNo
1000 TPSBenchmark mixAbout 190 B29.8 GB10.9 TB32.6 TBNo
1000 TPSContract-heavyAbout 250 B38.8 GB14.1 TB42.4 TBNo

The last column compares the batch bytes per transaction with the 6-hour ceiling of 49,710 batch bytes per second. Rows marked “No” are above the planning load the tiers are sized for, so at those loads disks fill sooner than Expected service life says.

Worked example for 100 TPS of the benchmark mix over one year, with idle growth:

G_day      = 86400 · 100 · 345 B + 0.2 GB   = 3.18 GB
disk, 1 y  = 365 · G_day                    = 1.16 TB

Storage: TLC over QLC

When setting up nodes for Telcoin Network, storage selection affects node performance and drive life. We recommend TLC (Triple-Level Cell) NVMe drives over QLC (Quad-Level Cell).

Performance

TLC drives sustain higher write speeds and better random I/O, and they hold that performance under continuous load. QLC drives slow down sharply once their write cache fills, which leads to uneven execution times and late votes during busy periods.

Durability and lifespan

TLC drives typically support 1,000 to 3,000 P/E (program/erase) cycles, 3 to 5 times the endurance of QLC. QLC drives generally support 100 to 1,000 cycles, and continuous node writes wear them out early.

Endurance from the measured write rate

A node writes continuously even when idle. Convert the measured write rate to drive writes per day:

W_day = write rate (bytes/s) · 86400
DWPD  = W_day / capacity
TBW   = W_day · 365 · years

Devnet validators write 8 to 9 MB/s at the host level under light load. At 8.5 MB/s, W_day is 734 GB. That is 0.37 DWPD on a 2 TB drive and 0.18 DWPD on a 4 TB drive, and 1,340 TB written over five years. Compare TBW with the drive’s rated endurance, and buy a drive rated for at least twice the computed DWPD.

The benchmark’s write rate at load was 137 MB/s (e2) and 190 MB/s (c3) at p95 55. At 190 MB/s a drive takes 16.4 TB a day, 4.1 DWPD on a 4 TB drive, but the ratings below are sized for the planning load, not for the benchmark’s load. Per landed transaction, the node process wrote 23 to 46 KB on e2 validators and 61 to 71 KB on c3 validators, about 70 to 200 times what the data directory grew 71. At the 6-hour ceiling of about 260 TPS that is 6 to 19 MB/s on top of the idle 4 to 9 MB/s, about 0.9 to 2.4 TB a day. That is 0.2 to 0.6 DWPD on a 4 TB drive and 0.4 to 1.2 DWPD on a 2 TB drive (modelled). Twice those figures gives the ratings in the summary: 1.2 DWPD for 4 TB and 2.4 DWPD for 2 TB.

Blockchain-specific requirements

Node storage takes continuous writes from incoming batches, block execution, state updates and chain history. QLC drives cost less up front, but their performance limits and shorter life make TLC the cheaper and more reliable choice over the life of a node.

How these numbers were derived

Model

The CPU, memory, storage and network sections each state the model used for that resource. The inputs are code constants (listed under Sources and code references), the benchmark load (λ and the average transaction size), and a small number of measured coefficients (α, k_q, k_exec, β_reth, β_pack, G_idle, PC_hot, cache bytes per transaction). The benchmark measured β_reth, β_pack, PC_hot and cache bytes per transaction, and the replay peak in place of k_q and k_exec. α was not measured, and G_idle comes from adiri.

Benchmark

ItemSetting
Topology10 validators and 1 observer; 2 validators per zone, one zone in each of us-west2, australia-southeast1, northamerica-northeast1, europe-west4 and europe-west2; the observer in us-west2
Load10 load generators, one next to each validator in its zone, 600 senders each (6,000 in total)
Transaction types13: native transfer, batched self-send, contract deploy, WTEL wrap and unwrap, stablecoin transfer and approve, faucet drip, Uniswap v2 swap, add liquidity and remove liquidity, Uniswap v3 swap, Uniswap v4 swap
Phases90 s preamble, 2 min warmup, 40 min mixed phase, 3 min cooldown
Restart testsOne validator killed with SIGKILL 15 minutes into the mixed phase, held down for 5 minutes, then restarted (replay); the observer restarted at 25 minutes
Epoch length20 minutes, so the mixed phase crosses about two epoch boundaries
Fleetse2-custom-4-8192 (4 vCPU, 8 GB), run r20260923-0708; c3-highcpu-8 (8 vCPU, 16 GB), run r20260923-0515
Disk100 GB pd-ssd boot disk per node
Node imageInternal v0.1.0-devnet build from etc/Dockerfile, not a published release
Load generatortn-transaction-generator, image blast-v2-3644adc
ReportBenchmark report; committed copy bench/reports/2026-09-bench-10v.html in tn-transaction-generator

Results:

Resulte2c3
Sustained mixed TPS (best 60 s)3,5695,384
Landed of accepted7.35M of 7.38M8.08M of 8.12M
Reverted00
Latency, submit to block timestamp, p50 / p95 / p997.6 s / 42 s / 361 s7.7 s / 31 s / 507 s

Over 99.9% of the transactions in the window were the benchmark’s own. The generators kept transaction pools full by design, so the latency figures measure queueing under saturation, not the protocol’s inclusion time. Blocks have a 30 million gas limit and pack by each transaction’s gas limit. The mix averaged about 77,000 gas limit against 49,000 gas used per transaction, so about a third of each block’s capacity was reserved but unused.

Limits of the benchmark:

  • pd-ssd IOPS and throughput scale with volume size, so a 100 GB volume is throttled well below local NVMe. The volume allows 9,000 IOPS each way and 288 MiB/s (6,000 IOPS plus 30 per GB; 240 MiB/s plus 0.48 per GB). GCP also caps pd-ssd at 15,000 IOPS and 240 MiB/s per VM, both for E2 with 2 to 7 vCPUs and for C3 with 8 vCPUs, so the real throughput limit was 240 MiB/s on both fleets, and the c3 plateau of 190 MB/s (181 MiB/s) was about 75% of it. GCP’s disk throttling metric was not available in the project, so throttling was not recorded directly. Disk figures in the summary are measured demand plus margin, not the volume’s capacity.
  • 100 GB holds a 40-minute run but says nothing about capacity. Capacity comes from the growth formula.
  • 20-minute epochs keep the run far from the 6-hour batch-cache ceiling (see above).
  • Egress includes JSON-RPC traffic to the in-zone load generators (see Networking).
  • β_reth misses growth inside the execution database file (see Storage).
  • In the e2 run, bench-validator-03 in australia-southeast1 fell behind at 08:15Z and ran as a follower for 53 minutes. Its worker could not report one batch and re-sealed it 1,457 times, and the node’s process never restarted. Consensus stayed live with 9 batch producers. The failure is tracked separately.
  • In the c3 run, bench-validator-05, restarted after the 5-minute kill, had not resumed execution when the run ended 30 minutes later. Its static files did not grow and it reported no execution or batch metrics after the restart, so the c3 run had 9 executing validators from the kill at 06:20Z and gives no replay figure. The investigation and missing capture are tracked in issue #1510.
  • An earlier e2 run, r20260923-0215, is superseded. A load-generator bug re-sent pending transactions, so about a third of its batch content was duplicates (1.33 executed transactions per landed transaction). No sizing figure on this page comes from it.

Networks running today

Both networks carry little load, so these figures are a floor:

NetworkMachineCPURAM usedDisk writes
Devnet validators, 24 he2-custom-4-8192 (4 vCPU, 8 GB)8 to 12%2.2 to 3.6 GB, single-sample spikes to 5.5 to 6.4 GB; node resident memory about 1.6 GB8 to 9 MB/s
Adiri validators, idle, 6 h epochsc3-highcpu-8 (8 vCPU, 16 GB)1.3%6.4 GB flat, one node at 9.5 GB3.7 MB/s

The node’s idle footprint fits in 8 GB, and it writes several MB/s to disk even when idle, which is why endurance matters.

Confidence

FigureSourceConfidence
Code constants (64 + 8 output queue, 10 batches per header, 1 MB batch, 6 h mainnet epoch, 8 h CLI default, 256 MiB cache compaction threshold)CodeExact for this release
Batch-cache TPS ceiling (the planning load)The 1 GiB MDBX cache of earlier releases and the measured 190 B per transactionModelled from a measured input; a planning figure, not a limit of this release
CPU, RAM, disk and network use at benchmark loadBenchmark, both fleetsMeasured
Single-worker minimum and recommended CPU and RAMBenchmark and the tier rulesMeasured
Validator CPU and RAM tiers in the summaryTwice the single-worker figuresModelled margin for the multi-worker rollout, not measured
PassMark floorJudgement; CPU scores were not recordedModelled
Disk and network figures in every tier, except validator IOPSMeasured demand plus the tier marginsModelled from measured demand
Validator disk IOPS, minimum and recommendedExecution benchmark on cloud volumes of 4,500 to 40,000 IOPS, storage layout v2 (a migrated datadir stays on v1, which needs more)Measured
Replay memory peakBenchmark, one e2 validator, one restartMeasured, single sample
β_reth, β_packBenchmark mixed phaseMeasured lower bounds for the benchmark mix
PC_hot, M_baseOn-node samplerMeasured proxies
α, k_q, k_execNoneNot measured
G_idleAdiri at idleModelled
Storage growth table and workload multipliersFormula with measured βModelled
Endurance at the ceilingMeasured writes per transaction, scaled to the ceilingModelled
Headroom tierModel at the batch-cache ceiling loadModelled
Follower network figureMeasured demand; 50 Mbps kept from the provisional tableMeasured demand, provisional figure
Public RPC observer CPU, memory and networkNo RPC load in the benchmarkModelled or provisional
Round-trip time between regionsNot collectedNot measured
Provisional estimatesModel and running networksSuperseded by the summary

Sources and code references

Notes whose names start with b- cite the benchmark: the run, and the field in that run’s sizing.json unless another file is named. exec-disk cites the execution benchmark, doubling states the multi-worker rule, and the rest cite code.


  1. Measured, r20260923-0708 (e2) and r20260923-0515 (c3). gcp_by_role.validator.cpu_utilization: e2 validators ran 44% mean (mean_avg_nodes), 55% p95 (p95_max_node) and 66% max of 4 vCPU; c3 validators ran 13%, 25% and 36% of 8 vCPU. prometheus.tn_engine_queued_outputs: every e2 validator reached 7 or 8 queued outputs, against a limit of 8, while no c3 validator passed 3. prometheus.tn_batch_builder_pending_pool_transactions: seven e2 pools peaked at 9,480 to 9,850 transactions, near the default limit of 10,000. The 2-core e2 hosts were execution-bound, so they fail the minimum rule; the 4-core c3 hosts pass it on CPU. The single-worker minimum is therefore 4 physical cores, and the summary doubles it to 8. ↩ ↩2

  2. Modelled margin, not measured. The benchmark ran one worker per validator. The summary’s validator minimum is twice the single-worker minimum and its recommended tier is twice that minimum, to cover the worker count governance is expected to raise over the next 12 months (see Why validator CPU and memory are doubled). Storage, network and observer figures are not doubled. ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  3. Measured, r20260923-0708 and r20260923-0515. e2 (8 GB): gcp_by_role.validator.memory_percent_used.p95_max_node 81%, telcoin_rss_bytes.p95_max_node 7.15 GB, sampler_by_node.*.psi_mem_some_avg10.run_max 0.9 to 4%, replay peak 7.0 GB. c3 (16 GB): 52%, 10.8 GB, PSI memory 0. 8 GB left no room for the replay peak, so the single-worker minimum is 16 GB, and the summary doubles it to 32 GB. ↩ ↩2

  4. Modelled from measured demand, except IOPS and throughput. The IOPS figure is measured on this release’s execution database (see the exec-disk note); on the previous one (MDBX) the network benchmark’s demand set it at 10,000, twice the e2 p95 write IOPS (5,120, gcp_by_role.validator.disk_write_ops_per_sec.p95_max_node). The throughput floor is measured too: at 20,000 IOPS, 300 MiB/s made a busy output 28% slower and a peak one 32% slower than 800 MiB/s (see the exec-disk note), and a peak commit writes about 300 MiB. On MDBX it was set above the c3 plateau of 190 MB/s (disk_write_bytes_per_sec.p95_max_node), because both fleets’ 100 GB volumes showed IO stalls. 2 TB holds about 8 months of growth at the 6-hour ceiling (about 8 GB a day with idle growth). 2.4 DWPD is twice the modelled 0.4 to 1.2 DWPD at the ceiling (see Endurance). ↩

  5. Measured with the execution benchmark, described in Execution database: disk and memory: durable commits, storage layout v2, outputs back to back. With the node’s defaults (gap fill auto, parallel state roots), on 2026-11-12 on a c3-highcpu-8 (16 GB) with the datadir on a Hyperdisk Balanced data disk at 800 MiB/s, mean of two runs (benchmark built from 6886de251 with the gap fill chooser of b3623540f; the command is under By provisioned IOPS), a busy output took 964 ms at 10,000 IOPS (commit 680 ms), 629 ms at 20,000 (339 ms) and 486 ms at 40,000 (157 ms), and a peak output 2,463, 1,964 and 1,670 ms (commits 1,310, 782 and 408 ms): 1.04, 1.59 and 2.06 busy outputs a second, and 0.41, 0.51 and 0.60 peak ones. 20,000 IOPS at 300 MiB/s, below the minimum tier’s throughput, gave 807 ms busy and 2,598 ms peak. These ran on a development build: engine format 7, without the release’s storage-root split (see that page). The curve is for layout v2: a datadir migrated from an earlier release stays on layout v1 until it is rebuilt, and v1’s commits took 2.4 s against v2’s 1.4 s per peak commit at 20,000 IOPS with gap fill off. Earlier runs with gap fill off and one state-root thread took 12.3 s per peak commit at 4,500 IOPS (c3-highmem-8) and 1.4 s at 20,000 IOPS, where the node wrote about 18,000 IOPS of about 5 KiB each during commits, and 2,682 ms per peak output and 685 ms per busy one on local NVMe (c3-standard-8-lssd). ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  6. Measured demand, r20260923-0708 and r20260923-0515, gcp_by_role.validator.network_sent_bytes_per_sec.p95_max_node and network_received_bytes_per_sec.p95_max_node: out 56 Mbps (e2) and 86 Mbps (c3), in 24 and 21 Mbps. 200 Mbps symmetric clears the measured p95 with room for catch-up. 1 Gbps keeps p95 under a tenth of capacity and leaves room for catch-up and serving epoch packs, which the benchmark did not measure. Egress includes RPC traffic to the load generator. ↩ ↩2 ↩3

  7. Cores measured, r20260923-0515: 25% p95 and 36% max of 8 vCPU (gcp_by_role.validator.cpu_utilization) on 4 physical cores, under the half-capacity line, with the engine queue at 3 or below, so the single-worker recommended figure is 4 physical cores; the summary’s 16 is twice the doubled minimum. The PassMark figure is modelled: the benchmark did not record CPU models or scores, and 3,500 is a floor chosen for single-thread speed, not a measurement. ↩ ↩2

  8. Measured, r20260923-0515: 16 GB ran at 52% p95 (gcp_by_role.validator.memory_percent_used.p95_max_node), just over half of capacity, so the single-worker recommended figure is 32 GB; the summary’s 64 GB is twice the doubled minimum. ↩ ↩2

  9. Modelled from measured demand, except IOPS and throughput. Local NVMe was the fastest disk the execution benchmark measured with gap fill off and one state-root thread (it was not measured with the node’s defaults), and on cloud block storage 40,000 IOPS cut the commit to about 160 ms of a busy output and 410 ms of a peak one (see the exec-disk note). On the previous execution database (MDBX) the network benchmark set it at 20,000, above twice the e2 p95 read plus write IOPS (2 × (2,990 + 5,120) = 16,220; disk_read_ops_per_sec.p95_max_node, disk_write_ops_per_sec.p95_max_node). Throughput: 800 MiB/s or more, the highest cloud figure measured (every 10,000 to 40,000 IOPS run but one 20,000 IOPS run at 300 MiB/s was at 800 MiB/s); on MDBX it was 500 MB/s, above twice the c3 write plateau (380 MB/s). 4 TB covers one year at the 6-hour ceiling (2.9 TB) with room to spare. 1.2 DWPD is twice the modelled 0.2 to 0.6 DWPD at the ceiling. ↩

  10. Modelled. Headroom is sized for the planning load, the 6-hour batch-cache ceiling of about 260 TPS, under a thirteenth of the e2 fleet’s 3,569 TPS. The recommended CPU, memory and network cover that load, and replay at it holds at most about 1 GiB of batch data. Headroom therefore adds storage (and, for public RPC observers, memory), not throughput. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7

  11. Modelled: G_day = 86400 · λ · 345 B + G_idle at the ceiling is about 8 GB a day, 8.8 TB over three years (a lower bound). 12 TB holds that with about a third to spare. ↩ ↩2 ↩3

  12. Measured, r20260923-0708, gcp_by_role.observer: the e2 observer (2 physical cores, 8 GB) used 22% mean and 27% p95 CPU, 38% of memory at p95 (3.7 GB resident), and peaked at 1% memory pressure. It fell behind at times (engine queue at 8) but caught up after its restart. ↩ ↩2 ↩3

  13. Measured demand, gcp_by_role.observer.disk_write_bytes_per_sec.p95_max_node and disk_write_ops_per_sec.p95_max_node: 64 MB/s at 4,770 IOPS (e2) and 174 MB/s at 1,790 IOPS (c3), the same order as a validator. An observer keeps the same archive data, so it uses the validator disk figures. ↩ ↩2 ↩3 ↩4 ↩5

  14. Measured demand, gcp_by_role.observer.network_received_bytes_per_sec.p95_max_node and network_sent_bytes_per_sec.p95_max_node: 2.7 Mbps (e2) and 4.5 Mbps (c3) in, under 1 Mbps out. 50 Mbps is the provisional figure, kept because it is more than ten times the measured demand. Initial sync from genesis was not measured. ↩ ↩2 ↩3 ↩4

  15. Measured, r20260923-0515, gcp_by_role.observer: the c3 observer (4 physical cores, 16 GB) used 13% CPU and 15% memory at p95 with its engine queue at 3 or below. The e2 shape already meets the half-capacity rule on CPU and memory, but its execution fell behind at times, so the recommended tier uses the c3 shape. ↩ ↩2 ↩3

  16. Modelled; the benchmark sent no RPC load to the observer. Minimum: the follower’s recommended CPU, and the follower’s 8 GB plus up to 1 GB for the default RPC caches (1000 blocks of up to 1 MB), rounded to 16 GB. Recommended 32 GB and headroom 64 GB leave room for concurrent RPC work and for raising the cache limits. The 8-core CPU figure is the provisional estimate, kept until RPC load is measured. Network is the follower’s 50 Mbps plus RPC traffic. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9

  17. crates/types/src/forks.rs:504 (MULTI_WORKERS_FORK_EPOCH: adiri arms the fork at epoch 570), crates/types/src/forks.rs:556-565 (mainnet builds run the multi-worker layout from genesis), crates/types/src/forks.rs:138 (the live adiri WorkerConfigs read numWorkers() == 1 on 2026-08-18), crates/node/src/manager/node.rs:113-126 (check_worker_count_fork rejects more than one worker before the fork). ↩ ↩2

  18. crates/node/src/manager/node.rs:491-513 (read_num_workers_at_epoch_entry reads WorkerConfigs at the block before the epoch’s first block), crates/tn-reth/src/env/epoch.rs:597-615 (the getAllWorkerConfigs system call), crates/tn-reth/src/system_calls.rs:296-299 (the count is a uint16), crates/types/src/committee.rs:1078-1079 (number_of_workers). ↩

  19. crates/node/src/manager/node/start_epoch.rs:589-609 (one pool, RPC server, validator and network per on-chain worker, in id order), crates/node/src/engine/inner.rs:157-185 (pool and RPC server), crates/node/src/engine/inner.rs:253-263 (batch validator), crates/node/src/manager/node/run_epoch.rs:406-421 (batch builder per worker). ↩

  20. crates/tn-reth/src/txn_pool.rs:315 (each pool takes the full txpool config); the 20 MB per-subpool defaults are in 36. ↩

  21. crates/telcoin-network-cli/src/node.rs:208-216 (global pool size is available cores minus 2, at least 1). ↩ ↩2 ↩3

  22. crates/tn-reth/src/env/rpc.rs:67 (WORKER_PORT_STRIDE = 200), crates/tn-reth/src/env/rpc.rs:142-148 (worker 0 keeps the configured ports; worker k shifts its HTTP port down by 200·k and its WebSocket port up by 400·k). ↩

  23. crates/node/src/manager/node.rs:173-236 (prepare_worker_networks requires a distinct listen address and key per worker), crates/node/src/manager/node.rs:1667-1713 (one long-running swarm per configured worker), crates/node/src/manager/node/start_epoch.rs:1071-1072 (batch topic per worker). ↩

  24. crates/consensus/worker/src/quorum_waiter.rs:136-137. ↩ ↩2

  25. crates/engine/src/lib.rs:66-68 (one pending execution task), crates/engine/src/lib.rs:159 (execution on a blocking thread). ↩ ↩2 ↩3

  26. crates/types/src/primary/header.rs:34 (the payload maps batch digest to worker id), crates/types/src/primary/header.rs:166-171 (a header with more than MAX_HEADER_NUM_OF_BATCHES digests is rejected), crates/consensus/primary/src/proposer.rs:753-787 (header slots are shared across workers round-robin, up to the cap in total). ↩

  27. crates/node/src/manager/node.rs:714-728 (one consensus database per process, shared across epochs), crates/storage/src/lib.rs:122-126 (cache tables keyed by batch hash only); its compaction is in 58. ↩

  28. crates/tn-reth/src/env/execution.rs:167-181. ↩

  29. crates/batch-validator/src/validator.rs:170. ↩

  30. crates/consensus/primary/src/network/handler.rs:911-914. ↩

  31. crates/consensus/primary/src/consensus/state.rs:584-585. ↩

  32. crates/types/src/committee.rs:1191-1192. ↩

  33. crates/node/src/manager/node/start_epoch.rs:120-149 (replay loop; lines 121-129 refuse to cross an epoch boundary). ↩ ↩2

  34. Measured, r20260923-0708 and r20260923-0515, sampler CSVs (sampler/*.csv, rss_anon_kb) in the idle window after funding and before load: 0.4 to 0.5 GB per validator, 0.3 GB before funding, 0.2 GB on the observer. The chain was new, so long-running nodes sit higher. ↩

  35. crates/types/src/primary/mod.rs:52 (MAX_GC_DEPTH = 50), crates/config/src/node.rs:338-339 (default gc depth), crates/storage/src/consensus_pack.rs:5311-5313 (max_batches_per_output: the batches-per-output bound). ↩

  36. crates/tn-reth/src/cli.rs:89; default from reth v1.11.3 crates/transaction-pool/src/config.rs:18. ↩ ↩2

  37. reth v1.11.3 crates/chain-state/src/in_memory.rs:28, used through crates/tn-reth/src/env/helpers.rs:87-88. ↩

  38. crates/tn-reth/src/rpc_server_args.rs:238-240; defaults from reth v1.11.3 crates/rpc/rpc-server-types/src/constants.rs:115-127. ↩ ↩2

  39. Measured proxy, sampler_by_node.*.rss_file_kb.run_max against gcp_by_node.*.disk_read_ops_per_sec (p95): c3 validators held 2.1 to 3.1 GB of file-backed pages and read at most 5 IOPS; e2 validators held 1.7 to 1.8 GB and five of ten read 1,800 to 3,000 IOPS. ↩

  40. crates/consensus/primary/src/consensus/bullshark.rs:137-138 (even rounds), crates/consensus/primary/src/consensus/bullshark.rs:201-212 (f+1 support from round r+1). ↩

  41. crates/types/src/primary/mod.rs:96 (MAX_HEADER_NUM_OF_BATCHES = 10). ↩

  42. crates/config/src/node.rs:317-319 (proposal threshold 5). ↩

  43. crates/types/src/worker/sealed_batch.rs:211-212 (30,000,000 gas), crates/types/src/worker/sealed_batch.rs:224-225 (1,000,000 bytes), crates/config/src/node.rs:350-352 (batch sealed after 1 s). ↩

  44. crates/node/src/manager/node.rs:85 (TO_ENGINE_CAPACITY = 64), crates/node/src/manager/node.rs:873. ↩

  45. crates/engine/src/lib.rs:52 (MAX_QUEUED_OUTPUTS = 8), crates/engine/src/lib.rs:271. ↩

  46. Measured, r20260923-0708, bench-validator-05 killed at 08:30:12Z and restarted at 08:35:11Z: prometheus.reth_process_resident_memory_bytes peaked at 6.9 GB and the sampler’s rss_total_kb at 7.0 GB, with tn_engine_queued_outputs at 8. The validators that never stopped peaked at 7.2 GB (telcoin_rss_bytes.max_max_node). ↩

  47. crates/tn-reth/src/cli.rs:550 (ensure_archive_mode). ↩

  48. Measured on Linux on 2026-10-13 in the tndb baseline run of workload_startup_reload (crates/storage/src/workload_bench.rs: a 10-validator committee 28,800 rounds into an epoch): 1,326,760 rows, 212.1 MB on disk. To reproduce it, run BASELINE_ONLY=workload_startup_reload etc/storage-baseline-bench.sh <dir> (see the script’s usage notes). crates/storage/src/tndb/split.rs:41 (EPOCH_AUTO_MIN_BYTES) and crates/storage/src/tndb/store.rs:705 (note_if_emptied: the epoch-close clear empties every table and the log compacts at once). ↩

  49. crates/config/src/traits.rs:156 (consensus-db/epochs), crates/config/src/traits.rs:189 (consensus-db), crates/config/src/traits.rs:193 (db). ↩

  50. crates/storage/src/tndb/mod.rs:34 (TNDB_DIR), crates/storage/src/tndb/split.rs (ENVIRONMENTS: epoch, kad, cache). ↩

  51. Measured, storage_growth.beta_reth_bytes_per_tx.median: 251 (r20260923-0708) and 257 (r20260923-0515) bytes per landed transaction over the mixed window. db/mdbx.dat stayed at 4,295,995,405 bytes on every node in every run (sampler db_bytes), so this counts static_files growth only. ↩

  52. Measured, storage_growth.beta_pack_bytes_per_tx.median: 92 (r20260923-0708) and 94 (r20260923-0515). Packs for the open epoch are folded in at epoch close, so the figure is a lower bound when the window ends mid-epoch. ↩

  53. Measured from Prometheus over each fleet’s mixed window: batch bytes divided by batch transactions (tn_worker_batch_size_bytes, tn_worker_batch_transactions) is 188 B on c3 (r20260923-0515) and about 190 B on e2 (r20260923-0708), about 340 transactions and 63 to 65 KiB per batch. The e2 figure excludes bench-validator-03’s re-sealed batches and is approximated from the histogram means. The superseded e2 run r20260923-0215 measured 192 B. ↩ ↩2

  54. crates/storage/src/lib.rs:375-387 (open_db: tndb in group commit), crates/storage/src/tndb/commit.rs:285-307 (persist resolves once the sync covering every earlier write is done), crates/storage/src/tndb/README.md (Durability). ↩

  55. Measured, gcp_by_role.validator.disk_*_per_sec.p95_max_node: e2 2,990 read and 5,120 write IOPS (5,570 max) at 137 MB/s (145 max); c3 5 read and 2,440 write IOPS at 190 MB/s. IO pressure from sampler_by_node.*.psi_io_some_avg10.run_max. Volume limits from each run’s limits section and the report. ↩ ↩2

  56. crates/storage/src/lib.rs:122-129 (TableHint::Cache tables); writers at crates/consensus/worker/src/network/handler.rs:269, crates/consensus/worker/src/network/handler.rs:363, crates/consensus/worker/src/network/primary.rs:119, crates/consensus/worker/src/batch_fetcher.rs:253, crates/consensus/worker/src/worker.rs:355, crates/consensus/worker/src/worker.rs:421. ↩

  57. crates/node/src/manager/node/run_epoch.rs:668-684 and crates/node/src/manager/node/run_epoch.rs:1235-1249 (process_output evicts the output’s batches from NodeBatchesCache and OurNodeBatchesCache in one transaction before forwarding it; a failure is logged and not retried), crates/consensus/executor/src/subscriber.rs:226-255, crates/consensus/executor/src/subscriber.rs:398-429, crates/consensus/executor/src/subscriber.rs:779-786 and crates/state-sync/src/lib.rs:150-159 (each output is saved and persisted to the pack before it is sent on), crates/node/src/manager/node/close_epoch.rs:985-996 (the epoch-close clear; it leaves OurNodeBatchesCache to orphan_batches, which resubmits the transactions of the node’s own uncommitted batches when the next epoch starts and then removes them), crates/consensus/worker/src/network/handler.rs:167-173 (late gossip for an evicted batch fetches and caches it again until the epoch closes). ↩

  58. crates/storage/src/tndb/split.rs:35 (CACHE_AUTO_MIN_BYTES = 256 MiB for the cache log) and crates/storage/src/tndb/split.rs:58 (env_options), crates/storage/src/tndb/store.rs:695 (wants_compaction: at least that long, at least twice its length after the last compaction, and holding a dead row), crates/storage/src/tndb/compact.rs (the module docs: only live rows are copied into the new generation, which replaces the old one), crates/storage/src/tndb/README.md (Compaction). ↩ ↩2

  59. Releases before tndb: the MDBX cache environment’s fixed maximum (PROD_CACHE_MAX = 1024 MB) and the epoch environment’s (PROD_EPOCH_MAX = 512 MB) in crates/storage/src/mdbx/database.rs, opened with shrink_threshold: Some(0) (the file never shrinks). tndb replaced it as the node’s consensus database in 2026-10. ↩ ↩2

  60. chain-configs/mainnet/genesis.yaml:98 and chain-configs/testnet/genesis.yaml:103 (ConsensusRegistry epoch-duration slot, 0x5460 = 21,600 s in both files). Epoch length is a genesis parameter (--epoch-duration-in-secs), not a node setting, so operators cannot change it. ↩

  61. crates/telcoin-network-cli/src/genesis/mod.rs:93. ↩

  62. crates/storage/src/tndb/store.rs (Core::write: a batch that fails to append is rolled back and its error returned), crates/consensus/worker/src/worker.rs:355-359 and crates/consensus/worker/src/worker.rs:421-423 (FatalDBFailure when the insert returns an error), crates/storage/src/archive/data_file.rs:1261-1272 (grow_to preallocates), crates/storage/src/tndb/compact.rs:134-136 and crates/storage/src/tndb/compact.rs:402-412 (a compaction gives way below 256 MiB free), crates/storage/src/tndb/commit.rs:406 and crates/storage/src/tndb/store.rs:444-455 (a failed sync latches, stopping writes until a restart), crates/storage/src/tndb/metrics.rs:25 (tn_storage_tndb_failed). ↩

  63. crates/config/src/node.rs:325-331 (2.5 s maximum, 1 s minimum). ↩

  64. crates/storage/src/tndb/store.rs (LOG_MAP_RESERVE, 16 GiB per log), crates/storage/src/archive/btree_index/index.rs (BTX_MAP_RESERVE, 1 GiB per index), crates/storage/src/lib.rs (mod tables: 14 tables), crates/storage/src/tndb/compact.rs (Builder: a compaction opens a new log and indexes beside the old ones), crates/storage/src/archive/data_file.rs (MmapDataFile: the fallback when the reservation fails), crates/storage/src/tndb/README.md (Limits and choices). ↩

  65. Measured in October 2026 on a laptop with an Intel i7-1360P and an SK Hynix NVMe drive, on Linux 7.1 with ext4, using the consensus pack benchmark (pack_bench::consensus_pack_workload in crates/storage/src/pack_bench.rs; see the Benchmarks section of crates/storage/README.md). The run used a 10-validator committee, 2 consensus outputs a second, and 100 batches of 16 KB per output. With the default power settings, saving an output took 9.1 ms and syncing it 9.3 ms (p50), 18.4 ms together. With the performance governor and APST off, they took 4.2 ms and 2.3 ms, 6.6 ms together before rounding. Run back to back, with no idle time between outputs, they took 3.5 ms and 1.4 ms. Both settings were changed together, so their separate shares were not measured. ↩

  66. crates/consensus/primary/src/network/handler.rs:767-829 (check_header_lead: a lead within the tolerance is passed on to be waited out at 777-787, a lead within the tolerance plus vote_timeout gets a retryable answer with no penalty at 788-816, and a larger lead is rejected at 817-828), crates/consensus/primary/src/network/handler.rs:877-878 (a deferral is answered on arrival), crates/consensus/primary/src/network/handler.rs:1019-1032 (the wait before voting), penalty_from_header_error in crates/consensus/primary/src/error/network.rs (no score penalty for relative clock skew), crates/config/src/network.rs:736-737 (max_header_time_drift_tolerance), crates/config/src/network.rs:774 (250 ms default), crates/config/src/node.rs:333-335 (5 s vote_timeout default). The node writes its network config only when the file is missing (crates/config/src/traits.rs:76-83), so a data directory first started by an older binary keeps the 1 that binary wrote, read as 1 s. crates/telcoin-network-cli/README.md, section max_header_time_drift_tolerance (network-config), shows how to check and change it. ↩

  67. crates/node/src/manager/node.rs:984-987, crates/telcoin-network-cli/src/node.rs:347-358 (the --observer flag is removed and rejected). ↩

  68. crates/consensus/worker/src/worker.rs:337-339, crates/consensus/worker/src/worker.rs:281-323. ↩

  69. crates/consensus/worker/src/network/handler.rs:138-144. ↩

  70. crates/engine/src/payload_builder.rs:194-196. ↩

  71. Measured, sampler_by_node.*.growth_mixed.io_write_bytes over the mixed window, divided by storage_growth.chain_tx_in_window and by the data directory’s growth, excluding the restarted validator. The process write rate is storage_growth.telcoin_process_write_bytes_per_sec: 56 MB/s median on e2 and 163 MB/s on c3. The scaling to 260 TPS is modelled. ↩

Execution database: disk and memory

This page covers the execution database of this release: reth’s tables on the tn-lmdb engine, in db/tn-lmdb.dat. It adds to Hardware Requirements, whose network benchmark ran on the previous execution database (MDBX).

Every figure here is measured, on the setup named beside it. All of them ran on development builds of this release’s storage work (the sls_storage_v2 branch) before it merged as #1834: tn-lmdb’s format 7, where the release writes format 8 (overflow runs carry their tree’s tag), and without the release’s split of a hot contract’s storage root by first nibble. They have not been measured again on the release’s code. Most come from the execution benchmark, which runs generated transfer and contract load through the node’s execution path with durable commits. Its peak profile puts 20 batches of 30M gas in each consensus output (about 11,700 transactions). Its busy profile puts 8 batches of 15M gas in each output. The benchmark is tn-engine’s exec_bench test (crates/engine/tests/exec_bench/main.rs lists its knobs); etc/reth-exec-bench.sh runs it, and peak and busy are that script’s peak and busy profiles.

Disk

Each consensus output ends in one durable commit of the execution database. The commit writes every page the output changed, and those pages are spread across the file. On the peak profile with storage layout v2 and gap fill off, one commit wrote about 77,000 pages as about 62,600 separate write I/Os, about 4.9 KiB each. On the busy profile it was about 21,400 write I/Os. The engine counted these on a Mac M1 Max; the cloud disks below saw writes of about the same size. On a disk that caps I/Os per second, the commit’s time is set by that I/O count, not by its bytes.

The two tables below ran before 2026-11-12 on builds whose commits were not recorded.

Mean time in the commit of one peak output, gap fill off:

DiskVMLayout v2Layout v1
GCP Hyperdisk Balanced, 4,500 IOPS, 515 MB/sc3-highmem-8, 64 GB12.3 s16.4 s
GCP Hyperdisk Balanced, 20,000 IOPS, 800 MiB/sc3-highcpu-8, 16 GB1.4 s2.4 s

Mean time per consensus output, everything included (execution, state root, commit), layout v2, gap fill off, serial state root:

DiskVMPeakBusy
Local NVMe SSD, ext4c3-standard-8-lssd, 32 GB2,682 ms685 ms
GCP Hyperdisk Balanced, 20,000 IOPS, 800 MiB/sc3-highcpu-8, 16 GB3,509 ms1,095 ms

During commits on the 20,000-IOPS disk the node wrote about 90 MiB/s in writes of about 5 KiB, about 18,000 IOPS: the disk was the limit.

By provisioned IOPS, with the node’s defaults

The tables above ran with gap fill off and one state-root thread. The tables below ran with the node’s defaults on Linux (--db.gap-fill auto, parallel state roots), measured on 2026-11-12. Setup: a GCP c3-highcpu-8 (8 vCPU, 16 GB) with the datadir on a 200 GB Hyperdisk Balanced data disk (ext4), storage layout v2, durable commits, outputs run back to back. The benchmark was built from commit 6886de251 of the sls_storage_v2 branch with the gap fill auto chooser of b3623540f (so format 7 and no storage-root split, as the top of this page says; the release’s auto chooser is b3623540f’s), and run with TN_EXEC_BENCH_LAYOUT=v2 and TN_EXEC_BENCH_GAP_FILL=auto (and TN_EXEC_BENCH_OUTPUTS=150 at peak): the 800 MiB/s rows through etc/reth-exec-bench.sh’s busy and peak profiles, two rounds each, as the after side of a comparison with 6886de251; the 300 MiB/s row as two direct runs of the same build. Each cell is the mean of two runs of 300 busy or 150 peak outputs. The two runs of every cell agreed within 5%, except the 40,000-IOPS busy pair’s time per output (512 and 460 ms, explained below).

Mean time per consensus output and in its commit:

Disk (Hyperdisk Balanced)Busy: per outputBusy: commitPeak: per outputPeak: commit
10,000 IOPS, 800 MiB/s964 ms680 ms2,463 ms1,310 ms
20,000 IOPS, 300 MiB/s807 ms492 ms2,598 ms1,324 ms
20,000 IOPS, 800 MiB/s629 ms339 ms1,964 ms782 ms
40,000 IOPS, 800 MiB/s486 ms157 ms1,670 ms408 ms

What the node sustained, outputs back to back:

Disk (Hyperdisk Balanced)Busy: outputs/sBusy: transactions/sPeak: outputs/sPeak: transactions/s
10,000 IOPS, 800 MiB/s1.042,4240.414,763
20,000 IOPS, 300 MiB/s1.242,8960.384,516
20,000 IOPS, 800 MiB/s1.593,7130.515,972
40,000 IOPS, 800 MiB/s2.064,8200.607,023

For scale, the benchmark timestamps its outputs one second apart.

  • Execution (55 to 65 ms busy, about 260 ms peak) and the state root (73 to 78 ms busy, 360 to 380 ms peak) were the same on every disk. The commit was what the disk changed, and each doubling of IOPS about halved it.
  • Throughput matters as well as IOPS, most at peak. A peak output changes about 76,000 pages, about 300 MiB, so at 300 MiB/s its commit takes over a second whatever the IOPS. At 20,000 IOPS, 300 MiB/s instead of 800 made a busy output 28% slower and a peak one 32% slower.
  • auto fills wider on a disk with fewer IOPS, writing more bytes to issue fewer writes. Per busy output it wrote about 442 MiB at 10,000 IOPS, 247 MiB at 20,000 and 122 MiB at 40,000 (mean widths 14.9, 7.4 and 1.9 pages); per peak output 917, 570 and 306 MiB (mean widths 8.2, 4.0 and 0.04). At 10,000 IOPS a peak commit wrote about 700 MiB/s, close to the disk’s 800 MiB/s limit.
  • auto chose width 0 (no fill) where no wider width cost less, and otherwise only while it measured the disk at the start of a run:
    • 40,000 IOPS: 147 of each peak run’s 150 commits, where its probes at width 2 took about 510 ms against about 400 ms at 0. In one busy run, 127 of its 300 commits (outputs 0 to 129), at the cost of width 2 there (159 ms); the other busy run filled at widths 2 and 4 throughout. That pair’s times per output differ, 512 and 460 ms, though their commits took 160 and 155 ms: writing the blocks took 186 against 147 ms, most of the difference in the first 150 outputs, while the page cache was still filling.
    • 20,000 IOPS, 800 MiB/s: 4 and 16 of each busy run’s 300 commits, all in the first 32 outputs, which averaged 581 and 367 ms against about 340 ms for the rest. None at peak.
    • 20,000 IOPS, 300 MiB/s: 23 and 19 of each busy run’s commits, all in the first 31 outputs, which cost less than the rest (339 and 363 ms against 502); 8 of each peak run’s 150 (its first 7 and one later probe), at about 1.57 s against 1.31 s.
    • 10,000 IOPS: none.

What this means for a validator:

  • Local NVMe is the recommended disk in Hardware Requirements. It was the fastest disk measured with gap fill off and one state-root thread (above), and with gap fill auto it outran the 20,000-IOPS disk (Gap fill, below). It was not measured with the node’s defaults, so the per-IOPS tables do not compare with it: with the defaults, the 40,000-IOPS disk’s busy output took 486 ms, against local NVMe’s 685 ms with gap fill off and one state-root thread.
  • On cloud block storage, the minimum is 20,000 sustained write IOPS. With the defaults, at 800 MiB/s, a busy output took 629 ms (1.59 outputs a second) and a peak one 1,964 ms (0.51 a second).
  • 10,000 IOPS is not enough. A busy output took 964 ms, about the second between the benchmark’s outputs, so the node kept up with busy load with no margin, and at peak its commits wrote about 700 MiB/s of the disk’s 800.
  • For cloud block storage, 40,000 IOPS is recommended. Its commit took 157 ms of a 486 ms busy output (2.06 outputs a second) and 408 ms of a 1,670 ms peak one (0.60 a second), so more IOPS can save at most that commit time.
  • Provision at least 800 MiB/s with the IOPS. At 20,000 IOPS, 300 MiB/s gave a busy output of 807 ms and a peak one of 2,598 ms, against 629 and 1,964 ms at 800 MiB/s: 28% and 32% slower. Nothing above 800 MiB/s was measured on cloud block storage.
  • No disk measured keeps up with peak load at one output a second. Even at 40,000 IOPS a peak output took 1.7 s, 1.3 s of it outside the commit (execution, the state root and writing the blocks). Peak-sized outputs arriving that fast queue on any of these disks.
  • 4,500 IOPS is too slow for a busy validator. The commit of one peak output took 12 s or more.
  • A migrated datadir needs more. These figures are for storage layout v2. A datadir migrated from an earlier release keeps layout v1 until its execution database is rebuilt (telcoin-network db reset-execution), and v1’s commits took longer where both were measured: with gap fill off, 2.4 s against 1.4 s per peak commit at 20,000 IOPS, and 16.4 s against 12.3 s at 4,500. Layout v1 was not measured with the defaults.
  • Quote provisioned, sustained figures, not burst figures.

An observer executes the same outputs and makes the same commits, so the same disk guidance applies.

Gap fill (--db.gap-fill)

Gap fill trades bytes for I/Os. Before a commit’s sync, the node rewrites each short gap of unchanged pages between two runs of changed pages with the bytes those pages already hold. The disk then gets fewer, larger writes. A completed commit leaves the same file contents and size; only more bytes are written.

Gap fill needs a drive that writes each logical block atomically when the power fails. The rewritten pages include live pages of the last committed state, which no commit writes without gap fill. NVMe drives and cloud block storage, the disks Hardware Requirements asks for, meet this. On a drive that can garble the block it was writing at a power cut (a SATA SSD without power-loss protection, a hard disk, a USB drive, a RAID controller without a battery-backed cache), a power cut during a commit can damage such a page. The node then reads the damaged page as data, which can give a wrong state root (or it crashes on a block the drive cannot read), until telcoin-network db check or a later write to that page reports the damage; the database then needs a rebuild (telcoin-network db reset-execution). On such a drive, set --db.gap-fill off: auto fills on every drive while it measures it.

ValueEffect
autoThe default on Linux. Measures what the disk’s syncs cost and picks a width for each commit, from 0 (no fill) up to 64 pages.
off or 0No gap fill. The default on macOS.
1 to 64A fixed width: every gap of up to this many pages is filled.

Busy profile, layout v2, 300 outputs, transactions per second (ratio to off), measured before 2026-11-12 on builds whose commits were not recorded, with the auto chooser from before it moved its width one step at a time (the per-IOPS tables above ran the current chooser):

DiskVMoff8auto
GCP Hyperdisk Balanced, 4,500 IOPSc3-highmem-8, 64 GB4841,020 (2.1x)1,380 (2.85x)
GCP Hyperdisk Balanced, 20,000 IOPSc3-highcpu-8, 16 GB2,1503,515 (1.63x)3,157 (1.47x)
Local NVMe SSD, ext4c3-standard-8-lssd, 32 GB4,0222,287 (0.57x)4,046 (1.00x)

On local NVMe, auto settled at a mean width of 0.03, so it almost never filled. On the 20,000-IOPS disk it settled at about 6 to 7.

When to override the default:

  • Keep auto unless you have measured your own disk.
  • A fixed width of 8 beat auto on the 20,000-IOPS disk in the table above (1.63x against 1.47x). In four further busy runs on the 20,000-IOPS, 800 MiB/s disk of the per-IOPS setup, alternating a fixed 8 and auto, auto held width 8 for most commits and its commits took as long (342 against 341 ms); a fixed 8 was 3% faster per output (619 against 639 ms), all of it in the first 30 outputs, while auto was still measuring the disk. Use a fixed width only on a cloud disk you know caps IOPS and has throughput to spare, since it writes more bytes: on local NVMe, a width of 8 wrote about 3 times the bytes per commit that gap fill off wrote.
  • Never set a fixed width on local NVMe. A width of 8 cut throughput to 0.57x there.
  • off rules gap fill out while you look into a slow node. On local NVMe it changes nothing measurable, because auto already stays at 0 there.
  • On a file system that refuses non-blocking reads, such as tmpfs, gap fill turns itself off and logs a warning once per open.

Memory

Every node keeps a cross-block execution cache of recent accounts, storage slots and contract code, which block execution reads before the database. Its tables take about 160 MiB, a fixed size with no setting. It also keeps the code of up to 4,096 contracts it has executed, up to about 100 MiB more at the 24 KiB contract-size limit.

  • It is sized for execution, not for RPC. RPC reads do not use it, so an RPC node’s reads depend on the operating system’s page cache, which is free RAM.
  • On the peak profile with layout v2, it served 81% of account reads and 82% of storage reads. A 2.5 GiB cache served 84% and 85%.
  • On a Mac M1 Max (peak profile, layout v2) it cut execution from 186.6 ms to 138.7 ms per output.
  • At most about 260 MiB, it is small next to the validator minimum of 32 GB.
  • tn_reth.exec_cache_stale_hits_total counts any value the cache served that a check found stale. The node checks one hit of each kind (account, slot, code) in 256 against the database. The count should stay 0.
  • On a stale value the node drops the cache and builds that block again without it, so that block is right and the node keeps running. The unchecked values it served before may already have put the node on another state than its peers. Compare the node’s recent block hashes with a peer’s before you trust it, and report it as a bug.
  • Each node checks its own sample of hits, so a 0 on other nodes does not clear one that counted a stale value.

Linux and macOS

Linux is the production platform.

  • --db.gap-fill defaults to auto on Linux.
  • A file just written by cp, rsync or a restore sits in large page-cache folios. Until they are evicted, each commit writes whole folios back to disk, several times the bytes it changed. At its first open after a copy (when db/tn-lmdb.dat.boot is missing or names another file), the node drops db/tn-lmdb.dat from the page cache itself. Dropping the cache by hand before the first start (sync; echo 1 | sudo tee /proc/sys/vm/drop_caches) is harmless.
  • db/tn-lmdb.dat.boot records whether the database was closed cleanly in this boot. The node writes it at every start, and a start can fail on it, naming the file: a full volume, or a file another user owns, such as one a sudo run left. Free space or fix the file’s owner, or delete it with the node stopped: that is safe, and only makes the next start drop the database from the page cache.

macOS is for development and testing, not for validators.

  • --db.gap-fill defaults to off on macOS. macOS syncs a commit as ranged msync calls, which mislead auto’s cost model. No gap fill setting has been measured to speed up commits on macOS.
  • macOS’s msync and fsync do not flush the drive’s write cache, and the node does not use F_FULLFSYNC. A process or kernel crash loses no committed data, but a power loss can.

Networks and RPC Endpoints

Note

The public RPC URLs listed below are rate limited and do not support WebSocket connections: a WebSocket upgrade to these URLs gets HTTP 405. If such functionality is required, please reach out to the team.

Adiri Testnet

ParameterValue
Network NameTelcoin Network Adiri Testnet
Chain ID0x7e1 (2017)
Currency SymbolTEL
Explorershttps://telscan.io/, https://www.telscan.xyz/
Public RPC URLhttps://rpc.adiri.tel

Unstable Testnet

Adiri Testnet is the only network currently deployed. While Adiri Testnet is intended to be as stable as possible, the protocol is still under heavy development and may be reset from time to time before mainnet is launched to incorporate breaking changes.

Developer Notes

The public RPC endpoint at https://rpc.adiri.tel uses a load balancer and is primarily useful for single transactions and read queries.

Developers should prefer to connect directly with a node when running scripts or multiple consecutive transactions. Finality happens after a few seconds (up to 10s on the current testnet), and some nodes may not have updated state until then.

Developers should use Chainlist (include testnets and search “adiri”) for an up-to-date list of supported RPC nodes for public use. For more developer questions, please email support@telcoin.org.

Mainnet

Mainnet has not launched. It will use chain ID 0x2db (731) and the public RPC URL https://rpc.telcoin.network. That hostname does not serve mainnet before launch, so check that eth_chainId returns 0x2db before sending anything through it.

Namespaces

Telcoin Network nodes serve the Ethereum JSON-RPC interface over HTTP, WebSocket and IPC, so wallets, dapps and tooling built for Ethereum can read the chain and submit transactions without changes.

Methods are grouped into namespaces. A namespace is the prefix before the underscore in a method name: eth_call belongs to eth, tn_getCurrentEpoch to tn. An operator chooses which namespaces each transport serves with --http.api and --ws.api; Enabling Namespaces explains the flags, the defaults and how to check what a node serves.

NamespaceOn by defaultCost to serveWhat it covers
ethyeslowEthereum-compatible chain, account, transaction, simulation and filter methods
netyeslowChain id, listening state and the worker network’s peer count
web3yeslowClient version and Keccak-256 hashing
rpcyestrivialThe namespaces the transport serves
tnyeslow to moderate (blocking reads are capped at 64 concurrent requests)Telcoin Network consensus, epoch, validator and staking data
debugno, only when namedhighRaw block and transaction data and geth-style EVM tracing
traceno, only when namedhighParity-style call traces, replays and trace filters

debug and trace re-execute historical transactions against archive state. One request can cost far more than an eth_* call, so they are never part of the default set or of all.

Node role--http.api / --ws.apiNotes
Core validatoreth,net,web3Serve RPC only on a private or gateway interface; see network topology. Keep eth: observers forward eth_sendRawTransaction to a committee validator’s advertised RPC endpoint.
Public RPC (observer)eth,net,web3,rpc,tnThe default set; no flag is needed.
Private archive or indexereth,net,web3,rpc,tn,debug,traceKeep behind authentication or a method allowlist, and size --rpc.max-tracing-requests for the host.

The JSON-RPC methods are documented per namespace in the sections below. Each page lists the parameters, the result, and a curl request with its response.

Enabling Namespaces

A Telcoin Network node serves JSON-RPC over three transports, and each transport serves its own set of namespaces. This page covers the flags that choose them, the limits that keep the expensive ones in check, and how to confirm what a node actually serves.

Transports

TransportEnabled byListens onNamespaces
HTTP--http--http.addr (default 127.0.0.1), --http.port (default 8545)--http.api
WebSocket--ws--ws.addr (default 127.0.0.1), --ws.port (default 8546)--ws.api
IPCon unless --ipcdisable--ipcpath (default /tmp/tn.ipc, host-global; --instance N appends -N, workers above 0 append -wN; a node refuses to start if another process serves the socket)always the default set; there is no --ipc.api

Subscriptions (eth_subscribe) need a WebSocket or IPC connection.

A node that runs more than one worker starts one RPC server per worker. Worker 0 uses the ports and IPC path above; every other worker binds its own derived ports and IPC path, which the node logs at startup (worker rpc endpoints resolved). Every worker’s server serves the same namespace selection and applies the same CORS and origin lists as worker 0. When HTTP and WebSocket share a port, worker 0 serves both on one server with one list (--ws.origins, or --http.corsdomain when only that is set; two different lists are refused at startup), and every other worker applies that list to both its HTTP and its WebSocket server.

Choosing namespaces

--http.api and --ws.api take a comma-separated list of namespace names. The names a node accepts are eth, net, web3, rpc, tn, debug and trace.

ValueNamespaces served
flag not giveneth, net, web3, rpc, tn
alleth, net, web3, rpc, tn
a list, for example eth,net,web3exactly the listed namespaces
nonenothing

The rules behind the table:

  • A list is served exactly as written. --http.api eth,net,web3 serves no tn_* methods; add tn to the list to keep them.
  • debug and trace are served only when named in the list; all never includes them. Naming either one logs a warning at startup.
  • Names are lowercase and case-sensitive: TN or Eth is not recognised. Only all and none are accepted in any case.
  • A name the node does not serve (admin, txpool, ots, a misspelling) is dropped from the selection with a startup warning that names it and lists the supported names. The node still starts and serves the rest of the list.
  • all and none must be the whole value. When the first entry is all or none the rest of the list is ignored, so all,debug serves the default set without debug. Write the full list instead: eth,net,web3,rpc,tn,debug.
  • HTTP and WebSocket are configured separately. A namespace named only in --ws.api is not served over HTTP.

HTTP and WebSocket on one port

When HTTP and WebSocket listen on the same address and port, one server answers both protocols, so the two selections must be identical, and so must --http.corsdomain and --ws.origins when both are set. The RPC server refuses to start otherwise. A missing flag counts as the default set, so on a shared port give --http.api and --ws.api the same list, or leave both out: --http.api eth,net,web3 with no --ws.api does not start.

Why debug and trace are off by default

Telcoin Network nodes keep the full chain history, so every block since genesis can be re-executed. debug_trace* and trace_* methods do exactly that: a single block trace, or a trace_filter over a range of blocks, replays every transaction in the EVM and can take seconds of CPU time and a large response.

If you serve them:

  • run them on a separate node from your public RPC and from any validator;
  • keep the endpoint behind authentication (--rpc.jwtsecret) or a proxy that allows only the methods you need;
  • set --rpc.max-tracing-requests low (2 to 4 on a shared host) and --rpc.max-trace-filter-blocks small;
  • cap response size with --rpc.max-response-size.

Some debug_* methods are registered but do nothing; debug lists them.

Limits and access flags

FlagDefaultEffect
--rpc.max-tracing-requestsCPU cores minus 2, at least 2Concurrent tracing requests on each worker’s RPC endpoint, shared by debug_trace*, debug_executionWitness* and trace_*; further requests wait for a free slot. Values below 2 are refused: trace_filter takes two slots at once. A request keeps its slot until its trace ends, even after a timeout or a disconnect
--rpc.max-trace-filter-blocks100Largest block range one trace_filter request may cover
--rpc.max-blocks-per-filter100000 (0 = no limit)Largest block range for eth_getLogs and log filters
--rpc.max-logs-per-response20000 (0 = no limit)Most logs one eth_getLogs or filter response may return. A range query also reads at most 50 receipts and logs for each log this allows (1,000,000 by default), whether they match or not, and on a node that stores transactions by position each block whose transactions it resolves counts as 1,000 reads; a query that needs more fails with a smaller range to retry, as one over the log limit does. A single-block query is never refused for either, and 0 turns off both
--rpc.gascap50000000Gas limit for eth_call, eth_estimateGas and the debug and trace call methods
--rpc.max-response-size160 (MB)Largest response the server sends
--rpc.max-connections500Concurrent RPC connections
--rpc.max-subscriptions-per-connection128Most subscriptions (eth_subscribe) one WebSocket or IPC connection holds; further ones fail with -32006. Each newPendingTransactions subscription also takes one of the 1,024 listener slots of its kind on the worker’s transaction pool, first come across connections, so one connection holds at most an eighth of them
--rpc.max-batch-requests100Most calls in one JSON-RPC batch request, on HTTP, WebSocket and IPC; a larger batch is refused whole
--rpc.max-active-filters1000Most installed filters (eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter) on each worker’s RPC endpoint, across all its clients, first come, first served; a filter is removed when uninstalled or left unpolled for five minutes
--http.corsdomainnoneOrigins allowed to call the HTTP server from a browser
--ws.originsunset: any originOrigins allowed to open a WebSocket connection. Unset, the node checks no origin, so any web page can connect. A request without an Origin header (a client that is not a browser) always passes
--rpc.jwtsecretnoneHex-encoded secret; when set, HTTP and WebSocket requests need a JWT bearer token

Examples

These show only the RPC flags; add them to the telcoin-network node command you already run.

A public RPC node (an observer) serving the default set on all interfaces:

--http --http.addr 0.0.0.0 --ws --ws.addr 0.0.0.0

A validator serving the minimum on its private interface. Keep eth: observers forward eth_sendRawTransaction to a committee validator’s advertised RPC endpoint, and leave tn to non-validating nodes:

--http --http.addr 10.0.0.5 --http.api eth,net,web3

A local development node with every namespace, including tracing:

--http --http.api eth,net,web3,rpc,tn,debug,trace

Verify

rpc_modules lists the namespaces a transport serves, when rpc is part of its selection:

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { "eth": "1.0", "net": "1.0", "rpc": "1.0", "tn": "1.0", "web3": "1.0" }
}

A namespace that is not served answers every one of its methods with the JSON-RPC “method not found” error:

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x..."],"id":1}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": { "code": -32601, "message": "Method not found" }
}

The node builds the rpc_modules answer once, for the first transport whose selection includes rpc, in the order HTTP, WS, IPC, and every transport then returns that list. When HTTP and WS both serve rpc with different selections, the answer on WS and IPC is HTTP’s list. Tracked in #1588.

Upgrading from earlier releases

Earlier releases served tn on every enabled transport whatever --http.api or --ws.api said, including none. tn is now selected like the other namespaces:

  • an explicit list must name tn to keep the tn_* methods, for example --http.api eth,net,web3,tn;
  • none serves nothing;
  • with no --http.api or --ws.api flag, or with all, the transport now also serves rpc_modules.
  • with HTTP and WebSocket on the same port, a list on only one of the two flags no longer starts, because the other transport now resolves to the default set; give both flags the same list.

eth

The eth namespace is the Ethereum-compatible core of the API: chain and block data, account state, transaction submission and receipts, call simulation, gas and fee quotes, and log filters. It is on by default and every node role should serve it; validators need it because observers forward eth_sendRawTransaction to a committee validator’s advertised RPC endpoint.

Telcoin Network changes a few of these methods so they agree with how the network prices transactions. eth_gasPrice, eth_maxPriorityFeePerGas, the next-block entry of eth_feeHistory, and simulations at latest or pending (eth_call, eth_estimateGas, eth_createAccessList) use the worker’s current epoch base fee rather than the latest header’s, and eth_sendRawTransaction honours the operator’s --rpc.txfeecap.

The methods with a page are listed in the sidebar, with the log filter methods under Filter Methods.

Served methods without a page yet

The node also serves these eth methods. They behave as in reth unless noted.

MethodNotes
eth_blobBaseFee
eth_callBundleWaits for the same concurrency permit as eth_call, and for one of the --rpc.proof-permits permits (25 by default), which eth_getProof, eth_callMany and eth_simulateV1 share; it keeps both until its work ends, even after its client disconnects. The bundle’s transactions share one block gas limit (gasLimit, or the node’s call gas cap): a transaction whose gas limit exceeds what the earlier ones left fails the whole request, and a bundle with more transactions than the node’s call gas cap (--rpc.gascap) can hold at 21,000 gas each is refused before any is decoded, whatever its gasLimit. A request keeps at most 32 MiB of return and revert data in all, counted raw: the transaction that takes it past 32 MiB fails the request with -32602 request exceeds the output budget of 33554432 bytes
eth_callManyOne request shares a gas budget of --rpc.gascap across all its calls: a request with more calls than the budget can hold at 21,000 gas each is refused, and the request fails once the gas its calls used exceeds the budget. A request keeps at most 32 MiB of return and revert data in all, counted raw: the call that takes it past 32 MiB fails the request with -32602 request exceeds the output budget of 33554432 bytes. Each request takes one of the --rpc.proof-permits permits (25 by default), which eth_getProof, eth_callBundle and eth_simulateV1 share, and keeps it until its work ends, even after its client disconnects. Under the default --rpc.pending-block none, pending selects the latest block
eth_fillTransactionMissing fee fields are filled from the worker’s epoch base fee
eth_getAccount
eth_getAccountInfo
eth_getHeaderByHash
eth_getHeaderByNumber
eth_getRawTransactionByBlockHashAndIndex
eth_getRawTransactionByBlockNumberAndIndex
eth_getRawTransactionByHash
eth_getTransactionBySenderAndNoncenull when the sender’s nonce moved without a transaction of theirs in the block (a contract creation, or a system call)
eth_sendRawTransactionSyncGuarded by --rpc.txfeecap like eth_sendRawTransaction
eth_simulateV1Block count capped by --rpc.max-simulate-blocks. One request shares a gas budget of --rpc.gascap across the calls of all its blocks: a call runs with at most the gas the earlier calls left, even if its gas is higher, and the request fails once less than 21,000 gas is left for the next call. A request keeps at most 32 MiB of return, revert and log data in all, counted raw: the call that takes it past 32 MiB fails the request with -32602 request exceeds the output budget of 33554432 bytes. Each request takes one of the --rpc.proof-permits permits (25 by default), which eth_getProof, eth_callMany and eth_callBundle share, and keeps it until its work ends, even after its client disconnects. Under the default --rpc.pending-block none, pending selects the latest block
eth_subscribe, eth_unsubscribeWebSocket and IPC only. A logs subscription’s filter takes the same size limit as eth_getLogs: at most 1,000 addresses and 1,000 values per topic position

These are registered but cannot do useful work on Telcoin Network:

MethodResult
eth_signTransaction, eth_signTypedDataError: the node holds no signing accounts (see eth_sign)
eth_coinbase, eth_mining, eth_getWork, eth_submitWorkError: unimplemented
eth_hashrateAlways 0x0
eth_submitHashrateAlways false
eth_getBlockAccessListByBlockHash, eth_getBlockAccessListByBlockNumberError: unimplemented

eth_accounts

Parameters

None

Returns

Array of DATA, 20 Bytes - Addresses owned by the client.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": []
}

source

eth_blockNumber

Parameters

None

Returns

QUANTITY - Hexadecimal value of the current block number the client is on.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}'

Result

{
"jsonrpc":"2.0",
"result":"0x7328cb", //7547083
"id":83
}

source

eth_call

Parameters

Object - The transaction call object:

  • from: DATA, 20 bytes - (optional) The address the transaction is sent from.
  • to: DATA, 20 bytes - The address the transaction is directed to.
  • gas: QUANTITY - (optional) Hexadecimal value of the gas provided for the transaction execution.
  • eth_call consumes zero gas, but this parameter may be needed by some executions.
  • gasPrice: QUANTITY - (optional) Hexadecimal value of the gasPrice used for each paid gas.
  • maxPriorityFeePerGas: QUANTITY - Hexadecimal maximum fee, in Wei, the sender is willing to pay per gas above the base fee.
  • maxFeePerGas: QUANTITY - Hexadecimal maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas.
  • value: QUANTITY - Hexadecimal of the value sent with this transaction.
  • data: DATA - (optional) Hash of the method signature and encoded parameters. See Ethereum contract ABI specification.

block parameter: QUANTITY|TAG [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized. See the default block parameter.

Returns

DATA - The return value of the executed contract

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_call","params":[{
  "to":"0x4392743B97C46c6Aa186A7f3D0468fbF177ee70F",
  "gas":"0x76c0",
  "gasPrice":"0x0",
  "value":"0x0",
  "data":"0x06fdde03"},
  "latest"],"id":1}'

Result

{
"jsonrpc":"2.0",
"result":"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b54656c636f696e20415544000000000000000000000000000000000000000000", // Telcoin AUD
"id":1
}

source

eth_chainId

Parameters

None

Returns

chainId - Hexadecimal value as a string representing the integer of the current chain id.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":62}'

Result

{
  "id":62,
  "jsonrpc": "2.0",
  "result": "0x7e1"
}

source

eth_createAccessList

Creates an EIP-2930 access list that you can include in a transaction.

Parameters

from: DATA, 20 bytes - (optional) The address the transaction is sent from.

to: DATA, 20 bytes - The address the transaction is directed to.

gas: QUANTITY - (optional) Hexadecimal value of the gas provided for the transaction execution.

gasPrice: QUANTITY - (optional) Hexadecimal value of the gasPrice , in Wei, provided by the sender. The default is 0. used only in non-EIP-1559 transactions.

maxPriorityFeePerGas: QUANTITY - (optional) Hexadecimal of the maximum fee, in Wei, the sender is willing to pay per gas above the base fee. If used, must specify maxFeePerGas .

maxFeePerGas: QUANTITY - (optional) Hexadecimal of the maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. If used, must specify maxPriorityFeePerGas .

value: QUANTITY - Hexadecimal of the value sent with this transaction.

data: DATA - (optional) Hash of the method signature and encoded parameters. See Ethereum contract ABI specification.

block parameter: QUANTITY|TAG [Required] - Hexadecimal value of the block number, or one of the string tags latest, earliest, safe, or finalized. See the default block parameter.

Returns

Access list object with the following fields:

accessList - A list of objects with the following fields:

  • address: DATA, 20 bytes - Addresses to be accessed by the transaction.
  • storageKeys: DATA - Storage keys to be accessed by the transaction.

gasUsed: QUANTITY - Hexadecimal string representing the approximate gas cost for the transaction if the access list is included.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_createAccessList","params":[{
        "from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63",
        "data": "0x608060806080608155"},
        "finalized"],"id":1}'

Result

{
  jsonrpc: '2.0',
  result: { accessList: [ {address: '0x45e5af19ae13aac19215266edfab04f8db6f2c53',storageKeys: ['0x0000000000000000000000000000000000000000000000000000000000000081']} ], gasUsed: '0x12e92' },
  id: 1
}

source

eth_estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.

Parameters

from: DATA, 20 bytes - (optional) The address the transaction is sent from.

to: DATA, 20 bytes - (optional) The address the transaction is directed to.

gas: QUANTITY - (optional) Hexadecimal value of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.

gasPrice: QUANTITY - (optional) Hexadecimal value of the gasPrice used for each paid gas.

maxPriorityFeePerGas: QUANTITY - (optional) Hexadecimal value of the gasPrice , in Wei, provided by the sender. The default is 0. used only in non-EIP-1559 transactions.

maxFeePerGas: QUANTITY - (optional) Hexadecimal of the maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. If used, must specify maxPriorityFeePerGas .

value: QUANTITY - (optional) Hexadecimal of the value sent with this transaction.

data: DATA - (optional) Hash of the method signature and encoded parameters. See Ethereum contract ABI specification.

block parameter: QUANTITY|TAG [Required] - Hexadecimal block number, or one of the string tags latest, earliest, pending, safe, or finalized. See the default block parameter.

If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.

Returns

QUANTITY - Hexadecimal of the estimate of the amount of gas used for the given transaction

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{
        "from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC",
        "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
        "value": "0x0"}],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x5208" // 21000
}

source

eth_feeHistory

Parameters

QUANTITY - Hexadecimal number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. If blocks in the specified block range are not available, then only the fee history for available blocks is returned.

QUANTITY|TAG - Hexadecimal representing the highest number block of the requested range, or one of the string tags latest or earliest.

Array of QUANTITY - (optional) A monotonically increasing list of integer percentile values to sample from each block’s effective priority fees per gas in ascending order, weighted by gas used.

Returns

oldestBlock: QUANTITY - Hexadecimal of the lowest number block of the returned range.

baseFeePerGas: Array of QUANTITY - An array of hexadecimal block base fees per gas, including an extra block value. The extra value is the next block after the newest block in the returned range. Returns zeroes for blocks created before EIP-1559.

gasUsedRatio: Array of QUANTITY - An array of hexadecimal block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.

reward: Array of QUANTITY - An array of hexadecimal effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[
         "0x5",
         "latest",
         [20, 30]],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": {
    baseFeePerGas: [ '0x7', '0x7', '0x7', '0x7', '0x7', '0x7' ],
    gasUsedRatio: [ 0, 0, 0, 0, 0 ],
    oldestBlock: '0x667017',
    reward: [ ["0x0","0x0"], ["0x0","0x0"],
      ["0x0","0x0"],["0x0","0x0"],
      ["0x0","0x0"] ]
  }
}

source

eth_gasPrice

Parameters

None

Returns

QUANTITY- Hexadecimal integer of the current gas price in wei.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":73}'

Result

{
  "id":73,
  "jsonrpc": "2.0",
  "result": "0x3b9aca07" // 1000000007 Wei
}

source

eth_getBalance

Parameters

DATA, 20 Bytes - Address to check for balance.

QUANTITY|TAG - Hexadecimal integer block number, or the string "latest", "earliest", "safe", or "finalized", see the default block parameter

Returns

QUANTITY - Hexadecimal of the current account balance in wei.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x3da87b1c3743bd2da60df2ef1bc6f26ef9da6086", "latest"],"id":1}'

Result

{
"jsonrpc":"2.0",
"result":"0xfbea2ff545df4530c6", // 4.6470077e+21
"id":1
}

source

eth_getBlockByHash

Parameters

DATA, 32 Bytes - Hash of a block.

Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.

Returns

Object - A block object, or null when no block was found:

  • number: QUANTITY - Hexadecimal of the block number. null when its pending block.
  • hash: DATA, 32 Bytes - Hash of the block. null when its pending block.
  • parentHash: DATA, 32 Bytes - Hash of the parent block.
  • nonce: DATA, 8 Bytes - Hash of the generated proof-of-work. null when its pending block.
  • sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: DATA, 256 Bytes - The bloom filter for the logs of the block. null when its pending block.
  • transactionsRoot: DATA, 32 Bytes - The root of the transaction trie of the block.
  • stateRoot: DATA, 32 Bytes - The root of the final state trie of the block.
  • receiptsRoot: DATA, 32 Bytes - The root of the receipts trie of the block.
  • miner: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given.
  • difficulty: QUANTITY - Hexadecimal of the difficulty for this block.
  • totalDifficulty: QUANTITY - Hexadecimal of the total difficulty of the chain until this block.
  • extraData: DATA - the “extra data” field of this block.
  • size: QUANTITY - Hexadecimal of the size of this block in bytes.
  • gasLimit: QUANTITY - Hexadecimal of the maximum gas allowed in this block.
  • gasUsed: QUANTITY - Hexadecimal of the total used gas by all transactions in this block.
  • timestamp: QUANTITY - Hexadecimal of the unix timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: Array - Array of uncle hashes.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7", false],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7",
    "parentHash": "0xdaf2bac916ac308e3f5eb077570a24aba29e951ce7306eae52b3e11ba1a7394f",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "miner": "0x3333333333333333333333333333333333333333",
    "stateRoot": "0x9bfa443af733083d3c0eb602112b393683f405cb29b670741b65cb70ea858255",
    "transactionsRoot": "0x47bfe0736bb49e246b2aacec935e632885ec2a6067b11d657637646f391251a7",
    "receiptsRoot": "0x5b6c99267f9131834e759cff4f9d3c16568c844ee89fe6f192c149537648b075",
    "logsBloom": "0x00200000040000000000000280000028000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000008000000200000000000000000000000000000000400000000020000000010000002000800000000000000000000000010000000400000000000000000000000000000000000000000000000080000004000000000000100000000000000000000000040200100000000000000000020000000000000000002000000000000200000000000000000000000001000000000000020000080000000020000000000000000000000000000000000000001000000000000",
    "difficulty": "0x0",
    "number": "0x608eed",
    "gasLimit": "0x1c9c380",
    "gasUsed": "0x1d30a",
    "timestamp": "0x667b285d",
    "extraData": "0x",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "baseFeePerGas": "0x7",
    "totalDifficulty": "0x0",
    "uncles": [],
    "transactions": [
      "0x7e7e6d8a61ff36ab337b42b6ed2edf34761f928a110aba857aae97121d35371b"
    ],
    "size": "0x378"
  },
  "id": 1
}

source

eth_getBlockByNumber

Parameters

QUANTITY|TAG - Hexadecimal block number, or the string "earliest", "latest", "safe" or "finalized", as in the default block parameter.

Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.

Returns

Object - A block object, or null when no block was found:

  • number: QUANTITY - Hexadecimal of the block number. null when its pending block.
  • hash: DATA, 32 Bytes - Hash of the block. null when its pending block.
  • parentHash: DATA, 32 Bytes - Hash of the parent block.
  • nonce: DATA, 8 Bytes - Hash of the generated proof-of-work. null when its pending block.
  • sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: DATA, 256 Bytes - The bloom filter for the logs of the block. null when its pending block.
  • transactionsRoot: DATA, 32 Bytes - The root of the transaction trie of the block.
  • stateRoot: DATA, 32 Bytes - The root of the final state trie of the block.
  • receiptsRoot: DATA, 32 Bytes - The root of the receipts trie of the block.
  • miner: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given.
  • difficulty: QUANTITY - Hexadecimal of the difficulty for this block.
  • totalDifficulty: QUANTITY - Hexadecimal of the total difficulty of the chain until this block.
  • extraData: DATA - The “extra data” field of this block.
  • size: QUANTITY - Hexadecimal size of this block in bytes.
  • gasLimit: QUANTITY - Hexadecimal of the maximum gas allowed in this block.
  • gasUsed: QUANTITY - Hexadecimal of the total used gas by all transactions in this block.
  • timestamp: QUANTITY - Hexadecimal of the unix timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: Array - Array of uncle hashes.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x608EED", false],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7",
    "parentHash": "0xdaf2bac916ac308e3f5eb077570a24aba29e951ce7306eae52b3e11ba1a7394f",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "miner": "0x3333333333333333333333333333333333333333",
    "stateRoot": "0x9bfa443af733083d3c0eb602112b393683f405cb29b670741b65cb70ea858255",
    "transactionsRoot": "0x47bfe0736bb49e246b2aacec935e632885ec2a6067b11d657637646f391251a7",
    "receiptsRoot": "0x5b6c99267f9131834e759cff4f9d3c16568c844ee89fe6f192c149537648b075",
    "logsBloom": "0x00200000040000000000000280000028000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000008000000200000000000000000000000000000000400000000020000000010000002000800000000000000000000000010000000400000000000000000000000000000000000000000000000080000004000000000000100000000000000000000000040200100000000000000000020000000000000000002000000000000200000000000000000000000001000000000000020000080000000020000000000000000000000000000000000000001000000000000",
    "difficulty": "0x0",
    "number": "0x608eed",
    "gasLimit": "0x1c9c380",
    "gasUsed": "0x1d30a",
    "timestamp": "0x667b285d",
    "extraData": "0x",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "baseFeePerGas": "0x7",
    "totalDifficulty": "0x0",
    "uncles": [],
    "transactions": [
      "0x7e7e6d8a61ff36ab337b42b6ed2edf34761f928a110aba857aae97121d35371b"
    ],
    "size": "0x378"
  },
  "id": 1
}

source

eth_getBlockReceipts

Parameters

blockNumber: QUANTITY|TAG [Required] - Hexadecimal block number, or one of the string tags: "latest" , "earliest", "finalized", "safe".

Returns

result: Array - Array of receipt objects for every transaction in the block, or null when there is no corresponding block. Each receipt has the following fields:

  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionIndex: QUANTITY - Hexadecimal of the transactions index position in the block.
  • blockHash: DATA, 32 Bytes - Hash of the block where this transaction was in.
  • blockNumber: QUANTITY - Hexadecimal block number where this transaction was in.
  • from: DATA, 20 Bytes - Address of the sender.
  • to: DATA, 20 Bytes - Address of the receiver. null when its a contract creation transaction.
  • cumulativeGasUsed: QUANTITY - Hexadecimal of the total amount of gas used when this transaction was executed in the block.
  • effectiveGasPrice: QUANTITY - Hexadecimal of the sum of the base fee and tip paid per unit of gas.
  • gasUsed: QUANTITY - Hexadecimal of the amount of gas used by this specific transaction alone.
  • contractAddress: DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
  • logs: Array - Array of log objects, which this transaction generated.
  • logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.
  • status: QUANTITY - Either 0x1 (success) or 0x0 (failure).
  • type: QUANTITY - Hexadecimal of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["0x3FE51"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": [
    {
      "transactionHash": "0x82756da4e315a0135c3a10bf056af829e9c0270c3fd2127791dd2498cf577111",
      "transactionIndex": "0x0",
      "blockHash": "0x8e69cf10fe1b0dbb7213406f58ea99904b685532d7c3604d3e1be9684bda6d4f",
      "blockNumber": "0x3fe51",
      "cumulativeGasUsed": "0xe9994",
      "gasUsed": "0xe9994",
      "effectiveGasPrice": "0x17bfac7c00",
      "from": "0xdec366b889a53b93cfa561076c03c18b0b4d6c93",
      "to": null,
      "contractAddress": "0xf9d26a8da3fccf2c65ab6ee19bf35aa08a0326d6",
      "logs": [
        {
          "address": "0xf9d26a8da3fccf2c65ab6ee19bf35aa08a0326d6",
          "topics": [
            "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"
          ],
          "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff",
          "blockHash": "0x8e69cf10fe1b0dbb7213406f58ea99904b685532d7c3604d3e1be9684bda6d4f",
          "blockNumber": "0x3fe51",
          "transactionHash": "0x82756da4e315a0135c3a10bf056af829e9c0270c3fd2127791dd2498cf577111",
          "transactionIndex": "0x0",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000000000000000000000000000000000000000000006000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "type": "0x0"
    }
  ],
  "id": 1
}

source

eth_getBlockTransactionCountByHash

Parameters

DATA, 32 Bytes - Hash of a block

Returns

QUANTITY - Hexadecimal of the number of transactions in this block.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x1" // 1
}

source

eth_getBlockTransactionCountByNumber

Parameters

QUANTITY|TAG - Hexadecimal block number, or the string "earliest", "latest", "safe" or "finalized"

Returns

QUANTITY - Hexadecimal number of transactions in this block.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0x608EED"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x1" // 1
}

source

eth_getCode

Parameters

DATA, 20 Bytes - Address

QUANTITY|TAG - Hexadecimal integer block number, or the string "latest", "earliest", "safe" or "finalized", see the default block parameter

Returns

DATA - The code from the given address.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getCode","params":["0x5eb15fedcca9cb9c5424167e329fd56905ffe0e3", "latest"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x60806040526004361061014f5760003560e01c80638803dbee116100b6578063c45a01551161006f578063c45a015514610a10578063d06ca61f14610a25578063ded9382a14610ada578063e8e3370014610b4d578063f305d71914610bcd578063fb3bdb4114610c1357610188565b80638803dbee146107df578063ad5c464814610875578063ad615dec146108a6578063af2979eb146108dc578063b6f9de951461092f578063baa2abde146109b357610188565b80634a25d94a116101085780634a25d94a146104f05780635b0d5984146105865780635c11d795146105f9578063791ac9471461068f5780637ff36ab51461072557806385f8c259146107a957610188565b806302751cec1461018d578063054d50d4146101f957806318cbafe5146102415780631f00ca74146103275780632195995c146103dc57806338ed17391461045a57610188565b3661018857336001600160a01b037f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5161461018657fe5b005b600080fd5b34801561019957600080fd5b506101e0600480360360c08110156101b057600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135610c97565b6040805192835260208301919091528051918290030190f35b34801561020557600080fd5b5061022f6004803603606081101561021c57600080fd5b5080359060208101359060400135610db1565b60408051918252519081900360200190f35b34801561024d57600080fd5b506102d7600480360360a081101561026457600080fd5b813591602081013591810190606081016040820135600160201b81111561028a57600080fd5b82018360208201111561029c57600080fd5b803590602001918460208302840111600160201b831117156102bd57600080fd5b91935091506001600160a01b038135169060200135610dc6565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103135781810151838201526020016102fb565b505050509050019250505060405180910390f35b34801561033357600080fd5b506102d76004803603604081101561034a57600080fd5b81359190810190604081016020820135600160201b81111561036b57600080fd5b82018360208201111561037d57600080fd5b803590602001918460208302840111600160201b8311171561039e57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506110f3945050505050565b3480156103e857600080fd5b506101e0600480360361016081101561040057600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff6101008201351690610120810135906101400135611129565b34801561046657600080fd5b506102d7600480360360a081101561047d57600080fd5b813591602081013591810190606081016040820135600160201b8111156104a357600080fd5b8201836020820111156104b557600080fd5b803590602001918460208302840111600160201b831117156104d657600080fd5b91935091506001600160a01b038135169060200135611223565b3480156104fc57600080fd5b506102d7600480360360a081101561051357600080fd5b813591602081013591810190606081016040820135600160201b81111561053957600080fd5b82018360208201111561054b57600080fd5b803590602001918460208302840111600160201b8311171561056c57600080fd5b91935091506001600160a01b03813516906020013561136e565b34801561059257600080fd5b5061022f60048036036101408110156105aa57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e082013516906101008101359061012001356114fa565b34801561060557600080fd5b50610186600480360360a081101561061c57600080fd5b813591602081013591810190606081016040820135600160201b81111561064257600080fd5b82018360208201111561065457600080fd5b803590602001918460208302840111600160201b8311171561067557600080fd5b91935091506001600160a01b038135169060200135611608565b34801561069b57600080fd5b50610186600480360360a08110156106b257600080fd5b813591602081013591810190606081016040820135600160201b8111156106d857600080fd5b8201836020820111156106ea57600080fd5b803590602001918460208302840111600160201b8311171561070b57600080fd5b91935091506001600160a01b03813516906020013561189d565b6102d76004803603608081101561073b57600080fd5b81359190810190604081016020820135600160201b81111561075c57600080fd5b82018360208201111561076e57600080fd5b803590602001918460208302840111600160201b8311171561078f57600080fd5b91935091506001600160a01b038135169060200135611b21565b3480156107b557600080fd5b5061022f600480360360608110156107cc57600080fd5b5080359060208101359060400135611e74565b3480156107eb57600080fd5b506102d7600480360360a081101561080257600080fd5b813591602081013591810190606081016040820135600160201b81111561082857600080fd5b82018360208201111561083a57600080fd5b803590602001918460208302840111600160201b8311171561085b57600080fd5b91935091506001600160a01b038135169060200135611e81565b34801561088157600080fd5b5061088a611f7a565b604080516001600160a01b039092168252519081900360200190f35b3480156108b257600080fd5b5061022f600480360360608110156108c957600080fd5b5080359060208101359060400135611f9e565b3480156108e857600080fd5b5061022f600480360360c08110156108ff57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135611fab565b6101866004803603608081101561094557600080fd5b81359190810190604081016020820135600160201b81111561096657600080fd5b82018360208201111561097857600080fd5b803590602001918460208302840111600160201b8311171561099957600080fd5b91935091506001600160a01b03813516906020013561212c565b3480156109bf57600080fd5b506101e0600480360360e08110156109d657600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c001356124b8565b348015610a1c57600080fd5b5061088a6126fc565b348015610a3157600080fd5b506102d760048036036040811015610a4857600080fd5b81359190810190604081016020820135600160201b811115610a6957600080fd5b820183602082011115610a7b57600080fd5b803590602001918460208302840111600160201b83111715610a9c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612720945050505050565b348015610ae657600080fd5b506101e06004803603610140811015610afe57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e0820135169061010081013590610120013561274d565b348015610b5957600080fd5b50610baf6004803603610100811015610b7157600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e00135612861565b60408051938452602084019290925282820152519081900360600190f35b610baf600480360360c0811015610be357600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a0013561299d565b6102d760048036036080811015610c2957600080fd5b81359190810190604081016020820135600160201b811115610c4a57600080fd5b820183602082011115610c5c57600080fd5b803590602001918460208302840111600160201b83111715610c7d57600080fd5b91935091506001600160a01b038135169060200135612c42565b6000808242811015610cde576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b610d0d897f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a58a8a8a308a6124b8565b9093509150610d1d898685612fc4565b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610d8357600080fd5b505af1158015610d97573d6000803e3d6000fd5b50505050610da58583613118565b50965096945050505050565b6000610dbe848484613210565b949350505050565b60608142811015610e0c576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b6001600160a01b037f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a51686866000198101818110610e4657fe5b905060200201356001600160a01b03166001600160a01b031614610e9f576040805162461bcd60e51b815260206004820152601d60248201526000805160206144fa833981519152604482015290519081900360640190fd5b610efd7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061330092505050565b91508682600184510381518110610f1057fe5b60200260200101511015610f555760405162461bcd60e51b815260040180806020018281038252602b815260200180614540602b913960400191505060405180910390fd5b610ff386866000818110610f6557fe5b905060200201356001600160a01b031633610fd97f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8a8a6000818110610fa757fe5b905060200201356001600160a01b03168b8b6001818110610fc457fe5b905060200201356001600160a01b031661344c565b85600081518110610fe657fe5b602002602001015161350c565b61103282878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613669915050565b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b0316632e1a7d4d8360018551038151811061107157fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b505050506110e884836001855103815181106110db57fe5b6020026020010151613118565b509695505050505050565b60606111207f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b84846138af565b90505b92915050565b60008060006111597f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8f8f61344c565b9050600087611168578c61116c565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156111e257600080fd5b505af11580156111f6573d6000803e3d6000fd5b505050506112098f8f8f8f8f8f8f6124b8565b809450819550505050509b509b9950505050505050505050565b60608142811015611269576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b6112c77f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061330092505050565b915086826001845103815181106112da57fe5b6020026020010151101561131f5760405162461bcd60e51b815260040180806020018281038252602b815260200180614540602b913960400191505060405180910390fd5b61132f86866000818110610f6557fe5b6110e882878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613669915050565b606081428110156113b4576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b6001600160a01b037f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a516868660001981018181106113ee57fe5b905060200201356001600160a01b03166001600160a01b031614611447576040805162461bcd60e51b815260206004820152601d60248201526000805160206144fa833981519152604482015290519081900360640190fd5b6114a57f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506138af92505050565b915086826000815181106114b557fe5b60200260200101511115610f555760405162461bcd60e51b81526004018080602001828103825260278152602001806144d36027913960400191505060405180910390fd5b6000806115487f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8d7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a561344c565b9050600086611557578b61155b565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156115d157600080fd5b505af11580156115e5573d6000803e3d6000fd5b505050506115f78d8d8d8d8d8d611fab565b9d9c50505050505050505050505050565b804281101561164c576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b6116c18585600081811061165c57fe5b905060200201356001600160a01b0316336116bb7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8989600081811061169e57fe5b905060200201356001600160a01b03168a8a6001818110610fc457fe5b8a61350c565b6000858560001981018181106116d357fe5b905060200201356001600160a01b03166001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561173857600080fd5b505afa15801561174c573d6000803e3d6000fd5b505050506040513d602081101561176257600080fd5b505160408051602088810282810182019093528882529293506117a49290918991899182918501908490808284376000920191909152508892506139e7915050565b8661185682888860001981018181106117b957fe5b905060200201356001600160a01b03166001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561181e57600080fd5b505afa158015611832573d6000803e3d6000fd5b505050506040513d602081101561184857600080fd5b50519063ffffffff613cf216565b10156118935760405162461bcd60e51b815260040180806020018281038252602b815260200180614540602b913960400191505060405180910390fd5b5050505050505050565b80428110156118e1576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b6001600160a01b037f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5168585600019810181811061191b57fe5b905060200201356001600160a01b03166001600160a01b031614611974576040805162461bcd60e51b815260206004820152601d60248201526000805160206144fa833981519152604482015290519081900360640190fd5b6119848585600081811061165c57fe5b6119c28585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503092506139e7915050565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a516916370a0823191602480820192602092909190829003018186803b158015611a2c57600080fd5b505afa158015611a40573d6000803e3d6000fd5b505050506040513d6020811015611a5657600080fd5b5051905086811015611a995760405162461bcd60e51b815260040180806020018281038252602b815260200180614540602b913960400191505060405180910390fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611aff57600080fd5b505af1158015611b13573d6000803e3d6000fd5b505050506118938482613118565b60608142811015611b67576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031686866000818110611b9e57fe5b905060200201356001600160a01b03166001600160a01b031614611bf7576040805162461bcd60e51b815260206004820152601d60248201526000805160206144fa833981519152604482015290519081900360640190fd5b611c557f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b3488888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061330092505050565b91508682600184510381518110611c6857fe5b60200260200101511015611cad5760405162461bcd60e51b815260040180806020018281038252602b815260200180614540602b913960400191505060405180910390fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663d0e30db083600081518110611ce957fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611d1c57600080fd5b505af1158015611d30573d6000803e3d6000fd5b50505050507f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663a9059cbb611d957f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8989600081811061169e57fe5b84600081518110611da257fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611df957600080fd5b505af1158015611e0d573d6000803e3d6000fd5b505050506040513d6020811015611e2357600080fd5b5051611e2b57fe5b611e6a82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613669915050565b5095945050505050565b6000610dbe848484613d42565b60608142811015611ec7576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b611f257f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506138af92505050565b91508682600081518110611f3557fe5b6020026020010151111561131f5760405162461bcd60e51b81526004018080602001828103825260278152602001806144d36027913960400191505060405180910390fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a581565b6000610dbe848484613e32565b60008142811015611ff1576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b612020887f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a589898930896124b8565b604080516370a0823160e01b815230600482015290519194506120a492508a9187916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561207357600080fd5b505afa158015612087573d6000803e3d6000fd5b505050506040513d602081101561209d57600080fd5b5051612fc4565b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561210a57600080fd5b505af115801561211e573d6000803e3d6000fd5b505050506110e88483613118565b8042811015612170576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b0316858560008181106121a757fe5b905060200201356001600160a01b03166001600160a01b031614612200576040805162461bcd60e51b815260206004820152601d60248201526000805160206144fa833981519152604482015290519081900360640190fd5b60003490507f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561226057600080fd5b505af1158015612274573d6000803e3d6000fd5b50505050507f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663a9059cbb6122d97f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8989600081811061169e57fe5b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561232957600080fd5b505af115801561233d573d6000803e3d6000fd5b505050506040513d602081101561235357600080fd5b505161235b57fe5b60008686600019810181811061236d57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156123d257600080fd5b505afa1580156123e6573d6000803e3d6000fd5b505050506040513d60208110156123fc57600080fd5b5051604080516020898102828101820190935289825292935061243e9290918a918a9182918501908490808284376000920191909152508992506139e7915050565b87611856828989600019810181811061245357fe5b905060200201356001600160a01b03166001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561181e57600080fd5b60008082428110156124ff576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b600061252c7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8c8c61344c565b604080516323b872dd60e01b81523360048201526001600160a01b03831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b15801561258757600080fd5b505af115801561259b573d6000803e3d6000fd5b505050506040513d60208110156125b157600080fd5b50506040805163226bf2d160e21b81526001600160a01b03888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b1580156125fe57600080fd5b505af1158015612612573d6000803e3d6000fd5b505050506040513d604081101561262857600080fd5b508051602090910151909250905060006126428e8e613ede565b509050806001600160a01b03168e6001600160a01b031614612665578183612668565b82825b90975095508a8710156126ac5760405162461bcd60e51b815260040180806020018281038252602681526020018061451a6026913960400191505060405180910390fd5b898610156126eb5760405162461bcd60e51b81526004018080602001828103825260268152602001806144606026913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b81565b60606111207f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8484613300565b600080600061279d7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8e7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a561344c565b90506000876127ac578c6127b0565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b15801561282657600080fd5b505af115801561283a573d6000803e3d6000fd5b5050505061284c8e8e8e8e8e8e610c97565b909f909e509c50505050505050505050505050565b600080600083428110156128aa576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b6128b88c8c8c8c8c8c613fbc565b909450925060006128ea7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8e8e61344c565b90506128f88d33838861350c565b6129048c33838761350c565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b15801561295c57600080fd5b505af1158015612970573d6000803e3d6000fd5b505050506040513d602081101561298657600080fd5b5051949d939c50939a509198505050505050505050565b600080600083428110156129e6576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b612a148a7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a58b348c8c613fbc565b90945092506000612a667f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8c7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a561344c565b9050612a748b33838861350c565b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612acf57600080fd5b505af1158015612ae3573d6000803e3d6000fd5b50505050507f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663a9059cbb82866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612b6857600080fd5b505af1158015612b7c573d6000803e3d6000fd5b505050506040513d6020811015612b9257600080fd5b5051612b9a57fe5b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b158015612bf257600080fd5b505af1158015612c06573d6000803e3d6000fd5b505050506040513d6020811015612c1c57600080fd5b5051925034841015612c3457612c3433853403613118565b505096509650969350505050565b60608142811015612c88576040805162461bcd60e51b815260206004820152601860248201526000805160206145c3833981519152604482015290519081900360640190fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031686866000818110612cbf57fe5b905060200201356001600160a01b03166001600160a01b031614612d18576040805162461bcd60e51b815260206004820152601d60248201526000805160206144fa833981519152604482015290519081900360640190fd5b612d767f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506138af92505050565b91503482600081518110612d8657fe5b60200260200101511115612dcb5760405162461bcd60e51b81526004018080602001828103825260278152602001806144d36027913960400191505060405180910390fd5b7f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663d0e30db083600081518110612e0757fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e3a57600080fd5b505af1158015612e4e573d6000803e3d6000fd5b50505050507f00000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a56001600160a01b031663a9059cbb612eb37f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8989600081811061169e57fe5b84600081518110612ec057fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612f1757600080fd5b505af1158015612f2b573d6000803e3d6000fd5b505050506040513d6020811015612f4157600080fd5b5051612f4957fe5b612f8882878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613669915050565b81600081518110612f9557fe5b6020026020010151341115611e6a57611e6a3383600081518110612fb557fe5b60200260200101513403613118565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106130415780518252601f199092019160209182019101613022565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146130a3576040519150601f19603f3d011682016040523d82523d6000602084013e6130a8565b606091505b50915091508180156130d65750805115806130d657508080602001905160208110156130d357600080fd5b50515b6131115760405162461bcd60e51b815260040180806020018281038252602d81526020018061456b602d913960400191505060405180910390fd5b5050505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106131645780518252601f199092019160209182019101613145565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146131c6576040519150601f19603f3d011682016040523d82523d6000602084013e6131cb565b606091505b505090508061320b5760405162461bcd60e51b81526004018080602001828103825260348152602001806144076034913960400191505060405180910390fd5b505050565b60008084116132505760405162461bcd60e51b815260040180806020018281038252602b815260200180614598602b913960400191505060405180910390fd5b6000831180156132605750600082115b61329b5760405162461bcd60e51b81526004018080602001828103825260288152602001806144866028913960400191505060405180910390fd5b60006132af856103e563ffffffff61423016565b905060006132c3828563ffffffff61423016565b905060006132e9836132dd886103e863ffffffff61423016565b9063ffffffff61429316565b90508082816132f457fe5b04979650505050505050565b6060600282511015613359576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f504154480000604482015290519081900360640190fd5b815167ffffffffffffffff8111801561337157600080fd5b5060405190808252806020026020018201604052801561339b578160200160208202803683370190505b50905082816000815181106133ac57fe5b60200260200101818152505060005b6001835103811015613444576000806133fe878685815181106133da57fe5b60200260200101518786600101815181106133f157fe5b60200260200101516142e2565b9150915061342084848151811061341157fe5b60200260200101518383613210565b84846001018151811061342f57fe5b602090810291909101015250506001016133bb565b509392505050565b600080600061345b8585613ede565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f97fe61384d0aed6f145eff143d6773691f987c4147f3a1503ed6305a96d87a56609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106135915780518252601f199092019160209182019101613572565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146135f3576040519150601f19603f3d011682016040523d82523d6000602084013e6135f8565b606091505b5091509150818015613626575080511580613626575080806020019051602081101561362357600080fd5b50515b6136615760405162461bcd60e51b81526004018080602001828103825260318152602001806143d66031913960400191505060405180910390fd5b505050505050565b60005b60018351038110156138a95760008084838151811061368757fe5b602002602001015185846001018151811061369e57fe5b60200260200101519150915060006136b68383613ede565b50905060008785600101815181106136ca57fe5b60200260200101519050600080836001600160a01b0316866001600160a01b0316146136f8578260006136fc565b6000835b91509150600060028a510388106137135788613754565b6137547f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b878c8b6002018151811061374757fe5b602002602001015161344c565b90506137817f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b888861344c565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f1916602001820160405280156137be576020820181803683370190505b506040518563ffffffff1660e01b815260040180858152602001848152602001836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561382f578181015183820152602001613817565b50505050905090810190601f16801561385c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561387e57600080fd5b505af1158015613892573d6000803e3d6000fd5b50506001909901985061366c975050505050505050565b50505050565b6060600282511015613908576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f504154480000604482015290519081900360640190fd5b815167ffffffffffffffff8111801561392057600080fd5b5060405190808252806020026020018201604052801561394a578160200160208202803683370190505b509050828160018351038151811061395e57fe5b60209081029190910101528151600019015b8015613444576000806139a08786600186038151811061398c57fe5b60200260200101518786815181106133f157fe5b915091506139c28484815181106139b357fe5b60200260200101518383613d42565b8460018503815181106139d157fe5b6020908102919091010152505060001901613970565b60005b600183510381101561320b57600080848381518110613a0557fe5b6020026020010151858460010181518110613a1c57fe5b6020026020010151915091506000613a348383613ede565b5090506000613a647f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b858561344c565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613aa557600080fd5b505afa158015613ab9573d6000803e3d6000fd5b505050506040513d6060811015613acf57600080fd5b5080516020909101516001600160701b0391821693501690506000806001600160a01b038a811690891614613b05578284613b08565b83835b91509150613b66828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561181e57600080fd5b9550613b73868383613210565b945050505050600080856001600160a01b0316886001600160a01b031614613b9d57826000613ba1565b6000835b91509150600060028c51038a10613bb8578a613bec565b613bec7f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b898e8d6002018151811061374757fe5b604080516000808252602082019283905263022c0d9f60e01b835260248201878152604483018790526001600160a01b038086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b83811015613c76578181015183820152602001613c5e565b50505050905090810190601f168015613ca35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613cc557600080fd5b505af1158015613cd9573d6000803e3d6000fd5b50506001909b019a506139ea9950505050505050505050565b80820382811115611123576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6000808411613d825760405162461bcd60e51b815260040180806020018281038252602c8152602001806143aa602c913960400191505060405180910390fd5b600083118015613d925750600082115b613dcd5760405162461bcd60e51b81526004018080602001828103825260288152602001806144866028913960400191505060405180910390fd5b6000613df16103e8613de5868863ffffffff61423016565b9063ffffffff61423016565b90506000613e0b6103e5613de5868963ffffffff613cf216565b9050613e286001828481613e1b57fe5b049063ffffffff61429316565b9695505050505050565b6000808411613e725760405162461bcd60e51b81526004018080602001828103825260258152602001806144ae6025913960400191505060405180910390fd5b600083118015613e825750600082115b613ebd5760405162461bcd60e51b81526004018080602001828103825260288152602001806144866028913960400191505060405180910390fd5b82613ece858463ffffffff61423016565b81613ed557fe5b04949350505050565b600080826001600160a01b0316846001600160a01b03161415613f325760405162461bcd60e51b815260040180806020018281038252602581526020018061443b6025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610613f52578284613f55565b83835b90925090506001600160a01b038216613fb5576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b6040805163e6a4390560e01b81526001600160a01b03888116600483015287811660248301529151600092839283927f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b9092169163e6a4390591604480820192602092909190829003018186803b15801561403657600080fd5b505afa15801561404a573d6000803e3d6000fd5b505050506040513d602081101561406057600080fd5b50516001600160a01b0316141561411357604080516364e329cb60e11b81526001600160a01b038a81166004830152898116602483015291517f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b9092169163c9c65396916044808201926020929091908290030181600087803b1580156140e657600080fd5b505af11580156140fa573d6000803e3d6000fd5b505050506040513d602081101561411057600080fd5b50505b6000806141417f000000000000000000000000a3e9bf36ff51ce14a25a2cf4b4086cbcf1df781b8b8b6142e2565b91509150816000148015614153575080155b1561416357879350869250614223565b6000614170898484613e32565b90508781116141c357858110156141b85760405162461bcd60e51b81526004018080602001828103825260268152602001806144606026913960400191505060405180910390fd5b889450925082614221565b60006141d0898486613e32565b9050898111156141dc57fe5b8781101561421b5760405162461bcd60e51b815260040180806020018281038252602681526020018061451a6026913960400191505060405180910390fd5b94508793505b505b5050965096945050505050565b600081158061424b5750508082028282828161424857fe5b04145b611123576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b80820182811015611123576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b60008060006142f18585613ede565b50905060008061430288888861344c565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561433a57600080fd5b505afa15801561434e573d6000803e3d6000fd5b505050506040513d606081101561436457600080fd5b5080516020909101516001600160701b0391821693501690506001600160a01b038781169084161461439757808261439a565b81815b9099909850965050505050505056fe556e697377617056324c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65645472616e7366657248656c7065723a3a736166655472616e736665724554483a20455448207472616e73666572206661696c6564556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54556e697377617056324c6962726172793a20494e53554646494349454e545f4c4951554944495459556e697377617056324c6962726172793a20494e53554646494349454e545f414d4f554e54556e69737761705632526f757465723a204558434553534956455f494e5055545f414d4f554e54556e69737761705632526f757465723a20494e56414c49445f50415448000000556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e54556e69737761705632526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54556e69737761705632526f757465723a20455850495245440000000000000000a26469706673582212205168459737228e7afa3127ef9cc1e57ff202b6d61791c718f26f5058c7900a4e64736f6c63430006060033"
}

source

eth_getLogs

Parameters

Object - The filter options:

  • fromBlock: QUANTITY|TAG - (optional, default: "latest") Hexadecimal block number, or "latest" for the last mined block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "earliest" for not yet mined transactions.
  • toBlock: QUANTITY|TAG - (optional, default: "latest") Hexadecimal block number, or "latest" for the last mined block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "earliest" for not yet mined transactions.
  • address: DATA|Array, 20 Bytes - (optional) Contract address or a list of at most 1,000 addresses from which logs should originate.
  • topics: Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options, at most 1,000 per position.
  • blockhash: DATA, 32 Bytes - (optional) Per EIP-234, blockHash restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in the filter criteria, then neither fromBlock nor toBlock are allowed.

Returns

Array - Array of log objects, or an empty array if nothing has changed since last poll.

For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x3454645634534..."].

For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].

For filters created with eth_newFilter logs are objects with following params:

  • removed: TAG - true when the log was removed, due to a chain reorganization. false if its a valid log.
  • logIndex: QUANTITY - Hexadecimal log index position in the block. null when its pending log.
  • transactionIndex: QUANTITY - Hexadecimal of the transactions index position log was created from. null when its pending log.
  • transactionHash: DATA, 32 Bytes - Hash of the transactions this log was created from. null when its pending log.
  • blockHash: DATA, 32 Bytes - Hash of the block where this log was in. null when its pending. null when its pending log.
  • blockNumber: QUANTITY - Hexadecimal of the block number where this log was in. null when its pending. null when its pending log.
  • address: DATA, 20 Bytes - Address from which this log originated.
  • data: DATA - Contains zero or more 32 Bytes non-indexed arguments of the log.
  • topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.)

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{
          "fromBlock": "0x608EED",
          "toBlock": "0x608EEE",
          "topics": [
            "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          ]
        }],"id":74}'

Result

{
  "jsonrpc": "2.0",
  "id": 74,
  "result": [
    {
      "address": "0xa2c07c15173c183771ffad40c2e972f97e0bce64",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da6086",
        "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463"
      ],
      "data": "0x00000000000000000000000000000000000000000000000001a6fd80655b3000",
      "blockHash": "0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7",
      "blockNumber": "0x608eed",
      "transactionHash": "0x7e7e6d8a61ff36ab337b42b6ed2edf34761f928a110aba857aae97121d35371b",
      "transactionIndex": "0x0",
      "logIndex": "0x0",
      "removed": false
    },
    {
      "address": "0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463",
        "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3"
      ],
      "data": "0x0000000000000000000000000000000000000000000000027215848ae3242d0b",
      "blockHash": "0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7",
      "blockNumber": "0x608eed",
      "transactionHash": "0x7e7e6d8a61ff36ab337b42b6ed2edf34761f928a110aba857aae97121d35371b",
      "transactionIndex": "0x0",
      "logIndex": "0x1",
      "removed": false
    },
    {
      "address": "0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ],
      "data": "0x0000000000000000000000000000000000000000000000027215848ae3242d0b",
      "blockHash": "0x5fb9fff1f0f914360abfefb0eac9c7d4fc733007c62c7caf1860d4052776b7d7",
      "blockNumber": "0x608eed",
      "transactionHash": "0x7e7e6d8a61ff36ab337b42b6ed2edf34761f928a110aba857aae97121d35371b",
      "transactionIndex": "0x0",
      "logIndex": "0x4",
      "removed": false
    }
  ]
}

source

eth_getProof

Parameters

address: DATA, 20 Bytes - address to check for balance.

storageKeys: Arrayof DATA - array of 32 bytes storage keys to be proofed and included.

blockParameter: QUANTITY|TAG - hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized. See the default block parameter.

Returns

  • balance: QUANTITY-Hexadecimal of the current balance in wei.
  • codeHash: DATA, 32 Bytes - Hash of the code of the account.
  • nonce: QUANTITY - The nonce of the account.
  • storageHash: DATA, 32 bytes - The SHA3 of the StorageRoot. All storage will deliver a Merkle proof starting with this rootHash.
  • accountProof: ArrayofDATA - Array of RLP-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.
  • storageProof: ArrayofDATA - Array of storage-entries as requested. Each entry is an object with these properties:
    • key: DATA- The requested storage key.
    • value: QUANTITY- The storage value.
    • proof: Arrayof DATA - Array of RLP-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getProof","params":[
        "0x4392743B97C46c6Aa186A7f3D0468fbF177ee70F",
        ["0x86386409a65c1a7f963bc51852fa7ecbdb9cad2cec464de22ee4591e1622b46b"],
        "latest"]
        ,"id":1}'

Result

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32603,
    "message": "internal blocking task error"
  },
  "id": 1
}

source

eth_getStorageAt

Parameters

DATA, 20 Bytes - Address of the storage.

QUANTITY - Hexadecimal of the position in the storage.

QUANTITY|TAG - Hexadecimal block number, or the string "latest", "earliest", "safe", "finalized", see the default block parameter

Returns

DATA - The value at this storage position.

Example

In this case we consider the deployed eAUD token at address 0x4392743B97C46c6Aa186A7f3D0468fbF177ee70F . From the token’s documentation, we see the 'DECIMALS_SLOT' is at address 0x86386409a65c1a7f963bc51852fa7ecbdb9cad2cec464de22ee4591e1622b46b. Getting the storage at this address should give us the decimal value of the token.

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": [
        "0x4392743B97C46c6Aa186A7f3D0468fbF177ee70F",
        "0x86386409a65c1a7f963bc51852fa7ecbdb9cad2cec464de22ee4591e1622b46b",
        "latest"], "id": 1}'

Result

{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000006", //6
  "id": 1
}

source

eth_getTransactionByBlockHashAndIndex

Parameters

DATA, 32 Bytes - Hash of a block.

QUANTITY - Hexadecimal of the transaction index position.

Returns

Object - A transaction object, or null when no transaction was found:

  • blockHash: DATA, 32 Bytes - Hash of the block where this transaction was in. null when its pending.
  • blockNumber: QUANTITY - Hexadecimal block number where this transaction was in. null when its pending.
  • from: DATA, 20 Bytes - Address of the sender.
  • gas: QUANTITY - Hexadecimal gas provided by the sender.
  • gasPrice: QUANTITY - Hexadecimal gas price provided by the sender in Wei.
  • hash: DATA, 32 Bytes - Hash of the transaction.
  • input: DATA - The data send along with the transaction.
  • nonce: QUANTITY - The number of transactions made by the sender prior to this one.
  • to: DATA, 20 Bytes - Address of the receiver. null when its a contract creation transaction.
  • transactionIndex: QUANTITY - Hexadecimal of the transactions index position in the block. null when its pending.
  • value: QUANTITY - Value transferred in Wei.
  • v: QUANTITY - ECDSA recovery id
  • r: QUANTITY - ECDSA signature r
  • s: QUANTITY - ECDSA signature s

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":[
        "0x3874ed915e305246b75c0d388827f2d23df451ac901c07618154bcf03e5ac519",
        "0x0"]
        ,"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "0xadbfc093b90e69b6fdf3a843f03ef65c5c247e0593d3853b53d37c825e81339a",
    "nonce": "0x2bd",
    "blockHash": "0x3874ed915e305246b75c0d388827f2d23df451ac901c07618154bcf03e5ac519",
    "blockNumber": "0x608225",
    "transactionIndex": "0x0",
    "from": "0x3da87b1c3743bd2da60df2ef1bc6f26ef9da6086",
    "to": "0x5eb15fedcca9cb9c5424167e329fd56905ffe0e3",
    "value": "0x8203404a3db680000",
    "gasPrice": "0xb2d05e07",
    "gas": "0x29810",
    "input": "0x7ff36ab5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da608600000000000000000000000000000000000000000000000000000000667b16b7000000000000000000000000000000000000000000000000000000000000000200000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5000000000000000000000000a2c07c15173c183771ffad40c2e972f97e0bce64",
    "r": "0xd527419716bc6eb25e74420a7a28e6f3793ead979c8ca6ed8b1b27245470c83d",
    "s": "0x6bef1d101db08d829080d43b823a4896e5971f5794aaef508ea2cffea52ef9c1",
    "v": "0xfe5",
    "chainId": "0x7e1",
    "type": "0x0"
  },
  "id": 1
}

source

eth_getTransactionByBlockNumberAndIndex

Parameters

QUANTITY|TAG - Hexadecimal block number, or the string "earliest", "latest", "safe" or "finalized", as in the default block parameter.

QUANTITY - Hexadecimal of the transaction index position.

Returns

Object - A transaction object, or null when no transaction was found:

  • blockHash: DATA, 32 Bytes - Hash of the block where this transaction was in. null when its pending.
  • blockNumber: QUANTITY - Hexadecimal Block number where this transaction was in. null when its pending.
  • from: DATA, 20 Bytes - Address of the sender.
  • gas: QUANTITY - Hexadecimal gas provided by the sender.
  • gasPrice: QUANTITY - Hexadecimal gas price provided by the sender in Wei.
  • hash: DATA, 32 Bytes - Hash of the transaction.
  • input: DATA - The data send along with the transaction.
  • nonce: QUANTITY - Hexadecimal number of transactions made by the sender prior to this one.
  • to: DATA, 20 Bytes - Address of the receiver. null when its a contract creation transaction.
  • transactionIndex: QUANTITY - Hexadecimal of the transaction’s index position in the block. null when its pending.
  • value: QUANTITY - Hexadecimal value transferred in Wei.
  • v: QUANTITY - ECDSA recovery id
  • r: QUANTITY - ECDSA signature r
  • s: QUANTITY - ECDSA signature s

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":[
        "0x6038C1",
        "0x0"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
    "nonce": "0x2ba",
    "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
    "blockNumber": "0x6038c1",
    "transactionIndex": "0x0",
    "from": "0x3da87b1c3743bd2da60df2ef1bc6f26ef9da6086",
    "to": "0x5eb15fedcca9cb9c5424167e329fd56905ffe0e3",
    "value": "0x121782564b00000",
    "gasPrice": "0xb2d05e07",
    "gas": "0x29810",
    "input": "0x7ff36ab5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da608600000000000000000000000000000000000000000000000000000000667ab007000000000000000000000000000000000000000000000000000000000000000200000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5000000000000000000000000a2c07c15173c183771ffad40c2e972f97e0bce64",
    "r": "0xfe383e41c568fdfd569c910598b51654e0869cb9a01fe6867c6281aa2ef070b1",
    "s": "0xac20158ff00add9d35d448249b48a35b5bb04a87fb39dccc05bf653ef0aa7",
    "v": "0xfe5",
    "chainId": "0x7e1",
    "type": "0x0"
  },
  "id": 1
}

source

eth_getTransactionByHash

Parameters

DATA, 32 Bytes - Hash of a transaction

Returns

Object - A transaction object, or null when no transaction was found:

  • blockHash: DATA, 32 Bytes - Hash of the block where this transaction was in. null when its pending.
  • blockNumber: QUANTITY - Hexadecimal block number where this transaction was in. null when its pending.
  • from: DATA, 20 Bytes - Address of the sender.
  • gas: QUANTITY - Hexadecimal of the gas provided by the sender.
  • gasPrice: QUANTITY - Hexadecimal of the gas price provided by the sender in Wei.
  • hash: DATA, 32 Bytes - hash of the transaction.
  • input: DATA - the data send along with the transaction.
  • nonce: QUANTITY - Hexadecimal number of transactions made by the sender prior to this one.
  • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
  • transactionIndex: QUANTITY - Hexadecimal of the transaction’s index position in the block. null when its pending.
  • value: QUANTITY - Hexadecimal value transferred in Wei.
  • v: QUANTITY - ECDSA recovery id
  • r: QUANTITY - ECDSA signature r
  • s: QUANTITY - ECDSA signature s

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": {
    "hash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
    "nonce": "0x2ba",
    "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
    "blockNumber": "0x6038c1",
    "transactionIndex": "0x0",
    "from": "0x3da87b1c3743bd2da60df2ef1bc6f26ef9da6086",
    "to": "0x5eb15fedcca9cb9c5424167e329fd56905ffe0e3",
    "value": "0x121782564b00000",
    "gasPrice": "0xb2d05e07",
    "gas": "0x29810",
    "input": "0x7ff36ab5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da608600000000000000000000000000000000000000000000000000000000667ab007000000000000000000000000000000000000000000000000000000000000000200000000000000000000000080d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5000000000000000000000000a2c07c15173c183771ffad40c2e972f97e0bce64",
    "r": "0xfe383e41c568fdfd569c910598b51654e0869cb9a01fe6867c6281aa2ef070b1",
    "s": "0xac20158ff00add9d35d448249b48a35b5bb04a87fb39dccc05bf653ef0aa7",
    "v": "0xfe5",
    "chainId": "0x7e1",
    "type": "0x0"
  },
  "id": 1
}

source

eth_getTransactionCount

Parameters

DATA, 20 Bytes - Address.

QUANTITY|TAG -Hexadecimal block number, or the string "latest", "earliest", "safe" or "finalized", see the default block parameter

Returns

QUANTITY - Hexadecimal of the number of transactions send from this address.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":[
        "0x3da87b1c3743bd2da60df2ef1bc6f26ef9da6086",
        "latest"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": "0x2c3", //707
  "id": 1
}

source

eth_getTransactionReceipt

Parameters

DATA, 32 Bytes - Hash of a transaction

Returns

Object - A transaction receipt object, or null when no receipt was found:

  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionIndex: QUANTITY - Hexadecimal of the transactions index position in the block.
  • blockHash: DATA, 32 Bytes - Hash of the block where this transaction was in.
  • blockNumber: QUANTITY - Hexadecimal block number where this transaction was in.
  • from: DATA, 20 Bytes - Address of the sender.
  • to: DATA, 20 Bytes - Address of the receiver. null when its a contract creation transaction.
  • cumulativeGasUsed : QUANTITY - Hexadecimal of the total amount of gas used when this transaction was executed in the block.
  • effectiveGasPrice : QUANTITY - Hexadecimal of the sum of the base fee and tip paid per unit of gas.
  • gasUsed : QUANTITY - Hexadecimal of the amount of gas used by this specific transaction alone.
  • contractAddress : DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
  • logs: Array - Array of log objects, which this transaction generated.
  • logsBloom: DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.
  • type: QUANTITY - Hexadecimal of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees.

It also returns either :

  • root : DATA 32 bytes of post-transaction stateroot (pre Byzantium)
  • status: QUANTITY either 0x1(success) or 0x0 (failure)

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
    "transactionIndex": "0x0",
    "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
    "blockNumber": "0x6038c1",
    "cumulativeGasUsed": "0x1a771",
    "gasUsed": "0x1a771",
    "effectiveGasPrice": "0xb2d05e07",
    "from": "0x3da87b1c3743bd2da60df2ef1bc6f26ef9da6086",
    "to": "0x5eb15fedcca9cb9c5424167e329fd56905ffe0e3",
    "contractAddress": null,
    "logs": [
      {
        "address": "0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x0000000000000000000000000000000000000000000000000000000000000000",
          "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000121782564b00000",
        "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
        "blockNumber": "0x6038c1",
        "transactionHash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
        "transactionIndex": "0x0",
        "logIndex": "0x0",
        "removed": false
      },
      {
        "address": "0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3",
          "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000121782564b00000",
        "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
        "blockNumber": "0x6038c1",
        "transactionHash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
        "transactionIndex": "0x0",
        "logIndex": "0x1",
        "removed": false
      },
      {
        "address": "0xa2c07c15173c183771ffad40c2e972f97e0bce64",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463",
          "0x0000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da6086"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000bf80c3c72242",
        "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
        "blockNumber": "0x6038c1",
        "transactionHash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
        "transactionIndex": "0x0",
        "logIndex": "0x2",
        "removed": false
      },
      {
        "address": "0xe2005c7718f3849f39c65b8ea93c7a7030aec463",
        "topics": [
          "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1"
        ],
        "data": "0x0000000000000000000000000000000000000000000000d4b594d815912d0b3e0000000000000000000000000000000000000000000000008d2445e5c1532614",
        "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
        "blockNumber": "0x6038c1",
        "transactionHash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
        "transactionIndex": "0x0",
        "logIndex": "0x3",
        "removed": false
      },
      {
        "address": "0xe2005c7718f3849f39c65b8ea93c7a7030aec463",
        "topics": [
          "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822",
          "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3",
          "0x0000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da6086"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000121782564b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bf80c3c72242",
        "blockHash": "0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb",
        "blockNumber": "0x6038c1",
        "transactionHash": "0xbd3a14fcf09f3f9e5ca951f2bfedbc7237fe1cd0d68673231f1333eed801830d",
        "transactionIndex": "0x0",
        "logIndex": "0x4",
        "removed": false
      }
    ],
    "logsBloom": "0x00200000040000000000000280000028000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000008000000200000000000000000000000000000000400000000020000000010000002000800000000000000000000000010000000400000000000000000000000000000000000000000000000080000004000000000000100000000000000000000000040200100000000000000000020000000000000000002000000000000200000000000000000000000001000000000000020000080000000020000000000000000000000000000000000000001000000000000",
    "status": "0x1",
    "type": "0x0"
  },
  "id": 1
}

source

eth_getUncleByBlockHashAndIndex

Telcoin Network’s consensus produces no uncle blocks, so this method always returns null. It is served for Ethereum API compatibility.

Parameters

DATA, 32 Bytes - Hash of a block.

QUANTITY - Hexadecimal of the uncle’s index position.

Returns

Object - A block object, or null when no block was found:

  • number: QUANTITY - Hexadecimal of the block number. null when its pending block.
  • hash: DATA, 32 Bytes - Hash of the block. null when its pending block.
  • parentHash: DATA, 32 Bytes - Hash of the parent block.
  • nonce: DATA, 8 Bytes - Hash of the generated proof-of-work. null when its pending block.
  • sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: DATA, 256 Bytes - The bloom filter for the logs of the block. null when its pending block.
  • transactionsRoot: DATA, 32 Bytes - The root of the transaction trie of the block.
  • stateRoot: DATA, 32 Bytes - The root of the final state trie of the block.
  • receiptsRoot: DATA, 32 Bytes - The root of the receipts trie of the block.
  • miner: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given.
  • difficulty: QUANTITY - Hexadecimal of the difficulty for this block.
  • totalDifficulty: QUANTITY - Hexadecimal of the total difficulty of the chain until this block.
  • extraData: DATA - The “extra data” field of this block.
  • size: QUANTITY - Hexadecimal size of this block in bytes.
  • gasLimit: QUANTITY - Hexadecimal of the maximum gas allowed in this block.
  • gasUsed: QUANTITY - Hexadecimal of the total used gas by all transactions in this block.
  • timestamp: QUANTITY - Hexadecimal of the unix timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: Array - Array of uncle hashes.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb", "0x0"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": null
}

source

eth_getUncleByBlockNumberAndIndex

Telcoin Network’s consensus produces no uncle blocks, so this method always returns null. It is served for Ethereum API compatibility.

Parameters

QUANTITY|TAG - Hexadecimal of a block number, or the string "earliest", "latest", "pending", "safe", "finalized", as in the default block parameter.

QUANTITY - Hexadecimal of the uncle’s index position.

Returns

Object - A block object, or null when no block was found:

  • number: QUANTITY - Hexadecimal of the block number. null when its pending block.
  • hash: DATA, 32 Bytes - Hash of the block. null when its pending block.
  • parentHash: DATA, 32 Bytes - Hash of the parent block.
  • nonce: DATA, 8 Bytes - Hash of the generated proof-of-work. null when its pending block.
  • sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: DATA, 256 Bytes - The bloom filter for the logs of the block. null when its pending block.
  • transactionsRoot: DATA, 32 Bytes - The root of the transaction trie of the block.
  • stateRoot: DATA, 32 Bytes - The root of the final state trie of the block.
  • receiptsRoot: DATA, 32 Bytes - The root of the receipts trie of the block.
  • miner: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given.
  • difficulty: QUANTITY - Hexadecimal of the difficulty for this block.
  • totalDifficulty: QUANTITY - Hexadecimal of the total difficulty of the chain until this block.
  • extraData: DATA - The “extra data” field of this block.
  • size: QUANTITY - Hexadecimal of the size of this block in bytes.
  • gasLimit: QUANTITY - Hexadecimal of the maximum gas allowed in this block.
  • gasUsed: QUANTITY - Hexadecimal of the total used gas by all transactions in this block.
  • timestamp: QUANTITY - Hexadecimal of the unix timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: Array - Array of uncle hashes.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": null
}

source

eth_getUncleCountByBlockHash

Telcoin Network’s consensus produces no uncle blocks, so this method returns 0x0 for every existing block (null when the block is not found). It is served for Ethereum API compatibility.

Parameters

DATA, 32 Bytes - Hash of a block

Returns

QUANTITY - Hexadecimal of the number of uncles in this block.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0x908539f74911930cb0e7201a43dbcce8743a58f1d49e2bc271159fab3c6cb8fb"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x0"
}

source

eth_getUncleCountByBlockNumber

Telcoin Network’s consensus produces no uncle blocks, so this method returns 0x0 for every existing block (null when the block is not found). It is served for Ethereum API compatibility.

Parameters

QUANTITY|TAG - Hexadecimal of a block number, or the string "latest", "earliest", "safe" or "finalized", see the default block parameter

Returns

QUANTITY - Hexadecimal of the number of uncles in this block.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0x6038C1"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x0"
}

source

eth_maxPriorityFeePerGas

Parameters

None

Returns

QUANTITY - Hexadecimal of the priority fee, in wei, needed to be included in a block.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}

source

eth_protocolVersion

Parameters

None

Returns

QUANTITY - Hexadecimal of the current Telcoin Network protocol version. Telcoin Network nodes currently report protocol version 1.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":67}'

Result

{
  "id":67,
  "jsonrpc": "2.0",
  "result": "0x1"
}

source

eth_sendRawTransaction

Submits a pre-signed transaction to the network. This is the only way to send a transaction through a Telcoin Network node: nodes hold no user keys, so transactions must be signed client-side and submitted as raw bytes.

A node that is not part of the current committee accepts the transaction into its local pool and then forwards it to a committee validator’s advertised RPC endpoint on your behalf. Forwarding is best-effort and routes by sender address, so all of one account’s transactions converge on the same validator and nonce ordering is preserved. Submitting to any Telcoin Network node therefore works the same way.

An operator can also run a public RPC node that relays this method to a fixed validator and returns that validator’s answer exactly as given: the transaction hash, or the validator’s error object with its code, message and data unchanged. Such a node does not report the transaction through eth_getTransactionByHash or the pending nonce from eth_getTransactionCount until it is mined. See Public RPC nodes for how these nodes forward and which errors they return.

Telcoin Network nodes additionally guard this method with a transaction fee cap (--rpc.txfeecap, in TEL; 0 disables the cap and is the default). When an operator sets a cap, the transaction’s maximum possible fee - maxFeePerGas * gasLimit, plus the blob fee bound for EIP-4844 transactions - must not exceed it. An over-cap transaction is rejected before it reaches the pool with a JSON-RPC error (code -32000) of the form:

tx fee (7000000 wei) exceeds the configured cap (200000 wei)

Parameters

DATA, The signed transaction data.

Returns

DATA, 32 Bytes - The transaction hash.

Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d15273311"
}

source

eth_sendTransaction

Warning

Not usable on Telcoin Network

The eth_sendTransaction JSON-RPC method asks the node to sign the transaction with the from account’s key. Telcoin Network nodes do not store user private keys and configure no RPC signing accounts, so every call to this method fails with the unknown account error shown below.

Sign transactions client-side and submit them with eth_sendRawTransaction instead.

Parameters

Object - The transaction object

  • from: DATA, 20 Bytes - The address the transaction is sent from.
  • to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.
  • gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
  • gasPrice: QUANTITY - (optional, default: To-Be-Determined) Hexadecimal of the gasPrice used for each paid gas.
  • value: QUANTITY - (optional) Hexadecimal of the value sent with this transaction.
  • input: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
  • nonce: QUANTITY - (optional) Hexadecimal nonce value. This allows to overwrite your own pending transactions that use the same nonce.

Returns

On Telcoin Network this method never returns a transaction hash. Because the node has no signer for any from address, every call returns a JSON-RPC error (code -32602) with the message unknown account.

Use eth_sendRawTransaction to submit a transaction signed client-side, and eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "input": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  }],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "unknown account"
  }
}

source

eth_sign

Warning

Not usable on Telcoin Network

The eth_sign JSON-RPC method asks the node to sign a message with the given account’s key. Telcoin Network nodes do not store user private keys and configure no RPC signing accounts, so every call to this method fails with the unknown account error shown below.

Sign messages client-side with your own wallet or key management instead.

Parameters

DATA, 20 Bytes - Address

DATA, N Bytes - Message to sign

Returns

On Telcoin Network this method never returns a signature. Because the node has no signer for any address, every call returns a JSON-RPC error (code -32602) with the message unknown account.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_sign","params":["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83", "0xdeadbeaf"],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "unknown account"
  }
}

source

eth_syncing

Parameters

None

Returns

Object|Boolean - A sync-status object while the node is syncing, false otherwise.

The node reports syncing from startup until its first epoch sets its mode, and while it is a committee validator catching up on consensus output before it takes part again. A caught-up validator and an observer report false. The sync-status object has these fields:

  • startingBlock: QUANTITY - The node’s latest block when its RPC server started.
  • currentBlock: QUANTITY - The node’s latest executed block.
  • highestBlock: QUANTITY - The same as currentBlock: the node does not report the network’s tip.
  • stages: Array - reth’s stage checkpoints, each a name and a block.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": false
}

source

Filter Methods

Telcoin Network supports the following filter methods over HTTP. Filters are held in the memory of the node that created them, so subsequent polls must go to the same node.

Filters that are not polled using eth_getFilterChanges will be automatically expired after five minutes of inactivity.

Each worker’s RPC endpoint keeps at most --rpc.max-active-filters filters (1,000 by default) across all its clients, first come, first served: one client can install them all. Once that many are installed, creating another fails with a server-busy error (-32009) until a filter is uninstalled or expires. Each worker’s transaction pool also bounds the listeners that pending-transaction filters and newPendingTransactions subscriptions register (1,024 of each kind, the node’s own listeners included, also first come, first served), with the same error. One WebSocket or IPC connection holds at most --rpc.max-subscriptions-per-connection subscriptions (128 by default), so it cannot take every listener; filters belong to no connection and are bounded only by --rpc.max-active-filters.

A log filter may name at most 1,000 addresses and at most 1,000 values in each topic position, the limit geth applies by default. eth_newFilter, eth_getLogs and logs subscriptions refuse a larger filter with an invalid-params error (-32602).

eth_getFilterChanges

Polling method for a filter, which returns an array of logs which occurred since last poll. Filter must be created by calling either eth_newFilter or eth_newBlockFilter.

Parameters

QUANTITY - the filter id.

Returns

Array of DATA - Array of log objects, or an empty array if nothing has changed since last poll.

For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x3454645634534..."].

For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].

For filters created with eth_newFilter logs are objects with following params:

  • removed: TAG - true when the log was removed, due to a chain reorganization. false if its a valid log.
  • logIndex: QUANTITY - Hexadecimal of the log index position in the block. null when its pending log.
  • transactionIndex: QUANTITY - Hexadecimal of the transaction’s index position log was created from. null when its pending log.
  • transactionHash: DATA, 32 Bytes - Hash of the transactions this log was created from. null when its pending log.
  • blockHash: DATA, 32 Bytes - Hash of the block where this log was in. null when its pending. null when its pending log.
  • blockNumber: QUANTITY - Hexadecimal of the block number this log was in. null when its pending. null when its pending log.
  • address: DATA, 20 Bytes - Address from which this log originated.
  • data: DATA - Contains zero or more 32 Bytes non-indexed arguments of the log.
  • topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.)

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x26c221936b2025a44f60294273d7bbaa"],"id":73}'

Result

{
"jsonrpc":"2.0",
"result":[
    {"address":"0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
    "topics":[
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000000000000000000000000000000000000000000000",
        "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3"],
    "data":"0x000000000000000000000000000000000000000000000002f1cd8944b8700000",
    "blockHash":"0x59380d589f6d0f833518978956b81aa5248a497a73fb8ea1bf8a08b6abc6656b",
    "blockNumber":"0x60387d",
    "transactionHash":"0x0c52053dbf5ad86686ac00cc3858726967c33ab5eddaa889d306663f8610d659",
    "transactionIndex":"0x0",
    "logIndex":"0x0",
    "removed":false},
    {"address":
    "0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
    "topics":[
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3",
        "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463"],
    "data":"0x000000000000000000000000000000000000000000000002f1cd8944b8700000",
    "blockHash":"0x59380d589f6d0f833518978956b81aa5248a497a73fb8ea1bf8a08b6abc6656b",
    "blockNumber":"0x60387d",
    "transactionHash":"0x0c52053dbf5ad86686ac00cc3858726967c33ab5eddaa889d306663f8610d659",
    "transactionIndex":"0x0",
    "logIndex":"0x1",
    "removed":false},
    {"address":"0xa2c07c15173c183771ffad40c2e972f97e0bce64",
    "topics":[
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463",
        "0x0000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da6086"],
    "data":"0x00000000000000000000000000000000000000000000000001f9b3795d77f3a5",
    "blockHash":"0x59380d589f6d0f833518978956b81aa5248a497a73fb8ea1bf8a08b6abc6656b",
    "blockNumber":"0x60387d",
    "transactionHash":"0x0c52053dbf5ad86686ac00cc3858726967c33ab5eddaa889d306663f8610d659",
    "transactionIndex":"0x0",
    "logIndex":"0x2",
    "removed":false}],
    "id":73
    }

source

eth_getFilterLogs

Parameters

QUANTITY - The filter id.

Returns

ArrayofDATA - Array of log objects, or an empty array if nothing has changed since last poll.

For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x3454645634534..."].

For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].

For filters created with eth_newFilter logs are objects with following params:

  • removed: TAG - true when the log was removed, due to a chain reorganization. false if its a valid log.
  • logIndex: QUANTITY - Hexadecimal of the log index position in the block. null when its pending log.
  • transactionIndex: QUANTITY - Hexadecimal of the transactions index position log was created from. null when its pending log.
  • transactionHash: DATA, 32 Bytes - Hash of the transactions this log was created from. null when its pending log.
  • blockHash: DATA, 32 Bytes - Hash of the block where this log was in. null when its pending. null when its pending log.
  • blockNumber: QUANTITY - Hexadecimal of the block number where this log was in. null when its pending. null when its pending log.
  • address: DATA, 20 Bytes - Address from which this log originated.
  • data: DATA - Contains zero or more 32 Bytes non-indexed arguments of the log.
  • topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.)

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x26c221936b2025a44f60294273d7bbaa"],"id":1}'

Result

{
"jsonrpc":"2.0",
"result":[
    {"address":"0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
    "topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000000000000000000000000000000000000000000000",
        "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3"],
    "data":"0x000000000000000000000000000000000000000000000002f1cd8944b8700000",
    "blockHash":"0x59380d589f6d0f833518978956b81aa5248a497a73fb8ea1bf8a08b6abc6656b",
    "blockNumber":"0x60387d",
    "transactionHash":"0x0c52053dbf5ad86686ac00cc3858726967c33ab5eddaa889d306663f8610d659",
    "transactionIndex":"0x0",
    "logIndex":"0x0",
    "removed":false},
    {"address":"0x80d1f6dafc9c13e9d19aedf75e3c1e2586d4a2a5",
    "topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000005eb15fedcca9cb9c5424167e329fd56905ffe0e3",
        "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463"],
    "data":"0x000000000000000000000000000000000000000000000002f1cd8944b8700000",
    "blockHash":"0x59380d589f6d0f833518978956b81aa5248a497a73fb8ea1bf8a08b6abc6656b",
    "blockNumber":"0x60387d",
    "transactionHash":"0x0c52053dbf5ad86686ac00cc3858726967c33ab5eddaa889d306663f8610d659",
    "transactionIndex":"0x0",
    "logIndex":"0x1",
    "removed":false},
    {"address":"0xa2c07c15173c183771ffad40c2e972f97e0bce64",
    "topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x000000000000000000000000e2005c7718f3849f39c65b8ea93c7a7030aec463",
        "0x0000000000000000000000003da87b1c3743bd2da60df2ef1bc6f26ef9da6086"],
    "data":"0x00000000000000000000000000000000000000000000000001f9b3795d77f3a5",
    "blockHash":"0x59380d589f6d0f833518978956b81aa5248a497a73fb8ea1bf8a08b6abc6656b",
    "blockNumber":"0x60387d",
    "transactionHash":"0x0c52053dbf5ad86686ac00cc3858726967c33ab5eddaa889d306663f8610d659",
    "transactionIndex":"0x0",
    "logIndex":"0x2",
    "removed":false}],
    "id":1
    }

source

eth_newBlockFilter

Parameters

None

Returns

DATA - A filter id.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":73}'

Result

{
  "jsonrpc": "2.0",
  "result": "0x6f3ccb09d7153d2bba6b59f8f0ede3b1",
  "id": 73
}

source

eth_newFilter

Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges.

A note on specifying topic filters: Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:

  • [] “anything”
  • [A] “A in first position (and anything after)”
  • [null, B] “anything in first position AND B in second position (and anything after)”
  • [A, B] “A in first position AND B in second position (and anything after)”
  • [[A, B], [A, B]] “(A OR B) in first position AND (A OR B) in second position (and anything after)”

Parameters

Object - The filter options:

  • fromBlock: QUANTITY|TAG - (optional, default: "latest") Hexadecimal of a block number, or "latest" for the last mined block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "earliest" for not yet mined transactions.
  • toBlock: QUANTITY|TAG - (optional, default: "latest") Hexadecimal of a block number, or "latest" for the last mined block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "earliest" for not yet mined transactions.
  • address: DATA|Array, 20 Bytes - (optional) Contract address or a list of at most 1,000 addresses from which logs should originate.
  • topics: Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options, at most 1,000 per position.

Returns

DATA - A filter id.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{
      "jsonrpc": "2.0","method": "eth_newFilter","params": [
        {
          "fromBlock": "0x60387D",
          "toBlock": "0x60387E",
          "topics": [
            "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          ]
        }
      ],
      "id": 1
    }'

Result

{
  "jsonrpc": "2.0",
  "result": "0x26c221936b2025a44f60294273d7bbaa",
  "id": 1
}

source

eth_newPendingTransactionFilter

Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call eth_getFilterChanges.

Parameters

None

Returns

DATA - A filter id.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "result": "0x38d257a1aab91606194ba7211d4ce26",
  "id": 1
}

source

eth_uninstallFilter

Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren’t requested with eth_getFilterChanges for a period of time.

Parameters

DATA - The filter id.

Returns

Boolean - true if the filter was successfully uninstalled, otherwise false.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x26c221936b2025a44f60294273d7bbaa"],"id":73}'

Result

{
  "jsonrpc": "2.0",
  "result": true,
  "id": 73
}

source

net

The net namespace reports basic facts about the node’s network: the chain id, whether the node is listening, and how many peers it is connected to. It is on by default and costs little to serve, since every answer comes from memory. Every node role can serve it, including a validator’s minimal eth,net,web3 selection; see Enabling Namespaces for the flags.

Telcoin Network does not run devp2p, so two methods differ from Ethereum clients: net_peerCount counts the peers connected to the node’s worker network, and net_listening always returns true.

Example values are illustrative; field names and types match what the node returns.

MethodDescription
net_listeningAlways true
net_peerCountNumber of peers connected to the node’s worker network, refreshed every 15 seconds
net_versionChain id as a decimal string

net_listening

On Telcoin Network this method always returns true, whether or not the node has any peers. Use net_peerCount to see how many peers the node is connected to.

Parameters

None

Returns

Boolean - true when listening, otherwise false.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67}'

Result

{
    "id":67,
    "jsonrpc":"2.0",
    "result":true
}

source

net_peerCount

On Telcoin Network this is the number of peers connected to the node’s worker network, not devp2p peers: Telcoin Network does not run devp2p. The node refreshes the count every 15 seconds, so a new or dropped connection can take up to 15 seconds to show, and the count reads 0x0 while the node is starting up, until the worker network is running.

Parameters

None

Returns

QUANTITY - integer of the number of connected peers.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'

Result

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x3" //3
}

source

net_version

On Telcoin Network this is the chain id as a decimal string: "2017" on adiri. It is the same number eth_chainId returns in hex (0x7e1).

Parameters

None

Returns

String - The chain id in decimal.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "2017"
}

source

web3

The web3 namespace has two methods: one returns the node’s version string, the other hashes data with Keccak-256. It is on by default and costs little to serve. Every node role can serve it, including a validator’s minimal eth,net,web3 selection; see Enabling Namespaces for the flags.

On Telcoin Network web3_clientVersion returns the Telcoin Network release and commit the node was built from, not a geth or reth client string.

Example values are illustrative; field names and types match what the node returns.

MethodDescription
web3_clientVersionThe node’s Telcoin Network version and commit sha
web3_sha3Keccak-256 hash of the given data

web3_clientVersion

On Telcoin Network this returns the node’s Telcoin Network version string, <crate version> (<git commit sha>), not a geth or reth client string. A node built from the repository’s Docker image, as adiri is, reports the full 40-character commit sha, as in the example below; a binary built with cargo from a git checkout reports the short sha.

Parameters

None

Returns

String - The node’s version string.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0.1.0 (5736cc30012c5ff25913898e318a74df308f13d9)"
}

source

web3_sha3

Parameters

DATA - The data to hash.

Returns

DATA, 32 Bytes - The Keccak-256 hash of the data. This is the hash the EVM’s KECCAK256 opcode computes, not the standardized SHA3-256.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad" // keccak256("hello world")
}

source

rpc

The rpc namespace has one method, rpc_modules, which lists the namespaces the node serves. It is on by default and costs almost nothing to serve, since the node builds the answer once when the RPC server starts. Public RPC nodes and archive nodes should keep it so clients and operators can check what a node serves; a validator’s minimal eth,net,web3 selection leaves it out. See Enabling Namespaces for the flags.

Example values are illustrative; field names and types match what the node returns.

MethodDescription
rpc_modulesThe namespaces the node serves, each with the version "1.0"

rpc_modules

Lists the namespaces the node serves. Each value is the fixed string "1.0"; it does not track any namespace’s version.

This method answers only on a transport whose selection includes rpc. The default set (eth, net, web3, rpc, tn) includes it, so a node started without --http.api or --ws.api, or with all, serves it. An explicit list that leaves rpc out, such as eth,net,web3, does not, and the method then returns the -32601 “Method not found” error. See Enabling Namespaces.

The node builds the rpc_modules answer once, for the first transport whose selection includes rpc, in the order HTTP, WS, IPC, and every transport then returns that list. When HTTP and WS both serve rpc with different selections, the answer on WS and IPC is HTTP’s list. Tracked in #1588.

Parameters

None

Returns

Object - One entry per namespace: the key is the namespace name and the value is the string "1.0".

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "eth": "1.0",
    "net": "1.0",
    "rpc": "1.0",
    "tn": "1.0",
    "web3": "1.0"
  }
}

source

tn

The tn namespace serves Telcoin Network data that has no eth equivalent: the node’s identity, consensus participation mode and peer admission view, consensus headers and signed epoch records, the millisecond commit time of execution blocks, and validator, committee and staking state from the ConsensusRegistry system contract at 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1. Registry methods read the contract at the node’s canonical tip and take no block parameter.

tn is on by default: a node serves it unless --http.api or --ws.api names a list without it. The cost to serve it is low to moderate. Most methods answer from memory or the node’s database; registry methods run a read-only contract call against the latest state. The blocking work behind these methods is capped at 64 concurrent requests per RPC server, and requests beyond that queue rather than fail. Public RPC nodes (observers) should serve it; see Enabling Namespaces.

Warning

Keep tn off validators

Validators should not expose the tn namespace publicly. A tn_getBlockTimestampMillis request for a block from a sealed epoch can open that epoch’s consensus pack, and the node opens packs into a small cache it shares with state sync and peer epoch serving. The lookup runs under a tight concurrency bound, but public callers can still churn that cache.

Omit tn from the validator’s --http.api and --ws.api and serve the namespace from non-validating nodes instead; see Enabling Namespaces.

The warning is about public exposure. A validator may serve tn on a loopback-only listener (--http.addr 127.0.0.1, the default) for its own host tooling, such as the firewall feed from tn_admissionSnapshot.

Errors use these codes: a registry call that reverts is reported as eth_call reports one, with code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data; -32001 (Not Found.) means the node does not have the requested record; -32602 is an invalid parameter; -32603 (internal error) is a failure inside the node, whose detail is only logged on the node.

Example values are illustrative; field names and types match what the node returns.

MethodDescription
Node
tn_infoThe node’s publicly available identity and connection information: name, ids, public keys and network addresses
tn_nodeModeThe node’s current consensus participation mode, read live at call time
tn_admissionSnapshotEach swarm’s connection admission status and the committee, scheduled, eligible, trusted and bootstrap keys it lists, with their addresses, for host firewall tooling
Consensus
tn_latestConsensusHeaderThe latest consensus header
tn_latestHeaderDeprecated alias for tn_latestConsensusHeader
tn_epochRecordThe epoch record and its certificate for an epoch number, from the node’s database
tn_epochRecordByHashThe epoch record and its certificate for an epoch record hash, from the node’s database
tn_getBlockTimestampMillisThe consensus commit time, in milliseconds, of an execution block
tn_genesisThe chain genesis
Epoch and registry
tn_getCurrentEpochThe current epoch number from the ConsensusRegistry
tn_getCurrentEpochInfoThe current epoch’s on-chain info from the ConsensusRegistry: committee, issuance, start block height and duration
tn_getEpochInfoOn-chain info for an epoch the ConsensusRegistry still holds in its window of recent epochs
tn_getNextCommitteeSizeThe committee size for the next epoch
Validators
tn_getValidatorsAll validators with the requested status; "Any" returns validators of every status
tn_getCommitteeValidatorsThe committee validators for an epoch
tn_getValidatorThe ValidatorInfo record for a validator address
tn_getBlsPubkeyThe BLS public key for a validator address
tn_getCommitteeBlsPubkeysThe BLS public keys for the committee of an epoch
tn_isValidatorWhether a BLS public key belongs to a known validator
tn_isDelegatedWhether a validator’s stake originates from a delegator
tn_isRetiredWhether a validator is permanently retired
Staking
tn_getRewardsThe claimable rewards accrued for a validator address
tn_getBalanceBreakdownA validator’s outstanding balance, initial stake and rewards
tn_getCurrentStakeVersionThe current stake config version
tn_undistributedIssuanceThe issuance not yet distributed to validators
tn_delegationDigestThe EIP-712 digest a validator signs to accept a delegation
tn_proofOfPossessionMessageThe BLS12-381 proof-of-possession message a validator signs

tn_admissionSnapshot

Returns the node’s admission view of each of its swarms: the swarm’s connection admission status and every BLS key it lists, with the slots the key holds, the addresses the swarm would reach it at, and whether its PeerId is in the authorized set that Closed admission enforces. Host firewall tooling reads it on a validator’s loopback RPC to keep a P2P allowlist a superset of the peers the node admits, including the validators that can be drawn into a committee before they need a connection; see Host network observability.

Listing a key grants it nothing. The scheduled and eligible keys are tracked for export only, and admitted reports whether the key’s PeerId is in the authorized set that Closed admission enforces, whatever the effective mode. Every RPC server of a node serves the same snapshot, whichever worker’s server answers. A validator that serves this method keeps tn on a loopback-only listener; the warning on the tn namespace page explains why a validator must not expose tn publicly.

Parameters

None

Returns

Object - The admission snapshot. Like tn_info, its field names are snake_case:

  • version: Number - The schema version, 1. A reader must not interpret a snapshot whose version it does not know.
  • epoch: Number or null - The primary swarm’s accepted admission epoch; null before the primary accepts a committee window, or when the primary did not answer.
  • swarms: Array - One object per swarm, the primary first and then every configured worker swarm in worker id order, including workers outside the epoch’s on-chain worker range:
    • network: String - The swarm’s metrics label: "primary", or "worker-N" for worker N.
    • worker_id: Number or null - The worker id, or null for the primary.
    • available: Boolean - Whether the swarm answered. A swarm that errors or does not answer within 2 seconds is listed with available: false, a null tracked_epoch, a null admission and no entries; that empty list is not an empty tracked set.
    • tracked_epoch: Number or null - The epoch of the latest scheduled and eligible key publication the swarm accepted, or null before the first.
    • admission: Object or null - The swarm’s connection admission status, null exactly when available is false. Check available before reading it.
      • configured: String - The admission mode the operator configured: "Open", "Grace" or "Closed".
      • effective: String - The admission mode applied to connections, one of the same three; below configured while a fallback holds.
      • epoch: Number or null - The latest accepted committee window epoch, or null before one is accepted.
      • fallback: String or null - Why Closed cannot be enforced: "Missing" (no versioned committee window has arrived), "Stale" (the window’s lease expired or an older epoch tried to replace it), "Contradictory" (one epoch supplied different committees) or "Unresolved" (committee records or identity mappings are still unresolved); null when nothing prevents Closed. It is reported in every configured mode.
      • resolved_current: Number - Current committee identities with authenticated records, including the node’s own.
      • required_current: Number - The resolved-record quorum Closed requires: n minus floor((n - 1) / 3).
      • connected_current: Number - Connected current committee peers, excluding the node itself.
      • contradicted: Number - Identities whose PeerId another identity also claims, or whose PeerId differs from the configured binding.
    • entries: Array - One object per BLS key the swarm lists, sorted by key bytes. The swarm’s own key is never listed.
      • bls_pubkey: DATA, 96 bytes - The key’s compressed BLS12-381 public key, lowercase hex with a 0x prefix.
      • slots: Array of String - Every slot the key holds, in this order:
        • "previous", "current", "next" - A member of that committee of the accepted window, or of the swarm’s committee slots before a window is accepted.
        • "scheduled" - A member of the committee two epochs ahead.
        • "eligible" - In the validator pool the committee draw reads: pending activation, active or pending exit.
        • "trusted" - Configured as a trusted node.
        • "bootstrap" - Configured as a bootstrap peer.
      • peer_id: String or null - The base58 PeerId of network_pubkey; null when source is "unresolved".
      • network_pubkey: String or null - The network public key of the held record or configured binding, in the encoding tn_info uses for primary_network_key; null when source is "unresolved".
      • multiaddrs: Array of String - The addresses the swarm uses for the key: the launch address when source is "stub", otherwise those of the held record or configured binding; empty when source is "unresolved".
      • record_multiaddrs: Array of String - The signed record’s own addresses. Present only when source is "stub", a signed record is held and its addresses differ from the launch address; otherwise the field is omitted. The two lists differ when the operator’s inventory is stale or the validator moved, so a firewall that must not cut a live peer allows both.
      • record_timestamp: Number or null - The signed record’s timestamp in seconds since the Unix epoch; null while the swarm holds no signed record for the key. A configured binding is not a signed record.
      • source: String - Where multiaddrs came from:
        • "record" - A signed node record the swarm verified.
        • "config" - An operator-configured binding (trusted, bootstrap or explicit peer) with no signed record yet.
        • "stub" - A committee_peers launch address, which replaces the addresses of any signed record.
        • "unresolved" - Neither a signed record nor a configured binding is held; the entry has no identity and no addresses.
      • admitted: Boolean - Whether the key’s identity is in the authorized set that Closed admission enforces. It is true only for a key in the accepted committee window or with a trusted or bootstrap grant, whose identity, resolved as admission resolves it from a cached record or a configured binding, is authorized. Before a window is accepted, only trusted and bootstrap keys can be admitted. A key held only as scheduled or eligible is never admitted, even when its record claims an authorized PeerId. The flag does not depend on the effective mode: under Open or Grace a peer outside the authorized set may still connect.

A key that has just moved from the eligible pool into the committee window reports its tracked record, with source "record", until its committee lookup lands. Admission does not resolve an identity through that record, so such an entry has a peer_id but admitted: false, and the key still counts as unresolved toward the swarm’s "Unresolved" fallback.

Errors

  • -32001 (Not Found.) - The node’s networks have not started yet. The node answers this rather than an empty snapshot, which a reader would take for swarms that track nobody.
  • -32601 (method not found) - The node runs a release without this method.

Load on the node

Each swarm answers on the command channel that also carries its certificate and batch publishes, so the node bounds what RPC callers can add to it. It runs one fetch at a time, and a caller that arrives during a fetch waits for it and shares its result. A snapshot is served unchanged for 1 second after its fetch finished, and fetches start at least 1 second apart, also when a caller disconnects in the middle of one. Each swarm has 2 seconds to answer; a swarm that errors or times out is reported unavailable and does not hold up the others.

Reading the snapshot for a firewall

A snapshot is authoritative for membership only when its version is known and the primary swarm is available, reports a tracked_epoch below neither its admission.epoch nor the last applied one, and has a fallback of null or "Unresolved". Otherwise keep the last applied set; the fail-open rule has the details, including how to read worker swarms and unresolved entries.

A primary tracked_epoch lower than its admission.epoch means pool-unpublished. The node has not published this epoch’s validator pool, because the pool read failed or has not run yet, and the swarm still lists the previous epoch’s scheduled and eligible keys. Keep the last applied set and treat the snapshot as stale. At an epoch start the committee window moves before the pool read completes, so one read in that window can be stale and the next one is fresh. An equal value is authoritative. A higher value can be accepted with a warning.

Example

Request

curl http://127.0.0.1:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_admissionSnapshot","params":[],"id":1}'

Result

A Closed primary swarm at epoch 42 that lists a current committee member it admits and an eligible validator it does not:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "version": 1,
    "epoch": 42,
    "swarms": [
      {
        "network": "primary",
        "worker_id": null,
        "available": true,
        "tracked_epoch": 42,
        "admission": {
          "configured": "Closed",
          "effective": "Closed",
          "epoch": 42,
          "fallback": null,
          "resolved_current": 4,
          "required_current": 3,
          "connected_current": 3,
          "contradicted": 0
        },
        "entries": [
          {
            "bls_pubkey": "0xaecb3fe3d22a958237df2fdb9c6932c837687151bf8b819f18296cce5c5967fb215f16445486c93dbf6a2c933969a93601c2fda599ece5eb4f44c7a311f061d1390e8337230c72085387af3bef1854ef45307aea81704241cbf9ad10717cf4df",
            "slots": ["current", "eligible"],
            "peer_id": "12D3KooWRawPbxPtP1eZaJpumGnyWX2DcUyd3RQnydr3eAto4Az7",
            "network_pubkey": "4XTTMGud3T6rxzNnDbyHKtJgof7ft69y5Ae22hrFogQWL1wmD",
            "multiaddrs": ["/ip4/203.0.113.10/udp/49590/quic-v1"],
            "record_timestamp": 1793750400,
            "source": "record",
            "admitted": true
          },
          {
            "bls_pubkey": "0xb77ba5d4bf7524aa429f1700dac5ac0a6de363e66ab0ef0aa13f2872c43a6923122ac96b24db2503f7c6ae4f33ae9ab400174206049b6caaba895383af5609ff2cde4d65ce83ba31f9ada80ba83bb47afb60bbc49dd40b9c7b57410bf8bbc525",
            "slots": ["eligible"],
            "peer_id": "12D3KooWSrKnMZUcSxK8G7wmBbXdU8nFEfWGhLu6H8xjn8LmCSJb",
            "network_pubkey": "4XTTMJB1SChwh4KSnHnQBJdRTcjRuiLVipZWL1MNVpMxJAD5h",
            "multiaddrs": ["/ip4/198.51.100.7/udp/49590/quic-v1"],
            "record_timestamp": 1793736000,
            "source": "record",
            "admitted": false
          }
        ]
      }
    ]
  }
}

A worker swarm that did not answer in time appears as:

{
  "network": "worker-0",
  "worker_id": 0,
  "available": false,
  "tracked_epoch": null,
  "admission": null,
  "entries": []
}

tn_delegationDigest

Returns the EIP-712 digest a validator signs to accept a delegation. The node computes it by calling the ConsensusRegistry contract’s delegationDigest view at the canonical tip; nothing is signed or submitted. The validator signs the digest, and the delegator passes that signature to delegateStake (see Delegated Staking).

Besides the four parameters, the digest commits to the current epoch’s stake version and to the validator’s delegation nonce. If the stake version changes at an epoch boundary, or the validator advances its nonce with increaseNonce(), before the delegation is submitted, the signature no longer verifies and a new digest is needed.

Parameters

DATA, 96 bytes - The validator’s compressed BLS12-381 public key. Any other length, including the 192-byte uncompressed encoding, reverts with the registry’s InvalidBLSPubkey() error.

DATA, 20 bytes - The validator’s execution address. It must hold a ConsensusNFT; otherwise the call reverts with the registry’s InvalidTokenId(uint256) error.

DATA, 20 bytes - The delegator’s address: the account that will send the delegateStake transaction.

QUANTITY - The deadline, a Unix timestamp in seconds. delegateStake rejects the signature once the block timestamp is past it. A JSON number is also accepted.

Returns

DATA, 32 bytes - The EIP-712 digest for the validator to sign.

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_delegationDigest","params":["0xb1f5f47e63566357362e2157f1b6860df78c08e98f7f5df8e0e2cf837cdea6420c0698dc123f187ed170acfe5c138bf11202b69c3ce2c4f5c2de7fa58d993931164fc3011118c62f0fb1b9cf723f1e55a410a9f77e8cd41576c9e4f8d0adf8ba", "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024", "0x1111111111111111111111111111111111111111", "0x6b49d200"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x556d539e57d044188fc1d7f4acf049df9037f59fb738985df77475199fb2fb28"
}

tn_epochRecord

Returns the epoch record for an epoch together with the certificate that signs it. Epoch records form the epoch chain: when an epoch ends, the record of that epoch fixes its committee, the committee chosen for the next epoch, and the last execution block and consensus header of the epoch, and the outgoing committee signs it at the start of the next epoch. Syncing nodes use the chain to learn each epoch’s committee without execution state; see Canonical Updates.

The record is read from the node’s consensus database, not from contract state. tn_getEpochInfo serves a different view of an epoch: the ConsensusRegistry contract’s entry, which the contract keeps only for a short ring buffer of recent epochs. A record exists only once its epoch has ended, so the current epoch has none. The method returns the error -32001 “Not Found.” when the node has no record for the epoch, or has the record but not yet a certificate for it. tn_epochRecordByHash looks a record up by its digest instead.

Parameters

Number - The epoch number, as a JSON number. A hex string is rejected with -32602 “Invalid params”.

Returns

Array - A two-element array: the epoch record object, then the epoch certificate object. Field names are snake_case, and consensus-layer keys, digests and signatures are base58 strings.

The epoch record:

  • epoch: Number - The epoch the record is for.
  • committee: Array - The BLS public keys of the epoch’s committee, base58-encoded (96-byte compressed form).
  • next_committee: Array - The BLS public keys of the committee chosen for the next epoch, in the same encoding.
  • parent_hash: String - Digest of the previous epoch’s record, 32 bytes, base58-encoded. All zero bytes (11111111111111111111111111111111) for epoch 0.
  • final_state: Object - The last execution block of the epoch: number (Number) and hash (DATA, 32 Bytes).
  • final_consensus: Object - The last consensus header of the epoch: number (Number) and hash (String, base58).

The epoch certificate:

  • epoch_hash: String - The digest of the record above, 32 bytes, base58-encoded. This is the key tn_epochRecordByHash takes.
  • signature: String - The aggregate BLS signature of the committee members that signed the record, base58-encoded.
  • signed_authorities: String - Which members of committee signed, as a bitmap of their positions in that list: a serialized roaring bitmap, base58-encoded. A valid certificate carries signatures from more than two thirds of the committee.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_epochRecord","params":[600],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "epoch": 600,
      "committee": [
        "pDmpE29YEhr93MPVPCGkWx3BsCcow4oExmxv5viJz2GTjsaXwc3YwKxE1CFdVuTVSudsFDutFSVmtgF98Abs56JZPfGQs6GzbqXDFkGA1eZx2edkwfP2Q6eRLo8coLhvTNj",
        "24JaKrebALhvhXxsAabjd5ZK22k1W4zKwGepKD5pcobQwBkZyiruYyhRM3hkLap8Ssc4qUdcRUJSrs2389hUoV7G83HKYrmkz2pTzCJiQURV5vtkrh8gFRKBQWKFTWLWah9s",
        "26L3gmkBzxAxEwvVuDrxEmKf2XwYGnYj1EQSiZSX3PBAvRa6Z5tegfmDAGHTsBwdtjFuAd7ayQEemE1AUE5ajSSK8wn3uz1MY5vjbGdeh3RoUv1TKLfbNTTULq9qdtaSTHhL",
        "rZdhyVGJAtz7kyFtFARWVVcw5DB3o9E4GvPN6zuKfUhUBGFRvEK2PgEV44CJt9wu9GMyssFQBFXRknrenuhJixo9KCADrZzHdtcvAwAYDmcLc7Ugh9epGc5LRZC5TK2hnYA",
        "26L1XwWTr6bBNnxJmDJXJgTqMAyD4ExkqwPYYJqDD3gob3jzejypQoewqRmqb9D2Yudk7zjcPqaTzFcEtXhrYXUtNx2ZYeLKC8V77LL2J136Hvw8eCGXpadGAbymThMhWYAa"
      ],
      "next_committee": [
        "pDmpE29YEhr93MPVPCGkWx3BsCcow4oExmxv5viJz2GTjsaXwc3YwKxE1CFdVuTVSudsFDutFSVmtgF98Abs56JZPfGQs6GzbqXDFkGA1eZx2edkwfP2Q6eRLo8coLhvTNj",
        "24JaKrebALhvhXxsAabjd5ZK22k1W4zKwGepKD5pcobQwBkZyiruYyhRM3hkLap8Ssc4qUdcRUJSrs2389hUoV7G83HKYrmkz2pTzCJiQURV5vtkrh8gFRKBQWKFTWLWah9s",
        "26L3gmkBzxAxEwvVuDrxEmKf2XwYGnYj1EQSiZSX3PBAvRa6Z5tegfmDAGHTsBwdtjFuAd7ayQEemE1AUE5ajSSK8wn3uz1MY5vjbGdeh3RoUv1TKLfbNTTULq9qdtaSTHhL",
        "rZdhyVGJAtz7kyFtFARWVVcw5DB3o9E4GvPN6zuKfUhUBGFRvEK2PgEV44CJt9wu9GMyssFQBFXRknrenuhJixo9KCADrZzHdtcvAwAYDmcLc7Ugh9epGc5LRZC5TK2hnYA",
        "26L1XwWTr6bBNnxJmDJXJgTqMAyD4ExkqwPYYJqDD3gob3jzejypQoewqRmqb9D2Yudk7zjcPqaTzFcEtXhrYXUtNx2ZYeLKC8V77LL2J136Hvw8eCGXpadGAbymThMhWYAa"
      ],
      "parent_hash": "EAXPstRk52BS7ggYetfzxDsC5oei4NL6rAtKcji4acUc",
      "final_state": {
        "number": 500810,
        "hash": "0x785da075f575faf3701e75214315e1aa7806dcc434b009673a3e76f7d21eec1d"
      },
      "final_consensus": {
        "number": 7056884,
        "hash": "2HqGsiq25eKZ8qRLb9Scx29TuZWE1r9LYtjouM5hnTxU"
      }
    },
    {
      "epoch_hash": "GDEpTMo1S4W2M1NajbaA6Vbf6AUndzWXTvR9J7RhEf7m",
      "signature": "7MsdyrYbUGbUXaaC2BjjtgR4PnP3swUQAgLEasfosvs4KFeCtLTTZCUGraKeHXJE7e",
      "signed_authorities": "2nLqe24nocoseuuBygc8VW6FW3oXreb3pseX"
    }
  ]
}

tn_epochRecordByHash

Returns the epoch record with the given digest together with the certificate that signs it. It answers like tn_epochRecord, which looks the record up by epoch number; use this method to follow the epoch chain from a record’s parent_hash or from a certificate’s epoch_hash.

The record is read from the node’s consensus database, not from contract state; tn_getEpochInfo serves the ConsensusRegistry contract’s entry for an epoch, which the contract keeps only for a short ring buffer of recent epochs. The method returns the error -32001 “Not Found.” when the node has no record with this digest, or has the record but not yet a certificate for it.

Parameters

String - The epoch record’s digest, 32 bytes, base58-encoded, as it appears in a certificate’s epoch_hash or the next record’s parent_hash. A 0x hex string is rejected with -32602 “Invalid params”.

Returns

Array - A two-element array: the epoch record object, then the epoch certificate object, with the fields described on tn_epochRecord.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_epochRecordByHash","params":["GDEpTMo1S4W2M1NajbaA6Vbf6AUndzWXTvR9J7RhEf7m"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "epoch": 600,
      "committee": [
        "pDmpE29YEhr93MPVPCGkWx3BsCcow4oExmxv5viJz2GTjsaXwc3YwKxE1CFdVuTVSudsFDutFSVmtgF98Abs56JZPfGQs6GzbqXDFkGA1eZx2edkwfP2Q6eRLo8coLhvTNj",
        // ... four more BLS public keys
      ],
      "next_committee": [
        "pDmpE29YEhr93MPVPCGkWx3BsCcow4oExmxv5viJz2GTjsaXwc3YwKxE1CFdVuTVSudsFDutFSVmtgF98Abs56JZPfGQs6GzbqXDFkGA1eZx2edkwfP2Q6eRLo8coLhvTNj",
        // ... four more BLS public keys
      ],
      "parent_hash": "EAXPstRk52BS7ggYetfzxDsC5oei4NL6rAtKcji4acUc",
      "final_state": {
        "number": 500810,
        "hash": "0x785da075f575faf3701e75214315e1aa7806dcc434b009673a3e76f7d21eec1d"
      },
      "final_consensus": {
        "number": 7056884,
        "hash": "2HqGsiq25eKZ8qRLb9Scx29TuZWE1r9LYtjouM5hnTxU"
      }
    },
    {
      "epoch_hash": "GDEpTMo1S4W2M1NajbaA6Vbf6AUndzWXTvR9J7RhEf7m",
      "signature": "7MsdyrYbUGbUXaaC2BjjtgR4PnP3swUQAgLEasfosvs4KFeCtLTTZCUGraKeHXJE7e",
      "signed_authorities": "2nLqe24nocoseuuBygc8VW6FW3oXreb3pseX"
    }
  ]
}

tn_genesis

Returns the genesis the node’s chain specification was built from: the chain configuration and the initial state, in the layout of an Ethereum genesis file. The initial state includes Telcoin Network’s system contracts, such as the ConsensusRegistry at 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1, with their bytecode and storage, so the response is large (about 140 KB on adiri).

Parameters

None

Returns

Object - The genesis object:

  • config: Object - The chain configuration: chainId and the block number or timestamp at which each Ethereum fork activates.
  • nonce: QUANTITY - The genesis header nonce.
  • timestamp: QUANTITY - The genesis header timestamp, in seconds since the Unix epoch.
  • extraData: DATA - The genesis header extra data.
  • gasLimit: QUANTITY - The genesis header gas limit.
  • difficulty: QUANTITY - The genesis header difficulty.
  • mixHash: DATA, 32 Bytes - The genesis header mix hash.
  • coinbase: DATA, 20 bytes - The genesis header beneficiary.
  • alloc: Object - The initial accounts, keyed by address. Each account has balance (QUANTITY, in wei) and, when the genesis sets them, nonce (QUANTITY), code (DATA) and storage (Object mapping 32-byte slots to 32-byte values).
  • baseFeePerGas: QUANTITY - The genesis header base fee. Present only when the genesis sets it, as are excessBlobGas, blobGasUsed, number and parentHash.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_genesis","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "config": {
      "chainId": 2017,
      "homesteadBlock": 0,
      "daoForkSupport": false,
      "eip150Block": 0,
      "eip155Block": 0,
      "eip158Block": 0,
      "byzantiumBlock": 0,
      "constantinopleBlock": 0,
      "petersburgBlock": 0,
      "istanbulBlock": 0,
      "berlinBlock": 0,
      "londonBlock": 0,
      "shanghaiTime": 0,
      "cancunTime": 0,
      "pragueTime": 0,
      "terminalTotalDifficulty": 0,
      "terminalTotalDifficultyPassed": true
    },
    "nonce": "0x0",
    "timestamp": "0x69fceea7",
    "extraData": "0x",
    "gasLimit": "0x1c9c380",
    "difficulty": "0x0",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "coinbase": "0x0000000000000000000000000000000000000000",
    "alloc": {
      "0x00000000000000000000000000000000000007e1": {
        "nonce": "0x0",
        "balance": "0x0",
        "code": "0xfe"
      },
      "0x0407c96c91afe937c50058fa870a4a745fa9142e": {
        "balance": "0xc9f2c9cd04674edea40000000"
      }
      // ... 35 more accounts, including the system contracts
    },
    "baseFeePerGas": "0x7"
  }
}

tn_getBalanceBreakdown

Returns the balance breakdown (outstanding balance, initial stake, rewards) for a given validator address, read from the ConsensusRegistry contract at the node’s canonical tip. The contract returns three unnamed uint256 values; the node names them in the object below. For an address that was never a validator, outstandingBalance and rewards are 0x0 and initialStake is the stake amount of stake version 0.

Parameters

DATA, 20 bytes - The validator’s execution address.

Returns

Object - The balance breakdown:

  • outstandingBalance: QUANTITY - Hexadecimal of the validator’s balance held by the registry, in wei: its stake plus the rewards it has not claimed.
  • initialStake: QUANTITY - Hexadecimal of the stake amount of the validator’s stake version, in wei; see How Staking Works.
  • rewards: QUANTITY - Hexadecimal of the claimable rewards accrued, in wei: the part of outstandingBalance above initialStake, or 0x0 if there is none. The same value tn_getRewards returns.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getBalanceBreakdown","params":["0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "outstandingBalance": "0x3cb42afc2b7a0162dfb99", // about 4,586,648 TEL
    "initialStake": "0xd3c21bcecceda1000000", // 1,000,000 TEL
    "rewards": "0x2f78093f3eab2752dfb99" // about 3,586,648 TEL
  }
}

tn_getBlockTimestampMillis

Returns the consensus commit time, in milliseconds, of an execution block. An execution block keeps a whole-second timestamp; the millisecond commit time lives in the consensus header the block was executed from, which the block references through its parentBeaconBlockRoot. This method pairs the two.

Returns null for a block this node does not know: an unknown number or hash, safe and finalized before the first block is finalized, and heights below a snapshot-restored node’s restored header window. A known block whose consensus header is missing from local storage, for example because the node does not have that epoch’s consensus pack, returns the error -32001 “Not Found.” rather than null. A known block whose epoch’s consensus pack is on disk but cannot be read returns -32603 “internal error”; the server then answers “internal error” for 30 seconds for any block of that epoch it has not already resolved, without reading the pack again, so a repaired pack is picked up within that time.

Validators should not expose the tn namespace publicly. A request for a block from a sealed epoch can open that epoch’s consensus pack, and the storage layer opens packs synchronously into a small cache it shares with state sync and with serving epochs to peers. The lookup runs off the async runtime and under a tight concurrency bound, but public callers can still churn that cache until storage opens and evicts packs without blocking. Serve the namespace from non-validating nodes instead, and leave tn out of the validator’s --http.api and --ws.api; see Enabling Namespaces.

Parameters

QUANTITY|TAG|DATA - Hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, pending, safe or finalized, as in the default block parameter. pending resolves as latest.

Returns

Object - The block’s timestamps, or null when the node does not know the block:

  • blockNumber: QUANTITY - The execution block’s number.
  • blockHash: DATA, 32 Bytes - The execution block’s hash.
  • timestamp: QUANTITY - The execution block’s timestamp in whole seconds, as the EVM reports it.
  • timestampMillis: QUANTITY - The commit time of the block’s consensus header, in milliseconds since the Unix epoch, read from the header’s committed sub-DAG rather than computed from timestamp. For genesis, which has no consensus header, timestamp times 1000.
  • subSecond: Boolean - Whether the consensus header’s leader epoch commits with millisecond resolution. false for leader epochs before the sub-second timestamp fork, whose commit times are whole seconds (timestampMillis is then a multiple of 1000), and for genesis.
  • consensusNumber: QUANTITY - The number of the consensus header the block was executed from. Absent for genesis.
  • consensusDigest: DATA, 32 Bytes - The digest of that consensus header, which is the block’s parentBeaconBlockRoot. Absent for genesis. It is hex here; consensus-layer methods such as tn_latestConsensusHeader print digests in base58.

Normally timestamp equals timestampMillis / 1000 rounded down. It does not when execution raised the block’s timestamp to its parent’s, which the node counts in the evm_timestamp_clamped_total metric: timestampMillis then stays the consensus commit time and is below timestamp times 1000. Execution raises a block’s timestamp only from the sub-second timestamp fork on, and then only after a consensus regression or for an epoch-0 commit made while the validators’ clocks lag the genesis timestamp.

timestampMillis does not decrease within an epoch, except from genesis to block 1 if the validators’ clocks lagged the genesis timestamp at launch: genesis reports timestamp times 1000 and block 1 its earlier commit time. Blocks executed from one consensus output share a value. Across an epoch boundary only timestamp is guaranteed not to decrease: the blocks of an epoch’s first commit can report up to 998 ms less than the previous epoch’s last block, within the same whole second.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getBlockTimestampMillis","params":["0x7a44a"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockNumber": "0x7a44a",
    "blockHash": "0x785da075f575faf3701e75214315e1aa7806dcc434b009673a3e76f7d21eec1d",
    "timestamp": "0x6ac5af2b",
    "timestampMillis": "0x1a114343ff8",
    "subSecond": false,
    "consensusNumber": "0x6badf4",
    "consensusDigest": "0x132b90286336db32aec099b223b4343155f25487e286a8d4185a5c681e71c141"
  }
}

tn_getBlsPubkey

Returns the BLS public key for a given validator address, read from the ConsensusRegistry contract at the node’s canonical tip. The key is the compressed BLS12-381 public key the validator registered when it staked. An address with no registered key reverts with the registry’s BlsPubkeyNotFound(address) error.

Parameters

DATA, 20 bytes - The validator’s execution address.

Returns

DATA, 96 bytes - The validator’s compressed BLS12-381 public key.

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getBlsPubkey","params":["0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xb1f5f47e63566357362e2157f1b6860df78c08e98f7f5df8e0e2cf837cdea6420c0698dc123f187ed170acfe5c138bf11202b69c3ce2c4f5c2de7fa58d993931164fc3011118c62f0fb1b9cf723f1e55a410a9f77e8cd41576c9e4f8d0adf8ba"
}

tn_getCommitteeBlsPubkeys

Returns the BLS public keys for the committee of a given epoch, read from the ConsensusRegistry contract at the node’s canonical tip. The keys are in the order the registry stores the committee, the same order tn_getCommitteeValidators returns, so the n-th key belongs to the n-th validator there.

The registry keeps committees only for a window around the current epoch: the three epochs before it, the current epoch, and the next two. An epoch outside that window reverts with the registry’s InvalidEpoch(uint32) error.

Parameters

Number - The epoch number, as a JSON number. A hex string is rejected with error -32602.

Returns

Array of DATA, 96 bytes each - The committee members’ compressed BLS12-381 public keys.

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getCommitteeBlsPubkeys","params":[601],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    "0x89142f700382ba353262037ee9d72e43d56dfc6001618dee906b5dd2955c24955a0af1e16a65e064fb5a9602c3ba4846073fd2f422ae52f2e328a1b7d6e42a27cac5dc731ecaf3711ef2b727b226f0b29bad2fe890c453a6f3b23d5396b8483c",
    "0xb1f5f47e63566357362e2157f1b6860df78c08e98f7f5df8e0e2cf837cdea6420c0698dc123f187ed170acfe5c138bf11202b69c3ce2c4f5c2de7fa58d993931164fc3011118c62f0fb1b9cf723f1e55a410a9f77e8cd41576c9e4f8d0adf8ba",
    "0xb7d7220480a5df0d1d3d622426d667151a091b430f329546067dba93da38697f5307fd9729f79089fe1ae6179658e0230d00059cc2349f9308b8eaff0b79309cdd2f8ed0568340f504909d643c435bc2d98123e11c6e9a125547a78c69855463",
    "0x8fe0fa048858f10a610a75242de0532b1df341f7bdd11b28872ca0c128487e5422baa945926ebd3b75e7f350590288630a9c930031fdcd9b2ce76ac7833090378e05f8578a7ce437c6c0cf99496c83ef5ee1c1b5a5e580bd8c922070c2234e73",
    "0xb7d6a84c181082e78d93f8b203208e4e1b3a2b99dc66879bc86d73dcae4bc7a1162aac775b64d8c121c4318ffd2954590f81dd1f91583a3d1a3b260df8a1e08b4a6a56f6f1974901d0b5823c821214eeacce9b5780cae0856bc6a50a7599320f"
  ]
}

tn_getCommitteeValidators

Returns the committee validators for the given epoch, read from the ConsensusRegistry contract at the node’s canonical tip.

The registry keeps committees only for a window around the current epoch: the three epochs before it, the current epoch, and the next two, whose committees are already chosen. An epoch outside that window reverts with the registry’s InvalidEpoch(uint32) error. Each object is the validator’s record as it is now, not as it was during that epoch, so a past committee member that has since begun to exit shows its current status. tn_getCommitteeBlsPubkeys returns the same committee’s BLS keys in the same order.

Parameters

Number - The epoch number, as a JSON number. A hex string is rejected with error -32602.

Returns

Array - The epoch’s committee in the order the registry stores it, one object per validator:

  • validatorAddress: DATA, 20 bytes - The validator’s execution address, which also identifies its ConsensusNFT.
  • activationEpoch: Number - The epoch in which the validator became, or will become, active.
  • exitEpoch: Number - The epoch in which the validator exited; 0 until it begins to exit and 4294967295 while it is PendingExit.
  • currentStatus: String - The validator’s current status, for example "Active" or "PendingExit".
  • isRetired: Boolean - Whether the validator is permanently retired.
  • stakeVersion: Number - The stake version the validator staked under or last upgraded to; see How Staking Works.
  • region: Number - The geographic region governance assigned to the validator, 0 when unspecified. The node does not use it.

The numeric fields are JSON numbers, not hex strings.

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getCommitteeValidators","params":[601],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "validatorAddress": "0x0033a370616805b1fd275b7ffab83fc41d665ccb",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0x7489025dfbaad94f2366d88a62989147d9c8b5d3",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0x89dab9f6fdc569c1bcdbd6493f25b7040b55dc79",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0xefaacf04b92298a88200aa50aa6bb7bfce587b17",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    }
  ]
}

tn_getCurrentEpoch

Returns the current epoch number as the ConsensusRegistry contract records it, read from the state at this node’s canonical tip, the newest block it has executed. The value moves to the next epoch when the node executes the last block of an epoch, whose concludeEpoch system call starts the next epoch in the registry; see Epoch Boundaries. A node that is still catching up reports the epoch of its own tip, which can be behind the epoch of the consensus headers it has already seen through tn_latestConsensusHeader.

Parameters

None

Returns

Number - The current epoch number, as a JSON number.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getCurrentEpoch","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 601
}

tn_getCurrentEpochInfo

Returns the ConsensusRegistry contract’s entry for the current epoch: its committee, issuance, starting block and duration. The entry is read from the contract state at this node’s canonical tip, the newest block it has executed, so a node that is still catching up reports the epoch of its own tip, and the answer moves to the next epoch when the node executes the block that closes the current one.

This is contract state. It is distinct from tn_epochRecord, which serves the consensus layer’s signed epoch records from the node’s database and has no record for the current epoch until it ends. tn_getEpochInfo returns the same entry for another epoch.

Parameters

None

Returns

Object - The epoch info object:

  • committee: Array - The execution addresses (DATA, 20 bytes) of the epoch’s committee members.
  • epochIssuance: QUANTITY - The TEL issuance, in wei, the epoch distributes among the validators that led consensus commits during it; see Epoch Boundaries.
  • blockHeight: Number - The execution block height at which the epoch started and its committee became active.
  • epochId: Number - The epoch number.
  • epochDuration: Number - The epoch’s duration in seconds, set at the start of the epoch from the registry’s stake configuration.
  • stakeVersion: Number - The stake configuration version used for the epoch’s reward calculations.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getCurrentEpochInfo","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "committee": [
      "0x0033a370616805b1fd275b7ffab83fc41d665ccb",
      "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024",
      "0x7489025dfbaad94f2366d88a62989147d9c8b5d3",
      "0x89dab9f6fdc569c1bcdbd6493f25b7040b55dc79",
      "0xefaacf04b92298a88200aa50aa6bb7bfce587b17"
    ],
    "epochIssuance": "0x576f23131f3c2780000",
    "blockHeight": 500811,
    "epochId": 601,
    "epochDuration": 21600,
    "stakeVersion": 0
  }
}

tn_getCurrentStakeVersion

Returns the current stake config version, read from the ConsensusRegistry contract at the node’s canonical tip. This is the stake version the current epoch was stamped with when it began, the same stakeVersion that tn_getCurrentEpochInfo reports. A version governance creates with upgradeStakeVersion() takes effect at the next epoch, so until then this method still returns the previous version. How Staking Works describes stake versions.

Parameters

None

Returns

Number - The stake version, a JSON number from 0 to 255.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getCurrentStakeVersion","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 0
}

tn_getEpochInfo

Returns the ConsensusRegistry contract’s entry for an epoch: its committee, issuance, starting block and duration, read from the contract state at this node’s canonical tip, the newest block it has executed.

The contract keeps these entries only for a ring buffer of epochs around the current one: the three epochs before it, the current epoch, and the next two. A request for an epoch outside that window reverts with the registry’s InvalidEpoch(uint32) error, reported as eth_call reports a revert: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data. An entry for an epoch that has not started yet reports blockHeight 0. For epochs that have ended, tn_epochRecord serves the consensus layer’s epoch records from the node’s database, signed by each epoch’s committee and not limited to recent epochs.

Parameters

Number - The epoch number, as a JSON number. A hex string is rejected with -32602 “Invalid params”.

Returns

Object - The epoch info object, with the fields described on tn_getCurrentEpochInfo: committee, epochIssuance, blockHeight, epochId, epochDuration and stakeVersion.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getEpochInfo","params":[600],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "committee": [
      "0x0033a370616805b1fd275b7ffab83fc41d665ccb",
      "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024",
      "0x7489025dfbaad94f2366d88a62989147d9c8b5d3",
      "0x89dab9f6fdc569c1bcdbd6493f25b7040b55dc79",
      "0xefaacf04b92298a88200aa50aa6bb7bfce587b17"
    ],
    "epochIssuance": "0x576f23131f3c2780000",
    "blockHeight": 500659,
    "epochId": 600,
    "epochDuration": 21600,
    "stakeVersion": 0
  }
}

tn_getNextCommitteeSize

Returns the committee size for the next epoch, as the ConsensusRegistry contract records it in the state at this node’s canonical tip, the newest block it has executed. When the protocol selects the next committee at an epoch boundary, it shuffles the eligible validators and trims the list to this size; see Epoch Boundaries.

Parameters

None

Returns

Number - The number of validators in the next epoch’s committee, as a JSON number.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getNextCommitteeSize","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 5
}

tn_getRewards

Returns the claimable rewards accrued for a given validator address, read from the ConsensusRegistry contract at the node’s canonical tip. The registry counts as rewards whatever the validator’s balance holds above the stake amount of its stake version, so the value is 0x0 before any rewards accrue and for an address that was never a validator. tn_getBalanceBreakdown returns the balance and stake amount this is computed from; How Staking Works explains how rewards are distributed.

Parameters

DATA, 20 bytes - The validator’s execution address.

Returns

QUANTITY - Hexadecimal of the accrued rewards in wei.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getRewards","params":["0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2f78093f3eab2752dfb99" // about 3,586,648 TEL
}

tn_getValidator

Returns the ValidatorInfo record for a given validator address, read from the ConsensusRegistry contract at the node’s canonical tip.

The address must hold a ConsensusNFT or belong to a retired validator; any other address reverts with the registry’s InvalidTokenId(uint256) error. An address that holds a ConsensusNFT but has not staked yet returns a record with currentStatus "Undefined" and the numeric fields at 0. A retired validator’s record is kept after its ConsensusNFT is gone and reports currentStatus "Any" with isRetired true.

Parameters

DATA, 20 bytes - The validator’s execution address.

Returns

Object - The validator’s record:

  • validatorAddress: DATA, 20 bytes - The validator’s execution address, which also identifies its ConsensusNFT.
  • activationEpoch: Number - The epoch in which the validator became, or will become, active.
  • exitEpoch: Number - The epoch in which the validator exited; 0 until it begins to exit and 4294967295 while it is PendingExit.
  • currentStatus: String - The validator’s status: "Undefined", "Staked", "PendingActivation", "Active", "PendingExit", "Exited", or "Any" once retired.
  • isRetired: Boolean - Whether the validator is permanently retired; a retired address can never rejoin.
  • stakeVersion: Number - The stake version the validator staked under or last upgraded to; see How Staking Works.
  • region: Number - The geographic region governance assigned to the validator, 0 when unspecified. The node does not use it.

The numeric fields are JSON numbers, not hex strings.

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getValidator","params":["0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "validatorAddress": "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024",
    "activationEpoch": 0,
    "exitEpoch": 0,
    "currentStatus": "Active",
    "isRetired": false,
    "stakeVersion": 0,
    "region": 0
  }
}

tn_getValidators

Returns the validators the ConsensusRegistry contract holds under one status, read at the node’s canonical tip. Pass "Any" to return validators of every status; "Undefined" reverts on-chain.

The registry keeps one set of validators per status and has no query for "Any", so the node builds that answer itself: it reads the Staked, PendingActivation, Active, PendingExit and Exited sets against the same block and concatenates them in that order. A validator is in exactly one set at a time. Retired validators are in no set, so neither a single status nor "Any" returns them; tn_getValidator still answers for a retired address.

Parameters

String - The validator status by name: "Staked", "PendingActivation", "Active", "PendingExit", "Exited" or "Any". Names are case-sensitive, and a number is rejected as an invalid parameter. "Undefined" reverts with the registry’s InvalidStatus(uint8) error; an unrecognised name reverts with empty revert data.

Returns

Array - The validators with the requested status, in the registry’s set order, one object each:

  • validatorAddress: DATA, 20 bytes - The validator’s execution address, which also identifies its ConsensusNFT.
  • activationEpoch: Number - The epoch in which the validator became, or will become, active.
  • exitEpoch: Number - The epoch in which the validator exited; 0 until it begins to exit and 4294967295 while it is PendingExit.
  • currentStatus: String - The validator’s status: "Staked", "PendingActivation", "Active", "PendingExit" or "Exited".
  • isRetired: Boolean - Whether the validator is permanently retired; always false here, since retired validators are in no status set.
  • stakeVersion: Number - The stake version the validator staked under or last upgraded to; see How Staking Works.
  • region: Number - The geographic region governance assigned to the validator, 0 when unspecified. The node does not use it.

The numeric fields are JSON numbers, not hex strings. An empty status set returns [].

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_getValidators","params":["Active"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "validatorAddress": "0x0033a370616805b1fd275b7ffab83fc41d665ccb",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0x89dab9f6fdc569c1bcdbd6493f25b7040b55dc79",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0xefaacf04b92298a88200aa50aa6bb7bfce587b17",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    },
    {
      "validatorAddress": "0x7489025dfbaad94f2366d88a62989147d9c8b5d3",
      "activationEpoch": 0,
      "exitEpoch": 0,
      "currentStatus": "Active",
      "isRetired": false,
      "stakeVersion": 0,
      "region": 0
    }
  ]
}

tn_info

Returns the identity a node publishes about itself: the chain it belongs to, its software version and name, its BLS public key and authority id, the execution address that receives its rewards, and the network keys and external addresses peers use to reach its primary and worker. The answer does not change while the node runs; the node’s current consensus participation mode is served by tn_nodeMode instead.

Each worker runs its own RPC server, and worker_network_key and worker_external_address belong to the worker whose server answered. Every other field is the same on all of a node’s workers.

Parameters

None

Returns

Object - The node information object. Unlike most tn results, its field names are snake_case:

  • chain_id: Number - The chain id, as a JSON number.
  • version: String - The node’s software version, <crate version> (<git commit sha>).
  • name: String - The node’s name. Defaults to node- followed by the base58 encoding of the first 8 bytes of the BLS public key; the operator can set another name.
  • bls_public_key: String - The node’s BLS12-381 public key, base58 encoding of its 96-byte compressed form.
  • authority_id: String - The node’s consensus authority id, a 32-byte hash of its BLS public key, base58-encoded.
  • execution_address: DATA, 20 bytes - The address that receives the node’s rewards when it serves in a committee.
  • primary_network_key: String - The public key of the node’s primary network identity, base58 encoding of the libp2p protobuf key encoding.
  • worker_network_key: String - The public key of this worker’s network identity, in the same encoding.
  • primary_external_address: String - The multiaddr peers use to reach the node’s primary.
  • worker_external_address: String - The multiaddr peers use to reach this worker.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_info","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "chain_id": 2017,
    "version": "0.1.0 (5736cc30012c5ff25913898e318a74df308f13d9)",
    "name": "node-WmSeweurYc6",
    "bls_public_key": "24JaKrebALhvhXxsAabjd5ZK22k1W4zKwGepKD5pcobQwBkZyiruYyhRM3hkLap8Ssc4qUdcRUJSrs2389hUoV7G83HKYrmkz2pTzCJiQURV5vtkrh8gFRKBQWKFTWLWah9s",
    "authority_id": "G6A8BRn31vofiVH8KZzETW2kcPsbomNTQYMgvZg52jTg",
    "execution_address": "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024",
    "primary_network_key": "4XTTMJFzopXoTVayf2m4wE69GCqMXW3wUnimiU3CdK5zHL36j",
    "worker_network_key": "4XTTM5m63vU9mmcv8yAmFEpc946PWotoFWDb4TyqRz7ayKJUJ",
    "primary_external_address": "/ip4/34.102.122.126/udp/49590/quic-v1/p2p/12D3KooWSwK9yPLNtDr116cX74FS4Ehs2Nx2fWAUjpnsGrNkNGKd",
    "worker_external_address": "/ip4/34.102.122.126/udp/49594/quic-v1/p2p/12D3KooWESQQ5KghAFnUwWJq7niJuVjrLDooNzypjmRfwsySMXhC"
  }
}

tn_isDelegated

Returns true if the validator’s stake originates from a delegator, read from the ConsensusRegistry contract at the node’s canonical tip. A validator is delegated when a delegator staked on its behalf with delegateStake (see Delegated Staking); the delegator, not the validator, then receives the stake and rewards when the validator unstakes. An address with no delegation, including one that was never a validator, returns false.

Parameters

DATA, 20 bytes - The validator’s execution address.

Returns

Boolean - true if the registry records a delegator for this validator, otherwise false.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_isDelegated","params":["0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

tn_isRetired

Returns true if the validator is permanently retired, read from the ConsensusRegistry contract at the node’s canonical tip. A validator retires when it unstakes, when governance burns its ConsensusNFT, or when slashing takes its stake to zero; a retired address can never rejoin. An address that still holds a ConsensusNFT, or that was never a validator, returns false. The zero address reverts with the registry’s InvalidTokenId(uint256) error.

Parameters

DATA, 20 bytes - The validator’s execution address.

Returns

Boolean - true if the validator is retired, otherwise false.

A revert is reported as eth_call reports one: error code 3, a message that starts with execution reverted, and the ABI-encoded revert data in data.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_isRetired","params":["0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

tn_isValidator

Returns true if the BLS public key belongs to a known validator, read from the ConsensusRegistry contract at the node’s canonical tip. A key is known when a validator registered it by staking and that validator has not retired; the validator’s status is otherwise not checked, so a Staked or Exited validator’s key also returns true. The input is never rejected: a key that is not exactly 96 bytes, or that no validator registered, returns false.

Parameters

DATA, 96 bytes - The compressed BLS12-381 public key. The 192-byte uncompressed encoding is not accepted here and returns false.

Returns

Boolean - true if a validator that has not retired registered this key, otherwise false.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_isValidator","params":["0xb1f5f47e63566357362e2157f1b6860df78c08e98f7f5df8e0e2cf837cdea6420c0698dc123f187ed170acfe5c138bf11202b69c3ce2c4f5c2de7fa58d993931164fc3011118c62f0fb1b9cf723f1e55a410a9f77e8cd41576c9e4f8d0adf8ba"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

tn_latestConsensusHeader

Returns the newest consensus header this node has seen. Consensus headers form the consensus chain: each one records a sub-DAG that BFT consensus committed, in order, and execution blocks are built from them. A validator in the committee reports the header its own consensus just committed; a node that follows consensus reports the newest header it has received and verified, which can be ahead of the blocks it has executed while it catches up. Until the node has seen a header after starting, the result is a placeholder header with number 0.

The result is served from memory and does not read consensus storage. tn_latestHeader is a deprecated alias that returns the same object. Header digests, authority ids and signatures in this object are base58 strings; execution block hashes, batch digests, randomness and extra are 0x hex.

Parameters

None

Returns

Object - The consensus header object. Its field names are snake_case:

  • parent_hash: String - Digest of the previous consensus header, 32 bytes, base58-encoded.
  • sub_dag: Object - The committed sub-DAG:
    • headers: Array - The headers this commit orders, in commit order. The last one is the leader’s. Each header object has:
      • author: String - Authority id of the validator that created the header, base58-encoded (see authority_id in tn_info).
      • round: Number - The consensus round of the header.
      • epoch: Number - The epoch the header was created in.
      • created_at: Number - When the header was created, in whole seconds since the Unix epoch.
      • payload: Array - The transaction batches the header includes, each a two-element array: the batch digest (DATA, 32 Bytes) and the id of the worker that produced it (Number).
      • parents: Array - Digests of the header’s parent certificates from the previous round, base58-encoded.
      • latest_execution_block: Object - The latest execution block the author had when it built the header: number (Number) and hash (DATA, 32 Bytes).
      • seed_signature: String - The author’s BLS signature over the epoch seed message for this round, base58-encoded; it feeds the epoch seed chain that shuffles the next committee. Present for epochs where the seed-signature fork is active: every epoch on mainnet builds, epoch 383 onward on adiri.
      • created_at_millis: Number - The millisecond part of created_at, 0 to 999. Present only for epochs where the sub-second timestamp fork is active: every epoch on mainnet builds, epoch 747 onward on adiri.
    • reputation_scores: Object - Leader reputation scores: scores_per_authority maps each authority id (base58) to its score (Number), and final_of_schedule (Boolean) is true when these are the last scores of the current leader schedule before they reset.
    • commit_timestamp: Number - The commit time, in whole seconds since the Unix epoch.
    • randomness: DATA, 32 Bytes - The epoch seed chain value as of this commit. For epochs before the seed-signature fork, a hash of the leader certificate’s aggregate signature instead.
    • commit_timestamp_millis: Number - The millisecond part of commit_timestamp, 0 to 999. Present only when the sub-second timestamp fork is active for the leader’s epoch, as for created_at_millis. tn_getBlockTimestampMillis reports the combined commit time for an execution block.
  • number: Number - The header’s height in the consensus chain.
  • extra: DATA, 32 Bytes - Reserved; currently always zero.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_latestConsensusHeader","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "parent_hash": "F7V4oK3SzU4Sh3TgjKtacJDqVvKG4xeBJoci5pWDM8cr",
    "sub_dag": {
      "headers": [
        {
          "author": "AFRwTgoeRcEDVUu6QLXkMs8qPouYtEdLmWu2HR6YRBuJ",
          "round": 8718,
          "epoch": 601,
          "created_at": 1791348194,
          "payload": [],
          "parents": [
            "6ubuD1mhZQnNioC6uZHHcdXT4Hqn9W42o1qQbTWeGy6b",
            "CDq3gKsxwGffYso6XZ9nC4XGC2WpmmGecs9owzGZ7i2h",
            "CiJR3e7SBw59gvCrsd71eTCHthiRa4dX2tjyh3Zhfwzn",
            "Dpj3DBvzEm65sj5wWTKSuJvj6bBdjU2eT2uQFPLSvEff"
          ],
          "latest_execution_block": {
            "number": 500829,
            "hash": "0x73bebb21d61d379e5a38510fe5cbf093a32c409778b04dff54832e97039ed894"
          },
          "seed_signature": "5qed98kzkQFKe2RrPm9Rt3qHtQe8D3dCQnFRj7FS38wCVEMExhRqYEccyUasBNCdyj"
        },
        // ... seven more headers ...
        {
          "author": "G6A8BRn31vofiVH8KZzETW2kcPsbomNTQYMgvZg52jTg", // the leader
          "round": 8720,
          "epoch": 601,
          "created_at": 1791348196,
          "payload": [],
          "parents": [
            "33Rkr46KvuYguKGpyztWdVFTJgKMQ7HMZJqSxq5VvBVB",
            "4FCmMaftVgW1LjFHSg4vaaQnQUeLnyp3DZ6mMSDwnxLd",
            "DRuiwXGYkP3tbqAkNm9ZW2X62GLoVtaGBuMRpAQVGoPm",
            "FF5fxaN4dYHQASC3hFpCLVVgf9qLsWbe4z1x8aJv6BZq"
          ],
          "latest_execution_block": {
            "number": 500829,
            "hash": "0x73bebb21d61d379e5a38510fe5cbf093a32c409778b04dff54832e97039ed894"
          },
          "seed_signature": "7PCVZwBmeVzPNdA9JP2oBhcHD58cKpQR7SEvXeuJYVZXWT7oGE7ALYFZS5GbARcTXT"
        }
      ],
      "reputation_scores": {
        "scores_per_authority": {
          "4LSGzE7N43UMvJoyTPTzvjjc9my2XvT6qjMDo8axRLgM": 49,
          "AFRwTgoeRcEDVUu6QLXkMs8qPouYtEdLmWu2HR6YRBuJ": 30,
          "AhVqH6fD3qLKDhrA3zSDQs9jaLR1h5uQ9QzYc6bCpfaH": 49,
          "FfsRxvnfYtW7umk9AGfH24BgNYnbkJ6tn2paTXJse99d": 29,
          "G6A8BRn31vofiVH8KZzETW2kcPsbomNTQYMgvZg52jTg": 39
        },
        "final_of_schedule": false
      },
      "commit_timestamp": 1791348196,
      "randomness": "0x1c10702d249a3a8b5ae183c4f2c790dca5de311e900dd72fe6b4e695d5148358"
    },
    "number": 7061244,
    "extra": "0x0000000000000000000000000000000000000000000000000000000000000000"
  }
}

tn_latestHeader

Deprecated alias of tn_latestConsensusHeader: it returns the same consensus header object, the newest one this node has seen. Use tn_latestConsensusHeader in new code.

Parameters

None

Returns

Object - The consensus header object, with the same fields as tn_latestConsensusHeader: parent_hash, sub_dag, number and extra.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_latestHeader","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "parent_hash": "F7V4oK3SzU4Sh3TgjKtacJDqVvKG4xeBJoci5pWDM8cr",
    "sub_dag": { ... }, // as in tn_latestConsensusHeader
    "number": 7061244,
    "extra": "0x0000000000000000000000000000000000000000000000000000000000000000"
  }
}

tn_nodeMode

Returns the node’s current consensus participation mode: whether it is a committee member voting in consensus, a committee member catching up, or an observer that follows consensus output. The mode is read when the request arrives rather than fixed at startup like tn_info, so a caller can see a transient mode such as CvvInactive while a restarted validator catches up.

Parameters

None

Returns

String - One of:

  • "CvvActive" - A fully synced validator voting in the current committee.
  • "CvvInactive" - A staked validator in the current committee that is following consensus output to catch up after a failure during the epoch. The mode is transient: the node returns to CvvActive once it has synced past the consensus garbage-collection window.
  • "Observer" - A node that follows consensus output and is not in the current committee. It may or may not be staked.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_nodeMode","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "Observer"
}

tn_proofOfPossessionMessage

Returns the BLS12-381 proof-of-possession message a validator signs: intentPrefix(3) || compressedBlsPubkey(96) || validatorAddress(20), 119 bytes in all. The validator’s signature over this message is the proof of possession it submits when it stakes; see How to Stake. The node builds the message itself with the same routine validators sign with, which the ConsensusRegistry contract reproduces byte for byte on-chain, so the method reads no chain state and signs or submits nothing.

The method expects the 96-byte compressed BLS public key. The 192-byte uncompressed encoding is also accepted and normalized to the compressed form, so both yield the same message.

Parameters

DATA, 96 or 192 bytes - The validator’s BLS12-381 public key, compressed (96 bytes) or uncompressed (192 bytes).

DATA, 20 bytes - The validator’s execution address.

Returns

DATA, 119 bytes - The message to sign: the 3-byte Telcoin Network proof-of-possession intent, the compressed public key, and the address.

A key of any other length fails with error -32602 and the message invalid BLS pubkey: expected 96 bytes (compressed) or 192 bytes (uncompressed), got <length>. A key of the right length that does not decode to a valid BLS12-381 public key also fails with -32602, with a message that starts with invalid 96-byte compressed BLS pubkey.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_proofOfPossessionMessage","params":["0xb1f5f47e63566357362e2157f1b6860df78c08e98f7f5df8e0e2cf837cdea6420c0698dc123f187ed170acfe5c138bf11202b69c3ce2c4f5c2de7fa58d993931164fc3011118c62f0fb1b9cf723f1e55a410a9f77e8cd41576c9e4f8d0adf8ba", "0x3518b301b86ceb53b5a3dff62e55cd43ef59d024"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x000000b1f5f47e63566357362e2157f1b6860df78c08e98f7f5df8e0e2cf837cdea6420c0698dc123f187ed170acfe5c138bf11202b69c3ce2c4f5c2de7fa58d993931164fc3011118c62f0fb1b9cf723f1e55a410a9f77e8cd41576c9e4f8d0adf8ba3518b301b86ceb53b5a3dff62e55cd43ef59d024"
}

tn_undistributedIssuance

Returns the issuance the ConsensusRegistry contract has not yet distributed to validators, read from the contract state at this node’s canonical tip, the newest block it has executed. Rewards are distributed at each epoch boundary by the applyIncentives system call; see Epoch Boundaries.

Parameters

None

Returns

QUANTITY - The undistributed issuance, in wei.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"tn_undistributedIssuance","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x3"
}

debug

The debug namespace serves raw RLP and EIP-2718 encodings of headers, blocks, transactions and receipts, geth-style EVM traces of blocks, transactions and simulated calls, execution witnesses, and a few chain-state helpers. It is off by default: a node serves it only when debug is named in --http.api or --ws.api, and all never includes it. The cost to serve it is high, because the tracing and witness methods re-execute historical blocks against archive state, and one request can take seconds of CPU time and return a large response. The struct logger records every executed opcode, and every built-in tracer but 4byteTracer and noopTracer records each call with its input and output; a trace that holds more than 160 MiB of steps, calls and struct logs fails with error -32603 trace too large. Serve it only from a private archive or indexer node behind authentication or a method allowlist, never from a validator or a public RPC endpoint; see Enabling Namespaces.

debug_traceBlock, debug_traceBlockByHash, debug_traceBlockByNumber, debug_traceTransaction, debug_traceCall and debug_traceCallMany each hold a permit from the tracing pool of the worker RPC endpoint that serves them until their trace finishes, even if the request times out or the client disconnects first. So do debug_executionWitness and debug_executionWitnessByBlockHash, until their re-execution finishes. The pool size is --rpc.max-tracing-requests on each worker’s endpoint, so a node with several workers serves that many per worker, and the same pool serves trace_*; a request that finds no free permit waits for one.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Example values are illustrative; field names and types match what the node returns.

MethodDescription
debug_chainConfigThe chain configuration from the node’s genesis
debug_codeByHashContract bytecode for a code hash
debug_dbGetContract bytecode for a 0x63-prefixed code-hash database key
debug_executionWitnessExecution witness of a block, by number or tag
debug_executionWitnessByBlockHashExecution witness of a block, by hash
debug_getBadBlocksAlways [] on Telcoin Network
debug_getRawBlockRLP-encoded block
debug_getRawHeaderRLP-encoded block header
debug_getRawReceiptsEIP-2718 encoded receipts of a block
debug_getRawTransactionEIP-2718 encoded transaction, by hash
debug_getRawTransactionsEIP-2718 encoded transactions of a block
debug_stateRootWithUpdatesState root and trie updates for a hashed state applied on top of a block
debug_traceBlockTrace every transaction of an RLP-encoded block
debug_traceBlockByHashTrace every transaction of a block, by hash
debug_traceBlockByNumberTrace every transaction of a block, by number or tag
debug_traceCallTrace a call simulated on a block’s state
debug_traceCallManyTrace bundles of calls simulated on a block’s state
debug_traceTransactionTrace one transaction

Not supported

The node registers more debug_* method names than the ones above, and none of the others does useful work on Telcoin Network. debug_getBadBlocks is served but always returns [], because the execution engine never reports a bad block (tracked in #1590).

Methods that return an error

MethodResponse
debug_getBlockAccessListError -32603 unimplemented
debug_traceChainError -32603 unimplemented

Methods registered as no-ops

These 41 methods accept their parameters and return success without doing anything. Each returns null, except debug_seedHash, which returns the zero hash 0x0000000000000000000000000000000000000000000000000000000000000000. A success response does not mean the action happened. debug_setHead in particular returns null and leaves the chain head where it was, so a script that calls it to rewind the node reports success while the node keeps its chain.

MethodWhat geth does with it
debug_accountRangePages through the accounts at a block
debug_backtraceAtSets a logging backtrace location
debug_blockProfileWrites a block profile to disk
debug_chaindbCompactCompacts the key-value database
debug_chaindbPropertyReturns a property of the key-value database
debug_cpuProfileWrites a CPU profile to disk
debug_dbAncientReads a blob from the ancient store
debug_dbAncientsCounts the items in the ancient store
debug_dumpBlockDumps the accounts at a block
debug_freeOSMemoryForces garbage collection
debug_freezeClientFreezes the client temporarily
debug_gcStatsReturns garbage-collection statistics
debug_getAccessibleStateFinds the first block with state on disk
debug_getModifiedAccountsByHashLists the accounts changed between two blocks, by hash
debug_getModifiedAccountsByNumberLists the accounts changed between two blocks, by number
debug_goTraceWrites a Go runtime trace to disk
debug_intermediateRootsReturns the state root after each transaction of a block
debug_memStatsReturns runtime memory statistics
debug_mutexProfileWrites a mutex profile to disk
debug_preimageReturns the preimage of a Keccak-256 hash
debug_printBlockPretty-prints a block
debug_seedHashReturns the Ethash seed hash of a block (here always the zero hash)
debug_setBlockProfileRateSets the block profiling rate
debug_setGCPercentSets the garbage-collection target percentage
debug_setHeadRewinds the local chain head to a block number
debug_setMutexProfileFractionSets the mutex profiling rate
debug_setTrieFlushIntervalSets how often in-memory state tries are flushed to disk
debug_stacksPrints the stacks of all goroutines
debug_standardTraceBadBlockToFileWrites a trace of a bad block to a file
debug_standardTraceBlockToFileWrites a trace of a block to a file
debug_startCPUProfileStarts CPU profiling to a file
debug_startGoTraceStarts a Go runtime trace to a file
debug_stopCPUProfileStops CPU profiling
debug_stopGoTraceStops the Go runtime trace
debug_storageRangeAtPages through a contract’s storage at a transaction
debug_traceBadBlockTraces a block from the bad-block list
debug_verbositySets the log level
debug_vmoduleSets a per-module log pattern
debug_writeBlockProfileWrites a goroutine blocking profile to a file
debug_writeMemProfileWrites an allocation profile to a file
debug_writeMutexProfileWrites a mutex profile to a file

Not registered

MethodResponse
debug_executePayloadError -32601 “Method not found”: reth declares it in a separate API that the node never registers

Tracked in #1591.

debug_chainConfig

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns the chain configuration from the node’s genesis: the chain id and the block numbers and timestamps at which each Ethereum fork activates.

Parameters

None

Returns

Object - The config section of the genesis. Every number is a JSON number, not a hex string, and a fork the genesis does not configure is omitted:

  • chainId: Number - The chain id.
  • homesteadBlock, eip150Block, eip155Block, eip158Block, byzantiumBlock, constantinopleBlock, petersburgBlock, istanbulBlock, berlinBlock, londonBlock: Number - The block at which each block-numbered fork activates.
  • shanghaiTime, cancunTime, pragueTime: Number - The timestamp at which each time-based fork activates.
  • daoForkSupport: Boolean - Always present; false on Telcoin Network.
  • terminalTotalDifficulty: Number - The terminal total difficulty, when configured.
  • terminalTotalDifficultyPassed: Boolean - Always present.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_chainConfig","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "chainId": 2017,
    "homesteadBlock": 0,
    "daoForkSupport": false,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "berlinBlock": 0,
    "londonBlock": 0,
    "shanghaiTime": 0,
    "cancunTime": 0,
    "pragueTime": 0,
    "terminalTotalDifficulty": 0,
    "terminalTotalDifficultyPassed": true
  }
}

source

debug_codeByHash

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns the contract bytecode whose Keccak-256 hash is the given code hash, the value eth_getProof reports as an account’s codeHash.

Parameters

DATA, 32 Bytes - The code hash.

block parameter: QUANTITY|TAG|DATA - (optional) Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter. Defaults to latest.

Returns

DATA - The bytecode, or null when the node has no code with that hash.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_codeByHash","params":["0xfe74fcea823036dfc874205a4198185eedae92b256d956cbf805c6c0dc2fd184","latest"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x60806040525f80546001600160a01b03169035632cf35bc960e11b01602657805f5260205ff35b365f80375f80365f845af490503d5f803e80603f573d5ffd5b503d5ff3fea164736f6c634300081a000a"
}

source

debug_dbGet

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Only contract-code keys are supported: the key must be 0x63 followed by the 32-byte code hash; any other key returns an invalid-params error.

The method mirrors geth’s raw database lookup for the one key type above. It reads the latest state and returns what debug_codeByHash returns for the same code hash.

Parameters

String - The key: 0x63 followed by the 32-byte code hash, 66 hex digits after 0x in all. A key without the 0x prefix is read as raw bytes, not as hex. A key that is not valid hex fails with error -32602 Invalid hex key, a key of the wrong length with -32602 Key must be 33 bytes, got <length>, and a key with another first byte with -32602 Key prefix must be 0x63.

Returns

DATA - The bytecode, or null when the node has no code with that hash.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_dbGet","params":["0x63fe74fcea823036dfc874205a4198185eedae92b256d956cbf805c6c0dc2fd184"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x60806040525f80546001600160a01b03169035632cf35bc960e11b01602657805f5260205ff35b365f80375f80365f845af490503d5f803e80603f573d5ffd5b503d5ff3fea164736f6c634300081a000a"
}

source

debug_executionWitness

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Witness of an epoch-closing block

On a block that closes an epoch, the witness comes from a re-execution that runs the epoch-closing applyIncentives call with the node’s current rewards counter rather than the counts the block distributed, so the witness for such a block can differ from the block’s real execution. Other blocks are unaffected. Tracked in #1589.

Re-executes a block from its parent’s state, system calls included, and returns what a stateless client needs to run the block again: the trie nodes, contract code, account and slot keys, and headers the execution and the state-root computation read. debug_executionWitnessByBlockHash does the same for a block hash.

Parameters

block parameter: QUANTITY|TAG [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized. See the default block parameter. A block the node does not have fails with error -32001 and a message such as block not found: 0x5.

Returns

Object - The execution witness:

  • state: Array - DATA elements: the RLP-encoded account-trie and storage-trie nodes the execution and the state-root computation read.
  • codes: Array - DATA elements: the bytecode of every contract the execution loaded or created.
  • keys: Array - DATA elements: the unhashed keys behind the trie paths, 20-byte addresses for accounts and 32-byte slots for storage.
  • headers: Array - DATA elements: RLP-encoded headers from the oldest block the execution read with BLOCKHASH up to the parent block. When the block never runs BLOCKHASH, this is the parent header alone.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_executionWitness","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "state": [
      "0x..." // RLP-encoded trie nodes, abbreviated
    ],
    "codes": [
      "0x..." // contract bytecode, abbreviated
    ],
    "keys": [
      "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
      "0x0000000000000000000000000000000000000000"
      // and the other accounts and storage slots the block touched
    ],
    "headers": [
      "0xf9025ba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a097d6d56ffab6b8f3167576431dcf70eabc1f0605385d7249e581911908b89fb9a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080808401c9c38080846ac5cdc480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00000000000000000000000000000000000000000000000000000000000000000a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // header of block 0x0, the parent
    ]
  }
}

source

debug_executionWitnessByBlockHash

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Witness of an epoch-closing block

On a block that closes an epoch, the witness comes from a re-execution that runs the epoch-closing applyIncentives call with the node’s current rewards counter rather than the counts the block distributed, so the witness for such a block can differ from the block’s real execution. Other blocks are unaffected. Tracked in #1589.

Re-executes a block from its parent’s state, system calls included, and returns what a stateless client needs to run the block again: the trie nodes, contract code, account and slot keys, and headers the execution and the state-root computation read. debug_executionWitness does the same for a block number or tag.

Parameters

DATA, 32 Bytes - The block hash. A block the node does not have fails with error -32001 and the message block not found: hash 0x….

Returns

Object - The execution witness:

  • state: Array - DATA elements: the RLP-encoded account-trie and storage-trie nodes the execution and the state-root computation read.
  • codes: Array - DATA elements: the bytecode of every contract the execution loaded or created.
  • keys: Array - DATA elements: the unhashed keys behind the trie paths, 20-byte addresses for accounts and 32-byte slots for storage.
  • headers: Array - DATA elements: RLP-encoded headers from the oldest block the execution read with BLOCKHASH up to the parent block. When the block never runs BLOCKHASH, this is the parent header alone.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_executionWitnessByBlockHash","params":["0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "state": [
      "0x..." // RLP-encoded trie nodes, abbreviated
    ],
    "codes": [
      "0x..." // contract bytecode, abbreviated
    ],
    "keys": [
      "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
      "0x0000000000000000000000000000000000000000"
      // and the other accounts and storage slots the block touched
    ],
    "headers": [
      "0xf9025ba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a097d6d56ffab6b8f3167576431dcf70eabc1f0605385d7249e581911908b89fb9a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080808401c9c38080846ac5cdc480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00000000000000000000000000000000000000000000000000000000000000000a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // header of block 0x0, the parent
    ]
  }
}

source

debug_getBadBlocks

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Always empty on Telcoin Network

Always returns an empty array on Telcoin Network: reth fills this list from engine events that report invalid blocks, and the Telcoin Network execution engine does not emit those events. Tracked in #1590.

Parameters

None

Returns

Array - The recent bad blocks the node has seen, newest first. On Telcoin Network this is always []. In reth each entry is an object with block (the block as eth_getBlockByHash returns it with full transactions), hash and rlp.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_getBadBlocks","params":[],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": []
}

source

debug_getRawBlock

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns a whole block as RLP-encoded bytes.

Parameters

block parameter: QUANTITY|TAG|DATA [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter.

Returns

DATA - The RLP-encoded block: the header, the transactions, the (empty) ommers list and the (empty) withdrawals list. A block the node does not have fails with error -32001 and a message such as block not found: 0x5 or block not found: hash 0x….

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_getRawBlock","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xf902cdf9025da05f4827e84833a6da2a79b60373cdb82b5142ef13b1f56ac4790f2c6cfe3112cda04ef7ab685b6104388fca116acbe551cfa24018eb490cfcb7d0a26146a09ae25f94342b9c7c28d3f8680675ab13cf5f215897ae9f95a010620e8dae725248ad5102bde4780354184a4c99b67d31cc857879b93b56c12aa00a7b8d761adb0cfb421ea88e77c2e06ac53a9e9923353ca9b92f6fa92ee033f1a0f78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080018401c9c380825208846ac5cdc480a01fdc430e2e6fef312e3e6a5a122420cd8b5b825bd853869f9d3d9793721140a088000000000000000107a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a047b526d2ce612759ecbd3a2152384a7bf714b83b377323d1b931678148ef4584a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855f869b86702f8648207e18080078252089400000000000000000000000000000000000000006480c080a094e74c15812b53176f8000333c19c62852cf6f4e465adc9ce79f467f13a35736a005b01594de729950fc2153a8768ee98c0c2eb20b6e8c501903ca540083890429c0c0"
}

source

debug_getRawHeader

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns a block header as RLP-encoded bytes.

Parameters

block parameter: QUANTITY|TAG|DATA [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter. When the node has no pending block, the pending tag fails with error -32603 Pending block not supported.

Returns

DATA - The RLP-encoded header. For a block the node does not have, the result is 0x (empty bytes), not an error.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_getRawHeader","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xf9025da05f4827e84833a6da2a79b60373cdb82b5142ef13b1f56ac4790f2c6cfe3112cda04ef7ab685b6104388fca116acbe551cfa24018eb490cfcb7d0a26146a09ae25f94342b9c7c28d3f8680675ab13cf5f215897ae9f95a010620e8dae725248ad5102bde4780354184a4c99b67d31cc857879b93b56c12aa00a7b8d761adb0cfb421ea88e77c2e06ac53a9e9923353ca9b92f6fa92ee033f1a0f78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080018401c9c380825208846ac5cdc480a01fdc430e2e6fef312e3e6a5a122420cd8b5b825bd853869f9d3d9793721140a088000000000000000107a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a047b526d2ce612759ecbd3a2152384a7bf714b83b377323d1b931678148ef4584a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}

source

debug_getRawReceipts

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns the receipts of a block in their EIP-2718 binary encoding, in transaction order.

Parameters

block parameter: QUANTITY|TAG|DATA [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter.

Returns

Array - One DATA element per receipt: the transaction type byte (none for a legacy transaction) followed by the RLP list of status, cumulative gas used, logs bloom and logs. A block without transactions, or a block the node does not have, returns [].

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_getRawReceipts","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    "0x02f9010801825208b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0" // type 0x02, status 1, cumulative gas 0x5208, empty bloom, no logs
  ]
}

source

debug_getRawTransaction

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns a transaction in its EIP-2718 binary encoding: the type byte followed by the RLP payload, or the bare RLP for a legacy transaction.

Parameters

DATA, 32 Bytes - The transaction hash.

Returns

DATA - The EIP-2718 encoded transaction, or null when the node does not know the transaction.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_getRawTransaction","params":["0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x02f8648207e18080078252089400000000000000000000000000000000000000006480c080a094e74c15812b53176f8000333c19c62852cf6f4e465adc9ce79f467f13a35736a005b01594de729950fc2153a8768ee98c0c2eb20b6e8c501903ca540083890429" // EIP-1559 transfer of 100 wei
}

source

debug_getRawTransactions

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Returns every transaction of a block in its EIP-2718 binary encoding, in block order.

Parameters

block parameter: QUANTITY|TAG|DATA [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter.

Returns

Array - One DATA element per transaction, each encoded as debug_getRawTransaction returns it. A block without transactions, or a block the node does not have, returns [].

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_getRawTransactions","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    "0x02f8648207e18080078252089400000000000000000000000000000000000000006480c080a094e74c15812b53176f8000333c19c62852cf6f4e465adc9ce79f467f13a35736a005b01594de729950fc2153a8768ee98c0c2eb20b6e8c501903ca540083890429"
  ]
}

source

debug_stateRootWithUpdates

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Applies a set of account and storage changes, keyed by hashed address and hashed slot, on top of a block’s state and returns the resulting state root together with the trie updates that root computation produced. Nothing is written to the node’s database.

Parameters

Object - The hashed post state. Both fields are required; pass {} for an empty map:

  • accounts: Object - Keyed by the Keccak-256 hash of an address. Each value is null for a destroyed account, or an object with nonce (Number, a decimal JSON number), balance (QUANTITY) and bytecode_hash (DATA, 32 Bytes, or null for an account without code).
  • storages: Object - Keyed by the Keccak-256 hash of an address. Each value is an object with wiped (Boolean, whether the account’s existing storage is cleared first) and storage (an object keyed by the Keccak-256 hash of a slot, with QUANTITY values).

block parameter: QUANTITY|TAG|DATA - (optional) Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter. Defaults to latest.

Returns

Array - Two elements:

  1. DATA, 32 Bytes - The state root after the changes. With an empty hashed state it is the block’s own state root.
  2. Object - The trie updates, with snake_case field names:
    • account_nodes: Object - Updated account-trie branch nodes, keyed by the node’s packed nibble path as hex without 0x. Each node has state_mask, tree_mask and hash_mask (numbers), hashes (an array of 32-byte hashes) and root_hash (a 32-byte hash or null).
    • removed_nodes: Array - Removed account-trie node paths, as hex strings without 0x.
    • storage_tries: Object - Keyed by hashed address. Each value has is_deleted (Boolean), storage_nodes and removed_nodes, in the same forms as the account-trie fields.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_stateRootWithUpdates","params":[{"accounts":{},"storages":{}},"latest"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    "0x10620e8dae725248ad5102bde4780354184a4c99b67d31cc857879b93b56c12a", // state root of the latest block
    {
      "account_nodes": {},
      "removed_nodes": [],
      "storage_tries": {}
    }
  ]
}

source

debug_traceBlock

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Decodes an RLP-encoded block, re-executes every transaction in it, and returns one trace per transaction. The block itself does not need to be in the node’s database, but its parent does: the node starts from the parent’s state, applies the block’s pre-transaction system calls, and then traces the transactions in order. A block whose parent the node does not have fails with error -32001 block not found: hash <parent hash>.

The raw block is bounded like a debug_traceCallMany request, since its header and transactions come from the caller: it may hold at most --rpc.gascap divided by 21,000 transactions (2,380 at the default cap of 50,000,000), and together they may use at most --rpc.gascap gas. A block with more transactions, or a transaction whose gas limit exceeds what is left of that budget, fails with error -32602. Blocks the node already has are traced without these bounds through debug_traceBlockByHash or debug_traceBlockByNumber.

Tracing the genesis block (0x0) fails with error -32001 block not found: hash 0x0000000000000000000000000000000000000000000000000000000000000000: the tracer looks up the genesis block’s parent, whose hash is zero. trace_block returns [] for genesis instead.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA - The RLP-encoded block, as debug_getRawBlock returns it. Bytes that do not decode as a block fail with error -32603.

Object - (optional) The tracing options, as for debug_traceTransaction: tracer, tracerConfig, and the struct logger fields enableMemory, disableStack, disableStorage and enableReturnData. When omitted, the struct logger runs with its defaults.

Returns

Array - One object per transaction, in block order:

  • result: Object - The tracer’s output for the transaction, in the shape debug_traceTransaction describes.
  • txHash: DATA, 32 Bytes - The transaction hash.

A block without transactions returns []. If any transaction fails to trace, the whole request fails with an error.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0xf902cdf9025da05f4827e84833a6da2a79b60373cdb82b5142ef13b1f56ac4790f2c6cfe3112cda04ef7ab685b6104388fca116acbe551cfa24018eb490cfcb7d0a26146a09ae25f94342b9c7c28d3f8680675ab13cf5f215897ae9f95a010620e8dae725248ad5102bde4780354184a4c99b67d31cc857879b93b56c12aa00a7b8d761adb0cfb421ea88e77c2e06ac53a9e9923353ca9b92f6fa92ee033f1a0f78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080018401c9c380825208846ac5cdc480a01fdc430e2e6fef312e3e6a5a122420cd8b5b825bd853869f9d3d9793721140a088000000000000000107a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a047b526d2ce612759ecbd3a2152384a7bf714b83b377323d1b931678148ef4584a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855f869b86702f8648207e18080078252089400000000000000000000000000000000000000006480c080a094e74c15812b53176f8000333c19c62852cf6f4e465adc9ce79f467f13a35736a005b01594de729950fc2153a8768ee98c0c2eb20b6e8c501903ca540083890429c0c0",{"tracer":"callTracer"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "gas": "0x5208",
        "gasUsed": "0x5208",
        "to": "0x0000000000000000000000000000000000000000",
        "input": "0x",
        "value": "0x64",
        "type": "CALL"
      },
      "txHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"
    }
  ]
}

source

debug_traceBlockByHash

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Re-executes every transaction of a block the node holds, identified by hash, and returns one trace per transaction. It behaves as debug_traceBlockByNumber does.

Tracing the genesis block (0x0) fails with error -32000 genesis is not traceable: tracing replays a block on its parent’s state, and genesis has no parent. trace_block returns [] for genesis instead.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA, 32 Bytes - The block hash. A block the node does not have fails with error -32000 and the message block 0x… not found.

Object - (optional) The tracing options, as for debug_traceTransaction: tracer, tracerConfig, and the struct logger fields enableMemory, disableStack, disableStorage and enableReturnData. When omitted, the struct logger runs with its defaults.

Returns

Array - One object per transaction, in block order:

  • result: Object - The tracer’s output for the transaction, in the shape debug_traceTransaction describes.
  • txHash: DATA, 32 Bytes - The transaction hash.

A block without transactions returns []. If any transaction fails to trace, the whole request fails with an error.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f",{"tracer":"callTracer"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "gas": "0x5208",
        "gasUsed": "0x5208",
        "to": "0x0000000000000000000000000000000000000000",
        "input": "0x",
        "value": "0x64",
        "type": "CALL"
      },
      "txHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"
    }
  ]
}

source

debug_traceBlockByNumber

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Re-executes every transaction of a block the node holds and returns one trace per transaction. The node starts from the parent block’s state, applies the block’s pre-transaction system calls, and then traces the transactions in order, each on the state the previous one left.

Tracing the genesis block (0x0) fails with error -32000 genesis is not traceable: tracing replays a block on its parent’s state, and genesis has no parent. trace_block returns [] for genesis instead.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

block parameter: QUANTITY|TAG [Required] - Hexadecimal block number, or one of the string tags latest, earliest, safe, or finalized. See the default block parameter. A block the node does not have fails with error -32000 and a message such as block 0x5 not found.

Object - (optional) The tracing options, as for debug_traceTransaction: tracer, tracerConfig, and the struct logger fields enableMemory, disableStack, disableStorage and enableReturnData. When omitted, the struct logger runs with its defaults.

Returns

Array - One object per transaction, in block order:

  • result: Object - The tracer’s output for the transaction, in the shape debug_traceTransaction describes.
  • txHash: DATA, 32 Bytes - The transaction hash.

A block without transactions returns []. If any transaction fails to trace, the whole request fails with an error.

With the struct logger, each result is a struct log object; for the example block it is {"failed":false,"gas":21000,"returnValue":"0x","structLogs":[]}.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["0x1",{"tracer":"callTracer"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "gas": "0x5208",
        "gasUsed": "0x5208",
        "to": "0x0000000000000000000000000000000000000000",
        "input": "0x",
        "value": "0x64",
        "type": "CALL"
      },
      "txHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"
    }
  ]
}

source

debug_traceCall

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Fee fields at latest and pending

At latest and pending this method prices the call against the block header’s base fee, not the worker’s current epoch base fee that eth_call and eth_estimateGas use. A request that sets gasPrice, maxFeePerGas or maxPriorityFeePerGas can therefore be accepted by eth_call and rejected here, or the reverse; requests without fee fields are unaffected. Tracked in #1587.

Runs a call as eth_call does, without creating a transaction, and returns the trace the chosen tracer builds. Without txIndex the call runs on the state after the given block. With txIndex the node starts from the block’s parent state, applies the block’s pre-transaction system calls, replays the block’s transactions before that index, and runs the call on top.

Parameters

Object - The transaction call object:

  • from: DATA, 20 bytes - (optional) The address the call is sent from.
  • to: DATA, 20 bytes - The address the call is directed to.
  • gas: QUANTITY - (optional) Hexadecimal value of the gas provided for the call.
  • gasPrice: QUANTITY - (optional) Hexadecimal value of the gasPrice used for each paid gas.
  • maxPriorityFeePerGas: QUANTITY - (optional) Hexadecimal maximum fee, in Wei, the sender is willing to pay per gas above the base fee.
  • maxFeePerGas: QUANTITY - (optional) Hexadecimal maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas.
  • value: QUANTITY - (optional) Hexadecimal of the value sent with the call.
  • data: DATA - (optional) Hash of the method signature and encoded parameters. See Ethereum contract ABI specification.

block parameter: QUANTITY|TAG|DATA - (optional) Hexadecimal block number, or one of the string tags latest, pending, earliest, safe, or finalized; a 32-byte block hash is also accepted. See the default block parameter. Defaults to latest.

Object - (optional) The tracing options: the fields debug_traceTransaction takes (tracer, tracerConfig, enableMemory, disableStack, disableStorage, enableReturnData), plus:

  • stateOverrides: Object - (optional) Account overrides applied before the call, keyed by address, each with any of balance, nonce, code, and state or stateDiff.
  • blockOverrides: Object - (optional) Block environment overrides, such as number, time, gasLimit, coinbase and baseFee.
  • txIndex: QUANTITY - (optional) Run the call on the state just before the block’s transaction at this index. An index at or past the block’s transaction count fails with error -32602 tx_index <index> out of bounds for block with <count> transactions.

Returns

Object - The tracer’s output for the call, in the shapes debug_traceTransaction describes.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{
  "from":"0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
  "to":"0x0000000000000000000000000000000000000000",
  "gas":"0x5208",
  "value":"0x64"},
  "latest",
  {"tracer":"callTracer"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
    "gas": "0x5208",
    "gasUsed": "0x5208",
    "to": "0x0000000000000000000000000000000000000000",
    "input": "0x",
    "value": "0x64",
    "type": "CALL"
  }
}

source

debug_traceCallMany

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Fee fields at latest and pending

At latest and pending this method prices the call against the block header’s base fee, not the worker’s current epoch base fee that eth_call and eth_estimateGas use. A request that sets gasPrice, maxFeePerGas or maxPriorityFeePerGas can therefore be accepted by eth_call and rejected here, or the reverse; requests without fee fields are unaffected. Tracked in #1587.

Runs bundles of calls in sequence on one block’s state, without creating transactions, and returns a trace for every call. Each call sees the state changes of the calls before it, across bundles. Each bundle after the first runs with the block number one higher and the timestamp 12 seconds later than the bundle before it.

When all of the block’s transactions are replayed (the default), the bundles run on the state after the block. With a smaller transactionIndex the node starts from the block’s parent state, runs the block’s pre-transaction system calls (EIP-4788 beacon root, EIP-2935 block hashes), and replays that many of the block’s transactions first.

The request shares a gas budget of --rpc.gascap across all its calls. A request with more calls than the budget can hold at 21,000 gas each is refused before any runs, and the request fails once the gas its calls used exceeds the budget.

Parameters

Array - The bundles, run in order. Each bundle is an object:

  • transactions: Array - Transaction call objects, with the fields debug_traceCall takes.
  • blockOverride: Object - (optional) Block environment overrides for this bundle’s calls, such as number, time, gasLimit, coinbase and baseFee.

Object - (optional) The state context:

  • blockNumber: QUANTITY|TAG|DATA - (optional) The block to run on: a hexadecimal block number, a string tag such as latest or pending, or a 32-byte block hash. Defaults to latest. Under the default --rpc.pending-block none, pending selects the latest block.
  • transactionIndex: Number - (optional) How many of the block’s transactions to replay before the bundles, as a JSON integer. -1, the default, replays all of them.

Object - (optional) The tracing options: the fields debug_traceTransaction takes (tracer, tracerConfig, enableMemory, disableStack, disableStorage, enableReturnData), plus stateOverrides, which is applied once, before the first call. blockOverrides and txIndex are ignored here; use each bundle’s blockOverride and the state context instead.

Returns

Array - One array per bundle, each holding one trace per call in the bundle, in the shapes debug_traceTransaction describes. An empty bundle list fails with error -32602 bundles are empty.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceCallMany","params":[
  [{"transactions":[{
   "from":"0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
   "to":"0x0000000000000000000000000000000000000000",
   "gas":"0x5208",
   "value":"0x64"}]}],
  {"blockNumber":"latest","transactionIndex":-1},
  {"tracer":"callTracer"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    [
      {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "gas": "0x5208",
        "gasUsed": "0x5208",
        "to": "0x0000000000000000000000000000000000000000",
        "input": "0x",
        "value": "0x64",
        "type": "CALL"
      }
    ]
  ]
}

source

debug_traceTransaction

Note

Served only when debug is named in --http.api or --ws.api; see Enabling Namespaces.

Re-executes a mined transaction and returns the trace the chosen tracer builds. The node starts from the state before the transaction’s block, applies the block’s pre-transaction system calls, replays the transactions that precede it in the block, and then traces the transaction itself.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA, 32 Bytes - The transaction hash.

Object - (optional) The tracing options. When omitted, the struct logger runs with its defaults:

  • tracer: String - (optional) The tracer to run: callTracer, flatCallTracer, prestateTracer, 4byteTracer, muxTracer, noopTracer or erc7562Tracer, or the source code of a JavaScript tracer. Without it, the struct logger records every executed opcode, with its stack unless disableStack is set and its memory when enableMemory is set. Every built-in tracer but 4byteTracer and noopTracer also records each call with its input and output. A trace that holds more than 160 MiB of steps, calls and struct logs fails with error -32603 trace too large. The limit counts what the trace holds, not its response, and raising --rpc.max-response-size does not raise it. For the call input and output that callTracer and flatCallTracer return in hex, the response limit (--rpc.max-response-size, 160 MB by default) would have refused a trace that large anyway. The struct logger holds more per step than it returns (about 200 bytes against 60 to 100 for a step with a small stack), and counts each step’s memory and storage copies, so it can fail on a trace whose response would be a third of the response limit; it and prestateTracer, which return no call input or output, also fail on a transaction whose calls copy more than 160 MiB of input or output. Set disableStack, or use callTracer, for transactions that run many opcodes. JavaScript tracers need a node built with the js-tracer feature, which is off by default; other nodes answer error -32603 JS Tracer is not enabled. See JavaScript tracers.
  • tracerConfig: Object - (optional) Settings for the chosen tracer, for example {"onlyTopCall":true} or {"withLog":true} for callTracer, or {"diffMode":true} for prestateTracer.
  • enableMemory: Boolean - (optional) Struct logger only: record memory at each step. Defaults to false.
  • disableStack: Boolean - (optional) Struct logger only: leave out the stack at each step. Defaults to false.
  • disableStorage: Boolean - (optional) Struct logger only: leave out the storage slots each SLOAD and SSTORE touches. Defaults to false.
  • enableReturnData: Boolean - (optional) Struct logger only: record the last call’s return data at each step. Defaults to false.

Returns

Object - The tracer’s output. Two common shapes:

The struct logger (no tracer) returns:

  • failed: Boolean - Whether the transaction failed.
  • gas: Number - Gas used, as a decimal JSON number.
  • returnValue: DATA - The transaction’s return data.
  • structLogs: Array - One object per executed opcode with pc, op, gas, gasCost and depth (decimal numbers except op), plus stack, memory, storage and returnData when the options above enable them. A plain value transfer runs no code, so for the example transaction the struct logger returns {"failed":false,"gas":21000,"returnValue":"0x","structLogs":[]}.

callTracer returns the top-level call frame:

  • from: DATA, 20 Bytes - The caller.
  • gas: QUANTITY - Gas available to the call.
  • gasUsed: QUANTITY - Gas used by the call, including intrinsic gas for the top-level frame.
  • to: DATA, 20 Bytes - The callee, or the new contract for CREATE and CREATE2; omitted when there is none.
  • input: DATA - The call data.
  • output: DATA - The return data; omitted when there is none.
  • error: String - The error, if the call failed; omitted otherwise.
  • revertReason: String - The decoded revert reason, if the call reverted; omitted otherwise.
  • calls: Array - Child call frames of the same shape; omitted when there are none.
  • logs: Array - Logs emitted by the call, with tracerConfig {"withLog":true}; omitted when there are none.
  • value: QUANTITY - The value transferred.
  • type: String - The call type, such as CALL, STATICCALL, DELEGATECALL, CREATE or CREATE2.

A hash the node does not know fails with error -32000 transaction not found (the code geth uses; other eth lookups keep -32001).

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",{"tracer":"callTracer"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
    "gas": "0x5208",
    "gasUsed": "0x5208",
    "to": "0x0000000000000000000000000000000000000000",
    "input": "0x",
    "value": "0x64",
    "type": "CALL"
  }
}

source

trace

The trace namespace serves Parity-style traces, the format of the Parity client (later OpenEthereum) that Erigon and reth also serve. A trace is a flat list of the call frames a transaction ran, each with its position in the call tree, its input and value, and its gas and output. The namespace also replays transactions with a VM instruction trace or a state diff, simulates calls and signed transactions without sending them, and searches a block range for traces by sender and receiver with trace_filter.

trace is off by default: a node serves it only when trace is named in --http.api or --ws.api, and all does not include it. The cost to serve it is high. Every method executes transactions in the EVM, and most of them re-execute historical blocks against archive state: trace_block, trace_replayBlockTransactions and trace_blockOpcodeGas replay a whole block, and trace_filter replays every block in its range. Serve it only from a private archive or indexer node, behind authentication or a method allowlist, and not from validators or public RPC nodes. See Enabling Namespaces for the flags.

Every trace_* request holds a permit from the tracing permit pool of the worker RPC endpoint that serves it until its trace finishes, even if the client disconnects first, and waits for one when none is free. The pool’s size is --rpc.max-tracing-requests on each worker’s endpoint, and the pool is shared by the debug_trace*, debug_executionWitness* and trace_* methods. trace_filter holds two permits and replays two blocks at a time. --rpc.max-trace-filter-blocks (default 100) caps how far apart a trace_filter request’s fromBlock and toBlock may be.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Telcoin Network has no block or uncle rewards, so these traces never include reward entries.

trace_call, trace_callMany, trace_rawTransaction, trace_replayTransaction and trace_replayBlockTransactions take a list of trace types and return each type requested: trace (the call frames), vmTrace (every executed instruction with its gas cost, stack pushes, and memory and storage writes) and stateDiff (the balance, nonce, code and storage changes of every account the transaction touched). A type that was not requested comes back as [] (trace) or null (vmTrace, stateDiff). Every method that returns call frames, a vmTrace or a stateDiff records each call with its input and output, and a vmTrace records every instruction too; a trace that records more than 160 MiB of calls and instructions fails with error -32603 trace too large. The limit counts what the trace holds, not its response, and raising --rpc.max-response-size does not raise it. The response limit (--rpc.max-response-size, 160 MB by default) would have refused a trace that large anyway, since it returns call input and output in hex. A vmTrace holds more than it returns (each instruction’s record, and a copy of the whole memory after each memory write), so it can fail on a trace whose response would fit; a request for stateDiff alone returns no call input or output, so it also fails on a transaction whose calls copy more than 160 MiB of input or output.

These traces describe the same execution as debug_traceTransaction with the callTracer, in a different shape. The callTracer returns one nested call frame per transaction with an upper-case type such as CALL. A Parity-style trace is a flat array in which each frame carries a traceAddress (its path in the call tree), a subtraces count, a lower-case type and callType, and the block and transaction it belongs to; blockNumber and transactionPosition are JSON numbers, not hex strings. The two also count gas differently: the callTracer includes the transaction’s intrinsic gas and Parity-style traces do not. For a plain transfer with a 21,000 gas limit, the callTracer reports gas and gasUsed 0x5208, while trace_transaction reports action.gas 0x0 and result.gasUsed 0x0.

Example values are illustrative; field names and types match what the node returns.

MethodDescription
trace_blockThe traces of every transaction in a block
trace_blockOpcodeGasHow often each opcode ran, and the gas it used, in every transaction of a block
trace_callExecutes a call without creating a transaction and returns the requested traces
trace_callManyExecutes a sequence of calls, each on the state the previous ones left, and returns their traces
trace_filterThe traces in a block range whose sender or receiver matches the filter
trace_getOne trace of a transaction, selected by its index
trace_rawTransactionExecutes a signed raw transaction without sending it and returns the requested traces
trace_replayBlockTransactionsReplays every transaction in a block and returns the requested traces
trace_replayTransactionReplays a transaction and returns the requested traces
trace_transactionAll traces of a transaction
trace_transactionOpcodeGasHow often each opcode ran, and the gas it used, in a transaction

trace_block

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Returns the Parity-style traces of every transaction in a block, in block order, by re-executing the block. Each transaction contributes its call frames in the order trace_transaction lists them.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Telcoin Network has no block or uncle rewards, so these traces never include reward entries.

Parameters

QUANTITY|TAG|DATA - Hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, safe or finalized. See the default block parameter.

Returns

Array - The traces of the block’s transactions, or null when the node does not know the block. A block without transactions, including the genesis block (0x0), returns []. Each trace is an object:

  • action: Object - What the frame did. For a call: from (DATA, 20 bytes, the caller), callType (call, callcode, delegatecall or staticcall), gas (QUANTITY, the gas available to the frame), input (DATA), to (DATA, 20 bytes) and value (QUANTITY, in wei). For a create: from, gas, init (DATA, the init code), value and creationMethod (create or create2). For a suicide (a SELFDESTRUCT): address, balance and refundAddress. The top-level frame’s gas is the transaction’s gas limit minus its intrinsic gas, so it is 0x0 for a plain transfer sent with a 21,000 gas limit.
  • blockHash: DATA, 32 Bytes - Hash of the block that holds the transaction.
  • blockNumber: Number - Number of that block, as a JSON number rather than a hex string.
  • error: String - The error the frame failed with. Absent when the frame succeeded.
  • result: Object - The frame’s outcome. For a call: gasUsed (QUANTITY) and output (DATA). For a create: address (DATA, 20 bytes, the new contract), code (DATA, the deployed code) and gasUsed. null for a suicide, and can be null for a frame that failed. The top-level frame’s gasUsed leaves out the intrinsic gas, so it is 0x0 for a plain transfer.
  • subtraces: Number - How many frames this frame called directly.
  • traceAddress: Array - The frame’s path in the call tree, as JSON numbers: [] for the top-level frame, [0] for its first child, [0, 1] for that child’s second child.
  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionPosition: Number - The transaction’s index in the block, as a JSON number.
  • type: String - The kind of frame: call, create or suicide.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_block","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "callType": "call",
        "gas": "0x0",
        "input": "0x",
        "to": "0x0000000000000000000000000000000000000000",
        "value": "0x64"
      },
      "blockHash": "0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f",
      "blockNumber": 1,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
      "transactionPosition": 0,
      "type": "call"
    }
  ]
}

source

trace_blockOpcodeGas

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Replays every transaction in a block and returns, for each transaction, how many times each opcode ran and the gas those executions used. Each transaction’s entry has the shape trace_transactionOpcodeGas returns.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

QUANTITY|TAG|DATA - Hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, safe or finalized. See the default block parameter.

Returns

Object - The block’s opcode usage, or null when the node does not know the block:

  • blockHash: DATA, 32 Bytes - Hash of the block.
  • blockNumber: Number - Number of the block, as a JSON number rather than a hex string.
  • transactions: Array - One entry per transaction, in execution order:
    • transactionHash: DATA, 32 Bytes - Hash of the transaction.
    • opcodeGas: Array - One entry per opcode the transaction executed, in no particular order, each with opcode (String, the opcode name), count (Number, how many times it ran) and gasUsed (Number, the gas those executions used together).

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_blockOpcodeGas","params":["0x1"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f",
    "blockNumber": 1,
    "transactions": [
      {
        "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
        "opcodeGas": [] // a plain transfer executes no opcodes
      }
    ]
  }
}

source

trace_call

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Fee fields at latest and pending

At latest and pending this method prices the call against the block header’s base fee, not the worker’s current epoch base fee that eth_call and eth_estimateGas use. A request that sets gasPrice, maxFeePerGas or maxPriorityFeePerGas can therefore be accepted by eth_call and rejected here, or the reverse; requests without fee fields are unaffected. Tracked in #1587.

Executes a call on the state of a block without creating a transaction, and returns the trace types requested: the call frames, the executed instructions, the state changes, or any combination. Nothing is sent or stored.

Parameters

Object - The transaction call object, as for eth_call:

  • from: DATA, 20 bytes - (optional) The address the call is sent from.
  • to: DATA, 20 bytes - The address the call is directed to. Leave it out to simulate a contract creation.
  • gas: QUANTITY - (optional) The gas limit for the call. The top-level trace’s action.gas is this limit minus the call’s intrinsic gas.
  • gasPrice: QUANTITY - (optional) The price paid per unit of gas, for a legacy-style call.
  • maxFeePerGas: QUANTITY - (optional) The most, in wei, the sender pays per unit of gas, base fee and priority fee together.
  • maxPriorityFeePerGas: QUANTITY - (optional) The most, in wei, the sender pays per unit of gas above the base fee.
  • value: QUANTITY - (optional) The value sent with the call, in wei.
  • input: DATA - (optional) The call data. data is accepted as an alias.

Array - The trace types to return, any of "trace", "vmTrace" and "stateDiff".

QUANTITY|TAG|DATA - (optional) The block whose state the call runs on: a hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, safe or finalized. See the default block parameter. Defaults to latest.

Object - (optional) State overrides, keyed by account address. Each entry may set balance, nonce, code, state (replaces the account’s whole storage) or stateDiff (overrides single storage slots).

Object - (optional) Block overrides for the block the call runs in, such as number, time, gasLimit, coinbase or baseFee.

Returns

Object - The requested traces:

  • output: DATA - The return data of the top-level call; 0x for a plain transfer.
  • stateDiff: Object - With stateDiff requested, the state changes keyed by account address; otherwise null. Each account has balance, code, nonce and storage (keyed by slot). Each value is "=" when unchanged, {"+": value} when created, {"-": value} when removed, or {"*": {"from": old, "to": new}} when changed.
  • trace: Array - With trace requested, the call frames, top-level first; otherwise []. Each frame has type, action, error (only when the frame failed), result, subtraces and traceAddress, with the meanings trace_transaction gives them, and no block or transaction fields. The top-level frame’s action.gas and result.gasUsed leave out the intrinsic gas, so for a plain transfer with a 21,000 gas limit both are 0x0.
  • vmTrace: Object - With vmTrace requested, the instructions the top-level call executed; otherwise null. It has code (DATA, the code that ran) and ops, one entry per instruction with cost (Number, its gas cost), pc (Number, the program counter), ex (its effects: used, push for the stack items it pushed, mem for a memory write and store for a storage write), sub (the nested vmTrace of a CALL or CREATE, or null), and, when present, op (the opcode name) and idx.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_call","params":[{
  "from":"0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
  "to":"0x0000000000000000000000000000000000000000",
  "gas":"0x5208",
  "value":"0x64"},
  ["trace"],
  "latest"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "type": "call",
        "action": {
          "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
          "callType": "call",
          "gas": "0x0",
          "input": "0x",
          "to": "0x0000000000000000000000000000000000000000",
          "value": "0x64"
        },
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": []
      }
    ],
    "vmTrace": null
  }
}

source

trace_callMany

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Fee fields at latest and pending

At latest and pending this method prices the call against the block header’s base fee, not the worker’s current epoch base fee that eth_call and eth_estimateGas use. A request that sets gasPrice, maxFeePerGas or maxPriorityFeePerGas can therefore be accepted by eth_call and rejected here, or the reverse; requests without fee fields are unaffected. Tracked in #1587.

Executes a sequence of calls on the state of a block, each one on top of the state changes of the calls before it, and returns the trace types requested for each call. This traces dependent transactions, such as an approval followed by a transfer, without sending them. Unlike trace_call, this method takes no state or block overrides.

The request shares a gas budget of --rpc.gascap across all its calls. A request with more calls than the budget can hold at 21,000 gas each is refused before any runs, and the request fails once the gas its calls used exceeds the budget.

Parameters

Array - The calls, in execution order. Each call is a two-element array: the transaction call object, with the fields trace_call lists, and the trace types to return for that call, any of "trace", "vmTrace" and "stateDiff".

QUANTITY|TAG|DATA - (optional) The block whose state the first call runs on: a hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, pending, safe or finalized. See the default block parameter. Defaults to latest.

Returns

Array - One object per call, in the order of the calls. Each object has:

  • output: DATA - The return data of the top-level call; 0x for a plain transfer.
  • stateDiff: Object - With stateDiff requested, the state changes keyed by account address; otherwise null. Each account has balance, code, nonce and storage (keyed by slot). Each value is "=" when unchanged, {"+": value} when created, {"-": value} when removed, or {"*": {"from": old, "to": new}} when changed.
  • trace: Array - With trace requested, the call frames, top-level first; otherwise []. Each frame has type, action, error (only when the frame failed), result, subtraces and traceAddress, with the meanings trace_transaction gives them, and no block or transaction fields. The top-level frame’s action.gas and result.gasUsed leave out the intrinsic gas, so for a plain transfer with a 21,000 gas limit both are 0x0.
  • vmTrace: Object - With vmTrace requested, the instructions the top-level call executed; otherwise null. It has code (DATA, the code that ran) and ops, one entry per instruction with cost (Number, its gas cost), pc (Number, the program counter), ex (its effects: used, push for the stack items it pushed, mem for a memory write and store for a storage write), sub (the nested vmTrace of a CALL or CREATE, or null), and, when present, op (the opcode name) and idx.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_callMany","params":[[
  [{"from":"0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7","to":"0x0000000000000000000000000000000000000000","gas":"0x5208","value":"0x64"},["trace"]],
  [{"from":"0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7","to":"0x0000000000000000000000000000000000000000","gas":"0x5208","value":"0x64"},["trace"]]],
  "latest"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "type": "call",
          "action": {
            "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
            "callType": "call",
            "gas": "0x0",
            "input": "0x",
            "to": "0x0000000000000000000000000000000000000000",
            "value": "0x64"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": []
        }
      ],
      "vmTrace": null
    },
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "type": "call",
          "action": {
            "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
            "callType": "call",
            "gas": "0x0",
            "input": "0x",
            "to": "0x0000000000000000000000000000000000000000",
            "value": "0x64"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": []
        }
      ],
      "vmTrace": null
    }
  ]
}

source

trace_filter

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Returns the Parity-style traces in a block range whose sender or receiver matches the filter, much as eth_getLogs does for logs. The node keeps no index of trace addresses: it re-executes every transaction in every block of the range and applies the address filter to the traces afterwards, so a narrow address filter does not make a request cheaper. A request holds two permits from the tracing permit pool and replays two blocks at a time; it reads the range’s blocks --rpc.max-tracing-requests at a time.

toBlock minus fromBlock may be at most --rpc.max-trace-filter-blocks (default 100). A wider range fails with -32602 and the message Block range too large; currently limited to <limit> blocks, with the configured limit. Both bounds default to the latest block, so a request that sets neither traces the latest block only, and one that sets only a toBlock below the latest block has a fromBlock greater than its toBlock.

A fromBlock or toBlock past the node’s latest block fails with -32001 and a block not found message, and a fromBlock greater than toBlock fails with -32602 and the message invalid parameters: fromBlock cannot be greater than toBlock.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Telcoin Network has no block or uncle rewards, so these traces never include reward entries.

Parameters

Object - The filter object. A field not listed here fails the request with -32602.

  • fromBlock: QUANTITY - (optional) The first block to trace, as a hexadecimal block number; tags such as latest are not accepted. Defaults to the latest block.
  • toBlock: QUANTITY - (optional) The last block to trace, inclusive, as a hexadecimal block number. Defaults to the latest block.
  • fromAddress: Array - (optional) Sender addresses (DATA, 20 bytes each) to match: a call’s from, a create’s from, or the contract a suicide destroyed.
  • toAddress: Array - (optional) Receiver addresses (DATA, 20 bytes each) to match: a call’s to, the contract a create deployed, or a suicide’s refundAddress.
  • mode: String - (optional) How the two address lists combine: union (the default) or intersection. With union a trace matches when its sender is in fromAddress or its receiver is in toAddress; when only one list is given only that list is checked, and with neither list every trace matches. With intersection a trace matches only when both its sender and its receiver match, and an empty or missing list matches any address.
  • after: Number - (optional) How many matching traces to skip, as a JSON number rather than a hex string.
  • count: Number - (optional) The most matching traces to return, as a JSON number rather than a hex string.

Returns

Array - The matching traces in block order. Each trace is an object:

  • action: Object - What the frame did. For a call: from (DATA, 20 bytes, the caller), callType (call, callcode, delegatecall or staticcall), gas (QUANTITY, the gas available to the frame), input (DATA), to (DATA, 20 bytes) and value (QUANTITY, in wei). For a create: from, gas, init (DATA, the init code), value and creationMethod (create or create2). For a suicide (a SELFDESTRUCT): address, balance and refundAddress. The top-level frame’s gas is the transaction’s gas limit minus its intrinsic gas, so it is 0x0 for a plain transfer sent with a 21,000 gas limit.
  • blockHash: DATA, 32 Bytes - Hash of the block that holds the transaction.
  • blockNumber: Number - Number of that block, as a JSON number rather than a hex string.
  • error: String - The error the frame failed with. Absent when the frame succeeded.
  • result: Object - The frame’s outcome. For a call: gasUsed (QUANTITY) and output (DATA). For a create: address (DATA, 20 bytes, the new contract), code (DATA, the deployed code) and gasUsed. null for a suicide, and can be null for a frame that failed. The top-level frame’s gasUsed leaves out the intrinsic gas, so it is 0x0 for a plain transfer.
  • subtraces: Number - How many frames this frame called directly.
  • traceAddress: Array - The frame’s path in the call tree, as JSON numbers: [] for the top-level frame, [0] for its first child, [0, 1] for that child’s second child.
  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionPosition: Number - The transaction’s index in the block, as a JSON number.
  • type: String - The kind of frame: call, create or suicide.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x0","toBlock":"0x1"}],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "callType": "call",
        "gas": "0x0",
        "input": "0x",
        "to": "0x0000000000000000000000000000000000000000",
        "value": "0x64"
      },
      "blockHash": "0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f",
      "blockNumber": 1,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
      "transactionPosition": 0,
      "type": "call"
    }
  ]
}

source

trace_get

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Returns one Parity-style trace of a mined transaction, selected by its traceAddress path in the call tree: [] is the top-level call, [0] its first child, [0, 1] that child’s second child. This is the path trace_transaction reports for each frame, so a frame found there can be fetched here by its path. The node traces the whole transaction to answer, so the cost is the same as trace_transaction.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA, 32 Bytes - The transaction hash.

Array - The traceAddress path of the frame. Each element may be a hex string ("0x0"), a decimal string or a JSON number. An empty list selects the top-level frame.

Returns

Object - The frame at that path, or null when the node does not know the transaction or no frame has that path:

  • action: Object - What the frame did. For a call: from (DATA, 20 bytes, the caller), callType (call, callcode, delegatecall or staticcall), gas (QUANTITY, the gas available to the frame), input (DATA), to (DATA, 20 bytes) and value (QUANTITY, in wei). For a create: from, gas, init (DATA, the init code), value and creationMethod (create or create2). For a suicide (a SELFDESTRUCT): address, balance and refundAddress. The top-level frame’s gas is the transaction’s gas limit minus its intrinsic gas, so it is 0x0 for a plain transfer sent with a 21,000 gas limit.
  • blockHash: DATA, 32 Bytes - Hash of the block that holds the transaction.
  • blockNumber: Number - Number of that block, as a JSON number rather than a hex string.
  • error: String - The error the frame failed with. Absent when the frame succeeded.
  • result: Object - The frame’s outcome. For a call: gasUsed (QUANTITY) and output (DATA). For a create: address (DATA, 20 bytes, the new contract), code (DATA, the deployed code) and gasUsed. null for a suicide, and can be null for a frame that failed. The top-level frame’s gasUsed leaves out the intrinsic gas, so it is 0x0 for a plain transfer.
  • subtraces: Number - How many frames this frame called directly.
  • traceAddress: Array - The frame’s path in the call tree, as JSON numbers: [] for the top-level frame, [0] for its first child, [0, 1] for that child’s second child.
  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionPosition: Number - The transaction’s index in the block, as a JSON number.
  • type: String - The kind of frame: call, create or suicide.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_get","params":["0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",[]],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "action": {
      "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
      "callType": "call",
      "gas": "0x0",
      "input": "0x",
      "to": "0x0000000000000000000000000000000000000000",
      "value": "0x64"
    },
    "blockHash": "0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f",
    "blockNumber": 1,
    "result": {
      "gasUsed": "0x0",
      "output": "0x"
    },
    "subtraces": 0,
    "traceAddress": [],
    "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
    "transactionPosition": 0,
    "type": "call"
  }
}

source

trace_rawTransaction

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Warning

Fee fields at latest and pending

At latest and pending this method checks the transaction’s fee cap against the block header’s base fee, not the worker’s current epoch base fee that the transaction pool and eth_call use. A signed transaction always carries a fee cap, so a transaction the node would accept can fail here with a fee-cap error, or the reverse. Tracing against a numbered block avoids the difference. Tracked in #1587.

Executes a signed raw transaction on the state of a block and returns the trace types requested, without sending it to the transaction pool. The node recovers the sender from the signature, so the transaction must be signed; to trace an unsigned call, use trace_call.

The example traces the transfer that block 1 holds against the state at block 0x0, which is the state block 1 executed it on.

Parameters

DATA - The signed transaction, EIP-2718 encoded, as eth_sendRawTransaction takes it.

Array - The trace types to return, any of "trace", "vmTrace" and "stateDiff".

QUANTITY|TAG|DATA - (optional) The block whose state the transaction runs on: a hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, safe or finalized. See the default block parameter. Defaults to latest.

Returns

Object - The requested traces:

  • output: DATA - The return data of the top-level call; 0x for a plain transfer.
  • stateDiff: Object - With stateDiff requested, the state changes keyed by account address; otherwise null. Each account has balance, code, nonce and storage (keyed by slot). Each value is "=" when unchanged, {"+": value} when created, {"-": value} when removed, or {"*": {"from": old, "to": new}} when changed.
  • trace: Array - With trace requested, the call frames, top-level first; otherwise []. Each frame has type, action, error (only when the frame failed), result, subtraces and traceAddress, with the meanings trace_transaction gives them, and no block or transaction fields. The top-level frame’s action.gas and result.gasUsed leave out the intrinsic gas, so for a plain transfer with a 21,000 gas limit both are 0x0.
  • vmTrace: Object - With vmTrace requested, the instructions the top-level call executed; otherwise null. It has code (DATA, the code that ran) and ops, one entry per instruction with cost (Number, its gas cost), pc (Number, the program counter), ex (its effects: used, push for the stack items it pushed, mem for a memory write and store for a storage write), sub (the nested vmTrace of a CALL or CREATE, or null), and, when present, op (the opcode name) and idx.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_rawTransaction","params":["0x02f8648207e18080078252089400000000000000000000000000000000000000006480c080a094e74c15812b53176f8000333c19c62852cf6f4e465adc9ce79f467f13a35736a005b01594de729950fc2153a8768ee98c0c2eb20b6e8c501903ca540083890429",["trace"],"0x0"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "type": "call",
        "action": {
          "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
          "callType": "call",
          "gas": "0x0",
          "input": "0x",
          "to": "0x0000000000000000000000000000000000000000",
          "value": "0x64"
        },
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": []
      }
    ],
    "vmTrace": null
  }
}

source

trace_replayBlockTransactions

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Replays every transaction in a block and returns the trace types requested for each one, in block order. Each entry has the shape trace_replayTransaction returns, plus the transaction’s hash.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Telcoin Network has no block or uncle rewards, so these traces never include reward entries.

Parameters

QUANTITY|TAG|DATA - Hexadecimal block number, a 32-byte block hash, or one of the string tags latest, earliest, safe or finalized. See the default block parameter.

Array - The trace types to return, any of "trace", "vmTrace" and "stateDiff".

Returns

Array - One object per transaction. A block without transactions returns [], and a block the node does not know fails with -32001 and a block not found message. Each object has:

  • output: DATA - The return data of the top-level call; 0x for a plain transfer.
  • stateDiff: Object - With stateDiff requested, the state changes keyed by account address; otherwise null. Each account has balance, code, nonce and storage (keyed by slot). Each value is "=" when unchanged, {"+": value} when created, {"-": value} when removed, or {"*": {"from": old, "to": new}} when changed.
  • trace: Array - With trace requested, the call frames, top-level first; otherwise []. Each frame has type, action, error (only when the frame failed), result, subtraces and traceAddress, with the meanings trace_transaction gives them, and no block or transaction fields. The top-level frame’s action.gas and result.gasUsed leave out the intrinsic gas, so for a plain transfer with a 21,000 gas limit both are 0x0.
  • vmTrace: Object - With vmTrace requested, the instructions the top-level call executed; otherwise null. It has code (DATA, the code that ran) and ops, one entry per instruction with cost (Number, its gas cost), pc (Number, the program counter), ex (its effects: used, push for the stack items it pushed, mem for a memory write and store for a storage write), sub (the nested vmTrace of a CALL or CREATE, or null), and, when present, op (the opcode name) and idx.
  • transactionHash: DATA, 32 Bytes - Hash of the replayed transaction.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_replayBlockTransactions","params":["0x1",["trace"]],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "type": "call",
          "action": {
            "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
            "callType": "call",
            "gas": "0x0",
            "input": "0x",
            "to": "0x0000000000000000000000000000000000000000",
            "value": "0x64"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": []
        }
      ],
      "vmTrace": null,
      "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"
    }
  ]
}

source

trace_replayTransaction

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Replays a mined transaction and returns the trace types requested: the call frames, the executed instructions, the state changes, or any combination. The node re-executes the transaction’s block up to and including the transaction. The result is null for a transaction the node does not know, as trace_transaction answers.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA, 32 Bytes - The transaction hash.

Array - The trace types to return, any of "trace", "vmTrace" and "stateDiff".

Returns

Object|null - The requested traces, in the shape of one entry of trace_replayBlockTransactions:

  • transactionHash: DATA, 32 Bytes - The hash of the replayed transaction.
  • output: DATA - The return data of the top-level call; 0x for a plain transfer.
  • stateDiff: Object - With stateDiff requested, the state changes keyed by account address; otherwise null. Each account has balance, code, nonce and storage (keyed by slot). Each value is "=" when unchanged, {"+": value} when created, {"-": value} when removed, or {"*": {"from": old, "to": new}} when changed.
  • trace: Array - With trace requested, the call frames, top-level first; otherwise []. Each frame has type, action, error (only when the frame failed), result, subtraces and traceAddress, with the meanings trace_transaction gives them, and no block or transaction fields. The top-level frame’s action.gas and result.gasUsed leave out the intrinsic gas, so for a plain transfer with a 21,000 gas limit both are 0x0.
  • vmTrace: Object - With vmTrace requested, the instructions the top-level call executed; otherwise null. It has code (DATA, the code that ran) and ops, one entry per instruction with cost (Number, its gas cost), pc (Number, the program counter), ex (its effects: used, push for the stack items it pushed, mem for a memory write and store for a storage write), sub (the nested vmTrace of a CALL or CREATE, or null), and, when present, op (the opcode name) and idx.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_replayTransaction","params":["0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",["trace"]],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "type": "call",
        "action": {
          "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
          "callType": "call",
          "gas": "0x0",
          "input": "0x",
          "to": "0x0000000000000000000000000000000000000000",
          "value": "0x64"
        },
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": []
      }
    ],
    "vmTrace": null
  }
}

source

trace_transaction

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Returns every call frame of a mined transaction as a flat list of Parity-style traces, the top-level call first. The node re-executes the transaction’s block up to and including the transaction to build them.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA, 32 Bytes - The transaction hash.

Returns

Array - The transaction’s traces, or null when the node does not know the transaction. Each trace is an object:

  • action: Object - What the frame did. For a call: from (DATA, 20 bytes, the caller), callType (call, callcode, delegatecall or staticcall), gas (QUANTITY, the gas available to the frame), input (DATA), to (DATA, 20 bytes) and value (QUANTITY, in wei). For a create: from, gas, init (DATA, the init code), value and creationMethod (create or create2). For a suicide (a SELFDESTRUCT): address, balance and refundAddress. The top-level frame’s gas is the transaction’s gas limit minus its intrinsic gas, so it is 0x0 for a plain transfer sent with a 21,000 gas limit.
  • blockHash: DATA, 32 Bytes - Hash of the block that holds the transaction.
  • blockNumber: Number - Number of that block, as a JSON number rather than a hex string.
  • error: String - The error the frame failed with. Absent when the frame succeeded.
  • result: Object - The frame’s outcome. For a call: gasUsed (QUANTITY) and output (DATA). For a create: address (DATA, 20 bytes, the new contract), code (DATA, the deployed code) and gasUsed. null for a suicide, and can be null for a frame that failed. The top-level frame’s gasUsed leaves out the intrinsic gas, so it is 0x0 for a plain transfer.
  • subtraces: Number - How many frames this frame called directly.
  • traceAddress: Array - The frame’s path in the call tree, as JSON numbers: [] for the top-level frame, [0] for its first child, [0, 1] for that child’s second child.
  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • transactionPosition: Number - The transaction’s index in the block, as a JSON number.
  • type: String - The kind of frame: call, create or suicide.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_transaction","params":["0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0xb14d3c4f5fbfbcfb98af2d330000d49c95b93aa7",
        "callType": "call",
        "gas": "0x0",
        "input": "0x",
        "to": "0x0000000000000000000000000000000000000000",
        "value": "0x64"
      },
      "blockHash": "0x1e0ed1376b6f8cc5deb9749a96c1207765ae9cd09ff46fe6200ca5b3f2913e8f",
      "blockNumber": 1,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
      "transactionPosition": 0,
      "type": "call"
    }
  ]
}

source

trace_transactionOpcodeGas

Note

Served only when trace is named in --http.api or --ws.api; see Enabling Namespaces.

Replays a mined transaction and returns, for each opcode it executed, how many times the opcode ran and the gas those executions used. The node re-executes the transaction’s block up to and including the transaction. A plain transfer to an address without code runs no EVM instructions, so its list is empty.

Traces cover the block’s transactions only. The system calls a block runs before its transactions (EIP-4788 beacon root, EIP-2935 block hashes) and the epoch-closing system calls (applyIncentives and concludeEpoch) are not transactions, so no tracer shows them.

Parameters

DATA, 32 Bytes - The transaction hash.

Returns

Object - The transaction’s opcode usage, or null when the node does not know the transaction:

  • transactionHash: DATA, 32 Bytes - Hash of the transaction.
  • opcodeGas: Array - One entry per opcode the transaction executed, in no particular order:
    • opcode: String - The opcode name, such as PUSH1 or SSTORE.
    • count: Number - How many times the opcode ran.
    • gasUsed: Number - The gas all those executions used together, as a JSON number.

Example

Request

curl http://localhost:8545 \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"trace_transactionOpcodeGas","params":["0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e"],"id":1}'

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0xa794c7eb915c26fdb77242159053c1a36241bcd016b671fb07abe3fa9050805e",
    "opcodeGas": [] // a plain transfer executes no opcodes
  }
}

source

Reference

Supporting reference material for the network.

Stablecoin Contracts provides the ERC-20 ABI for the stablecoins deployed on Telcoin Network. Adiri covers the origin of the testnet’s name.

Stablecoin Contracts

More information can be found on github.

ABI

[
    {
      "inputs": [],
      "name": "AccessControlBadConfirmation",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "neededRole",
          "type": "bytes32"
        }
      ],
      "name": "AccessControlUnauthorizedAccount",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "target",
          "type": "address"
        }
      ],
      "name": "AddressEmptyCode",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "AddressInsufficientBalance",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "AlreadyBlacklisted",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Blacklisted",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "ECDSAInvalidSignature",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "length",
          "type": "uint256"
        }
      ],
      "name": "ECDSAInvalidSignatureLength",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "s",
          "type": "bytes32"
        }
      ],
      "name": "ECDSAInvalidSignatureS",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "allowance",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "needed",
          "type": "uint256"
        }
      ],
      "name": "ERC20InsufficientAllowance",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "balance",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "needed",
          "type": "uint256"
        }
      ],
      "name": "ERC20InsufficientBalance",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "approver",
          "type": "address"
        }
      ],
      "name": "ERC20InvalidApprover",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        }
      ],
      "name": "ERC20InvalidReceiver",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "sender",
          "type": "address"
        }
      ],
      "name": "ERC20InvalidSender",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "ERC20InvalidSpender",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "deadline",
          "type": "uint256"
        }
      ],
      "name": "ERC2612ExpiredSignature",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "signer",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "ERC2612InvalidSigner",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "FailedInnerCall",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "currentNonce",
          "type": "uint256"
        }
      ],
      "name": "InvalidAccountNonce",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InvalidInitialization",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "NotBlacklisted",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "NotInitializing",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "SafeERC20FailedOperation",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "AddedBlacklist",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [],
      "name": "EIP712DomainChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint64",
          "name": "version",
          "type": "uint64"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "RemovedBlacklist",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "previousAdminRole",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "newAdminRole",
          "type": "bytes32"
        }
      ],
      "name": "RoleAdminChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "sender",
          "type": "address"
        }
      ],
      "name": "RoleGranted",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "sender",
          "type": "address"
        }
      ],
      "name": "RoleRevoked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "BLACKLISTER_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "BURNER_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "DEFAULT_ADMIN_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "DOMAIN_SEPARATOR",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "MINTER_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "SUPPORT_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "addBlackList",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "allowance",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "approve",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "blacklisted",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "burn",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "burnFrom",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "decimals",
      "outputs": [
        {
          "internalType": "uint8",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "eip712Domain",
      "outputs": [
        {
          "internalType": "bytes1",
          "name": "fields",
          "type": "bytes1"
        },
        {
          "internalType": "string",
          "name": "name",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "version",
          "type": "string"
        },
        {
          "internalType": "uint256",
          "name": "chainId",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "verifyingContract",
          "type": "address"
        },
        {
          "internalType": "bytes32",
          "name": "salt",
          "type": "bytes32"
        },
        {
          "internalType": "uint256[]",
          "name": "extensions",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract ERC20PermitUpgradeable",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "destination",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "erc20Rescue",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        }
      ],
      "name": "getRoleAdmin",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "grantRole",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "hasRole",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "name_",
          "type": "string"
        },
        {
          "internalType": "string",
          "name": "symbol_",
          "type": "string"
        },
        {
          "internalType": "uint8",
          "name": "decimals_",
          "type": "uint8"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "mint",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "mintTo",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "nonces",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "deadline",
          "type": "uint256"
        },
        {
          "internalType": "uint8",
          "name": "v",
          "type": "uint8"
        },
        {
          "internalType": "bytes32",
          "name": "r",
          "type": "bytes32"
        },
        {
          "internalType": "bytes32",
          "name": "s",
          "type": "bytes32"
        }
      ],
      "name": "permit",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "removeBlackList",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "internalType": "address",
          "name": "callerConfirmation",
          "type": "address"
        }
      ],
      "name": "renounceRole",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "role",
          "type": "bytes32"
        },
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "revokeRole",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes4",
          "name": "interfaceId",
          "type": "bytes4"
        }
      ],
      "name": "supportsInterface",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "symbol",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "transferFrom",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ]

Adiri

The name “Adiri” for testnet is inspired by two rich sources of meaning: the intriguing region on Saturn’s moon Titan, and the peaceful paradise from Melanesian mythology.

Titan’s atmosphere is dense and complex, with methane clouds, thick layers of haze, and liquid hydrocarbons that flow freely on the moon (mainly methane and ethane). Adiri is a prominent region in this atmospheric tapestry. For astronomers, “Adiri” refers to a bright, extensive cloud-covered region that stands out due to its albedo. Albedo features are regions that reflect light differently from their surroundings, making them stand out in visual observations. This bright spot amidst Titan’s dense and complex atmosphere symbolizes clarity and stability.

In Melanesian mythology, “Adiri” is often depicted as a paradise—a tranquil, peaceful afterlife where souls find rest. This mythological association adds a layer of serene beauty and otherworldly quality to the name, echoing the testnet’s goal to provide a stable and clear environment for testing amidst the often turbulent and complex industry.

Adiri Testnet aims to rise above the clouds engulfing other chains to offer transparency and security. Our goal is to create a network that, like the bright region on Titan, stands out amongst its surroundings and like the mythological paradise, offers a tranquil space for development and innovation.

Staking

How validator staking works on Telcoin Network. Membership is permissioned: governance issues a ConsensusNFT to approved operators, who stake TEL through the ConsensusRegistry contract and earn a share of each epoch’s issuance for the consensus work they perform.

How Staking Works covers stake versions, delegation, rewards, and the validator lifecycle. Why Membership Model explains the reasoning behind permissioned membership. How to Stake is the step-by-step operator guide, and Future Direction discusses validator scalability limits and planned changes.

How Staking Works

Stake Versions

Every validator joins the network under a specific stake version. Each version defines a StakeConfig:

ParameterDescription
stakeAmountExact TEL a validator must stake to join
minWithdrawAmountMinimum claimable reward threshold
epochIssuanceTotal TEL distributed as rewards per epoch
epochDurationLength of each epoch in seconds

Governance can create new versions by calling upgradeStakeVersion(). The new version takes effect next epoch. Validators who already staked retain the version they joined under by default – their stakeVersion is set at stake time and does not change automatically.

A validator (or its delegator) can move to a newer version in-place by calling requestStakeVersionChange(validatorAddress, targetVersion). Upgrades are one-way – only to a strictly newer version – and are available while the validator is Staked, PendingActivation, or Active. A Staked validator moves at once. For a validator in service (PendingActivation or Active) the request is queued and settles at an epoch boundary: an increase at the end of the epoch in which it was requested, a decrease one epoch later. If the new version requires more stake, the caller must send the exact deficit with the request, and the registry holds it until the change settles. If it requires less, the surplus goes to the reward recipient: a Staked validator’s surplus is paid at once, and a queued change credits it for withdrawal with claimRefund(). cancelStakeVersionChange(validatorAddress) withdraws a queued request and returns any deficit paid.

How Rewards Are Calculated

At each epoch boundary, applyIncentives() distributes the epoch’s issuance across validators. Each validator’s reward is determined by their weight:

weight = stakeAmount * consensusHeaderCount

Where stakeAmount comes from the validator’s own current stake version, and consensusHeaderCount is how many consensus headers they produced that epoch.

Each validator’s share of the epoch issuance is:

reward = (epochIssuance * weight) / totalWeight

Where totalWeight is the sum of all validators’ weights. Any issuance left undistributed by integer rounding rolls over into the next epoch’s reward pool.

In a committee where all validators share the same stake version, the stakeAmount cancels out and rewards depend purely on header count. But in a mixed committee – where validators joined under different versions with different stake amounts – the version affects reward weight directly.

Example 1: Mixed Committee After a Stake Increase

Governance raises the required stake from 100,000 TEL to 250,000 TEL.

Configuration:

  • Version 0: stakeAmount = 100,000 TEL
  • Version 1: stakeAmount = 250,000 TEL
  • Epoch issuance: 10,000 TEL

Committee (4 validators, each producing 10 headers):

ValidatorVersionStakeHeadersWeight
Av0100,000101,000,000
Bv0100,000101,000,000
Cv1250,000102,500,000
Dv1250,000102,500,000
Total7,000,000

Reward distribution:

ValidatorCalculationReward
A10,000 * 1,000,000 / 7,000,000~1,428.57 TEL
B10,000 * 1,000,000 / 7,000,000~1,428.57 TEL
C10,000 * 2,500,000 / 7,000,000~3,571.43 TEL
D10,000 * 2,500,000 / 7,000,000~3,571.43 TEL

Version 1 validators earn 2.5x more per header than version 0 validators, directly proportional to the stake ratio (250,000 / 100,000).

Example 2: Mixed Committee After a Stake Decrease

Governance lowers the required stake from 200,000 TEL to 50,000 TEL to reduce barriers to entry.

Configuration:

  • Version 0: stakeAmount = 200,000 TEL
  • Version 1: stakeAmount = 50,000 TEL
  • Epoch issuance: 10,000 TEL

Committee (4 validators, each producing 10 headers):

ValidatorVersionStakeHeadersWeight
Av0200,000102,000,000
Bv0200,000102,000,000
Cv150,00010500,000
Dv150,00010500,000
Total5,000,000

Reward distribution:

ValidatorCalculationReward
A10,000 * 2,000,000 / 5,000,0004,000 TEL
B10,000 * 2,000,000 / 5,000,0004,000 TEL
C10,000 * 500,000 / 5,000,0001,000 TEL
D10,000 * 500,000 / 5,000,0001,000 TEL

Legacy version 0 validators earn 4x more per header than version 1 validators. Their higher initial stake gives them greater weight in the distribution even though newer validators paid less to join.

Example 3: Performance Differences in a Mixed Committee

Stake versions set the baseline weight, but header production still matters. A high-performing validator on a lower stake version can out-earn an underperforming validator on a higher version.

Configuration:

  • Version 0: stakeAmount = 100,000 TEL
  • Version 1: stakeAmount = 200,000 TEL
  • Epoch issuance: 10,000 TEL

Committee (3 validators with varying performance):

ValidatorVersionStakeHeadersWeight
Av0100,000303,000,000
Bv1200,000102,000,000
Cv1200,000204,000,000
Total9,000,000

Reward distribution:

ValidatorCalculationReward
A (v0)10,000 * 3,000,000 / 9,000,000~3,333.33 TEL
B (v1)10,000 * 2,000,000 / 9,000,000~2,222.22 TEL
C (v1)10,000 * 4,000,000 / 9,000,000~4,444.44 TEL

Validator A on version 0 (lower stake) earns more than Validator B on version 1 (higher stake) because A produced 3x the headers. Performance and stake version both contribute to weight.

Example 4: Uniform Committee (Single Version)

When all validators share the same version, stakeAmount cancels out entirely and rewards are distributed purely by header count.

Configuration:

  • Version 0: stakeAmount = 100,000 TEL
  • Epoch issuance: 10,000 TEL

Committee (3 validators):

ValidatorVersionStakeHeadersWeight
Av0100,000151,500,000
Bv0100,000101,000,000
Cv0100,000252,500,000
Total5,000,000

Reward distribution:

ValidatorCalculationReward
A10,000 * 1,500,000 / 5,000,0003,000 TEL
B10,000 * 1,000,000 / 5,000,0002,000 TEL
C10,000 * 2,500,000 / 5,000,0005,000 TEL

With a uniform version, the stake amount is irrelevant to relative distribution. Rewards are directly proportional to the number of headers produced.

Key Takeaways

  • A validator’s stake version is set at the time of staking and only changes if the validator (or its delegator) opts into an in-place upgrade to a newer version via requestStakeVersionChange().
  • In a uniform committee (all same version), rewards depend only on consensus header production.
  • In a mixed committee, validators on higher-stake versions earn proportionally more per header.
  • If the stake increases, new validators have higher weight and earn more per header than legacy validators.
  • If the stake decreases, legacy validators retain their higher weight advantage over newer, lower-stake validators.
  • Performance still matters: a high-performing validator on a lower stake version can out-earn an underperforming validator on a higher version.
  • The epochIssuance from the current epoch’s StakeConfig determines the total reward pool, regardless of individual validator versions.

Why Membership Model

Why This Approach

More nodes, not bigger nodes

The fundamental argument is about what economic behavior the staking model encourages.

In a stake-weighted system, an operator with 1,000,000 TEL and a 100,000 TEL minimum stake has no reason to run 10 nodes. Running one node with 1,000,000 TEL staked produces the same (or better, after infrastructure savings) return. The network gets one node.

In the membership model, that same operator can only stake 100,000 TEL per node. To deploy all their capital productively, they launch 10 validators – each requiring governance approval, its own keys, its own infrastructure, and its own ConsensusNFT. The network gets 10 nodes. Each of those nodes independently produces consensus headers, serves the network, and strengthens its resilience against downtime and partitions.

This is not a theoretical distinction. The validator set size directly determines the network’s fault tolerance threshold, geographic distribution potential, and resistance to correlated failures. A network with 100 nodes operated by 20 entities is materially more robust than one with 20 nodes operated by 20 entities where some happen to have larger stakes.

Performance-based differentiation

Equal-weight models avoid the concentration problem but introduce a free-rider problem. The membership model solves both: the fixed stake prevents concentration, while the header-count weight rewards active participation. Validators who invest in reliable infrastructure, maintain high uptime, and stay current on protocol upgrades earn more. They are incentivized because the contributed more to the network, not because they contributed more.

Version system as a governance lever

The stake version system gives governance a tool to adjust the network’s economics without hard forks. If the network needs to raise the barrier to entry (e.g., to increase economic security), governance increments the version with a higher stake amount. If it needs to lower barriers to accelerate growth, it can reduce the stake. Existing validators are not retroactively affected, but earn rewards based on the proportion they have staked relative to all other committee members. This creates a stable, predictable environment for current operators while preserving flexibility for the network’s future.

Permissioned context

Telcoin Network validators are mobile network operators vetted by governance. This is not an open-entry permissionless system where Sybil resistance must come purely from economic cost. The ConsensusNFT whitelist provides the Sybil resistance layer. The stake serves as an economic commitment and alignment mechanism. “Well known” validators act as the sole defense against malicious actors. This context makes a fixed-stake membership model viable where it might not be in a permissionless network with anonymous node operators.

Approaches Considered

1. Pure Stake-Weighted Model

In a traditional proof-of-stake system, validators lock variable amounts of stake and earn rewards proportional to the amount staked. More stake means more influence over consensus and a larger share of rewards.

How it works: A validator with 1,000,000 TEL staked earns 10x the rewards of a validator with 100,000 TEL. Block production probability, committee selection, and voting power all scale with stake.

Pros:

  • Well-understood model with extensive research and battle-tested implementations (Ethereum, Cosmos, Solana)
  • Economic security scales directly with total value locked — attacking the network requires acquiring proportional stake
  • Flexible entry — validators can participate at various capital levels
  • Capital efficiency — validators maximize returns from a single node without additional infrastructure

Cons:

  • Incentivizes concentration, not growth. A validator with 1,000,000 TEL earns the same total reward whether they run one node or ten. Since each additional node requires infrastructure costs (hardware, bandwidth, operations), the rational choice is to run as few nodes as possible and concentrate stake. This directly works against network decentralization.
  • Rewards capital over contribution. A well-capitalized validator running a mediocre node earns more than a high-performing validator with less capital. The network gets fewer, richer nodes rather than more, better nodes.
  • Barriers compound over time. Early validators accumulate rewards faster, increasing their stake advantage. New entrants face a widening gap, discouraging participation and further concentrating the validator set.
  • Validator count stagnates. There is no economic reason for an operator to launch additional nodes when they could simply add stake to an existing one. The total node count is bounded by the number of distinct operators, not their available capital.

2. Equal-Weight Model

Every active validator earns an identical share of epoch rewards regardless of stake amount or any other factor. One validator, one equal share.

How it works: If there are 20 validators and the epoch issuance is 10,000 TEL, each validator receives 500 TEL.

Pros:

  • Simplest possible reward scheme with no room for gaming
  • No advantage to capital concentration
  • Perfectly egalitarian – every node is equally valued

Cons:

  • No performance incentive. A validator producing minimal headers earns the same as one producing many. There is no reward for reliability, uptime, or active consensus participation.
  • Free-rider problem. Validators can coast on minimal participation while collecting full rewards, degrading network quality without economic consequence.
  • No economic differentiation across stake versions. If governance adjusts the required stake over time, validators who committed more capital receive no acknowledgment of that higher commitment in their reward share.

3. Membership Model with Version-Weighted Rewards (TN Solution)

Validators stake a fixed amount determined by the current stake version to gain membership. Rewards are distributed based on the product of each validator’s initial stake amount (from their version) and their consensus header count.

How it works: Each validator’s reward weight is stakeAmount * consensusHeaderCount. In a uniform committee this reduces to pure performance-based distribution. In a mixed committee (validators on different stake versions), higher-stake versions earn proportionally more per header.

Pros:

  • Directly incentivizes more nodes. Since each node requires its own fixed stake and earns independently, an operator who wants to maximize rewards must run more nodes. There is no way to “stack” additional capital onto a single node. The only path to higher total earnings is launching additional validators, each with their own ConsensusNFT, keys, and stake. This translates capital directly into network growth.
  • Rewards performance. Header count is the differentiating factor among same-version validators. Reliable, high-uptime nodes earn more. This aligns economic incentives with network health.
  • Version-aware fairness. When governance adjusts stake requirements, validators who committed more capital under a higher-stake version are weighted accordingly in reward distribution. This acknowledges their larger economic commitment without introducing variable staking.
  • Governance flexibility. Stake amounts, issuance rates, and epoch parameters can be tuned per version without protocol changes. The network can adapt its economics as it matures.

Cons:

  • Mixed-version committees create unequal per-header reward rates, which may be perceived as unfair by validators on lower-stake versions.
  • Version upgrades are one-way. A validator can move to a newer version in-place via requestStakeVersionChange() (topping up the exact stake deficit if the requirement increased), but can never downgrade to an older version.
  • The permissioned model (ConsensusNFT) means governance is a bottleneck for onboarding, which limits how quickly new nodes can be added even when operators are willing.

Summary

ModelIncentivizes More NodesRewards PerformancePrevents ConcentrationGovernance Flexibility
Stake-weightedNoIndirectlyNoLimited
Equal-weightNeutralNoYesLimited
Membership + version-weightedYesYesYesYes

The membership model turns capital into nodes rather than into weight on existing nodes. For a network whose primary growth objective is expanding the validator set, this is the correct incentive structure.

How to Stake

Overview

Becoming an active validator requires three on-chain transactions:

  1. Governance Approval - Governance issues a ConsensusNFT to whitelist operator’s validator address.
  2. Stake - Operator submits the compressed BLS public key (96 bytes), the compressed proof of possession (48 bytes), and the stake amount.
  3. Activate - Once the node is synced, operator submits an activation transaction to become eligible for inclusion in future committees at the next epoch boundary.

Prerequisites

Hardware Requirements

Size the validator host from Hardware Requirements.

Network Requirements

  • Static public IP address
  • Open UDP ports for P2P communication: the primary and worker ports you pass at key generation (49590 and 49594 by convention; the node has no default ports)
  • Reliable, low-latency internet connection

Software Requirements

  • telcoin-network binary built and installed
  • Access to an Ethereum wallet with sufficient TEL for staking

Step 1: Generate Validator Keys

Generate BLS keys and node identity information using the CLI.

telcoin-network keytool generate validator \
  --address <ADDRESS_FOR_TEL_REWARDS> \
  --external-primary-addr /ip4/<YOUR_PUBLIC_IP>/udp/<PRIMARY_PORT>/quic-v1 \
  --external-worker-addrs /ip4/<YOUR_PUBLIC_IP>/udp/<WORKER_PORT>/quic-v1 \
  --datadir /path/to/node/data

Parameters:

  • --address - The validator’s Ethereum-style address (receives block rewards). The BLS proof of possession commits to this address, so it must be the same address that governance whitelists with the ConsensusNFT.
  • --external-primary-addr - Public multiaddr for primary P2P network
  • --external-worker-addrs - Public multiaddr(s) for worker P2P network
  • --datadir - Directory to store node data and keys

BLS Key Passphrase:

Operators will be prompted to enter a passphrase to encrypt their BLS key on the local filesystem. Alternatively, set the passphrase via:

  • Environment variable: TN_BLS_PASSPHRASE
  • Stdin: Use --bls-passphrase-source stdin
  • Interactive prompt: Use --bls-passphrase-source ask

This command generates:

  • BLS keypair (encrypted with your passphrase)
  • Network keypairs for P2P communication
  • node-info.yaml containing your public keys and proof of possession

Step 2: Request Governance Approval

Before staking, your validator address must be whitelisted by governance.

  1. Submit the validator’s ECDSA address to governance for approval
  2. Governance performs off-chain verification
  3. Upon approval, governance calls mint(validatorAddress) on the ConsensusRegistry contract

ConsensusRegistry Address: 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1

Operators can verify their whitelist status by checking if they own a ConsensusNFT at the registry address.

# Check NFT balance (returns 1 if whitelisted, 0 if not)
cast call 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "balanceOf(address)(uint256)" \
  <VALIDATOR_ADDRESS> \
  --rpc-url <RPC_URL>

Step 3: Stake

Once whitelisted, submit the stake transaction to the ConsensusRegistry.

Contract Function

function stake(
    bytes calldata blsPubkey,
    ProofOfPossession memory proofOfPossession
) external payable

Parameters:

  • blsPubkey - The compressed BLS public key (96 bytes)
  • proofOfPossession - Struct with one field:
    • signature - The compressed proof of possession (48 bytes), which binds the BLS key to the validator address

Value: Send exactly the stakeAmount of the current epoch’s stake version. Read the version with getCurrentStakeVersion(), then its config with stakeConfig(uint8). On the Adiri testnet the amount is 1,000,000 TEL today.

Reading Your Keys

The node’s BLS public key and proof of possession are stored in node-info.yaml after key generation:

bls_public_key: <compressed-96-byte-key>
proof_of_possession: <signature>

The file stores both values in base58. keytool export-staking-args reads them and prints the two stake() arguments in hex, or the complete transaction calldata with --calldata. It reads only node-info.yaml and never the BLS key, but the binary still requires a passphrase source for every keytool command except set-rpc: with the default env source and no TN_BLS_PASSPHRASE it exits with “passphrase is required”. Pass --bls-passphrase-source no-passphrase. keytool also writes log lines to stdout, so add the global -q flag when capturing its output in a variable.

Example Using Cast

# Read the current epoch's stake version
cast call 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "getCurrentStakeVersion()(uint8)" \
  --rpc-url <RPC_URL>

# Read that version's config; the first value is the stake amount in wei
cast call 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "stakeConfig(uint8)(uint256,uint256,uint256,uint32)" \
  <STAKE_VERSION> \
  --rpc-url <RPC_URL>

# Build the stake(bytes,(bytes)) calldata from node-info.yaml
CALLDATA=$(telcoin-network -q --bls-passphrase-source no-passphrase \
  keytool export-staking-args \
  --node-info /path/to/node/data/node-info.yaml \
  --calldata)

# Submit stake transaction
cast send 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "$CALLDATA" \
  --value <STAKE_AMOUNT> \
  --trezor \
  --rpc-url <RPC_URL>

Do not read the amount from getCurrentStakeConfig(). It returns the newest config governance has written, and in an epoch where governance writes a new version, that config only takes effect at the next epoch. stake() checks the value against the current epoch’s version.

After staking, the validator’s status changes to Staked.

Step 4: Start and Sync The Node

Start the validator node and wait for it to sync with the network. This step can be started before staking is complete.

telcoin-network node \
  --datadir /path/to/node/data \
  --chain adiri \
  --http

--chain adiri loads the Adiri testnet genesis built into the binary. Build the binary with the adiri feature: without it, the node refuses to start on the Adiri chain (chain ID 2017).

Passphrase options:

  • Environment: TN_BLS_PASSPHRASE=<passphrase> telcoin-network node ...
  • Stdin: echo "<passphrase>" | telcoin-network --bls-passphrase-source stdin node ...
  • Interactive: telcoin-network --bls-passphrase-source ask node ...

Verify Sync Status

There is no dedicated syncing RPC method (eth_syncing always returns false on Telcoin Network). Compare the node’s latest block number against a public RPC endpoint:

# local node
curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
  http://localhost:8545

# network
curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
  <RPC_URL>

Wait until the node’s block number matches the network’s and keeps advancing with it before proceeding.

Step 5: Activate

Once synced, submit an activation transaction to signal readiness for committee participation. This does not guarantee immediate inclusion. It indicates the validator is ready to be included in future committee selection process starting at the next epoch boundary.

Contract Function

function activate() external

This function must be called from the validator address (the address that owns the ConsensusNFT and submitted the stake).

Example Using Cast

cast send 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "activate()" \
  --trezor \
  --rpc-url <RPC_URL>

After activation:

  1. Node status changes to PendingActivation
  2. At the next epoch boundary, node status changes to Active
  3. Node becomes eligible for committee selection in subsequent epochs

Validator Lifecycle States

StatusDescription
UndefinedAddress has ConsensusNFT but has not staked
StakedValidator has staked but not yet activated
PendingActivationValidator called activate(), waiting for epoch boundary
ActiveValidator is active and eligible for committee selection
PendingExitValidator requested exit, waiting for committee obligations to complete
ExitedValidator has exited and can unstake after one epoch

Delegated Staking (Institutional Onboarding)

For institutional or white-glove onboarding scenarios, a delegator can stake on behalf of a validator.

Contract Function

function delegateStake(
    bytes calldata blsPubkey,
    ProofOfPossession memory proofOfPossession,
    address validatorAddress,
    bytes calldata validatorEIP712Signature,
    uint256 deadline
) external payable

Additional Parameters:

  • validatorAddress - The address that owns the ConsensusNFT
  • validatorEIP712Signature - EIP-712 signature from the validator authorizing the delegation
  • deadline - Unix timestamp after which the signature is rejected with DelegationExpired

Obtaining the Delegation Digest

The validator must sign an EIP-712 typed data message. Get the digest to sign:

function delegationDigest(
    bytes memory blsPubkey,
    address validatorAddress,
    address delegator,
    uint256 deadline
) external view returns (bytes32)

The validator signs this digest, and the delegator includes the signature and the same deadline when calling delegateStake. The digest also covers the current epoch’s stake version and the validator’s delegation nonce, so the signature stops working if either changes before delegateStake runs. A validator can revoke a signature it has given by calling increaseNonce().

Note: Governance-initiated delegations (where msg.sender is the contract owner) do not require the validator’s EIP-712 signature.

Exiting and Unstaking

Begin Exit

To leave the active validator set:

cast send 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "beginExit()" \
  --trezor \
  --rpc-url <RPC_URL>

Your status changes to PendingExit. The protocol will automatically exit you once you’re no longer needed for any committee assignments (current epoch + 2 future epochs).

Unstake

The validator address or its delegator can call unstake. The registry accepts it in two cases:

  • the validator is Staked (it staked but never activated), or
  • the validator is Exited and at least one epoch has passed since its exit epoch (currentEpoch >= exitEpoch + 1).
cast send 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "unstake(address,bool)" \
  <VALIDATOR_ADDRESS> \
  false \
  --trezor \
  --rpc-url <RPC_URL>

This returns your initial stake plus any accrued rewards to either:

  • The validator address (if self-staked)
  • The delegator address (if delegated staking was used)

If the recipient rejects the transfer, the amount is credited instead, and the recipient withdraws it with claimRefund().

The second argument is acceptRewardShortfall. With false, the call reverts if the Issuance contract cannot cover the accrued rewards. With true, rewards are paid up to the Issuance balance and the unpaid rewards are forfeited; the stake portion is not reduced by the reward shortfall. (A validator slashed below its stake amount gets back only its remaining balance either way.)

Unstaking retires the validator address for good: governance cannot issue it a ConsensusNFT again.

Claim Rewards Without Exiting

Active validators can claim accrued rewards without exiting:

cast send 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "claimStakeRewards(address)" \
  <VALIDATOR_ADDRESS> \
  --trezor \
  --rpc-url <RPC_URL>

Checking Validator Status

Query your validator information:

cast call 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "getValidator(address)" \
  <VALIDATOR_ADDRESS> \
  --rpc-url <RPC_URL>

Query current epoch information:

cast call 0x07E17e17E17e17E17e17E17E17E17e17e17E17e1 \
  "getCurrentEpochInfo()" \
  --rpc-url <RPC_URL>

Troubleshooting

Common Errors

ErrorCauseSolution
InvalidTokenIdAddress holds no ConsensusNFT: not whitelisted yet, or already retiredRequest governance approval first; a retired address cannot be whitelisted again
InvalidStatusWrong validator state for operationCheck current status with getValidator()
InvalidStakeAmountIncorrect stake value sentSend stakeAmount from stakeConfig(getCurrentStakeVersion())
InvalidProofOfPossessionBLS signature verification failedThe proof was usually signed for a different address. Re-sign it for the staking address with keytool generate pop --address <ADDRESS>, then export the staking arguments again
DuplicateBLSPubkeyBLS key already registeredIf this address already staked with this key, the earlier stake succeeded; check getValidator(). Otherwise: a registered key is never released, not even after unstaking. Generate a new validator’s keys in a new datadir, and never overwrite the keys of a validator that has staked

Key Management

  • Lost passphrase: BLS keys cannot be recovered without the passphrase. Before staking, generate new keys. After staking, the registered key cannot be replaced: exit and unstake from the validator address, then onboard a new validator address with new keys.
  • Regenerating keys: Never run keytool generate validator --force for a validator that has staked. The registry binds the BLS key to that validator for good and has no way to replace it, so --force overwrites the only key that can sign for the validator. If the proof of possession names the wrong address, re-sign it with keytool generate pop --address <ADDRESS> instead. It keeps every key and changes only execution_address and proof_of_possession, but it writes the whole node-info.yaml again, so a legacy worker: map is saved as a workers: list. It signs with the BLS key, so run it with --datadir set to the node’s data directory and the passphrase source that decrypts the key. The --bls-passphrase-source no-passphrase used for export-staking-args above fails for an encrypted key.
  • Backing up keys: Securely backup the contents of your data directory, especially the encrypted key files.

Future Direction

Validator Scalability Limits

The ConsensusRegistry contract imposes a practical upper limit on the number of validators that can participate in the network. This limit is not defined by an explicit constant but emerges from gas constraints on storage-intensive loops that iterate over all existing validators. Under the current design and its 100M system-call gas budget, the network can support on the order of 8,000 validators before critical operations risk exceeding gas limits (under the historical 30M budget, the ceiling was approximately 2,500-3,000).

This is an accepted tradeoff. The contract is designed for a permissioned validator set of mobile network operators (MNOs), of which there are roughly 1,000 worldwide.

The Bottleneck: _getValidators()

The root cause is _getValidators(), an internal function that scans every existing ConsensusNFT to find validators matching a given status. It relies on ERC721Enumerable’s tokenByIndex(), which performs a cold storage read (SLOAD) per token.

function _getValidators(ValidatorStatus status) internal view returns (ValidatorInfo[] memory) {
    ValidatorInfo[] memory validatorsMatched = new ValidatorInfo[]((totalSupply()));

    for (uint256 i; i < validatorsMatched.length; ++i) {
        address validatorAddress = _getAddress(tokenByIndex(i));  // SLOAD
        ValidatorInfo storage current = validators[validatorAddress];  // SLOAD(s)
        ...
    }
    ...
}

For each validator in the loop:

OperationApproximate Gas
tokenByIndex(i) – read from _allTokens[i]2,100 (cold SLOAD)
Read validators[addr] struct fields2,100-4,200
Copy matched struct to memory1,500-3,000
Per-validator total~5,000-7,000

On top of per-validator storage costs, Solidity’s memory allocation cost grows quadratically. The function allocates a memory array sized to totalSupply(), and each ValidatorInfo consumes 224 bytes in memory (seven fields at 32 bytes each). BLS pubkeys live in a separate blsPubkeys mapping and are not copied by this function.

Where _getValidators() Is Called

The function appears on every critical path:

CallerContextTimes Called
concludeEpoch()System call (epoch boundary)3 times
beginExit()Validator transaction1 time
setNextCommitteeSize()Governance transaction1 time
burn() via _consensusBurn()Governance transaction1 time

concludeEpoch() – The Tightest Constraint

concludeEpoch() is the most gas-constrained path because it calls _getValidators() three times in a single transaction:

  1. _getValidators(PendingActivation) inside _updateValidatorQueue() – to activate queued validators
  2. _getValidators(PendingExit) inside _updateValidatorQueue() – to finalize exits for validators no longer in any committee
  3. _getValidators(Active) after queue updates – to validate the future committee size against total eligible validators

This function executes as a system call with a hardcoded gas limit of 100,000,000 (100M), raised from the historical 30M for epoch-boundary headroom. The protocol sets this limit (SYSTEM_CALL_GAS_LIMIT) in crates/tn-reth/src/evm/mod.rs when constructing the system call transaction.

After the first _getValidators() call, subsequent calls benefit from warm storage (100 gas per SLOAD instead of 2,100), reducing repeat costs. Even so, the combined gas scales linearly with validator count and quadratically with memory allocation.

Estimated Gas for concludeEpoch()

ValidatorsStorage ReadsMemory (3 arrays)Estimated Total
500~3.5M~0.2M~4M
1,000~7M~0.7M~8M
1,500~10.5M~1.5M~12M
2,000~14M~2.5M~17M
2,500~17.5M~4M~22M
3,000~21M~5.5M~27M
~3,200~22.5M~6.5M~30M

These estimates cover the three _getValidators() calls. Under the historical 30M budget, ~3,200 validators marked the hard ceiling; against the current 100M budget, this model extrapolates to a ceiling on the order of 8,000 validators (the quadratic memory growth keeps it below a proportional 3.3x). The remaining work in concludeEpoch() – sorting enforcement, epoch info updates, committee membership checks for pending exits – adds further overhead, which tightens the practical limit below the theoretical maximum.

applyIncentives() – Separate System Call

applyIncentives() executes as its own system call with a separate 100M gas budget. It iterates over the rewardInfos array (one entry per committee member, not all validators), so it scales with committee size rather than total validator count. The uint16 nextCommitteeSize field caps committee size at 65,535, well within gas limits for this function.

beginExit() – Validator Transaction

beginExit() calls _getValidators(Active) once. As a regular transaction (not a system call), it is subject to the block gas limit. A single pass over all validators consumes roughly 6M gas at 1,000 validators, which is feasible under standard block gas limits but becomes a concern as validator count grows.

Fixed Type Limits

Beyond gas constraints, several storage types impose hard ceilings:

FieldTypeMaximum ValueImplication
nextCommitteeSizeuint1665,535Maximum committee size per epoch
stakeVersionuint8255Maximum number of stake version upgrades
currentEpochuint32~4.3 billionEffectively unlimited for epoch count

The uint8 stakeVersion is the most notable hard limit. After 255 version upgrades, no further stake configuration changes can be made without a contract upgrade.

Why This Is Acceptable Today

The contract comment on the _getValidators() function states the design rationale directly:

“There are ~1000 total MNOs in the world so SLOAD loops should not run out of gas”

Telcoin Network validators are permissioned mobile network operators approved by governance via ConsensusNFT minting. The total addressable validator set is bounded by the number of MNOs globally (~1,000), placing the network well within the validator gas ceiling.

At 1,000 validators, concludeEpoch() consumes approximately 8M gas out of its 100M budget – roughly 8% utilization with comfortable headroom.

Future Approaches to Support More Validators

If the network’s growth objectives expand beyond the current MNO-focused validator set, several approaches could raise or eliminate the validator ceiling.

Increase the System Call Gas Limit

The simplest change, and one the protocol has already exercised once: the system-call gas limit was raised from 30M to 100M. Raising it further would proportionally increase the validator ceiling. The value participates in consensus – a binary running with a different limit diverges on any system call that needs more gas than the smaller budget allows – so every validator must upgrade in lockstep before an epoch close can depend on a new value. System calls execute at zero gas price and do not count against the block’s gas limit, so increasing this value has no impact on user transaction throughput. The tradeoff is longer execution time per epoch boundary, which affects block production latency.

Replace ERC721Enumerable with Direct Tracking

The ERC721Enumerable extension maintains an _allTokens array that enables tokenByIndex() but adds storage overhead on every mint and burn. Replacing it with a purpose-built data structure – such as a simple address[] of active validators maintained alongside the existing validators mapping – would eliminate the indirection through tokenByIndex() and reduce per-validator storage reads from ~3 SLOADs to ~1.

This change would also allow the contract to avoid iterating over validators that have exited but not yet unstaked (whose NFTs still exist in the enumerable set), further reducing unnecessary loop iterations.

Maintain Validator Sets by Status

Rather than filtering all validators by status at query time, the contract could maintain separate storage arrays per status (e.g., activeValidators[], pendingActivationQueue[], pendingExitQueue[]). Each state transition would move the validator between arrays. This converts _getValidators() from O(totalSupply) to O(relevantSet), which is dramatically cheaper when only a small subset of validators is in a given status.

The cost is additional bookkeeping on state transitions (swaps and pops on storage arrays), but these operations are constant-time per transition and occur infrequently relative to the epoch-boundary queries.

Move Validator Enumeration Off-Chain

The protocol client already has full visibility into the validator set through its own state. The on-chain _getValidators() calls serve two purposes: queue processing (activations and exits) and committee size validation. Both could be moved partially or fully to the protocol layer in Rust, with the contract receiving pre-computed results via system call parameters rather than re-deriving them from storage.

For example, concludeEpoch() could accept the list of validators to activate and exit as calldata parameters (validated against on-chain state) instead of scanning storage to discover them. This would reduce the function to O(queue size) rather than O(total validators).

Paginated or Incremental Queue Processing

Instead of processing all pending activations and exits in a single concludeEpoch() call, the protocol could process them incrementally across multiple system calls or in batches. A cursor-based pattern would allow _updateValidatorQueue() to resume where it left off if gas runs low, spreading the work across multiple transactions within the same block.

SSTORE2 for Static Validator Data

Each validator’s 96-byte compressed BLS pubkey is stored in a dedicated blsPubkeys mapping, which consumes 4 storage slots (length + 3 data slots). Since BLS public keys are immutable after staking, they could be written once using SSTORE2 (storing data as contract bytecode via CREATE) and read back with EXTCODECOPY. Bytecode reads cost 2,600 gas for the first access plus 3 gas per byte, which is cheaper than multiple SLOADs for large data and avoids the per-slot overhead.

The pubkey is already excluded from ValidatorInfo, so _getValidators() never touches it; this optimization targets the pubkey read paths instead, such as getBlsPubkey() and getCommitteeBlsPubkeys().

Summary

ConstraintCurrent LimitBound By
Practical validator ceiling~8,000concludeEpoch() gas (100M system call)
Committee size65,535uint16 nextCommitteeSize
Stake versions255uint8 stakeVersion
Target validator set~1,000 MNOsNetwork design

The current design prioritizes simplicity and correctness for a known-bounded validator set. The gas ceiling is well above the target population of ~1,000 MNOs, providing roughly 8x headroom. If the network evolves to require a larger validator set, the most effective path is a combination of maintaining per-status validator arrays and moving enumeration logic to the protocol layer, which together would effectively eliminate the gas-based ceiling.

Basefees

Telcoin Network Base Fee Model

Overview

Telcoin Network (TN) implements an EIP-1559-style base fee mechanism adapted for its epoch-based consensus architecture. The core pricing algorithm is identical to Ethereum’s EIP-1559, but the adjustment boundary is per-epoch rather than per-block.

Key Concepts

Epochs, not blocks: TN consensus operates in epochs. Each epoch consists of multiple batches (analogous to blocks) produced by workers. The base fee is fixed for the duration of an epoch and only adjusts at epoch boundaries.

Gas target: Each epoch has a defined gas target representing the ideal gas consumption across all batches. This target functions identically to Ethereum’s block gas target and is the point at which the base fee remains unchanged.

Uniform pricing within an epoch: All transactions within a given epoch are priced at the same base_fee_per_gas, regardless of when during the epoch they are submitted. There is no intra-epoch fee variance.

Base Fee Adjustment Algorithm

At each epoch boundary, the protocol compares the epoch’s total gas consumed against the gas target:

  • Gas used = target → base fee remains unchanged
  • Gas used > target → base fee increases for the next epoch
  • Gas used < target → base fee decreases for the next epoch

The adjustment formula follows EIP-1559:

if gas_used > gas_target:
    base_fee_delta = parent_base_fee * (gas_used - gas_target) / gas_target / MAX_CHANGE_DENOMINATOR
    next_base_fee = parent_base_fee + max(base_fee_delta, 1)

if gas_used < gas_target:
    base_fee_delta = parent_base_fee * (gas_target - gas_used) / gas_target / MAX_CHANGE_DENOMINATOR
    next_base_fee = parent_base_fee - base_fee_delta

Where MAX_CHANGE_DENOMINATOR bounds the maximum rate of change per epoch (the same constant as Ethereum’s EIP-1559). The base fee has a protocol-defined minimum floor and cannot drop below it.

Implications for Bridge Integrations

  1. Fee estimation: Because the base fee is constant within an epoch, a single eth_gasPrice or eth_getBaseFee call gives you the exact base fee for all transactions until the current epoch ends. There is no block-to-block volatility to account for within an epoch.
  2. Fee predictability: The maximum base fee increase between consecutive epochs is bounded by the EIP-1559 max change denominator. Fee spikes are smoothed across epoch boundaries rather than block boundaries, which generally provides more stable pricing over short time horizons.
  3. Transaction pricing: TN transactions use the same maxFeePerGas / maxPriorityFeePerGas fields as Ethereum EIP-1559 transactions. The base_fee_per_gas portion is not burned – it is credited to the chain’s base-fee address for governance processing – and the priority fee goes to the batch producer.
  4. Epoch transitions: If a transaction is submitted near an epoch boundary and lands in the next epoch, it will be priced at the new epoch’s base fee. Standard EIP-1559 maxFeePerGas protections apply: the transaction will not execute if the new base fee exceeds the sender’s maxFeePerGas.

Summary

PropertyEthereumTelcoin Network
Fee adjustment boundaryPer blockPer epoch
Adjustment algorithmEIP-1559EIP-1559 (same formula)
Fee stability within boundary1 blockEntire epoch
Gas target basisSingle blockEpoch aggregate
Transaction typeEIP-1559 (type 2)EIP-1559 (type 2)
Base fee floor0 (effectively)Protocol-defined minimum

Gas Limit Penalty

Why Penalties Exist

Telcoin Network uses a consensus-first architecture: transactions are ordered by consensus before they are executed. This means the actual gas a transaction consumes is unknown at the time it enters a batch. The network must rely on the gas limit declared by the sender to reserve space in each batch.

This creates a denial-of-service vector. A malicious or careless user can set an extremely high gas limit on a cheap transaction, consuming most of a batch’s capacity while using almost none of it. The batch ends up nearly empty in terms of useful work, but no other transactions could fit.

To counter this, TN applies a quadratic penalty on transactions whose gas limit is grossly inflated relative to their actual usage. The penalty deducts a portion of the unused gas refund and redirects it to the chain’s base-fee address for governance processing. This economically disincentivizes gas limit inflation without affecting well-estimated transactions.

How It Works

The 10% Rule

The penalty only activates when a transaction uses less than 10% of its declared gas limit. Any transaction that uses 10% or more of its gas limit pays zero penalty.

Additionally, transactions with a gas limit at or below 210,000 are always exempt, regardless of usage ratio. This protects simple transfers and low-cost interactions from unintended penalties.

Quadratic Scaling

When the penalty does activate, it scales quadratically based on how far below the 10% threshold the usage falls. The further below 10% usage a transaction is, the more aggressively the penalty grows.

In plain terms:

  • At 9.9% usage, the penalty is negligible
  • At 5% usage, roughly 25% of unused gas is penalized
  • At 2% usage, roughly 64% of unused gas is penalized
  • At 0.1% usage, over 95% of unused gas is penalized

The quadratic curve means the penalty ramps up gently near the threshold and steeply for extreme over-estimation, targeting the worst offenders while leaving borderline cases mostly unaffected.

The Formula

For transactions above the minimum gas limit threshold and below 10% usage:

usage_ratio = gas_used / gas_limit
inefficiency = 0.10 - usage_ratio
penalty_gas = (inefficiency^2 / 0.10^2) * unused_gas

Where:

  • gas_used is the actual gas consumed (before EVM refunds like SSTORE clearing)
  • gas_limit is the gas limit declared by the sender
  • unused_gas = gas_limit - gas_used (computed from the same pre-refund gas_used)
  • The result is clamped so the penalty never exceeds unused_gas

Note on EVM refunds: The penalty calculation uses pre-refund gas (actual execution cost) to determine the usage ratio, so SSTORE refunds do not artificially inflate the penalty. The standard EVM refund is still applied when computing the user’s gas reimbursement.

Where the Fees Go

When a transaction executes on TN, fees are distributed as follows:

Fee ComponentRecipientDescription
Priority fee (tip)Batch producer (validator)(effective_gas_price - base_fee) * gas_used
Base feeBase-fee addressbase_fee * gas_used
Gas limit penaltyBase-fee addressQuadratic penalty on unused gas (if applicable)
RemainderRefunded to senderUnused gas minus any penalty

The penalty is deducted from what would otherwise be refunded to the transaction sender. It does not increase the total fee paid beyond the sender’s declared gas_limit * effective_gas_price – it only reduces the refund.

Example Penalty Table

Gas LimitGas UsedUsage %Unused GasPenalty GasPenalty % of Unused
21,00021,000100%000%
210,00021,00010%189,00000%
420,00021,0005%399,00099,75025%
1,000,00021,0002.1%979,000610,99362.4%
5,000,00021,0000.42%4,979,0004,569,54691.8%
10,000,00021,0000.21%9,979,0009,564,28295.8%
30,000,00021,0000.07%29,979,00029,560,76298.6%

How to Avoid Penalties

  1. Use accurate gas estimation. Call eth_estimateGas before submitting transactions and set the gas limit based on the estimate. A reasonable buffer (e.g., 1.5x-2x the estimate) will not trigger penalties as long as the final usage stays above 10% of the gas limit.
  2. Understand the 10x safe zone. As a rule of thumb, if your gas limit is no more than 10x your actual gas consumption, you will never pay a penalty. A simple transfer using ~21,000 gas can safely use a gas limit up to 210,000 with zero penalty.
  3. Small transactions are exempt. Any transaction with a gas limit of 210,000 or less is exempt from penalties entirely, regardless of usage ratio.
  4. Do not hardcode inflated gas limits. Setting a gas limit to the maximum batch gas without estimating actual usage is the primary behavior this penalty targets. Bridge contracts and relayers should always estimate gas for each message rather than using a static high value.

Summary

PropertyValue
Penalty thresholdUsage below 10% of gas limit
ScalingQuadratic (gentle near threshold, steep at extremes)
Minimum gas limit for penalty> 210,000
Penalty destinationBase-fee address (for governance processing)
Maximum penaltyCannot exceed unused gas
Safe multiplierUp to 10x estimated gas = zero penalty

For the exact formula, worked examples, and guidance for wallets and integrators on detecting the charge, see Gas Over-Reservation Penalty.

Gas over-reservation penalty

Telcoin Network charges a penalty when a transaction reserves far more gas than it uses. This page is for transaction senders, wallet developers, and integrators. It explains when the penalty applies, how much it costs, where the funds go, and how to detect it.

Contributor documentation lives in the “Fee economics” section of crates/tn-reth/README.md. The implementation lives in crates/tn-reth/src/evm/utils.rs and crates/tn-reth/src/evm/handler.rs.

Why the penalty exists

Telcoin Network orders transactions in consensus before it executes them. Batch capacity is reserved by each transaction’s gas limit, not by its final gas usage. Without a penalty, a sender could set a very large gas limit, use almost none of it, and consume batch capacity for free. The penalty makes large over-reservation expensive. Issue #424 has the design history.

When the penalty applies

The penalty applies only when both conditions hold:

  1. The gas limit is greater than 210,000. This threshold is MIN_GAS_LIMIT_THRESHOLD, ten times the 21,000 minimum transaction cost.
  2. The transaction uses less than 10 percent of its gas limit.

If either condition fails, the penalty is zero and the sender receives the normal unused-gas refund.

Three details matter for exact accounting:

  • “Gas used” for the penalty is the gas spent before EVM refunds (for example SSTORE clearing refunds). The receipt field gasUsed is measured after EVM refunds, so the two values can differ.
  • The penalty does not depend on transaction success. A reverted transaction that meets both conditions also pays it.
  • System transactions are exempt.

The formula

The node computes the penalty in gas units with u128 integer math (fixed-point precision 10^9):

usage_ratio_scaled = (10^9 * gas_spent) / gas_limit        # integer division
if usage_ratio_scaled >= 10^8:                             # usage >= 10%
    penalty_gas = 0
else:
    unused_gas  = gas_limit - gas_spent
    penalty_gas = ((10^8 - usage_ratio_scaled)^2 * unused_gas) / 10^16

gas_spent is the pre-refund gas. The penalty grows quadratically as usage falls below 10 percent. It approaches full confiscation of the unused gas for extreme over-estimates. It never exceeds the unused gas, so the refund never goes below zero. Integer-only math keeps the result identical on every node. The result changes account balances, so it is consensus-critical.

The charge in wei is:

penalty_wei = penalty_gas * effective_gas_price

Examples

Gas LimitGas UsedUsage %Unused GasPenalty GasPenalty % of Unused
21,00021,000100%000%
210,00021,00010%189,00000%
420,00021,0005%399,00099,75025%
1,000,00021,0002.1%979,000610,99362.4%
5,000,00021,0000.42%4,979,0004,569,54691.8%
10,000,00021,0000.21%9,979,0009,564,28295.8%
30,000,00021,0000.07%29,979,00029,560,76298.6%

These rows mirror the reference table on calculate_gas_penalty. The unit test test_gas_penalty_calculation in the same file asserts the penalty values.

A concrete cost: a simple transfer (21,000 gas used) sent with a 1,000,000 gas limit at an effective gas price of 100 gwei pays a penalty of 610,993 gas. At that price the charge is 6.10993 x 10^16 wei, which is 0.0610993 TEL with the native token’s standard 18 decimal places. The same transfer sent with a gas limit of 210,000 or less pays no penalty.

What the sender pays

The sender prepays gas_limit * effective_gas_price. After execution the node refunds:

refund_wei = (gas_limit - gasUsed - penalty_gas) * effective_gas_price

gasUsed is the post-refund value that appears in the receipt. The net fee is therefore:

net_fee_wei = (gasUsed + penalty_gas) * effective_gas_price

The penalty portion is credited to the chain’s base-fee address for governance processing. It is not burned.

What the receipt shows

Nothing. A penalized transaction and an unpenalized one produce identical receipts. gasUsed does not include the penalty. No EVM log or event marks the charge. Node operators can see tracing debug lines from crates/tn-reth/src/evm/utils.rs and crates/tn-reth/src/evm/handler.rs. System transactions produce no such lines. RPC clients cannot see them.

How to detect the penalty from standard RPC

Wallets and indexers can recover the charge without new RPC methods:

  1. Exact, from balances. For a transaction that only sends value from the sender: net_fee_wei = balance_before - balance_after - value. Then penalty_wei = net_fee_wei - gasUsed * effectiveGasPrice, with both fields taken from the receipt. Adjust balance_after for any internal transfers the sender receives in the same transaction.
  2. Exact or upper bound, from the formula. Recompute the formula with the transaction’s gas field as gas_limit and the receipt’s gasUsed as gas_spent. If the transaction produced no EVM refunds, gasUsed equals the pre-refund gas and the result is exact. If it produced refunds, gasUsed is smaller than the pre-refund gas and the result is an upper bound on the true penalty.

How to avoid the penalty

  • Use eth_estimateGas and set the gas limit near the estimate.
  • Keep the gas limit below ten times the expected gas usage.
  • For small transactions, a gas limit of 210,000 or less is always exempt.

Source of truth

BehaviorCode
Formula and thresholdscrates/tn-reth/src/evm/utils.rs (calculate_gas_penalty)
Refund split and fund destinationcrates/tn-reth/src/evm/handler.rs (TNEvmHandler::reimburse_caller)

This page mirrors those files. Update this page when those files change.

EVM Compatibility

Overview

Telcoin Network runs a standard Ethereum Virtual Machine. There are no custom opcodes, no modified gas costs, and no disabled instructions. Contracts written in Solidity or Vyper deploy and execute identically to Ethereum. Standard tooling, including Hardhat, Foundry, ethers.js, viem, etc., work without modification.

TN supports all standard transaction types:

  • Legacy transactions
  • EIP-2930 (access list)
  • EIP-1559 (type 2)

All Ethereum hardfork rules through Prague/Pectra are active.

The sections below cover the areas where TN diverges from mainnet Ethereum behavior.

Custom Precompiles

TN registers two additional precompiles beyond the standard Ethereum set: a TEL token-issuance precompile at 0x7e1 and a BLS12-381 signature verifier at 0xb151. The standard precompiles (0x01-0x0a etc.) are unchanged.

Both custom addresses hold a single 0xfe (INVALID) byte of code in genesis, so eth_getCode returns 0xfe for them, not 0x. Tooling that infers “not a contract” from empty code will be wrong about these two addresses. The nonzero code is there for two reasons: it keeps the accounts non-empty, which exempts them from EIP-158 state clearing (an account holding only storage counts as empty and would be deleted, wiping the TEL supply counter), and it makes any call that bypasses precompile dispatch fail on the invalid instruction instead of succeeding against an EOA.

TEL Precompile: Token Issuance

The TEL precompile at address 0x00000000000000000000000000000000000007e1 owns the native token’s supply lifecycle: minting, claiming, and burning, plus a totalSupply() view.

Warning

The precompile is not an ERC-20 contract. An earlier design exposed transfer, approve, transferFrom, permit, balanceOf, and the other ERC-20/EIP-2612 selectors at 0x7e1; that surface has been removed. Calling any of them now reverts with Unknown function selector. Do not configure 0x7e1 as a token contract in wallets, bridges, or indexers.

What This Means

TEL is the chain’s native asset. Balances are native account balances, and moving TEL between accounts is an ordinary value transfer (CALL with value) — exactly like moving ETH on Ethereum, and equivalent to what an ERC-20 transfer would have done. Allowances, permits, and other ERC-20 semantics are user-space concerns: protocols that need an ERC-20 representation of TEL wrap it, just as ETH is wrapped into WETH. A canonical wrapper, WTEL, is deployed at 0x239c9fa0a4bfb9b71304e20c094738debfd7e2b0.

Only issuance authority and the supply counter require protocol-level state, so those are all the precompile exposes.

Interface

FunctionAccessGasBehavior
mint(uint256 amount)Governance only41,000Creates a pending mint under a 7-day timelock. A second mint overwrites the pending amount (minting 0 cancels)
claim(address recipient)Governance only25,000After the timelock expires: credits recipient’s native balance, increments totalSupply, clears the pending slots
burn(uint256 amount)Governance only8,000Destroys amount from the precompile’s own balance and decrements totalSupply. The only payable selector: attached value funds the pool it draws from
totalSupply()Any caller2,100Returns the current circulating supply. Callable from STATICCALL

burn is the chain’s only payable inlet at 0x7e1, and like every other issuance selector it is governance-gated. The EVM credits msg.value to the precompile account before the handler runs, so attaching value tops up the pool the burn destroys from. Calling burn(amount) with msg.value == amount funds and burns in a single transaction. Any excess stays in the precompile’s balance for a later burn: it is not refunded, and no selector ever pays balance back out. The genesis account starts at zero balance, a plain value send with empty calldata is refused, and every other selector rejects nonzero value, so a governance burn is the only way an ordinary call can add TEL to the pool.

On testnet builds compiled with the faucet feature, mint becomes an instant mint(address recipient, uint256 amount) with no timelock, and governance can delegate minting via grantMintRole(address) / revokeMintRole(address) / hasMintRole(address). Mainnet binaries are never built with this feature.

Governance is the on-chain governance safe at 0x00000000000000000000000000000000000007a0.

Notable Behaviors

  • Direct calls only: DELEGATECALL and CALLCODE into 0x7e1 still reach the precompile, because revm looks a precompile up by the frame’s code address alone. The dispatcher refuses them with telcoin precompile: only a direct call to 0x7e1 is permitted. Under DELEGATECALL the caller identity the access gates would check is inherited from the parent frame, while the handlers still read and write the canonical 0x7e1 ledger, so authorizing such a frame would mean trusting a spoofable address. The check runs before the calldata length check and before selector dispatch, so read-only selectors are refused through those opcodes too. Only a plain CALL or STATICCALL reaches a handler.
  • STATICCALL write protection: inside a static frame only the read-only selectors are served (totalSupply, plus hasMintRole on faucet builds); every state-mutating selector is refused with static call: state mutation not permitted.
  • Non-payable by default: every selector except burn rejects nonzero call value with call value: selector is not payable, so stray TEL cannot be stranded at the precompile.
  • Rejections consume all gas: every refusal above, plus every unauthorized, decode, or arithmetic failure inside a handler, is a halt, not a revert. revm returns unspent gas only for calls that succeed or revert, and a precompile error is neither. A rejected sub-call therefore loses every unit of gas it was forwarded. Under EIP-150’s default forwarding that is 63/64 of the caller’s remaining gas, leaving the calling frame only the 1/64 it withheld. A rejected top-level transaction is charged its full gas_limit. The zero such a call pushes on the stack (false to a Solidity caller) is not a result to branch on: the gas needed to act on it has already been spent. Probing 0x7e1 with a value-carrying call to see what it does costs the whole gas budget. Satisfy the direct-call, access, static, and payability rules up front rather than planning to recover from a refusal. Neither form surfaces the reason: the call returns no data, and the halt carries no message, so a caller cannot tell from the receipt which rule it broke.
  • Events: Mint(recipient, amount, unlockTimestamp), Claim(recipient, amount), Burn(amount), plus ERC-20-style Transfer events: from address(0) on claim and faucet-mint, to address(0) on burn, and, when a burn is funded with call value, an inbound Transfer(caller, 0x7e1, msg.value) that mirrors the value transfer the EVM performs silently. That inbound log is the one Transfer where neither leg is address(0), and its data field carries the attached value, not the burned amount; the two need not match. A value-funded burn emits three logs in this order: Transfer(caller -> 0x7e1, msg.value), Burn(amount), Transfer(0x7e1 -> address(0), amount). Ordinary native TEL transfers do not emit Transfer events.
  • Supply accounting: totalSupply changes only via claim and burn. It does not track native balance movement such as gas fees or validator rewards.

Implications for Integrations

  • Wallets and explorers should treat TEL as the native asset (like ETH), never as a token at 0x7e1.
  • Bridges and DeFi protocols that need ERC-20 semantics should integrate WTEL, exactly as they would WETH on Ethereum.
  • Indexers tracking supply should watch the precompile’s Mint/Claim/Burn/Transfer events; ordinary TEL movement is visible as native value transfers in transaction traces, not as log events.
  • Indexers that reconstruct TEL as an ERC-20 balance sheet from those Transfer logs must credit the inbound Transfer(caller, 0x7e1, msg.value) on a value-funded burn. It exists for exactly this audience: skip it and the precompile’s balance drifts negative, because tokens leave a pool they were never seen entering.
  • Even with that log credited, the Transfer stream is a complete account of the precompile’s balance only across paths that run precompile code. SELFDESTRUCT naming 0x7e1 as its beneficiary still transfers the balance under EIP-6780 — only the account deletion was removed — and does so with no log and no precompile frame, so the precompile cannot mirror it. Reconcile against 0x7e1’s native balance rather than treating the log stream as closed.

BLS Precompile: Signature Verification

The BLS precompile at address 0x000000000000000000000000000000000000b151 verifies BLS12-381 signatures using the same blst (min_sig) implementation the consensus layer uses to produce them, so on-chain verification can never diverge from what validators sign. Its ABI matches IBlsG1.sol in tn-contracts.

Interface

blsVerify(bytes signature, bytes pubkey, bytes message) → bool
  • signature — 48-byte compressed G1 point.
  • pubkey — 96-byte compressed G2 point.
  • message — raw bytes, at most 4,096 bytes; hash-to-curve with the protocol’s domain-separation tag happens inside the verifier.

These are the protocol’s own compressed encodings — the identical bytes validators submit as proof-of-possession signatures to stake/delegateStake. Only exact 48/96-byte compressed encodings are accepted; uncompressed points are rejected.

Behavior

  • Returns ABI-encoded true/false. Malformed points, wrong lengths, and failed verifications all return false — the precompile never reverts on bad cryptographic input, matching BlsG1.blsVerify’s boolean contract.
  • Callable from STATICCALL (it is a pure view): ConsensusRegistry reaches it that way to verify validator proof-of-possession on staking.
  • Gas: 150,000 base plus 12 gas per 32-byte word of the ABI-encoded arguments (signature, pubkey, and message together), charged before the arguments are decoded.

Fee Distribution

TN modifies where transaction fees are sent compared to Ethereum.

Fee ComponentEthereumTelcoin Network
Priority fee (tip)Block proposerBatch producer (validator)
Base feeBurned (EIP-1559)Credited to the base-fee address (for governance processing)
Gas limit penaltyN/ACredited to the base-fee address (for governance processing)

The base fee is not removed from circulation on TN. It is credited to the chain’s base-fee address (the governance safe by default) for protocol use. See basefees for details on how the base fee adjusts per epoch, and penalties for the quadratic gas limit penalty mechanism.

Chain IDs

NetworkChain ID
Mainnet731
Testnet2017

Blob Transactions (EIP-4844)

TN does not support blob transactions yet. While the EIP-4844 transaction type is recognized, blob gas pricing is effectively disabled. Applications should use standard EIP-1559 transactions.

Block Header Differences

TN repurposes several Ethereum block header fields to carry consensus-layer metadata. These differences do not affect contract execution but are relevant for indexing tools, block explorers, or services that read block headers directly.

Repurposed Fields

FieldEthereum MeaningTN Meaning
noncePoW mining nonceEpoch and consensus round, packed as (epoch << 32) | round
difficultyNetwork difficultyWorker ID and batch index, packed as (batch_index << 16) | worker_id
mix_hashPoW mix digestFork-gated (see Deriving the mix_hash field): on adiri before epoch 574, consensus output digest XOR’d with batch digest (just the output digest if no batches); from adiri epoch 574, and on mainnet from genesis, keccak256("TN_PREVRANDAO_V1" || epoch seed chain value as of this commit || consensus block number || batch index), the latter two little-endian u64
ommers_hashUncle block hashDigest of the consensus Batch executed to produce this block. B256::ZERO if no batches
parent_beacon_block_rootBeacon chain parent rootDigest of the ConsensusHeader that committed the transactions
extra_dataArbitrary miner dataCommittee-shuffle seed (the epoch seed chain value as of the closing commit) at epoch boundaries, empty bytes otherwise
base_fee_per_gasAdjusts per block (EIP-1559)Fixed for the entire epoch, adjusts at epoch boundaries. See basefees
withdrawalsBeacon chain withdrawalsValidator reward records at epoch boundaries, empty otherwise

The mix_hash derivation changed at the PREVRANDAO fork: adiri epoch 574, mainnet from genesis. On adiri, blocks from epochs before 574 use the legacy output_digest ^ batch_digest form, and blocks from epoch 574 onward use the seed-chain derivation. Mainnet builds use the seed-chain derivation at every epoch. Indexers that reproduce adiri mix_hash values from consensus data must branch on the block’s epoch (the upper 32 bits of nonce).

The seed chain value in that hash is the block’s own commit-level value, and the chain advances at every commit. It matches the extra_data of the epoch’s closing block only for that closing block itself; mid-epoch values appear on no executed header. To reproduce mix_hash for any other block, fold the epoch’s seed chain forward from consensus data — the epoch root, then each commit’s leader round and seed signature — up to the commit that produced the block.

Fixed / Unused Fields

FieldValueNotes
requests_hashEMPTY_REQUESTS_HASHEIP-7685 deposit requests not used
excess_blob_gas0Blob transactions not used

Decoding the difficulty Field

The difficulty field packs two values:

difficulty = (batch_index << 16) | worker_id
  • Bits 0-15 (lower 16 bits): worker_id
  • Bits 16+ (upper bits): batch_index

To extract them:

worker_id  = difficulty & 0xFFFF
batch_index = difficulty >> 16

Decoding the nonce Field

The nonce field packs epoch and round:

nonce = (epoch << 32) | round
  • Upper 32 bits: epoch number
  • Lower 32 bits: consensus round number

Deriving the mix_hash Field

mix_hash (exposed to contracts as PREVRANDAO, EIP-4399) is fork-gated on the epoch of the committing leader, which is recoverable from the upper 32 bits of the block’s nonce. The PREVRANDAO fork is adiri epoch 574 (PREVRANDAO_FORK_EPOCH in tn-types forks.rs, compiled only into adiri builds); mainnet builds use the post-fork derivation from genesis.

  • Before the fork (adiri epochs below 574): the consensus output digest XOR’d with the batch digest; just the output digest when the output carried no batches (the epoch-closing block). Both inputs are on the block header, so this equals parent_beacon_block_root ^ ommers_hash.

  • From the fork on (adiri epoch 574 onward, every mainnet epoch):

    mix_hash = keccak256("TN_PREVRANDAO_V1" || seed || consensus_block_number || batch_index)
    

    where seed is the 32-byte epoch seed chain value as of the committing consensus output. The chain folds one seed signature per commit, so the value advances every commit; the closing commit’s value is the one published as extra_data on the epoch’s closing block. The two integers are little-endian u64s. The gate also requires the seed-signature fork (adiri epoch 383), so it never hashes the legacy leader-aggregate seed that pre-383 epochs carry; on adiri that fork is already active by epoch 574.

On adiri, indexers reproducing mix_hash from consensus data must branch on the block’s epoch, not on node version or wall-clock time.

Note on bias: the seeded derivation removes payload grinding (every input is pinned by the committed order, so the leader cannot generate candidate values by re-cutting its proposal), but the committing leader can still compute every PREVRANDAO its commit will produce before broadcasting and withhold the proposal (one propose-or-withhold choice per commit). Contracts that need unbiasable randomness must not rely on PREVRANDAO alone.

Summary

PropertyEthereumTelcoin Network
EVM opcodesStandardStandard (identical)
Gas costsStandardStandard (identical)
Transaction typesLegacy, EIP-2930, EIP-1559, EIP-4844Legacy, EIP-2930, EIP-1559
Native asset ERC-20Requires WETH wrapperRequires WTEL wrapper
Custom precompilesNoneTEL issuance at 0x7e1, BLS verify at 0xb151 (both report 0xfe code)
Base fee destinationBurnedBase-fee address (governance)
Blob transactionsSupportedNot used
Contract languagesSolidity, Vyper, etc.Same
ToolingHardhat, Foundry, ethers.js, viemSame
Chain IDs1 (mainnet)731 (mainnet), 2017 (testnet)

Epoch Boundaries

Overview

Telcoin Network organizes consensus into fixed-duration epochs. Within an epoch, a stable committee of validators produces and orders transaction batches. At the boundary between epochs, the protocol performs three critical operations:

  1. Distribute validator rewards for work done during the epoch
  2. Select and shuffle the next validator committee using verifiable randomness
  3. Adjust the base fee based on the epoch’s aggregate gas usage

These operations execute as system calls within the last block of the epoch. They are deterministic and they do not consume block gas.

Epoch Boundary Detection

Each epoch has a predefined time boundary. The consensus layer monitors the committed timestamp of each sub-DAG output. When an output’s committed timestamp exceeds the epoch boundary, the system sets a close_epoch flag on that output.

The execution engine checks this flag during block finalization. When present, it triggers the epoch-closing system calls before completing the block. If the epoch’s final consensus output contains no transaction batches, a single empty block is created specifically to carry these system calls.

Step 1: Distribute Validator Rewards

How Rewards Are Tracked

During the epoch, the protocol tracks how many consensus headers each validator committed as leader. Every time a validator’s leader certificate triggers a commit, their count increments by one. This happens regardless of whether the output contains transactions. Leaders for empty rounds still receive rewards for advancing the canonical consensus chain.

The tracking is purely in-memory. If a node restarts mid-epoch, it rebuilds the counts by walking already-executed blocks and replaying any consensus output that was committed but not yet processed.

How Rewards Are Applied

At the epoch boundary, the accumulated leader counts are converted into reward records:

FieldValue
validatorAddressThe validator’s execution layer address
consensusHeaderCountNumber of consensus headers they committed as leader

These records are passed to the ConsensusRegistry contract via the applyIncentives system call. The contract distributes the epoch’s issuance among validators, weighted by each validator’s stake and consensus header count; accrued rewards are paid out through the Issuance contract when claimed.

Reward records are also stored in the block body’s withdrawals field (repurposing the Ethereum withdrawal mechanism). This makes reward distribution visible to block explorers and indexers without requiring them to trace system call execution. Outside of epoch boundaries, the withdrawals field is empty. See EVM Compatibilty for details on repurposed block header fields.

Step 2: Select and Shuffle the Validator Committee

Why Shuffling Matters

A predictable committee order could enable targeted attacks against specific validators. TN uses verifiable randomness derived from BLS signatures to shuffle the committee, ensuring no party can predict or manipulate the ordering.

The Selection Process

  1. Read eligible validators — the protocol queries the ConsensusRegistry contract for all validators with Active or PendingActivation status
  2. Handle insufficient validators — if the number of active validators is less than the required committee size, validators with PendingExit status are randomly selected to fill the remaining slots
  3. Generate randomness — the epoch seed chain produces a 32-byte seed: each epoch starts from a root derived from the epoch number, and every committed sub-DAG folds the committing leader’s round and its deterministic BLS seed signature into the running value. The seed is deterministic (all nodes compute the same value) and unpredictable (it cannot be computed before the immediately preceding commit is published)
  4. Fisher-Yates shuffle — the validator list is shuffled using the BLS-derived seed as the random number generator input
  5. Truncate to size — the shuffled list is trimmed to the target committee size
  6. Sort by address — the selected committee is sorted in ascending address order for deterministic indexing
  7. Commit on-chain — the new committee is passed to ConsensusRegistry.concludeEpoch(newCommittee)

Validator Status Transitions

The ConsensusRegistry contract manages validator lifecycle:

StatusMeaning
ActiveEligible for committee selection
PendingActivationStaked and activated mid-epoch; eligible for selection, becomes Active at the boundary
PendingExitRequested to leave but may be retained if the committee is short

Validators transition between states based on on-chain governance actions. The epoch boundary is when these transitions take practical effect. Newly activated validators become eligible starting from the next epoch’s committee selection.

Step 3: Adjust the Base Fee

At the epoch boundary, the protocol evaluates each worker’s aggregate gas usage against that worker’s gas target and adjusts its base fee for the next epoch using the EIP-1559 algorithm.

The GasAccumulator tracks three metrics per worker throughout the epoch:

MetricDescription
blocksNumber of blocks the worker produced
gas_usedTotal gas consumed across all blocks
gas_limitTotal gas limit across all blocks

These totals drive the base fee adjustment:

  • Gas used = target — base fee stays the same
  • Gas used > target — base fee increases (bounded by EIP-1559 max change denominator)
  • Gas used < target — base fee decreases (with a protocol-defined minimum floor)

After adjustment, all accumulators are cleared for the next epoch. See Basefees for the full base fee model.

System Calls

The epoch-closing operations execute as system calls, which are special transactions issued by the protocol rather than by users.

PropertyValue
CallerSYSTEM_ADDRESS (0xfffffffffffffffffffffffffffffffffffffffe)
TargetConsensusRegistry contract
Gas limit100,000,000 per call
Gas price0 (no cost to the block)
Nonce checkDisabled
State changesCommitted immediately

System calls are invisible to users. They do not appear in the transaction list, do not consume block gas, and do not affect the gas used counter. Their effects are visible only through state changes (updated balances, committee rotations) and the block header metadata (extra_data and withdrawals fields).

Pre-Execution System Calls

In addition to epoch-closing calls, every block includes pre-execution system calls that run before user transactions:

  • Consensus root storage (EIP-4788 style) — the first batch in each consensus output writes the ConsensusHeader digest to the beacon roots contract, making consensus data accessible to smart contracts
  • Block hash history (EIP-2935) — the parent block hash is stored in the history contract for on-chain lookups

Block Header at Epoch Boundaries

Two block header fields change behavior at epoch boundaries:

FieldAt epoch boundaryNormal blocks
extra_dataCommittee-shuffle seed (the epoch seed chain value)Empty bytes
withdrawalsValidator reward distribution recordsEmpty list

The extra_data value serves as a public indicator that the epoch closed at this block. It also provides the randomness seed used for committee shuffling, allowing anyone to verify the shuffle was performed correctly.

Summary

PropertyValue
TriggerCommitted timestamp exceeds epoch boundary
OperationsRewards, committee shuffle, base fee adjustment (in that order)
Execution methodSystem calls (zero gas cost, no user-visible transactions)
Randomness sourceEpoch seed chain (BLS seed signatures folded across the epoch’s commits)
Shuffle algorithmFisher-Yates with BLS-derived seed
Reward trackingLeader block count per validator across the epoch
Base fee adjustmentEIP-1559 formula applied to epoch aggregate gas usage
Visible in headersextra_data (shuffle seed) and withdrawals (rewards)

Canonical Updates

Overview

Telcoin Network maintains three complementary chains:

  1. Consensus Chain — a hash-linked chain of ConsensusHeaders that records the ordering decisions made by BFT consensus. This chain is the source of truth for transaction ordering.
  2. Execution Chain — a standard Ethereum-compatible chain of blocks. Each block contains executed transactions and the resulting state changes.
  3. Epoch Chain — a hash-linked chain of EpochRecords, one per epoch, that checkpoint committee membership and chain state at each epoch boundary. This chain enables trustless node synchronization without requiring execution state.

The key architectural principle is consensus-first execution: transactions are ordered by consensus before they are executed. The consensus layer determines what transactions run and in what order. The execution layer applies them to EVM state.

This separation means the consensus layer is execution-agnostic. It operates on raw transaction bytes and cryptographic certificates without any knowledge of EVM, gas, or smart contracts. Different execution environments can be supported in the future without modifying the consensus protocol.

The Consensus Chain

ConsensusHeaders

The consensus chain is a sequence of ConsensusHeaders, each linked to its predecessor by a parent_hash:

FieldDescription
parent_hashKeccak-256 hash of the previous ConsensusHeader
sub_dagThe committed sub-DAG from consensus (contains ordered certificates)
numberBlock height in the consensus chain

Each header’s digest is computed from hash(parent_hash || sub_dag.digest() || number), forming a tamper-evident chain.

Committed Sub-DAGs

TN uses a DAG-based BFT consensus protocol (Bullshark). Validators produce certificates that reference prior certificates, forming a directed acyclic graph. When a leader certificate reaches a quorum of support, the sub-DAG it commits is finalized.

A CommittedSubDag contains:

  • Certificates — signed proposals from validators, each referencing batches of transactions
  • Leader certificate — the certificate that triggered the commit
  • Reputation scores — per-validator performance metrics from the round
  • Commit timestamp — when the sub-DAG was committed

BLS Signatures

Every certificate carries an aggregated BLS signature from the quorum of validators that endorsed it. These signatures serve two purposes:

  1. Verification — any node can verify a certificate’s authenticity against the known committee without re-executing transactions
  2. Randomness — at epoch boundaries, committee shuffling is seeded by the epoch seed chain: each committed leader header carries a deterministic BLS seed signature, and every commit folds it into a running hash across the epoch (see Epoch Boundaries)

Certificates can be verified directly (checked against the current committee) or indirectly (verified through a chain of trust from a previously verified certificate).

The Execution Chain

From Consensus Output to EVM Blocks

When a sub-DAG is committed, the consensus layer produces a ConsensusOutput. The output is an enriched view of the committed data that includes the actual transaction bytes. The execution engine processes this output to extend the EVM chain.

The flow:

  1. Consensus commits a sub-DAG, producing a ConsensusOutput
  2. Batches are extracted — each certificate may contain one or more batches of transactions from different workers
  3. One EVM block per batch — the engine creates and executes one block for each batch, in order
  4. State is updated — each block’s state changes are committed to the EVM state trie

Each batch carries its own metadata:

  • Beneficiary — the validator address that produced the batch (receives priority fees)
  • Base fee — the base fee for this epoch
  • Worker ID — which worker produced the batch
  • Transactions — serialized transaction bytes

When Blocks Are Produced

Not every consensus output results in new EVM blocks. The behavior depends on whether the output contains batches and whether the epoch is closing:

ConditionResult
Output contains batchesOne EVM block per batch
No batches, epoch not closingNo block produced — execution is skipped entirely
No batches, epoch is closingOne empty block created to execute epoch-closing system calls

The “no batches, not closing” case is important for efficiency. Consensus continues to run and commit sub-DAGs even when there are no user transactions. In these cases, the execution chain does not advance, avoiding unnecessary empty blocks. The consensus leader’s participation is still tracked for reward purposes. Consistently extending the consensus chain is important to confirm validators are not byzantine and the network is live.

When an epoch is closing but there are no batches, a single empty block is created specifically to trigger the system calls that distribute rewards and rotate the validator committee. See Epoch Boundaries for details.

Block Header Metadata

Each EVM block header carries consensus metadata in repurposed Ethereum header fields. The parent_beacon_block_root field stores the ConsensusHeader digest, linking each execution block back to the consensus chain. Other fields encode the epoch, round, worker ID, and batch index. See EVM Compatibility for the full mapping.

The Epoch Chain

EpochRecords

The epoch chain is a sequence of EpochRecords, one per epoch, each linked to its predecessor by a parent_hash:

FieldDescription
epochThe epoch number (block height in the epoch chain)
committeeBLS public keys of the active committee for this epoch
next_committeeBLS public keys of the committee for the next epoch
parent_hashKeccak-256 hash of the previous EpochRecord
final_stateBlock number and hash of the last execution block in this epoch
final_consensusBlock number and hash of the last ConsensusHeader in this epoch

Each record’s digest is computed from all its fields, forming a tamper-evident chain. The final_state and final_consensus fields serve as signed checkpoints and anchor the epoch chain to both the execution chain and the consensus chain, allowing any node to verify that all three chains agree.

EpochCertificates

Epoch records are signed by the outgoing committee at the start of the next epoch. This happens asynchronously, so the network continues operating while signatures are collected in the background.

The signing process:

  1. Voting — each committee member produces an EpochVote: a BLS signature over the record’s digest, scoped with an EpochBoundary intent to prevent signature reuse across different protocol contexts
  2. Aggregation — votes are collected and aggregated into an EpochCertificate containing a single aggregated BLS signature and a bitmap indicating which committee members signed
  3. Threshold — a certificate is valid when it contains signatures from a super-quorum (2/3 + 1) of the committee

Different nodes may hold certificates with different signer sets. This is expected and correct because all that matters is that each certificate meets the super-quorum threshold. Every node that stores a valid certificate also becomes a source for other syncing nodes.

Why the Epoch Chain Exists

The epoch chain solves a bootstrapping problem: a syncing node needs to know which validators form the committee for each epoch in order to verify consensus output, but the on-chain committee state only becomes available after execution catches up.

The epoch chain breaks this circular dependency by providing committee membership and chain checkpoints through a lightweight, independently verifiable structure. A node with only the genesis committee can:

  • Verify epoch 0’s record using the genesis committee’s signatures
  • Learn epoch 1’s committee from epoch 0’s next_committee field
  • Verify epoch 1’s record using that committee
  • Continue forward through every epoch, acquiring all committee memberships

This requires no execution state and no trust beyond the genesis committee. One epoch record is generated per day, so the total sync burden for the epoch chain is minimal even after years of operation.

Security Properties

The epoch chain derives its security from five reinforcing mechanisms:

  1. BLS aggregate signature verification — each certificate is verified against the known committee’s public keys. Intent-scoped signing prevents signatures from being replayed across different protocol contexts (e.g., a consensus certificate signature cannot be reused as an epoch vote).
  2. Parent hash chaining — each record commits to the previous record’s digest. Records cannot be reordered, omitted, or inserted without breaking the chain. Verification is sequential from genesis, so a valid chain of records implies a valid history.
  3. Committee continuity — each record’s committee is validated against the previous record’s next_committee field. This ensures that committee transitions follow the on-chain governance decisions made during the epoch. The validation tolerates validator dropouts between epochs (requires at least 2/3 overlap and a minimum of 4 committee members).
  4. Super-quorum threshold (2/3 + 1) — the standard BFT safety bound. Up to 1/3 of the committee can be Byzantine (malicious or offline) without compromising the validity of epoch records. A valid certificate proves that at least 2/3 + 1 honest validators agreed on the record’s contents.
  5. Deterministic record content — all nodes produce identical epoch records from the same inputs. There is no ambiguity about what an epoch record should contain for a given epoch. A valid super-quorum certificate therefore proves that the committee reached agreement on a single, deterministic record.

Attack Surfaces and Mitigations

AttackRisk LevelMitigation
Fake epoch records from peersMitigatedThree-part validation at the application layer: parent hash match, committee validity, BLS certificate verification. Invalid records are rejected before storage.
1/3 Byzantine committeeAccepted (BFT bound)The 2/3 + 1 signature threshold is the standard Byzantine fault tolerance bound. Safety holds as long as fewer than 1/3 of committee members are malicious.
Long-range fork (replaying old valid records)MitigatedParent hash chaining and sequential sync from genesis prevent forking. An attacker cannot substitute an alternative history without producing a valid chain from genesis with super-quorum signatures at every epoch.
Eclipse attack during syncNetwork-levelIf an attacker controls all of a syncing node’s peers, they could serve a fabricated chain. Mitigation relies on peer diversity at the network layer and trusted bootstrap peers.
Dropped validator between epochsAcceptedA validator may be removed on-chain between when the epoch record is created and when it is signed. Committee validation tolerates this as long as at least 2/3 overlap is maintained between the expected and actual committee.
Delayed certificate availabilityBy designCertificates are collected asynchronously after the epoch closes. If a peer does not yet have a certificate, the syncing node retries. Sync stalls briefly but cannot accept invalid records.

Execution-Agnostic Consensus

The consensus layer has no dependency on EVM or any specific execution environment:

  • Raw bytes — transactions are stored and ordered as opaque byte arrays (Vec<Vec<u8>>). Consensus does not parse, validate, or interpret transaction contents.
  • No gas awareness — consensus orders transactions before gas costs are known. The gas limit penalty mechanism (see Gas Limit Penalty) exists specifically because consensus cannot know actual gas usage at ordering time.
  • Cryptographic verification only — ConsensusHeaders can be validated using only BLS signature verification and hash checks, without executing any transactions.

This design means the consensus protocol could support alternative execution environments (e.g., a WASM VM or a ZK execution layer) by changing only the execution engine, not the consensus layer.

Trustless Node Synchronization

TN can synchronize any node from genesis with a single trust anchor: knowledge of the genesis committee. The three chains — epoch, consensus, and execution — work together to enable this.

Node Types

  • Active validators participate in consensus directly and execute blocks as they are committed
  • Observer nodes follow the consensus chain by streaming ConsensusHeaders from peers without participating in consensus rounds
  • Rejoining validators stream headers while syncing batches to catch up with the current state before rejoining consensus

Step 1: Sync the Epoch Chain

The syncing node downloads and verifies epoch records sequentially, starting from epoch 0:

  1. Request an epoch record and its certificate from any peer
  2. Verify three properties:
    • The record’s parent_hash matches the previous record’s digest (chain integrity)
    • The record’s committee matches the previous record’s next_committee (committee continuity)
    • The certificate contains a valid super-quorum BLS signature from the expected committee (authenticity)
  3. Store the verified record and certificate to support other syncing nodes
  4. Repeat for the next epoch until no more records are available

For epoch 0, the genesis committee serves as the trust anchor. Each subsequent epoch’s committee is learned from the previous record’s next_committee field, extending the chain of trust forward.

This step produces two critical outputs:

  • Committee membership for every epoch (required to verify consensus output)
  • Checkpoint hashes — final_consensus and final_state from each record provide verified anchor points for the consensus and execution chains

The epoch chain is lightweight and only contains one record per epoch (approximately one per day). Syncing the epoch chain completes quickly even after years of operation. On node restart, sync always begins from epoch 0 to backfill any gaps.

Step 2: Sync Consensus Headers

Using the verified checkpoint hashes from epoch records, the node downloads consensus headers:

  1. Obtain a verified hash — epoch records provide the final_consensus hash (the last ConsensusHeader digest for each epoch). Current committee members also gossip live consensus output with signatures, providing the latest hash.
  2. Walk backwards — request the ConsensusHeader for the verified hash from a peer. Verify the header’s digest matches. Then request its parent header using the parent_hash field. Repeat until all missing headers are retrieved.
  3. Verify each header — every ConsensusHeader contains certificates with aggregated BLS signatures that can be verified against the known committee for that epoch (obtained in Step 1).

Consensus header sync can proceed in parallel with epoch record sync. As soon as a new epoch record provides a checkpoint hash, the node can begin downloading that epoch’s consensus headers.

Verified hash sources, in order of availability:

SourceWhen AvailableNotes
Epoch records (final_consensus)After epoch record syncHistorical checkpoint per epoch
Live committee gossipOnce current committee is knownProvides the latest consensus header hash in real time
Execution blocks (parent_beacon_block_root)After execution syncEach block stores the ConsensusHeader digest that produced it — useful for fork detection but lags behind consensus

Step 3: Re-execute Batches

Once the node has an unbroken chain of consensus headers, it replays them forward to reconstruct EVM state:

  1. Order headers — consensus headers were retrieved backwards (newest to oldest) but must be executed forwards (oldest to newest)
  2. Extract batches — each ConsensusHeader contains a CommittedSubDag with ordered certificates referencing transaction batches
  3. Execute blocks — one EVM block is created and executed per batch, applying each transaction to the state trie
  4. Verify state — epoch records provide final_state checkpoints (block number and hash) that the node can verify against its locally computed execution state at each epoch boundary

This step transforms the cryptographically verified ordering (consensus chain) into the actual account state, balances, and contract storage (execution chain).

Recovery After Restart

When a node restarts mid-epoch, it must rebuild its in-memory state:

  1. Walk already-executed blocks for the current epoch to restore gas statistics and leader counts
  2. Replay any consensus output that was committed but not yet executed before shutdown
  3. Resume live consensus participation

This ensures no consensus rounds are skipped or double-counted.

Summary

PropertyConsensus ChainExecution ChainEpoch Chain
UnitConsensusHeaderEVM BlockEpochRecord
Linkingparent_hash → digest chainparent_hash → block hash chainparent_hash → record digest chain
ContentCertificates, batches (raw bytes)Transactions, receipts, state changesCommittee keys, state checkpoints
VerificationBLS signatures + hashesState root + receipt rootBLS super-quorum (2/3 + 1) certificate
AdvancementEvery committed sub-DAGOnly when batches exist or epoch closesOnce per epoch
PurposeTransaction orderingState executionTrustless committee sync

Maintainers

These pages are for maintainers who cut releases or hold a release signing key.

  • Releasing walks through the seven steps from the release PR to a published and verified release, and what to do when a step fails.
  • YubiKey signing setup gets your OpenPGP key, generated on a YubiKey that it never leaves, onto the allowlist in tn-release-signing and into this repository’s releases, and sets up registry access on the build server.

Operators install a release with Installing a release and read what changed in Release notes.

What a release contains

Every release ships the node: its tarball, its image in the network’s package, tn-mainnet for mainnet tags and tn-testnet for Adiri tags, IMAGE_DIGEST, which names that image by digest, SHA256SUMS and SHA256SUMS.asc. A release also ships the edge services, worker-gateway and node-record-api, when etc/release-components at the tagged commit names them; a tag without that file ships the node alone. Each edge service ships a tarball, an IMAGE_DIGEST-<service> file and an image in a package of its own, ghcr.io/telcoin-association/tn-worker-gateway or ghcr.io/telcoin-association/tn-node-record-api, which mainnet and Adiri tags share; publishing moves its :latest to the newest mainnet final and its :adiri to the newest Adiri final. The node’s image is built from etc/Dockerfile, the edge services’ from bin/worker-gateway/Dockerfile and bin/node-record-api/Dockerfile. SHA256SUMS lists only the node’s files and the chain-config files, the shape the deployment scripts in tn-node-deployment accept. The edge files are listed in a second manifest, SHA256SUMS-edge, which the same maintainer keys sign in SHA256SUMS-edge.asc under the same threshold. The deployment scripts install and verify the node from a release; they set up the worker gateway from an image digest, on testnet and mainnet only the one that their own signed script release pins, read no edge-service file of a release, and do not install node-record-api, so Installing a release has the operator check for the edge services.

make docker-worker-gateway and make docker-node-record-api push unsigned ad-hoc images to ghcr.io/telcoin-association/tn-dev as dev-<binary>-<TAG>, as make docker-adiri and make docker-devnet do for the node. tn-dev holds no release, and there is no devnet release channel.

How a release is trusted

The keys that can sign a release are in tn-release-signing, the repository of maintainer keys that every signed Telcoin project shares, one file per maintainer in keys/, named after their GitHub handle. This repository carries it as the release submodule, and only the keys at the commit main records for release count. Every key in that shared allowlist can sign a release of this repository. A key on that allowlist signs the git tag, and a key on it, usually the same one, signs SHA256SUMS.asc, the detached signature over the checksums of the tarball and of the image digest. One signature is required: KEYS.md in tn-release-signing states the threshold, Signatures required: 1, and MIN_SIGNATURES in etc/release.sh may raise it but never lower it. In a release that ships the edge services the same key also signs SHA256SUMS-edge.asc, the detached signature over SHA256SUMS-edge, which needs as many signatures as SHA256SUMS.asc. CI, the release scripts and the operator check in Installing a release read the allowlist at that commit, never from the tagged tree or from the submodule’s checked-out files, so a tag cannot bring its own key. A key reaches this repository’s releases only through a pull request that moves the release pointer, which needs the review of a maintainer who holds a release key; Moving the submodule pointer has the steps. The node deployment scripts carry their own copies of the keys in each signed script release, so a release installs on an operator’s host only when the script release that host runs carries the key of one of its signers, and a mainnet host builds a tag from source only when it carries the key that signed the tag.

Signing happens on a maintainer’s macOS laptop, with a key that was generated on a YubiKey and never leaves it. Building happens on the build server, an Ubuntu or Debian Linux x86_64 host that holds the registry credential and never sees the YubiKey. A release that passes make release-verify needs both machines: the build server builds and pushes the images, and the YubiKey signs the checksums.

The signature shows that a maintainer approved the files. It does not show that they were built from the tagged source: release builds are not reproducible, and there is no SBOM or third-party build provenance. The moving image tags :latest and :adiri are not signed, and whoever holds the registry credential can move them, which is why operators pin the digest from IMAGE_DIGEST or IMAGE_DIGEST-<service>.

Where things live

PathWhat it holds
release/The tn-release-signing submodule: the allowlist in keys/, one <handle>.asc public key per maintainer, yubikey-setup.sh, which make yubikey-setup runs, and the shared maintainer guides in docs/
release/KEYS.mdThe maintainer key table that operators check fingerprints against, the signature threshold, and the rules for changing them
.gitmodules and .github/CODEOWNERSWhere the release submodule is fetched from, and the rule that puts every change to it or to the release pointer in front of a maintainer who holds a release key
SECURITY.mdHow releases are signed and verified, for reporters and operators
CHANGELOG.md and cliff.tomlThe release notes git-cliff generates from commit messages, and its configuration
etc/release.shEvery release step; the release-* Make targets call it
etc/release-componentsThe components a tag ships, one name per line: node, which every release ships, and worker-gateway and node-record-api when the release ships them; a tag without the file ships the node alone
etc/Dockerfile, bin/worker-gateway/Dockerfile and bin/node-record-api/DockerfileThe release images of the node and of the two edge services, which make release-build builds from the tagged commit
Makefilerelease-prep, release-tag, release-build, release-sign, release-verify, release-publish, docker-login and yubikey-setup
.github/workflows/release.yamlCI that validates a pushed tag, creates the draft release, and verifies a published release
.github/ACTIONS.mdHow CI works, including the release workflow and the attestation that the merge queue relies on

Releasing

A release goes from a release PR to a published GitHub release in seven steps. CI validates the signed tag and creates a draft release; it never builds anything. The maintainer builds on the build server, signs on the laptop, and publishes from the build server once every check passes. A release ships the node, and also the two edge services, the worker gateway and the node-record API, when the tagged commit names them, as Edge services describes. Each step is a make target that calls etc/release.sh. release-tag, release-sign and release-publish show what they are about to do and wait for you to type yes. The examples use v0.17.0-adiri.

At a glance

StepWhereCommandResult
1. Release PRbuild servermake release-prep TAG=v0.17.0-adiri, a PR merged alone, then ALLOW_STALE_BASE=1 make attest on the release commitThe attested release: v0.17.0-adiri commit on main
2. Taglaptopmake release-tag TAG=v0.17.0-adiriA signed tag on GitHub
3. Validate and draftCIruns when the tag is pushedA draft release with generated notes
4. Buildbuild servermake release-build TAG=v0.17.0-adiriThe node image pushed to tn-testnet as :v0.17.0-adiri, and each edge service’s image to its own package under the same tag; the tarballs, the digest files, SHA256SUMS and, with edge services, SHA256SUMS-edge on the draft
5. Signlaptopmake release-sign TAG=v0.17.0-adiriSHA256SUMS.asc, and with edge services SHA256SUMS-edge.asc, on the draft
6. Verify and publishbuild servermake release-verify TAG=v0.17.0-adiri, then make release-publish TAG=v0.17.0-adiriThe published release, and the channel aliases moved if it is the newest release
7. Post-publish checkCIruns when the release is publishedThe same verification, repeated on a GitHub runner

Release channels

TagNetworkBuild featuresImage packageImage tagsGitHub release
vX.Y.Zmainnetnonetn-mainnet:vX.Y.Z, :latestLatest, or a normal release if a higher mainnet version, tagged after it, was published first
vX.Y.Z-rcNmainnet release candidatenonetn-mainnet:vX.Y.Z-rcN onlyPre-release
vX.Y.Z-adiriAdiri testnetadiritn-testnet:vX.Y.Z-adiri, :adiriPre-release
vX.Y.Z-adiri-rcNAdiri release candidateadiritn-testnet:vX.Y.Z-adiri-rcN onlyPre-release

Each network has its own image package: ghcr.io/telcoin-association/tn-mainnet for mainnet tags and ghcr.io/telcoin-association/tn-testnet for Adiri tags. etc/release.sh takes the package from the tag alone, and ./etc/release.sh parse <TAG> prints it as PACKAGE; RELEASE_REPO changes only the repository owner in it. Every step that reads or writes IMAGE_DIGEST requires exactly one line, <package image>@sha256:<64 hex>, naming the tag’s package: release-build’s own check of the draft, release-sign, which checks again right before it signs, release-verify, release-publish, and in CI draft-release and verify-release. Each refuses an image in another package, several lines, a line without a digest and a malformed digest alike, and the refusal says what the file holds, the tag’s channel, its package and the line expected, as in IMAGE_DIGEST names an image in ghcr.io/telcoin-association/tn-mainnet, but v0.17.0-adiri is on the adiri channel, whose images are published only in ghcr.io/telcoin-association/tn-testnet (expected the one line ghcr.io/telcoin-association/tn-testnet@sha256:<64 hex>). make docker-adiri and make docker-devnet push their ad-hoc dev-<flavor>-<TAG> images to ghcr.io/telcoin-association/tn-dev, never to a release package; the earlier package ghcr.io/telcoin-association/telcoin-network never held a release and is no longer used. There is no devnet release channel: devnet images exist only as these unsigned ad-hoc builds.

release-build pushes the node’s image to the tag’s package under the tag name. release-publish moves :latest or :adiri, inside the same package, only when the release is the highest published final version in its channel, so publishing a lower version after a higher one does not move the alias back. It marks a release Latest only when it is a mainnet final release with the highest published mainnet version, and every release candidate and Adiri release a pre-release. The version rules below refuse a final version that is not higher than every final version already tagged in its channel, so a patch to an earlier minor version, such as v1.1.1 once v1.2.0 exists, cannot be released. A mainnet final is published as a normal release that is not Latest only when a higher version, tagged after it, was published first. etc/release.sh rejects any tag outside this grammar, so neither CI nor the make targets accept one; numbers have no leading zeros, and N starts at 1.

The tag checks also enforce these version rules:

  • the release commit sets [workspace.package].version in Cargo.toml to X.Y.Z, with no suffix;
  • a final version must be higher than every other final version in the same channel;
  • a release candidate’s version must be higher than every final version in the same channel, so none can be tagged once its own final release exists;
  • mainnet and Adiri may use the same X.Y.Z;
  • telcoin-network/vX.Y.Z/linux must fit in the 32-byte block extra-data field.

A tag is validated against every release tag that exists when it is pushed. release-prep and release-tag apply the version rules to the tags on GitHub, read with git ls-remote, because a clone’s own tags can be out of date. When the tag is pushed, CI compares it with every v* tag in its checkout; a re-run of that check compares it with the tags created before GitHub created the run, the time of the push. Every later step fetches the v* tags from origin, and stops when a local one differs from origin’s, then compares with the tags dated before the tag’s tagger date, on any commit; that date must not be earlier than the release commit’s committer date or more than five minutes ahead of the host’s clock. So an older release still verifies after newer ones exist, while a lower version tagged after a higher one, or a release candidate tagged after its final release, fails.

Edge services

Two edge services can ship with the node: worker-gateway, the reverse proxy in front of a worker’s JSON-RPC endpoint, and node-record-api, the directory of the JSON-RPC endpoints that validators advertise. etc/release-components at the tagged commit decides what a tag ships: one component name per line, out of node, worker-gateway and node-record-api, with node required; blank lines and # comments are ignored. A tagged commit without that file ships the node alone, so every tag made before the file existed releases and verifies as it always did. The file is the only thing the tag decides: every check of what it names comes from main, and the tag checks read it only after the tag’s other checks passed. A file that names an unknown component, names one twice, leaves out node or holds a malformed line fails the tag checks, so that tag can never be released; correct the file on main and tag a new release commit. A defect in an edge service’s build blocks the release of the tag that ships it. A new release commit can drop that service from etc/release-components, and its tag then releases the node, and any other service the file still names, without it.

ServiceImage packageImage tagsTarballDigest file
worker-gatewaytn-worker-gateway:<TAG> for every tag that ships it, :latest, :adiriworker-gateway-<TAG>-x86_64-unknown-linux-gnu.tar.gzIMAGE_DIGEST-worker-gateway
node-record-apitn-node-record-api:<TAG> for every tag that ships it, :latest, :adirinode-record-api-<TAG>-x86_64-unknown-linux-gnu.tar.gzIMAGE_DIGEST-node-record-api

Each service has one image package, ghcr.io/telcoin-association/tn-worker-gateway and ghcr.io/telcoin-association/tn-node-record-api, which mainnet and Adiri tags share; their tags never collide, because an Adiri tag carries -adiri. In each package, :latest follows the mainnet finals and :adiri follows the Adiri finals. release-publish moves a service’s alias under the same rule and in the same run as the node’s, so a release that moves tn-testnet:adiri also moves :adiri in the package of each edge service it ships. Neither service has cargo features, so a mainnet tag and an Adiri tag build them the same way, and their --version prints no Build Features line. Every step that reads or writes an IMAGE_DIGEST-<service> file, the same steps as for IMAGE_DIGEST, requires exactly one line that names an image in that service’s package by digest, <package image>@sha256:<64 hex>, whatever the tag’s channel. Each refuses an image in another package, several lines, a line without a digest and a malformed digest alike, as in IMAGE_DIGEST-worker-gateway names an image in ghcr.io/telcoin-association/tn-testnet, but worker-gateway images are published only in ghcr.io/telcoin-association/tn-worker-gateway, for every channel (expected the one line ghcr.io/telcoin-association/tn-worker-gateway@sha256:<64 hex>). The services’ files have a signed manifest of their own, SHA256SUMS-edge, with its signatures in SHA256SUMS-edge.asc, and SHA256SUMS lists the node’s files alone, in the shape the deployment scripts accept. make docker-worker-gateway and make docker-node-record-api push unsigned ad-hoc images of the services to ghcr.io/telcoin-association/tn-dev as dev-worker-gateway-<TAG> and dev-node-record-api-<TAG>, never to a release package.

Machines and prerequisites

The release submodule

The maintainer keys that may sign a release and the signature threshold live in tn-release-signing, the repository that every signed Telcoin project shares. This repository carries it as the git submodule release/: each key is release/keys/<handle>.asc, and KEYS.md holds the key table and the line Signatures required: N. Every step that needs a key reads the keys and that line at the commit origin/main records for release, from the submodule’s object store, never from its checked-out files, from the tag or from this repository’s own tree. When the submodule lacks that commit, the step fetches it from the submodule’s origin. A tag therefore cannot introduce a key, and the keys change only when a PR moves the release pointer on main, which needs the review of a maintainer who holds a release key (see Moving the submodule pointer). Every key in the shared allowlist can sign a release of this repository.

Every checkout that runs a step, on the laptop and on the build server, needs the submodule checked out. Run this after each pull of main:

git submodule update --init -- release

Without it, every step that reads the keys stops with exit 2, and release-prep stops when the submodule is at another commit than main records, because it requires a clean tracked tree. On a checkout whose HEAD predates the submodule, the command fails with a pathspec error; pull main first. The release workflow checks the repository out with its submodules, so CI needs nothing more.

Laptop (macOS)

  • YubiKey signing setup is done, and your key is in the allowlist at the release commit that main records.
  • gpg --card-status shows the YubiKey.
  • git config --get user.signingkey prints your signing key fingerprint followed by !; RELEASE_GPG_KEY overrides it for one command.
  • gh auth status shows a login with the repo scope, which release-sign needs to read the draft and upload to it.
  • Docker runs linux/amd64 images, as Docker Desktop does on any Mac: release-sign pulls each release image by digest, compares its binary with its tarball’s and runs its --version.
  • The repository is cloned and on an up-to-date main, with the release submodule checked out.
  • Foundry’s cast is optional: with it, release-tag and release-sign also check the on-chain attestation, and without it they print a notice and leave that check to CI.

Build server (Ubuntu or Debian, Linux x86_64)

Any Ubuntu or Debian server on Linux x86_64 can be the build server; release-build refuses any other platform.

  • docker buildx version works, and docker buildx inspect default reports the docker driver; RELEASE_BUILDER selects another builder with that driver.
  • gh auth status shows a login with the repo scope, to upload to the draft and edit it.
  • Docker is logged in to ghcr.io through make docker-login; Registry access on the build server covers the first login.
  • cast --version works, and .env holds GITHUB_ATTESTATION_PRIVATE_KEY for an address with the MAINTAINER role (see the CI environment notes).
  • make init-submodules has been run; it checks out tn-contracts and release.
  • The checkout is on an up-to-date main with a clean tracked tree, and the release submodule is at the commit main records. release-prep requires HEAD to be origin/main. release-build and release-publish refuse to run when etc/release.sh or .github/scripts/verify_commit_hash.sh differ from origin/main.

The YubiKey never goes to the build server, and the registry token never goes on the laptop.

One-time setup

  • main must record the release submodule, and the allowlist at that commit must hold a provisioned key; every check fails without the submodule, and on a placeholder file, which it names. MIN_SIGNATURES in etc/release.sh must be at least the Signatures required line of KEYS.md at that commit.
  • A repository admin sets up the tag ruleset on v*, as Settings the release workflow requires describes: only maintainers can create a v* tag, and it must be signed; nobody, maintainers included, can update or delete one. The scripts cannot see the ruleset, and the signatures do not depend on it: every step that reads a tag requires exactly one signature on it, made by a key in the allowlist on main, and publishing requires at least MIN_SIGNATURES maintainer signatures over SHA256SUMS, and as many over SHA256SUMS-edge when the release has it. The ruleset covers what signatures cannot: GitHub runs release.yaml from the tagged commit, so the ruleset decides who can start the workflow for a release tag, and it keeps a tag from being moved or deleted after it was validated.
  • Each release package must be public, because the release scripts and operators read it without credentials, and only the release maintainer account may write to it. The release packages are the node’s, tn-mainnet and tn-testnet, and the edge services’, tn-worker-gateway and tn-node-record-api. A ghcr package exists only after its first push, and only release-build pushes to the release packages, so this setup happens at the first release that pushes to each: tn-testnet at the first Adiri tag, tn-mainnet at the first mainnet tag, and tn-worker-gateway and tn-node-record-api at the first release that ships the edge services, whichever channel it is on:
    1. Run step 4 for that tag. Before anything is built, release-build asks the registry for the tag in each of the tag’s packages; ghcr answers 403 for a package that does not exist yet, as it does for a private one, so release-build asks again with your Docker login. The login does not see the tag in a package that does not exist yet, and release-build then stops and asks for RELEASE_FIRST_PUSH, the comma-separated list of the new packages. At the first Adiri tag, run RELEASE_FIRST_PUSH=tn-testnet make release-build TAG=<tag> (tn-mainnet at the first mainnet tag). At the first release that ships the edge services, run RELEASE_FIRST_PUSH=tn-worker-gateway,tn-node-record-api make release-build TAG=<tag>, and add the network’s package when that release is also the network’s first, as in RELEASE_FIRST_PUSH=tn-testnet,tn-worker-gateway,tn-node-record-api. Every name in the list must be a package of the tag, and RELEASE_YES=1 never stands in for it. release-build builds and checks every image of the tag, pushes them all, the first image of each new package among them, and then stops because the new packages are not public.
    2. Open each new package’s settings, https://github.com/orgs/Telcoin-Association/packages/container/<package>/settings, such as .../tn-testnet/settings or .../tn-worker-gateway/settings. Under “Danger Zone”, change the visibility to public. Under “Manage access”, turn off the access inherited from the repository and give write access to the release maintainer account only. Under “Manage Actions access”, leave this repository out or give it the Read role: no workflow asks for packages permission, so the Actions token cannot write to the package, and this keeps a workflow added on a branch from doing so. Settings the release workflow requires explains each list.
    3. Run step 4 again with RELEASE_REBUILD=1, because the first images are now in the registry, and without RELEASE_FIRST_PUSH. This is a full rebuild of every image of the tag, and the images it pushes replace the first ones under the tag before anything is signed. So the first release of each network builds twice, and so does the first release that ships the edge services.

Cut a release

1. Prepare and merge the release PR (build server)

git switch main && git pull --ff-only && git submodule update --init -- release
make release-prep TAG=v0.17.0-adiri

release-prep checks that the tracked tree is clean, that HEAD is origin/main, and that the tag exists neither locally nor on GitHub. It sets [workspace.package].version to 0.17.0, runs cargo update --workspace, and generates the new CHANGELOG.md section with git-cliff in Docker. The section records the main commit it was generated on in a <!-- release-base: <sha> --> line under its heading. It prints the section and a Next: list that starts with these commands:

git switch -c release/v0.17.0-adiri
git commit -am "release: v0.17.0-adiri"
gh pr create --title "release: v0.17.0-adiri" --body "Version 0.17.0 and the CHANGELOG section for v0.17.0-adiri."

Review the section, but do not edit it; CHANGELOG.md sections are generated, never written by hand. Notes for operators, such as a required resync, a configuration change or an activation epoch, go in the GitHub release in step 4.

Attest the PR head with make attest as for any PR, then merge it through the merge queue on its own. The tag checks require the release commit’s parent to be the release-base commit, so the PR must land alone and before anything else reaches main. If main moves before the PR merges, close it and repeat this step on the new main. If the release commit landed in a batch with another PR, repeat this step on the new main; release-prep replaces the section it wrote earlier, since that section is still the newest one.

When the PR has merged, attest the release commit, which is the commit you will tag:

git switch main && git pull --ff-only && git submodule update --init -- release
RELEASE_SHA="$(git log -1 --format=%H --grep='^release: v0\.17\.0-adiri (#' origin/main)"
git switch --detach "$RELEASE_SHA" && ALLOW_STALE_BASE=1 make attest
git switch main

RELEASE_SHA is the newest commit on main whose subject is release: v0.17.0-adiri (#<PR>), which is the release commit you just merged; it is the tip of main unless another PR has landed since. The pattern ends at (#, which starts the pull request number of the squash commit, so it matches neither a candidate’s commit, release: v0.17.0-adiri-rc1 (#<PR>), nor, for a mainnet tag such as v0.17.0, the Adiri commit of the same version, release: v0.17.0-adiri (#<PR>). make attest normally refuses a commit that is behind origin/main, because a PR attested on an old base is not what the merge queue merges. The release commit is already on main and is the exact commit that gets tagged and built, so ALLOW_STALE_BASE=1 is safe here. If make attest reports that the commit is already attested, there is nothing more to do. Switch back to main afterwards, because release-build and release-publish compare the release scripts in the checkout with origin/main.

The new section shows up on the docs site’s Release notes as soon as the PR merges.

2. Sign and push the tag (laptop)

git switch main && git pull --ff-only && git submodule update --init -- release
make release-tag TAG=v0.17.0-adiri

release-tag tags the tip of origin/main. If another PR has landed since the release commit, point it at the release commit instead:

RELEASE_COMMIT="$(git log -1 -E --format=%H --grep='^release: v0\.17\.0-adiri(-rc[1-9][0-9]*)? \(#' origin/main)" make release-tag TAG=v0.17.0-adiri

This pattern also matches a release candidate’s commit of the same version and channel, such as release: v0.17.0-adiri-rc1 (#<PR>), and -1 picks the newest, so it finds the candidate’s commit when the final release tags the same commit. It ends at (# as well, so for a mainnet tag it never matches the Adiri commit of the same version. The release commit must already be attested, as in step 1.

Before signing, it checks the Cargo version, the CHANGELOG.md section and etc/release-components on that commit, and the attestation too when cast is installed. It signs with RELEASE_GPG_KEY if set and git config user.signingkey otherwise, and refuses a key whose primary key is not on the allowlist. The tag message is Release v0.17.0-adiri. It verifies the new tag the way CI will, shows what it is about to push, the image of each component the tag ships included, and pushes the tag after you type yes. Expect one touch, and a PIN prompt if this is the first signature since the YubiKey was plugged in.

3. CI validates the tag and creates the draft

Pushing the tag starts release.yaml. Its validate-tag job runs etc/release.sh check-tag with the scripts and the allowlist from main, and checks that:

  • the tag is annotated and carries exactly one signature, made by an allowlisted key;
  • the tagged commit is on main;
  • Cargo.toml has the tag’s version and the version rules hold;
  • CHANGELOG.md has the release’s section with the right release-base;
  • the commit is attested on-chain;
  • etc/release-components, when the commit has it, follows the rules in Edge services.

The job writes the generated release notes to its summary. The draft-release job then creates a draft release with those notes. release-build refuses a draft that github-actions[bot] did not create, which catches a draft made by hand. This is not a security check, because anyone with write access can edit a draft or create one from a workflow of their own, so the later steps re-check the tag, the assets and the signatures instead of trusting the draft.

gh run list --workflow release.yaml --limit 3
gh run watch
gh release view v0.17.0-adiri

4. Build (build server)

git switch main && git pull --ff-only && git submodule update --init -- release
make release-build TAG=v0.17.0-adiri

release-build checks the host, the ghcr login, that the release scripts match origin/main, every tag check from step 3, and that the draft exists, has no signature yet and holds no file that is not one of the tag’s release files. Before it builds anything, it asks the registry for every image the tag ships: ghcr.io/telcoin-association/tn-testnet:v0.17.0-adiri, and ghcr.io/telcoin-association/tn-worker-gateway:v0.17.0-adiri and ghcr.io/telcoin-association/tn-node-record-api:v0.17.0-adiri when the tag ships the edge services. It stops when any of them is in the registry already, and names every one; RELEASE_REBUILD=1 rebuilds them all. A package that does not exist yet stops it too, at the first release of a network and at the first release that ships the edge services; One-time setup says what to do then. It builds every image for linux/amd64 from a temporary worktree of the tag, without the build cache, the edge services first, so that a defect in one of them stops the build early. For each image it checks the image’s ENTRYPOINT and CMD, copies the binary out, runs --version in the image with the checks of step 6, and packs the binary into its tarball. Only when every image is built and checked does it push any: the node’s to tn-testnet (a mainnet tag’s to tn-mainnet) and each edge service’s to its own package, all as :v0.17.0-adiri. A defect in any build or check, an edge service’s included, stops release-build before it pushes anything and blocks the release of that tag; when the defect is in the tagged tree, follow Before publish and release a new commit, whose etc/release-components may leave the broken service out.

After the push it writes the digest files and the manifests next to the tarballs in target/release-artifacts/v0.17.0-adiri/: IMAGE_DIGEST and SHA256SUMS for the node, and IMAGE_DIGEST-worker-gateway, IMAGE_DIGEST-node-record-api and SHA256SUMS-edge for the edge services. SHA256SUMS lists IMAGE_DIGEST, the node’s tarball, and the network’s committee.yaml, genesis.yaml and parameters.yaml by their repository path (chain-configs/testnet/ for an Adiri tag, chain-configs/mainnet/ otherwise), hashed as committed at the tag. SHA256SUMS-edge lists each edge service’s digest file and tarball, and nothing else. It uploads the tarballs, the digest files and the manifests to the draft in one upload, rewrites the draft’s notes to include the image digests, and then runs every check from step 6 except the signature count. The last two lines it prints are the SHA-256 of each manifest, the node’s first:

SHA256SUMS sha256: <hex>
SHA256SUMS-edge sha256: <hex>

Write both values down; step 5 asks for both and refuses to sign when a manifest on the draft has another hash. A tag that ships the node alone has no SHA256SUMS-edge, and its last line is SHA256SUMS sha256: <hex>.

Because release-build rewrites the draft’s notes, add the operator notes after it, above the generated notes, and leave the generated notes as they are: release-publish refuses a body that does not end with them.

gh release view v0.17.0-adiri --json body --jq .body > notes.md
# put the operator notes at the top of notes.md
gh release edit v0.17.0-adiri --notes-file notes.md

5. Sign (laptop)

make release-sign TAG=v0.17.0-adiri

release-sign repeats the tag checks and downloads the draft’s files into target/release-artifacts/v0.17.0-adiri/. It then runs the file checks of release-verify in step 6 before anything is signed: the downloads are the assets GitHub lists, the hashes in each manifest match, the chain-config ones in SHA256SUMS against the tagged commit, each digest file matches what its package serves for :v0.17.0-adiri, each tarball holds the four expected files, its binary is byte-identical to the one in its image pulled by digest, and that binary’s --version names the release. It checks that your key is allowlisted, and that every signature already in SHA256SUMS.asc and SHA256SUMS-edge.asc is a good one by an allowlisted key. It signs only the manifests your key has not signed yet, and stops when your key has signed every one. It shows the tag, the commit, every image, and the content of each manifest and its SHA-256.

On every run it asks for the SHA-256 of each manifest, SHA256SUMS first, as release-build printed it in step 4, even for a manifest you signed in an earlier run. It reads them from RELEASE_SUMS_SHA256 and RELEASE_EDGE_SUMS_SHA256 when they are set, and otherwise asks at a prompt for each: paste the value or the whole line, or paste the two lines release-build printed, together, at the first prompt, which answers both prompts. It refuses a line pasted at the other manifest’s prompt, and stops without signing when a hash differs. RELEASE_YES=1 answers only the yes prompt that follows, never these, so a run without a terminal needs RELEASE_SUMS_SHA256, and RELEASE_EDGE_SUMS_SHA256 as well when the tag ships the edge services; on a tag that ships the node alone, RELEASE_EDGE_SUMS_SHA256 is refused. Right before it signs, it checks once more that each manifest lists the digest files beside it and that each names an image in its own package. IMAGE_DIGEST must name an image in the tag’s package, tn-testnet here, and it stops without signing when it names any other package, tn-mainnet included; each IMAGE_DIGEST-<service> must name an image in that service’s package.

It signs each manifest with the key release-tag would use, and makes every signature before it uploads any, so a run that stops between two signatures has uploaded nothing. It adds each signature to the manifest’s .asc file, uploads the files in one upload, then downloads each manifest it signed and its .asc again and checks that each .asc is the file it uploaded and carries your signature. If the upload stops part way, run make release-sign again: it signs only the manifest that still lacks your signature. Sign one at a time: two maintainers uploading at once replace each other’s file, and release-sign stops with an error for the one whose signature was lost. Expect one touch per manifest it signs, so two for a release that ships the edge services; PIN and touch during signing covers the prompts and retries.

6. Verify and publish (build server)

make release-verify TAG=v0.17.0-adiri
make release-publish TAG=v0.17.0-adiri
docker logout ghcr.io

release-verify checks the whole release:

  • every tag check from step 3;
  • the draft holds exactly the release files of the components the tag ships: the node’s tarball, IMAGE_DIGEST, SHA256SUMS and SHA256SUMS.asc, and for a tag that ships the edge services also SHA256SUMS-edge, SHA256SUMS-edge.asc, and each service’s tarball and IMAGE_DIGEST-<service>;
  • SHA256SUMS names exactly IMAGE_DIGEST, the node’s tarball and the network’s three chain-config files, SHA256SUMS-edge names exactly each edge service’s digest file and tarball, and every hash matches, the chain-config ones against the tagged commit;
  • enough distinct allowlisted maintainers signed each manifest: RELEASE_SIG_THRESHOLD if set, otherwise MIN_SIGNATURES, which is 1, and the threshold holds for SHA256SUMS and SHA256SUMS-edge separately;
  • every signature in SHA256SUMS.asc and SHA256SUMS-edge.asc is a GOODSIG with a VALIDSIG by an allowlisted key: one that is bad, unverifiable, expired or revoked, or by a key that is not on the allowlist, refuses the release even next to good ones, which is the rule of the operator check on the install page;
  • IMAGE_DIGEST names an image in the tag’s package, tn-testnet for an Adiri tag and tn-mainnet for a mainnet tag, each IMAGE_DIGEST-<service> names an image in that service’s package, each matches what its package serves for the tag, and its manifest lists it before any signature is counted;
  • each tarball holds exactly the four expected files in its directory;
  • the binary in each tarball is byte-identical to the one in its image pulled by digest;
  • --version in the node’s image shows the version and the tagged commit, and its Build Features line is empty for a mainnet tag and, for an Adiri tag, lists adiri and at most faucet besides, which adiri implies;
  • --version in each edge service’s image prints exactly two lines and nothing else, tn-worker-gateway Version: 0.17.0 (tn-node-record-api Version: 0.17.0 for the node-record API) and Commit SHA: with the full tagged commit, so no Build Features line; release-build runs the same --version checks before it pushes the images.

For the node it prints a line like verified v0.17.0-adiri commit=... signatures=1/1 image=.... For a tag that ships the edge services, one more line per service follows it, like verified v0.17.0-adiri component=worker-gateway manifest=SHA256SUMS-edge signatures=1/1 image=....

release-publish runs the same checks, and also checks the ghcr login when it will move the channel aliases, before it asks for yes. While the release is a draft, it checks that the release body ends with the notes generated for the tagged commit and the image digests, line for line, and shows the operator notes above them for you to review. After you type yes, it checks that the draft’s files are still the ones it verified, by name, asset id and digest, and that the body has not changed, and publishes the draft as Latest, as a normal release or as a pre-release, following the channel table. It checks the files and the body once more after publishing, before it moves the aliases. If the release is the highest published final version in its channel, it moves the channel alias in each package the tag ships to: :adiri in tn-testnet here, and in tn-worker-gateway and tn-node-record-api when the tag ships the edge services. It first checks that every one of those packages still serves the tag at its verified digest, and moves no alias until all of them do. It then points the edge services’ aliases at their digests first and the node’s last, each inside its own package, and confirms that the registry agrees, so once the node’s alias has moved, every alias has. It skips work that is already done, so it is safe to run again: when a run stopped after publishing, run make release-publish again, and on the release that is now public it keeps the body as it is, without comparing it with the generated notes, and moves the aliases that have not moved yet. After the verified lines it prints the node’s published line, like published v0.17.0-adiri image=... alias=adiri, and one more line per edge service, like published v0.17.0-adiri component=worker-gateway image=... alias=adiri. docker logout ghcr.io removes the registry credential from the build server until the next release.

7. CI verifies the published release

Publishing with your own gh login, as release-publish does, starts the verify-release job, which runs etc/release.sh verify on a GitHub runner with the scripts and the allowlist from main and without registry credentials, so it also fails when IMAGE_DIGEST names an image outside the tag’s package, or an IMAGE_DIGEST-<service> one outside that service’s package. The check is detective only: the release is already public when it runs, so a failure means following After publish. GitHub starts no workflow for a publish made with a GITHUB_TOKEN, so a release that someone publishes from a workflow is never checked by this job. After every publish, check that a verify-release run exists for the tag:

gh run list --workflow release.yaml --event release --limit 3

If none of the runs is for v0.17.0-adiri, start one, and use the same command to run the check again later:

gh workflow run release.yaml -f tag=v0.17.0-adiri -f mode=verify

Then follow Installing a release on a clean host, and announce the release with a link to Release notes.

Release candidates

A candidate goes through the same seven steps with an -rcN tag, for example v0.17.0-adiri-rc1. release-prep heads its CHANGELOG.md section with the final version, v0.17.0-adiri, because candidates have no section of their own. A later candidate, or the final release, can tag the same commit: start at step 2, setting RELEASE_COMMIT if main has moved. If fixes have landed since the candidate, start at step 1 with the new tag; release-prep replaces the candidate’s section as long as it is still the newest one. Publishing a candidate never moves an image alias.

Dry run

RELEASE_DRY_RUN=1 runs the steps of etc/release.sh as a rehearsal: it calls neither gh nor git push, and it pushes images only to a registry on localhost or 127.0.0.1. Only a dry run accepts the variables that stand in for the draft release, the registry, main, its allowlist and the attestation check, and every other run refuses them: RELEASE_IMAGE, RELEASE_ALLOWLIST_DIR, RELEASE_MAIN_REF, RELEASE_ATTESTATION=skip and RELEASE_DIR, which the header of etc/release.sh describes. RELEASE_IMAGE, a repository such as 127.0.0.1:5000/tn, stays the node’s image, and replaces its whole name, package included. Each other component’s image is the value $RELEASE_IMAGE-<component>, here 127.0.0.1:5000/tn-worker-gateway and 127.0.0.1:5000/tn-node-record-api, so the rehearsal of a tag that ships the edge services pushes three images to the local registry. RELEASE_DIR, a directory outside target/release-artifacts, stands in for the GitHub draft release.

What the deployment scripts check

The node deployment scripts in tn-node-deployment install and update nodes from these releases with no person reading the output. They take a release only under a tag in the form of the host’s network: vX.Y.Z on mainnet, and vX.Y.Z-adiri or, when the operator names it, vX.Y.Z-adiri-rcN on Adiri. They refuse a mainnet release candidate, vX.Y.Z-rcN, before they download anything. They check every release they take the same way:

  1. They download SHA256SUMS, SHA256SUMS.asc and IMAGE_DIGEST from the release, and the host’s tarball when they install the binary.
  2. They build a keyring from the *.asc files in lib/release-keys/ of the signed script release the host runs, not from this repository, and run gpgv --status-fd 1 --keyring <keyring> SHA256SUMS.asc SHA256SUMS.
  3. They judge its status lines, and take the release when at least one signature is good and no line refuses it. A signature is good when a GOODSIG line is followed by a VALIDSIG line whose last field, the 40-character fingerprint of the primary key, is one of their keys; one is enough, and they count no further. A BADSIG line, whatever key made it, an EXPKEYSIG, REVKEYSIG or EXPSIG line, and an ERRSIG line for any reason but a missing key each refuse the release, even beside a good signature. A NO_PUBKEY line, or an ERRSIG line for a missing key, is a signature by a key they do not ship, and refuses nothing by itself: beside a good signature they take the release and print a warning that names that key, and without one they refuse the release and name the key.
  4. They require SHA256SUMS to hold only <64 hex> <name> lines that name exactly IMAGE_DIGEST, one node tarball and the network’s committee.yaml, genesis.yaml and parameters.yaml under their repository paths, each once. The three chain-config lines must carry the hashes that their own script release pins for the network, and they refuse the release when a hash differs or none is pinned.
  5. Before anything is installed, they check IMAGE_DIGEST, which must be one <repository>@sha256:<64 hex> line, and the tarball against their lines in SHA256SUMS, and they run the image only from the repository they take for the network.
  6. When a host builds the node from source instead, they check the signature on the release tag by the same rule. A tag whose signature is bad, expired or revoked stops the build on any network; a tag they cannot verify, such as one signed by a key they do not ship, stops it on mainnet and only prints a warning on testnet.

For maintainers this means:

  • The release files keep their names and formats: SHA256SUMS in sha256sum format, naming exactly IMAGE_DIGEST, the node’s tarball and the chain-config files under their repository paths, a detached ASCII-armored SHA256SUMS.asc, the tarball and IMAGE_DIGEST. A renamed or reformatted file, or one more line in SHA256SUMS, stops every node update.
  • A release whose committee.yaml, genesis.yaml or parameters.yaml changed installs only on hosts whose script release pins the new hashes. A change to one of those files on main therefore needs a signed script release with the new hashes before a node release cut from that commit installs anywhere.
  • A mainnet release candidate installs on no host the scripts manage; an operator installs one by hand, as Installing a release describes.
  • A key signs a node release, or its tag, only once a signed script release ships it, whether it is a primary key that signs, as every key on the allowlist does today, or a subkey with the sign capability. Hosts run a signed script release, not the scripts’ main, and keep an older one until they update with update-scripts.sh, so compare lib/release-keys/ in the latest signed script release with KEYS.md before a key signs. A host whose script release does not ship the key refuses a node release that only that key signed, and names the key; when a key it ships signed the release too, it takes the release and warns about the other signature. A mainnet host that builds from source refuses a tag signed by a key it does not ship. A signature by a key that the host’s copy shows expired or revoked refuses the release there even beside a good one, as it does here, so a key’s new expiry date also has to reach the scripts in a signed script release.
  • The scripts tolerate a signature by a key they do not ship, but a release made here never carries one from outside the allowlist: release-sign, release-verify and release-publish refuse any signature in SHA256SUMS.asc that is not a good one by an allowlisted key. So there is one rule to follow: every signature is a good one by an allowlisted key, and every key that signs ships in a signed script release before it signs.
  • The scripts count no signatures on a node release, so one good signature by a key they ship is enough there. Raising MIN_SIGNATURES here raises what every release carries, not what the scripts check.

SHA256SUMS-edge

The deployment scripts accept only the node’s SHA256SUMS shape, which is why the edge services’ files have a manifest of their own. SHA256SUMS never lists an edge service’s file, and SHA256SUMS-edge never lists a node file or a chain-config file.

The scripts set up the worker gateway with setup-gateway.sh, but not from a release: they read neither SHA256SUMS-edge nor IMAGE_DIGEST-worker-gateway. They take the gateway’s image as one <repository>@sha256:<64 hex> reference and refuse a tag. On devnet they take an image from the repositories on an allow-list of their own. On testnet and mainnet they take only the image that their signed script release pins for the network, and both pins are empty, so there they refuse every image. They pull the image by digest and run its --help, and refuse an image whose help lacks a flag that their service unit passes. The value to pin for a network is the IMAGE_DIGEST-worker-gateway line of a signed release of that network, once that release’s SHA256SUMS-edge and its signatures verify: the scripts check nothing else about the image, so their own signed script release is what carries that trust to hosts. They do not install node-record-api.

A tool that installs an edge service from a release can rely on these rules, which maintainers keep like the node’s:

  • SHA256SUMS-edge and SHA256SUMS-edge.asc are on every release whose tagged commit’s etc/release-components names an edge service, and on no other release.

  • SHA256SUMS-edge is in sha256sum format, <64 hex> <name> lines sorted by name in the C locale, and lists exactly the IMAGE_DIGEST-<service> file and the <service>-<TAG>-x86_64-unknown-linux-gnu.tar.gz tarball of each service the release ships, by file name. For a release of v0.17.0-adiri that ships both services it reads:

    <hex>  IMAGE_DIGEST-node-record-api
    <hex>  IMAGE_DIGEST-worker-gateway
    <hex>  node-record-api-v0.17.0-adiri-x86_64-unknown-linux-gnu.tar.gz
    <hex>  worker-gateway-v0.17.0-adiri-x86_64-unknown-linux-gnu.tar.gz
    
  • SHA256SUMS-edge.asc holds detached ASCII-armored signatures over SHA256SUMS-edge, as SHA256SUMS.asc does over SHA256SUMS. The same allowlist signs both, a release needs as many signatures on SHA256SUMS-edge as on SHA256SUMS, and every signature in either file is a good one by an allowlisted key.

  • IMAGE_DIGEST-<service> is one line that names an image in that service’s package by digest, ghcr.io/telcoin-association/tn-worker-gateway@sha256:<64 hex> or ghcr.io/telcoin-association/tn-node-record-api@sha256:<64 hex>, on mainnet and Adiri releases alike.

  • Each tarball holds one directory, <service>-<TAG>-x86_64-unknown-linux-gnu/, with exactly the binary <service> (mode 0755), and LICENSE-APACHE, LICENSE-MIT and NOTICE (mode 0644). The binary is byte for byte /usr/local/bin/<service> in the image that the digest file names, which is what the image’s ENTRYPOINT runs.

  • The binary’s --version prints two lines, tn-<service> Version: X.Y.Z and Commit SHA: <commit>, with the full tagged commit, as in tn-worker-gateway Version: 0.17.0.

Edge services: worker gateway and node-record API on the install page has the checks an operator runs on these files.

When a step fails

Every step prints error: and the reason when it stops. etc/release.sh exits with 1 when a check fails, 2 for a usage error or an unmet precondition, and 3 when GitHub, the registry, the RPC endpoint or a git or docker network call failed; make shows the code as Error N. GitHub API calls, git fetch and git ls-remote, the fetch of the release commit that main records, registry lookups, the pull of the git-cliff image and the attestation check are retried before a step gives up with 3. A request that GitHub refuses, with an HTTP 4xx other than 429, is not retried and exits with 1 or 2, and so does a tag push that origin rejects. git push, docker push, docker pull, cargo update, the image build, the tn-contracts submodule fetch and the alias move are tried once, and exit with 3 when they fail. A signature that gpg cannot make, usually because the YubiKey is not plugged in, exits with 2. After an exit code of 3, run the same command again. If cargo update or the image build fails the same way a second time, the cause is not an outage: the output above it shows it, such as a version conflict or a compile error. If release-build had already pushed the images, the second run stops because :<TAG> is in the registry, and names every image that is; rebuild with RELEASE_REBUILD=1, which rebuilds every image of the tag, as the table below says. If release-sign had already uploaded your signatures, the second run stops because your key has signed every manifest, and nothing more is needed; if only one of the two signature files reached the draft, the second run signs the manifest that still lacks your signature.

StepSymptomFix
1release-prep refuses to startThe message names the precondition: a clean tracked tree, HEAD at origin/main, or a tag that already exists.
1tracked files have local changes; prep needs a clean checkout of main, and git status --short shows M releaseThe release submodule is at another commit than main records, usually after a pull that moved the pointer. Run git submodule update --init -- release, then release-prep again.
1release-prep stops after it set the versionIt restores Cargo.toml, Cargo.lock and CHANGELOG.md from HEAD as it exits, so fix the cause and run it again.
1release-prep finds the version’s section lower down in CHANGELOG.mdThat version was already released; choose the next one.
2, 3The CHANGELOG.md check fails on release-baseIf you are tagging a later commit, set RELEASE_COMMIT to the release commit. If the release commit did not land alone, repeat step 1 on the new main.
2, 3The signing key is not on the allowlistCheck git config --get user.signingkey and RELEASE_GPG_KEY, and that your file at the release commit main records holds your current signing key (gpg --show-keys release/keys/<handle>.asc after git submodule update --init -- release). A key merged in tn-release-signing can sign only once main moves the pointer to it.
2 to 7submodule layout: release is a submodule on refs/remotes/origin/main but is not checked out here; run git submodule update --init -- releaseRun git submodule update --init -- release, then the step again. If git answers pathspec 'release' did not match any file(s) known to git, the checkout’s HEAD predates the submodule: run git switch main && git pull --ff-only first.
2 to 7main must record the release submodule (tn-release-signing), but refs/remotes/origin/main has no submodule at release; ...No step can read a key until main records the release submodule again; keys are never read from this repository’s own tree.
2 to 7submodule layout: MIN_SIGNATURES=<n> in etc/release.sh is below the <N> signatures KEYS.md requires in release at <commit>, ...The pointer on main names a KEYS.md that requires more signatures than etc/release.sh. Raise MIN_SIGNATURES to at least <N> in a PR; it belongs in the PR that moves the pointer, as Moving the submodule pointer says.
2 to 7submodule layout: release at <commit>, ... has no KEYS.md to read the signature threshold from, or submodule layout: KEYS.md in release at <commit>, ... must state the threshold on one line 'Signatures required: N'The pointer on main names a tn-release-signing commit without a usable threshold line. Fix KEYS.md there, then move the pointer to the fixed commit.
2 to 7submodule layout: refs/remotes/origin/main records <commit> for release, but neither its checkout nor its origin has that commitThe pointer names a commit that tn-release-signing does not have, such as one never pushed there. Move the pointer to a commit on its main.
2 to 7git fetch in release from its origin failed after 3 attemptsThe step needed the release commit main records and could not fetch it. Run the step again; git submodule update --init -- release fetches that commit too.
2, 3The commit is not attestedOn the build server, run git switch --detach <commit> && ALLOW_STALE_BASE=1 make attest, then git switch main. If CI failed on it, also run gh run rerun <run-id>.
2, 3etc/release-components at <commit> has the malformed line '<line>'; ..., ... names '<name>', which etc/release.sh does not know (it knows: node worker-gateway node-record-api); ..., ... names <name> twice; ..., ... does not name node; every release ships the node; ... or ... is a <type> of git mode <mode>, not a regular file; ..., each ending ; correct it on main and tag a new release commitThe commit’s etc/release-components breaks the rules in Edge services, so no tag of that commit can be released. When release-tag stops, nothing is tagged yet: correct the file on main, repeat step 1 on the new main, and tag the new release commit. When CI stops, the tag exists and can never be released: follow Before publish and release the next version from a commit whose file is correct.
2 to 7cannot read etc/release-components at <commit>: git cannot read that commit's tree; fetch it again, or check the repository with git fsck, or cannot read etc/release-components at <commit> (blob <id>); ...The checkout lacks an object of that commit, or holds a damaged one; the file itself may be fine. Run git fetch origin, and git fsck if that does not help, then the step again.
3The tag is wrongThe tag stays: only maintainers can create a v* tag, and it must be signed; nobody, maintainers included, can update or delete one. Follow Before publish and release the next version.
4, 6run make docker-loginRun make docker-login on the build server.
4RELEASE_FIRST_PUSH names '<name>', which is not a package of <TAG> (its packages: <package>, <package>, <package>), or RELEASE_FIRST_PUSH is <value>, but <TAG> is on the <channel> channel, whose package is <package>An entry of RELEASE_FIRST_PUSH is not a package the tag pushes to: a typo, an empty entry such as a trailing comma, an edge package on a tag that ships the node alone, or the other network’s package. Nothing was asked of the registry or built. Run step 4 again with only the new packages, each one of those the message lists.
4<image> refuses anonymous reads and the docker login does not see <image>:<TAG>: if this is the first release image of the package <package>, run again with RELEASE_FIRST_PUSH=<packages>; otherwise make the package public (maintainer guide, one-time setup), or <image> and <image> refuse anonymous reads, and the docker login sees <TAG> in none of them: ...Nothing was built. At the first release of a network, or the first release that ships the edge services, run step 4 again with the RELEASE_FIRST_PUSH=<packages> the message names, which lists every new package of the tag, as the one-time setup says. On any later release the package was made private, or your Docker login cannot read it: make the package public and check make docker-login; do not set RELEASE_FIRST_PUSH.
4<image> is private, not new, and already holds <image>:<TAG> (<digest>): do the one-time setup first (make the package public and set its access list, as the maintainer guide says), then run make release-build TAG=<TAG> again, with RELEASE_REBUILD=1 if the tag must be rebuiltThe package refuses anonymous reads but your Docker login sees the tag in it, and nothing was built. Do the one-time setup step 2 first (make the package public and set its access lists), then run step 4 again, with RELEASE_REBUILD=1 if the tag must be rebuilt.
4<image>:<TAG> already exists (<digest>); set RELEASE_REBUILD=1 to rebuild it, or <image>:<TAG> (<digest>) and <image>:<TAG> (<digest>) already exist; set RELEASE_REBUILD=1 to rebuild themAn earlier build pushed them, and nothing was built this time. Rebuild with RELEASE_REBUILD=1 make release-build TAG=<TAG>, which rebuilds and pushes every image of the tag, not only the ones named; the new images have other digests, because builds are not reproducible.
4An edge service’s image fails a check, and the message ends <TAG> cannot be released; correct <Dockerfile> on main and tag a new release commit or <TAG> cannot be released; correct <Dockerfile> or the <crate> crate on main and tag a new release commit, as in <image>:<TAG> has ENTRYPOINT and CMD <found>; expected ENTRYPOINT ["worker-gateway"] and no CMD; ... or <image>:<TAG> reports '<line>' on the first line of --version; expected 'tn-worker-gateway Version: <X.Y.Z>'; ...The image that the tag’s own Dockerfile and source build is wrong, so every build of the tag fails the same way, and the tag can never be released. Every image is built and checked before the first push, so this run pushed nothing. Follow Before publish, then release a new commit that corrects the Dockerfile or the crate, or whose etc/release-components leaves that service out, so that its release ships without it.
4<image>:<TAG> is pushed, but the package is not public: do its one-time setup (maintainer guide), then run make release-build TAG=<TAG> again with RELEASE_REBUILD=1, or <image>:<TAG> and <image>:<TAG> are pushed, but the packages <package> and <package> are not public: ...Every image of the tag is pushed, and the packages named refuse anonymous reads. At the first release of a network, or the first release that ships the edge services, do the one-time setup of each package named, then run step 4 again with RELEASE_REBUILD=1 and without RELEASE_FIRST_PUSH. Otherwise someone made the package private: make it public again, then run step 4 again with RELEASE_REBUILD=1.
4The release scripts differ from origin/mainRun git switch main && git pull --ff-only, then the build again.
4 to 7IMAGE_DIGEST ..., but <TAG> is on the ... channel, whose images are published only in ...The draft’s IMAGE_DIGEST names an image in another package, such as the other network’s, or is not one well-formed line, so it is not the file release-build wrote for this tag. Do not sign or publish; rebuild the draft as for a failed release-verify below. If the release is public, follow After publish.
4 to 7IMAGE_DIGEST-<service> ..., but <service> images are published only in ..., for every channel (expected the one line ...)The draft’s digest file of that service names an image in another package, such as the node’s, or is not one well-formed line, so it is not the file release-build wrote for this tag. Act as for IMAGE_DIGEST in the row above. An edge image whose ENTRYPOINT, CMD or --version is refused in step 5 or later, with the advice rebuild the draft with make release-build TAG=<TAG>, or report it if the release is published, means the same: release-build checked every image it pushed, so the draft names another image.
5<manifest> on the draft has sha256 <hex>, but make release-build printed <hex>; do not sign, find out what changed the draftNothing was signed. Every run compares the hash of every manifest, one you signed in an earlier run included, so a mismatch there means the draft changed after your first signature. A hash pasted alone at the other manifest’s prompt ends here too, so compare it with the two lines release-build printed. Otherwise find out what changed the draft’s files before going further.
5you pasted the SHA256SUMS-edge line at the SHA256SUMS prompt; paste the SHA256SUMS line of make release-build, or its hash alone, or RELEASE_SUMS_SHA256 holds the SHA256SUMS-edge line of make release-build; set it to the SHA256SUMS sha256 that make release-build printed, or either of them the other way roundNothing was signed. Run release-sign again and give each manifest its own line: at the first prompt the SHA256SUMS sha256: line, or both lines as release-build printed them, SHA256SUMS first. When the SHA256SUMS-edge sha256 from make release-build must be 64 hex characters, got '' follows a paste of both lines, the paste carried Windows line ends; paste each line at its own prompt.
5RELEASE_EDGE_SUMS_SHA256 is set, but <TAG> ships the node alone, so it has no SHA256SUMS-edge to compare it with; unset RELEASE_EDGE_SUMS_SHA256The variable is left over from a release that shipped the edge services, and nothing was read or signed. Unset it and run release-sign again.
5release-sign stops on a file checkNothing was signed; the message names the check, as for release-verify in step 6.
5gpg could not sign <manifest> (nothing was uploaded; run make release-sign again): is the YubiKey that holds <fingerprint> plugged in, and does gpg --card-status show it?, or for a tag that ships the node alone gpg could not sign SHA256SUMS: is the YubiKey that holds <fingerprint> plugged in, and does gpg --card-status show it?gpg could not make a signature, often because a touch was missed. Every signature is made before any is uploaded, so nothing reached the draft, not even a signature made before the failed one. Check gpg --card-status, then run release-sign again: it signs every manifest that still lacks your signature on the draft, so expect a touch for each again.
5PIN or touch errorsSee PIN and touch during signing.
5SHA256SUMS for <TAG> is already signed by @<handle>, or SHA256SUMS and SHA256SUMS-edge for <TAG> are already signed by @<handle>Nothing to do. With a threshold above 1, another maintainer signs next.
5 to 7<manifest>.asc holds a signature that is not a good one by an allowlisted maintainer key, so the file is refused: ..., for SHA256SUMS.asc or SHA256SUMS-edge.ascThe reason after the colon names each refused signature. BADSIG: signature by key <id> does not match <manifest> means the file holds a signature over another file, such as SHA256SUMS.asc uploaded as SHA256SUMS-edge.asc: on a draft, delete it with gh release delete-asset <TAG> <manifest>.asc --yes, and each maintainer whose signature it held runs make release-sign again, which signs only the manifests that lack their signature. For a signature by an expired or revoked key, see Rotating or revoking a key. If the release is public, follow After publish.
5 to 7<image>: the registry answered HTTP <code>: package is not public, or has never been pushed (one-time setup after its first push: make it public, as the maintainer guide says)Someone made that package private after the build. Make it public again, as step 2 of the one-time setup says, then run the step again.
6release-verify failsDo not publish; the message names the failed check. To rebuild under the same tag, delete the draft with gh release delete <TAG> --yes, recreate it with gh run rerun <run-id> on the tag’s CI run, run step 4 with RELEASE_REBUILD=1, then step 5.
6<manifest> carries <n> of the <T> required maintainer signaturesEach manifest needs the threshold on its own, and this one has fewer signatures, such as SHA256SUMS-edge after a release-sign run whose upload stopped part way. Each maintainer whose signature it lacks runs make release-sign, which signs only the manifests that lack their signature.
6release-publish stops because the release’s files or body changed after they were verifiedSomeone changed the draft while release-publish ran. If the release is still a draft, find out what changed before you run release-publish again; if it is public, follow After publish.
6release-publish stops because the body of the draft does not end with the generated notesSomeone edited the generated part, or the allowlist or the release scripts on main changed since the build. Re-run the tag’s CI run with gh run rerun <run-id>, which writes the generated notes again, add the operator notes above them, and run release-publish again.
6<image>:<TAG> is <digest>, not <digest>; <image>:<alias> moves only to the image this package serves for <TAG>, or <image>:<TAG> is missing, not <digest>; ...The release is public by now, and no alias has moved: after this run verified the image, someone pushed another one under :<TAG> in that package, or deleted it. Only the release maintainer account can write to the package, so find out who did and why before anything else. The signed digest files still name the verified images. Unless the change is explained, follow After publish.
6release-publish stops after publishing, at the alias step, such as with cannot move <image>:<alias> (if docker reported unauthorized or denied, run make docker-login and publish again) or <image>:<alias> points at <digest>, expected <digest>The edge services’ aliases move first and the node’s last, so until the node’s has moved, some aliases point at this release and the rest at the previous one. Run make release-publish again; on the published release it skips publishing and the body comparison, leaves each alias that already points at its digest, and moves the rest.
7CI verification fails after publishingFollow After publish.
anyUnsure where things standCheck gh release view <TAG>, gh run list --workflow release.yaml and the files in target/release-artifacts/<TAG>/.

Rollback and yanking

Before publish

Until the release is published, the public parts are the tag, the :<TAG> images in the packages release-build pushed to, and the release commit on main, whose CHANGELOG.md section is already on the docs site’s Release notes page. The tag stays: only maintainers can create a v* tag, and it must be signed; nobody, maintainers included, can update or delete one. Delete the draft, if CI created one, and the tag’s image version in every package release-build pushed to, running the gh commands on the build server, where the package scopes belong:

gh release delete v0.17.0-adiri --yes
for PACKAGE in tn-testnet tn-worker-gateway tn-node-record-api; do
  ID=$(GH_TOKEN="$PACKAGES_PAT" gh api --paginate "/orgs/Telcoin-Association/packages/container/$PACKAGE/versions" \
    --jq '.[] | select(.metadata.container.tags | any(. == "v0.17.0-adiri")) | .id')
  if [ -n "$ID" ]; then GH_TOKEN="$PACKAGES_PAT" gh api -X DELETE "/orgs/Telcoin-Association/packages/container/$PACKAGE/versions/$ID"; fi
done

The loop lists the node’s package, tn-mainnet for a mainnet tag, and both edge packages; leave out an edge package the tag does not ship. A package with no version under the tag, such as one that a push failing part way never reached, is skipped, and so is one that does not exist yet, after gh reports it as not found.

The packages API accepts only a classic personal access token with the read:packages and delete:packages scopes, so put one in PACKAGES_PAT for those calls and revoke it afterwards; each package’s Versions page on GitHub can delete the version instead.

Then release the next version from step 1, which supersedes the tag: the next release candidate after a withdrawn candidate (v0.17.0-adiri-rc2 after v0.17.0-adiri-rc1, or the final v0.17.0-adiri), and the next patch version after a withdrawn final release (v0.17.1-adiri after v0.17.0-adiri). The version rules refuse a final release or a release candidate whose version is not above every final release in its channel, so a withdrawn final’s version is never released; a withdrawn candidate’s version can still be released, by a later candidate or by its final. Leave CHANGELOG.md as it is. release-prep replaces a withdrawn candidate’s section while it is the newest one; a withdrawn final keeps its section, and the next section lists the commits after its tag. Say in the next release’s operator notes that the version was withdrawn.

After publish

Never delete a published tag, release or image, because operators may have verified and pinned them. Instead:

  1. Put a warning at the top of the release notes with gh release edit <TAG> --notes-file notes.md.

  2. Mark the release as a pre-release with gh release edit <TAG> --prerelease.

  3. If the channel alias points at it, move the alias back to the previous good release from the build server, after make docker-login:

    PREV=vX.Y.Z-adiri
    ALIAS=ghcr.io/telcoin-association/tn-testnet:adiri
    make release-verify TAG="$PREV" &&
    REF=$(curl -fsSL "https://github.com/Telcoin-Association/telcoin-network/releases/download/$PREV/IMAGE_DIGEST") &&
    case "$REF" in "${ALIAS%:*}@sha256:"*) true ;; *) echo "not an image in ${ALIAS%:*}: $REF" >&2; false ;; esac &&
    docker buildx imagetools create --prefer-index=false --tag "$ALIAS" "$REF" &&
    docker buildx imagetools inspect "$ALIAS" --format '{{println .Manifest.Digest}}'
    

    Set PREV to the previous good release. For a mainnet release, set ALIAS to ghcr.io/telcoin-association/tn-mainnet:latest; the case line stops when $REF is not in the alias’s package, so the alias never points at the other network’s image. --prefer-index=false copies the image manifest as it is, as release-publish does, so the last command prints the digest after the @ in $REF.

    If the release shipped the edge services and moved their aliases, move each of them back the same way, with the digest from the earlier release’s IMAGE_DIGEST-<service>:

    PREV=vX.Y.Z-adiri
    SERVICE=worker-gateway
    ALIAS=ghcr.io/telcoin-association/tn-$SERVICE:adiri
    make release-verify TAG="$PREV" &&
    REF=$(curl -fsSL "https://github.com/Telcoin-Association/telcoin-network/releases/download/$PREV/IMAGE_DIGEST-$SERVICE") &&
    case "$REF" in "${ALIAS%:*}@sha256:"*) true ;; *) echo "not an image in ${ALIAS%:*}: $REF" >&2; false ;; esac &&
    docker buildx imagetools create --prefer-index=false --tag "$ALIAS" "$REF" &&
    docker buildx imagetools inspect "$ALIAS" --format '{{println .Manifest.Digest}}'
    

    Run it for each service the release shipped, with SERVICE set to worker-gateway or node-record-api, and with :latest in place of :adiri for a mainnet release. Set PREV to the newest earlier good release in the channel that shipped that service, which can be older than the node’s PREV; curl stops with 404 on a release that did not ship it. When no earlier release in the channel shipped the service, there is nothing to roll back to: leave its alias where it is, and say in the warning of step 1 that it still points at this release.

  4. Ship a fixed patch release through all seven steps; publishing it moves the aliases forward again, an edge service’s only when the fixed release ships that service.

  5. Tell operators the affected version and the version to roll back to, following the release and network update process.

Adding a maintainer or changing the threshold

  • The new maintainer follows YubiKey signing setup.
  • One PR to tn-release-signing adds keys/<handle>.asc and the maintainer’s row in the KEYS.md table, following the rules in Changing this table.
  • An existing maintainer reviews it and confirms the fingerprint with the new maintainer over a separate channel, such as a call, and against https://github.com/<handle>.gpg.
  • Once it merges there, a PR here moves the release pointer to that commit, as Moving the submodule pointer describes. The key can sign a release as soon as that PR merges, because every check reads the keys at the pointer on main.
  • The node deployment scripts carry maintainer keys of their own, so a new key also has to reach them before it signs a node release, as What the deployment scripts check says. A host trusts the keys in lib/release-keys/ of the signed script release it runs, so a release installs there only with a good signature by one of those keys; compare the fingerprints in the latest signed script release, not in the scripts’ main, with KEYS.md before a key signs a node release.

KEYS.md states the threshold for every project that shares the allowlist, on its line Signatures required: N, currently 1. MIN_SIGNATURES in etc/release.sh, currently 1, may be higher than that line but never lower: every step that reads the keys reads the line at the commit main records for release, and stops with exit 1 when MIN_SIGNATURES is below it or the line is missing. RELEASE_SIG_THRESHOLD raises it for a single command, and can go neither below MIN_SIGNATURES nor above the number of allowlisted maintainers. To raise it for every release, raise MIN_SIGNATURES in a PR that also tells operators on Installing a release how many good signatures to expect. When the Signatures required line goes up in tn-release-signing, raise MIN_SIGNATURES no later than the PR that moves the pointer to that commit, because every step stops with exit 1 from then on until it does. Signatures count per maintainer handle, so several keys in one maintainer’s file count once. With a threshold above 1, each signer runs make release-sign on their own laptop before anyone runs make release-publish.

Rotating or revoking a key

Expiry, loss and rotation in the shared YubiKey guide has the commands, and Rotating or revoking a key says how keys/ and KEYS.md change in tn-release-signing. Every such change reaches this repository only when a PR moves the release pointer to a commit that carries it, as Moving the submodule pointer describes. After a revocation, move the pointer at once: releases here accept the revoked key until that PR merges. The deployment scripts carry their own copies of the keys, so a key that is added, replaced or removed also needs a signed script release there, and so does a key whose expiry date is extended.

release-verify refuses a signature file that carries a signature from an expired or revoked key, and it reads the keys at the pointer on main. So once a key expires, or the pointer moves past its revocation, CI verification of the older releases it signed fails. Extend keys before they expire. After revoking a compromised key, tell operators which releases are no longer trusted.

Moving the submodule pointer

A change to the keys or the threshold in tn-release-signing reaches this repository’s releases only when main records a commit of it that carries the change. To move the pointer, on a branch that starts at an up-to-date main:

git submodule update --init -- release &&
git -C release fetch --quiet origin main &&
git -C release checkout --quiet --detach FETCH_HEAD &&
git diff --submodule=log -- release &&
git -C release diff "$(git rev-parse HEAD:release)" HEAD -- keys KEYS.md yubikey-setup.sh &&
git add release

The two diff commands show the commits the move brings in and their changes to the keys, the key table and the setup script, which is what the reviewer checks. The reviewer also checks that the new commit is on main of tn-release-signing, for example with git -C release fetch --quiet origin main && git -C release merge-base --is-ancestor <commit> origin/main, which exits 0 only then. The pointer shows only a commit id, and GitHub serves any commit of the repository by its id, an unmerged pull request’s head included, so a pointer to such a commit would bring in keys that never reached main there. Being on that main shows that a maintainer with write access merged the commit, not that a second maintainer reviewed it, so the reviewer of the move reads the key changes in the two diffs whatever protection tn-release-signing has. If the new commit raises Signatures required above MIN_SIGNATURES, raise MIN_SIGNATURES in etc/release.sh in the same PR. Commit, and open a PR. CODEOWNERS assigns /release and /.gitmodules to the maintainers who hold release keys, and the main ruleset requires a code owner’s approval, so the move needs a key holder’s review. The repository’s admin role can bypass that ruleset, so the review is a check on every account but those, as .github/ACTIONS.md says of every path CODEOWNERS lists. Once it merges, every machine that runs a step runs git submodule update --init -- release after its next pull of main. A move that changes the keys between release-build and release-publish also changes the key table in the generated release notes, so release-publish refuses the draft’s body until the notes are generated again, as the failure table says.

YubiKey signing setup

This page is the one-time setup for a maintainer who signs telcoin-network releases. The signing key belongs to tn-release-signing, the repository that holds the maintainer keys every signed Telcoin project shares, and its YubiKey signing setup guide covers the key from start to finish. This repository carries tn-release-signing as the release submodule, and this page covers what is specific to telcoin-network. When you finish both you have:

  • an OpenPGP key generated on a YubiKey, which it never leaves;
  • that key on the allowlist in tn-release-signing, at a commit that the release pointer on main records;
  • GitHub showing your signed tags as Verified;
  • a laptop ready for make release-tag and make release-sign;
  • registry access on the build server, the Ubuntu or Debian Linux x86_64 host that runs make release-build and make release-publish.

Scripted setup

make yubikey-setup runs the shared setup script as ./yubikey-setup.sh run from release/, because the script works only from the root of a checkout of tn-release-signing. It needs the submodule checked out, and otherwise stops with run git submodule update --init -- release first; run that command after each pull of main anyway, as The release submodule says. Scripted setup in the shared guide says what the script checks, asks and writes, and ./yubikey-setup.sh check, run in release/, reports what it finds without writing anything.

The script writes your allowlist file, keys/<handle>.asc, in the submodule and stages it there. The submodule is a checkout of tn-release-signing at a detached HEAD, so create a branch in release/ before the script stages anything. The commit, the push and the PR that the script prints go to tn-release-signing, not to this repository; Add the key to the allowlist has the steps. Once that PR is open, git submodule update --init -- release returns the submodule to the commit main records; until then release-prep refuses the checkout, because the submodule is at another commit than main records.

When the key can sign

Your key can sign a telcoin-network release once a PR here moves the release pointer to a tn-release-signing commit that carries it, as Moving the submodule pointer describes. Until then every check here refuses it, because every check reads the keys at the pointer on main. The node deployment scripts carry maintainer keys of their own, so a release signed only by a new key installs on operators’ hosts once their scripts carry that key too; Adding a maintainer or changing the threshold says which keys they carry.

PIN and touch during signing

Each signature needs one touch of the YubiKey, and the PIN when it is the first signature since the YubiKey was plugged in. make release-tag makes one signature, over the tag. make release-sign makes one per manifest it signs: one, over SHA256SUMS, for a release that ships the node alone, and two, over SHA256SUMS and SHA256SUMS-edge, for a release that ships the edge services. It makes every signature before it uploads any, so when the second touch is missed, gpg fails and nothing is uploaded, the first signature included; run make release-sign again, and it asks for both touches again. PIN and touch during signing in the shared guide covers the prompts, the retries and a blocked PIN.

Registry access on the build server

make release-build and make release-publish push to the release packages, which needs a classic personal access token with only the write:packages scope. The release packages are the node’s, ghcr.io/telcoin-association/tn-mainnet for mainnet tags and ghcr.io/telcoin-association/tn-testnet for Adiri tags, and the edge services’, ghcr.io/telcoin-association/tn-worker-gateway and ghcr.io/telcoin-association/tn-node-record-api, which mainnet and Adiri tags share. The scope lets the token write only to packages its account can write, and the one-time setup gives write access on the release packages to the release maintainer account alone, so create the token on that account. Create one at https://github.com/settings/tokens/new?scopes=write:packages&description=tn-release-build-server with a 90-day expiry. That link selects write:packages alone; ticking the scope by hand on the token page also selects repo, which this token must not have. Then, on the build server:

make docker-login

make docker-login runs docker login ghcr.io with your GitHub login as the user name, and Docker prompts for the password: paste the token there. Keep write:packages off every gh login, on the build server and on the laptop, so the only credential that can push images is the one Docker holds. Unless the build server has a Docker credential helper, docker login stores the token in ~/.docker/config.json, so log out after each release, as step 6 of Releasing does. The YubiKey never goes to the build server, and the packages token never goes on the laptop.

Expiry, loss and rotation

Expiry, loss and rotation in the shared guide has the commands to extend a key, to replace a lost or broken YubiKey and to act on a compromised key; each ends with a PR to tn-release-signing. Each change takes effect here when a PR moves the release pointer to it, as Rotating or revoking a key describes. Once a key expires, its signatures stop counting, on older releases too: make release-verify, CI and the check on Installing a release read the keys at the pointer on main and reject them.

Economic Incentives and Rewards

Telcoin Network’s economic model creates alignment between validator interests and network success through carefully structured incentives. Block rewards follow a dynamic issuance model based on consensus participation and leadership roles within committees. Transaction fees, particularly priority fees, are awarded to block proposers to incentivize maximum transaction processing. The validator’s stake requirement ensures long-term alignment with network success, while competitive operational expenses maintain attractive returns relative to capital commitment.

Each validator in the committee operates an independent transaction pool to propose unique batches for the next consensus block. The committee is responsible for validating the proposed transactions before deterministically ordering all batches of transactions to produce the next consensus block. Consensus blocks have a leader for the committed round, and the leader receives the block rewards at the end of the committee’s term. The period of time a committee is responsible is called an “epoch”. Block rewards for all leaders are automatically credited by the protocol at the end of each epoch, drawn from an issuance pool that governance funds on-chain.

The consensus block is then executed, which results in the beneficiary’s account balance increasing. An important distinction from other protocols is that each batch within the consensus block is executed as a separate block in the EVM. This is how the protocol can support multiple basefees in parallel, something that ultimately allows MNOs to protocolize “Quality-of-Service” within the same blockchain.

The two greatest costs to committee validators are computation during EVM execution and uploading batches of transactions for consensus. The cost of computation during execution is recovered through basefees and priority tips. The batch producer receives all the priority fees from transactions that make it to the final executed block. 100% of each transaction’s basefee is transferred to the governance safe to fund future block rewards.

In addition to transaction fees, the leader of the consensus block receives the reward for the round. Telcoin Association governance specifies the total amount of TEL issued per epoch by updating the consensus registry on-chain. Each epoch’s issuance is divided between leaders in proportion to the number of consensus blocks each one led, and the amount is adjustable so rewards can adjust based on overall transaction volume.

One current limitation of the protocol allows for the possibility of duplicate transactions within competing batches from different validators. The first executed batch that contains this transaction receives the priority fees if there are any. However, basefees and block rewards remain the same.