mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 22:45:21 +01:00
v0.4.2, new seednodes
This commit is contained in:
parent
b97506cf51
commit
c02f6481b2
19 changed files with 77 additions and 32 deletions
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class Version {
|
|||
private static final Logger log = LoggerFactory.getLogger(Version.class);
|
||||
|
||||
// The application versions
|
||||
public static final String VERSION = "0.4.1";
|
||||
public static final String VERSION = "0.4.2";
|
||||
|
||||
// The version nr. for the objects sent over the network. A change will break the serialization of old objects.
|
||||
// If objects are used for both network and database the network version is applied.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>core</artifactId>
|
||||
|
|
|
@ -31,6 +31,7 @@ import io.bitsquare.common.handlers.ErrorMessageHandler;
|
|||
import io.bitsquare.common.handlers.ExceptionHandler;
|
||||
import io.bitsquare.common.handlers.ResultHandler;
|
||||
import io.bitsquare.storage.FileUtil;
|
||||
import io.bitsquare.storage.Storage;
|
||||
import io.bitsquare.user.Preferences;
|
||||
import javafx.beans.property.*;
|
||||
import org.bitcoinj.core.*;
|
||||
|
@ -95,6 +96,8 @@ public class WalletService {
|
|||
private final IntegerProperty numPeers = new SimpleIntegerProperty(0);
|
||||
private final ObjectProperty<List<Peer>> connectedPeers = new SimpleObjectProperty<>();
|
||||
public final BooleanProperty shutDownDone = new SimpleBooleanProperty();
|
||||
private final Storage<Long> storage;
|
||||
private final Long bloomFilterTweak;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -103,14 +106,23 @@ public class WalletService {
|
|||
|
||||
@Inject
|
||||
public WalletService(RegTestHost regTestHost, TradeWalletService tradeWalletService, AddressEntryList addressEntryList, UserAgent userAgent,
|
||||
@Named(DIR_KEY) File walletDir, Preferences preferences) {
|
||||
@Named(DIR_KEY) File appDir, Preferences preferences) {
|
||||
this.regTestHost = regTestHost;
|
||||
this.tradeWalletService = tradeWalletService;
|
||||
this.addressEntryList = addressEntryList;
|
||||
this.params = preferences.getBitcoinNetwork().getParameters();
|
||||
this.walletDir = new File(walletDir, "bitcoin");
|
||||
this.walletDir = new File(appDir, "bitcoin");
|
||||
this.userAgent = userAgent;
|
||||
useTor = preferences.getUseTorForBitcoinJ();
|
||||
|
||||
storage = new Storage<>(walletDir);
|
||||
Long persisted = storage.initAndGetPersisted("BloomFilterNonce");
|
||||
if (persisted != null) {
|
||||
bloomFilterTweak = persisted;
|
||||
} else {
|
||||
bloomFilterTweak = new Random().nextLong();
|
||||
storage.queueUpForSave(bloomFilterTweak, 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -143,10 +155,6 @@ public class WalletService {
|
|||
if (params != RegTestParams.get())
|
||||
walletAppKit.peerGroup().setMaxConnections(11);
|
||||
|
||||
// https://groups.google.com/forum/#!msg/bitcoinj/Ys13qkTwcNg/9qxnhwnkeoIJ
|
||||
// DEFAULT_BLOOM_FILTER_FP_RATE = 0.00001
|
||||
walletAppKit.peerGroup().setBloomFilterFalsePositiveRate(0.00001);
|
||||
|
||||
wallet = walletAppKit.wallet();
|
||||
wallet.addEventListener(walletEventListener);
|
||||
|
||||
|
@ -203,6 +211,37 @@ public class WalletService {
|
|||
}
|
||||
};
|
||||
|
||||
// Bloom filters in BitcoinJ are completely broken
|
||||
// See: https://jonasnick.github.io/blog/2015/02/12/privacy-in-bitcoinj/
|
||||
|
||||
// FalsePositiveRate of 0.5% leads to a probability of 0.0071 with 56 million pubkeys in the block chain and
|
||||
// 200 keys.
|
||||
// See: https://www.reddit.com/r/Bitcoin/comments/2vrx6n/privacy_in_bitcoinj_android_wallet_multibit_hive/coknjuz
|
||||
// We use 1000 keys so we get an even better value.
|
||||
// walletAppKit.setBloomFilterFalsePositiveRate(0.005);
|
||||
// walletAppKit.setBloomFilterFalsePositiveRate(0.00001); //0.00001;
|
||||
// Nr of false positives (56M keys in the blockchain): 0.005 * 56 000 000 = 280 000
|
||||
// 0,00001 * 56 000 000 = 28 000 = 560
|
||||
// 0,0001 * 56 000 000 = 28 000 = 5600
|
||||
// 0,001 * 56 000 000 = 28 000 = 56 000
|
||||
// 1333 / 5600 = 0.23 -> 23 % probability that pub key is in our wallet
|
||||
// With higher fp rate values it fails to download the svp chain - seems it triggers Bitcoins DDoS protection ?
|
||||
walletAppKit.setBloomFilterFalsePositiveRate(0.0001); // default is 0,00001;
|
||||
|
||||
// Default only 266 keys are generated (2 * 100+33). That would trigger new bloom filters when we are reaching
|
||||
// a third under the limit (66). To avoid that we create much more keys which are unlikely to hit the
|
||||
// new filter creation for most users. With 500 we get 1333 keys which should be enough for most users to
|
||||
// never need to re-create a bloom filter
|
||||
walletAppKit.setLookaheadSize(500);
|
||||
|
||||
// Bitsquare's BitcoinJ fork has added setBloomFilterTweak setter to reuse the same seed avoiding the trivial vulnerability
|
||||
// by getting the real pub keys by intersections of several filters sent at each startup.
|
||||
walletAppKit.setBloomFilterTweak(bloomFilterTweak);
|
||||
|
||||
// Avoid weakening probability by square root due to the default implementation using both pubkey and hash of pubkey
|
||||
// See: https://jonasnick.github.io/blog/2015/02/12/privacy-in-bitcoinj/
|
||||
walletAppKit.setInsertPubKey(false);
|
||||
|
||||
// TODO Get bitcoinj running over our tor proxy. BlockingClientManager need to be used to use the socket
|
||||
// from jtorproxy. To get supported it via nio / netty will be harder
|
||||
if (useTor && params.getId().equals(NetworkParameters.ID_MAINNET))
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -43,6 +43,6 @@
|
|||
|
||||
<logger name="com.msopentech.thali.toronionproxy.OnionProxyManagerEventHandler" level="INFO"/>
|
||||
<logger name="org.bitcoinj" level="INFO"/>
|
||||
<logger name="org.bitcoinj.core.Peer" level="WARN"/>
|
||||
<!-- <logger name="org.bitcoinj.core.Peer" level="TRACE"/>-->
|
||||
|
||||
</configuration>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
@ -26,10 +26,15 @@ public class SeedNodesRepository {
|
|||
new NodeAddress("3efgjjbdvhbvck3x.onion:8000"),
|
||||
new NodeAddress("3unfcshgwipxhxfm.onion:8000"),*/
|
||||
|
||||
// v0.4.0
|
||||
new NodeAddress("ybmi4iaesugslxrw.onion:8000"),
|
||||
// v0.4.0, v0.4.1
|
||||
/* new NodeAddress("ybmi4iaesugslxrw.onion:8000"),
|
||||
new NodeAddress("ufwnvo775jfnjeux.onion:8000"),
|
||||
new NodeAddress("b66vnevaljo6xt5a.onion:8000"),
|
||||
new NodeAddress("b66vnevaljo6xt5a.onion:8000"),*/
|
||||
|
||||
// v0.4.2
|
||||
new NodeAddress("tyng4uwrmynumrlr.onion:8000"),
|
||||
new NodeAddress("45tr2h3hte27tnx3.onion:8000"),
|
||||
new NodeAddress("j5fjv3elo372agzo.onion:8000"),
|
||||
|
||||
// testnet
|
||||
new NodeAddress("znmy44wcstn2rkva.onion:8001"),
|
||||
|
@ -39,7 +44,7 @@ public class SeedNodesRepository {
|
|||
// 1. Run a seed node with prog args: rxdkppp3vicnbgqt.onion:8002 2 50
|
||||
// 2. Find your local onion address in Bitsquare_seed_node_rxdkppp3vicnbgqt.onion_8002/tor/hiddenservice/hostname
|
||||
// 3. Shut down the seed node
|
||||
// 4. Rename the directory with your local onion address
|
||||
// 4. Rename the directory with your local onion address
|
||||
// 5. Edit here your found onion address (new NodeAddress("YOUR_ONION.onion:8002")
|
||||
new NodeAddress("rxdkppp3vicnbgqt.onion:8002"),
|
||||
new NodeAddress("brmbf6mf67d2hlm4.onion:8002"),
|
||||
|
|
|
@ -6,7 +6,7 @@ mkdir -p gui/deploy
|
|||
set -e
|
||||
|
||||
# Edit versions
|
||||
fullVersion=0.4.1
|
||||
fullVersion=0.4.2
|
||||
jarFile="/home/bitsquare/Desktop/sf_vm_shared_ubuntu14_32bit/Bitsquare-$fullVersion.jar"
|
||||
|
||||
# Note: fakeroot needs to be installed on linux
|
||||
|
|
|
@ -6,7 +6,7 @@ mkdir -p gui/deploy
|
|||
set -e
|
||||
|
||||
# Edit versions
|
||||
fullVersion=0.4.1
|
||||
fullVersion=0.4.2
|
||||
jarFile="/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-$fullVersion.jar"
|
||||
|
||||
# Note: fakeroot needs to be installed on linux
|
||||
|
@ -33,6 +33,7 @@ rm gui/deploy/Bitsquare.jnlp
|
|||
rm gui/deploy/LICENSE
|
||||
mv "gui/deploy/bundles/bitsquare-$fullVersion.deb" "gui/deploy/Bitsquare-$fullVersion.deb"
|
||||
rmdir gui/deploy/bundles
|
||||
cp "gui/deploy/Bitsquare-$fullVersion.deb" "/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-$fullVersion.deb"
|
||||
cp "gui/deploy/Bitsquare-$fullVersion.deb" "/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-64bit-$fullVersion.deb"
|
||||
cp "gui/deploy/Bitsquare-32bit-$fullVersion.deb" "/home/mk/Desktop/Bitsquare-64bit-$fullVersion.deb"
|
||||
|
||||
cd package/linux
|
|
@ -5,7 +5,7 @@ mkdir -p gui/deploy
|
|||
|
||||
set -e
|
||||
|
||||
fullVersion="0.4.1"
|
||||
fullVersion="0.4.2"
|
||||
|
||||
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
[Setup]
|
||||
AppId={{bitsquare}}
|
||||
AppName=Bitsquare
|
||||
AppVersion=0.4.1
|
||||
AppVersion=0.4.2
|
||||
AppVerName=Bitsquare
|
||||
AppPublisher=Bitsquare
|
||||
AppComments=Bitsquare
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
cd ..\..\
|
||||
mkdir gui\deploy
|
||||
|
||||
:: edit iss file -> AppVersion=0.4.1
|
||||
:: edit iss file -> AppVersion=0.4.2
|
||||
|
||||
:: Copy gui/deploy.Bitsquare.jar file from mac build to windows
|
||||
:: edit -> -BappVersion=0.4.1 and -srcfiles
|
||||
:: edit -> -BappVersion=0.4.2 and -srcfiles
|
||||
|
||||
:: 32 bit build
|
||||
:: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php)
|
||||
call "C:\Program Files\Java\jdk1.8.0_77\bin\javapackager.exe" -deploy -BappVersion=0.4.1 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.1.jar" -outfile Bitsquare-32bit -Bruntime="C:\Program Files\Java\jdk1.8.0_77\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true
|
||||
call "C:\Program Files\Java\jdk1.8.0_77\bin\javapackager.exe" -deploy -BappVersion=0.4.2 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.2.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_77\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true
|
||||
|
||||
cd package\windows
|
|
@ -1,13 +1,13 @@
|
|||
cd ..\..\
|
||||
mkdir gui\deploy
|
||||
|
||||
:: edit iss file -> AppVersion=0.4.1
|
||||
:: edit iss file -> AppVersion=0.4.2
|
||||
|
||||
:: Copy gui/deploy.Bitsquare.jar file from mac build to windows
|
||||
:: edit -> -BappVersion=0.4.1 and -srcfiles
|
||||
:: edit -> -BappVersion=0.4.2 and -srcfiles
|
||||
|
||||
:: 64 bit build
|
||||
:: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php)
|
||||
call "C:\Program Files\Java\jdk1.8.0_66\bin\javapackager.exe" -deploy -BappVersion=0.4.1 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.1.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_66\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true
|
||||
call "C:\Program Files\Java\jdk1.8.0_66\bin\javapackager.exe" -deploy -BappVersion=0.4.2 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.2.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_66\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true
|
||||
|
||||
cd package\windows
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<groupId>io.bitsquare</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
<description>Bitsquare - The decentralized bitcoin exchange</description>
|
||||
<url>https://bitsquare.io</url>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.bitsquare</groupId>
|
||||
<version>0.4.1</version>
|
||||
<version>0.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue