substrate
substrate copied to clipboard
feat: Add try_state for message_queue
Fix #13115
Description
Add try_state hook implementation for pallet message-queue.
Assumptions:
If serviceHead points to a ready Queue (i.e. has some value), then BookState of that Queue has:
- message_count > 0
- size > 0
- end > begin
- Some(ready_neighbours)
- If ready_neighbours.next == self.origin, then ready_neighbours.prev == self.origin (only queue in ring)
For a particular BookState of Queue present in ReadyRing, all pages from begin to end-1 should have:
- remaining > 0
- remaining_size > 0
- first <= last
- Every page can be decoded into peek_* functions
Test Status
5 tests are failing, if assumptions are correct then these tests are not a part of valid state.
failures: tests::bump_service_head_bails tests::bump_service_head_trivial_works tests::bump_service_head_works tests::execute_overweight_works tests::reap_page_permanent_overweight_works
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
/tip small
@juangirini A small tip was successfully submitted for gitofdeepanshu (12y2pdexQRzCvR7rj6HhMYkLbL3atjikGptSit78eeGWn6ma on polkadot).
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips 
Hey @gitofdeepanshu thanks for your contribution! Would you apply those changes requested by @ggwpez so we can give a final review before merging it?
Hey @gitofdeepanshu would you be able to take this over again?
I will do it this week, apologies for delay!
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
@gitofdeepanshu I am very sorry this took ages to get merged and had a few rebase conflicts now resolved but still it is falling due to the fact that the try_state signature has changed. Would you be able to give it another look and fix that?
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
bot rebase
Error: Command 'Command { std: cd "/storage/repositories/substrate" && "git" "push" "--porcelain" "gitofdeepanshu" "feat/try-state_message-queue", kill_on_drop: false }' failed with status Some(1); output: error: failed to push some refs to 'https://github.com/gitofdeepanshu/substrate.git'
bot merge