mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 991 forks source link

inconsistency of blockheight of a coinbase when it's "grin wallet outputs"(ed) #508

Closed Makadu59 closed 6 years ago

Makadu59 commented 6 years ago

The block height of coinbase output seems to be wrong after the command

grin wallet -p password outputs

You can see it on this first screenshot : (https://imgur.com/a/VLH34)

I restored the wallet with those command lines :

rm wallet.dat
grin wallet -p password restore

You can see the result on this second screenshot : https://imgur.com/a/Fu2rO

Here are all the logs since the sync of the chain : 16/12 16:22 to 17/12 13:55 from above to 17/12 14:09 from above to almost now

The .grin folder : zip

sesam commented 6 years ago

Trying to understand this.

The grin.log outputs come from grin/src/server.rs around line 630 from the modules's last function fn get_coinbase and should show the height and Key Id of a just constructed coinbase, that will be mined upon.

The chain height is 21383 on the first screenshot, and 21452 on the second, but the wallet outputs printout shows very strange low numbers under "Block Height".

@Makadu59 is both screenshots after a wallet restoreor is one before and another after running restore? Or did you maybe manage to repair the errors by running wallet restore from a recently updated testnet1 grin build?

Makadu59 commented 6 years ago

the first screenshot was taken before the wallet restore and the second screenshot was taken after the wallet restore.

as far i remember, the different logs was made after a fresh grin build (not after a fresh sync) so yes the wallet restore was made with a recently updated testnet1 grin build.

sesam commented 6 years ago

Good. There's a known issue of you restore before sync is finished. Maybe that's what happened? ATB

On Jan 14, 2018 11:47 PM, "Karine Durand-Garçon" notifications@github.com wrote:

the first screenshot was taken before the wallet restore and the second screenshot was taken after the wallet restore.

as far i remember, the different logs was made after a fresh grin build (not after a fresh sync) so yes the wallet restore was made with a recently updated testnet1 grin build.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mimblewimble/grin/issues/508#issuecomment-357549352, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAi2ebAfl_pSFxH8LNRlFLTfxAMk4-2ks5tKoQVgaJpZM4RExpa .

yeastplume commented 6 years ago

Ancient T1, wallet info should be more accurate now.