How to start working on Mysterium node
How to spin up a node on Docker
This section will explain how to run, build and test node during development. If you are yet to set up your environment please follow the environment setup guide first.
After creating a fork execute:
Mage makes it easy to build the project, to do that you execute the mage build command in project's root directory:
After doing so you should see similar output to this:
If you don't have mage installed you can use the go build command to generate a binary:
A node can be started as a daemon by executing:
Or without (using a built binary) mage:
This will start node in a daemon mode where no service is running, meaning that it will basically only operate in consumer mode. To start providing service you'd need to start a node with a running service (default is wireguard):
TequilAPI REST API and CLI app
Interacting with node can be done using its TequilaAPI endpoints. This API allows us to control both consumer and provider sides of our node.
The default port is: 4050
Node comes with built-in CLI commands which call the API endpoints making it easy to interact, test and control your node from the command-line.
Or without mage:
For greater control you can skip the CLI step and interact with TequilaAPI yourself using curl, postman or any other HTTP based tool you like. For example to check if a node is running you can send a healthcheck request:
To explore everything TequilAPI can do, we host its Swagger docs on: https://tequilapi.mysterium.network/
Feel free to check the Swagger docs of your own node which are available on the same port as the TequilAPI: http://localhost:4050/docs.
If you've added new features or changed old ones, make sure to cover them with tests as much as possible.
- Unit tests are all the *_test.go files outside the e2e directory. They can be executed by running:
- Long-running or "e2e" tests can be found in the e2e directory. They can be executed by running:
- To check if you haven't missed copyright notices or haven't made any linting mistakes run:
If you've made changes to the api make sure to generate new documentation and files:
Our developers are always happy to receive feedback and code contributions. We look forward to hearing from you!