paritytech / polkadot-introspector

A collection of tools focused on debugging and monitoring the relay chain and parachain progress from a 🐦-view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parachain Commander: handle forks

sandreim opened this issue Β· comments

Stats might be incorrect when we have forks (we subscribe to the best block stream). This should be handled and accounted for.

2022-12-14T07:28:36.000000000Z +6000ms [#63168]
        CANDIDATE BACKED
        πŸ’œ Candidate hash: 0xd4369e2e5a4ad4c541c23790d6849497d99b12f85f89a956b5d3d5bd00131280 
        πŸ”— Relay block hash: 0xe1b285daefe9c9e84bb91a2211fd69771eff7742bc3c8a875597078eb0abc66f 
        πŸ₯ Availability core OCCUPIED

2022-12-14T07:28:36.001000000Z +1ms [#63168]
        CANDIDATE BACKED
        πŸ’œ Candidate hash: 0xd4369e2e5a4ad4c541c23790d6849497d99b12f85f89a956b5d3d5bd00131280 
        πŸ”— Relay block hash: 0x5b7c92b2ba448f305150564cbbc6894bcce3015614140c18e23b6d8aafe469ff 
        πŸ₯ Availability core OCCUPIED
2022-12-14T07:29:42.000000000Z +6000ms [#63179]
        CANDIDATE INCLUDED
        πŸ’œ Candidate hash: 0xceb89b2b7dcb71f6b8f5d5e800f399e7f81f9ec99a8b94b4ebd5f29027485508 
        🟒 Availability bits: 259/260
        πŸ”— Relay block hash: 0xb64f33265bcfb17054207e511a22c2c9a07eaa971ebee8786995413b015add48 
        πŸ₯ Availability core FREE

2022-12-14T07:29:42.001000000Z +1ms [#63179]
        SLOW BACKING, no candidate backed
        πŸ”— Relay block hash: 0x65a3c5088a051111213916d4d04448c77dad5af4f1675fe9f66bd58e170536de 
        πŸ₯ Availability core OCCUPIED

In fact, I have changed that in the recent Subxt migration/refactoring: it is now subscribe_all.

I was trying to introduce a CLI parameter to specify which stream to look at and that didn't work out without massive code duplication. Maybe this became easier to do because of your change.

This is done now I think.