Skip to content

feat: queue discovered deposit signatures in stable memory#165

Draft
lpahlavi wants to merge 1 commit intomainfrom
lpahlavi/defi-2780-discovered-signatures-queue
Draft

feat: queue discovered deposit signatures in stable memory#165
lpahlavi wants to merge 1 commit intomainfrom
lpahlavi/defi-2780-discovered-signatures-queue

Conversation

@lpahlavi
Copy link
Copy Markdown
Contributor

Summary

  • Adds a StorableSignature newtype wrapping solana_signature::Signature with a fixed-size Storable impl (64 bytes)
  • Introduces a new stable-memory structure DISCOVERED_SIGNATURES: StableBTreeMap<(Account, StorableSignature), ()> (Memory ID 4) to queue all signatures returned by getSignaturesForAddress calls
  • Replaces the TODO(DEFI-2780) placeholder in poll_account with code that inserts each discovered (account, signature) pair into the queue
  • The queue is never consumed in this PR — processing discovered deposits will be implemented in a follow-up

Test plan

  • All existing unit tests pass (cargo test -p cksol_minter)
  • The queue is populated on each successful getSignaturesForAddress response
  • Entries are automatically deduplicated (BTreeMap semantics)
  • No new events are emitted — this is purely a stable-memory side effect

🤖 Generated with Claude Code

@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-exponential-backoff-polling branch 4 times, most recently from a140a23 to dd314a6 Compare April 22, 2026 06:28
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-discovered-signatures-queue branch 2 times, most recently from 4c08e30 to 876c4b0 Compare April 23, 2026 11:01
@lpahlavi lpahlavi changed the base branch from lpahlavi/defi-2780-exponential-backoff-polling to main April 24, 2026 06:20
When `getSignaturesForAddress` returns signatures for a monitored
account, enqueue them in a stable BTreeMap instead of discarding them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 24, 2026 06:59
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-discovered-signatures-queue branch from 876c4b0 to 513a08a Compare April 24, 2026 06:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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