Skip to content

fix: ledger builds#7260

Merged
SWvheerden merged 3 commits intotari-project:developmentfrom
hansieodendaal:ho_fix_ledger_builds
Jun 26, 2025
Merged

fix: ledger builds#7260
SWvheerden merged 3 commits intotari-project:developmentfrom
hansieodendaal:ho_fix_ledger_builds

Conversation

@hansieodendaal
Copy link
Copy Markdown
Contributor

@hansieodendaal hansieodendaal commented Jun 24, 2025

Description

Fixed ledger builds locally using the latest ledger docker image; however, the objective is to fix the ledger wallet auto-builds in GitHub, and this may still need some tweaks in follow-up commits.

Motivation and Context

Ledger auto-builds in GitHub were failing.

How Has This Been Tested?

What process can a PR reviewer use to test or verify this change?

Code review.
Check GitHub actions output.

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation

    • Updated the README to clarify installation instructions, specify the correct working directory, and standardize path formatting for commands.
  • Refactor

    • Improved internal handling of string values for "Amount" and "Receiver" fields to ensure data safety, with no change to visible behavior.

Fix ledger builds locally
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

This update revises documentation for the Minotari Ledger Wallet to clarify installation instructions and standardize path formatting. Several source files reorder import statements for clarity and consistency without altering functionality. In the wallet source code, string construction for certain fields is refactored to ensure correct variable lifetime and safe referencing. Minor code simplifications and whitespace cleanups are also included.

Changes

File(s) Change Summary
applications/minotari_ledger_wallet/wallet/README.md Updated manual installation documentation: clarified working directory, standardized path formatting.
applications/minotari_ledger_wallet/wallet/src/handlers/get_one_sided_metadata_signature.rs Refactored string formatting for field values to ensure correct variable lifetime and referencing.
applications/minotari_ledger_wallet/wallet/src/crypto/hashing.rs Removed trailing blank line after import statements.
applications/minotari_ledger_wallet/wallet/src/crypto/schnorr.rs Reordered import statements within crate block for clarity without changing functionality.
applications/minotari_ledger_wallet/wallet/src/handlers/get_schnorr_signature.rs Reordered import statements within crate imports without affecting logic.
applications/minotari_ledger_wallet/wallet/src/handlers/get_script_signature.rs Reordered import statements within crate imports without affecting logic.
applications/minotari_ledger_wallet/wallet/src/main.rs Swapped order of hashing and crypto module imports without other changes.
applications/minotari_ledger_wallet/wallet/src/utils.rs Reordered import statements; simplified error handling in get_raw_bip32_key function.

Poem

In the warren, code hops anew,
Docs now clear, with paths in view.
Strings are safe, fields in line,
Rabbits cheer, “The code is fine!”
From root to tip, instructions flow—
Onward, wallet, let’s hop and go!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77471f0 and a72d569.

📒 Files selected for processing (7)
  • applications/minotari_ledger_wallet/wallet/src/crypto/hashing.rs (0 hunks)
  • applications/minotari_ledger_wallet/wallet/src/crypto/schnorr.rs (1 hunks)
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_one_sided_metadata_signature.rs (4 hunks)
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_schnorr_signature.rs (1 hunks)
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_script_signature.rs (1 hunks)
  • applications/minotari_ledger_wallet/wallet/src/main.rs (1 hunks)
  • applications/minotari_ledger_wallet/wallet/src/utils.rs (2 hunks)
💤 Files with no reviewable changes (1)
  • applications/minotari_ledger_wallet/wallet/src/crypto/hashing.rs
✅ Files skipped from review due to trivial changes (5)
  • applications/minotari_ledger_wallet/wallet/src/main.rs
  • applications/minotari_ledger_wallet/wallet/src/crypto/schnorr.rs
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_script_signature.rs
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_schnorr_signature.rs
  • applications/minotari_ledger_wallet/wallet/src/utils.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_one_sided_metadata_signature.rs
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: test (mainnet, stagenet)
  • GitHub Check: test (testnet, esmeralda)
  • GitHub Check: test (nextnet, nextnet)
  • GitHub Check: ci
  • GitHub Check: cargo check with stable
  • GitHub Check: Cucumber tests / Base Layer
  • GitHub Check: Cucumber tests / FFI
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@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)
applications/minotari_ledger_wallet/wallet/README.md (1)

