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

Cancellation Message Types #52

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Cancellation Message Types #52

wants to merge 7 commits into from

Conversation

havan
Copy link
Member

@havan havan commented Oct 26, 2024

Summary of Changes

  1. buf.yaml

    • Expanded ignore_only lint configuration to include proto/cmp/services/notification/v2/notify.proto under RPC_REQUEST_STANDARD_NAME. (To allow empty responses for the notification endpoints)
  2. Cancellation Service Protos:

    • Added multiple .proto files for handling various aspects of cancellation services within proto/cmp/services/cancellation/v1/:
      • accept.proto: Defines AcceptCancellationRequest and AcceptCancellationResponse messages for accepting cancellation requests.
      • accept_counter.proto: Defines AcceptCounterCancellationRequest and AcceptCounterCancellationResponse messages for accepting countered cancellations.
      • cancel_proposal.proto: Defines CancelCancellationRequest and CancelCancellationResponse for active cancellation proposal cancellations.
      • counter.proto: Defines CounterCancellationRequest and CounterCancellationResponse for countering cancellations.
      • initiate.proto: Defines InitiateCancellationRequest and InitiateCancellationResponse for initiating cancellation requests.
      • reject.proto: Defines RejectCancellationRequest and RejectCancellationResponse with a detailed CancellationRejectionReason enum to cover various rejection scenarios.
      • check.proto: Defines CheckCancellationRequest, CheckCancellationResponse and the related CheckCancellationService.
    • A new services.proto file under v1 includes the CancellationService, which unifies the above functionalities under defined RPC methods.
  3. Notification Service Updates:

    • Updated proto/cmp/services/notification/v1/notify.proto with a diagram link for service documentation.
    • Added a new NotificationService version under proto/cmp/services/notification/v2/notify.proto to expand notification events related to cancellation:
      • Added new notification message types to cover different stages and outcomes of cancellation processes:
        • CancellationPending
        • CancellationAccepted
        • CancellationProposalAcceptedByTheOwner
        • CancellationCountered
        • CancellationProposalCancelled
        • CancellationRejected

@havan havan marked this pull request as ready for review October 28, 2024 10:14
// Response header
cmp.types.v1.ResponseHeader header = 1;

// Accept counter cancellation transaction ID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Accept counter cancellation transaction ID
// Accept counter cancellation on-chain transaction ID for registration of the event to avoid disputes

// Response header
cmp.types.v1.ResponseHeader header = 1;

// Accept cancellation transaction ID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Accept cancellation transaction ID
// Accept counter cancellation on-chain transaction ID for registration of the event to avoid disputes

// Response Header
cmp.types.v1.ResponseHeader header = 1;

// Transaction id for the rejected cancellation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Transaction id for the rejected cancellation
// On-chain transaction id for the rejected cancellation for registration of the event to avoid disputes


// The amount to be refunded
cmp.types.v2.Price refund_amount = 3;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add field with enum for cancellation reason


// Cancellation token ID
uint64 token_id = 2;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add reason to cancel the cancellation with an enum

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

Successfully merging this pull request may close these issues.

2 participants