Add SQLite persistence to randomness service - #300
Merged
Conversation
Contributor
Author
This was referenced Dec 9, 2024
GabrielMartinezRodriguez
marked this pull request as ready for review
December 9, 2024 16:22
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
GabrielMartinezRodriguez
force-pushed
the
gabriel/txm-timeout
branch
from
December 20, 2024 11:30
0f3cbd7 to
7bd3300
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
December 20, 2024 11:31
9dba2dd to
bec7632
Compare
Merged
10 tasks
GabrielMartinezRodriguez
force-pushed
the
gabriel/txm-timeout
branch
from
December 26, 2024 10:14
7bd3300 to
ade9e83
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
December 26, 2024 10:14
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.
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
GabrielMartinezRodriguez
force-pushed
the
gabriel/txm-timeout
branch
from
January 6, 2025 15:31
ade9e83 to
ba1b173
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
January 6, 2025 15:58
93102a3 to
dcd504e
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/txm-timeout
branch
from
January 7, 2025 09:50
a599824 to
3674db3
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
January 7, 2025 09:50
dcd504e to
fd50c3c
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
January 13, 2025 13:20
43e31a4 to
cafd33b
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
January 14, 2025 13:53
d9bce85 to
67feadc
Compare
GabrielMartinezRodriguez
force-pushed
the
gabriel/db-randomnes-service
branch
from
January 21, 2025 11:39
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
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
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