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

feat(code/starknet): Add mempool load generator to the Starknet test app #821

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

oakenknight
Copy link
Member

Closes: #801


PR author checklist

For all contributors

For external contributors

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.57%. Comparing base (e4194ab) to head (1480eee).
Report is 8 commits behind head on main.

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     
Flag Coverage Δ
integration 75.20% <ø> (-0.97%) ⬇️
mbt 20.45% <ø> (-0.98%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@romac romac added work in progress Work in progress code Code/implementation related labels Jan 30, 2025
@romac romac changed the title feat(code/starknet): Improve mempool of Starknet test app feat(code/starknet): Add mempool load generator to the Starknet test app Jan 30, 2025
code/crates/starknet/host/src/host/starknet.rs Outdated Show resolved Hide resolved
code/crates/starknet/host/src/mempool_load.rs Outdated Show resolved Hide resolved
code/crates/starknet/host/src/mempool_load.rs Show resolved Hide resolved
code/crates/starknet/host/src/mempool_load.rs Outdated Show resolved Hide resolved
code/crates/starknet/host/src/mempool_load.rs Outdated Show resolved Hide resolved
code/crates/config/src/lib.rs Outdated Show resolved Hide resolved
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(from = "nonuniformload::RawConfig", default)]
Copy link
Member

@romac romac Feb 4, 2025

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?

Copy link
Member Author

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.

Copy link
Member

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

code/crates/config/src/lib.rs Outdated Show resolved Hide resolved
},
)),
MempoolLoadType::NoLoad => tokio::spawn(async {}),
MempoolLoadType::NonUniformLoad(params) => tokio::spawn(async move {
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code/implementation related work in progress Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

code: Improve mempool of Starknet test app
2 participants