Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet template restore from seed fails #1704

Closed
oscarguindzberg opened this issue Feb 18, 2019 · 12 comments
Closed

Wallet template restore from seed fails #1704

oscarguindzberg opened this issue Feb 18, 2019 · 12 comments
Milestone

Comments

@oscarguindzberg
Copy link
Contributor

Restore from seed on wallet template fails.
It fails on regtest (I tried testnet and fails too but log is different)
After restore from seed is requested, UI keeps showing "Synchronizing with the bitcoin network"

Steps to reproduce:

  • Start local bitcoin-core on regtest
  • Generate 1000 blocks
  • Change harcoded Mainnet to Regtest on https://github.com/bitcoinj/bitcoinj/blob/master/wallettemplate/src/main/java/wallettemplate/Main.java#L49
  • Start wallettemplate.Main
  • On wallet template app get a btc address (eg bcrt1q3vgghneq079f8hm7h50dwlvrehtsk8c2676j7n) and send a tx of 5 btc to it using bitcoin core regtest
  • Check wallet template app shows an updated balance.
  • generate 6 new blocks on bitcoin core so the tx is fully confirmed.
  • On wallet template app, click "settings" and backup seed words (eg "steak skin check keen air proud jungle glide lumber identify mean rain")
  • Stop wallettemplate.Main and delete chain and wallet files.
  • Restart wallettemplate.Main
  • Click settings, paste the saved seed words and click "restore from words".

Expected:
balance updated to 5 btc

What happens:
Balance is 0 btc and label "Synchronizing with the bitcoin network" is there forever.

I am running on mac, bitcoin core 0.17.0.1
Latest bitcoinj from master commit 497f716

bitcoinj log:

/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56834,suspend=y,server=n -javaagent:/Users/oscar/Library/Caches/IdeaIC2018.3/groovyHotSwap/gragent.jar -javaagent:/Users/oscar/Library/Caches/IdeaIC2018.3/captureAgent/debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/tools.jar:/Users/oscar/codigo/bitcoinj_gradle/wallettemplate/out/production/classes:/Users/oscar/codigo/bitcoinj_gradle/wallettemplate/out/production/resources:/Users/oscar/codigo/bitcoinj_gradle/core/out/production/classes:/Users/oscar/codigo/bitcoinj_gradle/core/out/production/resources:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/27.0.1-android/b7e1c37f66ef193796ccd7ea6e80c2b05426182d/guava-27.0.1-android.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/org.fxmisc.easybind/easybind/1.0.2/914d20ccacf1f234cf2946a2f0770d3ae980cd91/easybind-1.0.2.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/de.jensd/fontawesomefx/8.0.0/b42d82b8889fb77858d1f17e69dbdc24beb2ad25/fontawesomefx-8.0.0.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/net.glxn/qrgen/1.3/e581726a5bffa3a5d624506ae145acbac3cc4a17/qrgen-1.3.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-jdk14/1.7.25/bccda40ebc8067491b32a88f49615a747d20082d/slf4j-jdk14-1.7.25.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.60/bd47ad3bd14b8e82595c7adaa143501e60842a84/bcprov-jdk15on-1.60.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.6.1/d06d46ecfd92ec6d0f3b423b4cd81cb38d8b924/protobuf-java-3.6.1.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/b421526c5f297295adef1c886e5246c39d4ac629/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.lambdaworks/scrypt/1.4.0/906506b74f30c8c20bccd9ed4a11112d8941fe87/scrypt-1.4.0.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-compat-qual/2.5.2/dc0b20906c9e4b9724af29d11604efa574066892/checker-compat-qual-2.5.2.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.12.1/dc6d02e4e68514eff5631963e28ca7742ac69efe/okhttp-3.12.1.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.2.0/88e3c593e9b3586e1c6177f89267da6fc6986f0c/error_prone_annotations-2.2.0.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.1/976d8d30bebc251db406f2bdb3eb01962b5685b3/j2objc-annotations-1.1.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/net.jcip/jcip-annotations/1.0/afba4942caaeaf46aab0b976afd57cc7c181467e/jcip-annotations-1.0.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/org.codehaus.mojo/animal-sniffer-annotations/1.17/f97ce6decaea32b36101e37979f8b647f00681fb/animal-sniffer-annotations-1.17.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.zxing/javase/2.0/d6384ed133a5d2ae38b9cdece13a56564f91066e/javase-2.0.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/da76ca59f6a57ee3102f8f9bd9cee742973efa8a/slf4j-api-1.7.25.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.google.zxing/core/2.0/1a5b8ccf93ca2fb7c40a94417f8485e3c8b4a6/core-2.0.jar:/Users/oscar/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.15.0/bc28b5a964c8f5721eb58ee3f3c47a9bcbf4f4d8/okio-1.15.0.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" wallettemplate.Main
Connected to the target VM, address: '127.0.0.1:56834', transport: 'socket'
18:16:26 15 Context.: Creating bitcoinj 0.15-SNAPSHOT context.
18:16:26 22 WalletSetPasswordController.lambda$estimateKeyDerivationTimeMsec$1: Doing background test key derivation
18:16:26 23 WalletAppKit.startUp: Starting up with directory = .
18:16:27 23 MnemonicCode.toSeed: PBKDF2 took 672.1 ms
18:16:27 22 KeyCrypterScrypt.deriveKey: Deriving key took 881.8 ms for 32768 scrypt iterations.
18:16:27 22 WalletSetPasswordController.lambda$estimateKeyDerivationTimeMsec$1: Background test key derivation took 887msec
18:16:27 23 DeterministicKeyChain.maybeLookAhead: 1 keys needed for M/1H/0 = 1 issued + 0 lookahead size + 0 lookahead threshold - 0 num children
18:16:27 23 DeterministicKeyChain.maybeLookAhead: Took 5.318 ms
18:16:27 23 DeterministicKeyChain.maybeLookAhead: 133 keys needed for M/0H/0 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children
18:16:28 23 DeterministicKeyChain.maybeLookAhead: Took 120.9 ms
18:16:28 23 DeterministicKeyChain.maybeLookAhead: 133 keys needed for M/0H/1 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children
18:16:28 23 DeterministicKeyChain.maybeLookAhead: Took 94.73 ms
18:16:28 23 DeterministicKeyChain.maybeLookAhead: 133 keys needed for M/1H/0 = 1 issued + 100 lookahead size + 33 lookahead threshold - 1 num children
18:16:28 23 DeterministicKeyChain.maybeLookAhead: Took 66.93 ms
18:16:28 23 DeterministicKeyChain.maybeLookAhead: 133 keys needed for M/1H/1 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children
18:16:28 23 DeterministicKeyChain.maybeLookAhead: Took 69.64 ms
18:16:28 23 SPVBlockStore.: Creating new SPV block chain file ./WalletTemplate-regtest.spvchain
18:16:40 23 AbstractBlockChain.: chain head is at height 0:
block:
hash: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
version: 1
previous block: 0000000000000000000000000000000000000000000000000000000000000000
merkle root: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
time: 1296688602 (2011-02-02T23:16:42Z)
difficulty target (nBits): 545259519
nonce: 2

18:16:44 23 AbstractBlockChain.addWallet: Wallet/chain height mismatch: -1 vs 0
18:16:44 23 AbstractBlockChain.addWallet: Hashes: null vs 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
18:16:44 24 PeerGroup$8.run: Starting ...
18:16:44 24 PeerGroup$6.go: Localhost peer detected, trying to use it instead of P2P discovery
18:16:44 24 PeerGroup.connectTo: Attempting connection to [127.0.0.1]:18444 (0 connected, 1 pending, 0 max)
18:16:44 25 NioClientManager.handleKey: Connected to localhost/127.0.0.1:18444
18:16:44 25 Peer.connectionOpened: Announcing to localhost/127.0.0.1:18444 as: /bitcoinj:0.15-SNAPSHOT/WalletTemplate:1.0/
18:16:44 25 Peer.processVersionMessage: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:16:44, height=1143}
18:16:44 25 PeerGroup.handleNewPeer: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:16:44, height=1143}: New peer (1 connected, 0 pending, 1 max)
18:16:44 25 PeerGroup.setDownloadPeer: Setting download peer: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:16:44, height=1143}
18:16:44 25 DownloadProgressTracker.startDownload: Downloading block chain of size 1143. This may take a while.
18:16:44 25 Secp256k1Context.: java.lang.UnsatisfiedLinkError: no secp256k1 in java.library.path
18:16:44 25 Peer.processMessage: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:16:44, height=1143}: Received unhandled message: org.bitcoinj.core.SendHeadersMessage@320c51e7
18:16:44 25 DownloadProgressTracker.progress: Chain download 1% done with 1131 blocks to go, block date 2018-12-15T20:14:00Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 2% done with 1120 blocks to go, block date 2018-12-15T20:14:02Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 3% done with 1108 blocks to go, block date 2018-12-15T20:14:04Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 4% done with 1097 blocks to go, block date 2018-12-15T20:14:06Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 5% done with 1085 blocks to go, block date 2018-12-15T20:14:08Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 6% done with 1074 blocks to go, block date 2018-12-15T20:14:10Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 7% done with 1062 blocks to go, block date 2018-12-15T20:14:12Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 8% done with 1051 blocks to go, block date 2018-12-15T20:14:14Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 9% done with 1040 blocks to go, block date 2018-12-21T17:16:46Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 10% done with 1028 blocks to go, block date 2018-12-21T17:38:40Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 11% done with 1017 blocks to go, block date 2019-02-04T15:17:53Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 12% done with 1005 blocks to go, block date 2019-02-04T15:20:07Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 13% done with 994 blocks to go, block date 2019-02-08T18:21:00Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 14% done with 982 blocks to go, block date 2019-02-08T18:21:02Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 15% done with 971 blocks to go, block date 2019-02-08T18:21:04Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 16% done with 960 blocks to go, block date 2019-02-08T18:21:06Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 17% done with 948 blocks to go, block date 2019-02-08T18:21:08Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 18% done with 937 blocks to go, block date 2019-02-08T18:21:09Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 19% done with 925 blocks to go, block date 2019-02-08T18:21:11Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 20% done with 914 blocks to go, block date 2019-02-08T18:21:13Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 21% done with 902 blocks to go, block date 2019-02-08T18:21:15Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 22% done with 891 blocks to go, block date 2019-02-08T18:21:17Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 23% done with 880 blocks to go, block date 2019-02-08T18:21:19Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 24% done with 868 blocks to go, block date 2019-02-08T18:21:21Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 25% done with 857 blocks to go, block date 2019-02-08T18:21:23Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 26% done with 845 blocks to go, block date 2019-02-08T18:21:25Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 27% done with 834 blocks to go, block date 2019-02-08T18:21:27Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 28% done with 822 blocks to go, block date 2019-02-08T18:21:29Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 29% done with 811 blocks to go, block date 2019-02-08T18:21:30Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 30% done with 800 blocks to go, block date 2019-02-08T18:21:32Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 31% done with 788 blocks to go, block date 2019-02-08T18:21:34Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 32% done with 777 blocks to go, block date 2019-02-08T18:21:36Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 33% done with 765 blocks to go, block date 2019-02-08T18:21:38Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 34% done with 754 blocks to go, block date 2019-02-08T18:21:40Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 35% done with 742 blocks to go, block date 2019-02-08T18:21:42Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 36% done with 731 blocks to go, block date 2019-02-08T18:21:44Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 37% done with 720 blocks to go, block date 2019-02-08T18:21:46Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 38% done with 708 blocks to go, block date 2019-02-08T18:21:48Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 39% done with 697 blocks to go, block date 2019-02-08T18:21:49Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 40% done with 685 blocks to go, block date 2019-02-08T18:21:51Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 41% done with 674 blocks to go, block date 2019-02-08T18:21:53Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 42% done with 662 blocks to go, block date 2019-02-08T18:21:55Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 43% done with 651 blocks to go, block date 2019-02-08T18:21:57Z
18:16:44 25 DownloadProgressTracker.progress: Chain download 44% done with 640 blocks to go, block date 2019-02-08T18:21:59Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 45% done with 628 blocks to go, block date 2019-02-08T18:22:01Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 46% done with 617 blocks to go, block date 2019-02-08T18:22:03Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 47% done with 605 blocks to go, block date 2019-02-08T18:22:05Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 48% done with 594 blocks to go, block date 2019-02-08T18:22:07Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 49% done with 582 blocks to go, block date 2019-02-08T18:22:09Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 50% done with 571 blocks to go, block date 2019-02-08T18:22:10Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 51% done with 560 blocks to go, block date 2019-02-08T18:22:12Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 52% done with 548 blocks to go, block date 2019-02-08T18:22:14Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 53% done with 537 blocks to go, block date 2019-02-08T18:22:16Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 54% done with 525 blocks to go, block date 2019-02-08T18:22:18Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 55% done with 514 blocks to go, block date 2019-02-08T18:22:20Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 56% done with 502 blocks to go, block date 2019-02-08T18:22:22Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 57% done with 491 blocks to go, block date 2019-02-08T18:22:24Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 58% done with 480 blocks to go, block date 2019-02-08T18:22:26Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 59% done with 468 blocks to go, block date 2019-02-08T18:22:28Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 60% done with 457 blocks to go, block date 2019-02-08T18:22:29Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 61% done with 445 blocks to go, block date 2019-02-08T18:22:31Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 62% done with 434 blocks to go, block date 2019-02-08T18:22:33Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 63% done with 422 blocks to go, block date 2019-02-08T18:22:35Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 64% done with 411 blocks to go, block date 2019-02-08T18:22:37Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 65% done with 400 blocks to go, block date 2019-02-08T18:22:39Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 66% done with 388 blocks to go, block date 2019-02-08T18:22:41Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 67% done with 377 blocks to go, block date 2019-02-08T18:22:43Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 68% done with 365 blocks to go, block date 2019-02-08T18:22:45Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 69% done with 354 blocks to go, block date 2019-02-08T18:22:47Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 70% done with 342 blocks to go, block date 2019-02-08T18:22:49Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 71% done with 331 blocks to go, block date 2019-02-08T18:22:50Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 72% done with 320 blocks to go, block date 2019-02-08T18:22:52Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 73% done with 308 blocks to go, block date 2019-02-08T18:22:54Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 74% done with 297 blocks to go, block date 2019-02-08T18:22:56Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 75% done with 285 blocks to go, block date 2019-02-08T18:22:58Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 76% done with 274 blocks to go, block date 2019-02-08T18:23:00Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 77% done with 262 blocks to go, block date 2019-02-08T18:23:02Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 78% done with 251 blocks to go, block date 2019-02-08T18:23:04Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 79% done with 240 blocks to go, block date 2019-02-08T18:23:06Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 80% done with 228 blocks to go, block date 2019-02-08T18:23:08Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 81% done with 217 blocks to go, block date 2019-02-08T18:23:09Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 82% done with 205 blocks to go, block date 2019-02-08T18:23:11Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 83% done with 194 blocks to go, block date 2019-02-08T18:23:13Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 84% done with 182 blocks to go, block date 2019-02-08T18:23:15Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 85% done with 171 blocks to go, block date 2019-02-08T18:23:17Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 86% done with 160 blocks to go, block date 2019-02-08T18:23:19Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 87% done with 148 blocks to go, block date 2019-02-08T18:23:21Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 88% done with 137 blocks to go, block date 2019-02-08T18:23:23Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 89% done with 125 blocks to go, block date 2019-02-08T18:23:25Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 90% done with 114 blocks to go, block date 2019-02-08T18:23:27Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 91% done with 102 blocks to go, block date 2019-02-08T18:23:29Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 92% done with 91 blocks to go, block date 2019-02-08T18:23:30Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 93% done with 80 blocks to go, block date 2019-02-08T18:23:32Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 94% done with 68 blocks to go, block date 2019-02-08T18:23:34Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 95% done with 57 blocks to go, block date 2019-02-08T18:23:36Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 96% done with 45 blocks to go, block date 2019-02-08T18:23:38Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 97% done with 34 blocks to go, block date 2019-02-08T18:23:40Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 98% done with 22 blocks to go, block date 2019-02-08T18:23:42Z
18:16:45 25 DownloadProgressTracker.progress: Chain download 99% done with 11 blocks to go, block date 2019-02-08T18:23:44Z
18:16:45 25 Peer.processHeaders: Passed the fast catchup time (2019-02-11T21:16:26Z) at height 1142, discarding 2 headers and requesting full blocks
18:16:45 24 PeerGroup$ChainDownloadSpeedCalculator.calculate: 1141 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, last 89.14 kilobytes per sec
18:16:50 27 WalletFiles$1.call: Background saving wallet; last seen block is height 1141, date 2019-02-11T14:15:37Z, hash 5aa4cd20a1bb178357066c363b442df3d42b28e0384d41a25b62e7e807fde570
18:16:50 27 WalletFiles.saveNowInternal: Save completed in 74.09 ms
18:16:50 25 DownloadProgressTracker.progress: Chain download 100% done with 0 blocks to go, block date 2019-02-15T20:10:39Z
18:16:55 27 WalletFiles$1.call: Background saving wallet; last seen block is height 1143, date 2019-02-15T20:10:39Z, hash 55db868dacb4d15a337ef50610c441e36d13d96c895700fe462c206c21213820
18:16:55 27 WalletFiles.saveNowInternal: Save completed in 24.23 ms
18:17:12 15 WalletSettingsController.restoreClicked: Attempting wallet restore using seed 'novel feed salmon permit charge pet virtual control company method print kitchen' from date 2019-02-10
18:17:14 15 MnemonicCode.toSeed: PBKDF2 took 36.65 ms
18:17:14 28 PeerGroup.stop: Awaiting PeerGroup shutdown ...
18:17:14 24 PeerGroup$9.run: Stopping ...
18:17:14 24 PeerGroup.setDownloadPeer: Unsetting download peer: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:16:44, height=1143}
18:17:14 24 PeerGroup$9.run: Stopped, took 10.08 ms.
18:17:14 28 PeerGroup.stop: ... took 16.80 ms
18:17:14 15 Context.: Creating bitcoinj 0.15-SNAPSHOT context.
18:17:14 29 WalletAppKit.startUp: Starting up with directory = .
18:17:36 29 WalletAppKit.startUp: Deleting the chain file in preparation from restore.
18:17:39 29 SPVBlockStore.: Creating new SPV block chain file ./WalletTemplate-regtest.spvchain
18:17:41 29 AbstractBlockChain.: chain head is at height 0:
block:
hash: 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
version: 1
previous block: 0000000000000000000000000000000000000000000000000000000000000000
merkle root: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
time: 1296688602 (2011-02-02T23:16:42Z)
difficulty target (nBits): 545259519
nonce: 2

18:17:51 29 AbstractBlockChain.addWallet: Wallet/chain height mismatch: -1 vs 0
18:17:51 29 AbstractBlockChain.addWallet: Hashes: null vs 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
18:18:00 30 PeerGroup$8.run: Starting ...
18:18:00 30 PeerGroup$6.go: Localhost peer detected, trying to use it instead of P2P discovery
18:18:00 30 PeerGroup.connectTo: Attempting connection to [127.0.0.1]:18444 (0 connected, 1 pending, 0 max)
18:18:00 31 NioClientManager.handleKey: Connected to localhost/127.0.0.1:18444
18:18:00 31 Peer.connectionOpened: Announcing to localhost/127.0.0.1:18444 as: /bitcoinj:0.15-SNAPSHOT/WalletTemplate:1.0/
18:18:00 31 Peer.processVersionMessage: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:18:00, height=1143}
18:18:00 31 PeerGroup.handleNewPeer: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:18:00, height=1143}: New peer (1 connected, 0 pending, 1 max)
18:18:00 31 PeerGroup.setDownloadPeer: Setting download peer: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:18:00, height=1143}
18:18:00 31 DownloadProgressTracker.onChainDownloadStarted: Chain download switched to Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:18:00, height=1143}
18:18:00 31 Peer.processMessage: Peer{[127.0.0.1]:18444, version=70015, subVer=/Satoshi:0.17.0.1/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2019-02-18 18:18:00, height=1143}: Received unhandled message: org.bitcoinj.core.SendHeadersMessage@361e0120
18:18:01 31 Peer.processHeaders: Passed the fast catchup time (2019-02-11T21:16:26Z) at height 1142, discarding 2 headers and requesting full blocks
18:18:05 30 PeerGroup$ChainDownloadSpeedCalculator.calculate: 1141 blocks/sec, 0 tx/sec, 0 pre-filtered tx/sec, last 89.14 kilobytes per sec
18:18:05 32 WalletFiles$1.call: Background saving wallet; last seen block is height 1143, date 2019-02-15T20:10:39Z, hash 55db868dacb4d15a337ef50610c441e36d13d96c895700fe462c206c21213820
18:18:05 32 WalletFiles.saveNowInternal: Save completed in 8.754 ms

