Add consensus key's public key information in RPC
Context
Addresses #5229 (closed) by adding consensus key's public key information in the ../context/delegates/<delegate_pkh>/consensus_key
RPC.
The new RPC response looks like:
$ curl -s http://localhost:18731/chains/main/blocks/head/context/delegates/tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx/consensus_key | jq
{
"active": {
"pkh": "tz1ekdUNZ8n8B2pjMKyfPqwZvU7yz59mtgCN",
"pk": "edpktfm2C88yPVCcBu62KWQN18QMSfpVc8GvTmxf9BFYMDgyGxjuWf"
},
"pendings": [
{
"cycle": 6,
"pkh": "tz1fmkMwJiaFwFPyj18YpFt13ErBwiD9arkj",
"pk": "edpkuSvQueH5ku6oBrDz5ZQ53Pco9yaByKuKZV8K3cWmqKuK1hR3JJ"
}
]
}
Compared to the old RPC response:
$ curl -s http://localhost:18731/chains/main/blocks/head/context/delegates/tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx/consensus_key | jq
{
"active": "tz1ekdUNZ8n8B2pjMKyfPqwZvU7yz59mtgCN",
"pendings": [
{
"cycle": 6,
"pkh": "tz1fmkMwJiaFwFPyj18YpFt13ErBwiD9arkj"
}
]
}
The "full info" RPC ../context/delegates/<delegate_pkh>
does not change for retro-compatibility reasons.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by vbot