py-substrate-interface: Allow to skip unknown runtime types
Hi,
Yesterday Westend runtime was updated and we couldn’t process blocks, because our py-substrate-interface was of version 0.10.4. After an update to the latest one, it was resolved.
I’ve looked at the blocks the previous version failed on and the only thing I could find there are staking reward payouts, which we don’t care about.
Is it maybe possible to add some “skip unknown” argument to get_chain_block/get_runtime_block, which will skip exceptions raised from extrinsic_decoder.decode() and continue to processing the rest of the extrinsics in block?
Thanks, Pavel
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Added ignore_decoding_errors to get_runtime_block and get_block_extrinsics #66 — committed to polkascan/py-substrate-interface by deleted user 3 years ago
- Catch ValueError in case of decoding error #66 Type registry update — committed to polkascan/py-substrate-interface by deleted user 3 years ago
- Refactored type registry preset update procedure #66 — committed to polkascan/py-substrate-interface by arjanz 3 years ago
The update procedure has been refactored in latest release, so now it won’t rely on disk writes anymore.
Basically
substrate.reload_type_registry()is enough to download and apply the latest type registry from Github for current instance.See: https://github.com/polkascan/py-substrate-interface#keeping-type-registry-presets-up-to-date
Yes you can expect it in the next release by the end of this week