From 0730ec0d612d1b79e16d501289fc1d3d4be322db Mon Sep 17 00:00:00 2001 From: satan Date: Tue, 24 Sep 2024 17:17:17 +0200 Subject: [PATCH 1/2] Added docs for key birthdays --- .../users/shielded-accounts/masp-keys.mdx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/docs/pages/users/shielded-accounts/masp-keys.mdx b/packages/docs/pages/users/shielded-accounts/masp-keys.mdx index ad0e77f6..1f719bf2 100644 --- a/packages/docs/pages/users/shielded-accounts/masp-keys.mdx +++ b/packages/docs/pages/users/shielded-accounts/masp-keys.mdx @@ -25,6 +25,30 @@ WARNING: Keep your mnemonic and passphrase safe. Loss of either can result in you being locked out of your accounts with no chance of recovering your funds. + #### Birthdays + +When generating a spending key, you can optionally specify a birthday, like so: +```bash copy +namadaw gen --shielded --alias $SPENDING_KEY_ALIAS --birthday $BIRTHDAY +``` + +The birthday of a key is a block height before the key was created. Ideally, it should be as close to the current block +height as possible. Recall that the current block height can be queried via: +```bash copy +namadac block +``` + +The purpose of giving your keys a birthday is to let the wallet know that when scanning the ledger for MASP transactions +belonging to this key, there is no need to search blocks prior than the specified birthday. This can provide a lot of +time savings when performing [shielded sync](shielded-sync.mdx). + +If not birthday is provided for a spending key, the birthday is set to the genesis block by default. Furthermore, any +viewing key derived from the spending key inherits its birthday. + +Birthdays can also be provided when adding or deriving keys. By re-adding an existing key with a new birthday, you can +update a key's birthday in the wallet. Keys passed to shieled-sync directly (as opposed to being stored in the wallet), +can also be passed in with birthdays. This is done simply by by appending `<<{BIRTHDAY}` to the end of the key. + #### Displaying your spending key and viewing key You can display your viewing key with: ```bash copy From 246f0da1d31fbbdfcbe4cb2e777dd52465a14bf1 Mon Sep 17 00:00:00 2001 From: brentstone Date: Wed, 25 Sep 2024 19:04:11 -0700 Subject: [PATCH 2/2] small edits --- packages/docs/pages/users/shielded-accounts/masp-keys.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docs/pages/users/shielded-accounts/masp-keys.mdx b/packages/docs/pages/users/shielded-accounts/masp-keys.mdx index 1f719bf2..3ad6f672 100644 --- a/packages/docs/pages/users/shielded-accounts/masp-keys.mdx +++ b/packages/docs/pages/users/shielded-accounts/masp-keys.mdx @@ -42,11 +42,11 @@ The purpose of giving your keys a birthday is to let the wallet know that when s belonging to this key, there is no need to search blocks prior than the specified birthday. This can provide a lot of time savings when performing [shielded sync](shielded-sync.mdx). -If not birthday is provided for a spending key, the birthday is set to the genesis block by default. Furthermore, any +If no birthday is provided for a spending key, the birthday is set to the genesis block by default. Furthermore, any viewing key derived from the spending key inherits its birthday. Birthdays can also be provided when adding or deriving keys. By re-adding an existing key with a new birthday, you can -update a key's birthday in the wallet. Keys passed to shieled-sync directly (as opposed to being stored in the wallet), +update a key's birthday in the wallet. Keys passed to shielded-sync directly (as opposed to being stored in the wallet), can also be passed in with birthdays. This is done simply by by appending `<<{BIRTHDAY}` to the end of the key. #### Displaying your spending key and viewing key