Closed bladedoyle closed 3 years ago
There are several reasons we need to self-send. Consolidating outputs. Adding a bit of deniable plausibility to input/output linking, etc. We used to be able to do this though the http listener.
I am unable to send to myself over Tor:
bdoyle@crypto:~$ grin-wallet address | grep grin
grin1XXXXX
bdoyle@crypto:~$ grin-wallet send -d grin1hXXXXX 1
20201229 18:55:18.278 WARN grin_wallet_api::owner - Attempting to send transaction via TOR
Wallet command failed: LibWallet Error: Payment Proof generation error: Original proof info not stored in tx
The transaction is not completed. Its necessary to cancel both parts:
bdoyle@crypto:~$ grin-wallet txs
...
325 Received Tx f2cf54ff-e087-4db8-8ed4-47f3cacc38da 2020-12-29 18:55:32 None false None 0 1 1.0 0.0 None 1.0 None 0950a3e559e9954390e318a2322a10b82b8085c6bcf790a18c4dc1b7ec9d77c10e None
---
326 Sent Tx f2cf54ff-e087-4db8-8ed4-47f3cacc38da 2020-12-29 18:55:32 None false None 1 1 93.63409798 94.65709798 0.023 -1.023 Yes 08d213442bac4214a6d22dc673aba2db2ac201167bd55c91caa32ffa110a9b626e Yes
bdoyle@crypto:~$ grin-wallet cancel -i 325
Command 'cancel' completed successfully
bdoyle@crypto:~$ grin-wallet cancel -i 326
Command 'cancel' completed successfully
Self-send via Tor should fail and result in an error.
OS: Debian 10 \
System Info: Linux debian3 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
\
Grin Node: grin 5.0.0-rc.2
\
Grin Wallet: grin-wallet 5.0.0-rc.1
grin-wallet
.
$ cd ~/grin-wallet-5.0.0-rc.1/target/release
$ ./grin-wallet init
$ ./grin-wallet listen
20201231 22:54:54.580 WARN grin_wallet_controller::controller - Starting TOR Hidden Service for API listener at address ejsxj4g3zl2lblxgoaar5bv6rovxsmyrfijzyzbuqihdnwez7klbbmyd, binding to 127.0.0.1:3415
20201231 22:54:56.725 WARN grin_wallet_controller::controller - Starting HTTP Foreign listener API server at 127.0.0.1:3415.
20201231 22:54:56.725 WARN grin_wallet_controller::controller - HTTP Foreign listener started.
20201231 22:54:56.725 WARN grin_wallet_controller::controller - Slatepack Address is: grin1yfjhfuxmet6tpthxwqq3ap473w4hjvc39gfecep5sg8rdkyel2tquvjw9j
Send 1 ツ (or any other amount you wish to test) to your own slatepack address. The wallet will attempt to send it over Tor first. Enter your password when prompt.
Sending 1 ツ to myself. Replace the slatepack address with your own!
$ ./grin-wallet send -d grin1yfjhfuxmet6tpthxwqq3ap473w4hjvc39gfecep5sg8rdkyel2tquvjw9j 1
20201231 22:56:44.667 WARN grin_wallet_api::owner - Attempting to send transaction via TOR
Wallet command failed: LibWallet Error: Payment Proof generation error: Original proof info not stored in tx
Inspect the wallet contents. My ツ appears to be locked by my previous transactions.
$ ./grin-wallet info
20201231 23:11:12.458 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201231 23:11:12.472 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:11:12.477 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:11:12.478 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
____ Wallet Summary Info - Account 'default' as of height 1026811 ____
Confirmed Total | 0.000000000
Awaiting Confirmation (< 10) | 0.000000000
Awaiting Finalization | 4.977000000
Locked by previous transaction | 5.000000000
-------------------------------- | -------------
Currently Spendable | 0.000000000
Command 'info' completed successfully
$ ./grin-wallet txs
The output will be similiar to this.
20201231 23:00:22.273 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201231 23:00:22.290 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:00:22.295 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:00:22.296 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
Transaction Log - Account 'default' - Block Height: 1026803
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Id Type Shared Transaction Id Creation Time TTL Cutoff Height Confirmed? Confirmation Time Num. Num. Amount Amount Fee Net Payment Kernel Tx
Inputs Outputs Credited Debited Difference Proof Data
===========================================================================================================================================================================================================================================================================
0 Received Tx 0cc194e1-fd8b-46f0-b19d-80bd473b7b59 2020-12-31 09:12:34 None true 2020-12-31 09:20:06 0 1 5.0 0.0 None 5.0 None 083e29d82237a2d89b501323a6ff3a9b64c0132ccd88b860cf42c9679ba68070e6 None
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 Received Tx c425a0e3-696e-4215-a2b1-7b803330db21 2020-12-31 22:56:53 None false None 0 1 1.0 0.0 None 1.0 None 09855cf9628536e1fec6582fd4df84c80ca7fee28e522f0d8a5ecb40400754c0aa None
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2 Sent Tx c425a0e3-696e-4215-a2b1-7b803330db21 2020-12-31 22:56:53 None false None 1 1 3.977 5.0 0.023 -1.023 Yes 082b9c84fc69ea6ba276ab2df1b02fd3596e411b8d5d3e33f4969f1e9e6e5f7d9b Yes
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Command 'txs' completed successfully
1
and 2
.Cancel the incomplete transactions using the ids you copied. Enter your password when prompt.
Replace the ids with your own!
$ ./grin-wallet cancel -i 1
20201231 23:14:38.246 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201231 23:14:38.264 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:14:38.274 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:14:38.275 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
Command 'cancel' completed successfully
$ ./grin-wallet cancel -i 2
20201231 23:14:45.354 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201231 23:14:45.369 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:14:45.375 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:14:45.376 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
Command 'cancel' completed successfully
Wait until your locked ツ are free to use again. Inspect the transaction log and wallet content summary to confirm.
$ ./grin-wallet txs
20201231 23:15:47.659 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201231 23:15:47.671 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:15:47.676 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:15:47.676 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
Transaction Log - Account 'default' - Block Height: 1026817
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Id Type Shared Transaction Id Creation Time TTL Cutoff Height Confirmed? Confirmation Time Num. Num. Amount Amount Fee Net Payment Kernel Tx
Inputs Outputs Credited Debited Difference Proof Data
===========================================================================================================================================================================================================================================================================
0 Received Tx 0cc194e1-fd8b-46f0-b19d-80bd473b7b59 2020-12-31 09:12:34 None true 2020-12-31 09:20:06 0 1 5.0 0.0 None 5.0 None 083e29d82237a2d89b501323a6ff3a9b64c0132ccd88b860cf42c9679ba68070e6 None
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 Received Tx c425a0e3-696e-4215-a2b1-7b803330db21 2020-12-31 22:56:53 None false None 0 1 1.0 0.0 None 1.0 None 09855cf9628536e1fec6582fd4df84c80ca7fee28e522f0d8a5ecb40400754c0aa None
- Cancelled
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2 Sent Tx c425a0e3-696e-4215-a2b1-7b803330db21 2020-12-31 22:56:53 None false None 1 1 3.977 5.0 0.023 -1.023 Yes 082b9c84fc69ea6ba276ab2df1b02fd3596e411b8d5d3e33f4969f1e9e6e5f7d9b Yes
- Cancelled
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Command 'txs' completed successfully
$ ./grin-wallet info
20201231 23:16:38.972 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201231 23:16:38.997 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:16:39.012 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201231 23:16:39.013 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
____ Wallet Summary Info - Account 'default' as of height 1026817 ____
Confirmed Total | 5.000000000
Awaiting Confirmation (< 10) | 0.000000000
Awaiting Finalization | 0.000000000
Locked by previous transaction | 0.000000000
-------------------------------- | -------------
Currently Spendable | 5.000000000
Command 'info' completed successfully
The transactions were successfully cancelled.
Another round of testing was done with Debug
mode enabled in grin-wallet.toml
.
$ ./grin-wallet send -d grin1yfjhfuxmet6tpthxwqq3ap473w4hjvc39gfecep5sg8rdkyel2tquvjw9j 1
Cropped debug output:
...
grin_wallet_impls::tor::process - Dec 31 23:23:59.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
20201231 23:24:00.001 DEBUG grin_wallet_impls::tor::process - Dec 31 23:24:00.000 [notice] Bootstrapped 100%: Done
20201231 23:24:00.002 DEBUG grin_wallet_impls::tor::process - Dropping TOR process
20201231 23:24:20.004 DEBUG grin_wallet_api::owner - Send (TOR): Could not send Slate via TOR: Client Callback Error: Performing version check (is recipient listening?): Request error: Cannot make request: error trying to connect: deadline has elapsed
20201231 23:24:20.004 DEBUG grin_wallet_impls::tor::process - Dropping TOR process
20201231 23:24:20.004 DEBUG grin_wallet_api::owner - Unable to send via TOR: Client Callback Error: Performing version check (is recipient listening?): Request error: Cannot make request: error trying to connect: deadline has elapsed
20201231 23:24:20.004 WARN grin_wallet_api::owner - Unable to send transaction via TOR
...
I was able to successfully replicate @bladedoyle's error. The specific method of self-sending via Tor will fail using GRIN-Wallet 5.0.0-rc.1
and GRIN-Node v5.0.0-rc.2
. A full debug output is provided for this test.
Awesome! Reproduced! Great work @goyle and @bladedoyle feel free to leave comments if needed! Closing
There are several reasons we need to self-send. Consolidating outputs. Adding a bit of deniable plausibility to input/output linking, etc. We used to be able to do this though the http listener.
I am unable to send to myself over Tor:
The transaction is not completed. Its necessary to cancel both parts: