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

SDFSOF-70: RPC Actions - Integration and End2End tests #1048

Merged

Conversation

MazurakIhor
Copy link
Contributor

@MazurakIhor MazurakIhor commented Aug 9, 2023

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    paymentservice.stellar, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.

What

  • RPC batch size limit - 40 methods per request.
  • memo + memo_type validation for Custody services(Fireblocks, for example, doesn't support hash memo_type):
    • For SEP-24 validation occurs during transaction creation and request_onchain_funds RPC request.
    • For SEP-31 validation occurs during transaction creation.
  • Integration tests for RPC endpoint, that cover different SEP-24/SEP-31 flows.
  • Integration tests for refund endpoint from Custody Server.
  • 3 more End2End tests. They are quite similar, but have different configs for Kotlin Reference Server/Anchor Platform/Custody Server:
    • AnchorPlatformActionsEnd2EndTest - custody integration disabled / RPC enabled
    • AnchorPlatformCustodyActionsEnd2EndTest - custody integration enabled / RPC enabled
    • AnchorPlatformCustodyEnd2EndTest - custody integration enabled / RPC disabled
    • AnchorPlatformEnd2EndTest(existing) - custody integration disabled / RPC disabled

Why

  • Tests should validate SEP-24/SEP-31 flows
  • We should limit batch size to prevent internal/custody errors
  • Some custody services, for example Fireblocks, may not support some memo types, for example hash

MazurakIhor and others added 30 commits August 2, 2023 18:49
### What

Custody refunds

### Why

Custody Services should support refunds for `do_stellar_refund` action
SDFSOF-121 - Updated logic to use lastUpdatedAt instead of createdAt

What
Fixed an issue that custody_transaction's updated_at timestamp might be updated back in time

Why
updated_at should contain the last update at timestamp
…ent the ignores refund object params, making a payment of amount)expected value instead (#5)

### What

Custody transaction payment type fix

### Why

Refund custody transaction has invalid payment type
…ent the ignores refund object params, making a payment of amount)expected value instead (#6)

### What

Custody transaction refund fix

### Why

Custody transaction refund is created incorrectly
rkharevych and others added 13 commits August 8, 2023 21:55
### What

Memo type validation for custody services

### Why

Some custody services, for example Fireblocks, may not support some memo types, for example `hash`
### What

Refund memo type validation for custody services

### Why

Some custody services, for example Fireblocks, may not support some memo types, for example `hash`
SDFSOF-70: RPC Actions - Integration and End2End tests

What
Integration and End2End tests for RPC actions

Why
Tests should validate SEP-24/SEP-31 flows
@stellar-jenkins
Copy link

Reference Server Preview is available here:
https://anchor-ref-pr1048.previews.kube001.services.stellar-ops.com/
SEP Server Preview is available here:
https://anchor-sep-pr1048.previews.kube001.services.stellar-ops.com/

@MazurakIhor MazurakIhor requested a review from Ifropc August 9, 2023 13:11
### What

RPC batch size limit

### Why

We should limit batch size to prevent internal/custody errors
@stellar-jenkins
Copy link

Reference Server Preview is available here:
https://anchor-ref-pr1048.previews.kube001.services.stellar-ops.com/
SEP Server Preview is available here:
https://anchor-sep-pr1048.previews.kube001.services.stellar-ops.com/

@MazurakIhor MazurakIhor merged commit 3ae916b into stellar:softserve-develop Aug 17, 2023
5 checks passed
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.

4 participants