Grin: Coins not shown if node not fully synced with network

Created on 17 Nov 2017  路  9Comments  路  Source: mimblewimble/grin

If you delete the .grin folder to resync a node then previously confirmed coins disappear from the wallet.

bug

Most helpful comment

@sesam change made as requested

All 9 comments

So I think what you are seeing here is the wallet attempting to refresh its outputs from a node that has _not yet_ fully sync'd with the network and is effectively unaware of the outputs.
I suspect the coins will reappear in your wallet once the node has sync'd.

If not can you paste wallet info and wallet -s outputs here (or in gist.github.com)?

I can report same issue, they do not reappear even when fully in sync with the rest of the chain again.

If you run grin wallet -s outputs do you see them incorrectly flagged as Spent?
(Or if you look in wallet.dat directly do you see them there as Spent)?

grin wallet -s outputs shows nothing.

I can docat wallet.dat and get the following output:

`cat wallet.dat
````
{
"outputs": {
"651b1de409ea25d90b57": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "651b1de409ea25d90b57",
"n_child": 6,
"value": 50000000000,
"status": "Spent",
"height": 310,
"lock_height": 1310,
"is_coinbase": true
},
"90d123315c129fb4205f": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "90d123315c129fb4205f",
"n_child": 37,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"10e2b33310c9eebe82a7": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "10e2b33310c9eebe82a7",
"n_child": 17,
"value": 50000000000,
"status": "Spent",
"height": 660,
"lock_height": 1660,
"is_coinbase": true
},
"b10b60aa25615ee8f0df": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "b10b60aa25615ee8f0df",
"n_child": 18,
"value": 50000000000,
"status": "Spent",
"height": 661,
"lock_height": 1661,
"is_coinbase": true
},
"e904d826ca59139a608c": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "e904d826ca59139a608c",
"n_child": 35,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"60212bf39ace9a6d06d5": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "60212bf39ace9a6d06d5",
"n_child": 39,
"value": 50000000000,
"status": "Spent",
"height": 1259,
"lock_height": 2259,
"is_coinbase": true
},
"c4e2799b30486bcad1ed": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "c4e2799b30486bcad1ed",
"n_child": 31,
"value": 50000000000,
"status": "Spent",
"height": 1165,
"lock_height": 2165,
"is_coinbase": true
},
"5a13729a99ce399b64fc": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "5a13729a99ce399b64fc",
"n_child": 26,
"value": 50000000000,
"status": "Spent",
"height": 1053,
"lock_height": 2053,
"is_coinbase": true
},
"b1535fd5e3255cf78a8b": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "b1535fd5e3255cf78a8b",
"n_child": 12,
"value": 50000000000,
"status": "Spent",
"height": 398,
"lock_height": 1398,
"is_coinbase": true
},
"7d1a86002ff484156dc4": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "7d1a86002ff484156dc4",
"n_child": 14,
"value": 50000000000,
"status": "Spent",
"height": 437,
"lock_height": 1437,
"is_coinbase": true
},
"f4e6f32b7c3e9ac65990": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "f4e6f32b7c3e9ac65990",
"n_child": 28,
"value": 50000000000,
"status": "Spent",
"height": 1101,
"lock_height": 2101,
"is_coinbase": true
},
"62700d5a5df490c648c3": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "62700d5a5df490c648c3",
"n_child": 30,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"c77e06d6bcbb7a570ffe": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "c77e06d6bcbb7a570ffe",
"n_child": 21,
"value": 50000000000,
"status": "Spent",
"height": 699,
"lock_height": 1699,
"is_coinbase": true
},
"40800d232dd18f6d4b12": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "40800d232dd18f6d4b12",
"n_child": 19,
"value": 50000000000,
"status": "Spent",
"height": 665,
"lock_height": 1665,
"is_coinbase": true
},
"01f0409219bf1e7e9fe4": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "01f0409219bf1e7e9fe4",
"n_child": 25,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"752cb76fa8e24994816d": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "752cb76fa8e24994816d",
"n_child": 34,
"value": 50000000000,
"status": "Spent",
"height": 1186,
"lock_height": 2186,
"is_coinbase": true
},
"97ba533cf529c96953f3": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "97ba533cf529c96953f3",
"n_child": 8,
"value": 50000000000,
"status": "Spent",
"height": 333,
"lock_height": 1333,
"is_coinbase": true
},
"efb0254406061fc46dbf": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "efb0254406061fc46dbf",
"n_child": 11,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"b93ef477140c86cad264": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "b93ef477140c86cad264",
"n_child": 3,
"value": 50000000000,
"status": "Spent",
"height": 257,
"lock_height": 1257,
"is_coinbase": true
},
"07a3071b45271cf7fa78": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "07a3071b45271cf7fa78",
"n_child": 24,
"value": 50000000000,
"status": "Spent",
"height": 802,
"lock_height": 1802,
"is_coinbase": true
},
"e021ba200ea4d4d1c1a7": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "e021ba200ea4d4d1c1a7",
"n_child": 5,
"value": 50000000000,
"status": "Spent",
"height": 309,
"lock_height": 1309,
"is_coinbase": true
},
"83aabced65fe3153e1ae": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "83aabced65fe3153e1ae",
"n_child": 23,
"value": 50000000000,
"status": "Spent",
"height": 770,
"lock_height": 1770,
"is_coinbase": true
},
"364736f82ee7c5e20f86": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "364736f82ee7c5e20f86",
"n_child": 38,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"eef7e7821b5d999a316d": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "eef7e7821b5d999a316d",
"n_child": 32,
"value": 50000000000,
"status": "Spent",
"height": 1168,
"lock_height": 2168,
"is_coinbase": true
},
"b1e0b9307863e4eea7b0": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "b1e0b9307863e4eea7b0",
"n_child": 40,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"15466e4707744441a4c7": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "15466e4707744441a4c7",
"n_child": 10,
"value": 50000000000,
"status": "Spent",
"height": 360,
"lock_height": 1360,
"is_coinbase": true
},
"fe9cec3be0d52ce9a691": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "fe9cec3be0d52ce9a691",
"n_child": 15,
"value": 50000000000,
"status": "Spent",
"height": 475,
"lock_height": 1475,
"is_coinbase": true
},
"f74410f222942e642369": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "f74410f222942e642369",
"n_child": 13,
"value": 50000000000,
"status": "Spent",
"height": 425,
"lock_height": 1425,
"is_coinbase": true
},
"0d9ebca2888bda6b0709": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "0d9ebca2888bda6b0709",
"n_child": 33,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"ccb505ee67fa03cc6ef1": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "ccb505ee67fa03cc6ef1",
"n_child": 29,
"value": 50000000000,
"status": "Spent",
"height": 1117,
"lock_height": 2117,
"is_coinbase": true
},
"ee6595cb6db9fb02d45d": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "ee6595cb6db9fb02d45d",
"n_child": 7,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"76e359e21d10c7068db7": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "76e359e21d10c7068db7",
"n_child": 9,
"value": 50000000000,
"status": "Spent",
"height": 359,
"lock_height": 1359,
"is_coinbase": true
},
"a6b45aef8289c0392300": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "a6b45aef8289c0392300",
"n_child": 1,
"value": 50000000000,
"status": "Spent",
"height": 213,
"lock_height": 1213,
"is_coinbase": true
},
"ee242914795dfa6a448e": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "ee242914795dfa6a448e",
"n_child": 22,
"value": 50000000000,
"status": "Spent",
"height": 765,
"lock_height": 1765,
"is_coinbase": true
},
"fc1f8781d475305908d6": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "fc1f8781d475305908d6",
"n_child": 20,
"value": 50000000000,
"status": "Spent",
"height": 682,
"lock_height": 1682,
"is_coinbase": true
},
"7d1bad480baea23a260c": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "7d1bad480baea23a260c",
"n_child": 36,
"value": 50000000000,
"status": "Unconfirmed",
"height": 0,
"lock_height": 0,
"is_coinbase": true
},
"e27167abfa1bbce6c98d": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "e27167abfa1bbce6c98d",
"n_child": 27,
"value": 50000000000,
"status": "Spent",
"height": 1066,
"lock_height": 2066,
"is_coinbase": true
},
"e620dc5cdc39debad448": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "e620dc5cdc39debad448",
"n_child": 2,
"value": 50000000000,
"status": "Spent",
"height": 245,
"lock_height": 1245,
"is_coinbase": true
},
"2d0786a2412bbad56149": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "2d0786a2412bbad56149",
"n_child": 4,
"value": 50000000000,
"status": "Spent",
"height": 276,
"lock_height": 1276,
"is_coinbase": true
},
"6f0e664409eec26753c6": {
"root_key_id": "0c7a6dca6a334361a8e4",
"key_id": "6f0e664409eec26753c6",
"n_child": 16,
"value": 50000000000,
"status": "Spent",
"height": 584,
"lock_height": 1584,
"is_coinbase": true
}
}

```

