Skip to content

Test: add Cardano node startup check to Mithril Client multi-platform test workflow #2476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 15, 2025

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented May 13, 2025

Content

This PR includes enhancements for testing the mithril-client CLI across multiple platforms (Linux, macOS, Windows, and Docker), with or without ancillary files.

It also includes (Linux only and client binary):

  • A verification step that ensures the Cardano node starts successfully after a snapshot restoration, by checking for the log line Started opening Immutable DB (with a 15s timeout).
  • An optional check when restoration is configured with ancillary files, verifying that the log line Chain extended, new tip is present (with a 30s timeout).

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)
    • Add ADR blog post or Dev ADR entry (if relevant)
    • No new TODOs introduced

Issue(s)

Closes #2471

@dlachaume dlachaume self-assigned this May 13, 2025
@dlachaume dlachaume force-pushed the dlachaume/2471/add-cardano-node-startup-check-step branch from 08426a6 to 7a7aa72 Compare May 13, 2025 15:34
Copy link

github-actions bot commented May 13, 2025

Test Results

    3 files  ±0     57 suites  ±0   11m 50s ⏱️ +14s
1 908 tests ±0  1 908 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 388 runs  ±0  2 388 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b676524. ± Comparison against base commit a319874.

♻️ This comment has been updated with latest results.

@dlachaume dlachaume temporarily deployed to testing-preview May 13, 2025 15:43 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2471/add-cardano-node-startup-check-step branch from 7a7aa72 to 9deb903 Compare May 14, 2025 13:13
@dlachaume dlachaume temporarily deployed to testing-preview May 14, 2025 13:23 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2471/add-cardano-node-startup-check-step branch from 5fbdcbd to 9deb903 Compare May 14, 2025 13:35
@dlachaume dlachaume temporarily deployed to testing-preview May 14, 2025 13:45 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2471/add-cardano-node-startup-check-step branch from 9deb903 to 212a4d6 Compare May 14, 2025 13:53
@dlachaume dlachaume temporarily deployed to testing-preview May 14, 2025 14:02 — with GitHub Actions Inactive
@dlachaume dlachaume marked this pull request as ready for review May 14, 2025 14:02
Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I've a question: does the check against the cardano node is quick enough when running without the ancillary ? In that case the node must reconstruct the ledger and I fear that the added overhead make it too slow (plus maybe only checking with ancillary is enough ?).

@dlachaume dlachaume force-pushed the dlachaume/2471/add-cardano-node-startup-check-step branch 3 times, most recently from dfc79c7 to d6ff027 Compare May 14, 2025 15:51
@dlachaume dlachaume temporarily deployed to testing-preview May 14, 2025 16:05 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dlachaume dlachaume force-pushed the dlachaume/2471/add-cardano-node-startup-check-step branch from d6ff027 to b676524 Compare May 14, 2025 17:00
@dlachaume dlachaume temporarily deployed to testing-preview May 14, 2025 17:10 — with GitHub Actions Inactive
@dlachaume
Copy link
Collaborator Author

dlachaume commented May 15, 2025

LGTM, but I've a question: does the check against the cardano node is quick enough when running without the ancillary ? In that case the node must reconstruct the ledger and I fear that the added overhead make it too slow (plus maybe only checking with ancillary is enough ?).

You're absolutely right, without the ancillary, the ledger state reconstruction is time-consuming. That's why we've implemented two verification steps:

Without ancillary: We only check that the node starts opening the Immutable DB. This ensures that the necessary files are present to initiate the process. This check is quick and completes within the first 15 seconds.

With ancillary: In addition to the previous check, we verify that the node has received a new valid block, confirming that it's actively running and extending its chain.

Copy link
Collaborator

@turmelclem turmelclem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dlachaume dlachaume merged commit 3100d62 into main May 15, 2025
47 checks passed
@dlachaume dlachaume deleted the dlachaume/2471/add-cardano-node-startup-check-step branch May 15, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Cardano node startup check step in the manual client test workflow
4 participants