feat: support more minibf endpoints of Dolos#592
Open
michalrus wants to merge 2 commits into
Open
Conversation
See <https://docs.txpipe.io/dolos/apis/minibf>. Unfortunately 2 tests had to be ignored, because they reach too deeply into pagination, and Dolos returns 400. I only tested Preview locally, let's see how Preprod and Mainnet do on CI.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying blockfrost-platform with
|
| Latest commit: |
6f4b781
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d57134e6.blockfrost-platform.pages.dev |
| Branch Preview URL: | https://chore-missing-minibf-endpoin.blockfrost-platform.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for additional Dolos minibf endpoints by proxying more Platform API routes to the data node, updating the data-node client surface accordingly, and aligning integration test allow/ignore lists.
Changes:
- Implemented/proxied handlers for more endpoints (scripts by hash + datum, assets addresses/transactions, epoch blocks, pool history, and
addresses/{address}/txs). - Extended
crates/data_nodeclient APIs to call the corresponding Dolos paths. - Updated integration test endpoint allowlist and expanded ignored tests to account for known Dolos pagination/behavior differences.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/platform/src/server/routes/hidden.rs | Registers the new hidden API route /addresses/{address}/txs. |
| crates/platform/src/api/scripts/script_hash/root.rs | Proxies /scripts/{script_hash} to the data node. |
| crates/platform/src/api/scripts/script_hash/json.rs | Proxies /scripts/{script_hash}/json to the data node. |
| crates/platform/src/api/scripts/script_hash/cbor.rs | Proxies /scripts/{script_hash}/cbor to the data node. |
| crates/platform/src/api/scripts/datum/datum_hash/root.rs | Proxies /scripts/datum/{datum_hash} to the data node. |
| crates/platform/src/api/scripts/datum/datum_hash/cbor.rs | Proxies /scripts/datum/{datum_hash}/cbor to the data node. |
| crates/platform/src/api/pools/pool_id/history.rs | Proxies /pools/{pool_id}/history with pagination to the data node. |
| crates/platform/src/api/epochs/number/blocks/root.rs | Proxies /epochs/{number}/blocks with pagination to the data node. |
| crates/platform/src/api/assets/asset/transactions.rs | Proxies /assets/{asset}/transactions with pagination to the data node. |
| crates/platform/src/api/assets/asset/addresses.rs | Proxies /assets/{asset}/addresses with pagination to the data node. |
| crates/platform/src/api/addresses/address/txs.rs | Implements /addresses/{address}/txs returning a list of tx hashes. |
| crates/platform/src/api/addresses/address.rs | Exposes the new txs module. |
| crates/integration_tests/tests/data/supported_endpoints.json | Adds the newly supported endpoints to the allowlist. |
| crates/integration_tests/tests/data/ignored_tests.json | Ignores additional tests due to documented Dolos limitations/differences. |
| crates/data_node/src/api/scripts.rs | Adds data-node client methods for scripts endpoints. |
| crates/data_node/src/api/pools.rs | Adds data-node client support for pool history. |
| crates/data_node/src/api/epochs.rs | Adds data-node client support for epoch blocks. |
| crates/data_node/src/api/assets.rs | Adds data-node client support for asset addresses/transactions. |
| crates/data_node/src/api/addresses.rs | Adds data-node client support for addresses/{address}/txs. |
| crates/data_node/src/api.rs | Exports the new scripts data-node API module. |
| crates/api_provider/src/types.rs | Aligns script response type aliases with expected single-object responses. |
Comment on lines
+47
to
+51
| "/assets/{asset}/addresses", | ||
| "/assets/{asset}/transactions", | ||
| "/epochs/{number}/blocks", | ||
| "/pools/{pool_id}/history", | ||
| "/scripts/{script_hash}", |
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.
Context
A few more endpoints, stacked on top of:
/accounts/{stake_address}/utxosand/addresses/{address}to data node #591See https://docs.txpipe.io/dolos/apis/minibf.
Ignored tests
Unfortunately a few tests had to be ignored, mostly because they reach too deeply into pagination, and Dolos returns a 400…
More controversial ignores (reasons in comments):
blockfrost-platform/crates/integration_tests/tests/data/ignored_tests.json
Lines 211 to 214 in 6f4b781
blockfrost-platform/crates/integration_tests/tests/data/ignored_tests.json
Lines 215 to 222 in 6f4b781
blockfrost-platform/crates/integration_tests/tests/data/ignored_tests.json
Lines 223 to 230 in 6f4b781
blockfrost-platform/crates/integration_tests/tests/data/ignored_tests.json
Lines 277 to 284 in 6f4b781
I have also ignored the Preprod v10 / v11 failure – the "Ignored" check will fail, once we have the next Dolos release.