6 releases (breaking)
0.5.0 | Nov 6, 2024 |
---|---|
0.4.0 | Oct 20, 2024 |
0.3.0 | Oct 18, 2024 |
0.2.0 | Oct 15, 2024 |
0.0.0-release | Oct 9, 2024 |
#875 in Magic Beans
754 downloads per month
Used in 4 crates
37KB
667 lines
essential-builder-db
The Essential builder database.
lib.rs
:
The database API for the block builder's solution pool and related storage.
The essential-builder-db
crate provides a simple database API for managing the block
builder's solution pool and related storage, using SQLite as the underlying database. It allows
you to store, query, and delete solutions, as well as manage solution submissions with
timestamps.
Overview
create_tables
: Creates all required tables in the database.insert_solution_submission
: Inserts a solution and its associated submission timestamp.insert_solution_failure
: Records a failure to apply a solution to a block.get_solution
: Retrieves a solution by its content address.list_solutions
: Lists all solutions that were submitted within a given time range.list_submissions
: Lists submissions based on timestamp.latest_solution_failures
: Queries the latest failures for a given solution.delete_solution
: Deletes a solution and its submissions given the solution's address.delete_oldest_solution_failures
: Deletes the oldest solution failures until the stored number is within a given limit.
Dependencies
~29MB
~477K SLoC