Fix docker and deps (#3978)

## Proposed Changes

- Fix this cargo-audit failure for `sqlite3-sys`: https://github.com/sigp/lighthouse/actions/runs/4179008889/jobs/7238473962
- Prevent the Docker builds from running out of RAM on CI by removing `gnosis` and LMDB support from the `-dev` images (see: https://github.com/sigp/lighthouse/pull/3959#issuecomment-1430531155, successful run on my fork: https://github.com/michaelsproul/lighthouse/actions/runs/4179162480/jobs/7239537947).
This commit is contained in:
Michael Sproul
2023-02-15 11:51:46 +00:00
parent 8dd9249177
commit 2fcfdf1a01
5 changed files with 40 additions and 54 deletions

View File

@@ -12,9 +12,9 @@ path = "tests/main.rs"
[dependencies]
tempfile = "3.1.0"
types = { path = "../../consensus/types" }
rusqlite = { version = "0.25.3", features = ["bundled"] }
rusqlite = { version = "0.28.0", features = ["bundled"] }
r2d2 = "0.8.9"
r2d2_sqlite = "0.18.0"
r2d2_sqlite = "0.21.0"
serde = "1.0.116"
serde_derive = "1.0.116"
serde_json = "1.0.58"

View File

@@ -162,8 +162,8 @@ impl SlashingDatabase {
/// The exclusive locking mode also has the benefit of applying to other processes, so multiple
/// Lighthouse processes trying to access the same database will also be blocked.
fn apply_pragmas(conn: &mut rusqlite::Connection) -> Result<(), rusqlite::Error> {
conn.pragma_update(None, "foreign_keys", &true)?;
conn.pragma_update(None, "locking_mode", &"EXCLUSIVE")?;
conn.pragma_update(None, "foreign_keys", true)?;
conn.pragma_update(None, "locking_mode", "EXCLUSIVE")?;
Ok(())
}