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

WalletAppKit slow TESTNET sync when .spvchain file is removed. #3087

Open
msgilligan opened this issue May 16, 2023 · 2 comments
Open

WalletAppKit slow TESTNET sync when .spvchain file is removed. #3087

msgilligan opened this issue May 16, 2023 · 2 comments

Comments

@msgilligan
Copy link
Member

I am using bitcoinj 0.17-alpha1.

If I remove the .spvchain file for a previously synced wallet and start up WalletAppKit, I get the following log output:

15:59:21.820 [NioClientManager] INFO  o.b.c.l.DownloadProgressTracker - Downloading block chain of size 2322685. This may take a while.
15:59:21.821 [NioClientManager] INFO  org.bitcoinj.core.Peer - Peer{[127.0.0.1]:18333, version=70016, subVer=/Satoshi:23.0.0/, services=1037 (NETWORK, BLOOM, WITNESS, NETWORK_LIMITED), time=2023-05-16T22:59:21Z, height=2433565}: Announced fee filter: 0.00001 BTC/kB
15:59:21.872 [NioClientManager] INFO  org.bitcoinj.core.Peer - Passed the fast catchup time (2013-10-02T00:00:00Z) at height 112391, discarding 490 headers and requesting full blocks
15:59:21.882 [NioClientManager] INFO  org.bitcoinj.core.PeerGroup - [127.0.0.1]:18333 gossiped 1000 addresses, added 16 of them to the inactive pool

I am running the ConsensusJ SPV daemon on the current master branch ConsensusJ/consensusj@ed956ab.

WalletAppKit is constructed as follows:

return new WalletAppKit((BitcoinNetwork) config.network(), ScriptType.P2PKH, KeyChainGroupStructure.BIP43, dataDirectory, filePrefix);

See https://github.com/ConsensusJ/consensusj/blob/master/cj-btc-daemon/src/main/java/org/consensusj/daemon/micronaut/BitcoinFactory.java

and started with:

public void start() {
        log.info("WalletAppKitService.start()");
        kit.setUserAgent(userAgentName, appVersion);
        kit.setBlockingStartup(false);  // `false` means startup is complete when network activity begins
        kit.startAsync();
        kit.awaitRunning();
        signingService = new WalletSigningService(kit.wallet());
  }

See https://github.com/ConsensusJ/consensusj/blob/master/cj-btc-services/src/main/java/org/consensusj/bitcoin/services/WalletAppKitService.java

@schildbach
Copy link
Member

This is testnet I assume. What's your earliest key birthdate? Is it around 2013-10-02? Use wallet-tool to examine your wallet if you aren't sure.

@msgilligan
Copy link
Member Author

This is testnet I assume.

Yes.

What's your earliest key birthdate?

I believe it is 2019, but I'll check.

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

2 participants