@oscarguindzberg
Copy link
Contributor Author

Testnet log
https://pastebin.com/3y4QYN7J

@schildbach
Copy link
Member

Have you tried restoring the seed with wallet-tool?

@schildbach
Copy link
Member

Ok, I think I can reproduce this issue in wallet-tool. I think it has to do with pre-population of addresses after a wallet was created. I'm working on it.

@schildbach schildbach added this to the 0.15 milestone Feb 19, 2019
@schildbach
Copy link
Member

schildbach commented Feb 19, 2019 via email

@schildbach
Copy link
Member

@oscarguindzberg Ping? Is this fixed for you?

@oscarguindzberg
Copy link
Contributor Author

Sorry for the late response.
I could not review your comments in detail yet.
I will look at this as soon as I have some spare time.

@oscarguindzberg
Copy link
Contributor Author

oscarguindzberg commented Mar 7, 2019

I tried again on regtest.

After restore from seed, balance is updated to the right value but label "Synchronizing with the bitcoin network" is there forever. If I restart the app, the balance is still ok and the "Synchronizing..." label is not shown.

@schildbach
Copy link
Member

I suspect this is regtest specific then. On testnet, I could not see this behaviour.

I assume it might be related to Regtest being connected to only one node. In this case, the height of the chain might be unclear. (It is determined from an average of all connected peers.)

@oscarguindzberg
Copy link
Contributor Author

I can reproduce the bug on testnet too.

Chain sync seems to complete, but "Synchronizing with the bitcoin network" label is still there.

Latest few lines of log when restoring from seed on testnet:

16:38:13 35 PeerGroup$ChainDownloadSpeedCalculator.calculate: 114 blocks/sec, 0 tx/sec, 11844 pre-filtered tx/sec, avg/last 15.36/8.91 kilobytes per sec, chain/common height 1483663/1484082, not stalled (threshold <0.78 KB/sec for 10 seconds)
16:38:14 35 PeerGroup$ChainDownloadSpeedCalculator.calculate: 141 blocks/sec, 0 tx/sec, 12217 pre-filtered tx/sec, avg/last 14.69/11.02 kilobytes per sec, chain/common height 1483804/1484082, not stalled (threshold <0.78 KB/sec for 10 seconds)
16:38:15 35 PeerGroup$ChainDownloadSpeedCalculator.calculate: 100 blocks/sec, 0 tx/sec, 9845 pre-filtered tx/sec, avg/last 13.84/7.81 kilobytes per sec, chain/common height 1483904/1484082, not stalled (threshold <0.78 KB/sec for 10 seconds)
16:38:16 35 PeerGroup$ChainDownloadSpeedCalculator.calculate: 121 blocks/sec, 0 tx/sec, 7266 pre-filtered tx/sec, avg/last 13.74/9.45 kilobytes per sec, chain/common height 1484025/1484082, not stalled (threshold <0.78 KB/sec for 10 seconds)
16:38:17 36 AbstractBlockChain.tryConnectingOrphans: Connected orphan 00000000000000004c9030b0470f42553102034af8e80e76a624873d6d6ab449
16:38:17 36 AbstractBlockChain.tryConnectingOrphans: Connected 1 orphan blocks.
16:38:17 35 PeerGroup$ChainDownloadSpeedCalculator.calculate: End of sync detected.
16:38:18 42 WalletFiles$1.call: Background saving wallet; last seen block is height 1484082, date 2019-03-09T19:26:47Z, hash 00000000000000004c9030b0470f42553102034af8e80e76a624873d6d6ab449
16:38:18 42 WalletFiles.saveNowInternal: Save completed in 5.625 ms

@msgilligan
Copy link
Member

I think I saw this (on Testnet) yesterday. I'll keep an eye out for it and see if I can fix it.

@schildbach
Copy link
Member

The "Synchronizing with the bitcoin network" label not disappearing is another issue. Strictly speaking, network download is never finished, since new blocks are appended continuously. Thus, it is kind of hard to detect an "end".

Anyway, if I understand Oscars comment right then the restore from seed has succeeded. The remaining issue is a UI issue. So I would like to close this issue.

@oscarguindzberg
Copy link
Contributor Author

ok for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants