Conversation
There was a problem hiding this comment.
I am still uncertain, this will protect the MASQ Foundation network, because if someone want's to set rate-pack below the limit, it is just one change and cargo build away from doing so and network does not even aknowledge this. I woud like to propose: make an debut_handler rule, that if the debuting node is in standard, or originate-only mode, and have rate pack below (or above) the limits, his debut is dropped on the flor
|
Hey @dnwiebe @czarte - I agree with @czarte comments to add this additional checking in the handlers to ensure Nodes don't have rate-packs outside of the defined limits now, and can be done without too much additional work. This will cover older versions of Node joining network with rates outside the hard-coded limits |
| @@ -0,0 +1,67 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| @@ -1412,6 +1854,58 @@ impl GossipAcceptorReal { | |||
| debut_target_node_addr.clone(), | |||
| )) | |||
| } | |||
|
|
|||
| fn validate_new_version( | |||
There was a problem hiding this comment.
hint: what about name: validate_standard_nodes_requirements
reason: in gossip we refering with version to NeighborhoodDatabase version, so it seems bit confusing name for me here
There was a problem hiding this comment.
I decided on validate_incoming_agr(); I think that's pretty clear.
| let (mut valid_agrs, mut bans) = so_far; | ||
| if &agr.inner.public_key == database.root_key() { | ||
| // Shouldn't ever happen; but an evil Node could try it | ||
| // valid_agrs.push(agr); |
| Qualification::Malformed(malefactor) => { | ||
| let (public_key_opt, ip_address_opt, earning_wallet_opt) = | ||
| match agrs.iter().find(|agr| { | ||
| agr.node_addr_opt.as_ref().map(|na| na.ip_addr()) |
There was a problem hiding this comment.
Note: I would like to see the tests of malefactor claiming our own ip, that this ip is not comming in here
There was a problem hiding this comment.
In method extract_malefactors it looks like we are using agr ip in case we malefactor him for claiming our own IP
There was a problem hiding this comment.
I don't understand this issue. I'll ask you about it.
Further elaboration: we talked about it and decided that it could be ignored. However, it led us to a piece of dead code that needs to be driven out.
| let (gossip, gossip_source) = make_introduction(2345, 3456); | ||
| let dest_root = make_node_record(7878, true); | ||
| let mut dest_db = db_from_node(&dest_root); | ||
| // These don't count because they're half-only neighbors. Will they be ignored? |
There was a problem hiding this comment.
Due to Ban and Log message those are ignored. shout the question stay?
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 14
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| </map> | ||
| </option> | ||
| </component> | ||
| </project> No newline at end of file |
There was a problem hiding this comment.
IDE config file committed to repository
Low Severity
The .idea/SweepConfig.xml file appears to be a user-specific IDE configuration for the Sweep AI assistant plugin, containing BYOK provider configs and model names. This is unrelated to the PR's stated purpose of adding rate-pack value limits. While some .idea files are tracked in this repo, IDE plugin configurations with specific model versions (e.g., claude-sonnet-4-5-20250929, gpt-5-2025-08-07) are typically developer-specific and can cause unnecessary merge conflicts.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| </map> | ||
| </option> | ||
| </component> | ||
| </project> No newline at end of file |
There was a problem hiding this comment.
IDE config file accidentally committed in PR
Low Severity
The .idea/SweepConfig.xml file is an IDE-specific configuration for the Sweep AI plugin containing provider model lists (Anthropic, OpenAI, etc.) and auto-approved tool settings. It's unrelated to the rate-pack limits feature and is not covered by the .gitignore, which already selectively ignores other .idea/ files like copilot.*, azure/, and inspectionProfiles/. This file likely slipped in unintentionally alongside the PR changes.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| </map> | ||
| </option> | ||
| </component> | ||
| </project> No newline at end of file |
There was a problem hiding this comment.
IDE config file accidentally committed to repository
Low Severity
The .idea/SweepConfig.xml file is a personal IDE configuration for the Sweep AI assistant plugin, containing BYOK provider API model preferences (e.g., claude-sonnet-4-5-20250929, gpt-5-2025-08-07). This file is not excluded by .gitignore and doesn't belong in the repository. It's developer-specific tooling configuration that other contributors don't need and may cause merge conflicts.


Note
Medium Risk
Introduces a new persisted configuration value with a schema migration and new parsing/validation logic; mis-parsing or migration issues could prevent nodes from starting or accepting config updates.
Overview
Adds rate-pack value limits as a first-class persisted config (
rate_pack_limits), including default initialization, a new11→12DB migration, and aPersistentConfiguration::rate_pack_limits()parser/validator (regex-based) that enforces low<high bounds.Updates pricing/accounting paths to compute
total_chargeonce and log explicit wei amounts, and adjusts setup defaults/tests to use scaledrate-packvalues.Improves multinode test stability (Docker network creation retries, longer waits/timeouts, different external test URL, and clearer payable/receivable mismatch reporting), plus small refactors/observability tweaks (
Logger::name(),AccessibleGossipRecorddisplay,node_addr_optrename) and adds repo/IDE assistant config docs (SWEEP.md,.idea/SweepConfig.xml,.gitignoretweak).Written by Cursor Bugbot for commit 21f2a2a. This will update automatically on new commits. Configure here.