fix: const CIP25 label, replace expect with Err
Signed-off-by: William Hankins <[email protected]>
Signed-off-by: William Hankins <[email protected]>
feat: extend spo state to store historical data; refactor accounts state
- Introduced struct to encapsulate live stake data. - Implemented method in to calculate live stake metrics.
refactor: rename & expand epoch activity counter module; introduce BlockHash type
- Introduced and structs to include transaction hash and certificate index. - Enhanced and implementations to store historical updates and also handle governance procedures. - Refactor spo_state to use consistent config constants. - Make some subscriptions optional which will be enabled when stake_addresses are enabled.
Handles Shelley (until Allegra) bug where stake deregistrations are still accounted up to the point the Haskell node starts the reward calculation, rather than the epoch boundary. Also makes our normal reward calculation rollback-proof, which is a good thing anyway.
- improve pool's delegators calculation
- Remove aggregated_spo_state from spo_state and use epochs_history instead for active_stakes information - Added utxo values map and sum query to accounts state - Added optimial pool sizing query to accounts-state to calculate pool's saturation - Remove redundant curly braced struct type in both accounts and pool queries - Enhance serde for Pool's Rest response type to reduce duplicated serialization
Deposits now repaid after snapshot taken, to avoid them changing the stake This revealed another problem, which is if an SPO withdraws all its stake after a snapshot but still produces blocks, it would have previously been ignored. The early repayment of the deposit previous masked this. Switched logging of epochs in rewards and snapshots to be the epoch just left - that is, the one that blocks are being counted for
Signed-off-by: William Hankins <[email protected]>
Signed-off-by: William Hankins <[email protected]>
feat: optimize asset storage and add history / policy assets REST handlers