← Journal

One Database, Two Layers of Permission

LastDB and LastDB Cloud are parts of one product, built around the same database. Your devices hold records. The cloud relay carries encrypted history between them. Sharing adds grants over that database: who can access it, and what they can do.

The database stays the database.

A database has an identity, schemas, records, and signed history. That identity stays the same when you connect another device or invite another person. Sharing does not require copying the records into a separate shared database.

LastDB runs on each device and serves the records held there. LastDB Cloud stores and relays encrypted changes and snapshots. Devices use that history to catch up. Their local copies can temporarily differ while sync is in progress; they still belong to the same database.

The same storage and sync model handles a database you use alone and one you share. Grants change who participates. They do not change what a database is.

One database, grants above it An owner-signed grant applies to one database identity. Local records on your device, encrypted history in the cloud relay, and local records on a member device belong to that same database. OWNER-SIGNED GRANTS who + allowed operations ONE DATABASE ID LASTDB CLOUD RELAY LASTDB your records encrypted history member records
Fig. 1 — One identity across local records and cloud history. Grants govern participation.

Layer 1: who can read and write?

The database owner signs grants for other identities. A grant names the database, the recipient, a role, and an expiry. The relay uses those grants to control access. Nodes also keep and verify them as part of the database’s signed history.

Read access covers the whole database. It is not a field-by-field view or a filtered set of records. A recipient needs the information required to decrypt the data as well as permission to fetch it. An invitation link supplies connection information; the owner’s signed grant establishes authority.

Read and write permission are different. Someone can follow a database without being allowed to change it. Giving someone a write role also does not make them its owner.

Layer 2: what kind of write?

“Can write” needs a more precise answer. LastDB distinguishes these member roles. They express both layers of permission in the signed grant.

Read
Read the database. Cannot submit proposals or publish changes.
Submit
Read and propose new records, or changes to records this member created. The owner’s node checks each proposal before publishing an accepted change.
Write
Read and publish record changes directly on the member’s own signed stream, including attachments. These writes do not wait for the owner to accept a proposal.

The owner retains control of grants, schema changes, snapshots, and relay cleanup. A member’s Write grant permits record changes, not changes to the database’s authority.

For a shared project, a reader can follow the work. A Submit member can propose a new note and later propose edits to their own note. A Write member can edit the project’s records directly. All three work with the same database.

The relay checks. The node checks again.

The relay authenticates the caller and checks the operation against the grants currently in force. A reader cannot upload a direct write. A Submit member cannot turn a proposal into a direct write. A writer cannot deposit an entry under another identity or issue an owner’s grant.

These admission rules are shared code used by the relay and the local node. The local node checks its authority before signing or sending a write. But the relay cannot inspect encrypted record contents, so it cannot make every decision about a change.

A receiving node verifies the entry’s signature, database identity, links to prior history, and the signed grant it cites. It checks whether that grant authorizes that kind of entry at its signed position in history. It then decrypts and validates the content. Missing history makes an entry wait; an invalid entry does not become a valid write just because the relay stored it.

Stored by the relay, verified by the node A member sends a signed entry. The relay gates the request using identity, current grants, and operation type. A receiving node independently checks signatures, cited grants, history, and decrypted content before applying a direct change. A proposal waits for the owner to accept it. SIGNED ENTRY author + grant RELAY Identity · current role Allowed operation · own stream encrypted payload RECEIVING NODE Signature · cited grant · history Decrypt · validate the change Proposal? Owner must accept it. APPLY VALID CHANGE
Fig. 2 — Relay admission and local verification are separate checks. Storage is not acceptance.

Submit adds a record-level decision. The member’s node checks that the proposed change is allowed and refers to the record state it knows. The owner’s node repeats the check against its own state before publishing the change. If the record changed in between, the proposal may be refused. Uploading a proposal is not the same as committing it.

A direct Write change commits locally and reaches other devices through sync. Each receiving node verifies it independently. The cloud carries the proof; it does not replace that proof with a verdict the devices must trust.

What that trust boundary means.

A relay cannot manufacture an owner-signed grant or a valid signature for someone else’s write. Nodes can reject unauthorized history even if a relay forwards it. They still depend on the relay for delivery: it can delay or withhold data. Independent verification protects the authority of a change; it does not guarantee availability.

Read access also has a lasting consequence: a recipient can keep data they already downloaded. Grants expire, and stopping renewal lets an existing grant reach its end; it does not instantly revoke that grant or erase someone’s copy.

The result is a consistent way to reason about the product: one database across LastDB and LastDB Cloud, signed grants that define participation, and local nodes that decide what history they can accept.

Source notes & implementation status

This article describes the merged LastDB source reviewed on December 4, 2026, at revision 11104cccf. This is a source-based explanation, not verification of a particular deployed cloud release. LastDB is in alpha and under heavy development.

Continue with the sharing guide, explore LastDB Cloud, or see how the layers fit together.

← Journal