-
Notifications
You must be signed in to change notification settings - Fork 2
Add SQLite persistence to randomness service #300
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
Merged
GabrielMartinezRodriguez
merged 10 commits into
master
from
gabriel/db-randomnes-service
Jan 21, 2025
Merged
Add SQLite persistence to randomness service #300
GabrielMartinezRodriguez
merged 10 commits into
master
from
gabriel/db-randomnes-service
Jan 21, 2025
Conversation
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
Contributor
Author
This was referenced Dec 9, 2024
Deploying happychain with
|
| Latest commit: |
3dc92b0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://29f72172.happychain.pages.dev |
| Branch Preview URL: | https://gabriel-db-randomnes-service.happychain.pages.dev |
This was referenced Dec 10, 2024
Merged
not-reed
approved these changes
Dec 11, 2024
Merged
10 tasks
aodhgan
reviewed
Dec 18, 2024
aodhgan
reviewed
Dec 18, 2024
aodhgan
reviewed
Dec 18, 2024
0f3cbd7 to
7bd3300
Compare
9dba2dd to
bec7632
Compare
Merged
10 tasks
7bd3300 to
ade9e83
Compare
bec7632 to
93102a3
Compare
This was referenced Dec 26, 2024
norswap
reviewed
Jan 5, 2025
| import type { CommitmentInfo } from "../CommitmentManager" | ||
|
|
||
| export interface CommitmentInfoTable { | ||
| // The timestamp is stored as a number because Kisely automatically converts bigint to number |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how we can change it: https://github.com/WiseLibs/better-sqlite3/blob/master/docs/integer.md#getting-bigints-from-the-database
I don't think this is Kisely specific, as indicated here: https://kysely.dev/docs/recipes/data-types#configuring-runtime-javascript-types
ade9e83 to
ba1b173
Compare
93102a3 to
dcd504e
Compare
a599824 to
3674db3
Compare
dcd504e to
fd50c3c
Compare
43e31a4 to
cafd33b
Compare
d9bce85 to
67feadc
Compare
67feadc to
3dc92b0
Compare
This was referenced Jan 22, 2025
This was referenced Feb 3, 2025
Merged
This was referenced Feb 11, 2025
Closed
11 tasks
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
Adds SQLite persistence to the randomness service for storing commitments. This ensures commitments are not lost on service restart and enables proper pruning of old commitments.
Key changes:
Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Correctness
Tested with:
Scenarios tested:
Service startup with empty database
Service startup with existing commitments
Commitment persistence across restarts
Automatic pruning of old commitments
C4. I have performed a thorough self-review of my code.
Architecture & Documentation