-
Notifications
You must be signed in to change notification settings - Fork 0
Add memory cleaning to the BitcoinAgent #14
Copy link
Copy link
Open
Labels
discussionThe task has to be more precisely scoped or the task is waiting details.The task has to be more precisely scoped or the task is waiting details.enhancementNew feature or requestNew feature or requestepicA task that is going to take more than a day to complete.A task that is going to take more than a day to complete.high priorityIssue disabling the user to use a feature correctly.Issue disabling the user to use a feature correctly.
Metadata
Metadata
Assignees
Labels
discussionThe task has to be more precisely scoped or the task is waiting details.The task has to be more precisely scoped or the task is waiting details.enhancementNew feature or requestNew feature or requestepicA task that is going to take more than a day to complete.A task that is going to take more than a day to complete.high priorityIssue disabling the user to use a feature correctly.Issue disabling the user to use a feature correctly.
ecdsa_pub_key_addressesandutxos_state_addressesof theBitcoinAgentare already manageable withadd_address_with_parameters,add_address,remove_addressandlist_addresses.However for caches required for transfer,
update_transactionandtransaction_status, we need some functions to clean them. The canister developer can already by usingget_stateandfrom_statemodify 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.