feat: Cardano spec#2241
Conversation
Review Summary by QodoAdd Cardano blockchain specification and provider configuration
WalkthroughsDescription• Add comprehensive Cardano blockchain specification with three networks • Define 100+ REST API endpoints for Cardano data querying • Include provider configuration example for Blockfrost API integration • Create test setup script for Cardano node and provider initialization Diagramflowchart LR
A["Cardano Spec Definition"] -->|"ADA, ADAT, ADAPRE"| B["API Collections"]
B -->|"GET/POST endpoints"| C["REST Interface"]
C -->|"Blockfrost API"| D["Provider Config"]
A -->|"Test Setup"| E["Init Script"]
E -->|"Node + Provider"| F["Local Environment"]
File Changes1. specs/testnet-2/specs/cardano.json
|
Code Review by Qodo
1.
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| echo "[Test Setup] installing all binaries" | ||
| make install-all | ||
|
|
||
| echo "[Test Setup] setting up a new lava node" | ||
| screen -d -m -S node bash -c "./scripts/start_env_dev.sh" |
There was a problem hiding this comment.
Lines 13‑35 replicate the exact lava-node bootstrap that already lives in scripts such as scripts/pre_setups/init_btc_only_with_node.sh (lines 13‑57) and most other init_*_only_with_node.sh helpers (log cleanup, install, node startup, spec/plan submissions, vote). Every time the shared workflow needs updating (e.g. adjusting the spec-add proposal or plan deployment) you now have to edit a dozen copies. Can we factor the common setup (logs, make install-all, start_env_dev.sh, spec/plan proposals, vote, staking, screen start) into a shared helper or parameterized wrapper so the Cardano script only supplies the spec list/provider-specific calls? That would keep this logic in one place and avoid divergence when we tweak the onboarding sequence.
Finding type: Code Dedup and Conventions | Severity: 🟢 Low
Want Baz to fix this for you? Activate Fixer
| "name": "content-type", | ||
| "kind": "pass_override", | ||
| "value": "application/cbor" | ||
| }, |
There was a problem hiding this comment.
Why did you set that header's "kind" as "pass_override"
There was a problem hiding this comment.
Because for these POST endpoints (according Blockfrost documentation) data should be sent specifically as application/cbor. So this kind will override any other value which was passed.
Example from Blockfrost documentation - https://docs.blockfrost.io/#tag/cardano--transactions/POST/tx/submit

There was a problem hiding this comment.
We don't want to enforce anyone's relay to include such header (not everybody use blockfrost), you better use "pass_send" which means only if the user provided such header, we forward it to the node.
| }, | ||
| { | ||
| "index": "ADAPRE", | ||
| "name": "cardano preview testnet", |
There was a problem hiding this comment.
Consult with Yuval wether that chain should be included or we can drop it
There was a problem hiding this comment.
Done. Removed preview testnet
User description
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!in the type prefix if API or client breaking changemainbranchReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Add Cardano API specs to the governance proposals by populating
specs/testnet-2/specs/cardano.jsonwith ADA/ADAT/ADAPRE flows, API collections, verifications, and parsing directives for Blockfrost-backed nodes. Automate the Cardano-only test environment by introducingscripts/pre_setups/init_cardano_only_with_node.shto submit specs/plans proposals, stake providers, and launch provider/consumer screens alongside a Blockfrost-authenticated provider example config.Modified files (2)
Latest Contributors(0)
cardano.jsonspec proposal to cover Blockfrost-backed endpoints.Modified files (1)
Latest Contributors(0)