From 23156a328629b1938050295d794d7cdb07cee216 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 12:41:17 +0700 Subject: [PATCH 1/8] Remove handling of isHotfixActivated in getReceivers method. We still keep the parameter as it will be reused later for the new bugfix Signed-off-by: HenrikJannsen --- .../burningman/DelayedPayoutTxReceiverService.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java index 71576ad567e..a410c71d8ef 100644 --- a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java +++ b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java @@ -129,9 +129,7 @@ public List> getReceivers(int burningManSelectionHeight, long tradeTxFee, boolean isHotfixActivated) { checkArgument(burningManSelectionHeight >= MIN_SNAPSHOT_HEIGHT, "Selection height must be >= " + MIN_SNAPSHOT_HEIGHT); - Collection burningManCandidates = isHotfixActivated ? - burningManService.getActiveBurningManCandidates(burningManSelectionHeight) : - burningManService.getBurningManCandidatesByName(burningManSelectionHeight).values(); + Collection burningManCandidates = burningManService.getActiveBurningManCandidates(burningManSelectionHeight); // We need to use the same txFeePerVbyte value for both traders. // We use the tradeTxFee value which is calculated from the average of taker fee tx size and deposit tx size. @@ -158,9 +156,7 @@ public List> getReceivers(int burningManSelectionHeight, // If we remove outputs it will be spent as miner fee. long minOutputAmount = Math.max(DPT_MIN_OUTPUT_AMOUNT, txFeePerVbyte * 32 * 2); // Sanity check that max share of a non-legacy BM is 20% over MAX_BURN_SHARE (taking into account potential increase due adjustment) - long maxOutputAmount = isHotfixActivated ? - Math.round(spendableAmount * (BurningManService.MAX_BURN_SHARE * 1.2)) : - Math.round(inputAmount * (BurningManService.MAX_BURN_SHARE * 1.2)); + long maxOutputAmount = Math.round(spendableAmount * (BurningManService.MAX_BURN_SHARE * 1.2)); // We accumulate small amounts which gets filtered out and subtract it from 1 to get an adjustment factor // used later to be applied to the remaining burningmen share. double adjustment = 1 - burningManCandidates.stream() @@ -189,8 +185,7 @@ public List> getReceivers(int burningManSelectionHeight, long available = spendableAmount - totalOutputValue; // If the available is larger than DPT_MIN_REMAINDER_TO_LEGACY_BM we send it to legacy BM // Otherwise we use it as miner fee - long dptMinRemainderToLegacyBm = isHotfixActivated ? DPT_MIN_REMAINDER_TO_LEGACY_BM : 50000; - if (available > dptMinRemainderToLegacyBm) { + if (available > DPT_MIN_REMAINDER_TO_LEGACY_BM) { receivers.add(new Tuple2<>(available, burningManService.getLegacyBurningManAddress(burningManSelectionHeight))); } } From 658a01e5ae9d3d059f9718c9566e97fb2865ef91 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 12:45:26 +0700 Subject: [PATCH 2/8] Refactoring: Rename HOTFIX_ACTIVATION_DATE to BUGFIX_6699_ACTIVATION_DATE, isHotfixActivated to isBugfix6699Activated, wasHotfixActivatedAtTradeDate to wasBugfix6699ActivatedAtTradeDate Signed-off-by: HenrikJannsen --- .../burningman/DelayedPayoutTxReceiverService.java | 13 ++++++++----- .../core/support/dispute/refund/RefundManager.java | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java index a410c71d8ef..63588e50d9f 100644 --- a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java +++ b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java @@ -52,10 +52,13 @@ @Slf4j @Singleton public class DelayedPayoutTxReceiverService implements DaoStateListener { - public static final Date HOTFIX_ACTIVATION_DATE = Utilities.getUTCDate(2023, GregorianCalendar.JANUARY, 10); + // Activation date for bugfix of receiver addresses getting overwritten by a new compensation + // requests change address. + // See: https://github.com/bisq-network/bisq/issues/6699 + public static final Date BUGFIX_6699_ACTIVATION_DATE = Utilities.getUTCDate(2023, GregorianCalendar.AUGUST, 10); - public static boolean isHotfixActivated() { - return new Date().after(HOTFIX_ACTIVATION_DATE); + public static boolean isBugfix6699Activated() { + return new Date().after(BUGFIX_6699_ACTIVATION_DATE); } // We don't allow to get further back than 767950 (the block height from Dec. 18th 2022). @@ -121,13 +124,13 @@ public int getBurningManSelectionHeight() { public List> getReceivers(int burningManSelectionHeight, long inputAmount, long tradeTxFee) { - return getReceivers(burningManSelectionHeight, inputAmount, tradeTxFee, isHotfixActivated()); + return getReceivers(burningManSelectionHeight, inputAmount, tradeTxFee, isBugfix6699Activated()); } public List> getReceivers(int burningManSelectionHeight, long inputAmount, long tradeTxFee, - boolean isHotfixActivated) { + boolean isBugfix6699Activated) { checkArgument(burningManSelectionHeight >= MIN_SNAPSHOT_HEIGHT, "Selection height must be >= " + MIN_SNAPSHOT_HEIGHT); Collection burningManCandidates = burningManService.getActiveBurningManCandidates(burningManSelectionHeight); diff --git a/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java b/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java index 494ec90fad7..d0b417db53e 100644 --- a/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java +++ b/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java @@ -329,12 +329,12 @@ public void verifyDelayedPayoutTxReceivers(Transaction delayedPayoutTx, Dispute long inputAmount = depositTx.getOutput(0).getValue().value; int selectionHeight = dispute.getBurningManSelectionHeight(); - boolean wasHotfixActivatedAtTradeDate = dispute.getTradeDate().after(DelayedPayoutTxReceiverService.HOTFIX_ACTIVATION_DATE); + boolean wasBugfix6699ActivatedAtTradeDate = dispute.getTradeDate().after(DelayedPayoutTxReceiverService.BUGFIX_6699_ACTIVATION_DATE); List> delayedPayoutTxReceivers = delayedPayoutTxReceiverService.getReceivers( selectionHeight, inputAmount, dispute.getTradeTxFee(), - wasHotfixActivatedAtTradeDate); + wasBugfix6699ActivatedAtTradeDate); log.info("Verify delayedPayoutTx using selectionHeight {} and receivers {}", selectionHeight, delayedPayoutTxReceivers); checkArgument(delayedPayoutTx.getOutputs().size() == delayedPayoutTxReceivers.size(), "Size of outputs and delayedPayoutTxReceivers must be the same"); From 6a649416c23f909c2599ecb84f8e8da525befb9a Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 12:53:59 +0700 Subject: [PATCH 3/8] Refactor code for assigning address for better to make it more clear when we use the custom address and when the change address. Signed-off-by: HenrikJannsen --- .../dao/burningman/BurningManService.java | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/BurningManService.java b/core/src/main/java/bisq/core/dao/burningman/BurningManService.java index c85f8aff182..563cac4b066 100644 --- a/core/src/main/java/bisq/core/dao/burningman/BurningManService.java +++ b/core/src/main/java/bisq/core/dao/burningman/BurningManService.java @@ -135,26 +135,32 @@ Map getBurningManCandidatesByName(int chainHeight) BurningManCandidate candidate = burningManCandidatesByName.get(name); // Issuance - compensationProposal.getBurningManReceiverAddress() - .or(() -> daoStateService.getTx(compensationProposal.getTxId()) - .map(this::getAddressFromCompensationRequest)) - .ifPresent(address -> { - int issuanceHeight = issuance.getChainHeight(); - long issuanceAmount = getIssuanceAmountForCompensationRequest(issuance); - int cycleIndex = cyclesInDaoStateService.getCycleIndexAtChainHeight(issuanceHeight); - if (isValidCompensationRequest(name, cycleIndex, issuanceAmount)) { - long decayedIssuanceAmount = getDecayedCompensationAmount(issuanceAmount, issuanceHeight, chainHeight); - long issuanceDate = daoStateService.getBlockTime(issuanceHeight); - candidate.addCompensationModel(CompensationModel.fromCompensationRequest(address, - issuanceAmount, - decayedIssuanceAmount, - issuanceHeight, - issuance.getTxId(), - issuanceDate, - cycleIndex)); - } - }); - + Optional customAddress = compensationProposal.getBurningManReceiverAddress(); + boolean isCustomAddress = customAddress.isPresent(); + Optional receiverAddress; + if (isCustomAddress) { + receiverAddress = customAddress; + } else { + // We take change address from compensation request + receiverAddress = daoStateService.getTx(compensationProposal.getTxId()) + .map(this::getAddressFromCompensationRequest); + } + if (receiverAddress.isPresent()) { + int issuanceHeight = issuance.getChainHeight(); + long issuanceAmount = getIssuanceAmountForCompensationRequest(issuance); + int cycleIndex = cyclesInDaoStateService.getCycleIndexAtChainHeight(issuanceHeight); + if (isValidCompensationRequest(name, cycleIndex, issuanceAmount)) { + long decayedIssuanceAmount = getDecayedCompensationAmount(issuanceAmount, issuanceHeight, chainHeight); + long issuanceDate = daoStateService.getBlockTime(issuanceHeight); + candidate.addCompensationModel(CompensationModel.fromCompensationRequest(receiverAddress.get(), + issuanceAmount, + decayedIssuanceAmount, + issuanceHeight, + issuance.getTxId(), + issuanceDate, + cycleIndex)); + } + } addBurnOutputModel(chainHeight, proofOfBurnOpReturnTxOutputByHash, name, candidate); }); } @@ -211,7 +217,7 @@ String getLegacyBurningManAddress(int chainHeight) { Set getActiveBurningManCandidates(int chainHeight) { return getBurningManCandidatesByName(chainHeight).values().stream() .filter(burningManCandidate -> burningManCandidate.getCappedBurnAmountShare() > 0) - .filter(candidate -> candidate.getMostRecentAddress().isPresent()) + .filter(candidate -> candidate.getReceiverAddress().isPresent()) .collect(Collectors.toSet()); } From 694e101646b45beb526a1e2ba59ea2be2686f839 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 12:54:56 +0700 Subject: [PATCH 4/8] Add isCustomAddress to CompensationModel Signed-off-by: HenrikJannsen --- .../java/bisq/core/dao/burningman/BurningManService.java | 1 + .../bisq/core/dao/burningman/model/CompensationModel.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/core/src/main/java/bisq/core/dao/burningman/BurningManService.java b/core/src/main/java/bisq/core/dao/burningman/BurningManService.java index 563cac4b066..ba0bf949f5b 100644 --- a/core/src/main/java/bisq/core/dao/burningman/BurningManService.java +++ b/core/src/main/java/bisq/core/dao/burningman/BurningManService.java @@ -153,6 +153,7 @@ Map getBurningManCandidatesByName(int chainHeight) long decayedIssuanceAmount = getDecayedCompensationAmount(issuanceAmount, issuanceHeight, chainHeight); long issuanceDate = daoStateService.getBlockTime(issuanceHeight); candidate.addCompensationModel(CompensationModel.fromCompensationRequest(receiverAddress.get(), + isCustomAddress, issuanceAmount, decayedIssuanceAmount, issuanceHeight, diff --git a/core/src/main/java/bisq/core/dao/burningman/model/CompensationModel.java b/core/src/main/java/bisq/core/dao/burningman/model/CompensationModel.java index 7425446d9d5..1ad5e5b6ef2 100644 --- a/core/src/main/java/bisq/core/dao/burningman/model/CompensationModel.java +++ b/core/src/main/java/bisq/core/dao/burningman/model/CompensationModel.java @@ -27,6 +27,7 @@ @EqualsAndHashCode public final class CompensationModel { public static CompensationModel fromCompensationRequest(String address, + boolean isCustomAddress, long amount, long decayedAmount, int height, @@ -34,6 +35,7 @@ public static CompensationModel fromCompensationRequest(String address, long date, int cycleIndex) { return new CompensationModel(address, + isCustomAddress, amount, decayedAmount, height, @@ -51,6 +53,7 @@ public static CompensationModel fromGenesisOutput(String address, int outputIndex, long date) { return new CompensationModel(address, + false, amount, decayedAmount, height, @@ -62,6 +65,7 @@ public static CompensationModel fromGenesisOutput(String address, private final String address; + private final boolean isCustomAddress; private final long amount; private final long decayedAmount; private final int height; @@ -71,6 +75,7 @@ public static CompensationModel fromGenesisOutput(String address, private final int cycleIndex; private CompensationModel(String address, + boolean isCustomAddress, long amount, long decayedAmount, int height, @@ -79,6 +84,7 @@ private CompensationModel(String address, long date, int cycleIndex) { this.address = address; + this.isCustomAddress = isCustomAddress; this.amount = amount; this.decayedAmount = decayedAmount; this.height = height; @@ -92,6 +98,7 @@ private CompensationModel(String address, public String toString() { return "\n CompensationModel{" + "\r\n address='" + address + '\'' + + "\r\n isCustomAddress='" + isCustomAddress + '\'' + ",\r\n amount=" + amount + ",\r\n decayedAmount=" + decayedAmount + ",\r\n height=" + height + From 7253411b798fd547944fe3c1b96942b825d6cd43 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 12:58:40 +0700 Subject: [PATCH 5/8] Add new field receiverAddress to BurningManCandidate. Implement new selection algorithm. Add methods for accessing the receiverAddress (not used yet, but will be used in next commits) Signed-off-by: HenrikJannsen --- .../burningman/model/BurningManCandidate.java | 36 +++++++++++++++++++ .../burningman/model/LegacyBurningMan.java | 4 +-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java b/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java index 83c8ef01af4..c94b458e8e5 100644 --- a/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java +++ b/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java @@ -18,6 +18,7 @@ package bisq.core.dao.burningman.model; import bisq.core.dao.burningman.BurningManService; +import bisq.core.dao.burningman.DelayedPayoutTxReceiverService; import bisq.common.util.DateUtil; @@ -46,6 +47,13 @@ public class BurningManCandidate { private long accumulatedCompensationAmount; private long accumulatedDecayedCompensationAmount; private double compensationShare; // Share of accumulated decayed compensation amounts in relation to total issued amounts + + protected Optional receiverAddress = Optional.empty(); + + // For deploying a bugfix with mostRecentAddress we need to maintain the old version to avoid breaking the + // trade protocol. We use the legacyMostRecentAddress until the activation date where we + // enforce the version by the filter to ensure users have updated. + // See: https://github.com/bisq-network/bisq/issues/6699 protected Optional mostRecentAddress = Optional.empty(); private final Set burnOutputModels = new HashSet<>(); @@ -63,6 +71,14 @@ public class BurningManCandidate { public BurningManCandidate() { } + public Optional getReceiverAddress() { + return getReceiverAddress(DelayedPayoutTxReceiverService.isBugfix6699Activated()); + } + + public Optional getReceiverAddress(boolean isBugfix6699Activated) { + return isBugfix6699Activated ? receiverAddress : mostRecentAddress; + } + public void addBurnOutputModel(BurnOutputModel burnOutputModel) { if (burnOutputModels.contains(burnOutputModel)) { return; @@ -87,6 +103,25 @@ public void addCompensationModel(CompensationModel compensationModel) { accumulatedDecayedCompensationAmount += compensationModel.getDecayedAmount(); accumulatedCompensationAmount += compensationModel.getAmount(); + boolean hasAnyCustomAddress = compensationModels.stream() + .anyMatch(CompensationModel::isCustomAddress); + if (hasAnyCustomAddress) { + // If any custom address was defined, we only consider custom addresses and sort them to take the + // most recent one. + receiverAddress = compensationModels.stream() + .filter(CompensationModel::isCustomAddress) + .max(Comparator.comparing(CompensationModel::getHeight)) + .map(CompensationModel::getAddress); + } else { + // If no custom addresses ever have been defined, we take the change address of the compensation request + // and use the earliest address. This helps to avoid change of address with every new comp. request. + receiverAddress = compensationModels.stream() + .min(Comparator.comparing(CompensationModel::getHeight)) + .map(CompensationModel::getAddress); + } + + // For backward compatibility reasons we need to maintain the old buggy version. + // See: https://github.com/bisq-network/bisq/issues/6699. mostRecentAddress = compensationModels.stream() .max(Comparator.comparing(CompensationModel::getHeight)) .map(CompensationModel::getAddress); @@ -145,6 +180,7 @@ public String toString() { ",\r\n accumulatedCompensationAmount=" + accumulatedCompensationAmount + ",\r\n accumulatedDecayedCompensationAmount=" + accumulatedDecayedCompensationAmount + ",\r\n compensationShare=" + compensationShare + + ",\r\n receiverAddress=" + receiverAddress + ",\r\n mostRecentAddress=" + mostRecentAddress + ",\r\n burnOutputModels=" + burnOutputModels + ",\r\n accumulatedBurnAmount=" + accumulatedBurnAmount + diff --git a/core/src/main/java/bisq/core/dao/burningman/model/LegacyBurningMan.java b/core/src/main/java/bisq/core/dao/burningman/model/LegacyBurningMan.java index 7098b9a0796..0089c8c7637 100644 --- a/core/src/main/java/bisq/core/dao/burningman/model/LegacyBurningMan.java +++ b/core/src/main/java/bisq/core/dao/burningman/model/LegacyBurningMan.java @@ -30,7 +30,7 @@ @EqualsAndHashCode(callSuper = true) public final class LegacyBurningMan extends BurningManCandidate { public LegacyBurningMan(String address) { - mostRecentAddress = Optional.of(address); + receiverAddress = mostRecentAddress = Optional.of(address); } public void applyBurnAmountShare(double burnAmountShare) { @@ -56,6 +56,6 @@ public void calculateCappedAndAdjustedShares(double sumAllCappedBurnAmountShares @Override public Set getAllAddresses() { - return mostRecentAddress.map(Set::of).orElse(new HashSet<>()); + return getReceiverAddress().map(Set::of).orElse(new HashSet<>()); } } From 95023216ecdacff7adb88f9634755e3c30bda6a7 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 13:05:36 +0700 Subject: [PATCH 6/8] Use new getReceiverAddress methods instead of getMostRecentAddress Signed-off-by: HenrikJannsen --- .../bisq/core/dao/burningman/BtcFeeReceiverService.java | 4 +++- .../core/dao/burningman/DelayedPayoutTxReceiverService.java | 6 +++--- .../main/dao/burnbsq/burningman/BurningManListItem.java | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/BtcFeeReceiverService.java b/core/src/main/java/bisq/core/dao/burningman/BtcFeeReceiverService.java index 9134fb95afc..968f62c7f3e 100644 --- a/core/src/main/java/bisq/core/dao/burningman/BtcFeeReceiverService.java +++ b/core/src/main/java/bisq/core/dao/burningman/BtcFeeReceiverService.java @@ -102,7 +102,9 @@ public String getAddress() { // the burningManCandidates as we added for the legacy BM an entry at the end. return burningManService.getLegacyBurningManAddress(currentChainHeight); } - return activeBurningManCandidates.get(winnerIndex).getMostRecentAddress() + // For the fee selection we do not need to wait for activation date of the bugfix for + // the receiver address (https://github.com/bisq-network/bisq/issues/6699) as it has no impact on the trade protocol. + return activeBurningManCandidates.get(winnerIndex).getReceiverAddress(true) .orElse(burningManService.getLegacyBurningManAddress(currentChainHeight)); } diff --git a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java index 63588e50d9f..e866f834d67 100644 --- a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java +++ b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java @@ -163,7 +163,7 @@ public List> getReceivers(int burningManSelectionHeight, // We accumulate small amounts which gets filtered out and subtract it from 1 to get an adjustment factor // used later to be applied to the remaining burningmen share. double adjustment = 1 - burningManCandidates.stream() - .filter(candidate -> candidate.getMostRecentAddress().isPresent()) + .filter(candidate -> candidate.getReceiverAddress(isBugfix6699Activated).isPresent()) .mapToDouble(candidate -> { double cappedBurnAmountShare = candidate.getCappedBurnAmountShare(); long amount = Math.round(cappedBurnAmountShare * spendableAmount); @@ -172,11 +172,11 @@ public List> getReceivers(int burningManSelectionHeight, .sum(); List> receivers = burningManCandidates.stream() - .filter(candidate -> candidate.getMostRecentAddress().isPresent()) + .filter(candidate -> candidate.getReceiverAddress(isBugfix6699Activated).isPresent()) .map(candidate -> { double cappedBurnAmountShare = candidate.getCappedBurnAmountShare() / adjustment; return new Tuple2<>(Math.round(cappedBurnAmountShare * spendableAmount), - candidate.getMostRecentAddress().get()); + candidate.getReceiverAddress(isBugfix6699Activated).get()); }) .filter(tuple -> tuple.first >= minOutputAmount) .filter(tuple -> tuple.first <= maxOutputAmount) diff --git a/desktop/src/main/java/bisq/desktop/main/dao/burnbsq/burningman/BurningManListItem.java b/desktop/src/main/java/bisq/desktop/main/dao/burnbsq/burningman/BurningManListItem.java index 031fe65be52..77e9f809770 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/burnbsq/burningman/BurningManListItem.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/burnbsq/burningman/BurningManListItem.java @@ -48,7 +48,7 @@ class BurningManListItem { this.burningManCandidate = burningManCandidate; this.name = name; - address = burningManCandidate.getMostRecentAddress().orElse(Res.get("shared.na")); + address = burningManCandidate.getReceiverAddress().orElse(Res.get("shared.na")); adjustedBurnAmountShare = burningManCandidate.getAdjustedBurnAmountShare(); cappedBurnAmountShare = burningManCandidate.getCappedBurnAmountShare(); From bf325938d5f666903c80336c1942a9d23ca6857a Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 13:08:34 +0700 Subject: [PATCH 7/8] Add getMostRecentAddress with throwing a UnsupportedOperationException to make sure the old field is not used anymore from any client. Signed-off-by: HenrikJannsen --- .../bisq/core/dao/burningman/model/BurningManCandidate.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java b/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java index c94b458e8e5..a61a0bc2548 100644 --- a/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java +++ b/core/src/main/java/bisq/core/dao/burningman/model/BurningManCandidate.java @@ -79,6 +79,11 @@ public Optional getReceiverAddress(boolean isBugfix6699Activated) { return isBugfix6699Activated ? receiverAddress : mostRecentAddress; } + public Optional getMostRecentAddress() { + // Lombok getter is set for class, so we would get a getMostRecentAddress but want to ensure it's not accidentally used. + throw new UnsupportedOperationException("getMostRecentAddress must not be used. Use getReceiverAddress instead."); + } + public void addBurnOutputModel(BurnOutputModel burnOutputModel) { if (burnOutputModels.contains(burnOutputModel)) { return; From 92f1c866876a0d351bf612b8fe2c7e55bdf4323c Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 17 May 2023 13:10:26 +0700 Subject: [PATCH 8/8] Change activation date to July 15th Signed-off-by: HenrikJannsen --- .../core/dao/burningman/DelayedPayoutTxReceiverService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java index e866f834d67..1222453e3d5 100644 --- a/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java +++ b/core/src/main/java/bisq/core/dao/burningman/DelayedPayoutTxReceiverService.java @@ -55,7 +55,7 @@ public class DelayedPayoutTxReceiverService implements DaoStateListener { // Activation date for bugfix of receiver addresses getting overwritten by a new compensation // requests change address. // See: https://github.com/bisq-network/bisq/issues/6699 - public static final Date BUGFIX_6699_ACTIVATION_DATE = Utilities.getUTCDate(2023, GregorianCalendar.AUGUST, 10); + public static final Date BUGFIX_6699_ACTIVATION_DATE = Utilities.getUTCDate(2023, GregorianCalendar.JULY, 15); public static boolean isBugfix6699Activated() { return new Date().after(BUGFIX_6699_ACTIVATION_DATE);