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

Not support state_getStorageAt when replaying Polkadot Blocks #345

Closed
albertov19 opened this issue Jul 24, 2023 · 8 comments
Closed

Not support state_getStorageAt when replaying Polkadot Blocks #345

albertov19 opened this issue Jul 24, 2023 · 8 comments

Comments

@albertov19
Copy link
Contributor

It seems that with the latest Chopsticks it is not supporting the new RPC method state_getStorageAt when trying to replay a block - maybe this was introduced in 0.9.43?

@albertov19
Copy link
Contributor Author

I've modified a Chopsticks fork and now I run into state_getKeysPagedAt so it seems that it also needs fixed

After forcing this:

  async getStorage(key: string, hash?: string) {
    return this.#provider.send<string>('state_getStorage', [key, hash])
  }

  async getKeysPaged(prefix: string, pageSize: number, startKey: string, hash?: string) {
    return this.#provider.send<string[]>('state_getKeysPaged', [prefix, pageSize, startKey, hash])
  }

In chopsticks/packages/chopsticks/src/api.ts it worked

@xlc
Copy link
Member

xlc commented Jul 24, 2023

how do I reproduce this issue?

@xlc
Copy link
Member

xlc commented Jul 24, 2023

but the At rpc is just alias so the current code is redundant anyway. will change it.

@albertov19
Copy link
Contributor Author

Try replaying a Polkadot block now with 0.9.43 - not sure if it is when that RPC method changed but I could not replay it.

Thanks!

@xlc
Copy link
Member

xlc commented Jul 25, 2023

Could you try Chopsticks master and let me know if it fixed the issue for you?

@albertov19
Copy link
Contributor Author

It worked! Thanks!!

@albertov19
Copy link
Contributor Author

Hey so it seems Chopsticks version 0.7.3 has the same issue 😢

@albertov19 albertov19 reopened this Aug 22, 2023
@xlc
Copy link
Member

xlc commented Aug 22, 2023

We had a big refactor. Could you try 0.8.0-5? It is currently marked as beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants