0xSpaceShard / starknet-devnet-rs

A local testnet for Starknet... in Rust
https://0xspaceshard.github.io/starknet-devnet-rs/
MIT License
100 stars 56 forks source link

`starknet_getEvents` returning wildcard error on nonexistent block #498

Closed tonypony220 closed 3 weeks ago

tonypony220 commented 1 month ago

Describe the bug (observed vs expected behavior) version 0.0.7 with flag --state-archive-capacity full when passing not existing block number got an WILDCARD_RPC_ERROR_CODE .

POST /rpc HTTP/1.1
user-agent: Dart/3.4 (dart:io)
content-type: application/json; charset=utf-8
accept-encoding: gzip
content-length: 149
host: 0.0.0.0:5050

{"jsonrpc": "2.0", "method": "starknet_getEvents", "params": [{"from_block": {"block_number": 100}, "to_block": "latest", "chunk_size": 0}], "id": 0}HTTP/1.1 200 OK
content-type: application/json
content-length: 71
vary: origin, access-control-request-method, access-control-request-headers
access-control-allow-origin: *
date: Mon, 17 Jun 2024 14:56:50 GMT

{"jsonrpc":"2.0","id":0,"error":{"code":-1,"message":"No block found"}}

should return BLOCK_NOT_FOUND

FabijanC commented 1 month ago

Thanks for reporting with links!

Do you want to provide a fix PR? If not, somebody from the team will take over.

tonypony220 commented 1 month ago

@FabijanC Of course, if there's no rush.