Skip to content
Unverified Commit 7c875bea authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

[bridges] Prune messages from confirmation tx body, not from the on_idle (#4944)



Original PR with more context:
https://github.com/paritytech/parity-bridges-common/pull/2211
Relates to:
https://github.com/paritytech/parity-bridges-common/issues/2210

## TODO

- [x] fresh weighs for `pallet_bridge_messages`
- [x] add `try_state` for `pallet_bridge_messages` which checks for
unpruned messages - relates to the
[comment](https://github.com/paritytech/parity-bridges-common/pull/2211#issuecomment-1643224831)
- [x] ~prepare migration, that prunes leftovers, which would be pruned
eventually from `on_idle` the
[comment](https://github.com/paritytech/parity-bridges-common/pull/2211#issuecomment-1643224831)~
can be done also by `set_storage` / `kill_storage` or with
`OnRuntimeUpgrade` implementatino when `do_try_state_for_outbound_lanes`
detects problem.

## Open question

- [ ] Do we really need `oldest_unpruned_nonce` afterwards?
- after the runtime upgrade and when `do_try_state_for_outbound_lanes`
pass, we won't need any migrations here
    - we won't even need `do_try_state_for_outbound_lanes`

---------

Signed-off-by: default avatarBranislav Kontur <[email protected]>
Co-authored-by: default avatarSvyatoslav Nikolsky <[email protected]>
Co-authored-by: command-bot <>
parent 308ec4a8
Pipeline #484548 waiting for manual action with stages
in 48 minutes and 11 seconds