-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(code/starknet): Add mempool load generator to the Starknet test app #821
base: main
Are you sure you want to change the base?
feat(code/starknet): Add mempool load generator to the Starknet test app #821
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
==========================================
- Coverage 76.50% 75.57% -0.93%
==========================================
Files 169 170 +1
Lines 14358 14833 +475
==========================================
+ Hits 10984 11209 +225
- Misses 3374 3624 +250
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
code/crates/config/src/lib.rs
Outdated
} | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
#[serde(from = "nonuniformload::RawConfig", default)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not derive Deserialize
directly on this structure instead of via RawConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that it was done like that for GossipSubConfig
so I thought that was a standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see! This was only done for GossipSubConfig to make sure we would go through it's constructor in order to fine-tune the parameters
}, | ||
)), | ||
MempoolLoadType::NoLoad => tokio::spawn(async {}), | ||
MempoolLoadType::NonUniformLoad(params) => tokio::spawn(async move { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Last thing we could do before merging is move this code and the one for the uniform load into their own freestanding functions to tidy up the code a little bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one from UniformLoad is calling ticker async function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, you can move the whole ticker(...)
expression into its own function that takes UniformLoadConfig
as a parameter.
Closes: #801
PR author checklist
For all contributors
For external contributors