Other tables needing the same relationship:
_Originally posted by @rhyslbw in https://github.com/input-output-hk/cardano-db-sync/issues/195#issuecomment-660814051_
Basically a way to relate Reward
and Withdrawal
values back to the pool they originated from.
Now that I have looked at it, the Reward
table contains MirRewards
which may not be the rewards @rhyslbw is thinking about.
Would need more details on what's being asked for to be totally sure, but this sounds like stuff for phase 2 when we can depend on info from the ledger state.
Note that we cannot relate withdrawals or MIR values to stake pools. They are related to specific reward accounts, but not related to stake pools.
AFAIK actually rewards are listed only if they have been withdrawn. (see #175). Is there a chance to have a simple way to query pool's delegators rewards implemented soon ?
The reward
table already references the pool_id
.
~Need to add this to the Withdrawal
table.~ There is no one-to-one relationship between a withdrawal and a pool_id. A single withdrawal may withdraw rewards earned by delegating to more than one pool (eg earned in different epochs, by delegating to different pools).
Most helpful comment
AFAIK actually rewards are listed only if they have been withdrawn. (see #175). Is there a chance to have a simple way to query pool's delegators rewards implemented soon ?