Skip to main content
Engineering

What happens when you lock Rockpile

What locking changes for signing, encrypted storage, background jobs, and transactions that have already left your device.

A lock screen can hide a balance without stopping the process that can spend it. For a wallet, locking needs to change the application’s authority and access to secrets, as well as what appears on screen.

Rockpile’s lock handling spans session authorization, encrypted storage, native signing, and protected background work. Each has to recognize that the authorized session has ended. Transactions already delivered to another system have a different status: their authorization has already left the device.

End the authorized session

Rockpile’s application lock clears the unlocked session and pending authentication challenges. Sensitive requests waiting for fresh authentication are rejected if the app locks before that authentication completes.

Consider a signing prompt left open when the computer locks. Completing an old prompt later must not silently revive the earlier session. Authorization is checked against the current session and portfolio; stale state is not sufficient permission to proceed.

Unlocking later starts an authorized session again; it does not make the old, rejected authentication request valid.

Close encrypted storage and release signing state

The native vault broker manages encrypted database access and software-wallet key operations. Full lock closes the database handles, releases temporary signing state, and terminates the broker. System lock, suspend, portfolio change, and shutdown also participate in tearing down sensitive state.

Sensitive buffers are overwritten when released, a process called zeroization. Root-key buffers also use memory locking to keep them out of operating-system swap. Terminating the broker discards the process that held the vault open. The encrypted files remain on disk for the next authorized session.

Lock or end the active session
              ↓
Invalidate pending authorization
              ↓
Close protected storage access
              ↓
Release native signing state

These steps explain why locking is more than covering the interface. They do not make an already compromised operating system trustworthy or recover data it observed before the lock. The encryption article describes that threat boundary.

Check background work before it starts

Background tasks need access rules too. A scheduled operation should not bypass the lock simply because no button was clicked.

Rockpile’s price-history synchronization, Cedros synchronization, and backup services check lock state before beginning their protected work. Their tests check that a locked session returns before the relevant database operations or provider calls begin. A background backup check that cannot establish lock state fails closed rather than assuming access is allowed.

This has a practical consequence: a backup schedule is not proof that a new file was created while the app was locked. Check the actual backup result and the off-device copy. Similarly, data displayed after unlocking may need to refresh before it represents current chain state.

A lock check prevents new protected work from starting. It does not retract a request already received by an external service or act as a network firewall for the computer.

Recheck queued work before it runs

A request can be permitted when it enters a queue and invalid by the time it reaches the front.

Rockpile’s agent capability service checks permissions, lock state, the active portfolio, and any request expiration again immediately before dispatch. For example, a financial action may wait behind another operation for the same wallet. If the app locks during that wait, the action must be rejected before execution. Tests also cover a changed portfolio and expired authorization.

The same principle matters when switching portfolios. A delayed request created for one portfolio must not acquire access to another merely because the user changed the active view. Agent access controls explain the permissions around those requests.

A lock cannot recall a payment

Once signed transaction bytes reach a forwarder or RPC, that recipient may already be able to submit them. Locking the signer does not invalidate the signature or reverse a transaction that has landed.

That distinction also applies to work already established on-chain or with an external service. Closing the app is not the same as canceling an order. Cancellation requires the action appropriate to that order and evidence of its outcome.

After an interrupted submission, keep the original transaction identifier and investigate its status. The wallet’s local session can be locked while the network continues processing an earlier authorization.

After unlocking, check the latest completed backup and any unresolved transactions before relying on the displayed state. Backup verification checks your recovery copy; transaction troubleshooting helps establish what the network processed.