Skip to content

Commit

Permalink
Update checkpoint files
Browse files Browse the repository at this point in the history
We used checkpoint files from BitcoinJ 0.14.4 and those caused a very
slow initial download. I tested with the WalletAppKit and different
release version sof BitcoinJ and could reproduce the behaviour there.
WIth v0.14.5 it was much better. But also that caused slow startup in
Bisq. After creating a current checkpoint file and using that the
download is now very fast.

Also added logging for versions of BitcoinJ and libDohJ so that we have
better control which version is used.
  • Loading branch information
ManfredKarrer committed Dec 6, 2018
1 parent 806fcbe commit 9389a8e
Show file tree
Hide file tree
Showing 8 changed files with 1,017 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ configure(subprojects) {
jmockitVersion = '1.42'
joptVersion = '5.0.3'
langVersion = '3.4'
libdohjVersion = 'd4ace7bc'
libdohjVersion = '7be803fa'
lombokVersion = '1.18.2'
mockitoVersion = '2.21.0'
powermockVersion = '2.0.0-beta.5'
Expand Down
12 changes: 7 additions & 5 deletions core/src/main/java/bisq/core/app/WalletAppSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import bisq.core.user.Preferences;
import bisq.core.util.BSFormatter;

import org.libdohj.Version;

import org.bitcoinj.core.VersionMessage;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.store.ChainFileLockedException;

Expand Down Expand Up @@ -86,10 +89,9 @@ void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
@Nullable Runnable showFirstPopupIfResyncSPVRequestedHandler,
Runnable walletPasswordHandler,
Runnable downloadCompleteHandler,
Runnable walletInitializedHandler

) {
log.info("init");
Runnable walletInitializedHandler) {
log.info("Initialize WalletAppSetup with BitcoinJ version {} and LibDohJ version {} with hash of BitcoinJ commit {}",
VersionMessage.BITCOINJ_VERSION, Version.VERSION, Version.BITCOINJ_VERSION);

ObjectProperty<Throwable> walletServiceException = new SimpleObjectProperty<>();
btcInfoBinding = EasyBind.combine(walletsSetup.downloadPercentageProperty(),
Expand All @@ -100,7 +102,7 @@ void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
if (exception == null) {
double percentage = (double) downloadPercentage;
int peers = (int) numPeers;
getBtcSyncProgress().set(percentage);
btcSyncProgress.set(percentage);
if (percentage == 1) {
result = Res.get("mainView.footer.btcInfo",
peers,
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/bisq/core/btc/setup/WalletConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ public Wallet create(NetworkParameters params, KeyChainGroup keyChainGroup, bool
// in the checkpoints file and then download the rest from the network. It makes things much faster.
// Checkpoint files are made using the BuildCheckpoints tool and usually we have to download the
// last months worth or more (takes a few seconds).
path = "/wallet/checkpoints";
path = "/wallet/checkpoints.txt";
} else if (params.equals(TestNet3Params.get())) {
path = "/wallet/checkpoints.testnet";
path = "/wallet/checkpoints.testnet.txt";
}
if (path != null) {
try {
Expand Down
Binary file removed core/src/main/resources/wallet/checkpoints
Binary file not shown.
Binary file removed core/src/main/resources/wallet/checkpoints.testnet
Binary file not shown.
718 changes: 718 additions & 0 deletions core/src/main/resources/wallet/checkpoints.testnet.txt

Large diffs are not rendered by default.

276 changes: 276 additions & 0 deletions core/src/main/resources/wallet/checkpoints.txt

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions gradle/witness/gradle-witness.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

dependencyVerification {
verify = [
'bisq:core:4d0e437026e53968298710acd8bc2e4b1b0e1d37859c69359cf63e073ae02b86',
'bisq:p2p:c36dde32292ca7335ea594e0cf36f8f766cd3689cd3886b095def3ff946ed60b',
'bisq:common:d9fef12428771154ca70d9299a36feb1d855b07242822a96a16f43260af03149',
'org.controlsfx:controlsfx:b98f1c9507c05600f80323674b33d15674926c71b0116f70085b62bdacf1e573',
'org.reactfx:reactfx:81ec8fe545d65661222735711114c2ce427e2187a65f1722e8ac4e4805beeca3',
'net.glxn:qrgen:c85d9d8512d91e8ad11fe56259a7825bd50ce0245447e236cf168d1b17591882',
Expand All @@ -20,28 +23,36 @@ dependencyVerification {
'de.jensd:fontawesomefx-commons:5539bb3335ecb822dbf928546f57766eeb9f1516cc1417a064b5709629612149',
'com.googlecode.jcsv:jcsv:73ca7d715e90c8d2c2635cc284543b038245a34f70790660ed590e157b8714a2',
'com.github.sarxos:webcam-capture:d960b7ea8ec3ddf2df0725ef214c3fccc9699ea7772df37f544e1f8e4fd665f6',
'org.openjfx:javafx-fxml:ef5b10aa0b985e3bece34629bcaf4f462d3a60e1139a83edd116f69c1a36e0e8',
'org.openjfx:javafx-controls:689626346d7b390a46c7acd7741af19f91567110a6611cad50c60d8c611ac59f',
'org.openjfx:javafx-swing:885a5ac37b82913dbfe2ed0742315b6275e8137f19b1135893cae42c4483591b',
'com.jfoenix:jfoenix:4739e37a05e67c3bc9d5b391a1b93717b5a48fa872992616b0964d3f827f8fe6',
'com.github.JesusMcCloud.netlayer:tor.native:f1bf0096f9eb6020645a65d91aa530d15aef97e69cc5a79d7b2405421f74700a',
'com.github.JesusMcCloud.netlayer:tor.external:cfba681398c191a1906d6d023a3be28a8fa9b1f4eee52e966daf7b1ae630414f',
'org.apache.httpcomponents:httpclient:db3d1b6c2d6a5e5ad47577ad61854e2f0e0936199b8e05eb541ed52349263135',
'net.sf.jopt-simple:jopt-simple:6f45c00908265947c39221035250024f2caec9a15c1c8cf553ebeecee289f342',
'org.fxmisc.easybind:easybind:666af296dda6de68751668a62661571b5238ac6f1c07c8a204fc6f902b222aaf',
'bisq:assets:121fd110d20b451203ec3cdfcb23682c9e1a3aa3d1e7f0158c581ad20b865b6c',
'com.fasterxml.jackson.core:jackson-databind:fcf3c2b0c332f5f54604f7e27fa7ee502378a2cc5df6a944bbfae391872c32ff',
'com.fasterxml.jackson.core:jackson-core:39a74610521d7fb9eb3f437bb8739bbf47f6435be12d17bf954c731a0c6352bb',
'com.fasterxml.jackson.core:jackson-annotations:2566b3a6662afa3c6af4f5b25006cb46be2efc68f1b5116291d6998a8cdf7ed3',
'org.openjfx:javafx-graphics:753031848484aceead7d8d326be840b592a8de8e5938baabd477847b769eeef4',
'org.openjfx:javafx-base:2b062455f2792c2fc6406bb62d092593c490336584a74d283f8560b58a8eec07',
'com.google.protobuf:protobuf-java:b5e2d91812d183c9f053ffeebcbcda034d4de6679521940a19064714966c2cd4',
'com.google.code.gson:gson:2d43eb5ea9e133d2ee2405cc14f5ee08951b8361302fdd93494a3a997b508d32',
'com.googlecode.json-simple:json-simple:4e69696892b88b41c55d49ab2fdcc21eead92bf54acc588c0050596c3b75199c',
'org.springframework:spring-core:c451e8417adb2ffb2445636da5e44a2f59307c4100037a1fe387c3fba4f29b52',
'ch.qos.logback:logback-classic:e66efc674e94837344bc5b748ff510c37a44eeff86cbfdbf9e714ef2eb374013',
'com.github.bisq-network.bitcoinj:bitcoinj-core:d148d9577cf96540f7f5367011f7626ff9c9f148f0bf903b541740d480652969',
'org.slf4j:slf4j-api:3a4cd4969015f3beb4b5b4d81dbafc01765fb60b8a439955ca64d8476fef553e',
'ch.qos.logback:logback-core:4cd46fa17d77057b39160058df2f21ebbc2aded51d0edcc25d2c1cecc042a005',
'com.google.code.findbugs:jsr305:c885ce34249682bc0236b4a7d56efcc12048e6135a5baf7a9cde8ad8cda13fcd',
'com.google.guava:guava:36a666e3b71ae7f0f0dca23654b67e086e6c93d192f60ba5dfd5519db6c288c8',
'com.google.inject:guice:9b9df27a5b8c7864112b4137fd92b36c3f1395bfe57be42fedf2f520ead1a93e',
'com.github.JesusMcCloud.netlayer:tor:ac8465b7dda30ea920ec31a6bde42df7e88bee0282e805ce2797628938e3cf0b',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:193ab7813e4d249f2ea4fc1b968fea8c2126bcbeeb5d6127050ce1b93dbaa7c2',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:877b59bbe466b24a88275a71fd06cd97359d2085420f6f1ac1d766afa8116001',
'io.github.microutils:kotlin-logging:4992504fd3c6ecdf9ed10874b9508e758bb908af9e9d7af19a61e9afb6b7e27a',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:877b59bbe466b24a88275a71fd06cd97359d2085420f6f1ac1d766afa8116001',
'org.jetbrains.kotlin:kotlin-stdlib:4ff0fcb97f4983b4aaba12668c24ad21b08460915db1b021d8f1d8bee687f21c',
'org.jetbrains:annotations:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478',
'org.bouncycastle:bcpg-jdk15on:de3355b821fc81dd32e1f3f560d5b3eca1c678fd2400011d0bfc69fb91bcde85',
Expand All @@ -60,7 +71,6 @@ dependencyVerification {
'commons-logging:commons-logging:daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636',
'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'aopalliance:aopalliance:0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08',
'com.github.bisq-network.bitcoinj:bitcoinj-core:15e0f4304dd92259c4e9ff0114cbeab7a79abb51a5817b422ce629d3a0a2d551',
'com.lambdaworks:scrypt:9a82d218099fb14c10c0e86e7eefeebd8c104de920acdc47b8b4b7a686fb73b4',
'com.google.zxing:core:11aae8fd974ab25faa8208be50468eb12349cd239e93e7c797377fa13e381729',
'com.cedricwalter:tor-binary-geoip:fbd7656a262607e5a73016e048d5270cbabcd4639a1795b4b4e762df8877429d',
Expand All @@ -71,6 +81,7 @@ dependencyVerification {
'net.jcip:jcip-annotations:be5805392060c71474bf6c9a67a099471274d30b83eef84bfc4e0889a4f1dcc0',
'org.bitcoinj:orchid:f836325cfa0466a011cb755c9b0fee6368487a2352eb45f4306ad9e4c18de080',
'com.squareup.okhttp:okhttp:b4c943138fcef2bcc9d2006b2250c4aabbedeafc5947ed7c0af7fd103ceb2707',
'org.jetbrains.kotlin:kotlin-stdlib-common:4b161ef619eee0d1a49b1c4f0c4a8e46f4e342573efd8e0106a765f47475fe39',
'com.squareup.okio:okio:114bdc1f47338a68bcbc95abf2f5cdc72beeec91812f2fcd7b521c1937876266',
]
}

0 comments on commit 9389a8e

Please sign in to comment.