[bisq-network/bisq] Check isPubKeyValid only if message is one we are listening for. (#5196)

jmacxx notifications at github.com
Tue Feb 16 18:07:39 CET 2021


The order of checks was wrong.

PRE: it was checking the SignaturePubKey for messages that were handled by other subsystems or other trades.
POST: make sure that this is a relevant message before checking that its signature matches the trade.

---

### To reproduce the issue:

1. Have 3 Bisq instances: Alice, Bob, and Chris.
2. Alice creates an offer to buy.
3. Bob and Chris both consider taking the offer => Alice receives normal "OfferAvailabilityRequest" messages from them.
4. Bob takes the offer, initiating a trade with Alice.
5. Alice creates another offer.
6. Chris considers taking the offer => Alice logs 2 error messages `SignaturePubKey in message does not match`.
7. Anyone other than Bob considers taking the offer => Alice logs the same error messages.
8. Anyone other than Bob trades with Alice => Alice logs the same error messages.

### Verification:

After the fix, trades can be executed simultaneously between any number of peers without the error being logged.

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5196

-- Commit Summary --

  * Check isPubKeyValid only if message is one we are listening for.

-- File Changes --

    M core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java (6)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5196.patch
https://github.com/bisq-network/bisq/pull/5196.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5196
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210216/1d95ef2f/attachment.htm>


More information about the bisq-github mailing list