Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

The Topos Executor Service executes cross-subnet messages on receiving subnets

Notifications You must be signed in to change notification settings

topos-protocol/executor-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e6fed9d · Feb 9, 2024
Nov 7, 2023
Feb 9, 2024
Jan 8, 2024
Nov 7, 2023
Oct 5, 2022
Nov 27, 2020
Oct 31, 2022
Jun 28, 2023
Nov 7, 2023
Aug 2, 2022
Jan 8, 2024
Jan 8, 2024
Apr 8, 2019
Jan 8, 2024

Repository files navigation


Logo Logo

Executor Service

The Topos Executor Service executes cross-subnet messages on receiving subnets.

example workflow example workflow

Prerequisites

Redis

The Executor Service implements a queue pattern that leverages redis. To start the Executor Service, you will need to run a redis server in the background:

docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest

Environment

The Executor Service requires a local environment to be set up.

Create an .env at the root of the project, with the content of .env.example, and fill the revelant env var values.

Authentication (Auth0)

The Executor Service leverages Auth0 for machine-to-machine authentication and authorization. We use Auth0's machine-to-machine service as we are not authenticating/authorizing users but applications (e.g., dApp frontends) that will use the Executor Service as a call delegation for their users' cross-subnet messages.

users => dApp frontend ==call==> sending subnet
                       \=call==> executor service ==call==> receiving subnet

Any application calling the Executor Service must be registered on Auth0 as a new Application. Once authorized to use the Executor Service API, the relevant Auth0 client id and secret can be set within the execution environment of the calling application.

Regarding the Executor Service's execution environment (see environment), AUTH0_AUDIENCE and AUTH0_ISSUER_URL should be set with values provided in our documentation.

Getting Started

Install NodeJS by following the guidelines from the official NodeJS website.

Install Dependencies

To installation npm dependencies, run the following command:

npm i

Run the Executor Service

To start an instance of the Executor Service, run the following command:

npm start

License

This project is released under the terms of the MIT license.