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

[WIP] Add atomic offerpayload #5127

Closed
wants to merge 3 commits into from

Conversation

sqrrm
Copy link
Member

@sqrrm sqrrm commented Jan 28, 2021

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.

sqrrm added 3 commits January 27, 2021 15:16
This is preparatory work for no fee tx offers. There should be no
behavioral changes with this commit.

Split OfferPayload into abstract OfferPayload and FeeTxOfferPayload with
implementation. Instance variables need to reside in FeeTxOfferPayload
in the same order as previously to keep the generated json contract
format.

Contract is still using FeeTxOfferPayload as I don't think Contract
will be used with any other OfferPayload type.

Only FeeTxOfferPayload will have the ability to update capabilities.
It seems better to just delete the old offer and create a new one
if there is no loss in doing so, which there won't be without the
fee tx.
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.
@sqrrm sqrrm changed the title Add atomic offerpayload [WIP] Add atomic offerpayload Jan 28, 2021
@sqrrm sqrrm marked this pull request as draft January 29, 2021 14:17
@stale
Copy link

stale bot commented Jun 2, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Jun 2, 2021
@stale
Copy link

stale bot commented Jun 11, 2021

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

@stale stale bot closed this Jun 11, 2021
@ripcurlx ripcurlx reopened this Jun 11, 2021
@sqrrm sqrrm mentioned this pull request Sep 27, 2021
@sqrrm
Copy link
Member Author

sqrrm commented Sep 27, 2021

Replaced by #5729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants