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

Introduce forking #365

Merged
merged 143 commits into from
Mar 26, 2024
Merged

Introduce forking #365

merged 143 commits into from
Mar 26, 2024

Conversation

FabijanC
Copy link
Contributor

@FabijanC FabijanC commented Feb 29, 2024

Usage related changes

  • Close Forking #195
  • User instructions are in README.md under Forking
    • basically it's a subset of Devnet-py's CLI params, but the origin interaciton possibilities should be the same (if not better)
  • In case of NoStateAtBlock, a wildcard error is returned instead of ContractError

Development related changes

  • Add two forking structures: OriginForwarder and StarknetDefaulter (read more about them in the code docs)
  • Use 6 parallel jobs in testing (previously had 7 - failing)
  • Improve testing by adding utilities
    • e.g. BackgroundDevnet methods like create_block, fork, get_balance_at_block
  • Two e2e tests interact with Sepolia.
  • Replace StateHistoryDisabled error with NoStateAtBlock
  • Add get_block_number method to timestamp.cairo testing contract and rename it to block_reader.cairo
  • Refactor crates/starknet-devnet-server/src/api/json_rpc/mod.rs to call .to_rpc_result() in only one place.

Checklist:

  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • Performed code self-review
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes
  • Linked the issues which this PR resolves
  • Checked the TODO section in README.md if this PR resolves it
  • Updated the tests
  • All tests are passing - cargo test

FabijanC and others added 30 commits January 18, 2024 15:08
@FabijanC FabijanC marked this pull request as ready for review March 22, 2024 12:58
@FabijanC FabijanC merged commit 2f64a79 into main Mar 26, 2024
1 check passed
@FabijanC FabijanC deleted the fork branch March 26, 2024 16:10
Hanae1963

This comment was marked as spam.

@FabijanC FabijanC mentioned this pull request Mar 27, 2024
10 tasks
@Hanae1963

This comment was marked as spam.

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.

Forking
5 participants