NodeBridge.NodeStatus() can only be used properly in the run stage of plugin initialization, since it requires the INX core plugin to be running. Previously, NodeStatus was also used in the provide stage of plugin initialization which led to unexpected behavior.
This is fixed in the current PR, by no longer providing the Tendermint node. Instead the entire creation and configuration happens in a background worker. This worker performs the following steps:
load the Tendermint config
initialize the coordinator state: As the coordinator does not keep a persisted state the Tangle of the connected Hornet node is used instead. For this to be correct, we wait until the node appears to be snyced, i.e.
it is connected to at least one other peer,
lmi is positive, and
lmi equals cmi
create the Tendermint node: This triggers replay of Tendermint blocks to sync the coordinator (application) state with the local Tendermint state.
start the Tendermint node: This triggers replay of Tendermint blocks from other peers
running the coordinator loog: issue milestones in the given interval
NodeBridge.NodeStatus()
can only be used properly in the run stage of plugin initialization, since it requires the INX core plugin to be running. Previously,NodeStatus
was also used in the provide stage of plugin initialization which led to unexpected behavior.This is fixed in the current PR, by no longer providing the Tendermint node. Instead the entire creation and configuration happens in a background worker. This worker performs the following steps: