Skip to content

Export View Keys #1543

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 2 commits into from
Apr 16, 2025
Merged

Export View Keys #1543

merged 2 commits into from
Apr 16, 2025

Conversation

cassandras-lies
Copy link
Contributor

PR intention

Enable exporting Spark view keys in RPC and Qt.

Code changes brief

This adds a RPC command to export Spark view keys (in mnemonic style) and adds a Qt dialog to show the same.

Copy link

coderabbitai bot commented Mar 16, 2025

Walkthrough

This change set integrates a new feature for exporting the Spark view key. The build configuration was updated to include additional UI, MOC, header, and source files related to the new ExportViewKeyDialog. The Qt GUI now incorporates an export action, along with updates to the wallet interface and RPC system. New methods in wallet classes retrieve and format the Spark view key, and a dedicated RPC command allows its retrieval. A minor adjustment in mnemonic generation was also made in the wallet module.

Changes

File(s) Change Summary
src/Makefile.qt.include Updated build file to add entries for exportviewkeydialog.ui, qt/moc_exportviewkeydialog.cpp, qt/exportviewkeydialog.h, and qt/exportviewkeydialog.cpp.
src/qt/bitcoingui.cpp, src/qt/bitcoingui.h Introduced new QAction exportViewKeyAction in BitcoinGUI with corresponding include directive and member variable; integrated export action into the menu and wallet actions.
src/qt/exportviewkeydialog.cpp, src/qt/exportviewkeydialog.h, src/qt/forms/exportviewkeydialog.ui Added new dialog class ExportViewKeyDialog along with its UI file to facilitate exporting the view key.
src/qt/walletframe.cpp, src/qt/walletframe.h, src/qt/walletview.cpp, src/qt/walletview.h Added exportViewKey methods in both WalletFrame and WalletView to trigger the export dialog from the wallet interface.
src/wallet/wallet.cpp, src/wallet/wallet.h Added methods GetSparkViewKey and GetSparkViewKeyStr to retrieve and format the Spark view key from the wallet.
src/wallet/rpcdump.cpp, src/wallet/rpcwallet.cpp Introduced a new RPC command dumpsparkviewkey for retrieving the Spark view key via JSON-RPC.
src/wallet/bip39.cpp Modified the conditional in mnemonic_from_data by removing range checks on the length; added a formatting newline after the function’s closing brace.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant BitcoinGUI
  participant WalletFrame
  participant WalletView
  participant ExportViewKeyDialog
  participant WalletBackend

  User->>BitcoinGUI: Click "Export View Key" in menu
  BitcoinGUI->>WalletFrame: Trigger exportViewKey()
  WalletFrame->>WalletView: Invoke exportViewKey()
  WalletView->>WalletBackend: Get Spark view key (GetSparkViewKeyStr)
  WalletBackend-->>WalletView: Return key string
  WalletView->>ExportViewKeyDialog: Create dialog with key
  ExportViewKeyDialog-->>User: Display view key
Loading

Suggested reviewers

  • levonpetrosyan93
  • psolstice

Poem

I’m a bunny with a hop so light,
Coding features deep into the night.
A view key now leaps from code to screen,
In dialogs and RPC, sleek and keen.
With every nibble of change so true,
I celebrate new paths in our code zoo! 🐇


📜 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 bc7c8e9 and 7bdac71.

📒 Files selected for processing (10)
  • src/Makefile.qt.include (4 hunks)
  • src/qt/bitcoingui.cpp (6 hunks)
  • src/qt/bitcoingui.h (2 hunks)
  • src/qt/exportviewkeydialog.cpp (1 hunks)
  • src/qt/exportviewkeydialog.h (1 hunks)
  • src/qt/forms/exportviewkeydialog.ui (1 hunks)
  • src/qt/walletframe.cpp (1 hunks)
  • src/qt/walletframe.h (1 hunks)
  • src/qt/walletview.cpp (2 hunks)
  • src/qt/walletview.h (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/qt/walletview.h
  • src/qt/walletframe.h
  • src/qt/walletframe.cpp
  • src/qt/exportviewkeydialog.h
  • src/qt/forms/exportviewkeydialog.ui
  • src/qt/bitcoingui.h
  • src/qt/bitcoingui.cpp
  • src/qt/walletview.cpp
  • src/Makefile.qt.include
  • src/qt/exportviewkeydialog.cpp

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

@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: 3

🧹 Nitpick comments (7)
src/qt/forms/exportviewkeydialog.ui (1)

1-86: UI design looks good but consider adding a warning label

The dialog UI is well structured with proper layout components and a selectable text field for the view key. The window size, title, and button configuration are appropriate for this functionality.

Consider adding a warning label to inform users about the sensitivity of the view key and potential security implications of exporting it. This would help users understand the implications of this action.

+   <item>
+    <widget class="QLabel" name="infoLabel">
+     <property name="text">
+      <string>Warning: Keep this key private. Anyone with access to this key can view your Spark transactions but cannot spend your funds.</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+     <property name="textFormat">
+      <enum>Qt::RichText</enum>
+     </property>
+    </widget>
+   </item>
src/qt/bitcoingui.h (1)

8-8: Consider using forward declaration instead of include.

Since you're only using ExportViewKeyDialog as a pointer type in this header file, you could forward declare the class instead of including the full header. This would reduce compilation dependencies and potentially improve build times.

-#include "exportviewkeydialog.h"
+// Forward declarations
+class ExportViewKeyDialog;

Then include the actual header in the .cpp file where you implement the related functionality.

src/qt/exportviewkeydialog.h (3)

1-2: Inconsistent include guard naming.

The include guard name doesn't match the class name. For consistency, use EXPORTVIEWKEYDIALOG_H instead of VIEWKEYDIALOG_H.

-#ifndef VIEWKEYDIALOG_H
-#define VIEWKEYDIALOG_H
+#ifndef EXPORTVIEWKEYDIALOG_H
+#define EXPORTVIEWKEYDIALOG_H

12-22: Consider adding signals/slots for user interaction.

The dialog is functionally correct, but it could benefit from having signals and slots defined for handling user interactions like copying the view key to clipboard or handling the close action. This would make the dialog more interactive and user-friendly.

Example addition:

private slots:
    void copyToClipboard();

25-25: Include guard closing comment.

For better readability, consider adding a comment at the end of the include guard to indicate which guard it's closing.

-#endif
+#endif // EXPORTVIEWKEYDIALOG_H
src/wallet/wallet.h (1)

1171-1173: Consider marking methods as const.

Since these methods are likely just retrieving data without modifying the wallet state, consider marking them as const to indicate they don't modify the object's state and to allow calling them on const wallet references/pointers.

-spark::FullViewKey GetSparkViewKey();
-std::string GetSparkViewKeyStr();
+spark::FullViewKey GetSparkViewKey() const;
+std::string GetSparkViewKeyStr() const;
src/wallet/wallet.cpp (1)

8869-8885: Well-implemented method for exporting the view key as a mnemonic.

The function properly serializes the view key and converts it to a mnemonic format. Good use of assertions to validate the data integrity during the conversion process.

A few minor suggestions:

  1. Consider adding error handling if the mnemonic conversion fails rather than relying on assertions
  2. Add a comment indicating that the return value is sensitive information
 std::string CWallet::GetSparkViewKeyStr() {
   spark::FullViewKey key = GetSparkViewKey();
   int size = GetSerializeSize(key, SER_NETWORK, PROTOCOL_VERSION);
   std::ostringstream keydata;
   ::Serialize(keydata, key);

   std::string keydata_s = keydata.str();
   assert(keydata_s.size() % 4 == 0);

   SecureVector seckeydata(keydata_s.begin(), keydata_s.end());

+  // Convert serialized key to mnemonic format - treat as sensitive information
   SecureString mnemonicsecstr = Mnemonic::mnemonic_from_data(seckeydata, seckeydata.size());
   std::string mnemonicstr(mnemonicsecstr.begin(), mnemonicsecstr.end());
   assert(!mnemonicstr.empty());

   return mnemonicstr;
 }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0375dde and bc7c8e9.

📒 Files selected for processing (15)
  • src/Makefile.qt.include (5 hunks)
  • src/qt/bitcoingui.cpp (6 hunks)
  • src/qt/bitcoingui.h (2 hunks)
  • src/qt/exportviewkeydialog.cpp (1 hunks)
  • src/qt/exportviewkeydialog.h (1 hunks)
  • src/qt/forms/exportviewkeydialog.ui (1 hunks)
  • src/qt/walletframe.cpp (1 hunks)
  • src/qt/walletframe.h (1 hunks)
  • src/qt/walletview.cpp (2 hunks)
  • src/qt/walletview.h (1 hunks)
  • src/wallet/bip39.cpp (2 hunks)
  • src/wallet/rpcdump.cpp (2 hunks)
  • src/wallet/rpcwallet.cpp (2 hunks)
  • src/wallet/wallet.cpp (4 hunks)
  • src/wallet/wallet.h (2 hunks)
🔇 Additional comments (25)
src/qt/walletframe.h (1)

95-96: LGTM! Good method documentation and placement.

The method declaration for exporting the Spark View Key is well-documented and correctly placed in the public Q_SLOTS section, following the existing pattern of similar functionality in the class.

src/qt/walletframe.cpp (1)

191-196: LGTM! Implementation follows established patterns.

The implementation correctly follows the pattern used by other similar methods in this class (like changePassphrase() and backupWallet()). It properly retrieves the current wallet view and checks for validity before proceeding, which is good defensive programming.

src/qt/walletview.h (1)

131-132: LGTM! Well-documented and properly placed.

The method declaration is clearly documented and correctly placed in the public Q_SLOTS section, maintaining consistency with the class's existing organization pattern.

src/qt/walletview.cpp (2)

13-13: LGTM! Appropriate include for new dialog.

The include for the new exportviewkeydialog.h header file is correctly added to support the new functionality.


391-395: LGTM! Implementation is correct and concise.

The implementation properly creates an instance of ExportViewKeyDialog, passing it the current wallet's Spark view key string and then executing the dialog. This follows the pattern used by other dialog-based features in the codebase.

src/qt/forms/exportviewkeydialog.ui (1)

20-36: Key label has good user experience properties

The text label is properly configured with mouse selection enabled, which allows users to easily copy the view key, and word wrap to handle potentially long keys.

src/qt/bitcoingui.cpp (5)

119-119: Properly initialized action in constructor initializer list

The new exportViewKeyAction is correctly initialized to null in the constructor's initializer list, following the pattern used for other actions.


412-413: Action creation well implemented

The exportViewKeyAction is properly created with an appropriate descriptive name and helpful status tip that explains its purpose clearly.


453-453: Action connection correctly implemented

The action is properly connected to the walletFrame->exportViewKey() slot following the pattern used for other wallet actions.


486-486: Menu placement is appropriate

The new action is correctly added to the File menu alongside other related wallet actions like signing and verifying messages.


659-659: Action enabled/disabled based on wallet state

The exportViewKeyAction is properly included in the setWalletActionsEnabled method, ensuring it will be enabled or disabled appropriately based on the wallet's state.

src/wallet/bip39.cpp (1)

44-46:

✅ Verification successful

Relaxed input length validation in mnemonic_from_data function

The condition for validating the input length has been modified to only check if len is divisible by 4, removing the previous constraints that required the length to be between 16 and 32.

This change could have security implications if it allows for inputs that were previously considered invalid. Verify that:

  1. The Spark view key requires this relaxed validation
  2. The function still produces secure mnemonics with longer inputs
  3. Other code using this function is aware of and can handle the new behavior

🏁 Script executed:

#!/bin/bash
# Check where mnemonic_from_data is used in the codebase
echo "Searching for mnemonic_from_data usage:"
rg "mnemonic_from_data" --type cpp

# Check the size of Spark view key that will be passed to this function
echo "Looking for Spark view key size references:"
rg "sparkViewKey|Spark.*?view.*?key.*?size" --type cpp

Length of output: 1154


Security Validation Confirmation: Update Approved

After verification, the following was determined:

  • Usage Context: The function mnemonic_from_data is primarily invoked from controlled call sites (e.g., in src/wallet/bip39.cpp, src/wallet/wallet.cpp, and tests in src/wallet/test/mnemonic_tests.cpp) where the length value is computed (commonly as strength / 8) ensuring it meets expected inputs.
  • Spark View Key: References to the Spark view key appear exclusively in QT components (e.g., ExportViewKeyDialog in src/qt/exportviewkeydialog.cpp/h), and are not coupled with the mnemonic conversion logic.
  • Security Outcome: The existing tests confirm that even with inputs longer than the historically constrained range, secure mnemonics are produced as long as the input length is a multiple of 4.

No additional security implications are found, and all code using this function seems aware of and capable of handling the new behavior.

src/qt/exportviewkeydialog.cpp (2)

1-9: Dialog implementation is simple and correct

The dialog implementation effectively sets up the UI and displays the Spark view key. The constructor properly initializes the UI and sets the text in the key label from the provided string.


11-13: Destructor correctly cleans up resources

The destructor properly deletes the UI object to prevent memory leaks, following Qt best practices.

src/qt/bitcoingui.h (1)

119-119: LGTM: New action for exporting view keys.

The addition of this action pointer is appropriate for implementing the new view key export functionality in the GUI.

src/qt/exportviewkeydialog.h (1)

4-6: LGTM: Appropriate Qt includes.

These includes are appropriate for a Qt dialog that may use message boxes and buttons.

src/wallet/wallet.h (1)

12-12: LGTM: Required include for Spark view key functionality.

This include is necessary to support the new methods for accessing Spark view keys.

src/wallet/rpcwallet.cpp (2)

4704-4705: Appropriate external function declaration for the new Spark view key functionality.

The declaration properly follows the same pattern as other similar key export functions.


5725-5726: Correctly registered the new dumpsparkviewkey RPC command in the commands array.

The command is properly configured in the "wallet" category with appropriate safety parameters. The command doesn't require any arguments as indicated by the empty parameter array, which is consistent with the PR objective of enabling Spark view key export via RPC.

src/wallet/rpcdump.cpp (1)

7-7: Appropriate include for Spark functionality.

The addition of the libspark/keys.h include is necessary for the new Spark view key functionality.

src/wallet/wallet.cpp (1)

8860-8867: Functionality for retrieving Spark view key looks good.

This new method retrieves the Spark view key from the wallet database with appropriate locking, following the wallet's standard pattern for accessing sensitive data.

src/Makefile.qt.include (4)

98-98: LGTM - UI file addition for view key export dialog

The addition of the export view key dialog UI file to the QT_FORMS_UI list is appropriate for the feature being implemented.


143-143: LGTM - MOC file addition for view key export dialog

The addition of the MOC file for the export view key dialog to the QT_MOC_CPP list is correct and necessary for Qt's meta-object system to work properly with the new dialog.


218-218: LGTM - Header file addition for view key export dialog

The addition of the export view key dialog header file to the BITCOIN_QT_H list is appropriate for the feature being implemented.


433-433: LGTM - Source file addition for view key export dialog

The addition of the export view key dialog source file to the BITCOIN_QT_WALLET_CPP list is correct. This properly places the new implementation in the wallet-related sources, which aligns with the feature's purpose of exporting wallet view keys.

Comment on lines +589 to +599
UniValue dumpsparkviewkey(const JSONRPCRequest& request) {
CWallet * const pwallet = GetWalletForJSONRPCRequest(request);
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
throw std::runtime_error("wallet not available");
}

if (request.fHelp || request.params.size() != 0)
throw std::runtime_error("dumpviewkey\n\nDisplay our Spark View Key.\n");

return {pwallet->GetSparkViewKeyStr()};
}
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Consider adding the same security warnings as other key export functions

Since exporting view keys could potentially compromise privacy, consider implementing the same security measures as used in dumpprivkey_firo and dumpwallet_firo with authorization codes.

Run the following script to check how sensitive Spark view keys are in the codebase:


🏁 Script executed:

#!/bin/bash
# Check if Spark view keys are treated with similar security precautions as private keys

# Check for any security-related comments about Spark view keys
rg -i "spark.*(view|key).*security|security.*spark.*(view|key)" --type cpp

# Check how the Spark view key is used in the codebase
rg -A 3 "GetSparkViewKeyStr" --type cpp

Length of output: 1022


Security Improvement Required: Add Authorization Checks for Spark View Key Export

  • The dumpsparkviewkey() function in src/wallet/rpcdump.cpp (lines 589–599) currently lacks additional security warnings or authorization checks.
  • Unlike other key export functions such as dumpprivkey_firo and dumpwallet_firo, there are no safeguards (e.g., confirmation prompts or authorization codes) implemented for exporting the Spark view key.
  • Please update the function to incorporate the same security warnings and measures as the other key export functionalities to mitigate potential privacy risks.

🛠️ Refactor suggestion

Fix help message and consider adding security measures

The implementation of the dumpsparkviewkey function is generally good, but there are a few issues:

  1. The error message in the help text uses "dumpviewkey" instead of "dumpsparkviewkey"
  2. Unlike other sensitive key export functions in this file (like dumpprivkey_firo), there are no security measures such as authorization codes
  3. There's no check to ensure the wallet is unlocked using EnsureWalletIsUnlocked(pwallet)
 UniValue dumpsparkviewkey(const JSONRPCRequest& request) {
     CWallet * const pwallet = GetWalletForJSONRPCRequest(request);
     if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
         throw std::runtime_error("wallet not available");
     }

     if (request.fHelp || request.params.size() != 0)
-        throw std::runtime_error("dumpviewkey\n\nDisplay our Spark View Key.\n");
+        throw std::runtime_error(
+            "dumpsparkviewkey\n"
+            "\nDisplay our Spark View Key.\n"
+            "\nResult:\n"
+            "\"key\"                (string) The Spark view key\n"
+            "\nExamples:\n"
+            + HelpExampleCli("dumpsparkviewkey", "")
+            + HelpExampleRpc("dumpsparkviewkey", "")
+        );

+    EnsureWalletIsUnlocked(pwallet);
+
   return {pwallet->GetSparkViewKeyStr()};
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
UniValue dumpsparkviewkey(const JSONRPCRequest& request) {
CWallet * const pwallet = GetWalletForJSONRPCRequest(request);
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
throw std::runtime_error("wallet not available");
}
if (request.fHelp || request.params.size() != 0)
throw std::runtime_error("dumpviewkey\n\nDisplay our Spark View Key.\n");
return {pwallet->GetSparkViewKeyStr()};
}
UniValue dumpsparkviewkey(const JSONRPCRequest& request) {
CWallet * const pwallet = GetWalletForJSONRPCRequest(request);
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
throw std::runtime_error("wallet not available");
}
if (request.fHelp || request.params.size() != 0)
throw std::runtime_error(
"dumpsparkviewkey\n"
"\nDisplay our Spark View Key.\n"
"\nResult:\n"
"\"key\" (string) The Spark view key\n"
"\nExamples:\n"
+ HelpExampleCli("dumpsparkviewkey", "")
+ HelpExampleRpc("dumpsparkviewkey", "")
);
EnsureWalletIsUnlocked(pwallet);
return {pwallet->GetSparkViewKeyStr()};
}

@@ -1,4 +1,4 @@
# Copyright (c) 2013-2016 The Bitcoin Core developers
# make Copyright (c) 2013-2016 The Bitcoin Core developers
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix unintentional makefile directive

Line 1 has been changed from a comment to a make directive by adding make at the beginning, which will cause the build system to try to execute it as a command. This appears to be unintentional.

-# make Copyright (c) 2013-2016 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# make Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2013-2016 The Bitcoin Core developers

Copy link
Contributor

@levonpetrosyan93 levonpetrosyan93 left a comment

Choose a reason for hiding this comment

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

LGTM

@reubenyap reubenyap merged commit 7c56302 into firoorg:master Apr 16, 2025
5 of 6 checks passed
aleflm added a commit that referenced this pull request Apr 23, 2025
Rebase includes:

* UI improvements (#1475)

* Lelantus UI stripped

* More improvements

* Fixed UI hang issue during batch verification

* QT hanging improvements

* QT hanging fix

* Review commits applied

* coderabbit comments applied

* more coderabbitai comments resolved

---------

Co-authored-by: firstcryptoman <firstcryptoman@gmail.com>

* Spark names (#1532)

* Initial spark name architecture

* Spark address ownership proofs implemented.

* Missing files added

* Check the ownership proof for spark names: initial implementation

* Fixes to the core part of spark names

* Added additional field (core)

* Consensus parameters for spark names

* Fixed mempool bug

* Fixes in spark name conflict resolution

* RPCs for spark names

* Additional API for spark names tx creation

* Changed way of checking spark name tx

* Wallet API for spark name transaction creation

* API changes for spark name tx creation

* Added registersparkname RPC call

* Spark activation check for RPC

* Make spark names case-insensitive

* Spark name RPC fixes

* Faster lookup for spark name by spark address

* Fixes for spark name/address lookup

* Improvements for duplicated address detection

* Fixes for spark name state

* Block index entries for spark names

* Make dot (.) a legit symbol in spark name

* Spark name block number for testnet

* Fixed restoration of old spark name data if block is disconnected

* API for quick check of spark name transaction validity before the creation

* added isAddressMine function

* Check if the address belongs to the wallet before creating spark name transaction

* Fixed fee calculation for spark name

* Fix for spark names RPC

* Added ability to spend to spark names in "sparkspend" RPC

* UI fixes

* Additional validations

* Fix for crash with spend to unregistered name

* Fixed fee value when registering spark name for more than one year

* Spark name UI improvements

* UI modifications for sending to spark name

* Address book fixes related to spark names

* Fixed period of validity when creating spark name through GUI

* Extended spark name error info for RPC

* Fixed crash on non-HD wallet

* Request wallet password for spark name creation

* Fixed fee calculation for the spark name tx

* Fixed detection of previously used spark address for a spark name

* Unit test for spark names

* Additional unit tests

* Fixes #1533

* getsparknamedata RPC now returns JSON object

* Added "My own spark names" to the dropdown list in address book

* Added an option of displaying only own spark names for RPC. Closes #1535

* Set HF block for spark names

* Fixed a check for spark name block start

* Added tests for correctly respecting HF block number

* Check if we're over HF before spark name transaction creation

* new rpc for spark name (#1552)

* Fixed spark name tests

* Changed HF date

* Change of HF block number

---------

Co-authored-by: levonpetrosyan93 <petrosyan.levon93@gmail.com>
Co-authored-by: levoncrypto <levoncrypto1994@gmail.com>
Co-authored-by: levoncrypto <95240473+levoncrypto@users.noreply.github.com>
Co-authored-by: levonpetrosyan93 <45027856+levonpetrosyan93@users.noreply.github.com>

* Export View Keys (#1543)

* Add an RPC command to export the Spark view key.

* Show Spark View Key in Qt.

* Sigma pool closed, Extra payload extended (#1477)

* Change of emission rules

* Fixes for testnet

* Cleaning up code and tests

* Workaround for current devnet bugs

* Workaround for testnet

* Devnet parameter tweak

* Sigma pool closed

* Extra payload size limit increased

* Changed HF block for testnet

* Initial spark name architecture

* Spark address ownership proofs implemented.

* Missing files added

* Check the ownership proof for spark names: initial implementation

* Fixes to the core part of spark names

* Added additional field (core)

* Consensus parameters for spark names

* Fixed mempool bug

* Fixes in spark name conflict resolution

* RPCs for spark names

* Additional API for spark names tx creation

* Changed way of checking spark name tx

* Wallet API for spark name transaction creation

* API changes for spark name tx creation

* Added registersparkname RPC call

* Spark activation check for RPC

* Make spark names case-insensitive

* Spark name RPC fixes

* Faster lookup for spark name by spark address

* Fixes for spark name/address lookup

* Improvements for duplicated address detection

* Fixes for spark name state

* Block index entries for spark names

* Make dot (.) a legit symbol in spark name

* Spark name block number for testnet

* Fixed restoration of old spark name data if block is disconnected

* API for quick check of spark name transaction validity before the creation

* added isAddressMine function

* Check if the address belongs to the wallet before creating spark name transaction

* Fixed fee calculation for spark name

* Fix for spark names RPC

* Added ability to spend to spark names in "sparkspend" RPC

* UI fixes

* Additional validations

* Fix for crash with spend to unregistered name

* Fixed fee value when registering spark name for more than one year

* Spark name UI improvements

* UI modifications for sending to spark name

* Address book fixes related to spark names

* Fixed period of validity when creating spark name through GUI

* Extended spark name error info for RPC

* Fixed crash on non-HD wallet

* Request wallet password for spark name creation

* Fixed fee calculation for the spark name tx

* Fixed detection of previously used spark address for a spark name

* Unit test for spark names

* Additional unit tests

* Fixes #1533

* Testnet HF block set

* Mainnet HF block set

---------

Co-authored-by: Peter Shugalev <peter@shugalev.com>
Co-authored-by: levoncrypto <levoncrypto1994@gmail.com>

* Build fix (#1553)

* Build fix

* coderabbitai comment resolved

* Duplicated rpc removed

* Bump version to v0.14.14.1 Spark Names (#1550)

* secp256k1: CMake build system added

* cmake: add cmake folder

* bench: Add initial cmake support

* Add initial main CMakeLists.txt

* doc: add initial cmake support

* univalue: add initial cmake support

* zmq: add initial cmake support

* crypto: add initial cmake support

* wallet: add initial cmake support

* src: initial add of src/CMakeLists.txt

* toolchain.cmake.in: Adding toolchain.cmake.in support

* crypto: add support for CMake function check.

* bitcoin-cli: add CMake compilation.

* firo-tx: add CMake compilation.
Improve miscellaneous CMake files.

* firod: add CMake compilation support.
    * Improved misc CMake compilation support.
    * Add bitcoin-config.h generation support.

* gmp: fix gmp link on OS X

* build: generate Linux installable package.

* CMake: add tests (test_bitcoin) compilation support.

* Qt: CMake GUI compilation support (Ubuntu)

* src/qt: Add macOS support for GUI with CMake compilation.

* depends: fix gmp compilation issue with mingw

* build: Add MingW support for CMake build system

* src: add backtrace compilation support macOS

* src: add backtrace compilation support Linux and MinGW-w64

* CMake: apply CodeRabbitAI suggestions.

* CMake: Add CI tasks for CMake build.

* Remove static from functions to fix debug linking

In release builds, these functions are inlined, avoiding linkage issues.
Debug builds (without inlining) caused undefined references in dependent
libraries due to static visibility. Removing static resolves this while
maintaining intended behavior in optimized builds.

* Add removed testcases and make BUILD_GUI=ON default option

* Added documentation to readme.md and fixed a lelantus test issue

* Fixed documentation, set ENABLE_WALLET=ON by default
Remove outdated old sigma testcase

* Rebase to Wed Apr 23 11:39:34 AM BST 2025

---------

Co-authored-by: levonpetrosyan93 <45027856+levonpetrosyan93@users.noreply.github.com>
Co-authored-by: firstcryptoman <firstcryptoman@gmail.com>
Co-authored-by: psolstice <peter@shugalev.com>
Co-authored-by: levonpetrosyan93 <petrosyan.levon93@gmail.com>
Co-authored-by: levoncrypto <levoncrypto1994@gmail.com>
Co-authored-by: levoncrypto <95240473+levoncrypto@users.noreply.github.com>
Co-authored-by: cassandras-lies <203535133+cassandras-lies@users.noreply.github.com>
Co-authored-by: justanwar <42809091+justanwar@users.noreply.github.com>
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.

3 participants