You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of our current integrations use some form of sql-like database (Liana, bullbitcoin, bitcoin-core wallet, cake(?)). Payjoin-cli should migrate from sled to sqlite3 so our reference can continue to serve as an example for downstream wallet developers. Not a high priority. Wanted to make a note of this before I forget.
The crate by the name of sqlite3 is 7 years old and unmaintained, so I'm assuming you just mean the actual database. Seems like we could use a slightly older version of rusqlite 0.29 to make this happen
@Mshehu5 thanks for volunteering!
I want to be clear about what the expected outcome. For both the receiver and sender there should be two tables:
Sessions: includes a primary key. IIRC in payjoin-cli today we call it session id and a completed_at timestamp which serves as a indicator for whether or not the session is closed.
Session events. When the session persister's save_event is invoke it should add a row to this table. Session events should include some form of created_at timestamp so they are sortable when we load them in the session persister. Lastly this table should have a fk relationship with the sessions table.
Activity
[-]Migrate payjoin-cli db to sqlite3[/-][+]Migrate payjoin-cli Sled db to sqlite3[/+]DanGould commentedon Jul 10, 2025
The crate by the name of sqlite3 is 7 years old and unmaintained, so I'm assuming you just mean the actual database. Seems like we could use a slightly older version of rusqlite 0.29 to make this happen
arminsabouri commentedon Jul 10, 2025
Yes Thanks for pointing that out. sqlite3 the binary not the library. The library I have used is rustqlite with r2d2 for the connection pool
nothingmuch commentedon Jul 10, 2025
FWIW ldk-node uses 0.31.0, IIUC that specific version of rusqlite is also in use in other projects and supports the MSRV of 1.63
Mshehu5 commentedon Jul 11, 2025
I'd like to handle this issue
arminsabouri commentedon Jul 11, 2025
@Mshehu5 thanks for volunteering!
I want to be clear about what the expected outcome. For both the receiver and sender there should be two tables:
completed_attimestamp which serves as a indicator for whether or not the session is closed.save_eventis invoke it should add a row to this table. Session events should include some form ofcreated_attimestamp so they are sortable when we load them in the session persister. Lastly this table should have a fk relationship with the sessions table.