The Multiplex
go mod verify
go mod tidy
go mod download
- Requires go 1.16.5 or later
- Must setup chia-blockchain before using Multiplex
Follow these steps for manual usage:
- Deploy workers first
- Run Redis Database Instance
- Run Dispatcher
- Run Mover
- Give Jobs to Workers
- View Queued Jobs
Or run automated script that follows step 1-4:
WORKERS=[number of workers] make run-multiplex
Use this command to deploy workers.
WORKERS=[number of workers to deploy] make deploy-workers
WORKERS=8 make deploy-workers
docker pull redis
docker run --name redis-test-instance -p 6379:6379 -d redis
Use this command to run the dispatcher.
go run ./job/dispatcher/main.go -workers=[number of available workers]
go run ./job/dispatcher/main.go -workers=8 &
Use this command to run the dispatcher.
go run ./mover/move-worker/main.go &
After configuring
- worker.yml for executable and logging directory
- pos.yml for proof of space task, run using this command
go run main.go add-job --task=[task name] --log-name=[log-output-name]
For Proof of Space exec
go run main.go add-job --task=pos --log-name=test-ssd1 --db-addr=192.168.3.1:6379 --local-drive=ssd1
For Proof of Space multi-threaded exec
go run main.go add-job --task=posv2 --log-name=test-ssd1 --db-addr=192.168.3.1:6379 --local-drive=ssd1
go run main.go view-queued-jobs
go run main.go view-active-jobs
Follow these steps for dockerized usage:
- Run make push-docker
- Run docker-compose up
- Configure pos.yml and worker.yml
- Add job to worker