-
Notifications
You must be signed in to change notification settings - Fork 7
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
polkadot/api fails to fetch very early blocks with the latest type definitions #32
Comments
Hi, we have the same issue. My code: const blockHash = await api.rpc.chain.getBlockHash(1);
const block = await api.rpc.chain.getBlock(blockHash);
const allEvents = await api.query.system.events.at(blockHash); It produced following errors:
|
I tried @polkadot/api 3.4.1, and it works. |
Is there any solution to fix it in @polkadot/api ^6 version? polkadot js has troubles with started blocks https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.edgewa.re#/explorer/query/0xecfe590f070b93fef6bfc5620c3f9b925afd0b1c8ca3182e9af206110d3e7b31 But subscan show it correctly https://edgeware.subscan.io/block/0xecfe590f070b93fef6bfc5620c3f9b925afd0b1c8ca3182e9af206110d3e7b31?tab=log |
We made some research and find some bugs and solutions for edgeware types. But one of this bugs (number 3) we can't fix on our side.
Can be fixed by add custom type types: {
RewardDestinationTo257: {
"_enum": ["Staked", "Stashed", "Controller"]
}
}
Can be fixed by add custom type types: {
Signature: '[u8; 60]'
}
Repeates on different blocks (e.g. 1632627, 4310374). Problem meets in batch transactions with set_controller function. This is specific for the spec version under 45. UPD: Issue number 3 can be fixed with custom type types: {
ValidatorPrefs: {
commission: "Compact<Perbill>",
},
} |
@Asmadek seems to be an on-chain migration issue, here, keep in mind that this repo is about to be decomissioned very soon: |
This looks like a storage migration issue, I will look deeper into this |
I'm using the latest type definitions and polkadot/api v4.17.1 and edgeware type definitions from master.
When trying to fetch the blocks of height 1 and later, with API, I get
Fetching blocks with height > 1M seems to work fine
The text was updated successfully, but these errors were encountered: