chore(protocol): enhancements to simulation setup and execution documentation #16068
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.
Summary
I've fixed the simulation forge command in
package.json
and restructured the protocol simulations README to improve the experience when following the commands to simulate and test the protocol.Key Changes
Commit 4fd3a2e modifies the
export:simconf
script inpackage.json
to target thetest_L2_NoFeeCheck_simulation
test rather than the previously referencedtest_simulation
. This adjustment aligns with the updates from PR feat(protocol)!: re-implement multi-hop bridging with optional caching #15761, which introduced thetest_L2_NoFeeCheck_simulation
tests while removing thetest_simulation
.Commit 7d8c60c updates the README.md in the
packages/protocol/simulation
directory. The new README layout offers a clear, step-by-step guide for setting up the simulation environment, including a reminder to runfoundryup
for updating Foundry tools, which is a step I found necessary during the process.Rationale for Updates
The motivation behind these changes is to address the issue with the current command
forge test --match-test 'test_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
failing due to the removal oftest_simulation
tests frompackages/protocol/test/L2/TaikoL2.t.sol
. This was notably changed in this commit, while the introduction oftest_L2_NoFeeCheck_simulation
tests occurred in another commit, leading to the need t o update it.Testing:
After fixing the command in
package.json
, I generated PNG images of the simulation to visually verify the outcomes. The images named<timestamp>_above_average_traffic.png
,<timestamp>_below_average_traffic.png
, and<timestamp>_target_traffic.png
illustrate the simulation results under various traffic conditions.