Guides
Gasless uploads
New users have 0 tPOT. Sponsored uploads let them store files anyway: they sign, a relay pays, through Portaldot's MetaTx pallet.
How it works
- The Drive prepares the file and generates an in-tab upload key, exactly like a normal upload.
- Your wallet signs one readable message that authorizes the upload key for one root and a byte budget until a block number:
What your wallet shows
PotDrive sponsored upload
account: 5CX7xVi2a478v9TgQJ65A1cgWpVwbozohGjdS4gPbH2mKhc6
upload key: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty
root: bafykbzace…
bytes: 412377
expires at block: 77912- The relay checks that signature (raw or wallet-wrapped), then funds the upload key with 0.11 tPOT for its existential deposit and the pallet's tiny per-byte fee.
- For each block, the upload key signs a meta-transaction for
transactionStorage.store. The relay checks that the signer is the authorized key, that the call isstore, and that the budget holds. Then it submitsmetaTx.dispatchand pays the transaction fee.
The meta-transaction
Portaldot V3's MetaTx extension pipeline, read from runtime metadata:
PalletMetaTxMetaTx.extension
(VerifySignature, MetaTxMarker, CheckNonZeroSender, CheckSpecVersion, CheckTxVersion,
CheckGenesis, CheckMortality, CheckNonce, CheckMetadataHash)VerifySignature checks a signature over blake2_256 of everything after it: the extension version, the call, then the explicit and implicit data of the remaining extensions. That matches pallet-meta-tx's own tests.
sdk/src/metatx.ts
payload = 0x00 // extension version
‖ call
‖ 0x00 ‖ compact(nonce) ‖ 0x00 // era immortal, nonce, metadata-hash mode off
‖ u32(spec) ‖ u32(txVersion) ‖ genesis ‖ genesis ‖ 0x00
signature = sr25519.sign(blake2_256(payload))Why the upload key signs, not the wallet
Browser wallets wrap any raw message in <Bytes>…</Bytes> before signing it, so they can't produce the bare signature VerifySignature expects. The wallet signs the human-readable authorization instead, and the key it authorizes signs the meta-transactions.
Limits
- Up to
RELAY_MAX_BYTESof new data per authorization (256 KiB by default). Deduplicated blocks don't count. - Authorizations expire after 300 blocks, about 30 minutes.
- Sponsored files are not registered, so they have no keep-alive. Re-upload with your own tPOT to register one.