Skip to content

RPC Module

Richard T. Carback III requested to merge feature/rpc into release

Implements an RPC module. This is based on the spec at elixxir/docs/rpc.md ( docs!8 ), which will be updated to match the implementation.

By request, we are using a UI-friendly javascript inspired promise interface. The success action is called 3 times:

  1. To indicate an xx gateway accepted the message.
  2. To indicate the round completed according to the network follower.
  3. To return the response from the rpc server.

Limitations:

  • At this time, the RPC request must fit inside a single xx payload. This is inherited from the nyquist library which will fail on the handshake when encrypting the second message. We will need to propose an MR upstream to fix this OR work around it by adding a delay to wait for the handshake to complete.
  • The Response cannot be longer than 5 or so xx network packets, as it uses SendMany to ensure all response packets are in the same round for returning the message. FileTransfer also struggles here, and I think for both we need to rework how the sending logic works entirely. It does a lot of unnecesary state management when it could just order the rounds by completion time and send until they get success from the gateway.
  • Actual return trip time is 5-10 seconds, although one would expect 3-6 based on current dashboard metrics. The extra delay is due to delay it takes to pick up a message from many of the gateways. We will need to implement the planned improvements to message pickup to fix this problem.

Merge request reports