-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Enable changing executor params through governance #6934
Enable changing executor params through governance #6934
Conversation
Currently, I'm not sure I'm doing the right thing. Feel free to guide me on the right path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why the executor params can't just go into the host configuration via the Configuration
pallet?
I believe there are no technical obstacles, but I have two concerns about that:
Beyond that, I have no other arguments against moving them to the |
I'd say moving it to configuration makes sense within this PR. |
To me it feels like Another concern is tying breaking changes and migration between the two (although I don't expect many breaking changes to Don't have any other objection. |
))] | ||
pub fn set_executor_params(origin: OriginFor<T>, new: ExecutorParams) -> DispatchResult { | ||
ensure_root(origin)?; | ||
<PendingExecutorParams<T>>::put(Some(new)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And probably emit an event, so wallets and indexers can be notified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do they need to know about execution parameters change? That's a validators' business iiuc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know of the implications of this - events are good when the outside world us supposed to be notified.
Your call.
I think the main problem here being that we always need to decode the entire |
@bkchr, one more concern is that we're accessing executor params on the session base, not on the state base, and we're maintaining a sliding window of different executor params for the sessions inside the dispute period. The |
Isn't the session info not just caching certain parameters per session and also currently caches things that are already part of the host configuration? |
@s0me0ne-unkn0wn configuration change is always buffered to be applied in a couple of sessions, if this is somethings you're worried about |
In principle, yes. But
It currently only does for the parameters encapsulated into the |
Moved pending changes to the |
+1. To me it definitely makes sense to have executor params reflected in the |
I'm a little bit stuck with the If I add something to And here I'm not sure, if that migration to |
If the v5 migration has been released already, we have to do a v6. Not sure how well this works with runtime releases being skipped, but it is the only sensible way. |
I've checked that the latest release branch ( |
|
That's how you are sure. If it is not yet on the latest release branch, It cannot be released. I mean in theory things could be backported, would still be very weird (and a bug) to not have that backport in the next release as well. |
I think the idea was to keep previous migrations for a few releases at least. Since each migration does version check ( |
I'm much more concerned about if it is safe to add my changes to the existing migration :) If it's not been released, then it's safe, right? |
…ains::configuration
…ains::configuration
…hains::configuration
|
bot merge |
Closes #6805
Add a pallet call to
session_info
which sets new executor parameters. The new parameter set is stored as a separate storage value and becomes effective starting from the next session.