Skip to content

fix: Changed Cardano spec index value to CARDANO(T)#2251

Merged
nimrod-teich merged 2 commits into
mainfrom
cardano-spec-index-value
Mar 26, 2026
Merged

fix: Changed Cardano spec index value to CARDANO(T)#2251
nimrod-teich merged 2 commits into
mainfrom
cardano-spec-index-value

Conversation

@sotskov-do

@sotskov-do sotskov-do commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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...

  • read the contribution guide
  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the main branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers 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...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Update the Cardano provider example, bootstrap script, and spec definitions to use the CARDANO and CARDANOT indexes for the mainnet and preprod flows. Ensure the testnet spec imports follow the new indexes so pairing and consumer launch steps remain aligned.

Latest Contributors(1)
UserCommitDate
sidio1992@gmail.comfeat: Cardano spec (#2...March 25, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Update Cardano chain index values to full names

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Update Cardano chain index values from abbreviated to full names
• Change ADA to CARDANO for mainnet specification
• Change ADAT to CARDANOT for testnet specification
• Remove unsupported preview network configuration
Diagram
flowchart LR
  A["Old Index Values<br/>ADA, ADAT, ADAPRE"] -- "Standardize naming" --> B["New Index Values<br/>CARDANO, CARDANOT"]
  B -- "Update specs" --> C["cardano.json"]
  B -- "Update config" --> D["cardano_example.yml"]
  B -- "Update scripts" --> E["init_cardano_only_with_node.sh"]
Loading

Grey Divider

File Changes

1. specs/testnet-2/specs/cardano.json ✨ Enhancement +2/-2

Update Cardano spec index values

• Changed mainnet chain index from ADA to CARDANO
• Changed testnet chain index from ADAT to CARDANOT
• Updated specification definitions for both networks

specs/testnet-2/specs/cardano.json


2. config/provider_examples/cardano_example.yml ⚙️ Configuration changes +4/-13

Update Cardano provider config chain IDs

• Changed mainnet chain ID from ADA to CARDANO
• Changed testnet chain ID from ADAT to CARDANOT
• Removed preview network configuration (ADAPRE)
• Updated documentation comment to reflect supported networks

config/provider_examples/cardano_example.yml


3. scripts/pre_setups/init_cardano_only_with_node.sh ⚙️ Configuration changes +3/-3

Update setup script Cardano index values

• Updated provider stake command to use CARDANOT instead of ADAT
• Updated provider configuration chain ID to CARDANOT
• Updated consumer RPC endpoint to use CARDANOT instead of ADAT

scripts/pre_setups/init_cardano_only_with_node.sh


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Mar 25, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider


Action required

1. Broken spec import reference🐞 Bug ✓ Correctness
Description
The CARDANOT spec still imports "ADA" even though the Cardano mainnet spec index was renamed to
"CARDANO", so spec expansion fails with "imported spec unknown: ADA". This breaks Cardano spec
validation/loading and will fail the TestSpecs suite that expands every spec file.
Code

specs/testnet-2/specs/cardano.json[R2148-2149]

+                "index": "CARDANOT",
              "name": "cardano preprod testnet",
Evidence
After the rename, the mainnet spec index is now CARDANO, but the preprod spec (CARDANOT) still lists
imports: ["ADA"]. The spec expansion logic (DoExpandSpec) explicitly errors when an imported spec
index is not found, and ValidateSpec calls ExpandSpec; the repository’s TestSpecs test expands all
specs and requires no error, so this configuration will fail.

specs/testnet-2/specs/cardano.json[6-17]
specs/testnet-2/specs/cardano.json[2148-2159]
x/spec/types/expand.go[26-45]
x/spec/keeper/spec.go[135-140]
x/spec/keeper/spec_test.go[952-959]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Cardano preprod spec (index `CARDANOT`) still imports the old mainnet index `ADA`, but the mainnet spec index was renamed to `CARDANO`. This causes `DoExpandSpec` to fail with `imported spec unknown: ADA` during spec expansion/validation.
## Issue Context
Spec imports must reference existing spec indices. The repo’s spec tests expand all specs and will fail if any import references a non-existent index.
## Fix Focus Areas
- specs/testnet-2/specs/cardano.json[2148-2159]  
- Change the `imports` entry from `"ADA"` to `"CARDANO"` (or the intended renamed index).
- (Optional verification) x/spec/keeper/spec_test.go[883-977]  
- Re-run/ensure `TestSpecs` passes after the import update.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@sotskov-do sotskov-do changed the title changed cardano index value to CARDANO(T) fix: Changed cardano index value to CARDANO(T) Mar 25, 2026
@sotskov-do sotskov-do changed the title fix: Changed cardano index value to CARDANO(T) fix: Changed Cardanov spec index value to CARDANO(T) Mar 25, 2026
@sotskov-do sotskov-do changed the title fix: Changed Cardanov spec index value to CARDANO(T) fix: Changed Cardano spec index value to CARDANO(T) Mar 25, 2026
@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
consensus 8.71% <ø> (ø)
protocol 33.97% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread specs/testnet-2/specs/cardano.json
@sotskov-do sotskov-do requested a review from nimrod-teich March 25, 2026 14:18
@github-actions

Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
7 files   ±0   0 ❌ ±0 

Results for commit 19bff48. ± Comparison against base commit 04c5507.

@nimrod-teich nimrod-teich merged commit 4197251 into main Mar 26, 2026
31 checks passed
@nimrod-teich nimrod-teich deleted the cardano-spec-index-value branch March 26, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants