Skip to content
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

User data in encrypted Vaults #2305

Merged
merged 6 commits into from
Oct 24, 2024
Merged

Conversation

grumbach
Copy link
Member

  • Node side Vault Upgrade implementation (previously only supported paying for vault but not accepting updates)
  • CLI integration of local disk user data
    • now register list and file list commands show previously uploaded data addresses
  • CLI integration of vaults to backup the local user data to disk
Usage: autonomi vault [OPTIONS] <COMMAND>

Commands:
  cost    Estimate cost to create a vault
  create  Create a vault at a deterministic address based on your `SECRET_KEY`. Pushing an encrypted
          backup of your local user data to the network
  load    Load an existing vault from the network. Use this when loading your user data to a new
          device. You need to have your original `SECRET_KEY` to load the vault
  sync    Sync vault with the network, including registers and files. Loads existing user data from
          the network and merges it with your local user data. Pushes your local user data to the
          network
  help    Print this message or the help of the given subcommand(s)
  • Vault key generation from EVM secret key signature => meaning apps without access to the key itself but with signing capabilities like metamask or hardware wallets can also use this feature!

AFTER THIS PR USER ONLY NEED TO KEEP TRACK OF 1 SINGLE KEY (EVM key) to access everything Autonomi related:

  • register secret key (encrypted in the vault)
  • previously uploaded data addresses (encrypted in the vault)
  • previously uploaded register addresses (encrypted in the vault)
  • vault key (generated from evm key sig)

@grumbach grumbach force-pushed the cli_user_data_vault branch from a6d8909 to 8b3579b Compare October 24, 2024 03:49
let scratch = Scratchpad::new(client_pk, content_type);
let vault_xor = scratch.network_address().as_xorname().unwrap_or_default();

// NB TODO: vault should be priced differently from other data

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently all data chunk/registers/vault are priced the same: per address.

@grumbach grumbach enabled auto-merge October 24, 2024 04:09
@mazzi
Copy link
Contributor

mazzi commented Oct 24, 2024

LGTM 🚀
Would be nice to add doc comments and tests on autonomi-cli/src/commands/vault.rs public functions as they are core to the project. Same with other files on autonomi-cli/src/commands/.
WDYT?

@grumbach grumbach added this pull request to the merge queue Oct 24, 2024
Merged via the queue into maidsafe:main with commit 1b7920e Oct 24, 2024
27 checks passed
@grumbach grumbach deleted the cli_user_data_vault branch October 24, 2024 08:24
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