
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@maci-protocol/relayer
Advanced tools
This repository contains the setup and instructions to run the MACI Relayer service along with MongoDB using Docker.
For more details on how to use and integrate the offchain relayer service into your application, please refer to this guide.
Below is a high-level diagram illustrating the flow of the Relayer Service:
The Relayer serves as an intermediary between users and the MACI system. It performs the following tasks:
This process ensures that user actions are recorded on-chain without compromising their privacy.
By verifying the zero-knowledge proofs, the Relayer ensures that only authorized users can send messages. Users must know the pre-image to a state leaf in the poll state tree.
It's recommended that the coordinator only runs this service for now. That is because if the service malfunctions and batch hashes are pushed on chain without the messages actually being stored on ipfs, then polls can't be finalized.
The Relayer interacts with other components of the MACI system, such as the Coordinator and the on-chain smart contracts:
Make sure you have the following tools installed on your system:
Follow these steps to run the MACI Relayer service using Docker.
First, clone the repository to your local machine.
git clone https://github.com/privacy-scaling-explorations/maci
cd maci
The .env
file contains sensitive configuration values that will be injected into the Docker containers at runtime. To set them up:
.env.example
file to .env
.cp .env.example .env
.env
file and configure the variables.Now that your environment is set up, it's time to build and run the Docker containers.
Run the following command from the root directory of your project:
docker-compose up --build
This command does the following:
docker-compose.yml
files.The MACI Relayer service will be available on port 3000 by default (you can modify this in the .env
file).
Once the containers are up and running, you can access the relayer service at:
http://localhost:3000
Additionally, the Swagger UI documentation for the Relayer service API can be accessed at:
http://localhost:3000/api
You can interact with the API through the Swagger interface, which provides a convenient way to test endpoints and view the API methods.
To view the logs from the containers and troubleshoot any issues, run:
docker-compose logs
This will display logs from both the service (relayer) and mongodb containers.
To stop the containers and remove the containers (but keep the volumes), use the following command:
docker-compose down
This will stop and remove the containers but retain the volumes (like MongoDB data). To also remove the volumes, run:
docker-compose down --volumes
MongoDB data is persisted using Docker volumes (mongodb-data
). Even if you remove and recreate the MongoDB container, the data will persist.
This ensures that any data stored in the MongoDB database is not lost even if the container is restarted or removed.
If you'd like to remove the persisted data as well, you can remove the volume by running:
docker volume rm your-repo_mongodb-data
This will delete the volume, along with all the data stored in MongoDB.
For more details, you can read the following post on EthResearch:
FAQs
Relayer service for MACI
The npm package @maci-protocol/relayer receives a total of 747 weekly downloads. As such, @maci-protocol/relayer popularity was classified as not popular.
We found that @maci-protocol/relayer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.