Modes of Operation

Proofs & whitelisting.

HollowDB has two modus operandi: proofs and whitelisting; both can be enabled together, or separately.

Mode
Put
Update
Remove
Get

Proofs

-

Zero-Knowledge Proof

Zero-Knowledge Proof

-

Whitelisting

PUT whitelist

UPDATE whitelist

UPDATE whitelist

-

Using Proofs

Using zero-knowledge proofs gives full control to the users on updating the value at their key. When proofs are enabled:

  • Anyone can read and put.

  • To update or remove a value at some key, user must provide a zero-knowledge proof (ZKP) of preimage knowledge of that key.

HollowDB makes use of a circuit that we call "HollowDB Authentication" circuit, to which you can find more information at:

HollowDB Authenticationchevron-right

You can enable or disable proof checking with the following Admin command:

const isProofRequired = true; // or false
await admin.updateProofRequirement("auth", isProofRequired);

If you are deploying your own contract, you must also provide the verification key that the proof verifier will use. You can find HollowDB's keys herearrow-up-right. You can either provide the key in the initial state, or use the Admin to update the verification key at a later time:

await admin.updateVerificationKey("auth", newVerificationKey);

Using Whitelisting

Whitelisting is an alternative authorization mechanism that can be used within HollowDB. It can provide a fine-grained control over who can put, update, or remove a value to the database. When whitelisting is enabled:

  • Anyone can read.

  • To put, the user must have been put-whitelisted by the contract owner.

  • To update or remove, the user must have been update-whitelisted by the contract owner.

There is a separate whitelist for put and update/remove. You can enable/disable them with the Admin:

You can add & remove users from the whitelist using the Admin:

Last updated