[bisq-network/bisq] Add signed witness filter (#4124)

sqrrm notifications at github.com
Mon Apr 6 14:58:05 UTC 2020

- Add a filter to pubkeys used in AccountAgeWitness signing
- Fix inverted arbitrator signing of initial account age witnesses from
- Add test to verify that signed witness filter works
- Add test to verify that the arbitrator signing was fixed

This PR adds a filter to signed witness pubkeys, which are used as the identifier in the signing tree. If  a pubkey is filtered the witnesses dependent on that key will also be invalidated.

  |        |
  w1'      w2
 /  \     /  \
w3' w4'  w5  w6'
|   |    |   |  \
w7' w8'  w9  wA' wB'
w1 and w6 are filtered, causing all dependent witnesses to be filtered as well (all the prime `'` witnesses in the graph). In this example only w2, w5 and w9 are still considered signed.

#### Bad data fix
A fix to how already signed witnesses are retrieved (`SignedWitnessService.getVerifiedWitnessDateList`) also affects cases where some data in the signed tree is missing, as seen in #3931.

The extra check
        if (!isSignedAccountAgeWitness(accountAgeWitness)) {
            return new ArrayList<>();
will cause a verification each time rather than allowing to start a trade without checking and later being surprised that the counterparty isn't signed.

For now this will likely cause some issues for the CAD market for people that have already signed  accounts but that are missing an ancestor signed witness data item. It will avoid any surprises with users not getting signed where they expect it though.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Add signed witness filter

-- File Changes --

    M core/src/main/java/bisq/core/account/sign/SignedWitnessService.java (40)
    M core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java (68)
    M core/src/main/java/bisq/core/filter/Filter.java (20)
    M core/src/main/java/bisq/core/filter/FilterManager.java (10)
    M core/src/main/resources/i18n/displayStrings.properties (3)
    M core/src/test/java/bisq/core/account/sign/SignedWitnessServiceTest.java (147)
    M core/src/test/java/bisq/core/account/witness/AccountAgeWitnessServiceTest.java (175)
    M core/src/test/java/bisq/core/user/UserPayloadModelVOTest.java (1)
    M desktop/src/main/java/bisq/desktop/main/overlays/windows/FilterWindow.java (7)
    M desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java (7)
    M proto/src/main/proto/pb.proto (1)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200406/59f119eb/attachment.html>

More information about the bisq-github mailing list