feat(aggregation-mode): daily proofs limit#2198
Merged
Conversation
17 tasks
Comment on lines
104
to
105
| // Checking if this address has submited more proofs than the ones allowed per day | ||
| const MAX_PROOFS_PER_DAY: usize = 4; |
Contributor
There was a problem hiding this comment.
The max proofs per day should be on a config
JuArce
requested changes
Dec 11, 2025
aggregation_mode/batcher/src/db.rs
Outdated
| address: &str, | ||
| ) -> Result<Vec<Receipt>, sqlx::Error> { | ||
| sqlx::query_as::<_, Receipt>( | ||
| "SELECT status,merkle_path,nonce,address |
Collaborator
There was a problem hiding this comment.
It should make a count instead of returning a list and applying a length
| db_connection_url: "postgres://postgres:postgres@localhost:5435/" | ||
| eth_rpc_url: "http://localhost:8545" | ||
| payment_service_address: "0x922D6956C99E12DFeB3224DEA977D0939758A1Fe" | ||
| max_proofs_per_day: 32 |
MauroToscano
approved these changes
Dec 12, 2025
JuArce
approved these changes
Dec 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a limit on the number of proofs that can be sent every day.
How to test
Note: If you see a
Migrations to run correctly: VersionMismatch(1)error, you have to clean the DB by runningmake agg_mode_docker_clean.Type of change
Please delete options that are not relevant.
Checklist
testnet, everything else tostaging