chore(data_node): add new Dolos endpoints - #614
Draft
michalrus wants to merge 5 commits into
Draft
Conversation
Proxy `pools/retiring` to the data node. Do not merge until this Dolos PR is on our runner (probably after Dolos 1.6.0): - txpipe/dolos#1122
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying blockfrost-platform with
|
| Latest commit: |
0bf642e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://81d5a090.blockfrost-platform.pages.dev |
| Branch Preview URL: | https://chore-pools-retiring.blockfrost-platform.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Proxies the Blockfrost Platform GET /pools/retiring endpoint through to the configured data node (Dolos), turning it from a hard-coded 404 into a functional, paginated API call.
Changes:
- Implement
crates/platformhandler for/pools/retiringusingAppState+ pagination query parsing, forwarding to the data node. - Add a new
DataNodePools::retiringclient method incrates/data_nodeto callpools/retiring. - Register
/pools/retiringin the integration test “supported endpoints” dataset.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/platform/src/api/pools/retiring.rs | Implements the Platform HTTP handler and forwards requests to the data node with pagination support. |
| crates/data_node/src/api/pools.rs | Adds the data-node client method for the pools/retiring backend path. |
| crates/integration_tests/tests/data/supported_endpoints.json | Marks /pools/retiring as a supported endpoint in test data. |
Proxy `/blocks/{hash_or_number}/txs/cbor` and `/blocks/latest/txs/cbor`
to the data node. Both return `[{ tx_hash, cbor }]` and honor the
standard `count`/`page`/`order` pagination parameters.
The existing `blocks/.../txs` route modules gain sibling `cbor` handlers,
so `txs.rs` becomes a module directory (`txs/{root,cbor}.rs`), matching
the layout already used by e.g. `scripts/{script_hash}` and
`metadata/txs/labels/{label}`.
pools/retiringProxy `/accounts/{stake_address}/transactions` to the data node,
mirroring the sibling `withdrawals`/`rewards`/`utxos` routes.
Stake-address validation also accepts the CIP-19 credential forms
(`stake_vk`, `stake_vkh`, `script`), forwarding them to the data node
for resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/pools/retiringtxpipe/dolos#1122/pools/retiring/blocks/{hash_or_number}/txs/cbor/blocks/latest/txs/cbor/accounts/{stake_address}/transactionstxpipe/dolos#1127/accounts/{stake_address}/transactions