polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
240 stars 114 forks source link

Substrateinterface block info fetching bug polkadot #396

Closed GeorgeVSV closed 1 month ago

GeorgeVSV commented 1 month ago

I currently face issues with fetching block information via polkadot websocket endpoint (using substrateinterface lib in Python) for blocks with specific transaction type, here are few samples:

Block number : 21473809 Transaction type : convictionvoting (remove_vote) Error text: ValueError: Index '20'' not present in Enum type mapping image

Block number : 21473810 Transaction type : balances (transfer_allow_death) Error text: RemainingScaleByteEmptyException: Decoding - Current offset: 108 / length: 148 image

I would be grateful for any help

arjanz commented 1 month ago

I didn't encounter any problems when using substrate.get_extrinsics(block_number=21473810) myself. Just to double-check, are you using the latest versions of substrate-interface and scalecodec?

GeorgeVSV commented 1 month ago

@arjanz Hi! The problem was with scalecodec, after version updating the problem was solved, thank you!