Structure and Workflow

ZEROBASE Hub

The ZEROBASE Hub is responsible for broadcasting verification tasks. It broadcasts tasks to the ZEROBASE network, and provers who respond within a specific time frame are randomly assigned proof generation tasks. The ZEROBASE Hub also handles user verification requests; users must declare their tasks to the ZEROBASE Hub before sending the specific content and circuits needed to generate proofs. The ZEROBASE Hub then broadcasts these tasks within the ZEROBASE network.

Function Description

  • Maintain the Node list.

  • Generate Node connection credentials.

  • Handle heartbeat packets sent by Nodes.

  • When a Client makes a request, select four Nodes from the Node list and return this information to the Client.

  • Construct payment orders.

Main Process

1.Adding a Node

  • Operation: Generate an RSA key pair.

  • Process: Manually send the public key to the Node.

2.Maintaining the Node List

  • Operation: Receive heartbeat packets from Nodes.

  • Process: Update the Node List based on the information from the heartbeat packets.

3.Handling Client Requests

  • Operation: The Client connects to the Hub via HTTPS and requests the Node list.

  • Process: The Hub selects four Nodes from the Node List and returns them to the Client.

4.Handling Client Requests (with Charges)

  • Operation: The Client carries an order number and connects to the Hub via HTTPS to request the Node list.

  • Process: The Hub selects four Nodes from the Node List, pushes the corresponding order number to each, and then returns the connection information of the four Nodes to the Client.

5.Constructing a Payment Order

  • Operation: The Client sends a new order request to the Hub via HTTPS.

  • Process: The Hub generates an order number using a UUID algorithm and returns the order number to the Client.

Prover Nodes

The ZEROBASE network consists of proof nodes responsible for generating ZK-SNARK proofs and returning them via the ZEROBASE API.

Function Description

  • Receive and compute input data sent by the Client.

  • Periodically send heartbeat packets to the Hub.

Main Process

1.Handling Prove Requests (Basic)

  • Operation: Receive input data from the Client.

  • Process: Perform the necessary computation on the received data.

  • Result: Return the Proof to the Client.

2.Handling Prove Requests (With Payment Verification)

  • Operation: Receive input data from the Client.

  • Process: First, retrieve event information from the contract to verify whether the user's order number has been paid. After confirmation, proceed with the Prove task.

  • Result: Return the Proof to the Client.

Sending Heartbeat Packets to Hub

  • Operation: The Node periodically sends a heartbeat packet to the Hub containing the corresponding public key.

  • Process: The heartbeat packet includes the Node's status information and public key, ensuring that the Hub is aware of the Node's online status.

Key Points

  • Connection Credentials: Ensure that the public key is not leaked.

  • Heartbeat Packet Transmission: Regularly and reliably send heartbeat packets to the Hub to ensure real-time updates of the Node's status.

Last updated