Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority processing of cosmic-swingset actions #5966

Closed
mhofman opened this issue Aug 15, 2022 · 2 comments · Fixed by #7483
Closed

Priority processing of cosmic-swingset actions #5966

mhofman opened this issue Aug 15, 2022 · 2 comments · Fixed by #7483
Assignees
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request vaults_triage DO NOT USE
Milestone

Comments

@mhofman
Copy link
Member

mhofman commented Aug 15, 2022

What is the Problem Being Solved?

We need to enable the priority processing of economic messages (#5334), in the absence of internal SwingSet priority queues (#4318), while avoiding contention with low priority messages that may already be queued and/or still be accepted by the network.

Description of the Design

We already process inbound actions one at a time, and run the kernel to completion before processing the next action (with the exception of timer polls).

#6576 will introduce a new priority inbound queue that is separate from the existing actionQueue.

Cosmic-swingset must then process items from the priority queue before any items present in the action queue.
Any work pending from the previous block would still be finished first (it does not preempt ongoing work, especially because that work may already be a high priority action).

It's currently undecided whether timer messages should take priority over priority messages (see #6964)

Security Considerations

None

Test Plan

TBD

@warner
Copy link
Member

warner commented Jan 24, 2023

cc @gibson042

@mhofman
Copy link
Member Author

mhofman commented Mar 23, 2023

Updated to reflect that we have a backpressure mechanism, that inbound/action queue entries are processed one at a time, and that the these are now staying in a vstorage backed queue.

mhofman added a commit that referenced this issue Apr 23, 2023
Drain the priorityQueue before the actionQueue (#5966)
and before polling timers (#6964)
mhofman added a commit that referenced this issue Apr 24, 2023
Drain the `highPriorityQueue` before the `actionQueue`
(#5966) and before polling
timers (#6964).
mhofman added a commit that referenced this issue Apr 27, 2023
Drain the `highPriorityQueue` before the `actionQueue`
(#5966) and before polling
timers (#6964).
mhofman added a commit that referenced this issue Apr 27, 2023
Drain the `highPriorityQueue` before the `actionQueue`
(#5966) and before polling
timers (#6964).
@mergify mergify bot closed this as completed in #7483 Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request vaults_triage DO NOT USE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants