ReadonlytransactRuns body inside one write transaction, which takes the ledger's
write lock when it begins. It commits
if body succeeds. If body fails, it rolls back and returns body's
own error, and nothing is written. When another writer holds the lock,
it waits up to the store's configured busy timeout (the store's
busy-wait contract) and then fails with LedgerBusy, having
written nothing; it fails with
LedgerError on I/O, schema or decode failures. A failed COMMIT
is rolled back if the transaction is still open, and its error is
returned. The exception is a failed ROLLBACK: its error replaces
body's, and the connection's state, including whether anything was
written, is then unknown. tx is valid only while body runs.
The ledger as a capability: every read and write goes through LedgerStore.transact, so each one sees and assigns seqs in commit order.
The busy-wait contract, which every implementation must meet: each store is opened with a busy timeout, in milliseconds. A write that meets another writer's lock (another store on the same ledger, in this process or another) waits for it up to that timeout; if the lock is released in time the write goes ahead, and if not it fails with LedgerBusy and writes nothing. An implementation states how it meets this and what its evidence is (dogfood-6f, owner ruling of 2026-11-28).