@BloddyBaron if grin wallet -p password -s outputs is showing something different to the contents of wallet.dat then you must be specifying a different password.

Test steps:

  • created wallet and server
  • synced chain
  • mined till 150 grin

````

Wallet Outputs - Block Height: 1455

Key Id Block Height Locked Until Status Is Coinbase? Num. of Confirmations Value

5d1f4cd49656cda32d98 1356 2356 Unspent true 100 50.000000000

e335fafc6dca5562838b 1372 2372 Unspent true 84 50.000000000

9b1ea0f1de967e83e3c1 1433 2433 Unspent true 23 50.000000000

c86b0d5ebc16546ba711 0 0 Unconfirmed true 0 50.000000000

````

  • renamed .grin .grin_bak
  • resynced chain
  • coin missing

````

Wallet Outputs - Block Height: 1477

Key Id Block Height Locked Until Status Is Coinbase? Num. of Confirmations Value

c86b0d5ebc16546ba711 0 0 Unconfirmed true 0 50.000000000
````

  • restored original .grin but coin still gone.

Wallet.dat shows them as spent:
{ "outputs": { "e335fafc6dca5562838b": { "root_key_id": "af8296557bc17102c292", "key_id": "e335fafc6dca5562838b", "n_child": 2, "value": 50000000000, "status": "Spent", "height": 1372, "lock_height": 2372, "is_coinbase": true }, "5d1f4cd49656cda32d98": { "root_key_id": "af8296557bc17102c292", "key_id": "5d1f4cd49656cda32d98", "n_child": 1, "value": 50000000000, "status": "Spent", "height": 1356, "lock_height": 2356, "is_coinbase": true }, "9b1ea0f1de967e83e3c1": { "root_key_id": "af8296557bc17102c292", "key_id": "9b1ea0f1de967e83e3c1", "n_child": 3, "value": 50000000000, "status": "Spent", "height": 1433, "lock_height": 2433, "is_coinbase": true }, "c86b0d5ebc16546ba711": { "root_key_id": "af8296557bc17102c292", "key_id": "c86b0d5ebc16546ba711", "n_child": 4, "value": 50000000000, "status": "Unconfirmed", "height": 0, "lock_height": 0, "is_coinbase": true } } }

Changing wallet.dat to 'Unspent' for the relevant outputs makes them appear again

@andybellenie Hi, please, could you update the title to "Coins not shown if node not fully synced with network"? That is the root cause of your and others' issues mentioned here, and it would simplify explaining this to new users with the same issue.

cc @antiochp Meanwhile, would it be good if I try to quickly add a message in wallet info and outputs about the possibility of hidden coins if not synced?

@sesam change made as requested

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antiochp picture antiochp  路  7Comments

alden-alvins picture alden-alvins  路  5Comments

shrikus picture shrikus  路  6Comments

yeastplume picture yeastplume  路  3Comments

ignopeverell picture ignopeverell  路  4Comments