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
There are two main StateTransition functions: preBlock (empty slot) and perBlock. However, their construction somewhat clumsy and non-uniform accross code base.
E.g.
initialTransition = new InitialStateTransition(chainStartEvent, spec);
perSlotTransition = new PerSlotTransition(spec);
perBlockTransition = new PerBlockTransition(spec);
perEpochTransition = new PerEpochTransition(spec);
extendedSlotTransition =
new ExtendedSlotTransition(perEpochTransition, perSlotTransition, spec);
emptySlotTransition = new EmptySlotTransition(extendedSlotTransition);
In order to improve readability and reduce code duplication, refactor StateTransition construction.
There can be (at least) two steps:
1 there exists already StateTransitions class with appropriate helper functions (preBlockTransition and blockTransition). The only problem is that some benchmarking code overloads some methods to gather statistics.
2 Incapsulate state transition logic in a Stepper class, having two methods: processSlots and processBlock (or something like this).
The text was updated successfully, but these errors were encountered:
There are two main StateTransition functions: preBlock (empty slot) and perBlock. However, their construction somewhat clumsy and non-uniform accross code base.
E.g.
In order to improve readability and reduce code duplication, refactor
StateTransition
construction.There can be (at least) two steps:
1 there exists already
StateTransitions
class with appropriate helper functions (preBlockTransition
andblockTransition
). The only problem is that some benchmarking code overloads some methods to gather statistics.2 Incapsulate state transition logic in a Stepper class, having two methods: processSlots and processBlock (or something like this).
The text was updated successfully, but these errors were encountered: