Gets a list of blocks in the specified network.
Command syntax:
block new_datum_list
-net <net_name>
-chain <chain_name>
Options:
-net - name of the Cellframe network. The list of networks can be found in the <Config_dir> \ etc \ network folder folder or received by the Cellframe-Node-Cli Net List command
-chain - the name of Chain. The list of chain can be found in the directory <Config_dir> \ etc \ network \ <network_name> or get the Cellframe-Node-App Net List Chains command
If you request command in the Cellframe network, use parameter -chain main
.
CLI Example
Command:
cellframe-node-cli block List -net Backbone -chain Main
Response:
Backbone.main: have 3 blocks:
0xD3E07282FC1C4FC7333AEE789898BA17DF7659CA7B64047886FA12EDD82759C23:ts_create = Thu Apr 07 21:40:42 2022
0x12C505ECDC83320B59EA1A32DB01BF7FCF8A465AE6C203759DD82FD8728: TS_create = Mon APR 18 22:30:22 2022
0xCF7D793D4FC9DC0C34F000DFE07C5CF72C9884ED20FAA58FA417F5C46CCC6107: TS_create = TUE APR 19 09:47:24 2022
JSON-RPC Example
JSON-RPC Request - BLOCK LIST
Gets a list of blocks in the specified network.
Request Structure
JSON object:
{ "method": "block", "subcommand": "list", "arguments": { "net": "network_name", "chain": "chain_name" }, "id": "1" }
Parameters:
net
- name of the Cellframe Network. The list of networks can be found in the<Config_dir> \ etc \ network
folder or received using - Node Command - NET LISTchain
- the name of chain (main
orzerochain
)If you make a request in the Cellframe network, use parameter
chain:main
.Curl Example
Request:
curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{ "method": "block", "subcommand": "list", "arguments": { "net": "riemann", "chain": "main" }, "id": "1" }'
Response:
Link to original { "block number": 16, "hash": "0x69192FC0C669DCB339BCC89E443AD5810C13C25BD8BEDEB5936991E672F35BA2", "ts_create": "Fri, 14 Apr 2023 07:07:06 +0000" }, { "block number": 15, "hash": "0xB46B1B47E11167B6B840003AEB8CF0C93E499BAE70E008C9E22225EFBD58B90A", "ts_create": "Fri, 14 Apr 2023 04:57:30 +0000" }, { "block number": 14, "hash": "0x627F8C1D643F54153E436A83F4D0136575037B4DF8541D808BE3A18F95C0274E", "ts_create": "Fri, 14 Apr 2023 04:57:00 +0000" }, { "block number": 13, "hash": "0x480B3712638B9AC11D44C5AC98107657BBFE792FA1BBFDAC334CD7CCB59D91ED", "ts_create": "Wed, 12 Apr 2023 12:38:00 +0000" }, { "block number": 12, "hash": "0xB8EEAC538E9A6594FE711AF5A90E8D45A507236B15524F8E2E7FE9FD248DE680", "ts_create": "Wed, 12 Apr 2023 12:37:30 +0000" }, { "block number": 11, "hash": "0x61A0AD75C8E8DBE0BED7816B408AD5D8E6E6B4FE00D05E7D694CC04FD3105BC3", "ts_create": "Tue, 11 Apr 2023 10:04:07 +0000" }, { "block number": 10, "hash": "0x8A0EE4AE1151941F0247857A4978180442AB99DFA8E2B3E48BCB0E6DC0509309", "ts_create": "Tue, 11 Apr 2023 10:01:37 +0000" }, { "block number": 9, "hash": "0xF8739383D797E011C74896369BFBF1E04D77C0B95F105E49F87CFA0E19709878", "ts_create": "Tue, 11 Apr 2023 09:44:36 +0000" }, { "block number": 8, "hash": "0xDE02352C922D698DB3197EB1D8A6A347F0B5A643F912982A0108370BFB37B721", "ts_create": "Tue, 11 Apr 2023 09:08:33 +0000" }, { "block number": 7, "hash": "0x411503DB99A4B927227E8906F61E2D2562D1FC904628818BE3320CA954C0E99E", "ts_create": "Mon, 10 Apr 2023 15:17:19 +0000" }, { "block number": 6, "hash": "0xC37FD8F7BA41C6C121635D578DA889DFC10C3D671A1D5A9898A57B8CC402EA18", "ts_create": "Mon, 10 Apr 2023 15:06:28 +0000" }, { "block number": 5, "hash": "0x146F783E3BFEBA4EB6C860A73090E1AD2751ADDE0322520EE4C2B45144F950C0", "ts_create": "Mon, 10 Apr 2023 14:59:58 +0000" }, { "block number": 4, "hash": "0xEA2E3F68FE3E8983A8573A44A7717D78F6292B26E5B087AD68CDD8275D417093", "ts_create": "Mon, 10 Apr 2023 14:55:28 +0000" }, { "block number": 3, "hash": "0x3F40FFBFF2E79A9E606A9398C0BF6EE1F7439B505803D829A710E5DF6B1CFF3D", "ts_create": "Mon, 10 Apr 2023 14:54:58 +0000" }, { "block number": 2, "hash": "0x90B0F6D4182A33B8EBFBE4CFA1410E62870B442ADA05A8480853286D53C6864E", "ts_create": "Mon, 10 Apr 2023 14:49:28 +0000" }, { "block number": 1, "hash": "0x5FDA4B2952C89AB639AD77E00A8EAE9CBC5B472444F1003844DEAF3F4D618D0F", "ts_create": "Sat, 08 Apr 2023 02:01:19 +0000" }, { "limit": "unlimit" } ], { "riemann.main with filter - none, have blocks": 17729 } ], "id": 1 }