This set of changes tries to make the connection a GSP has to Xaya Core (or Xaya X) more robust. If an exception is thrown while processing a block (for instance) - e.g. because Xaya Core's JSON-RPC interface has issues -, then the state is temporarily changed to disconnected. The same happens if no ZMQ updates for blocks are received for a long time. Later on, the GSP attempts to reconnect to Xaya Core and re-establish the ZMQ connection, so it can carry on when Xaya Core works again.
The new functionality comes with two command-line flags to toggle and configure it:
--xaya_zmq_staleness_ms specifies the time (in milliseconds) between ZMQ block updates until the connection is considered stale. The GSP tries to "force" a notification with game_sendupdates before that happens, so even if that is set to lower than the block frequency or a block takes some time, it should "work".
--xaya_connection_check_ms can be set to some non-zero value, which enables a periodic background check probing the staleness and trying to reconnect. By default this is off, but it can be set to some desired interval to turn on the new feature completely.
This set of changes tries to make the connection a GSP has to Xaya Core (or Xaya X) more robust. If an exception is thrown while processing a block (for instance) - e.g. because Xaya Core's JSON-RPC interface has issues -, then the state is temporarily changed to
disconnected
. The same happens if no ZMQ updates for blocks are received for a long time. Later on, the GSP attempts to reconnect to Xaya Core and re-establish the ZMQ connection, so it can carry on when Xaya Core works again.The new functionality comes with two command-line flags to toggle and configure it:
--xaya_zmq_staleness_ms
specifies the time (in milliseconds) between ZMQ block updates until the connection is considered stale. The GSP tries to "force" a notification withgame_sendupdates
before that happens, so even if that is set to lower than the block frequency or a block takes some time, it should "work".--xaya_connection_check_ms
can be set to some non-zero value, which enables a periodic background check probing the staleness and trying to reconnect. By default this is off, but it can be set to some desired interval to turn on the new feature completely.