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

Prune Cardano transactions stored on signer #1645

Closed
3 tasks done
jpraynaud opened this issue Apr 22, 2024 · 0 comments · Fixed by #1685
Closed
3 tasks done

Prune Cardano transactions stored on signer #1645

jpraynaud opened this issue Apr 22, 2024 · 0 comments · Fixed by #1685
Assignees
Labels
feature 🚀 New implemented feature

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Apr 22, 2024

Why

In order to provide minimum footprint of the signer nodes on the SPO infrastructure, we want to keep stored only the minimum transactions needed to enable consistent signature.

What

Prune transactions which are older than the Cardano k security parameter (i.e number of blocks after which the blocks are immutable) and which have corresponding block range roots stored in the database.

Warning

The k parameter is a genesis parameter that may be different depending on the network. In a first implementation we will fix the parameter given the Cardano network for simplicity, and we will probably use the protocol parameters in a second implementation to get access to the value. The k value for mainnet is 2160.

How

  • Implement a decorator for TransactionImporter trait that does the pruning of transactions in the signer
  • Make prune transactions with block number that is strictly less than MAX(block_range_root.start) - k
  • Make k security parameter (which represents the number of blocks to keep) configurable for the signer (with an value with default of 2160)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 New implemented feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants