-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support websockets API #1515
Merged
Merged
Support websockets API #1515
Changes from 250 commits
Commits
Show all changes
287 commits
Select commit
Hold shift + click to select a range
2c9c736
Fix cyclic imports test
franciszekjob 9164275
Add ws-related dataclasses and schemas
franciszekjob 4124537
Add `WSClient` and `RpcWSClient`
franciszekjob 2f1a660
Add `FullNodeWSClient`
franciszekjob 067e583
Cleanup `FullNodeWSClient`
franciszekjob 3648885
Refactor `FullNodeWSClient._handle_received_message()`
franciszekjob ebaa859
Fix circular imports
franciszekjob 5fdda6e
Merge branch 'franciszekjob/1498-2-get-compiled-casm' of https://gith…
franciszekjob 9ea6c90
Add `ReorgNotificationSchema`
franciszekjob e845e50
Add `devnet_ws` fixture
franciszekjob bd9d693
Fix `resource_bounds` params name
franciszekjob b8748e0
Add default values in `get_storage_proof()`
franciszekjob 03fa3f2
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob b62540b
Merge branch 'franciszekjob/1498-2-get-compiled-casm' of https://gith…
franciszekjob 71ff6a4
Add `devnet_ws_client` fixture
franciszekjob faa97ec
Add `ws_client` and `full_node_ws_client` fixtures
franciszekjob 7b4dd76
Move `devnet_ws` to separate file
franciszekjob 9ebc171
Refactor `FullNodeWSClient._handle_received_message()`; Fix typechecks
franciszekjob ddcfc06
Fix formatting and linting
franciszekjob a5854da
Resolve conflicts with `development`
franciszekjob 98165e5
Fix linting
franciszekjob 6590944
Update `resource_bounds` params description
franciszekjob 605b2b3
Apply other code review suggestions
franciszekjob 14dcb5b
Fix description in migration guide
franciszekjob ba403dd
Fix example snippets in readme
franciszekjob 6a3301b
Add mocked values in tests
franciszekjob 34896b3
Add setup devnet workflow
franciszekjob 8050a22
Change `devnet.yml` to be composite action
franciszekjob d8a901d
Rename `l1_transaction_hash` to `transaction_hash` in `starknet_getMe…
franciszekjob c12908b
Move `devnet.yml` to `composite-actions` dir
franciszekjob 7233e65
Format
franciszekjob 6945fbc
Rename devnet composite action
franciszekjob a62ebdc
Update devnet action path
franciszekjob 819321e
Add missing `shell` property
franciszekjob e4b947c
Refactor devnet installation action; Add temporary workflow which wil…
franciszekjob 667d5b3
Add inputs to steps using devnet action
franciszekjob dc09de0
Add missing checkout step
franciszekjob 871499b
Add missing `devnet_sha` input to devnet setup workflow
franciszekjob 22192f8
Fix devnet installation action - use `devnet_sha` input
franciszekjob 44fe1ff
Trgigger CI
franciszekjob d45b63e
Remove `install_devnet.yml` workflow
franciszekjob 480862c
Add todo in `checks.yml`
franciszekjob 1c56dcf
Remove temporary step for showing dirs
franciszekjob 90877d4
Move `parsed_abi_v2` into `test_event_serialization_v2`
franciszekjob 1bffab1
Fix formatting
franciszekjob 54da25a
Add echo for displaying contracts v2 directory contents
franciszekjob 9e8e356
Fix displaying contents of contracts v2 directory
franciszekjob 1431174
Temporary change for displaying directory contents
franciszekjob 4c3bbf0
Temporarily list contract v2 directory
franciszekjob 2ad7fe7
Temporarily display owd
franciszekjob a71dc33
Revert "Temporarily display owd"
franciszekjob cd64e4b
Include Python 3.9 in `Setup Tests` job
franciszekjob a081bd0
Remove CI changes apart from modified devnet installation
franciszekjob 53945e8
Temporarily display directory with compiled contracts
franciszekjob c9af96a
Fix ls
franciszekjob 25df9be
Fix ls
franciszekjob 34dddd4
Unconditionally compile contracts v1 and v2
franciszekjob 9e353c2
Use asdf action
franciszekjob 09503e1
Implement `test_get_transaction_status_with_failure_reason`; Code cle…
franciszekjob b72068d
Fix linting; Tests cleanup
franciszekjob b78fe68
Update regex in `test_rejection_reason_in_transaction_receipt`
franciszekjob 43c303c
Skip `test_compute_deploy_account_v3_transaction_hash`
franciszekjob 97ccdef
Format
franciszekjob 6e2ccc7
Skip `test_block_with_receipts_latest`
franciszekjob 424e122
Fix failing docs tests
franciszekjob a0f3671
Fix linting
franciszekjob 993508b
Remove contracts conditional compilation on CI
franciszekjob bd09a44
Add contracts compilation steps in docs tests
franciszekjob 685b466
Skip `test_get_transaction_by_block_id`; Add todo
franciszekjob acaa392
Skip `test_get_transaction_by_block_id`; Add todo
franciszekjob 9a16fdc
Skip `test_using_full_node_client`; Add todo
franciszekjob 680317a
Skip `test_get_transaction_by_block_id`; Add todo
franciszekjob 4bd520b
Add todos
franciszekjob 8ad1d75
Add todos in workflow
franciszekjob bf1274b
Update resource bounds params
franciszekjob 68adca7
Minor refactor of resource bounds params usage
franciszekjob 20ad81a
Update resource bounds params
franciszekjob c7fb9bd
Apply code review suggestion
franciszekjob 24a1357
Add `storage_root` field to `ContractLeafData`
franciszekjob c1dcbcb
Merge branch 'franciszekjob/1498-2-get-compiled-casm' of https://gith…
franciszekjob 2ebead7
Rename `block` to `block_id` param in ws methods
franciszekjob 372609f
Add `is_reverted` field to `FunctionInvocation`
franciszekjob 706196a
Add todo
franciszekjob ceb1706
Remove `block_id` param from `starknet_subscribeTransactionStatus` en…
franciszekjob 7819a66
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob bde997d
Remove `contracts_storage_proof` field from `ContractsProof`
franciszekjob f868364
Fix `storage_root` data key
franciszekjob 0edf8d1
Implement `test_get_messages_status`
franciszekjob 8b7a4c1
Fix `test_latest_resource_bounds_take_precedence`
franciszekjob c0da326
Fix `test_deploy_prefunded_account`
franciszekjob 4ea1317
Remove mocks from full node client
franciszekjob dd195ac
Add `l1_data_gas` to `ExecutionResources`
franciszekjob 9c2b3c2
Update `CommonTransactionV3Fields.compute_resource_bounds_for_fee`
franciszekjob cae0da3
Add `l1_data_gas` to ExecutionResourcesSchema`
franciszekjob d7914ea
Fix `FullNodeClient.estimate_fee`
franciszekjob e7e8b64
Fix contract tests
franciszekjob 4c39b2b
Temporarily skip some tests; Fix other tests
franciszekjob b4189eb
Update devnet sha
franciszekjob 8ff797a
Remove code, tests and docs for old txs
franciszekjob 1702e0e
Fix lint and typecheck
franciszekjob 4d13bfc
Fix formatting
franciszekjob f2392e5
Fix lint and typecheck
franciszekjob ca2acab
Remove old txs usages, adjust tests and docs
franciszekjob 093f956
Fix tests
franciszekjob 7c49192
Remove todos
franciszekjob 0774348
Remove `test_account_get_balance_eth`
franciszekjob ddafd39
Fix other tests
franciszekjob fd351ca
Skip test
franciszekjob 73f2692
Adjust devnet
franciszekjob 9475a36
Fix skip mark
franciszekjob 2b2d7a5
Remove skip marks; Fix tests
franciszekjob e019506
Update ledger app sha
franciszekjob 8152c21
Refactor assertion in test
franciszekjob 1e3643b
Restore original `test_ci_v2`
franciszekjob d359e9b
Remove `ResourceBounds.init_with_l1_gas_only`
franciszekjob 8c1a4c3
Add todos
franciszekjob f3a83cb
Formatting
franciszekjob ad110dc
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 4da960f
Pull main
franciszekjob c3b3366
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 061a17e
Adjust todos and fixmes
franciszekjob 240c8ad
Use `argent_account_class_hash` in `test_deploy_account_and_transfer`
franciszekjob d4c2eed
Fix `test_deploy_account_and_transfer`
franciszekjob df36664
Revert "Fix `test_deploy_account_and_transfer`"
franciszekjob f67ad37
Revert "Use `argent_account_class_hash` in `test_deploy_account_and_t…
franciszekjob 2468055
Skip and add todo for `test_deploy_account_and_transfer`
franciszekjob db6b342
Update skip message for `test_get_transaction_by_block_id`
franciszekjob 6a943fd
Update todo
franciszekjob d9a2091
Remove `--initial-balance` flag for devnet start
franciszekjob dd9a037
Revert "Remove `--initial-balance` flag for devnet start"
franciszekjob a34ece9
Fix models and schemas for `get_storage_proof`; Add tests
franciszekjob 7eb95b0
Add storage proof response json
franciszekjob c9027fa
Restore values in storage proof response json
franciszekjob d7f9afa
Use shorter example response for `get_storage_proof` test
franciszekjob 2293012
Adjust storage proof tests
franciszekjob d6dd873
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 2ea844e
Remove helper function
franciszekjob b61bc4a
Update migration guide
franciszekjob eadc306
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 3472c77
Update migration guide
franciszekjob c3f1280
Fix linting
franciszekjob 825d2b3
Fix formatting
franciszekjob dfa2565
Pull changes from upstream
franciszekjob 26ae3b2
Remove unused imports
franciszekjob 965ddfb
Add file with `ContractsStorageKeysSchema`
franciszekjob 005df53
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob b1324fb
Pull changes from upstream
franciszekjob 2c9ace9
Fix `test_get_storage_proof`
franciszekjob 91df2ae
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 00ae4bc
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob b2341f6
Remove multipliers from `EstimatedFee.to_resource_bounds`
franciszekjob 3471fd0
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 53c6720
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob 554c506
update todo
franciszekjob edf6244
Fix and update network tests
franciszekjob 9a24a3a
Fix devnet client tests
franciszekjob 874d549
Fix CI
franciszekjob 88eae81
Use asdf action
franciszekjob 6a08d7a
Restore `Download contracts` step in CI
franciszekjob d3ee384
Temporarily list contracts dir
franciszekjob a0da29a
Update listing dirs
franciszekjob ab7201a
Update listing dirs
franciszekjob 95b6612
Temporary CI change
franciszekjob ad3092a
Display compiled contracts path
franciszekjob 09582cb
Compile contract before running tests in CI
franciszekjob afc276d
Merge branch 'franciszekjob/1498-fix-network-tests' of https://github…
franciszekjob 6919c41
Partially implement `test_get_compiled_casm`
franciszekjob bf40c24
Fix params in `FullNodeClient.get_compiled_casm`
franciszekjob 334ae73
Update dependencies
franciszekjob 98102b2
Restore read api for txs other than v3
franciszekjob 9130912
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob 403acda
Refactor broadcasted txn schemas
franciszekjob be1d06c
Add todo as skip reason
franciszekjob 96437db
Add `test_sign_invoke_v3_auto_estimate`
franciszekjob 6e89aeb
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob ff9e751
Run `poetry lock`
franciszekjob 504a4bf
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob 149b3e7
Restore test values in `test_get_transaction_by_block_id_and_index`
franciszekjob 8dff862
Fix docs
franciszekjob e769188
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob 4560095
Docstrings formatting
franciszekjob 425a1ab
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob 4b30550
Merge branch 'franciszekjob/1498-fix-network-tests' of https://github…
franciszekjob bd795f2
Add todos
franciszekjob f2c8725
Merge branch 'franciszekjob/1498-remove-old-txs' of https://github.co…
franciszekjob 555c0f2
Merge branch 'franciszekjob/1498-fix-network-tests' of https://github…
franciszekjob b9c8f54
Remove old transactions (#1557)
franciszekjob 7b6c1cf
Fix `test_transaction_not_received_max_fee_too_big`
franciszekjob 7e2482b
Resolve merge conflicts
franciszekjob b859d78
Merge branch 'franciszekjob/1498-fix-network-tests' of https://github…
franciszekjob 9d6b269
Fix and update network tests (#1563)
franciszekjob 6839a41
Add rust toolchain installation
franciszekjob e204733
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob f02a234
Add `HintSchema`; Rename fields
franciszekjob 8911fca
Update field names in models
franciszekjob d135bc5
Add tests for `get_compiled_casm`
franciszekjob 86dee4d
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 7ccbf0e
Move models and schema from executables api to separate files
franciszekjob b4da6f5
Add docs
franciszekjob eff757e
Fix migration guide
franciszekjob 5484105
Pull changes from upstream
franciszekjob d097214
Rename file
franciszekjob e0ecdf5
Fix `test_get_compiled_casm` for devnet
franciszekjob 90b1060
Remove unused import
franciszekjob a8ad3c6
Add `STARKNET_PY_MARSHMALLOW_UNKNOWN_EXCLUDE` to CI
franciszekjob c1d9235
Change `index_delta_minus_1` to `index_delta_minus1`
franciszekjob 01fe3df
Add fixes in executables schemas and models
franciszekjob 3e7578f
Use schema with excluding unknown fields for `CasmClassSchema`
franciszekjob 57a3ec2
Update todos
franciszekjob d6750e4
Merge branch 'franciszekjob/1498-2-get-compiled-casm' of https://gith…
franciszekjob 1bd395d
Support `starknet_getCompiledCasm` (#1514)
franciszekjob 23381b5
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob 5103bf8
Add todos
franciszekjob 855f30b
Merge branch 'franciszekjob/1498-rpc-0.8.0' of https://github.com/sof…
franciszekjob a9af3cc
Merge branch 'development' of https://github.com/software-mansion/sta…
franciszekjob 41f3a06
Add missing websocket API methods; Add tests
franciszekjob ab9fa6a
Fix formatting
franciszekjob 12e242a
Remove composite action
franciszekjob 830f831
Format and lint
franciszekjob 132ae58
Add more tests
franciszekjob f55c041
Further improvements of websocket client
franciszekjob 8ed4671
Remove api docs (will be added in subsequent PR)
franciszekjob 1236dc7
Run `poetry lock`
franciszekjob 9e7168e
Update docstrings
franciszekjob d57cc18
Add `WebsocketClientError`
franciszekjob 991eb79
Fix `pytest_plugins`
franciszekjob a611bec
Remove unused schemas; Refactor passing block number and block hash p…
franciszekjob 70a38ba
Remove unused `WSClient`
franciszekjob 2ea58e8
Add `devnet_ws` fixture
franciszekjob 423d10f
Add `test_new_heads_subscription_block_not_found`
franciszekjob a165e45
Remove prints
franciszekjob 7eec2fa
Fix passing block id
franciszekjob 74659d1
Update websocket schemas
franciszekjob 315e68e
Add devnet websocket fixture
franciszekjob d11e2e5
Remove `test_new_heads_subscription_block_not_found`
franciszekjob cd1bfaf
Restructure files; Add new tests
franciszekjob 9b57962
Remove unused model
franciszekjob 5ddd91a
Add missing docstrings
franciszekjob 96e2106
Update subscription id type to `str` (RPC 0.8.1)
franciszekjob 22bb883
Fix formatting
franciszekjob 591acca
Remove unused schema
franciszekjob c9a026b
Add `is_connected` property; Add connection test
franciszekjob 652657b
Little comments cleanup
franciszekjob 385495c
Rename `reorg_notification_handler` to `on_chain_reorg`
franciszekjob 0746a0f
Fix formatting
franciszekjob 4648c20
Fix serialize method in `PendingTransactionsNotificationResultField`
franciszekjob 83f84d5
Merge branch 'development' of https://github.com/software-mansion/sta…
franciszekjob ff17d73
Apply code review suggestions
franciszekjob 382a837
Change subscription id type to int
franciszekjob ffbde39
Change type of subscription id to str
franciszekjob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
|
||
Hash = Union[int, str] | ||
Tag = Literal["pending", "latest"] | ||
LatestTag = Literal["latest"] | ||
|
||
|
||
@dataclass | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
from starknet_py.net.client_models import ( | ||
BlockHashAndNumber, | ||
BlockHeader, | ||
BlockStateUpdate, | ||
ContractsNonce, | ||
DeclaredContractHash, | ||
|
@@ -77,6 +78,10 @@ class BlockHeaderSchema(Schema): | |
l1_da_mode = L1DAModeField(data_key="l1_da_mode", required=True) | ||
starknet_version = fields.String(data_key="starknet_version", required=True) | ||
|
||
@post_load | ||
def make_dataclass(self, data, **kwargs) -> BlockHeader: | ||
return BlockHeader(**data) | ||
|
||
Comment on lines
+81
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: It was missing. |
||
|
||
class BlockHashAndNumberSchema(Schema): | ||
block_hash = Felt(data_key="block_hash", required=True) | ||
|
Oops, something went wrong.
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.
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.
note: Moved it to it doesn't sit in full node client's file. It could be theoretically placed in a file which is not client specific or we could rename this file to e.g.
rpc_utils.py
.