AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
134 stars 80 forks source link

setHead stops working #516

Closed xlc closed 10 months ago

xlc commented 10 months ago

Just tried it with 0.9.0 and dev_setHead wasn't working for me

ermalkaleci commented 10 months ago

I tried. It seems to work

xlc commented 10 months ago

npx @acala-network/chopsticks@0.9.0 xcm --relaychain kusama --parachain statemine --parachain kusama-bridge-hub

and api.rpc('dev_setHead', [-1]) in https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8000#/js

Got error

 Error handling request: ResponseError: Block not found -1 'ResponseError: Block not found -1
    at rpc (/Users/xiliangchen/.npm/_npx/68ad2bf4bb15c1f9/node_modules/@acala-network/chopsticks/dist/cjs/plugins/set-head/index.js:30:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async processRequest (/Users/xiliangchen/.npm/_npx/68ad2bf4bb15c1f9/node_modules/@acala-network/chopsticks/dist/cjs/server.js:91:30)
    at async WebSocket.<anonymous> (/Users/xiliangchen/.npm/_npx/68ad2bf4bb15c1f9/node_modules/@acala-network/chopsticks/dist/cjs/server.js:148:30)'
ermalkaleci commented 10 months ago

you're sending [-1], should be -1

xlc commented 10 months ago

oh right I forget it adds the array for me. ok, but still, the error message is confusing.

I guess what's missing is z schema validation

ermalkaleci commented 10 months ago

yes