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

[Feature]: Add timestamps and sorting by time to Dynamo entities #1266

Open
4 tasks
Jiloc opened this issue Jan 24, 2025 · 0 comments
Open
4 tasks

[Feature]: Add timestamps and sorting by time to Dynamo entities #1266

Jiloc opened this issue Jan 24, 2025 · 0 comments
Labels
emily API that communicates with Signers to trigger sBTC operations.

Comments

@Jiloc
Copy link
Collaborator

Jiloc commented Jan 24, 2025

Feature: Add timestamps and sorting by time to Dynamo entities

1. Description

Deposits, Withdrawals, request updates, Chainstates, etc., are always created without a timestamp. To support better sorting and pagination, it would be good to have created_at and modified_at timestamps associated with them.

1.1 Context & Purpose

Providing timestamps will help signers handle with pagination of requests.

2. Technical Details:

  • Add created_at and modified_at fields to all relevant entities (e.g., Deposits, Withdrawals, Updates, Chainstates).
  • Ensure modified_at is updated whenever an entity is modified.
  • Support sorting and pagination of all deposits and withdrawal endpoints using the new timestamp fields.
  • Migration: Assign timestamps to all existing entities in the database. At minimum, assign the timestamp of the associated Stacks block to created_at.

2.1 Acceptance Criteria:

  • created_at and modified_at timestamps are added to all relevant entities.
  • Timestamps are correctly set and updated in all relevant operations.
  • Existing entities in the database have created_at populated with the timestamp of the associated Stacks block.
  • Sorting and pagination by timestamps are supported and tested.

3. Related Issues and Pull Requests (optional):

#1148

@djordon djordon added this to the sBTC: Nice to have milestone Jan 24, 2025
@Jiloc Jiloc added the emily API that communicates with Signers to trigger sBTC operations. label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emily API that communicates with Signers to trigger sBTC operations.
Projects
None yet
Development

No branches or pull requests

2 participants