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

Simplify and fix dumping #572

Merged
merged 51 commits into from
Aug 19, 2024
Merged

Simplify and fix dumping #572

merged 51 commits into from
Aug 19, 2024

Conversation

FabijanC
Copy link
Contributor

@FabijanC FabijanC commented Aug 1, 2024

Usage related changes

Development related changes

  • Dumpable events remove from Starknet properties and stored in Api::dumpable_events under Arc<Mutex<...>>.
  • Removed dumping logic specific to each method/functionality. Adding new methods shouldn't require new dumping-related intervention other than updating the DUMPABLE_METHODS collection (related: Checklist for developers #562).
  • Add HTTP Router instance which maps dumpable HTTP requests to RPC calls.
    • Even though /load is not dumpable (it would not make sense for it to be), it is mapped because loading is implemented by re-executing RPC calls.
  • Change DumpEvent to be serializable RPC Request (use existing RpcMethodCall).
  • Postman Flush (L1-L2 message fetching) is dumped by storing messages converted to mock message calls.
  • Moved existing dumping functionality to crates/starknet-devnet-server/src/dump_util.rs.
  • Removed methods that were used by HTTP endpoints but became unused (_impl wrappers).

Checklist:

  • Checked out the contribution guidelines
  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • No spelling errors - ./scripts/check_spelling.sh
  • Performed code self-review
  • Rebased to the latest commit of the target branch (or merged it into my branch)
    • Once you make the PR reviewable, please avoid force-pushing
  • Updated the docs if needed - ./website/README.md
  • Linked the issues resolvable by this PR - linking info
  • Updated the tests if needed; all passing - execution info
  • Resolved all TODOs

@FabijanC FabijanC changed the base branch from main to load-refactor August 2, 2024 07:43
Base automatically changed from load-refactor to main August 2, 2024 10:02
- [skip ci]

- does not compile

- remove dump_events property from Starknet; use Api::dumpable_events
@FabijanC FabijanC force-pushed the dump-refactor branch 2 times, most recently from 92bc25e to 1b724fe Compare August 8, 2024 16:09
@marioiordanov marioiordanov merged commit 7759e9b into main Aug 19, 2024
1 check passed
@marioiordanov marioiordanov deleted the dump-refactor branch August 19, 2024 07:14
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.

Update support of dump events.
2 participants