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

Add irregular txType, add check for total balance, prevent proposal withhold attack #2587

Merged

Commits on Mar 26, 2019

  1. Configuration menu
    Copy the full SHA
    c20964f View commit details
    Browse the repository at this point in the history
  2. Add IRREGULAR txType for txs which are not rule conform but not burnt

    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.
    ManfredKarrer committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    ce1da64 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' into add-check-for-bsq-balance

    # Conflicts:
    #	desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java
    ManfredKarrer committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    ff86831 View commit details
    Browse the repository at this point in the history
  4. Update core/src/main/java/bisq/core/dao/governance/votereveal/VoteRev…

    …ealService.java
    
    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    3d5ff1c View commit details
    Browse the repository at this point in the history
  5. Update core/src/main/java/bisq/core/dao/governance/votereveal/VoteRev…

    …ealService.java
    
    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    83b7ed9 View commit details
    Browse the repository at this point in the history
  6. Update core/src/main/java/bisq/core/dao/node/parser/TxParser.java

    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 26, 2019
    Configuration menu
    Copy the full SHA
    a3e1e67 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2019

  1. Update desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/B…

    …sqDashboardView.java
    
    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    2758db5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7479b88 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    121c0f6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf83687 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8016f45 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    793d006 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1bd6f03 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    999fe85 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fa8b8c5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c1edc62 View commit details
    Browse the repository at this point in the history
  11. Add log for seeds

    ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    73b0a17 View commit details
    Browse the repository at this point in the history
  12. Merge branch 'master' into add-check-for-bsq-balance

    # Conflicts:
    #	core/src/main/resources/i18n/displayStrings.properties
    #	desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java
    ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    c6947ba View commit details
    Browse the repository at this point in the history
  13. Remove unused param

    ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    8704ba9 View commit details
    Browse the repository at this point in the history
  14. Update core/src/main/java/bisq/core/dao/governance/param/Param.java

    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    af3aedb View commit details
    Browse the repository at this point in the history
  15. Update core/src/main/java/bisq/core/dao/governance/param/Param.java

    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    f0787d8 View commit details
    Browse the repository at this point in the history
  16. Update core/src/main/java/bisq/core/dao/governance/param/Param.java

    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    9202d28 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2019

  1. Improve formatting

    ManfredKarrer committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    499d91e View commit details
    Browse the repository at this point in the history
  2. Cleanup, add string

    ManfredKarrer committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    f3ad4ea View commit details
    Browse the repository at this point in the history
  3. Protect against proposal withhold attack

    Set proposals which have been not included in the blind vote but which
    have been later published and are part if the cycles proposals to
    rejected.
    A malicious voter could manipulate the software to withhold publishing
    of his proposal and be the only voter on it. At the last block in the
    blind vote phase he could publish the proposal but others cannot vote
    anymore as they likely have already voted. In the vote result the
    other voters would have treated it like ignored and if the voter had
    enough BSQ to pass the quorum he could get accepted his proposal.
    With this change we set all proposals which are not part in the blind
    vote data but found in the cycle's ballot list as rejected.
    ManfredKarrer committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    39ee4c0 View commit details
    Browse the repository at this point in the history
  4. Update core/src/main/java/bisq/core/dao/governance/voteresult/VoteRes…

    …ultService.java
    
    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    c3a8c27 View commit details
    Browse the repository at this point in the history
  5. Update core/src/main/java/bisq/core/dao/governance/voteresult/VoteRes…

    …ultService.java
    
    Co-Authored-By: ManfredKarrer <mk@nucleo.io>
    sqrrm and ManfredKarrer committed Mar 28, 2019
    Configuration menu
    Copy the full SHA
    24811ff View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2019

  1. Fix if else case

    ManfredKarrer committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    695ed13 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96a20ae View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' into add-check-for-bsq-balance

    # Conflicts:
    #	core/src/main/resources/i18n/displayStrings.properties
    ManfredKarrer committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    18a3f1e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    acf2648 View commit details
    Browse the repository at this point in the history
  5. Add random delay for proposalPayload publishing

    We want to avoid that all nodes publish at the same time all proposals,
    so we add a random delay from 100 ms - 5 sec.
    A more sophisticated protection would be probably good but that delay
    should help to avoid network spikes and is simple enough to not add
    risks that the publishing would fail.
    ManfredKarrer committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    bb7ff47 View commit details
    Browse the repository at this point in the history
  6. Cleanup

    ManfredKarrer committed Mar 29, 2019
    Configuration menu
    Copy the full SHA
    30059eb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    995844f View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2019

  1. Configuration menu
    Copy the full SHA
    a08b910 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bec73dc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4b11e58 View commit details
    Browse the repository at this point in the history
  4. Improve Merit handling

    - We add a filter to the getMeritStake method to avoid an exception at
    getWeightedMeritAmount which would set merits to 0 in case the issuance
    height blind would be larger than the vote height. I saw that error log
    but could not reproduce it afterwards. It basically protects that we do
    not add the issuance of the current cycle to the merit used in the
    blind vote of that cycle.
    
    - We add 1 block in the getCurrentlyAvailableMerit method to get the
    same merit value if the blind vote was included in the next block.
    ManfredKarrer committed Mar 30, 2019
    Configuration menu
    Copy the full SHA
    d5c7e0a View commit details
    Browse the repository at this point in the history
  5. Use onParseBlockCompleteAfterBatchProcessing to avoid sequence issues

    When using onParseBlockChainComplete and
    onParseBlockCompleteAfterBatchProcessing the
    onParseBlockCompleteAfterBatchProcessing is called earlier as
    onParseBlockChainComplete which caused incorrect state update in the UI.
    ManfredKarrer committed Mar 30, 2019
    Configuration menu
    Copy the full SHA
    a28805b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a71a573 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1e6f0bf View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b39c8be View commit details
    Browse the repository at this point in the history
  9. Fix comment

    ManfredKarrer committed Mar 30, 2019
    Configuration menu
    Copy the full SHA
    e2d9fe1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    69b134b View commit details
    Browse the repository at this point in the history
  11. Handle merits better

    We did not update the merit correctly in case there was no proposal
    selected.
    ManfredKarrer committed Mar 30, 2019
    Configuration menu
    Copy the full SHA
    d422a73 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    823cec0 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2019

  1. Use burnedBsq field in Tx for burnedFee and invalidatedBsq

    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.
    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    d5fc7cb View commit details
    Browse the repository at this point in the history
  2. Add string validations

    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    fe646e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e624625 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    122bc80 View commit details
    Browse the repository at this point in the history
  5. Add more validation

    - Check max length of strings and byte arrays
    - Check that tx ID has 64 chars
    - Add ExtraDataMapValidator for validating extraDataMap fields
    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    73db81a View commit details
    Browse the repository at this point in the history
  6. Add BTC_DAO_TESTNET again to keep supporting current dao testnet

    - 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.
    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    c7bd2ee View commit details
    Browse the repository at this point in the history
  7. Merge branch 'master' into add-check-for-bsq-balance

    # 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
    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    fa3ec34 View commit details
    Browse the repository at this point in the history
  8. Add BTC_DAO_TESTNET

    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    431f76e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e74ce12 View commit details
    Browse the repository at this point in the history
  10. Cleanup

    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    30a710f View commit details
    Browse the repository at this point in the history
  11. Update comment

    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    dad4b04 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4d56ce9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e9e4b49 View commit details
    Browse the repository at this point in the history
  14. Break up lines

    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    0e2bb14 View commit details
    Browse the repository at this point in the history
  15. Update witness file

    ManfredKarrer committed Mar 31, 2019
    Configuration menu
    Copy the full SHA
    f95f770 View commit details
    Browse the repository at this point in the history