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
This ticket is about defining the interfaces of all the functions in the Facilitator.
The proposed functions are provided for reference.
The implementer can think this in detail and can add/remove functions.
constructor
Accepts mosaic-config and facilitator-config as params.
Creates Config object. (store in variable)
Creates DB object. (store in variable)
Call function to start event scanner child-process. (store in variable)
Call function to resume facilitation.
function to validate gateways.
Once an event is received, check if the gateway contract address is suported by the facilitator.
Get the gateway contract address from the config to validate it.
function to start the event scanner child-process.
Start a new child-process for Scanner.ts (store in a variable)
Implement the call backs
function to resume facilitation.
Get any pending or failed facilitation from DB.
loop through the items and call function to start the worker child-process (Store in a variable).
function to start the worker child-process.
This will get an identifier as a param. This identifier is the primary id in DB.
Start a new child-process for Worker.ts (store in a variable)
Implement the callbacks
Get worker addresses for both chains
If worker addresses are available then update the entity in the DB with the process id and worker addresses, send the params to child-process to start facilitation, else log error.
function to select worker address for chains.
Get the last worker address used for the chain from the DB.
Get all the workers from the Config.
Select the next worker in round-robin
Validate if the worker addresses have Eth/Base token to perform transactions.
If validated then return the worker address else select other worker address.
If no worker available throw exception. (or return undefined)
function to determine if gasPrice / gasLimit is sufficient to perform facilitations.
function to handle SIGTERM
The text was updated successfully, but these errors were encountered:
Facilitator.ts is the main file that is responsible for the facilitation
This ticket is about defining the interfaces of all the functions in the Facilitator.
The proposed functions are provided for reference.
The implementer can think this in detail and can add/remove functions.
constructor
mosaic-config
andfacilitator-config
as params.function to validate gateways.
function to start the event scanner child-process.
function to resume facilitation.
function to start the worker child-process.
function to select worker address for chains.
function to determine if gasPrice / gasLimit is sufficient to perform facilitations.
function to handle SIGTERM
The text was updated successfully, but these errors were encountered: