grandpa: cleanup stale entries in set id session mapping
In the GRANDPA pallet we keep a mapping of set id -> session index, this is necessary to validate equivocation proofs. The entries in this map were never being pruned. This PR bounds the maximum number of entries in this mapping which will usually be set to the bonding duration (in sessions).
polkadot companion: https://github.com/paritytech/polkadot/pull/6626
Regarding the migration here are the current set ids of all networks: Kusama: 6297 Polkadot: 1282 Westend: 6074 Rococo: 6485
So the migration should run fine.
bot merge
Error: Github API says https://github.com/paritytech/polkadot/pull/6626 is not mergeable
bot merge