155-155: Add language specifications to fenced code blocks.

The static analysis tool correctly identifies that these fenced code blocks are missing language specifications, which improves syntax highlighting and documentation clarity.

Apply this diff to add appropriate language specifications:

-```
+```bash
 ledgerctl install app_nanosplus.json
-```
+```
-```
+```bash
 ledgerctl install ./target/nanosplus/release/app_nanosplus.json
 ledgerctl install ./target/stax/release/app_stax.json
-```
+```

Also applies to: 158-158

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86539c8 and 77471f0.

📒 Files selected for processing (2)
  • applications/minotari_ledger_wallet/wallet/README.md (1 hunks)
  • applications/minotari_ledger_wallet/wallet/src/handlers/get_one_sided_metadata_signature.rs (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
applications/minotari_ledger_wallet/wallet/README.md

155-155: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


158-158: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: test (mainnet, stagenet)
  • GitHub Check: test (nextnet, nextnet)
  • GitHub Check: test (testnet, esmeralda)
  • GitHub Check: ci
  • GitHub Check: cargo check with stable
  • GitHub Check: Cucumber tests / Base Layer
  • GitHub Check: Cucumber tests / FFI
🔇 Additional comments (4)
applications/minotari_ledger_wallet/wallet/README.md (2)

148-149: LGTM! Installation directory clarification improves usability.

The explicit clarification that installation commands must be run from the Tari ledger wallet repository root enhances the documentation's clarity and reduces potential user confusion.


152-152: LGTM! Path standardization improves cross-platform compatibility.

The standardization to Unix-style forward slash paths (./target/nanosplus/release/) improves consistency and works across different operating systems.

Also applies to: 159-160

applications/minotari_ledger_wallet/wallet/src/handlers/get_one_sided_metadata_signature.rs (2)

136-136: LGTM! String lifetime management improvement for Amount field.

Creating a named field_value variable ensures the formatted string lives long enough to be referenced by the Field struct, preventing potential lifetime issues.

Also applies to: 139-139


141-145: LGTM! String lifetime management improvement for Receiver field.

The same pattern is correctly applied for the receiver address field, ensuring proper string lifetime management while maintaining the same display logic.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 24, 2025

Test Results (CI)

    3 files    126 suites   57m 22s ⏱️
1 353 tests 1 353 ✅ 0 💤 0 ❌
4 057 runs  4 057 ✅ 0 💤 0 ❌

Results for commit d005d21.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 24, 2025

Test Results (Integration tests)

 2 files  + 2  10 suites  +10   1h 0m 13s ⏱️ + 1h 0m 13s
32 tests +32  27 ✅ +27  2 💤 +2  3 ❌ +3 
38 runs  +38  27 ✅ +27  2 💤 +2  9 ❌ +9 

For more details on these failures, see this check.

Results for commit d005d21. ± Comparison against base commit 86539c8.

♻️ This comment has been updated with latest results.

leet4tari
leet4tari previously approved these changes Jun 25, 2025
Copy link
Copy Markdown
Contributor

@leet4tari leet4tari left a comment

Choose a reason for hiding this comment

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

utACK - LGTM - seen build in fork.

@stringhandler
Copy link
Copy Markdown
Contributor

How does adding these fields fix the build?

@hansieodendaal
Copy link
Copy Markdown
Contributor Author

How does adding these fields fix the build?

There were clippy errors

@SWvheerden SWvheerden merged commit d3676ef into tari-project:development Jun 26, 2025
15 of 16 checks passed
@hansieodendaal hansieodendaal deleted the ho_fix_ledger_builds branch June 26, 2025 12:47
sdbondi added a commit to sdbondi/tari that referenced this pull request Jul 4, 2025
* development:
  chore: fix regression bug (tari-project#7276)
  feat!: expand gRPC readiness status to contain current processed block info (tari-project#7262)
  fix!: payref migration and indexes, add grpc query via output hash (tari-project#7266)
  feat: auto zero value coinbase reward calculation (tari-project#7259)
  feat!: improve grpc token supply (tari-project#7261)
  chore: new release v4.7.0-pre.0 (tari-project#7268)
  fix: get_all_completed_transactions limit issues (tari-project#7267)
  fix: ledger builds (tari-project#7260)
  feat: offline signing (tari-project#7122)
  test: verify accumulated difficulty (tari-project#7243)
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.

5 participants