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

Add memory cleaning to the BitcoinAgent #14

Open
Benjamin-Loison opened this issue Oct 13, 2022 · 0 comments
Open

Add memory cleaning to the BitcoinAgent #14

Benjamin-Loison opened this issue Oct 13, 2022 · 0 comments
Labels
discussion The task has to be more precisely scoped or the task is waiting details. enhancement New feature or request epic A task that is going to take more than a day to complete. high priority Issue disabling the user to use a feature correctly.

Comments

@Benjamin-Loison
Copy link
Owner

Benjamin-Loison commented Oct 13, 2022

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.

@Benjamin-Loison Benjamin-Loison added the enhancement New feature or request label Oct 13, 2022
@Benjamin-Loison Benjamin-Loison added high priority Issue disabling the user to use a feature correctly. epic A task that is going to take more than a day to complete. discussion The task has to be more precisely scoped or the task is waiting details. labels Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion The task has to be more precisely scoped or the task is waiting details. enhancement New feature or request epic A task that is going to take more than a day to complete. high priority Issue disabling the user to use a feature correctly.
Projects
None yet
Development

No branches or pull requests

1 participant