Skip to content

Rate Limiting #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SeanMcOwen opened this issue Sep 13, 2023 · 2 comments · Fixed by #180
Closed

Rate Limiting #72

SeanMcOwen opened this issue Sep 13, 2023 · 2 comments · Fixed by #180

Comments

@SeanMcOwen
Copy link
Collaborator

Figure out where this goes:

Rate Limiting

Rate limiting limits the amount of work (i.e. Web3 access) a Servicer can provide to an Application throughout the duration of a Session.

During each Session, the amount of POKT an Application has staked (see Application Protocol for more details) is mapped to "Service Tokens" that represent the amount of work a Servicer can provide using the SessionTokenBucketCoefficient governance parameter. The Token Bucket rate limiting algorithm is used to determine the maximum number of requests a Servicer can relay, and be rewarded for, thereby disincentivizing it to process relays for the Application once the cap is reached.

At the beginning of the session, each Servicer initializes: AppSessionTokens = (AppStakeAmount * SessionTokenBucketCoefficient) / NumServicersPerSession. When one of the Servicers in the session is out of session tokens, the Application can continue to use other Servicers until every they are all exhausted.

The mechanism described above enables future iterations of the protocol where different types of request may vary the required number of AppSessionTokens per request.

@SeanMcOwen SeanMcOwen linked a pull request Sep 30, 2023 that will close this issue
@SeanMcOwen
Copy link
Collaborator Author

Make a submit_relay_request_policy for figuring out service tokens and what needs to be computed

@SeanMcOwen
Copy link
Collaborator Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant