Tezlink: TzKT indexing empty blocks
Context
follows %Tezlink: Tezos-compatible ledger
ressource %Tezlink: end-to-end demonstration of Tezos Layer 1
The L2 node, when running in Tezlink mode, is able to answer to a few Octez RPCs. This milestone is about extending the support of RPCs in the L2 node to the point where the TzKT indexer is able to index the L2 chain (which is currently limited to empty blocks as long as %Tezlink: Tezos-compatible ledger is not finished).
First target: index and follow empty blocks
See #7973 for the details on how the lists were produced.
For tzkt we need to:
-
implement /chains/main/blocks/<i>@ArnaudBihan !18173 (merged) -
implement /chains/main/blocks/<i>/context/contracts/<address>@ArnaudBihan !18210 (merged) -
mock /chains/main/blocks/<i>/context/issuance/expected_issuance@pe.cornilleau !18197 (merged) -
mock /chains/main/blocks/<i>/context/raw/json/cycle/<i>@ArnaudBihan !18407 (merged) -
optionnal: support sandboxmode of the evm node for tezlink @pe.cornilleau !18239 (merged)
note: Umami also needs the first two.
risk: we don't know exactly what tzkt does with the RPCs we plan to mock. We might have to add more logic into the mock, to ensure consistency.
Validation
rerun an experiment similar to #7973 with just the tzkt sync and check that it can follow a chain with empty blocks.
If possible, being able to start tezink in the sandbox mode of the octez-evm-node would facilitate further experiments.
mock expected issuance
Example of result
[
{
"cycle": 5,
"baking_reward_fixed_portion": "333333",
"baking_reward_bonus_per_slot": "1302",
"attesting_reward_per_slot": "2604",
"seed_nonce_revelation_tip": "260",
"vdf_revelation_tip": "260"
},
{
"cycle": 6,
"baking_reward_fixed_portion": "333333",
"baking_reward_bonus_per_slot": "1302",
"attesting_reward_per_slot": "2604",
"seed_nonce_revelation_tip": "260",
"vdf_revelation_tip": "260"
},
{
"cycle": 7,
"baking_reward_fixed_portion": "333333",
"baking_reward_bonus_per_slot": "1302",
"attesting_reward_per_slot": "2604",
"seed_nonce_revelation_tip": "260",
"vdf_revelation_tip": "260"
}
]
mock context/raw/json/cycle
{
"already_denounced": [],
"nonces": [],
"pending_consensus_keys": [],
"pending_staking_parameters": []
}
{
"already_denounced": [],
"delegate_sampler_state": {
"total": "20000030227663",
"support": {
"length": 5,
"fallback": {
"consensus_pk": "edpktzNbDAUjUk697W7gYg2CRuBQjyPxbEg8dLccYYwKSKvkPvjtV9"
},
"elements": [
{
"consensus_pk": "edpktzNbDAUjUk697W7gYg2CRuBQjyPxbEg8dLccYYwKSKvkPvjtV9"
},
{
"consensus_pk": "edpkuTXkJDGcFd5nh6VvMz8phXxU3Bi7h6hqgywNFi1vZTfQNnS1RV"
},
{
"consensus_pk": "edpkv8EUUH68jmo3f7Um5PezmfGrRF24gnfLpH3sVNwJnV5bVCxL2n"
},
{
"consensus_pk": "edpkuFrRoDSEbJYgxRtLx2ps82UdaYc1WwfS9sE11yhauZt5DgCHbU"
},
{
"consensus_pk": "edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav"
}
]
},
"p": {
"length": 5,
"fallback": "0",
"elements": [
"20000030227663",
"20000029416065",
"20000026936384",
"20000023575202",
"20000007395380"
]
},
"alias": {
"length": 5,
"fallback": -1,
"elements": [
-1,
0,
0,
2,
3
]
}
},
"nonces": [],
"pending_consensus_keys": [],
"pending_staking_parameters": [],
"random_seed": "9b7328e5393a466fc47ef16eb74121939b06e6ec4c17295eb25611f1b76d6a33",
"selected_stake_distribution": [
{
"baker": "tz1b7tUupMgCNw2cCLpKTkSD1NZzB5TkP2sv",
"active_stake": {
"frozen": "200000546330",
"delegated": "3800008735167"
}
},
{
"baker": "tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN",
"active_stake": {
"frozen": "200000343306",
"delegated": "3800006522802"
}
},
{
"baker": "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv",
"active_stake": {
"frozen": "200000449809",
"delegated": "3800006267960"
}
},
{
"baker": "tz1faswCTDciRzE4oJ9jn2Vm2dvjeyA9fUzU",
"active_stake": {
"frozen": "200000376416",
"delegated": "3800005506797"
}
},
{
"baker": "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx",
"active_stake": {
"frozen": "200000219540",
"delegated": "3800001259536"
}
}
],
"total_active_stake": {
"frozen": "1000001935401",
"delegated": "19000028292262"
}
}
Ressource:
There is an online frontend for tzkt that can be used with any backend https://sandbox.tzkt.io/?tzkt_api_url=https%3A%2F%2Fapi.tzkt.io