The Delegation Program uptime tracker is the means by which the Mina Foundation determines who will receive Foundation delegations. After receiving feedback from the community about the program’s participation, performance tracking, and transparency, the Mina Foundation has worked on further improving the performance tracker in collaboration with ecosystem partners.
State of Affairs
Included in the Mainet Stable Release 1.2.0, the Mina Foundation Delegation Program client implementation was released for the new snark-work-based uptime tracking system. Currently, the uptime tracking system uses a sidecar, and the data it produces counts towards Mina Foundation delegation eligibility. This is due to several reasons.
The client implementation was released before moving over to the new uptime system so that delegators can get a head start on:
- Testing the client implementation and configuration – https://github.com/MinaProtocol/mina/releases/tag/1.2.0
- Connecting to our uptime tracking endpoint to test out the backend side or experiment with creating their own leaderboard UI – https://github.com/MinaProtocol/mina/tree/compatible/src/app/delegation_backend
Work on the new uptime tracker has been done by Mina’s ecosystem partners o1Labs and OnTab. They have recently completed their server work, more specifically building the backend verification system that will be used to calculate scores. A preliminary version of the backend system has been completed and is being tested.
How It Will Work
In the new uptime system, all delegator nodes must submit a JSON payload to a delegation program backend service. The JSON payload contains the latest block known to the node, the delegator node’s pubkey, and snark work related to the latest block and timestamp. Here is what the JSON submission will look like:
{ "data": { "peer_id": "<base58-encoded peer id of the node from libp2p library>" , "block": "<base64-encoded bytes of the latest known block>" , "created_at": "<current time>" // Optional argument , "snark_work": "<base64-encoded snark work blob>" } , "submitter": "<base58check-encoded public key of the submitter>" , "sig": "<base64-encoded signature of `data` contents made with public key submitter above>" }
After submission, the payload goes through three stages of verification:
- Signature verification: The delegation backend does a signature check. If the signature passes and the delegator’s public key is registered in the Delegation Program, the payload will be saved on the server.
- Stateless verification: Next, a stateless verification tool will:
- deserialize the block and verify the block’s proofblock and compare the block producer key with the path
- check if the snark work is related to the block
- Stateful verification: Checks that the submitted block was either on the mainchain or on a well-populated short fork
In the previous system, the sidecar service checked to see whether each block producer was online in 10-minute intervals. The new system is configured for the delegator node to send a payload to the uptime service every 15 minutes. All submissions are processed in batches of 20 minutes worth of data. The uptime service checks the batches in 20-minute intervals, updating the leaderboard after processing all the submissions in the batch.
Codebase
The codebase for the new delegation backend service can be found here: https://github.com/MinaProtocol/mina/tree/develop/src/app/delegation_backend
Next Steps
We are now in the final stages of rolling out the new uptime system and currently testing (QA and UAT) with ecosystem partners as well as block producers who have graciously agreed to share their logs with us.
If you have any questions about the uptime system, let us know in the #delegation-program channel in the Mina Discord.
About Mina Protocol
Mina is the world’s lightest blockchain, powered by participants. Rather than apply brute computing force, Mina uses advanced cryptography and recursive zk-SNARKs to design an entire blockchain that is about 22kb, the size of a couple of tweets. It is the first layer-1 to enable efficient implementation and easy programmability of zero knowledge smart contracts (zkApps). With its unique privacy features and ability to connect to any website, Mina is building a private gateway between the real world and crypto—and the secure, democratic future we all deserve.