From 3386b64237cc6af4b9cb62bf53439a1cd2f63992 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Sun, 8 Sep 2024 13:48:47 +0200 Subject: [PATCH 1/4] Updates shileded ibc --- .../docs/pages/users/ibc/shielded-ibc.mdx | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/packages/docs/pages/users/ibc/shielded-ibc.mdx b/packages/docs/pages/users/ibc/shielded-ibc.mdx index 42e84359..28333b22 100644 --- a/packages/docs/pages/users/ibc/shielded-ibc.mdx +++ b/packages/docs/pages/users/ibc/shielded-ibc.mdx @@ -14,15 +14,29 @@ software such as [Hermes](https://github.com/heliaxdev/hermes). - You will need to know the corresponding channel id ## IBC transfer to a shielded address - -Previous versions of Namada required a two-step process to make IBC transfers to a shielded address: first a MASP proof was generated using the -`ibc-gen-shielded` command, and this proof was included in the `memo` field of the transfer. -It is no longer necessary to manually generate the MASP proof, and the `ibc-gen-shielded` command has been removed. - +First of all we need to generate the shielding data with the command: + +```bash copy +namadac ibc-gen-shielding \ + --output-folder-path \ + $OUTPUT_FOLDER_PATH \ + --target \ + $RECEIVER \ + --token \ + $TOKEN \ + --amount \ + $AMOUNT \ + --port-id + $PORT_ID \ + --channel-id \ + $CHANNEL_ID +```o -IBC transfers to a shielded address work similarly to those for a [tranparent address](./transparent-ibc.mdx), -the only difference being that we provide the MASP internal address as the value instead of `$RECV_ADDRESS`: +This command will generate the shielding data in file in the provided directory and will output the path to this file, $SHIELDING_DATA_PATH. + +After that, IBC transfers to a shielded address work similarly to those for a [transparent address](./transparent-ibc.mdx), +the only differences being that we provide the MASP internal address as the value instead of `$RECV_ADDRESS` and we add a `--memo` arg with the path to the file we have just generated: ```bash copy gaiad tx ibc-transfer transfer \ @@ -32,6 +46,7 @@ gaiad tx ibc-transfer transfer \ --from $COSMOS_ALIAS \ --node $COSMOS_RPC_ENDPOINT \ --fees 5000uatom + --memo $SHIELDING_DATA_PATH ``` @@ -39,6 +54,7 @@ The previous command would work even with `$RECEIVER_PAYMENT_ADDRESS` as the sec ## IBC transfer from a shielded address + You can also send IBC transfers from a shielded address, by providing the associated spending key as the source: ```bash copy namadac ibc-transfer \ @@ -47,8 +63,7 @@ namadac ibc-transfer \ --token $TOKEN \ --amount $AMOUNT \ --channel-id $CHANNEL_ID \ - --gas-payer $IMPLICIT_ADDRESS ``` - -When sending any transaction from a shielded address, you must also provide an implicit address which you control with enough funds to cover gas costs. - \ No newline at end of file +When sending any transaction from a shielded address, you must also provide an implicit address which you control with enough funds to cover gas costs. Otherwise, + +Gas fees can be paid like all the other transactions either directly from an implicit account adding `--gas-payer $IMPLICIT_ADDRESS` or via the MASP: for more information please refer to the [fees section](../Fees on Namada.mdx). From 42184d69b376bf41d4840a9e3a96012edb9014d5 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Sun, 8 Sep 2024 13:58:19 +0200 Subject: [PATCH 2/4] Fixes formatting --- packages/docs/pages/users/ibc/shielded-ibc.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/docs/pages/users/ibc/shielded-ibc.mdx b/packages/docs/pages/users/ibc/shielded-ibc.mdx index 28333b22..b85f4570 100644 --- a/packages/docs/pages/users/ibc/shielded-ibc.mdx +++ b/packages/docs/pages/users/ibc/shielded-ibc.mdx @@ -31,7 +31,7 @@ namadac ibc-gen-shielding \ $PORT_ID \ --channel-id \ $CHANNEL_ID -```o +``` This command will generate the shielding data in file in the provided directory and will output the path to this file, $SHIELDING_DATA_PATH. @@ -45,7 +45,7 @@ gaiad tx ibc-transfer transfer \ ${AMOUNT}${IBC_TOKEN_ADDRESS} \ --from $COSMOS_ALIAS \ --node $COSMOS_RPC_ENDPOINT \ - --fees 5000uatom + --fees 5000uatom \ --memo $SHIELDING_DATA_PATH ``` @@ -64,6 +64,5 @@ namadac ibc-transfer \ --amount $AMOUNT \ --channel-id $CHANNEL_ID \ ``` -When sending any transaction from a shielded address, you must also provide an implicit address which you control with enough funds to cover gas costs. Otherwise, -Gas fees can be paid like all the other transactions either directly from an implicit account adding `--gas-payer $IMPLICIT_ADDRESS` or via the MASP: for more information please refer to the [fees section](../Fees on Namada.mdx). +Gas fees can be paid like all the other transactions either directly from an implicit account adding `--gas-payer $IMPLICIT_ADDRESS` or via the MASP: for more information please refer to the [fees section](../fees.mdx). From 84f0a559c0cd15338e82b9e5c3f0cd8c9ac7792d Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Sun, 8 Sep 2024 14:00:40 +0200 Subject: [PATCH 3/4] Minor fix --- packages/docs/pages/users/ibc/shielded-ibc.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/pages/users/ibc/shielded-ibc.mdx b/packages/docs/pages/users/ibc/shielded-ibc.mdx index b85f4570..3beb7a2e 100644 --- a/packages/docs/pages/users/ibc/shielded-ibc.mdx +++ b/packages/docs/pages/users/ibc/shielded-ibc.mdx @@ -33,7 +33,7 @@ namadac ibc-gen-shielding \ $CHANNEL_ID ``` -This command will generate the shielding data in file in the provided directory and will output the path to this file, $SHIELDING_DATA_PATH. +This command will generate the shielding data in a file inside the provided directory and will output the path to this file, `$SHIELDING_DATA_PATH`. After that, IBC transfers to a shielded address work similarly to those for a [transparent address](./transparent-ibc.mdx), the only differences being that we provide the MASP internal address as the value instead of `$RECV_ADDRESS` and we add a `--memo` arg with the path to the file we have just generated: From 7900c2a13b7ee460f594aafaa7ba3f3b5ba16acc Mon Sep 17 00:00:00 2001 From: brentstone Date: Sun, 8 Sep 2024 15:53:38 +0200 Subject: [PATCH 4/4] small edits --- packages/docs/pages/users/ibc/shielded-ibc.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/docs/pages/users/ibc/shielded-ibc.mdx b/packages/docs/pages/users/ibc/shielded-ibc.mdx index 3beb7a2e..c935bc02 100644 --- a/packages/docs/pages/users/ibc/shielded-ibc.mdx +++ b/packages/docs/pages/users/ibc/shielded-ibc.mdx @@ -11,11 +11,11 @@ This section covers sending assets to and from a shielded ( `znam` ) address. - An active IBC connection has been created and maintained between the two chains by operators running relayer software such as [Hermes](https://github.com/heliaxdev/hermes). -- You will need to know the corresponding channel id +- You will need to know the corresponding channel ID. ## IBC transfer to a shielded address -First of all we need to generate the shielding data with the command: +First, we need to generate the shielding data with the command: ```bash copy namadac ibc-gen-shielding \ @@ -65,4 +65,5 @@ namadac ibc-transfer \ --channel-id $CHANNEL_ID \ ``` -Gas fees can be paid like all the other transactions either directly from an implicit account adding `--gas-payer $IMPLICIT_ADDRESS` or via the MASP: for more information please refer to the [fees section](../fees.mdx). +Gas fees can be paid like all the other transactions either directly from an implicit account adding `--gas-payer $IMPLICIT_ADDRESS` or via the MASP. +For more information please refer to the [fees section](../fees.mdx).