Repository navigation
feat(provider): add Koios, Kupmios and Hydra - #34
Merged
Merged
Conversation
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.
Add Koios, Kupmios (Kupo + Ogmios), and Hydra implementations of the existing provider interface, with explicit network/endpoint configuration and optional bearer credentials. Preserve exact quantities and protocol prices, validate datum/script hashes and evaluation budgets, reject inconsistent responses, bound requests and confirmation polling, and never retry submissions implicitly.
Hydra targets an existing Conway Head:
/transactionsubmits on L2, and confirmation checks transaction CBOR in the latest confirmed snapshot. It cannot recover older transactions missing from that snapshot; confirmation is not L1 settlement. Remote evaluation and staking rewards fail explicitly. These limits and Kupo indexing requirements are documented. Maestro is excluded because its hosted Developer API was sunset.Live verification on 2026-11-25 covered all four bindings (JavaScript, C++, Haskell, Python):
The shared live fixture includes an empty-name NFT, an inline datum and a native reference script. Koios/Kupmios evaluation agreed across all four bindings: 388,964 memory units and 96,922,705 CPU steps. Contract tests also cover malformed responses, HTTP failures, deadlines, pagination, exact integers and all six redeemer purposes. These checks establish the tested scenarios; they are not a guarantee for every future server version or ledger feature.
The Hydra deployment used the pinned official image at
f2dec914ec3d7cee030c68ad9ee67ffa8cc8f954, with matching reference scripts published on preprod. Stable 2.4.2's Blockfrost backend failed on empty asset names. The temporary L2 NFT was burned; Head6f5f6c8645dc063cdb7fed73db38456e765616be33b6e4aa1bed22d6finalized and returned all 10 deposited test ADA in fanout transaction43984251194016c437773803eec8e3bf8190bfa58fba4ca044abbe17f4f6a875.The HTTP transport request now carries a deadline. Curl and WinHTTP support local HTTP endpoints as well as HTTPS; WinHTTP uses asynchronous operations and keeps callback state/buffers alive through cancellation.
Validation: all 2,954 C++ tests under Valgrind (zero errors and leaks), including 24 new provider tests, clang-format 15, provider cppcheck, strict Doxygen/Sphinx documentation and an installed-package consumer. A delayed local HTTP body also verified the 100 ms request deadline (101 ms observed). Linux checks passed locally; the existing CI matrix covers Windows, macOS and ARM.
Reference review: Blaze, Mesh providers, Ogmios v6 and Kupo v2 schemas, and Hydra's Haskell HTTP implementation and schemas. Provider errors are propagated, NFT queries require uniqueness, and Hydra confirmation does not infer L2 acceptance from L1-deposited UTxOs.
Live regression checks also exposed the old Blockfrost additional-input format. The updated request preserves inline datums and reference scripts and passed the same live Plutus V3 evaluation. The full 2,954-test suite passes after this fix.