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

rpc 0.7.0 #364

Merged
merged 58 commits into from
Mar 1, 2024
Merged

rpc 0.7.0 #364

merged 58 commits into from
Mar 1, 2024

Conversation

marioiordanov
Copy link
Contributor

@marioiordanov marioiordanov commented Feb 29, 2024

Usage related changes

RPC 0.7.0
Starknet 0.13.1

Development related changes

  • CasmContractClass is moved from cairo_lang_starknet to cairo_lang_starknet_classes.
  • Added nonzero_ext lib to work with NonZero types.
  • Changed cli param gas_price to NonZeroU128 from u64, so conversions can be avoided.
  • Changed tests setup to reflect for the increase in gas fee for transactions, mostly Declare txns. (expected behavior https://spaceshard.slack.com/archives/C03HL8DH52N/p1708538169996519?thread_ts=1708496338.100619&cid=C03HL8DH52N)
  • And decrease in gas fee for the other types of txns
  • Refactored estimate_transaction_fee to use blockifier helper functions
  • Added MAX_BYTECODE_SIZE_LIMIT constant which is needed for converting from Sierra to Cash (https://spaceshard.slack.com/archives/C05FAMWQ8JE/p1708269433783959)
  • Added execution_resources to traces
  • Updated blockifier to 0.5.0-rc.3
  • Added get_versioned_constants method that replaces constants regarding VMResources, such as builtins and steps, using default blockifier values.
  • Changed get_transaction_receipt_by_hash signature, to avoid copying of the input param.
  • Added get_block_with_receipts.
  • Edited starknet_traceBlockTransactions to return Vec instead of an object, because it adds additional traces property to the serialized object.
  • Added data_gas props to BlockHeader
  • Excluded starknet_getBlockWithReceipts from testing the json request/response, because we use the transaction object in the response which contains the transaction hash, but in the RPC spec this property is omitted. Also the spec is not released yet and its format maybe can change. Also requires refactoring to exclude the transaction_hash from already saved Transactions Refactor Transaction enum #363
  • Removed usage of starknet_rs FeeEstimate, because its missing some fields from the new spec.
  • Refactored ExecutionResources -> ComputationResources + DataAvailability.
  • Added custom deserialisation to DataAvailability because it fails to deserialize to u128, due to limitation in serde, when used in combination with #[flatten]
  • Updated circleci image to use 1.71.0
  • Change execution_resources of traces to be of type ComputationResources
  • Edited integration tests, because the fee is part of transaction_hash calculation.
  • renamed update_block_context to advance_block_context_block_number
  • Ignored execution of estimate_fee_tests because starknet-rs doesn't support 0.7.0 rpc.
  • Edited integration tests of simulate_transactions

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

@marioiordanov marioiordanov linked an issue Feb 29, 2024 that may be closed by this pull request
2 tasks
@marioiordanov marioiordanov marked this pull request as ready for review February 29, 2024 11:37
@FabijanC FabijanC self-requested a review February 29, 2024 11:48
@marioiordanov marioiordanov merged commit c6ffb99 into main Mar 1, 2024
@marioiordanov marioiordanov deleted the blockifier-0.5-rc.3 branch March 1, 2024 08:46
@penovicp penovicp mentioned this pull request Mar 18, 2024
2 tasks
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.

RPC 0.7
2 participants