(Resolved) Epoch date and time

Hello.

Is it possible to determine the exact date and time at which a given epoch was started or finished?

Hello @J053,

I’ve escalated this to the dev team for you. I believe mainnet.incognito.org pulls similar information to display the epoch block remaining to what you are asking.

2 Likes

An epoch is calculated based on Beacon blocks, with each block taking 15 seconds to be produced. The epoch number increments after 350 Beacon blocks have been generated. In an ideal environment, it would take 15 * 350 = 5250 seconds for an epoch to complete. However, it’s important to consider that network delays, failures in Beacon block production, or insufficient votes to approve a block can result in a longer duration than 5250 seconds.

You can use this RPC to track block time, epoch and block number:

curl --location 'https://YOUR_FULLNODE.com' \
--header 'Content-Type: application/json' \
--data '{  
   "jsonrpc":"1.0",
   "method":"getblockchaininfo",
   "params":[],
   "id":1
}
'

2 Likes

Thank you for the information. That RPC does not let me introduce a custom epoch to see its time, right?

let’s say 1st block of epoch 11440 is 4003651.
call this rpc to get block time:

curl --location 'https://your_fullnode.com' \
--header 'Content-Type: application/json' \
--data '{
   "jsonrpc": "1.0",
   "id": 1,
   "method": "retrievebeaconblockbyheight",
   "params": [
      4003651,
      "2"
   ]
}'

image

2 Likes