[bisq-network/bisq] Add atomic offerpayload (#5127)

sqrrm notifications at github.com
Thu Jan 28 19:24:35 CET 2021


<!-- 
- make yourself familiar with the CONTRIBUTING.md if you have not already (https://github.com/bisq-network/bisq/blob/master/CONTRIBUTING.md)
- make sure you follow our [coding style guidelines][https://github.com/bisq-network/style/issues)
- pick a descriptive title
- provide some meaningful PR description below
- create the PR
- in case you receive a "Change request" and/or a NACK, please react within 30 days. If not, we will close your PR and it can not be up for compensation.
- After addressing the change request, __please re-request a review!__ Otherwise we might miss your PR as we tend to only look at pull requests tagged with a "review required".
-->

Builds on #5121



## Add AtomicOfferPayload

More fields might be needed for AtomicOfferPayload. Proof of work for
offer broadcast and refresh TTL should probably be handled in
StoragePayload or some other wrapper as it would be useful for most
messages.

Offer protobuf has oneof FeeTxOfferPayload and AtomicOfferPayload. Old
clients will be able to handle FeeTxOfferPayloads as they have index 1
but won't be able to parse Offers with any other payload. This is
acceptable as they can still trade with old style payloads but fail to
parse the new ones and log an error instead. Log is however a bit ugly.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Refactor OfferPayload
  * Refactor rename protobuf.OfferPayload -> protobuf.FeeTxOfferPayload
  * Add AtomicOfferPayload

-- File Changes --

    M apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingMarketPriceMarginTest.java (2)
    A core/src/main/java/bisq/core/offer/AtomicOfferPayload.java (287)
    M core/src/main/java/bisq/core/offer/CreateOfferService.java (2)
    A core/src/main/java/bisq/core/offer/FeeTxOfferPayload.java (394)
    M core/src/main/java/bisq/core/offer/Offer.java (95)
    M core/src/main/java/bisq/core/offer/OfferPayload.java (408)
    M core/src/main/java/bisq/core/offer/OpenOfferManager.java (11)
    M core/src/main/java/bisq/core/proto/network/CoreNetworkProtoResolver.java (9)
    M core/src/main/java/bisq/core/support/dispute/DisputeManager.java (4)
    M core/src/main/java/bisq/core/trade/Contract.java (10)
    M core/src/main/java/bisq/core/trade/protocol/tasks/maker/MakerCreateAndSignContract.java (8)
    M core/src/main/java/bisq/core/trade/protocol/tasks/taker/TakerVerifyAndSignContract.java (7)
    M core/src/main/java/bisq/core/trade/statistics/TradeStatistics2.java (14)
    M core/src/test/java/bisq/core/account/witness/AccountAgeWitnessServiceTest.java (4)
    M core/src/test/java/bisq/core/offer/OfferMaker.java (2)
    M core/src/test/java/bisq/core/offer/OfferTest.java (4)
    M core/src/test/java/bisq/core/offer/OpenOfferManagerTest.java (4)
    M core/src/test/java/bisq/core/trade/TradableListTest.java (4)
    M core/src/test/java/bisq/core/util/ProtoUtilTest.java (14)
    M desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModel.java (10)
    M desktop/src/test/java/bisq/desktop/main/market/trades/TradesChartsViewModelTest.java (4)
    M desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookViewModelTest.java (4)
    M desktop/src/test/java/bisq/desktop/maker/OfferMaker.java (3)
    M desktop/src/test/java/bisq/desktop/util/DisplayUtilsTest.java (10)
    M proto/src/main/proto/pb.proto (35)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5127.patch
https://github.com/bisq-network/bisq/pull/5127.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/5127
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210128/b6a4efe6/attachment.htm>


More information about the bisq-github mailing list