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

Add script to check block composition #131

Merged
merged 52 commits into from
Feb 4, 2025
Merged

Conversation

FrancoGiachetta
Copy link
Contributor

@FrancoGiachetta FrancoGiachetta commented Jan 22, 2025

This PR adds a script that checks the average tx, transfers and swap an average block has (separated by the day of its execution) and generates a plot which also aggregates this information by day. It also adds a new command which executes a block range, collecting every entrypoint in block_composition/<block_execution_range_name>.json. Every .json generated is a range of execution, we can have separated block ranges executing. Then, the script will loop through the files inside the folder and process all of them at once.

To be able to run the script first you need to collect some data:

cargo run --release -F block-composition block-compose 862063 862065 mainnet

Then you run the script:

python plotting/plot_block_composition.py <path_to_block_info>

PD: by deafult <path_to_block_info> is block_composition

Copy link

github-actions bot commented Jan 22, 2025

✅ Code is now correctly formatted.

@FrancoGiachetta FrancoGiachetta marked this pull request as ready for review January 28, 2025 20:54
@FrancoGiachetta FrancoGiachetta marked this pull request as draft January 30, 2025 23:57
@FrancoGiachetta FrancoGiachetta marked this pull request as ready for review January 31, 2025 15:02
Copy link
Contributor

@JulianGCalderon JulianGCalderon left a comment

Choose a reason for hiding this comment

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

Hi @FrancoGiachetta! I left you some comments we can discuss. Let me know what you think.

Also, can you add some documentation of this feature in the README?

replay/src/block_composition.rs Outdated Show resolved Hide resolved
replay/src/block_composition.rs Outdated Show resolved Hide resolved
replay/src/block_composition.rs Show resolved Hide resolved
replay/src/block_composition.rs Outdated Show resolved Hide resolved
replay/src/main.rs Show resolved Hide resolved
replay/Cargo.toml Show resolved Hide resolved
@FrancoGiachetta FrancoGiachetta added this pull request to the merge queue Feb 4, 2025
Merged via the queue into main with commit e4ad4d3 Feb 4, 2025
5 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.

3 participants