Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Support for JSON RPC simulateTransaction method #492

Merged
merged 44 commits into from
Jun 13, 2023
Merged

Conversation

mikiw
Copy link
Contributor

@mikiw mikiw commented May 31, 2023

Usage related changes

  • add support of simulateTransaction RPC, skip_validate flag is supported but skip_execute is not because create_for_simulate is missing that feature

Development related changes

  • get_predeployed_acc_execute_args() method was moved to rpc_utils.py
  • Update poetry: 1.3.0 -> 1.3.1

Checklist:

  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/lint.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
  • Updated the tests
  • All tests are passing - ./scripts/test.sh

@mikiw mikiw marked this pull request as draft May 31, 2023 10:23
@FabijanC FabijanC changed the title Json rpc methods Support JSON RPC trace methods Jun 1, 2023
@mikiw mikiw changed the title Support JSON RPC trace methods Support for JSON RPC simulateTransaction method Jun 2, 2023
@mikiw
Copy link
Contributor Author

mikiw commented Jun 6, 2023

I think that specification has exclusive conditions, I found that when I was digging out starknet codebase:

  • transaction property is a type of #/components/schemas/BROADCASTED_TXN in simulateTransaction method
  • BROADCASTED_TXN can be any of BROADCASTED_INVOKE_TXN, BROADCASTED_DECLARE_TXN or BROADCASTED_DEPLOY_ACCOUNT_TXN
  • if that is so I can't just execute simulateTransaction with L1_HANDLER type of transaction or I'm missing something here...

@mikiw mikiw marked this pull request as ready for review June 6, 2023 13:15
@mikiw mikiw requested a review from FabijanC June 6, 2023 14:46
starknet_devnet/blueprints/rpc/structures/payloads.py Outdated Show resolved Hide resolved
starknet_devnet/blueprints/rpc/structures/payloads.py Outdated Show resolved Hide resolved
starknet_devnet/blueprints/rpc/structures/payloads.py Outdated Show resolved Hide resolved
test/rpc/rpc_utils.py Show resolved Hide resolved
test/rpc/test_rpc_traces.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_traces.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_traces.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_traces.py Outdated Show resolved Hide resolved
@mikiw mikiw merged commit 322b126 into master Jun 13, 2023
@mikiw mikiw deleted the json-rpc-methods branch June 13, 2023 12:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants