Pandora, a Low-cost and Decentralized Blockchain Notarization Rollup

Tezos Blockchain L2 Rollup Scaling Notarization
Published on 2024/08/29
Pandora, a Low-cost and Decentralized Blockchain Notarization Rollup


We are pleased to introduce Pandora, the Provable and Auditable Notary for Decentralized Operational Record Authentication. Pandora is an innovative Smart Optimistic Rollup designed to offer a cost-effective, fast, and secure solution for notarizing data on the blockchain. Pandora benefits from Tezos' development stack to build kernels on rollups, enhancing the platform's robustness and adaptability. With its fresh approach to blockchain notarization, Pandora aims to simplify the process while maintaining the highest security and efficiency standards. We thank the Tezos Foundation for co-funding this work, which helped bring Pandora to life.

What are Smart Optimistic Rollups?

Smart Optimistic Rollups are a permissionless scaling solution for the Tezos blockchain. Anyone can originate and operate one or more rollups, allowing for an increase in the throughput of the Tezos blockchain (almost) arbitrarily. Read more about Smart Optimistic Rollups here.

Quick Tour of Pandora's Architecture!

Pandora's architecture is meticulously designed to ensure ideal interactions and enhanced security. The architecture is divided into layer 1 (L1) and layer 2 (L2), with an additional off-chain component. Interactions can occur at various levels, either automatically or requiring user actions. This design enables efficient processing while maintaining high security.

Key Components

Pandora Key Components

Here is an overview of Pandora's key components:

  1. Kernel: it is the core of Pandora, containing all the execution logic. It reads from the inbox at each L1 level. Users add messages to the inbox via a dedicated manager operation on L1. The kernel sorts and processes messages intended for it, ensuring they have a predefined format and valid signature. It differentiates between external (user-generated) and internal (smart contract-generated) messages, adding an extra layer of security for internal messages.

  2. Proxy server: it simplifies data retrieval from the rollup via RPCs and facilitates the notarization of hashes without the need for external tools to construct messages. It significantly enhances the user experience by streamlining interactions with Pandora.

  3. Smart contracts: smart contracts play a crucial role in ensuring security during critical interactions. The bridge contract, for instance, handles L2 token transfers and withdrawals. It verifies the availability of funds on L1 before posting messages in the inbox.

User Interactions and Processes

Pandora User Interactions

Let's take a look at the different interactions between a user and Pandora:

  • Notarization requests: when a notarization request is received, the system checks the account's balance on Pandora. If the balance is insufficient, the message is ignored. Otherwise, the specified amount is deducted, and the data is anchored on L2 with a timestamp.

  • Token transfers and withdrawals: for token transfers, the bridge contract verifies the requested amount on L1 and posts a message in the inbox if sufficient funds are available. For withdrawals, the system checks the L2 balance directly within the kernel and posts a message in the outbox if funds are available. Withdrawals undergo a dispute period as defined by the Tezos protocol before being finalized.

  • Upgrades: admins can initiate upgrades by posting an upgrade message in the inbox, containing a preimage root hash of the upcoming upgrade. The kernel then reconstructs the new code from the preimages and updates itself. This ability to update execution logic continuously is one of Pandora's significant advantages over traditional immutable smart contracts.

Why Choose Pandora?

Pandora stands out as a new solution in the blockchain notarization space, combining speed, security, and cost-effectiveness in a unique package. Here's why Pandora is the optimal choice for your decentralized operational record authentication:

  • Security and decentralization: Pandora's multi-layered architecture, incorporating L1, L2, and off-chain components, ensures that your data is not only notarized but protected with the highest security standards. Smart Optimistic Rollups are permissionless, meaning the L2 is protected by a refutation game system, played by the Proof Virtual Machine (PVM) on L1, ensuring the system behaves as expected and detects any malicious discrepancies. Pandora is open-source and completely decentralized. Anyone can start their own instance, and users can notarize documents without using Pandora's API while still benefiting from its infrastructure.
  • Efficiency and speed: Pandora’s architecture is designed to handle high volumes of transactions quickly and efficiently. The interaction between the kernel, proxy server, and smart contracts enables rapid notarization requests and token transfer processing, ensuring that operations are completed promptly.

  • Cost-effective: by leveraging the benefits of a rollup-based approach, Pandora reduces the costs associated with blockchain notarization, making it accessible to a wider audience without compromising quality or security.

  • User-friendly experience: including a proxy server simplifies interactions, allowing users to notarize data without the need for complex tools or technical expertise. This makes Pandora approachable for both seasoned blockchain users and newcomers alike.

  • Scalable and future-proof: with the ability to update its execution logic through upgrades. This flexibility ensures that Pandora will remain relevant and effective as the blockchain ecosystem evolves.

Start Playing with Pandora (Beta)

Pandora is in a Beta state and is currently re-deployed every week on Weeklynet for testing purposes. For this reason, each of the following steps that interact with the blockchain can be observed on that network.

Let's get started! First you'll need a hash to notarize:

➤ echo -n <string> | sha256sum

Replace <string> by anything you want. In this walkthrough we'll replace it by "Pandora":

➤ echo -n "Pandora" | sha256sum

611a4505767c42fe3c809f6beccc1d3a9cc8198a1fc19b5c86f022a2454a3ed2

NB:

  • Please note that each hash can only be notarized once. Therefore, try using a different word than "Pandora" to generate your hash.
  • If you want to notarize the hash of a file, you can also use: sha256sum your_file.

Now, call the notarization endpoint with:

➤ curl -X POST -H 'Content-Type: application/json' https://pandora-api.functori.com/notarize/hash -d '"611a4505767c42fe3c809f6beccc1d3a9cc8198a1fc19b5c86f022a2454a3ed2"' | jq

After a few seconds, when the notarization is effective, we can check its status with:

➤ curl -X POST -H 'Content-Type: application/json' https://pandora-api.functori.com/notarize/status -d '"611a4505767c42fe3c809f6beccc1d3a9cc8198a1fc19b5c86f022a2454a3ed2"' | jq

{
  "status": "notarized",
  "timestamp": "2024-08-27T23:30:14-00:00"
}

That's it, it was that easy! Congrats, you notarized your first hash on Pandora!

If you'd like to explore further and feel motivated to better understand the various internal interactions of Pandora's architecture, you can check out our guide to launch Pandora's infrastructure from scratch.

Conclusion

Pandora is set to enhance the way data is notarized on the blockchain. Pandora offers a comprehensive and user friendly solution for operational documents timestamping while remaining fully open, completely decentralized and highly cost effective. Stay tuned as we continue to develop and enhance this innovative platform, we have many exciting features in development, including hash status tracking, proof of inclusion requests, proof verification, and more!

To take a deeper look at Pandora, see our Technical Documentation.

Feel free to suggest ideas or report issues at pandora-gitlab!

|