Closed MCM-Mike closed 3 years ago
Description : Verifying if the GRIN-Wallet handles missing grin-wallet.toml file
Prerequisites : Setup a GRIN-Wallet. Verify the wallet is working by running info command. Then delete the grin-wallet.toml file and start the wallet again.
Expected result: GRIN-Wallet should either re-create the config toml file or at indicate that its missing.
Step 1: The grin wallet has been set-up as shown below:
Chandrashekars-MacBook-Air:release chandrashekar$ ./grin-wallet info
Password:
20201219 16:06:37.045 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201219 16:06:37.889 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201219 16:06:37.901 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201219 16:06:37.902 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
____ Wallet Summary Info - Account 'default' as of height 1008921 ____
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.
Step 2: Checking the list of files on /.grin/main
Chandrashekars-MacBook-Air:Users chandrashekar$ cd ~/.grin
Chandrashekars-MacBook-Air:.grin chandrashekar$ ls -l
total 0
drwxr-xr-x 14 chandrashekar staff 448 Dec 18 17:49 main
Chandrashekars-MacBook-Air:.grin chandrashekar$ cd main
Chandrashekars-MacBook-Air:main chandrashekar$ ls -l
total 8248
drwxr-xr-x 7 chandrashekar staff 224 Dec 17 19:25 chain_data
-rw-r--r-- 1 chandrashekar staff 3520032 Dec 19 15:57 grin-server.log
-rw-r--r-- 1 chandrashekar staff 8122 Dec 17 18:22 grin-server.toml
-rw-r--r-- 1 chandrashekar staff 8752 Dec 19 15:46 grin-wallet.log
-rw-r--r-- 1 chandrashekar staff 2892 Dec 18 16:20 grin-wallet.toml
drwxr-xr-x 3 chandrashekar staff 96 Dec 18 17:49 slatepack
drwxr-xr-x 2 chandrashekar staff 64 Dec 17 19:25 tmp
drwxr-xr-x 3 chandrashekar staff 96 Dec 18 17:49 tor
drwxr-xr-x 5 chandrashekar staff 160 Dec 18 16:20 wallet_data
Step 3: The grin-wallet.toml
has been deleted from /.grin/main
and the output now looks as follows:
Chandrashekars-MacBook-Air:main chandrashekar$ ls -l total 8240
drwxr-xr-x 7 chandrashekar staff 224 Dec 17 19:25 chain_data
-rw-r--r-- 1 chandrashekar staff 3520181 Dec 19 16:07 grin-server.log
-rw-r--r-- 1 chandrashekar staff 8122 Dec 17 18:22 grin-server.toml
-rw-r--r-- 1 chandrashekar staff 9951 Dec 19 16:06 grin-wallet.log
drwxr-xr-x 3 chandrashekar staff 96 Dec 18 17:49 slatepack
drwxr-xr-x 2 chandrashekar staff 64 Dec 17 19:25 tmp
drwxr-xr-x 3 chandrashekar staff 96 Dec 18 17:49 tor
drwxr-xr-x 5 chandrashekar staff 160 Dec 18 16:20 wallet_data
Step 4: Now the wallet is started fresh using the ./grin-wallet info
command
and the output is as follows:
Password:
20201219 16:13:55.537 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 0% complete
20201219 16:13:56.312 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201219 16:13:56.320 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning - 99% complete
20201219 16:13:56.321 WARN grin_wallet_libwallet::api_impl::owner_updater - Scanning Complete
____ Wallet Summary Info - Account 'default' as of height 1008926 ____
Confirmed Total | 5.000000000
Awaiting Confirmation (< 10) | 0.000000000
Awaiting Finalization | 0.000000000
Locked by previous transaction | 0.000000000
-------------------------------- | -------------
Currently Spendable | 5.000000000
Step 5: I run the ls -l command to check the list of files after running the ./grin-wallet info
command
and the output is
Chandrashekars-MacBook-Air:~ chandrashekar$ cd ~/.grin
Chandrashekars-MacBook-Air:.grin chandrashekar$ ls -l
total 0
drwxr-xr-x 14 chandrashekar staff 448 Dec 19 16:23 main
Chandrashekars-MacBook-Air:.grin chandrashekar$ cd main
Chandrashekars-MacBook-Air:main chandrashekar$ ls -l
total 8248
drwxr-xr-x 7 chandrashekar staff 224 Dec 17 19:25 chain_data
-rw-r--r-- 1 chandrashekar staff 3520480 Dec 19 16:27 grin-server.log
-rw-r--r-- 1 chandrashekar staff 8122 Dec 17 18:22 grin-server.toml
-rw-r--r-- 1 chandrashekar staff 12090 Dec 19 16:24 grin-wallet.log
-rw-r--r-- 1 chandrashekar staff 2892 Dec 19 16:23 grin-wallet.toml
drwxr-xr-x 3 chandrashekar staff 96 Dec 18 17:49 slatepack
drwxr-xr-x 2 chandrashekar staff 64 Dec 17 19:25 tmp
drwxr-xr-x 3 chandrashekar staff 96 Dec 18 17:49 tor
drwxr-xr-x 5 chandrashekar staff 160 Dec 18 16:20 wallet_data
So the grin-wallet.toml
has reappeared and from the timestamp we can see that it is recent.
The previous time stamp was
-rw-r--r-- 1 chandrashekar staff 8122 Dec 17 18:22 grin-server.toml
The current time stamp is
-rw-r--r-- 1 chandrashekar staff 2892 Dec 19 16:23 grin-wallet.toml
So the ./grin-wallet info
creates the new grin-wallet.toml
file as expected.
@chandrashekar10 I forgot to ask, can you please provide version of the wallet? you can run
grin-wallet -V
Description Verifying if the GRIN-Wallet handles missing
grin-wallet.toml
filePrerequisites Setup a GRIN-Wallet. Verify the wallet is working by running
info
command. Then delete thegrin-wallet.toml
file and start the wallet again.Expected result: GRIN-Wallet should either re-create the config toml file or at indicate that its missing.