cardano-node
cardano-node copied to clipboard
[FEATURE] - query each stake snapshot independently [Draft]
What
A command to query each stake snaphost independently; for example
cardano-cli query stake-snapshot --mark-snapshot ...
cardano-cli query stake-snapshot --go-snapshot ...
the output should contain all 3 maps
[ "delegations", "poolParams", "stake" ]
Why
Currently, many tools rely on dumping the entire ledger-state to then extract the required snapshot values which is expensive and inefficient and there is no alternative good solution yet.
Personas
- [ ] SPOs
- [ ] dApp Devs
- [ ] Exchanges
- [x] Wallets
- [x] 3rd party tools
- [ ] ADA holders
Definition of Done (DoD)
- [ ] Acceptance Criteria + User Stories & DoD created and singed-off (by PO, dev & test owners)
- [ ] Builds successfully on CI
- [ ] Code & Test review (as per Acceptance Criteria)
- [ ] There is documentation and/or examples for the new functionality (usage/response)
- [ ] Log/record changes on Vnext (or similar depending on what we adopt)
- [ ] Ticket number(s) included in PR description
- [ ] All Acceptance Criteria met and covered by dev/unit/property/integration tests
- [ ] System/E2E automated tests + System Test Engineer Owner Sign-off
NOTE: Ideally, we should merge only fully implemented and tested features into the master branch. So all the above steps are required for the PR to be merged.
In order to avoid the PRs becoming stale and requiring to be rebased on master, these can be merged after a reasonable time (current agreement is 3 days) if the System Test Engineer Owner's sign-off was not provided (last step in the DoD).
IMPORTANT: Any deviation from the plan should be discussed and agreed as a comment in the Feature file.
Sign-off
- [ ] Product Owner
- [ ] Dev Owner
- [ ] System Test Engineer Owner
Related PRs
- PR # here
Acceptance Criteria
Acceptance Criteria & User Stories define here (or in a separate file (linked here) for a big feature)
the output should contain all 3 maps
might be good to split the maps further by specifying arguments (unless it is going to be lumped at source and then filtered on client) to further reduce the output size to parse.
Looks perfect. @CarlosLopezDeLara
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
!
Any updates on this issue? Still relying on a full ledger state dump is very painful.
@newhoggy you asked how it was with 8.0.0; unfortunately not very good.
time cardano-cli query stake-snapshot --mainnet --all-stake-pools > stakesnapshot.json
real 35m48.363s
user 0m0.041s
sys 0m0.006s
FYI We need to see how this PR improves current performance before we proceed with queries for each snapshot.
pinging this issue again here. Ledger state is still very painful at 2.4gb.
A command to query each stake snaphost independently; for example
cardano-cli query stake-snapshot --mark-snapshot ... cardano-cli query stake-snapshot --go-snapshot ...
the output should contain all 3 maps
[ "delegations", "poolParams", "stake" ]
@papacarp this is not on the high priorities at the moment. Integrating CIP1694 is on top, but I'll make sure its taken care of as soon as possible.
Even with binary cbor from the node, we're now at 2.26gb every epoch for the ledger state dump. Please continue to prioritize this. It can take upwards of 5 minutes to download and parse this cbor from the node. Most of this data, we don't use at all.
2.27gb
2.28gb
2.30gb