@@ -80,7 +80,7 @@ ORDER BY pool_id_hex;
8080
8181## Specific SPO test
8282
83- Epoch 212 (spendable in 213), SPO 30c6319d1f680..., rewards actually given out:
83+ Epoch 211 (spendable in 213), SPO 30c6319d1f680..., rewards actually given out:
8484
8585``` sql
8686SELECT
@@ -94,24 +94,45 @@ AND encode(ph.hash_raw, 'hex') LIKE '30c6319d1f680%'
9494GROUP BY ph .hash_raw ;
9595```
9696
97+ Note: pool_id for this SPO is 93
98+
9799| pool_id_hex | member_rewards | leader_rewards |
98100| ----------------------------------------------------------| ----------------| ----------------|
99- | 30c6319d1f680470c8d2d48f8d44fd2848fa9b8cd6ac944d4dfc0c54 | 33869550293 | 2164196243 |
101+ | 30c6319d1f680470c8d2d48f8d44fd2848fa9b8cd6ac944d4dfc0c54 | 32024424770 | 2067130351 |
100102
101103Total 34091555121
102104
103105We have
104106
105107```
106- 2025-08-21T13:59:50.578627Z INFO acropolis_module_accounts_state::rewards: Pool 30c6319d1f680470c8d2d48f8d44fd2848fa9b8cd6ac944d4dfc0c54 blocks=1 pool_stake=44180895641393 relative_pool_stake=0.001392062719472796345022132114111547444335115561171699064775592918376184270138741760710696148952284469 relative_blocks=0.0005022601707684580612757408337518834756403817177297840281265695630336514314414866901054746358613761929 pool_performance=1 optimum_rewards=34113076193 pool_rewards=34113076193
108+ 2025-08-26T10:49:39.003335Z INFO acropolis_module_accounts_state::rewards: Pool 30c6319d1f680470c8d2d48f8d44fd2848fa9b8cd6ac944d4dfc0c54 blocks=0 pool_stake=44180895641393 relative_pool_stake=0.001392062719472796345022132114111547444335115561171699064775592918376184270
109+ 138741760710696148952284469 relative_blocks=0 pool_performance=1 optimum_rewards=34091555158 pool_rewards=34091555158
107110```
108111
109- Optimum rewards: 34113076193
112+ Optimum rewards: 34091555158
113+
114+ Difference: We are too high by 37 LL compared to DBSync - suspect rounding of individual payments
115+ We match the maxP from the Haskell node:
116+
117+ ```
118+ **** Calculating PoolRewardInfo: epoch=0, rewardInfo=PoolRewardInfo {poolRelativeStake = StakeShare (44180895641393 % 31737719158318701), poolPot = Coin 34091555158, poolPs = PoolParams {ppId = KeyHash {unKeyHash = "30c6319d1f680470c8d2d48f8d44fd2848fa9b8cd6ac944d4dfc0c54"}, ppVrf = VRFVerKeyHash {unVRFVerKeyHash = "f2b08e8ec5fe945b41ece1c254e25843e35e574dd43535cbf244524019f704e9"}, ppPledge = Coin 50000000000, ppCost = Coin 340000000, ppMargin = 1 % 20, ppRewardAccount = RewardAccount {raNetwork = Mainnet, raCredential = KeyHashObj (KeyHash {unKeyHash = "8a10720c17ce32b75f489ed13fb706dac51c6006b7fee1a687f36620"})}, ppOwners = fromList [KeyHash {unKeyHash = "8a10720c17ce32b75f489ed13fb706dac51c6006b7fee1a687f36620"}], ppRelays = StrictSeq {fromStrict = fromList [SingleHostName (SJust (Port {portToWord16 = 3001})) (DnsName {dnsToText = "europe1-relay.jpn-sp.net"})]}, ppMetadata = SJust (PoolMetadata {pmUrl = Url {urlToText = "https://tokyostaker.com/metadata/jp3.json"}, pmHash = "\201\246\183K\128\&1 \EOT*\f\194\GS>B\168\136j\239\241\&4\189\230\175\SI4\163\160P\206\162\163]"})}, poolBlocks = 1, poolLeaderReward = LeaderOnlyReward {lRewardPool = KeyHash {unKeyHash = "30c6319d1f680470c8d2d48f8d44fd2848fa9b8cd6ac944d4dfc0c54"}, lRewardAmount = Coin 2067130351}}, activeStake=Coin 10177811974822904, totalStake=Coin 31737719158318701, pledgeRelative=50000000000 % 31737719158318701, sigmaA=44180895641393 % 10177811974822904, maxP=34091555158, appPerf=1 % 1, R=Coin 31834688329017****
119+ ```
110120
111- Difference: We are too high by 21521072, or 0.06%
121+ ## ADA pots data from DBSync
112122
113- Input into this in epoch 212 is :
123+ First 10 epochs in ada_pots :
114124
115125```
116- Calculating rewards: epoch=212 total_supply=31737719158318701 stake_rewards=31854784667376
126+ id | slot_no | epoch_no | treasury | reserves | rewards | utxo | deposits_stake | fees | block_id | deposits_drep | deposits_proposal
127+ -----+-----------+----------+------------------+-------------------+-----------------+-------------------+----------------+--------------+----------+---------------+-------------------
128+ 1 | 4924800 | 209 | 8332813711755 | 13286160713028443 | 593536826186446 | 31111517964861148 | 441012000000 | 10670212208 | 4512244 | 0 | 0
129+ 2 | 5356800 | 210 | 16306644182013 | 13278197552770393 | 277915861250199 | 31427038405450971 | 533870000000 | 7666346424 | 4533814 | 0 | 0
130+ 3 | 5788800 | 211 | 24275595982960 | 13270236767315870 | 164918966125973 | 31539966264042924 | 594636000000 | 7770532273 | 4555361 | 0 | 0
131+ 4 | 6220800 | 212 | 32239292149804 | 13262280841681299 | 147882943225525 | 31556964153057144 | 626252000000 | 6517886228 | 4576676 | 0 | 0
132+ 5 | 6652800 | 213 | 40198464232058 | 13247093198353459 | 133110645284460 | 31578940375911744 | 651738000000 | 5578218279 | 4597956 | 0 | 0
133+ 6 | 7084800 | 214 | 48148335794725 | 13230232787944838 | 121337581585558 | 31599599756081623 | 674438000000 | 7100593256 | 4619398 | 0 | 0
134+ 7 | 7516800 | 215 | 55876297807656 | 13212986170770203 | 117660526059600 | 31612774463528795 | 695040000000 | 7501833746 | 4640850 | 0 | 0
135+ 8 | 7948807 | 216 | 63707722011028 | 13195031638588164 | 122159720478561 | 31618386634872973 | 706174000000 | 8110049274 | 4662422 | 0 | 0
136+ 9 | 8380800 | 217 | 71629614335572 | 13176528835451373 | 127730158329564 | 31623386398075064 | 719058000000 | 5935808427 | 4683639 | 0 | 0
137+ 10 | 8812800 | 218 | 79429791062499 | 13157936081322000 | 134680552513121 | 31627219255406326 | 729244000000 | 5075696054 | 4704367 | 0 | 0
117138```
0 commit comments