Although the internal.stateBuilder.finished event has an internal prefix, it is a useful event for some plugins to listen if they depend on state generation being completed (e.g. to get the correct list of active delegates), i.e. they need to run after StateStarting is emitted (since state generation may not be completed at that time) but without waiting for the emission of StateStarted.
For example, internal.stateBuilder.finished is emitted before blocks are downloaded from the network, whereas StateStarted is not emitted until after they have all been downloaded. The time difference can be considerable, even hours if the node is syncing from zero. A plugin may wish to monitor or record the blocks that were received during this time.
Of course it's possible for plugins to listen to the internal.stateBuilder.finished event but it feels like bad practice to do that since it has an internal prefix. I would therefore like internal.stateBuilder.finished to be allocated a formal enum value in ApplicationEvents such as ApplicationEvents.StateBuilderFinished instead.
Although the
internal.stateBuilder.finishedevent has aninternalprefix, it is a useful event for some plugins to listen if they depend on state generation being completed (e.g. to get the correct list of active delegates), i.e. they need to run afterStateStartingis emitted (since state generation may not be completed at that time) but without waiting for the emission ofStateStarted.For example,
internal.stateBuilder.finishedis emitted before blocks are downloaded from the network, whereasStateStartedis not emitted until after they have all been downloaded. The time difference can be considerable, even hours if the node is syncing from zero. A plugin may wish to monitor or record the blocks that were received during this time.Of course it's possible for plugins to listen to the
internal.stateBuilder.finishedevent but it feels like bad practice to do that since it has aninternalprefix. I would therefore likeinternal.stateBuilder.finishedto be allocated a formal enum value inApplicationEventssuch asApplicationEvents.StateBuilderFinishedinstead.