<p><b>@sqrrm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/bisq-network/bisq/pull/3413#discussion_r336772023">core/src/main/java/bisq/core/dao/node/parser/TxOutputParser.java</a>:</p>
<pre style='color:#555'>> + // After the hard fork activation we fix a bug with a transaction which would have interpreted the
+ // vote fee output as BSQ if the vote fee was >= miner fee.
+ // Such a tx was never created but as we don't know if it will happen before activation date we cannot
+ // enforce the bug fix which represents a rule change before the activation date.
+ handleIssuanceCandidateOutput(tempTxOutput);
+ } else if (isHardForkActivated(tempTxOutput) && isBlindVoteFeeOutput(tempTxOutput)) {
+ // After the hard fork activation we fix a bug with a transaction which would have interpreted the
+ // issuance output as BSQ if the availableInputValue was >= issuance amount.
+ // Such a tx was never created but as we don't know if it will happen before activation date we cannot
+ // enforce the bug fix which represents a rule change before the activation date.
</pre>
<p>Comments are switched, vote fee comment for issuance and vice versa</p>
<hr>
<p>In <a href="https://github.com/bisq-network/bisq/pull/3413#discussion_r336772062">core/src/main/java/bisq/core/dao/node/parser/TxOutputParser.java</a>:</p>
<pre style='color:#555'>> + private boolean isBlindVoteFeeOutput(TempTxOutput tempTxOutput) {
+ if (!optionalOpReturnType.isPresent()) {
+ return false;
+ }
+
+ if (optionalOpReturnType.get() != OpReturnType.BLIND_VOTE) {
+ return false;
+ }
+
+ // If it is the vote stake output we return false.
+ if (tempTxOutput.getIndex() == 0) {
+ return false;
+ }
+
+ // There must be a vote fee left
+ if (availableInputValue <= 0) {
</pre>
<p>I think there is always a vote fee left here if any fee was paid at all</p>
<hr>
<p>In <a href="https://github.com/bisq-network/bisq/pull/3413#discussion_r336772204">core/src/main/java/bisq/core/dao/node/parser/TxOutputParser.java</a>:</p>
<pre style='color:#555'>> +
+ private void handleIssuanceCandidateOutput(TempTxOutput tempTxOutput) {
+ // We do not permit more BSQ outputs after the issuance candidate.
+ prohibitMoreBsqOutputs = true;
+
+ // We store the candidate but we don't apply the TxOutputType yet as we need to verify the fee after all
+ // outputs are parsed and check the phase. The TxParser will do that....
+ optionalIssuanceCandidate = Optional.of(tempTxOutput);
+ }
+
+ private void handleBlindVoteFeeOutput(TempTxOutput tempTxOutput) {
+ tempTxOutput.setTxOutputType(TxOutputType.BTC_OUTPUT);
+ prohibitMoreBsqOutputs = true;
+ }
+
+ private boolean isBlindVoteFeeOutput(TempTxOutput tempTxOutput) {
</pre>
<p>I don't understand the naming of this method</p>
<hr>
<p>In <a href="https://github.com/bisq-network/bisq/pull/3413#discussion_r336772488">core/src/main/java/bisq/core/dao/node/parser/TxOutputParser.java</a>:</p>
<pre style='color:#555'>> + if (availableInputValue <= 0) {
+ return false;
+ }
+
+ // Burned BSQ output is last output before opReturn.
+ // We could have also a BSQ change output as last output before opReturn but that will
+ // be detected at blindVoteFee check.
+ // We always have the BSQ change before the burned BSQ output if both are present.
+ checkArgument(optionalOpReturnIndex.isPresent());
+ if (tempTxOutput.getIndex() != optionalOpReturnIndex.get() - 1) {
+ return false;
+ }
+
+ // Without checking the fee we would not be able to distinguish between 2 structurally same transactions, one
+ // where the output is burned BSQ and one where it is a BSQ change output.
+ long blindVoteFee = daoStateService.getParamValueAsCoin(Param.BLIND_VOTE_FEE, tempTxOutput.getBlockHeight()).value;
</pre>
<p>I feel it would be better to disallow any other BSQ outputs than the vote stake output for blind vote txs. I think the code would be easier to read and I don't see any other use case.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3413?email_source=notifications&email_token=AJFFTNRAWILA2ER6A6AY3C3QPQWVLA5CNFSM4JBAOB5KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCIRIFBQ#pullrequestreview-304251526">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNSY42SLKWNJJDYC36LQPQWVLANCNFSM4JBAOB5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNUNGOKTUD2HVNZ3GILQPQWVLA5CNFSM4JBAOB5KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCIRIFBQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3413?email_source=notifications\u0026email_token=AJFFTNRAWILA2ER6A6AY3C3QPQWVLA5CNFSM4JBAOB5KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCIRIFBQ#pullrequestreview-304251526",
"url": "https://github.com/bisq-network/bisq/pull/3413?email_source=notifications\u0026email_token=AJFFTNRAWILA2ER6A6AY3C3QPQWVLA5CNFSM4JBAOB5KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCIRIFBQ#pullrequestreview-304251526",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>