- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 106
Closed
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionT-featureType: New functionality requestType: New functionality request
Description
- Peers track CPU and bandwidth usage, attributing it either to the peer's user, or to other peers
- eg. Peer A sends request to peer B, peer B keeps track of all CPU/bw usage as a result of this request and attributes it to peer A
 
- This includes "downstream" resource usage, anything this peer asks other peers to do
- This means that every response to a request must include an accounting of downstream resources used to answer the request
- A peer has a user-configurable maximum CPU and upstream/downstream usage limit
- Peers can request that other peers throttle requests by requiring a minimum time between requests
- Another peer that violates this request will be disconnected
 
- A peer maintains a global minimum request interval, which is determined using an isotonic regression to avoid exceeding the user-configurable CPU/bw limits
Related
- While this mechanism tracks and managed resource usage per-peer, Contract resource usage management #244 describes a parallel mechanism that tracks and manages resource usage per-contract
Metadata
Metadata
Assignees
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionT-featureType: New functionality requestType: New functionality request