-
Notifications
You must be signed in to change notification settings - Fork 206
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
Transaction scheduler with between-block execution #1477
Comments
Why not limit the number that gets executed from the run queue? and then carry it forward? |
That's an excellent idea. Do you have any suggestion as to how many? |
I think I could use a picture/reminder of the lifecycle of a Cosmos-SDK block, I've got about half an understanding of this approach. If we only run the kernel between Cosmos blocks, does that mean swingset devices cannot query the Cosmos state vector? E.g. they can't fetch balances from Bank keepers? I remember thinking we had a need for synchronous read access to state outside the swingset kernel DB. |
Here is the DFA, which could be unpacked into a state diagram:
Yes, that is a thorny issue. Let's talk about it tomorrow. Personally, I am okay with either of the "only run between blocks" or the "throw failed votes away" scenarios. If we're lucky, there might be some way to get advantages of both. |
What is the Problem Being Solved?
We want to make it possible to offload evaluation to a deterministic scheduling algorithm between blocks, instead of paying the price of evaluation during block voting. We also want not to have to roll back the vat's heap state when there is a failed voting round.
Description of the Design
Initially, there will be two scheduler queues (the "submit queue", and the "SDK Todo" queue) in the kernel DB. The submit queue will be fully processed before voting on the next block begins (no multi-block carryovers or escalator algorithm).
The validator commitment will be only to the submission of transactions, but the results of those transactions will be delayed at least one block by the scheduler.
The parser-like expression for the transaction state machine is:
Here is pseudocode for the design:
Security Considerations
The simplest runScheduler algorithm (process the entire submit queue on every block) is not resistant to denial-of-service.
Test Plan
Ensure all existing chain functionality works as before. There is expected to be an additional single-block delay for every message round trip (as they can only be answered in the next block).
The text was updated successfully, but these errors were encountered: