Alethio/ethereum-lite-explorer

POA extradata breaks eth-ibft2

Opened this issue · 0 comments

we may need an option to have ibft2 parse the extradata differently when the consensus algo is POA and not POW, seems like the size of extradata goes from 32b to 140 or something around that.

the plugin:

 {
         "uri": "plugin://aleth.io/eth-ibft2?v=2.0.1"
    }],

in config

 "extraData": [{
                        "def": "module://aleth.io/eth-ibft2/block/lite/extra-data"
                    }]

the error in browser

Couldn't fetch data from adapter "local-adapter://2f7aff2c-eef1-4771-a1c3-077f689f191a/0" TypeError: Cannot read property 'forEach' of undefined
    at be.decode (ExtraDataDecoder.ts:30)
    at Object.<anonymous> (extraDataModule.ts:18)
    at Generator.next (<anonymous>)
    at tslib.es6.js:71
    at new Promise (<anonymous>)
    at h (tslib.es6.js:67)
    at Object.load (extraDataModule.ts:17)
    at DataLoader.ts:123 {context: {…}}