Network & RPC Information
Connecting to the correct Shardeum network and understanding how to interact with its RPC (Remote Procedure Call) endpoints are vital for both running a validator and developing applications.
Shardeum Networks
Shardeum typically runs several networks simultaneously for different purposes:
Mainnet
The live, production network where real value is transacted.
- Explorer:
https://explorer.shardeum.org/
- RPC Endpoints:
https://api.shardeum.org/
andhttps://partner-api.shardeum.org/
(Often has higher rate limits for partners) - Chain ID: Typically
8118
(always verify with official sources for mainnet). - Archivers: (IPs/ports for archivers can change; these are examples and should be verified)
http://35.238.248.68:4000
,http://34.23.94.188:4000
Stagenet
A network that mirrors mainnet functionality for final testing and staging before mainnet releases or upgrades. This is often the most stable pre-production environment.
- Explorer:
https://explorer-stagenet.shardeum.org/
- RPC Endpoint:
https://api-stagenet.shardeum.org/
- Chain ID: e.g.
8081
(verify with announcements) - Archivers: (Example, verify)
http://34.57.177.170:4000
,http://34.73.104.156:4000
,http://35.230.76.119:4000
Testnet
Used for active development, testing new features, and public incentivized testing. These networks can be reset or have features change more frequently.
- Explorer: e.g.
https://explorer-testnet.shardeum.org/
- RPC Endpoint: e.g.
https://api-testnet.shardeum.org/
- Chain ID: e.g.
8083
(verify with announcements) - Archivers: (Example, verify)
http://104.197.117.164:4000
Key Takeaway: Always use the RPC URL, Chain ID, and Archiver URLs specific to the network you intend to interact with. Using mismatched information (e.g. a testnet RPC with a mainnet Chain ID in MetaMask) will lead to errors. Official Shardeum documentation and announcements are the source of truth for current network details.
RPC Endpoints & Interactions
Shardeum is EVM-compatible, so you can interact with its RPC endpoints using standard Ethereum tools and libraries (like ethers.js, web3.js, curl).
Common RPC Methods:
eth_getTransactionCount
: Get the nonce for an address.eth_gasPrice
: Get the current gas price.eth_sendRawTransaction
: Submit a signed transaction.eth_getTransactionReceipt
: Get the receipt of a transaction.eth_getBlockByNumber
: Get information about a block.eth_getBalance
: Get the SHM balance of an account.eth_getCode
: Get the contract code at an address.
Shardeum-Specific Endpoints (usually on Validator Nodes or Archivers):
These are often accessed directly via HTTP GET requests to a validator node's IP and external port (e.g. http://YOUR_NODE_IP:10001/
) or an Archiver IP and port (e.g. http://ARCHIVER_IP:4000/
).
/nodeinfo
: Provides information about a specific validator node, including its public key, IP, ports, and status.- Example:
curl http://<NODE_IP>:<NODE_EXT_PORT>/nodeinfo
- Example:
/account/<WALLET_ADDRESS_OR_NODE_PUBKEY>?type=<TYPE>
: Retrieves account details.type=9
is often used when querying by node public key to get staking-related info like thenominator
(staker wallet).- Example:
curl http://<NODE_IP>:<NODE_EXT_PORT>/account/<NODE_PUBKEY>?type=9
/canUnstake/<NOMINEE_ADDRESS>/<NOMINATOR_ADDRESS>
: Checks if a staked node (nominee) can be unstaked by the staker wallet (nominator).- Example:
curl http://<NODE_IP>:<NODE_EXT_PORT>/canUnstake/<NODE_PUBKEY>/<STAKER_WALLET_ADDRESS>
- Example:
/nodelist?activeOnly=true
: (Archiver) Returns a list of currently active validator nodes./full-nodelist?activeOnly=true
: (Archiver) Returns the complete list of active nodes./full-nodelist?standbyOnly=true
: (Archiver) Returns the list of standby nodes./cycleinfo/<CYCLE_NUMBER>
: (Archiver) Provides information about a specific cycle, including network parameters likedesired
active nodes and currentactive
nodes. Cycle1
often contains foundational network config.- Example:
curl http://<ARCHIVER_IP>:4000/cycleinfo/1
- Example:
RPC Issues & Behavior:
gasUsed
vsgasPrice
: In some transaction receipts or RPC responses,gasPrice
might actually reflect thegasUsed
value, or a flat fee. Shardeum's gas model has evolved; initially, it was a flat fee, sogasUsed
might be constant for many simple transactions.- Block Events (
provider.on("block", ...)
in ethers.js):- Shardeum processes transactions in cycles (e.g. 1 minute). Within each cycle, multiple blocks are produced (e.g. 10 blocks if block time is 6 seconds).
- You might observe block events being emitted in batches at the end of a cycle rather than one by one as each block is technically formed. This is because the events might be tied to cycle completion and finalization.
- If the network is very quiet (few transactions), you might only see these batches of empty blocks.
Important: Transactions are included in blocks from the previous cycle (or the previous minute's worth of activity) to ensure all transactions within that period are resolved and included. This means there's a slight delay (e.g. ~1 minute) between a transaction occurring and it appearing in a block event you subscribe to. This is by design for consistency.
- "Transaction timestamp out of range": This error usually indicates a significant clock skew between your machine sending the transaction and the network, or extreme network latency. Ensure your system time is synchronized. This was more common in earlier, less stable network versions.
- "Same destination load limit": The network may rate-limit transactions to the same destination address if they are sent too rapidly in parallel. If sending multiple transactions to one address (e.g. consolidating funds), send them sequentially with a small delay.
Always use the correct network RPC endpoint for your interactions. If you're developing, using a local or a specific testnet/stagenet node that you control can be beneficial for direct API calls.