Difference in slot number between Cardano Rest API and cardano-cli

When I query the tip of the blockchain using cardano-cli, I get the following information:

{
    "blockNo": 1955537,
    "headerHash": "2b6e54ddceb550b68b6bc44b3fa4d2de05fb4f84d306dc100bcc8618b50a7c42",
    "slotNo": 9025840
}

However, when I query the rest API endpoint /api/blocks/pages, the same block has a different value in cbeSlot:

 {
        "cbeEpoch": 91,
        "cbeSlot": 83440,
        "cbeBlkHeight": 1955537,
        "cbeBlkHash": "2b6e54ddceb550b68b6bc44b3fa4d2de05fb4f84d306dc100bcc8618b50a7c42",
        "cbeTimeIssued": 1603395056,
        "cbeTxNum": 0,
        "cbeTotalSent": {
          "getCoin": "0"
        },
        "cbeSize": 3,
        "cbeBlockLead": "32a954b521c0b19514408965831ef6839637de7a1a6168bcf8455c504ba93b9c",
        "cbeFees": {
          "getCoin": "0"
        }
      },

Why is cbeSlot different from slotNo? What’s the difference between the two?

Seems that the rest API gives you the SlotHeight relative to the current epoch, whereas CLI gives an absolute SlotHeight. At least looks like it

1 Like