-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add irregular txType, add check for total balance, prevent proposal withhold attack #2587
Add irregular txType, add check for total balance, prevent proposal withhold attack #2587
Conversation
We don't want to burn BSQ in cases like that the tx was published too late, which is a valid case if the tx does not make it in the next block. We set such txs as IRREGULAR and allow spending of the BSQ, but there function in the governance is invalidated. We also add a check if the sum of all UTXO is the same as the sum of the genesis + sum of issuance txs - burned fees.
# Conflicts: # desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
I have some suggested changes that you can use if you feel like.
There is also some questions on how lenient we should be with irregular txs for failed issuance, just added my thoughts.
core/src/main/java/bisq/core/dao/governance/votereveal/VoteRevealService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/dao/governance/votereveal/VoteRevealService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/dao/governance/votereveal/VoteRevealService.java
Outdated
Show resolved
Hide resolved
desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java
Outdated
Show resolved
Hide resolved
…ealService.java Co-Authored-By: ManfredKarrer <mk@nucleo.io>
…ealService.java Co-Authored-By: ManfredKarrer <mk@nucleo.io>
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
…sqDashboardView.java Co-Authored-By: ManfredKarrer <mk@nucleo.io>
…dKarrer/bisq into add-check-for-bsq-balance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
# Conflicts: # core/src/main/resources/i18n/displayStrings.properties # desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
We did not update the merit correctly in case there was no proposal selected.
In case of an invalid tx we burn all available BSQ input. We only know that at parsing time. We renamed the burntFee field to burntBsq to make it more generic and use it for the burnt fee in case if a normal tx and as invalidatedBsq in case of an invalid tx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
I think changing the name to burntBsq made it a lot easier to read and understand. Looks like a good solution.
- Check max length of strings and byte arrays - Check that tx ID has 64 chars - Add ExtraDataMapValidator for validating extraDataMap fields
- It is more safe to separate the BTC_DAO_TESTNET and BTC_DAO_REGTEST by the network ID as that prevents on the P2P network layer that the network could interconnect. We would have risked that we receive network data from the other network as users would use the persisted peers for connections.
# Conflicts: # core/src/main/resources/i18n/displayStrings_de.properties # core/src/main/resources/i18n/displayStrings_el.properties # core/src/main/resources/i18n/displayStrings_es.properties # core/src/main/resources/i18n/displayStrings_fa.properties # core/src/main/resources/i18n/displayStrings_fr.properties # core/src/main/resources/i18n/displayStrings_hu.properties # core/src/main/resources/i18n/displayStrings_pt.properties # core/src/main/resources/i18n/displayStrings_ro.properties # core/src/main/resources/i18n/displayStrings_ru.properties # core/src/main/resources/i18n/displayStrings_sr.properties # core/src/main/resources/i18n/displayStrings_th.properties # core/src/main/resources/i18n/displayStrings_vi.properties # core/src/main/resources/i18n/displayStrings_zh.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
common/src/main/java/bisq/common/util/ExtraDataMapValidator.java
Outdated
Show resolved
Hide resolved
Last commits have been rather trivial, but you are welcome to review them post merge as well. |
Build error is prob caused due cache issue. Local build works and witness has not changed. Pushed anotehr change to trigger re-build. |
Latest changes also look good. |
No description provided.