From 17c7c3c2238cb9cbdadd4b307561d122e960c03b Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 15 May 2024 10:03:41 -0400 Subject: [PATCH] mark mainnet changes --- core/src/main/java/haveno/core/alert/AlertManager.java | 2 +- .../java/haveno/core/alert/PrivateNotificationManager.java | 2 +- core/src/main/java/haveno/core/app/HavenoExecutable.java | 2 +- core/src/main/java/haveno/core/filter/FilterManager.java | 2 +- .../main/java/haveno/core/provider/ProvidersRepository.java | 5 ++++- .../dispute/arbitration/arbitrator/ArbitratorManager.java | 2 +- core/src/main/java/haveno/core/trade/HavenoUtils.java | 2 ++ core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java | 2 +- core/src/main/resources/xmr_mainnet.seednodes | 2 +- desktop/package/package.gradle | 2 +- 10 files changed, 14 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/haveno/core/alert/AlertManager.java b/core/src/main/java/haveno/core/alert/AlertManager.java index a54f45c489..c47e7041ef 100644 --- a/core/src/main/java/haveno/core/alert/AlertManager.java +++ b/core/src/main/java/haveno/core/alert/AlertManager.java @@ -109,7 +109,7 @@ public class AlertManager { "026c581ad773d987e6bd10785ac7f7e0e64864aedeb8bce5af37046de812a37854", "025b058c9f2c60d839669dbfa5578cf5a8117d60e6b70e2f0946f8a691273c6a36"); case XMR_MAINNET: - return List.of(); + return List.of(); // TODO: add mainnet dev pub keys for alerts default: throw new RuntimeException("Unhandled base currency network: " + Config.baseCurrencyNetwork()); } diff --git a/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java b/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java index fd6abac552..85e8bbd6ad 100644 --- a/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java +++ b/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java @@ -108,7 +108,7 @@ public class PrivateNotificationManager implements MessageListener { "026c581ad773d987e6bd10785ac7f7e0e64864aedeb8bce5af37046de812a37854", "025b058c9f2c60d839669dbfa5578cf5a8117d60e6b70e2f0946f8a691273c6a36"); case XMR_MAINNET: - return List.of(); + return List.of(); // TODO: add mainnet dev pub keys for private messages default: throw new RuntimeException("Unhandled base currency network: " + Config.baseCurrencyNetwork()); } diff --git a/core/src/main/java/haveno/core/app/HavenoExecutable.java b/core/src/main/java/haveno/core/app/HavenoExecutable.java index e213bdd688..ec4306e86e 100644 --- a/core/src/main/java/haveno/core/app/HavenoExecutable.java +++ b/core/src/main/java/haveno/core/app/HavenoExecutable.java @@ -82,7 +82,7 @@ import java.util.concurrent.atomic.AtomicInteger; @Slf4j public abstract class HavenoExecutable implements GracefulShutDownHandler, HavenoSetup.HavenoSetupListener, UncaughtExceptionHandler { - public static final String DEFAULT_APP_NAME = "Haveno"; + public static final String DEFAULT_APP_NAME = "Haveno"; // TODO: customize for your network to avoid user data corruption with other networks public static final int EXIT_SUCCESS = 0; public static final int EXIT_FAILURE = 1; diff --git a/core/src/main/java/haveno/core/filter/FilterManager.java b/core/src/main/java/haveno/core/filter/FilterManager.java index cb7e0e9b21..5341dc4f5d 100644 --- a/core/src/main/java/haveno/core/filter/FilterManager.java +++ b/core/src/main/java/haveno/core/filter/FilterManager.java @@ -116,7 +116,7 @@ public class FilterManager { publicKeys = useDevPrivilegeKeys ? Collections.singletonList(DevEnv.DEV_PRIVILEGE_PUB_KEY) : - List.of("0358d47858acdc41910325fce266571540681ef83a0d6fedce312bef9810793a27", + List.of("0358d47858acdc41910325fce266571540681ef83a0d6fedce312bef9810793a27", // TODO: replace with mainnet dev pub keys "029340c3e7d4bb0f9e651b5f590b434fecb6175aeaa57145c7804ff05d210e534f", "034dc7530bf66ffd9580aa98031ea9a18ac2d269f7c56c0e71eca06105b9ed69f9"); diff --git a/core/src/main/java/haveno/core/provider/ProvidersRepository.java b/core/src/main/java/haveno/core/provider/ProvidersRepository.java index f8c7da06b4..9b72612fb5 100644 --- a/core/src/main/java/haveno/core/provider/ProvidersRepository.java +++ b/core/src/main/java/haveno/core/provider/ProvidersRepository.java @@ -50,6 +50,7 @@ public class ProvidersRepository { private static final List DEFAULT_NODES = Arrays.asList( "http://elaxlgigphpicy5q7pi5wkz2ko2vgjbq4576vic7febmx4xcxvk6deqd.onion/", // Haveno "http://a66ulzwhhudtqy6k2efnhodj2n6wnc5mnzjs3ocqtf47lwtcuo4wxyqd.onion/" // Cake + // TODO: add more onion price providers for mainnet ); private final Config config; @@ -131,7 +132,9 @@ public class ProvidersRepository { providers = List.of( "http://localhost:8078/", "https://price.haveno.network/", - "http://173.230.142.36:8078/"); + "http://173.230.142.36:8078/" + // TODO: add more clearnet price providers for mainnet + ); } else { providers = DEFAULT_NODES; } diff --git a/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java b/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java index 30fe0be18f..8a8e8d4911 100644 --- a/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java +++ b/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java @@ -78,7 +78,7 @@ public class ArbitratorManager extends DisputeAgentManager { "02a1a458df5acf4ab08fdca748e28f33a955a30854c8c1a831ee733dca7f0d2fcd", "0374dd70f3fa6e47ec5ab97932e1cec6233e98e6ae3129036b17118650c44fd3de"); case XMR_MAINNET: - return List.of(); + return List.of(); // TODO: add mainnet arbitrator pubkeys default: throw new RuntimeException("Unhandled base currency network: " + Config.baseCurrencyNetwork()); } diff --git a/core/src/main/java/haveno/core/trade/HavenoUtils.java b/core/src/main/java/haveno/core/trade/HavenoUtils.java index d9acf03d7e..cdbd1b7e5c 100644 --- a/core/src/main/java/haveno/core/trade/HavenoUtils.java +++ b/core/src/main/java/haveno/core/trade/HavenoUtils.java @@ -65,6 +65,8 @@ import org.bitcoinj.core.Coin; @Slf4j public class HavenoUtils { + // TODO: change configuration for mainnet + // configure release date private static final String RELEASE_DATE = "01-03-2024 00:00:00"; // optionally set to release date of the network in format dd-mm-yyyy to impose temporary limits, etc. e.g. "01-03-2024 00:00:00" public static final int RELEASE_LIMIT_DAYS = 60; // number of days to limit sell offers to max buy limit for new accounts diff --git a/core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java b/core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java index 25df963b22..b6ecb6c8cd 100644 --- a/core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java +++ b/core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java @@ -81,7 +81,7 @@ public class XmrNodes { new XmrNode(MoneroNodesOption.PUBLIC, null, null, "node2.sethforprivacy.com", 38089, 3, null), new XmrNode(MoneroNodesOption.PUBLIC, null, "plowsof3t5hogddwabaeiyrno25efmzfxyro2vligremt7sxpsclfaid.onion", null, 38089, 3, null) ); - case XMR_MAINNET: + case XMR_MAINNET: // TODO: add or remove monerod endpoints for clients return Arrays.asList( new XmrNode(MoneroNodesOption.PROVIDED, null, null, "127.0.0.1", 18081, 1, "@local"), new XmrNode(MoneroNodesOption.PROVIDED, null, null, "xmr-node.cakewallet.com", 18081, 2, "@cakewallet"), diff --git a/core/src/main/resources/xmr_mainnet.seednodes b/core/src/main/resources/xmr_mainnet.seednodes index 3f81fa0483..80949eeba8 100644 --- a/core/src/main/resources/xmr_mainnet.seednodes +++ b/core/src/main/resources/xmr_mainnet.seednodes @@ -1,2 +1,2 @@ -# nodeaddress.onion:port [(@owner,@backup)] +# nodeaddress.onion:port [(@owner,@backup)] (add mainnet seed addresses) placeholder.onion:8000 (@placeholder) \ No newline at end of file diff --git a/desktop/package/package.gradle b/desktop/package/package.gradle index fd1fc81f43..901705090c 100644 --- a/desktop/package/package.gradle +++ b/desktop/package/package.gradle @@ -275,7 +275,7 @@ task packageInstallers { " --java-options --add-opens=java.base/java.lang.reflect=ALL-UNNAMED" + " --java-options --add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED" + " --java-options -Djava.net.preferIPv4Stack=true" + - " --arguments --baseCurrencyNetwork=XMR_STAGENET" + " --arguments --baseCurrencyNetwork=XMR_MAINNET" // Warning: this will cause guice reflection exceptions and lead to issues with the guice internal cache // resulting in the UI not loading // " --java-options -Djdk.module.illegalAccess=deny" +