Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Example runtime environment configuration for Scriptory.
# Copy this file to .env and adjust as needed.
#
# Scriptory runs a complete Hierophant + Magister + Contemplant prover network
# along with a fibonacci example to demonstrate proof generation.

# ============================================================================
# REQUIRED CONFIGURATION
# ============================================================================

# Your public IP address or hostname for Hierophant artifact uploads/downloads.
# Used by clients and Contemplants to upload program inputs and download proofs.
# Examples: "192.168.1.100", "my-server.example.com", "203.0.113.42"
# For local testing with remote Contemplants, use your WAN IP.
THIS_HIEROPHANT_IP=your-public-ip-here

# Hierophant IP address for Contemplants to connect via WebSocket.
# Magister passes this to Contemplants when creating instances on Vast.ai.
# Should match THIS_HIEROPHANT_IP for most deployments.
HIEROPHANT_IP=your-public-ip-here

# Magister address for Hierophant to send drop requests.
# Format: http://[host] (port is specified separately in magister.toml)
# For local testing with remote Contemplants, use your WAN IP.
THIS_MAGISTER_ADDR=http://your-public-ip-here

# Vast.ai API key for managing Contemplant instances.
# Obtain from https://vast.ai/ under Account > API Keys
VAST_API_KEY=your-vast-api-key-here

# Vast.ai template hash for creating Contemplant instances.
# This should be a template containing the Contemplant image.
# The default is the maintained Contemplant template.
VAST_TEMPLATE_HASH=819fdf2e42fc8ceb32f295465b5bb21e

# Number of Contemplant instances to maintain.
# Magister will continuously ensure this many instances are running on Vast.ai.
NUMBER_INSTANCES=1

# Prover type: "cpu" or "cuda" (default: "cpu").
# CPU proving is slower but doesn't require GPU-specific setup.
CONTEMPLANT_PROVER_TYPE=cuda

# Moongate CUDA prover endpoint (default: none).
# Only used when prover_type is "cuda". If not set, Contemplant will spin up
# a moongate-server Docker container automatically.
CONTEMPLANT_MOONGATE_ENDPOINT=http://localhost:3000/twirp/

# SSH public keys for debugging access (default: none).
# Allows SSH access to Contemplant instances on port 2222 for debugging.
# Format: newline-separated SSH public keys.
# Note: In environment variables, use literal \n for newlines.
# CONTEMPLANT_SSH_AUTHORIZED_KEYS="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbc123... user@host\nssh-rsa AAAAB3NzaC1yc2EAAAADAQAB... another@host"
12 changes: 12 additions & 0 deletions .env.maintainer
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is updated by the maintaining team as keys or details change. You
# should not need to manually adjust it. If you wish to override it, there are
# instructions in the README file.

# The image to use for building this project.
BUILD_IMAGE=unattended/petros:latest

# The Hierophant image to use for operating this project.
HIEROPHANT_IMAGE=unattended/hierophant:latest

# The Magister image to use for operating this project.
MAGISTER_IMAGE=unattended/magister:latest
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Description
<!-- Describe your changes in detail -->

## Breaking Changes
<!-- List any breaking changes. Delete this section if none. -->

## Bug Fixes
<!-- List bug fixes. Delete this section if none. -->

## Features
<!-- List new features. Delete this section if none. -->

## Checklist
- [ ] I confirm all tests pass (`make test`)
- [ ] I confirm any manual testing is completed
- [ ] I updated any relevant documentation
- [ ] My code follows style guidelines

---
*Note to maintainers: Sections above will be included in the release notes. You can edit this PR description before merging to improve the release notes.*
49 changes: 49 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CodeQL

on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- 'docs/**'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- 'docs/**'

permissions:
actions: read
contents: read
security-events: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
analyze:
runs-on: [ self-hosted, actions-runner ]
strategy:
fail-fast: false
matrix:
language: [ rust ]
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493

- name: Setup CodeQL
run: echo "/opt/codeql" >> $GITHUB_PATH

- uses: >-
github/codeql-action/init@777daa0c71818e7f377c8adc5415f74544c87142
with:
languages: ${{ matrix.language }}
build-mode: none

- uses: >-
github/codeql-action/analyze@777daa0c71818e7f377c8adc5415f74544c87142
with:
category: "/language:${{ matrix.language }}"
continue-on-error: true
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Local secrets and configuration.
.act-secrets/
.env
.env.maintainer.local
magister.toml
hierophant.toml

# Build artifacts.
**/target/
/out
result
result-*
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

There is no code of conduct, I love you.
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Contributing

Anyone is welcome to contribute to any of our projects. This guide is a set of general instructions for the workflow used to contribute. Specific projects may have their own specific instructions, so do read up on the individual projects themselves to get an understanding.

Before contributing, know the mission statement: the goal is trustlessness and transparency above all else.

# Security

If you discover any bug; flaw; issue; dæmonic incursion; or other malicious, negligent, or incompetent action that impacts the security of any of these projects please responsibly disclose them to us; instructions are available [here](./SECURITY.md).

# Instructions

We accept contributions via pull requests made to the `dev` branch. To participate:
1. Create a fork of this repository.
2. Ensure you are up-to-date with the state of our repository.
3. Create a branch off of `dev`.
4. Implement your changes.
5. Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for formatting all of your commit messages.
6. Submit a pull request targeting `dev` and assist us through review.

We only accept contributions which pass all automated testing and are of high quality.

Loading