Contract resource usage management #244
Labels
A-networking-ring
Area: Ring protocol and ops.
C-feature
Category: New feature or request
C-proposal
Category: A proposal seeking feedback
E-hard
Experience needed to fix/implement: Hard / a lot
P-medium
Medium priority
planned
This has been synced to PT for triage
Goal
Peers attempt to relay contracts that they’re likely to receive requests for. Relaying means that the peer subscribes to contract updates and can then respond to requests for that contract immediately rather than forwarding the request.
Due to the small world network topology, peers are generally more likely to receive requests for contracts close to them.
Overview
Cost function
A simple cost function that looks at each resource as a proportion of the total available to the peer and takes the maximum of these proportions:
Relay decision
The peer's goal is to relay the contracts that maximize$requestRate / cost$ , where $requestRate$ is the average number of requests per time interval.
New contracts will have an unknown$requestRate$ , for these we use an isotonic regression to estimate the $requestRate$ for a given distance between the peer and the contract, assuming that the rate will be higher for closer contracts.
If the peer is exposed to a contract with an estimated$requestRate / cost$ higher than the worst currently related contract, the new contract replaces the existing one.
Related Issues
The text was updated successfully, but these errors were encountered: