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

Upgrade to Tor v3 #271

Merged
merged 3 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ configure(subprojects) {
loggingVersion = '1.2'
lombokVersion = '1.18.12'
mockitoVersion = '3.5.15'
netlayerVersion = '8db4a13' // Commit ID from https://github.com/bisq-network/netlayer/commits/externaltor
netlayerVersion = '0.7.2' // Tag from https://github.com/bisq-network/netlayer/commits/externaltor
protobufVersion = '3.10.0'
protocVersion = protobufVersion
pushyVersion = '0.13.2'
Expand Down
52 changes: 25 additions & 27 deletions core/src/main/java/bisq/core/btc/nodes/BtcNodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,41 +48,37 @@ public List<BtcNode> getProvidedBtcNodes() {
return useProvidedBtcNodes() ?
Arrays.asList(
// emzy
new BtcNode("kirsche.emzy.de", "fz6nsij6jiyuwlsc.onion", "78.47.61.83", BtcNode.DEFAULT_PORT, "@emzy"),
new BtcNode("node2.emzy.de", "c6ac4jdfyeiakex2.onion", "62.171.129.32", BtcNode.DEFAULT_PORT, "@emzy"),
new BtcNode("node1.emzy.de", "sjyzmwwu6diiit3r.onion", "167.86.90.239", BtcNode.DEFAULT_PORT, "@emzy"),
new BtcNode(null, "3xucqntxp5ddoaz5.onion", null, BtcNode.DEFAULT_PORT, "@emzy"), // cannot provide IP because no static IP
new BtcNode("btcnode1.emzy.de", "emzybtc3ewh7zihpkdvuwlgxrhzcxy2p5fvjggp7ngjbxcytxvt4rjid.onion", "167.86.90.239", BtcNode.DEFAULT_PORT, "@emzy"),
new BtcNode("btcnode2.emzy.de", "emzybtc25oddoa2prol2znpz2axnrg6k77xwgirmhv7igoiucddsxiad.onion", "62.171.129.32", BtcNode.DEFAULT_PORT, "@emzy"),
new BtcNode("btcnode3.emzy.de", "emzybtc5bnpb2o6gh54oquiox54o4r7yn4a2wiiwzrjonlouaibm2zid.onion", "136.243.53.40", BtcNode.DEFAULT_PORT, "@emzy"),
new BtcNode("btcnode4.emzy.de", "emzybtc454ewbviqnmgtgx3rgublsgkk23r4onbhidcv36wremue4kqd.onion", "135.181.215.237", BtcNode.DEFAULT_PORT, "@emzy"),

// ripcurlx
new BtcNode("bitcoin.christophatteneder.com", "lgkvbvro67jomosw.onion", "174.138.35.229", BtcNode.DEFAULT_PORT, "@Christoph"),
new BtcNode("bitcoin.christophatteneder.com", "catlnkpdm454ecngktyo4z22m5dlcvfvgzz4nt5l36eeczecrafslkqd.onion", "174.138.35.229", BtcNode.DEFAULT_PORT, "@Christoph"),

// mrosseel
new BtcNode("btc.vante.me", "4jyh6llqj264oggs.onion", "94.23.21.80", BtcNode.DEFAULT_PORT, "@miker"),
new BtcNode("btc2.vante.me", "mxdtrjhe2yfsx3pg.onion", "94.23.205.110", BtcNode.DEFAULT_PORT, "@miker"),
new BtcNode("btc.vante.me", "bsqbtctulf2g4jtjsdfgl2ed7qs6zz5wqx27qnyiik7laockryvszqqd.onion", "94.23.21.80", BtcNode.DEFAULT_PORT, "@miker"),
new BtcNode("btc2.vante.me", "bsqbtcparrfihlwolt4xgjbf4cgqckvrvsfyvy6vhiqrnh4w6ghixoid.onion", "94.23.205.110", BtcNode.DEFAULT_PORT, "@miker"),

// sqrrm
new BtcNode("btc1.sqrrm.net", "3r44ddzjitznyahw.onion", "185.25.48.184", BtcNode.DEFAULT_PORT, "@sqrrm"),
new BtcNode("btc2.sqrrm.net", "i3a5xtzfm4xwtybd.onion", "81.171.22.143", BtcNode.DEFAULT_PORT, "@sqrrm"),
new BtcNode("btc1.sqrrm.net", "jygcc54etaubgdpcvzgbihjaqbc37cstpvum5sjzvka4bibkp4wrgnqd.onion", "185.25.48.184", BtcNode.DEFAULT_PORT, "@sqrrm"),
new BtcNode("btc2.sqrrm.net", "h32haomoe52ljz6qopedsocvotvoj5lm2zmecfhdhawb3flbsf64l2qd.onion", "81.171.22.143", BtcNode.DEFAULT_PORT, "@sqrrm"),

// KanoczTomas
new BtcNode("btc.ispol.sk", "mbm6ffx6j5ygi2ck.onion", "193.58.196.212", BtcNode.DEFAULT_PORT, "@KanoczTomas"),

// Devin Bileck
new BtcNode("btc1.bisq.services", "lva54pnbq2nsmjyr.onion", "172.105.21.216", BtcNode.DEFAULT_PORT, "@devinbileck"),
new BtcNode("btc2.bisq.services", "qxjrxmhyqp5vy5hj.onion", "173.255.240.205", BtcNode.DEFAULT_PORT, "@devinbileck"),
new BtcNode(null, "wubwzaadboxwiffa.onion", null, BtcNode.DEFAULT_PORT, "@devinbileck"),
new BtcNode("btc1.bisq.services", "devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion", "172.105.21.216", BtcNode.DEFAULT_PORT, "@devinbileck"),
new BtcNode("btc2.bisq.services", "devinbtcyk643iruzfpaxw3on2jket7rbjmwygm42dmdyub3ietrbmid.onion", "173.255.240.205", BtcNode.DEFAULT_PORT, "@devinbileck"),
new BtcNode(null, "devinbtcmwkuitvxl3tfi5of4zau46ymeannkjv6fpnylkgf3q5fa3id.onion", null, BtcNode.DEFAULT_PORT, "@devinbileck"),

// m52go
new BtcNode(null, "4nnuyxm5k5tlyjq3.onion", null, BtcNode.DEFAULT_PORT, "@m52go"),

new BtcNode(null, "rss2u4embqa6fzuaiuvpp6szklkdckrcfgv6zer3ngclkzclvstywjyd.onion", null, BtcNode.DEFAULT_PORT, "@m52go"),
// wiz
new BtcNode("node100.hnl.wiz.biz", "m3yqzythryowgedc.onion", "103.99.168.100", BtcNode.DEFAULT_PORT, "@wiz"),
new BtcNode("node140.hnl.wiz.biz", "jiuuuislm7ooesic.onion", "103.99.168.140", BtcNode.DEFAULT_PORT, "@wiz"),
new BtcNode("node210.fmt.wiz.biz", "orsy2v63ecrmdj55.onion", "103.99.170.210", BtcNode.DEFAULT_PORT, "@wiz"),
new BtcNode("node220.fmt.wiz.biz", "z6mbqq7llxlrn4kq.onion", "103.99.170.220", BtcNode.DEFAULT_PORT, "@wiz"),

// Rob Kaandorp
new BtcNode(null, "2pj2o2mrawj7yotg.onion", null, BtcNode.DEFAULT_PORT, "@robkaandorp") // cannot provide IP because no static IP
new BtcNode("node130.hnl.wiz.biz", "wizbit5555bsslwv4ctronnsgk5vh2w2pdx7v7eyuivlyuoteejk7lid.onion", "103.99.168.130", BtcNode.DEFAULT_PORT, "@wiz"),
new BtcNode("node140.hnl.wiz.biz", "jto2jfbsxhb6yvhcrrjddrgbakte6tgsy3c3z3prss64gndgvovvosyd.onion", "103.99.168.140", BtcNode.DEFAULT_PORT, "@wiz"),
new BtcNode("node210.fmt.wiz.biz", "rfqmn3qe36uaptkxhdvi74p4hyrzhir6vhmzb2hqryxodig4gue2zbyd.onion", "103.99.170.210", BtcNode.DEFAULT_PORT, "@wiz"),
new BtcNode("node220.fmt.wiz.biz", "azbpsh4arqlm6442wfimy7qr65bmha2zhgjg7wbaji6vvaug53hur2qd.onion", "103.99.170.220", BtcNode.DEFAULT_PORT, "@wiz")
) :
new ArrayList<>();
}
Expand Down Expand Up @@ -128,12 +124,10 @@ public static BtcNode fromFullAddress(String fullAddress) {
host = parts[0].replace("[", "").replace("]", "");
if (parts.length == 2)
port = Integer.parseInt(parts[1].replace(":", ""));
}
else if (parts[0].contains(":") && !parts[0].contains(".")) {
} else if (parts[0].contains(":") && !parts[0].contains(".")) {
// IPv6 address only; not delimited by square brackets
host = parts[0];
}
else if (parts[0].contains(".")) {
} else if (parts[0].contains(".")) {
// address and an optional port number
// e.g. 127.0.0.1:8333 or abcdef123xyz.onion:9999
parts = fullAddress.split(":");
Expand All @@ -143,11 +137,15 @@ else if (parts[0].contains(".")) {
port = Integer.parseInt(parts[1]);
}

checkArgument(host.length()>0, "BtcNode address format not recognised");
checkArgument(host.length() > 0, "BtcNode address format not recognised");
return host.contains(".onion") ? new BtcNode(null, host, null, port, null) : new BtcNode(null, null, host, port, null);
}

public BtcNode(@Nullable String hostName, @Nullable String onionAddress, @Nullable String address, int port, @Nullable String operator) {
public BtcNode(@Nullable String hostName,
@Nullable String onionAddress,
@Nullable String address,
int port,
@Nullable String operator) {
this.hostName = hostName;
this.onionAddress = onionAddress;
this.address = address;
Expand Down
77 changes: 77 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,24 @@
<sha256 value="3cab07703f2ac8fa233bc7f35a8816b65a9f2b04a1b7f84cb8e147c1b45f5cfa" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="parent" version="0.7.2">
<artifact name="parent-0.7.2.pom">
<sha256 value="b79a930b3bc987f1be5821362792b23bb430eb6645b282ca99f4d53a85ef9a6f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="parent" version="8db4a13">
<artifact name="parent-8db4a13.pom">
<sha256 value="c0460cf420ac504a3b5349bd91f6a4bba3534ab7be43e2639bb081b032e5e602" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="tor" version="0.7.2">
<artifact name="tor-0.7.2.jar">
<sha256 value="48b097d756bf1221a2fe7f9bfd4ec6c505719502997d87cc18d912d4323e59d3" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor-0.7.2.pom">
<sha256 value="6306d89cfdb12bd0b6436390de71cef31879985da10d071a3bdad56bf287bbbb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="tor" version="8db4a13">
<artifact name="tor-8db4a13.jar">
<sha256 value="37198bc56e8fe112f8c80441544a2b9731929dae586bda841a4a926fdc04f457" origin="Generated by Gradle"/>
Expand All @@ -173,6 +186,14 @@
<sha256 value="d1cb5d57710c43642771681d8b1c9039c722fb949bdc5a2022389f5a81501f42" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="tor.external" version="0.7.2">
<artifact name="tor.external-0.7.2.jar">
<sha256 value="45daf9b30f753c49b62cf56226539e824886ce1ff430e03dbef1bddff919cbfc" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor.external-0.7.2.pom">
<sha256 value="605e15f473aa7163c4dfa75b0fa17a96466d24c6e3d7a66925b29aadde98dfb4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="tor.external" version="8db4a13">
<artifact name="tor.external-8db4a13.jar">
<sha256 value="e1d6b8fe73891207701c6b14317be789fd4acd25f7b499425d2471598d9a22ac" origin="Generated by Gradle"/>
Expand All @@ -181,6 +202,14 @@
<sha256 value="11918499210e0c12e9d517596eedb34b897021686cf8a1efd8ea87ae3b7e184d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="tor.native" version="0.7.2">
<artifact name="tor.native-0.7.2.jar">
<sha256 value="ebb37e76fa14461be1ab2750daa3f8e5b78c8ff0d2adb72832ca0d38a1fb8f0d" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor.native-0.7.2.pom">
<sha256 value="021ab6d438023653afee96c0fab1262eed6b7522fce76e114593d55e6d7d9928" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.netlayer" name="tor.native" version="8db4a13">
<artifact name="tor.native-8db4a13.jar">
<sha256 value="aa3edf9c27071fdc2b7d55b00dbc7c6cd5dc9aa9f87aafa4be0805f818a466be" origin="Generated by Gradle"/>
Expand All @@ -189,11 +218,24 @@
<sha256 value="13e497b9fa97fc994e907aaad69ed81c5433380887a8ac7237bc18e8da48683b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary" version="6d1fd95">
<artifact name="tor-binary-6d1fd95.pom">
<sha256 value="ac20fe51c6473ecaa440458c8255294ff2b30cfed45918527742315bb3d74a86" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary" version="b9c6227">
<artifact name="tor-binary-b9c6227.pom">
<sha256 value="f1ef0c2b2a1df585f057b96b62b05e2e7d7953353b64e29ac798810ff2919b42" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-geoip" version="6d1fd95">
<artifact name="tor-binary-geoip-6d1fd95.jar">
<sha256 value="5a55df3a5bed0aa57165e9bae9ecda8b14d5e85b97dd1a266fa77602fbdaec54" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor-binary-geoip-6d1fd95.pom">
<sha256 value="14fbcfc4de8e07b8c5bf7c1e279704905cc98795e7460cf558288ce1eaaf1927" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-geoip" version="b9c6227">
<artifact name="tor-binary-geoip-b9c6227.jar">
<sha256 value="cfefbf2d8591b5dd321ec17a02a3682d21763cf50525fa5496c9ec8968413c4e" origin="Generated by Gradle"/>
Expand All @@ -202,6 +244,14 @@
<sha256 value="197d034216b332fcfaa7111442ac4a23bddc60fb71fefba1c736fe9844c1001b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-linux32" version="6d1fd95">
<artifact name="tor-binary-linux32-6d1fd95.jar">
<sha256 value="fe8b0ddb1c109b453adf9b055e067be04b6ca4cda9d2b33c875b99d2092f0eae" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor-binary-linux32-6d1fd95.pom">
<sha256 value="0ae70e17d9566c88204d02de32c1646d672e78711da97124d23fd397a1da9d13" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-linux32" version="b9c6227">
<artifact name="tor-binary-linux32-b9c6227.jar">
<sha256 value="b82b6595f78ef52a44e58000fe5d7f679681739451872f5bbd123e5dbd2af050" origin="Generated by Gradle"/>
Expand All @@ -210,6 +260,14 @@
<sha256 value="a01902c476556a0529413b0f3810e954a5eb8a7cdc1a9cc604ec2d24ceca91ce" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-linux64" version="6d1fd95">
<artifact name="tor-binary-linux64-6d1fd95.jar">
<sha256 value="7f58d31dd684b2e361e2980ba23922cadd5d9d8f8dbab9b3a2c6737741b21f7e" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor-binary-linux64-6d1fd95.pom">
<sha256 value="48f0435519eae6ff6af88656a64502320befc392b2c5d59ac2fb47412c9ba52d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-linux64" version="b9c6227">
<artifact name="tor-binary-linux64-b9c6227.jar">
<sha256 value="d5c1d54b2c2323ac1124435be633c7822a28e6fe9160486d03102cc2b444df24" origin="Generated by Gradle"/>
Expand All @@ -218,6 +276,14 @@
<sha256 value="ee305ee12585057bcce380710e4a5ae3a3ed43e1701f5e565f15b75854e3e715" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-macos" version="6d1fd95">
<artifact name="tor-binary-macos-6d1fd95.jar">
<sha256 value="a23802ff66d4ac01366ebe712879e2f51df960572dc34db269588da87453a70d" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor-binary-macos-6d1fd95.pom">
<sha256 value="0c1b6633882ca625f50c78b960714baa81ef286b5dfc26886145f7960feab738" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-macos" version="b9c6227">
<artifact name="tor-binary-macos-b9c6227.jar">
<sha256 value="6216d66241e020fec1a55648d7176ef64959e094c493df8f49e7e8e8f62fe1e1" origin="Generated by Gradle"/>
Expand All @@ -226,6 +292,14 @@
<sha256 value="143a9bfc539101d8293b7d151d6a952135fa5ad76d752639d2ed72fb9c9c494d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-windows" version="6d1fd95">
<artifact name="tor-binary-windows-6d1fd95.jar">
<sha256 value="8e0dee7429228aa0c9f7a36f40f303a016ed8dfb40fea77382f7076c13fc27f1" origin="Generated by Gradle"/>
</artifact>
<artifact name="tor-binary-windows-6d1fd95.pom">
<sha256 value="08dd80bd3c5e6c6b031ea3e28d8819adec875593a8f1fb9101c0f952f8307b80" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.bisq-network.tor-binary" name="tor-binary-windows" version="b9c6227">
<artifact name="tor-binary-windows-b9c6227.jar">
<sha256 value="28a1031d7610863f774eedbd00b83b06b132781c31077b805033299de3e3a263" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1743,6 +1817,9 @@
<artifact name="mockito-core-3.5.15.jar">
<sha256 value="f2c9c7080ada5640d28d01fc29d814438dd143e5331f76ef6908dcdd3ec141f0" origin="Generated by Gradle"/>
</artifact>
<artifact name="mockito-core-3.5.15.pom">
<sha256 value="c622ea8d161e69ff8e578d0654043c18e3b1cf54f98b340532a85a6eb97d4381" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.objenesis" name="objenesis" version="3.1">
<artifact name="objenesis-3.1.jar">
Expand Down
2 changes: 1 addition & 1 deletion monitor/src/main/resources/metrics.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TorRoundTripTime.enabled=false
TorRoundTripTime.run.interval=100
TorRoundTripTime.run.sampleSize=3
# torproject.org hidden service
TorRoundTripTime.run.hosts=http://expyuzz4wqqyqhjn.onion:80
TorRoundTripTime.run.hosts=http://2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion:80

#TorHiddenServiceStartupTime Metric
TorHiddenServiceStartupTime.enabled=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void run(String sampleSize) throws Exception {
if (!"default".equals(sampleSize))
configuration.put("TorRoundTripTime.run.sampleSize", sampleSize);
// torproject.org hidden service
configuration.put("TorRoundTripTime.run.hosts", "http://expyuzz4wqqyqhjn.onion:80");
configuration.put("TorRoundTripTime.run.hosts", "http://2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion/:80");

Metric DUT = new TorRoundTripTime(reporter);
// start
Expand Down
Loading