3

I am observing different behavior for some rpc call

curl -v http://mainnet.tezos.cryptium.ch:8732/chains/main/blocks/BKrq16vch5v3iEE1hHSMENLh54vBikkmqYLDv4j7hANx6ZE3Rmb~72755

gives me no data (error 404)

however when i do

curl -v https://mainnet.smartpy.io/chains/main/blocks/BKrq16vch5v3iEE1hHSMENLh54vBikkmqYLDv4j7hANx6ZE3Rmb~72755

I get the information about block BLeam7Xqdw7w7ydU7g38gs82XJE6wNZMfm61cArUPaSFBzJ6q5r. Why is that ?

Note that if i request a more recent offset like ~1 both return data for block BLN3bh4ZCpBtade3VGbGbFWz2Nhvah3SqGKYZkdL6tbQ7FMD6f6

EDIT: a related question regarding the nature of how full and archive nodes differ for this RPC call is available here

3

You can call the checkpoint rpc:

http://mainnet.tezos.cryptium.ch:8732/chains/main/checkpoint

which returns

{"block":
  {"level":729089,
   "proto":5,
   "predecessor":"BMF3ELahUsKsvSfct9qVFWX3Pf6aV2sLpKRgWkwTePpmo3tNjEG",
   "timestamp":"2019-12-09T21:56:50Z", "validation_pass":4,
   "operations_hash":"LLob8aa16cFyHG1rCrMQ2NrLDtCDegMNQLXmRWCHFD86KmYefbwbi",
   "fitness":["01","0000000000012001"], 
   "context":"CoWPc7UaEHYdXJ3PEpp6CyKB11K9XgX4n87cJpAMuFzbyAerrHSD",
   "protocol_data":  "0000756e6b6f8a3562bc00f131365318490b14b69329500a1f6e2000f0f767edf777ec9c6f33c6ff149eee289f642b2bdcbfdd8d54013da72eeedea56c1b828ba11c8adbd67f63f5e93578"},
 "save_point":729089,
 "caboose":0,
 "history_mode":"full"
}

history_mode for this node is "full" and full nodes prune data other than block's headers and operations from blocks before the current checkpoint.

Querying only the block's header in full mode works at any level, e.g.: curl -v http://mainnet.tezos.cryptium.ch:8732/chains/main/blocks/BKrq16vch5v3iEE1hHSMENLh54vBikkmqYLDv4j7hANx6ZE3Rmb~72755/header works. Unfortunately, the RPC endpoint for block's operations in full mode is currently broken - see issue "Full node unable to query operation data from blocks prior to most recent checkpoint":

This is currently not shown for mainnet.smartpy.io (which is an archive node).

Edit: the rpc is now opened as well on mainnet.smartpy.io (and shows "archive").

{
  "block": {
    "level": 729089,
    "proto": 5,
    "predecessor": "BMF3ELahUsKsvSfct9qVFWX3Pf6aV2sLpKRgWkwTePpmo3tNjEG",
    "timestamp": "2019-12-09T21:56:50Z",
    "validation_pass": 4,
    "operations_hash": "LLob8aa16cFyHG1rCrMQ2NrLDtCDegMNQLXmRWCHFD86KmYefbwbi",
    "fitness": [
      "01",
      "0000000000012001"
    ],
    "context": "CoWPc7UaEHYdXJ3PEpp6CyKB11K9XgX4n87cJpAMuFzbyAerrHSD",
    "protocol_data": "0000756e6b6f8a3562bc00f131365318490b14b69329500a1f6e2000f0f767edf777ec9c6f33c6ff149eee289f642b2bdcbfdd8d54013da72eeedea56c1b828ba11c8adbd67f63f5e93578"
  },
  "save_point": 0,
  "caboose": 0,
  "history_mode": "archive"
}```

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.