Closed SmaugPool closed 6 days ago
The rewards that are not related to a specific pool (MIR and proposal refunds for Conway) have been moved to the reward_rest table. The motivation for this was that having a nullable pool_id was problematic.
select sum(amount) from reward_rest where addr_id=7209;
sum
---------
1697525
select * from reward_rest where addr_id=7209;
addr_id | type | amount | spendable_epoch | earned_epoch
---------+----------+--------+-----------------+--------------
7209 | treasury | 474020 | 279 | 278
7209 | reserves | 108736 | 286 | 285
7209 | treasury | 354140 | 299 | 298
7209 | treasury | 760629 | 301 | 300
Actually instead of reward_rest
, it's called instant_reward
in 13.2.0.2. It was later renamed to reward_rest
to include the
treasury withdrawals and proposal refunds for Conway
Thank you! This explains it all:
> select (select sum(amount) from reward where addr_id=7209) + (select sum(amount) from instant_reward where addr_id=7209) - (select sum(amount) from withdrawal where addr_id=7209);
----------
0
(1 row)
And sorry to have missed that change.
OS Ubuntu 22.04
Versions The
db-sync
version (egcardano-db-sync --version
): 13.2.0.2 PostgreSQL version: 14.12Build/Install Method Installed cardano-db-sync-13.2.0.2-linux.tar.gz binary assets.
Run method systemd
Additional context Fresh restore from db-sync-snapshot-schema-13.2-block-10484700-x86_64.tgz snapshot.
Problem Report
stake1uy8em3f3v7veagycqrcw69q4jggvrtwze6ve4rvtaz9j3rsxkpflt
(stake_address.id=7209) total withdrawal amount is greater than total reward amount.This seems unexpected to me but maybe I'm missing something.