receipts

Everything the engine does with money is receipted in the tunnel program on Solana. This page is the explorer for those receipts.

program

program
name on explorertunnel
receipts
latest receipt
latest slot

The program is deployed with its name rendered on explorers through the program metadata so a reader opening the program account sees tunnel, not an address. Each rental is one PDA seeded by the string tunnel, the mint, and the rental index as eight little endian bytes.

receipt layout

RENTAL RECEIPT ACCOUNT, 298 BYTESdiscriminator8mint32rentalindex8snapshotslot8worker set root32hashraterented8provider id hash32fee claim sig64intent id hash32harvest tx hash32harvestxmr8payoutintent id hash32state1bump1

receipts

#pdacreatedslotrootrigstateharvestpayout intent
No receipt yet. The first rental writes the first PDA.

recompute a root

Take the snapshot slot from the receipt. Fetch every token account of the mint as of that slot, using an RPC that serves historical account state, and keep the pairs of owner and amount where amount is at least one thousand base units.

Sort the pairs by owner public key bytes, ascending. For each pair, build a 40 byte leaf: the 32 byte owner followed by the 8 byte little endian amount. Hash each leaf with sha256.

Build the tree bottom up. At each level, hash each adjacent pair as sha256 of left followed by right. When a level has an odd count, the last hash is carried up unchanged. The single remaining hash is the root.

Compare it with the worker set root in the receipt. If they match, the worker set the engine paid was exactly the holder set at that slot, and your share was your amount over the sum of all amounts in that list.

intent batches

batchintentlegs inlegs outsolverspreadcapturednear tx
No batch yet. Batches appear when the engine packs rental and payout legs into one intent.