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

Update JsonRpc Api to v0.3.0-rc1 #467

Merged
merged 33 commits into from
May 18, 2023
Merged

Conversation

bartekryba
Copy link
Contributor

@bartekryba bartekryba commented May 11, 2023

Updated JsonRpc api to support 0.3.0-rc1 spec. Closes #443, closes #401, addresses the same issue as #412 (consider closing)

Usage related changes

  • Added Cairo1 class support
  • Added support for declare v2
  • It's now possible to estimate fee for multiple transactions
  • Felt validation got updated (No more 0x0 prefixed felts)

Development related changes

  • For run_devnet_in_background method, the flag --cairo-compiler-manifest will be set by default if it wasn't explicitly set.

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

starknet_devnet/blueprints/rpc/misc.py Outdated Show resolved Hide resolved
starknet_devnet/blueprints/rpc/misc.py Outdated Show resolved Hide resolved
starknet_devnet/blueprints/rpc/misc.py Outdated Show resolved Hide resolved
test/rpc/rpc_utils.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_class.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_class.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_estimate_fee.py Outdated Show resolved Hide resolved
test/rpc/test_rpc_estimate_fee.py Show resolved Hide resolved
test/rpc/test_rpc_transactions.py Show resolved Hide resolved
@FabijanC FabijanC changed the title Updated JsonRpc Api to v0.3.0-rc1 Update JsonRpc Api to v0.3.0-rc1 May 18, 2023
@FabijanC FabijanC merged commit 46d3aea into 0xSpaceShard:master May 18, 2023
@mikiw
Copy link
Contributor

mikiw commented May 19, 2023

I can see that this was already merged but there are 7 failed tests, one is related to keys in get events.

=========================== short test summary info ============================
FAILED test/test_compiler.py::test_valid_compiler_specification[cli_args1] - AssertionError: assert 1 == 0
 +  where 1 = <Popen: returncode: 1 args: ['poetry', 'run', 'starknet-devnet', '--host', '...>.returncode
FAILED test/test_compiler.py::test_declaring_with_custom_manifest[run_devnet_in_background1] - requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=34355): Max retries exceeded with url: /feeder_gateway/get_nonce?contractAddress=0x347be35996a21f6bf0623e75dbce52baba918ad5ae8d83b6f416045ab22961a&blockNumber=pending (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f837986c1c0>: Failed to establish a new connection: [Errno 111] Connection refused'))
FAILED test/test_fork_cli_params.py::test_invalid_fork_network - AssertionError: assert 'Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6\n\n' == ''
  + Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6
  +
FAILED test/test_blocks_on_demand.py::test_events - KeyError: 'result'
FAILED test/test_fork_cli_params.py::test_url_not_sequencer - AssertionError: assert 'Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6\n\n' == ''
  + Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6
  +
FAILED test/test_fork_cli_params.py::test_block_provided_without_network - AssertionError: assert 'Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6\n\n' == ''
  + Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6
  +
FAILED test/test_fork_cli_params.py::test_too_big_block_id - AssertionError: assert 'Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6\n\n' == ''
  + Using cairo compiler: cairo-lang-starknet 1.0.0-alpha.6
  +
================== 7 failed, 373 passed in 994.49s (0:16:34) ===================

Exited with code exit status 1
CircleCI received exit code 1

@mikiw
Copy link
Contributor

mikiw commented May 19, 2023

Hi @bartekryba when you have a moment can you take a look at that, please?

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.

Update JSON-RPC schema to v0.3.0 RPC schema felt validation
3 participants