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

Skaled return 0 block on eth_getBlockByNumber with any string as parameter #1201

Closed
gannakulikova opened this issue Oct 31, 2022 · 4 comments
Assignees
Labels
bug Something isn't working epic:eth-compatibility
Milestone

Comments

@gannakulikova
Copy link
Contributor

Versions
Skaled: schain:3.14.15-stable.2

Environment
20 active nodes on the network
2 schains up and running

Steps to Reproduce/Description

  1. send eth_getBlockByNumber JSON-RPC call to skaled with any string value as parameter
  2. check response

Expected behavior
Should return an error
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"invalid argument 0: hex string without 0x prefix"}}

Actual result
skaled return 0 block in response.

example request:

curl http://endpintToskaled/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getBlockByNumber","params":["stringValueInsteadOfBlockNuber",false],"id":1,"jsonrpc":"2.0"}'

@DmytroNazarenko DmytroNazarenko added the bug Something isn't working label Apr 3, 2023
@DmytroNazarenko DmytroNazarenko added this to the SKALE 2.3 milestone Aug 9, 2023
@PolinaKiporenko PolinaKiporenko moved this from To Do to Ready For Pickup in SKALE Engineering 🚀 Sep 8, 2023
@olehnikolaiev olehnikolaiev moved this from Ready For Pickup to In Progress in SKALE Engineering 🚀 Sep 26, 2023
@olehnikolaiev
Copy link
Contributor

not relevant for 3.17.0

 curl http://endpintToskaled/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getBlockByNumber","params":["stringValueInsteadOfBlockNuber",false],"id":1,"jsonrpc":"2.0"}' http://127.0.0.1:1234
curl: (6) Could not resolve host: endpintToskaled
{"error":{"code":-32602,"data":null,"message":"INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised"},"id":1,"jsonrpc":"2.0"}

@olehnikolaiev olehnikolaiev moved this from In Progress to Ready For Release Candidate in SKALE Engineering 🚀 Sep 28, 2023
@DmytroNazarenko
Copy link
Collaborator

Verified on devnet:

{"error":{"code":-32602,"data":null,"message":"INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised"},"id":1,"jsonrpc":"2.0"}

@DmytroNazarenko
Copy link
Collaborator

skaled: 3.18.0-beta.0

@DmytroNazarenko DmytroNazarenko moved this from Ready For Release Candidate to Merged To Release Candidate in SKALE Engineering 🚀 Jan 23, 2024
@EvgeniyZZ EvgeniyZZ moved this from Merged To Release Candidate to QA in SKALE Engineering 🚀 Jan 23, 2024
@oleksandrSydorenkoJ
Copy link

Verified on Regression network
Skale chain aged-wry-finished-skale
Version skaled: 3.18.0-beta.0

curl -X POST --data '{"id":4,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["stringValueInsteadOfBlockNuber", false]}'   

{"error":{"code":-32602,"data":null,"message":"INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised"},"id":4,"jsonrpc":"2.0"}

@EvgeniyZZ EvgeniyZZ moved this from QA to Done in SKALE Engineering 🚀 Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epic:eth-compatibility
Projects
Archived in project
Development

No branches or pull requests

6 participants