Can someone check this for me in their GRPC v2 implementation?
block_hash = 'd2735387725c426c85e5242177f80b12a44c1ef6aaa8cc7453a7ed83f912dc10'
This is the last block from the Payday that happened on 2022-06-25
.
I’m checking baker/pool 84252
.
1
Querying GetBakerList
for this hash and baker, which has 84252
in the returned baker list for this block. The documentation for GetBakerList
states Get all the bakers at the end of the given block., however no mention of RewardPeriod
.
2
Next up, I’d like to get this pool’s delegators (for that Payday, so from that block).
Querying GetPoolDelegatorsRewardPeriod
, however, leads to an error, grpc_message:"block or pool not found."
?
The documentation for GetPoolDelegatorsRewardPeriod
states Get the fixed delegators of a given pool for the reward period of the given block. In contracts to the GetPoolDelegators
which returns delegators registered for the given block, this endpoint returns the fixed delegators contributing stake in the reward period containing the given block.
3
There’s another thing to check, that is GetAccountInfo
.
This returns a AccountInfo
object, which has an optional property AccountStakingInfo
, which leads to AccountStakingInfo.Baker
, which has an optional property pool_info
.
According to the documentation: Present if the account is currently a baker, i.e., it is in the baking committee of the current epoch.
Checking our baker at this hash leads to:
...
pool_info:
{'commission_rates': {
'baking': 0.1,
'finalization': 1.0,
'transaction': 0.1
},
'url': 'https://concordium.vn',
'open_status': 'openForAll'}
...
4
We can query GetPoolInfo
, which, according to the documentation, Get information about a given pool at the end of a given block.. This yields a PoolInfoResponse
, which has an optional property called current_payday_info
, according to the documentation, Information of the pool in the current reward period..
Now, for this baker/block, this yields:
...
current_payday_info=None,
...}
Hence, according to GetPoolInfo
, our account in not a baker in this reward period.
Conclusion
-
GetBakerList
lists this account as a baker in this block -
GetPoolDelegatorsRewardPeriod
can’t find the baker in this block - The
pool_info
property is present inGetAccountInfo
, so this account is a baker in the current reward period. -
GetPoolinfo
tells us it’s not a baker in the current reward period.
Either my GRPCv2 implementation needs help, or this is inconsistent? If not, how can I determine if an account is a baker in a given payday?
(added the 4-th test to the first version of this post).