-
Notifications
You must be signed in to change notification settings - Fork 60
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
0.5.0 spec #230
Merged
Merged
0.5.0 spec #230
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nalityStatus non optional, remove create_rejected method
…xisting in/out structures
…dditions to the requests in the spec, the deserialization will fail
FabijanC
requested changes
Nov 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed everything except the spec_reader
testing module, I would like to consult with you about that.
DelevoXDG
suggested changes
Nov 15, 2023
Co-authored-by: FabijanC <[email protected]>
…rs into 0.5.0-spec
DelevoXDG
reviewed
Nov 16, 2023
FabijanC
requested changes
Nov 16, 2023
crates/starknet-server/src/api/json_rpc/spec_reader/data_generator.rs
Outdated
Show resolved
Hide resolved
crates/starknet-server/src/api/json_rpc/spec_reader/spec_schemas/mod.rs
Outdated
Show resolved
Hide resolved
FabijanC
approved these changes
Nov 17, 2023
FabijanC
reviewed
Nov 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Test module
spec_reader
For generating JSON requests and responses from JSON-RPC specification.
edit_spec_instructions.yaml file is used for correcting some errors in the spec and removing some PENDING structs, because we dont support pending feature yet
NOTE: If for some reason there are unwraps in this module, keep in mind that its only used in tests.
NOTE: the specs in test_data are not 100% similar to the the spec in starkware repo, due to limitation of modifying the spec some irrelevant data to devnet was removed manually
ApiError::ContractError
receives anError
as parameter. SerializingContractError
toRpcResult
populates the data object.RPC_SPEC_VERSION
,STARKNET_VERSION
starknet_pendingTransactions
starknet_specVersion
StarknetTransaction::create_rejected
starknet_getTransactionStatus
RPC methodstarknet_version
andl1_gas_price
execution_resources
to receiptdeny_unknown_fields
, so we can be maximally compliant with the specification.PatriciaKeyHex
and moved its serialization/deserialization toStarknet-types
test_simulate_transactions.rs
constants.rs
StateDiff
toThinStateDiff
StateUpdate
to holdStateDiff
, instead of its flattened propertiesapi_error_to_rpc_error
BroadcastedDeclareTransactionEnumWrapper
for specifying the type, because before only accepting BroadcastedDeclareTransaction doesn't accept a type field, but in the spec a type field is specified for all input objects for the methodsaddDeclareTransaction
,addInvokeTransaction
,addDeployAccountTransaction
ExecutionResources
in transaction receiptmessage_available_if_estimation_panics
to send custom rpc request, instead of using starknet-rs, because with 0.5.0 the data field of the error result is populated with information and in this test we need to check the revert reason returned from the rpc requestChecklist:
json-rpc-0.4.0
onmain
just before this PR is merged./scripts/format.sh
./scripts/clippy_check.sh
cargo test