Skip to content
Open
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
76 changes: 76 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributing to ProofWorks

Thank you for your interest in contributing to **ProofWorks**! This document outlines the process for setting up your environment, running tests, and submitting your contributions.

## Setup

To set up the development environment locally:

1. **Clone the Repository**:
Clone the repository and navigate into the project root:
```bash
git clone https://github.com/tommycet/proofworks-genlayer.git
cd proofworks-genlayer
```

2. **Install Python Dependencies**:
ProofWorks requires Python dependencies for contract testing and linting. Install them using `requirements.txt`:
```bash
pip install -r requirements.txt
```

3. **Install Node.js Dependencies**:
Install root dependencies and frontend dependencies:
```bash
npm install
npm --prefix frontend install
```

## Running the tests

To verify your changes locally, you can run the test suite using the configured Makefile targets:

- **Run all direct contract tests**:
```bash
make test
```
*(Note: This command runs the Python pytest suite against GenVM direct-mode tests.)*

- **Lint the escrow contract**:
```bash
make lint-contract
```

- **Build the frontend production package**:
```bash
npm --prefix frontend run build
```

- **Validate all components in one shot** (Tests, Contract Linter, and Frontend build):
```bash
make validate-all
```

## Submitting a pull request

When you are ready to submit your changes:

1. **Create a Local Branch**:
Branch off from the `main` branch with a descriptive name:
```bash
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bugfix-name
```

2. **Commit Your Changes**:
Make small, atomic commits with clear commit messages describing your changes.

3. **Validate Your Changes**:
Ensure all tests and build checks pass successfully by running:
```bash
make validate-all
```

4. **Submit the Pull Request**:
Push your branch to GitHub and open a Pull Request targeting the `main` branch.
12 changes: 12 additions & 0 deletions bounty_context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"owner": "tommycet",
"repo": "proofworks-genlayer",
"issueNumber": "4",
"title": "Bounty: Document Appeal Fees and Staking",
"body": "This task requires documenting the appeal fees (20% bond) and worker staking (forfeited on claim expiry) introduced in ProofWorks Phase 9.\n\nAcceptance Criteria:\n1. Create a new markdown file docs/bounty-rules.md.\n2. Document that the appeal bond is 20% of the task reward.\n3. Document that worker stake is forfeited if the claim expires without a proof submission.\n4. References this issue in the PR body.",
"labels": [
"bounty"
],
"gitCloneUrl": "https://github.com/tommycet/proofworks-genlayer.git",
"repoDir": "/Users/macminim1/Documents/efe/bounty-hunter/temp/proofworks-genlayer"
}
15 changes: 15 additions & 0 deletions docs/bounty-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ProofWorks Bounty Rules

This document outlines the rules governing worker staking and dispute resolution (appeals) introduced in ProofWorks Phase 9.

## Appeal Fees & Bonds

To prevent spam disputes and ensure high-quality validations:
- **Appeal Bond Rate**: The appeal bond is set to **20% of the task reward**.
- **Payment & Recovery**: The appellant must deposit this bond when opening an appeal. If the appeal is successful, the bond is returned; otherwise, it is distributed to the validators.

## Worker Staking & Expiry

To guarantee that claimed tasks are completed in a timely manner:
- **Forfeiture on Expiry**: If a worker claims a task but the claim expires without a valid proof submission, the worker's staked amount is **forfeited**.
- **Stake Release**: The stake is released back to the worker upon successful submission and approval of the proof.
5 changes: 5 additions & 0 deletions pr_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"submitted": true,
"dryRun": false,
"prUrl": "https://github.com/tommycet/proofworks-genlayer/pull/32"
}
4 changes: 4 additions & 0 deletions test_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"passed": true,
"output": "........................................................................ [ 80%]\n................. [100%]\n89 passed in 1.95s\n"
}