Only prune finalized randomness entries#305
Merged
GabrielMartinezRodriguez merged 1 commit intomasterfrom Feb 4, 2025
Merged
Conversation
10 tasks
Contributor
Author
This was referenced Dec 11, 2024
Merged
Deploying happychain with
|
| Latest commit: |
984cfaa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9cc5c283.happychain.pages.dev |
| Branch Preview URL: | https://gabriel-purge-only-finalized.happychain.pages.dev |
not-reed
reviewed
Dec 11, 2024
| db | ||
| .deleteFrom("randomnesses") | ||
| .where("timestamp", "<", Number(latestBlockTimestamp) - COMMITMENT_PRUNE_INTERVAL_SECONDS) | ||
| .where("status", "in", FINALIZED_STATUSES) |
Contributor
There was a problem hiding this comment.
mentioned in the other PR also, but do you want to prune this.map here as well?
Merged
10 tasks
49be5b0 to
24dcb68
Compare
01da5ee to
ba183a3
Compare
Merged
10 tasks
24dcb68 to
3120be0
Compare
ba183a3 to
ca30fab
Compare
This was referenced Dec 26, 2024
3120be0 to
9f8388b
Compare
ca30fab to
f6a31c2
Compare
9f8388b to
4497b70
Compare
f6a31c2 to
61ad460
Compare
4497b70 to
2d677a8
Compare
61ad460 to
b978102
Compare
norswap
approved these changes
Jan 12, 2025
2d677a8 to
655bb79
Compare
b978102 to
6d9f11e
Compare
655bb79 to
a1816a7
Compare
a1816a7 to
a979cc1
Compare
6d9f11e to
f2fa829
Compare
This was referenced Jan 22, 2025
a979cc1 to
c29c18f
Compare
f2fa829 to
db0bad1
Compare
This was referenced Jan 22, 2025
c29c18f to
aea40f9
Compare
db0bad1 to
05c9ca0
Compare
Merged
10 tasks
aea40f9 to
1c39543
Compare
05c9ca0 to
ee38780
Compare
1c39543 to
d6af5a2
Compare
ee38780 to
984cfaa
Compare
This was referenced Feb 5, 2025
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Linked Issues
Description
Added a new constant
FINALIZED_STATUSESto track completed randomness states and modified the pruning logic to only remove entries that have reached a final status. This prevents premature deletion of active randomness entries.Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Correctness
C1. Builds and passes tests.
C2. The code is properly parameterized & compatible with different environments (e.g. local,
testnet, mainnet, standalone wallet, ...).
C3. I have manually tested my changes & connected features.
C4. I have performed a thorough self-review of my code after submitting the PR,
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.