substrate icon indicating copy to clipboard operation
substrate copied to clipboard

feat: Add try_state for message_queue

Open gitofdeepanshu opened this issue 2 years ago • 1 comments

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

gitofdeepanshu avatar Mar 01 '23 12:03 gitofdeepanshu

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.

stale[bot] avatar Apr 15 '23 18:04 stale[bot]

/tip small

juangirini avatar May 22 '23 09:05 juangirini

@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 tip

substrate-tip-bot[bot] avatar May 22 '23 09:05 substrate-tip-bot[bot]

Hey @gitofdeepanshu thanks for your contribution! Would you apply those changes requested by @ggwpez so we can give a final review before merging it?

juangirini avatar May 22 '23 09:05 juangirini

Hey @gitofdeepanshu would you be able to take this over again?

juangirini avatar Jun 09 '23 14:06 juangirini

I will do it this week, apologies for delay!

gitofdeepanshu avatar Jun 12 '23 03:06 gitofdeepanshu

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.

stale[bot] avatar Jul 12 '23 11:07 stale[bot]

@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?

juangirini avatar Jul 12 '23 13:07 juangirini

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.

stale[bot] avatar Aug 11 '23 13:08 stale[bot]

bot rebase

ggwpez avatar Aug 14 '23 15:08 ggwpez

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

ggwpez avatar Aug 14 '23 17:08 ggwpez