Skip to content

Conversation

@rcmorano
Copy link
Contributor

@rcmorano rcmorano commented Dec 10, 2025

It seems mithril aggregator api has changed its response and snapshot's digest is now under key .hash


Summary by cubic

Update run-network to read the snapshot digest from the .hash field in the Mithril aggregator response. Fixes snapshot download by aligning the jq filter with the new API.

Written for commit 74a2125. Summary will update automatically on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected snapshot parameter retrieval in the network initialization process to ensure proper download functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

It seems mithril aggregator api has changed its response and snapshot's digest is now under key .hash

Signed-off-by: Roberto C. Morano <[email protected]>
@rcmorano rcmorano requested review from a team as code owners December 10, 2025 14:03
@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

📝 Walkthrough

Walkthrough

The change modifies the snapshot parameter extraction in bin/run-network. Previously, the code extracted the snapshot's digest property ([0].digest) to populate the SNAPSHOT_DIGEST variable passed to the mithril-client cardano-db download command. The modification now extracts the hash property ([0].hash) instead. The surrounding setup, download, and wait logic remains unchanged. No public declarations were modified.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify that snapshot.hash contains the correct format expected by mithril-client cardano-db download
  • Confirm the hash property is consistently available in the snapshot data structure used by this script

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the script to extract the snapshot hash (instead of digest) to match the updated aggregator API response.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bin/run-network (1)

33-33: SNAPSHOT_DIGEST now pulls .hash – behavior looks correct, name slightly misleading

Switching the jq path from .[0].digest to .[0].hash aligns with the stated change in the Mithril aggregator response and should make the download call use the correct snapshot identifier, assuming the client and aggregator versions are in sync.

The only minor nit is that SNAPSHOT_DIGEST is now populated from a hash field, which can be confusing for future maintainers. If/when you next touch this script more broadly, consider renaming the variable and corresponding log messages to something like SNAPSHOT_HASH for clarity.

Please double‑check against the current Mithril aggregator and mithril-client docs that hash is the canonical field and that cardano-db download <hash> is the expected CLI contract.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85e366c and 74a2125.

📒 Files selected for processing (1)
  • bin/run-network (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: build (amd64)
  • GitHub Check: build (arm64)

@wolf31o2 wolf31o2 merged commit 79e9e9c into blinklabs-io:main Dec 10, 2025
6 checks passed
@rcmorano rcmorano deleted the patch-1 branch December 10, 2025 17:09
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.

2 participants