Repository navigation
v1.5.7 — UNIQUE(idempotency_key) database constraint + schema migration
What's in this release
Database-layer idempotency constraint
Adds UNIQUE(idempotency_key) to the entries table, promoting the duplicate-entry guarantee from application-layer-only to dual-layer enforcement.
Before v1.5.7: The only guard against duplicate idempotency keys was an explicit idempotency_key_exists() check inside post_entry(), running under the exclusive RwLock write guard. Correct within a single process, but invisible at the database layer and not durable against future multi-host deployments. There was no UNIQUE constraint in the schema — only a non-unique index.
From v1.5.7: The constraint is enforced at two independent layers:
- Application layer:
idempotency_key_exists()check inpost_entry()(returns existing sequence to caller — no error) - Database layer:
UNIQUE(idempotency_key)constraint in SQLite (INSERT OR IGNOREsilently skips a duplicate)
Automatic migration — no operator action needed. On first start after upgrade, the server runs a one-time schema migration (version 0 → 1) using SQLite's rename-create-copy-drop pattern in a single atomic transaction. PRAGMA user_version tracks the migration level. The migration is idempotent and crash-safe.
New tests
| Test | What it proves |
|---|---|
schema_version_is_current |
PRAGMA user_version == 1 after open — migration ran |
database_unique_constraint_prevents_duplicate_without_app_layer_check |
Bypasses post_entry entirely; inserts two entries with the same idempotency_key directly via EntryDb::insert(); asserts count stays at 1 |
Total test count: 525 (523 pre-existing + 2 new). Zero failures.
Download
⚠️ Use the exact filenames below. Archives use Rust target triple naming.linux-aarch64returns 404 — the correct name isaarch64-unknown-linux-gnu.✅ Tarballs are clean — built with
COPYFILE_DISABLE=1; no macOS xattr warnings on Linux extraction.
| Platform | wget command |
|---|---|
| Linux x86_64 | wget https://github.com/pavondunbar/VectorLedger/releases/download/v1.5.7/vledger-v1.5.7-x86_64-unknown-linux-gnu.tar.gz |
| Linux ARM64 | wget https://github.com/pavondunbar/VectorLedger/releases/download/v1.5.7/vledger-v1.5.7-aarch64-unknown-linux-gnu.tar.gz |
| macOS ARM64 | wget https://github.com/pavondunbar/VectorLedger/releases/download/v1.5.7/vledger-v1.5.7-aarch64-apple-darwin.tar.gz |
| macOS x86_64 | wget https://github.com/pavondunbar/VectorLedger/releases/download/v1.5.7/vledger-v1.5.7-x86_64-apple-darwin.tar.gz |
Checksums
988ee134dcdccf1814657d4329d0488188ed4e4fac0b5cab6005d4d9aed3296b vledger-v1.5.7-x86_64-unknown-linux-gnu.tar.gz
23e6ca8f5e6b6798ac0c4c18650d6df223d338acb3d1549df30d74e6769683c8 vledger-v1.5.7-aarch64-unknown-linux-gnu.tar.gz
72929448da610c03f723f50d84e682d3708d3dcdf0fb75116a4a5b824999b6c7 vledger-v1.5.7-aarch64-apple-darwin.tar.gz
6efea95da18d225886b84f016a7d8e73aafb50ebafb4ae9fb31801d20b706d54 vledger-v1.5.7-x86_64-apple-darwin.tar.gz
See SECURITY.md §19 for the full advisory and README.md changelog for the full history.