Skip to content
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

Fix requests per second, proper error responses, compilation related to the curl-sys library #3405

Merged
merged 4 commits into from
Oct 26, 2024

Conversation

fulltimemike
Copy link
Collaborator

Motivation

Fixes #3402. This PR includes a patch for #3403, in order to get this code to compile.

Test Plan

Manually tested with low rps, verified that the requests per second did not become 1 after the burst quota was exhausted.

Additional Details

This is our patch fix, so feel free to adapt this code as necessary. We use per_nanosecond instead of per_second for the replenishment rate, with the goal of replenishing the burst rate in full every second. Our primary concern was the rps, which is why the 429 (Too many requests) error in particular is handled but other errors are defaulted to a 500 (Internal Server Error). Furthermore, related to issue #3403, I had to bump the rust version in order to get snarkos to compile.

@vicsn
Copy link
Contributor

vicsn commented Sep 25, 2024

Thx! Mind removing the MSRV bump? It'll need to be updated in Cargo.toml and .circleci/config.yml as well, as well as for snarkVM. Better to make those separate PRs to be readable for everyone.

Also perhaps someone will object using the latest MSRV, so a separate PR is a better ground for discussion. Will also ask some people directly about their opinion.

@fulltimemike
Copy link
Collaborator Author

Sure, removed it. I couldn't get it to compile without updating the rust version, so you may need to update that before this is merged in

@zosorock zosorock requested review from ljedrz, niklaslong, zkxuerb and a team October 2, 2024 15:46
Copy link
Contributor

@vicsn vicsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vicsn
Copy link
Contributor

vicsn commented Oct 23, 2024

Can you merge aleonet/staging and fix the fmt issue?

@fulltimemike
Copy link
Collaborator Author

Can you merge aleonet/staging and fix the fmt issue?

done -- feel free to change this anyway you all need to get it merged

@zosorock zosorock merged commit b544b7a into AleoNet:staging Oct 26, 2024
22 of 24 checks passed
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 this pull request may close these issues.

[Bug] Rest request per second is actually burst per second, and returns 200s instead of errors
4 participants