You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue if for collecting various suggestions, TODOs and tech debt related to the KVStore
High Prio
I find it super confusing / misleading that Snapshot.EpochProtocolState().Entry() is defined through the InitialProtocolState interface. The InitialProtocolState is very clear in its documentation that it (quote) "returns constant data for given epoch." Therefore, the only possible conclusion is also that Entry returns the DynamicProtocolState as specified initially by the Epoch Setup and Commit events. However, the implementations always return the DynamicProtocolState as of the specified block. (for further details and discussion, see this comment)
Suggestions: (discussion April 15th, Yurii, Jordan, Alex)
whenever we are referring to Epoch-sub-state, we should explicitly refer to it using "Epoch..."
Currently there is nothing guaranteeing that two models with a different version (but otherwise identical contents) will have a different ID. See discussion
Suggestion: Let modelVersion and modelEncoded be the output of model.VersionedEncode(). Then change ID calculation to use hash(modelVersion || modelEncoded) instead of the default MakeID. Addressed by Include version in kvstore model encoding explicitly #5854
Medium Prio
InvalidEpochTransitionAttempted (this is currently a dummy flag to demonstrate is currently duplicated (field in the EpochStateContainer (where is was originally) and in the data model for the KV-Store). See Jordan's PR comment for details.
We still directly operate on service events to emit epoch-related metrics events in the FollowerState (code). We should instead emit metrics events using the Protocol State field, and only manipulate service events with the StateMutator and protocol state machines (lower level logic).
historically grown, the Epoch portion of the Protocol state is exposed in three different places in our APIs (see PR comment). We would like to consolidate this.
Suggestion:
keep original Snapshot.Epoch API, but back it by the KV-store (this prevents needing to update/refactor all existing usages)
no (remove) top-level "getter" Snapshot.EpochProtocolState
top-level access to Epoch-data is still given through KV-Store's canonical representation (interface according to the newest protocol version 👉 KVStoreReader)
franklywatson
changed the title
[Dynamic Protocol State] ToDos, suggested revisions and tech debt
[Dynamic Protocol State] [M2] ToDos, suggested revisions and tech debt
Apr 26, 2024
franklywatson
changed the title
[Dynamic Protocol State] [M2] ToDos, suggested revisions and tech debt
[Dynamic Protocol State | M2] ToDos, suggested revisions and tech debt
Apr 26, 2024
franklywatson
changed the title
[Dynamic Protocol State | M2] ToDos, suggested revisions and tech debt
[EPIC] [Dynamic Protocol State | M2] ToDos, suggested revisions and tech debt
Apr 26, 2024
franklywatson
changed the title
[EPIC] [Dynamic Protocol State | M2 & M3] ToDos, suggested revisions and tech debt
[EPIC] [Dynamic Protocol State | M2] ToDos, suggested revisions and tech debt
May 23, 2024
This issue if for collecting various suggestions, TODOs and tech debt related to the KVStore
High Prio
I find it super confusing / misleading that
Snapshot.EpochProtocolState()
.
Entry()
is defined through theInitialProtocolState
interface. TheInitialProtocolState
is very clear in its documentation that it (quote) "returns constant data for given epoch." Therefore, the only possible conclusion is also thatEntry
returns theDynamicProtocolState
as specified initially by the Epoch Setup and Commit events. However, the implementations always return theDynamicProtocolState
as of the specified block. (for further details and discussion, see this comment)Suggestions: (discussion April 15th, Yurii, Jordan, Alex)
InitialProtocolState
interface intoDynamicProtocolState
EpochProtocolState
Currently there is nothing guaranteeing that two models with a different version (but otherwise identical contents) will have a different ID. See discussion
Suggestion: Let
modelVersion
andmodelEncoded
be the output ofmodel.VersionedEncode()
. Then changeID
calculation to usehash(modelVersion || modelEncoded)
instead of the defaultMakeID
. Addressed by Include version in kvstore model encoding explicitly #5854Medium Prio
InvalidEpochTransitionAttempted
(this is currently a dummy flag to demonstrate is currently duplicated (field in theEpochStateContainer
(where is was originally) and in the data model for the KV-Store). See Jordan's PR comment for details.Remove additional redundant fields from
EncodableSnapshot
(in particularLatestSeal
,Result
,Head
). See [KVStore] Reducing duplicated data in theSnapshot
data structure (removeEncodableEpoch
) #5682 (comment)We still directly operate on service events to emit epoch-related metrics events in the
FollowerState
(code). We should instead emit metrics events using the Protocol State field, and only manipulate service events with theStateMutator
and protocol state machines (lower level logic).[Protocol KVStore] Move
EpochProtocolState
data into KVStore #5974Suggestion:
Snapshot.Epoch
API, but back it by the KV-store (this prevents needing to update/refactor all existing usages)Snapshot.EpochProtocolState
KVStoreReader
)[Protocol KV Store] Update bootstrapping to support transferring KVStore from old network to new #5973
Low Prio
withNextEpoch
). See [KVStore] Reducing duplicated data in theSnapshot
data structure (removeEncodableEpoch
) #5682 (comment) for discussion.The text was updated successfully, but these errors were encountered: