- filbeam.com product
- docs.filbeam.com docs
- dashboard.filbeam.com dashboard
- filbeam.io cdn endpoint
- filbeam/worker workers, subgraphs
- filbeam/contracts smart contracts
- filbeam/telegraf monitoring
The stack mainly consists of Cloudflare (workers, D1) & Goldsky. Auxiliary components are Fly.io for other deployments, InfluxData, Solarwinds & Grafana.
Populate an off-chain representation of pieces, data sets & deals/funds, for fast retrieval.
flowchart LR
Contracts --> Subgraph
Subgraph --> Webhooks
Webhooks --> wi[Worker: indexer]
wi --> di[D1: Index]
FWSSDataSetCreatedPieceAddedServiceTerminatedCdnServiceTerminatedCdnPaymentRailsToppedUp
PDPVerifierPiecesRemoved
FilBeamOperatorCDNSettlement
Fast, cached and metered serving of pieces to dumb clients via HTTPS.
https://{clientAddress}.filbeam.io/{commP}
https://{clientAddress}.calibration.filbeam.io/{commP}
sequenceDiagram
participant c@{ "type": "entity" } as Client
participant wr as Worker: retriever
participant di@{ "type": "database" } as D1: Index
participant dm@{ "type": "database" } as D1: Metrics
participant sp as SP
c ->> wr: Request {clientAddress,commP}
wr ->> di: Query index
alt is not in cache
wr ->> sp: Retrieve file
wr ->> wr: Populate cache
end
wr ->> c: Serve file
wr ->> dm: Write metrics
See also
Note: SPs are trusted to serve correct piece content, the CID isn't verified. This is because even with the fastest method available (Hugo's commp library), the overhead would still be too much for web2 performance needs, and frequently lead to worker timeouts. To turn this on, one needs to go back to the drawing board.
Not upgradeable, but operator address can be changed in FWSS
FilbeamOperator implements one-time payments to account for egress-based quota depletion.
Each data set that includes FilBeam service, will have 2 extra active payment rails, in addition to the pdp one:
cacheMissRail(pays SP for egress to FilBeam)egressRail(pays FilBeam for egress to the world)
sequenceDiagram
participant wr as Worker: retriever
participant d@{ "type": "database" } as D1: Metrics
participant wu as Worker: reporter
participant c as Contract: FilBeamOperator
participant ws as Worker: settler
participant fwss as Contract: FWSS
loop after request
wr ->> d: Update quotas
end
loop periodic
wu ->> d: Query usage
wu ->> c: recordUsageRollups()
c ->> c: Update dataSetUsage
end
loop periodic
ws ->> c: settlePaymentRails()
c ->> c: Read dataSetUsage
c ->> fwss: settleFilBeamPaymentRails()
end
See also:
- https://docs.filbeam.com/how-it-works/quota-system
- https://docs.filbeam.com/how-it-works/payment-model
- https://docs.filbeam.com/how-it-works/usage-reporting
Work in progress: Serve IPFS retreivals #312.
https://1-{base32(dataSetId)}-{base32(pieceId)}.ipfs.filbeam.io/{filePath}
# redirects to the above
https://ipfs.filbeam.io/{WalletAddres}/{IpfsRootCid}/{filePath}
- Productionize
- Refactor code shared by
piece-retrieverandipfs-retriever - Match IPFS trustless GW options
- Add metering
In order not to violate laws, CIDs are periodically scanned against badbits, and wallet addresses against chainalysis.