Skip to content

Add memory cleaning to the BitcoinAgent #14

@Benjamin-Loison

Description

@Benjamin-Loison

ecdsa_pub_key_addresses and utxos_state_addresses of the BitcoinAgent are already manageable with add_address_with_parameters, add_address, remove_address and list_addresses.

However for caches required for transfer, update_transaction and transaction_status, we need some functions to clean them. The canister developer can already by using get_state and from_state modify them but we want to provide a clean way to do this. We could for instance propose a function cleaning caches entries older than a given number of confirmations.

Even if there will already be some auto-cleanup, for instance let say we have a cache with the time when we sent a transaction to support transaction_status. Once the transaction was confirmed in a block, then we can remove it from this cache because we don’t anymore have to check for time out.

We have to take care when cleaning not to invalidate assumptions that we do when manipulating these caches otherwise the BitcoinAgent's memory would end up corrupted.

Related to #5, #6 and #13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe task has to be more precisely scoped or the task is waiting details.enhancementNew feature or requestepicA task that is going to take more than a day to complete.high priorityIssue disabling the user to use a feature correctly.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions