polkascan / py-substrate-interface

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

Parse author for AURA consensus #247

Closed KarimJedda closed 1 year ago

KarimJedda commented 1 year ago

I've been trying to parse the author for blocks from Acala, however they're using the aura consensus, which is currently not implemented https://github.com/polkascan/py-substrate-interface/blob/master/substrateinterface/base.py#L2623.

I tried to extend it knowing RawAuraPreDigest is in the py-scale-codec package but I wasn't successful so far. Any help/hint how this can be done?

When comparing to the harvester project, it seems it would be possible: https://github.com/polkascan/polkascan-pre-harvester/blob/f4d74e58fd271459704ef821e1e27423d2379384/app/processors/block.py#L66, however I didn't find out where to find the "slotNumber" in the blocks from the chain. Any hint or help would be appreciated. Thanks a lot!