UpcomingLeader sysvar #558
cavemanloverboy
started this conversation in
SIMD Discussions
Replies: 3 comments 9 replies
-
|
probably want to use vote account for this, tbh. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
It's better to just grab the slot of the current Clock and use that with the existing sol_get_sysvar syscall on the leader schedule account imo. Far more flexible, no per-slot update and no need to verify the sysvar address in the VM. |
Beta Was this translation helpful? Give feedback.
6 replies
-
|
I feel it would be a good idea trying to merge these two discussions: #511 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
I was just about done writing a leader schedule program as a public good, and then realized it's an incredibly stupid idea to pass around one or two >1MB accounts just to find out who the next leader is. This information is needed for market makers to be able to update quotes based on swaps coming in on specific leaders (e.g. leader is malicious, very remote, or has historically unreliable scheduling characteristics).
Proposal
The runtime maintains and exposes a sysvar
that contains everything a program needs to be able to adjust quotes based on current and next leader. next leader here mostly to future proof, in case someone finds a use for it, but not as useful as current leader. current slot is here so that program is not required to also load in clock sysvar. This could be expanded and treated as a ClockV2 sysvar if we want
Beta Was this translation helpful? Give feedback.
All reactions