CoopHive
  • CoopHive
    • Introduction
    • Architecture
    • Whitepaper
  • User Guide
    • Install CoopHive
    • Clients
      • Quick Start
    • Compute Nodes
      • Quick Start
    • Solver
      • Quick Start
  • Creating Jobs
    • Job Modules
  • Research
    • Game-Theoretic Verifiable Computing
      • Writings
        • Verifiable Computing
        • Problem Statement
        • Prior Protocols
        • Autonomous Agents
        • Mechanisms To Explore
      • Talks
        • FIL Dev Summit, Reykjavík, September 2023
        • CoD Summit, Boston, May 2023
    • Autonomous Agents
      • Valory Crypto x AI Mini Conference, July 2023
Powered by GitBook
On this page
  • What is a CoopHive Module?
  • How Are Modules Structured?
  • Handling Inputs
  • Tips for Deterministic Outputs

Was this helpful?

Edit on GitHub
  1. Creating Jobs

Job Modules

PreviousQuick StartNextGame-Theoretic Verifiable Computing

Last updated 1 year ago

Was this helpful?

What is a CoopHive Module?

A CoopHive module is a git repository structured using predefined templates and inputs to run computational jobs on the network.

How Are Modules Structured?

  1. Create a git repository for your CoopHive module. The module's versions will be identified using their git tags.

  2. In the module's repository, create a file named module.coophive. This file will serve as a JSON template with Go text/template style sections, like {{.Message}}, which will be replaced by CoopHive with JSON-encoded inputs.

  3. Alternatively, use Go templates to set defaults and perform other template-related operations. Some examples can be found .

Handling Inputs

Inputs are passed to your CoopHive module as a key/value pairs. For example:

hive run github.com/username/repo:tag -i Message=moo

Tips for Deterministic Outputs

Try to follow the following recommendations to increase the chances that your CoopHive module will be deterministic:

  • Make the output of your module reproducible

  • Strip timestamps and time measurements from the output, including to stdout and stderr

  • Avoid reading from sources of entropy, such as /dev/random

  • When referencing Docker images, specify their sha256 hashes

here