There is no endpoint which allows checking pool slip rollup information
This Issue is made to allow better Derived Pool depth debugging by exposing the pool slip rollup information,
notably regarding the unmerged-at-present !3450 (merged)
'patch calc median slip for multi-anchor pools'
and its discussion thread on uncontrolled growth of currRollup
(and by extension, the long rollup derived from the median of its snapshots).
( !3450 (comment 1793692029) )
In particular, I draw attention to the below lending/lending.yaml
regression test allowed by adding such an endpoint:
type: check
endpoint: http://localhost:1317/thorchain/lastblock
asserts:
- .|length >= 1
- .[0].thorchain == ${HEIGHT=20}
---
type: check
endpoint: http://localhost:1317/thorchain/slip/BTC.BTC
asserts:
- .|length == 1
- .[0].rollup_count == 23
- .[0].rollup_count > ${HEIGHT}
- .[0].rollup == 393
- .[0].summed_rollup == 343
- .[0].rollup > .[0].summed_rollup
# TODO: RollupSwapSlip should not add the same previous block height's pool slip multiple times
# (here incrementing rollup_count to higher than the block height itself)
# when CalcAnchor is called multiple times
# (in other words, rollup and long_rollup exhibiting uncontrolled growth).
At this time I do not propose a specific code change to fix the existing bug,
rather proposing this endpoint change to allow regression test confirmation of a future bugfix
as well as easier debugging of any unintuitive Derived Pool depth behaviour in future.
Specifically: !3496 (merged)
'/thorchain/slips
and /thorchain/slip/{asset}
endpoints (with example regression test)`.