Skip to content

[Feature]: Extract and Persist Lock Time and Max Fee from Emily #1591

@Jiloc

Description

@Jiloc

Feature - Extract and Persist Lock Time and Max Fee from Emily

1. Description

Currently, the lock_time and max_fee values are derived on the signer side by parsing the reclaim_script and deposit_script. However, this information is already parsed and available in the DepositInfo returned by Emily's validate function. It would be more efficient and cleaner to persist these fields directly from Emily and return them from the /deposit endpoints.

1.1 Context & Purpose

The goal is to simplify the signer logic and leverage existing parsing work already done by Emily. By including lock_time and max_fee in the GSI on Dynamo (and backfilling them for existing entries), the sidecar, cron and other consumers downstream can access these values directly without re-parsing scripts.

2. Technical Details:

  • Ensure these fields are persisted in the corresponding GSI on DynamoDB.
  • Ensure these new fields are returned from the deposits endpoints
  • Implement a one-time migration script or background job to backfill existing entries in DynamoDB with the new fields. Needs to be executed once per each deployment of Emily
  • Update emily_cron to use the new fields instead of computing them manually.

2.1 Acceptance Criteria:

  • lock_time and max_fee are included in the Deposit information returned by Emily.
  • These fields are written to the DynamoDB GSIs.
  • A migration strategy is in place to populate existing entries.

3. Related Issues and Pull Requests (optional):

Metadata

Metadata

Assignees

No one assigned

    Labels

    emilyAPI that communicates with Signers to trigger sBTC operations.

    Projects

    Status

    Needs Triage

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions