Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# RustChain Docker Environment Configuration
# Copy this file to .env and customize for your deployment

# === Node Configuration ===
RUSTCHAIN_HOME=/rustchain
RUSTCHAIN_DB=/rustchain/data/rustchain_v2.db
DOWNLOAD_DIR=/rustchain/downloads

# === Network Ports ===
# Dashboard HTTP port (exposed to host)
RUSTCHAIN_DASHBOARD_PORT=8099

# Nginx HTTP/HTTPS ports
NGINX_HTTP_PORT=80
NGINX_HTTPS_PORT=443

# === SSL Configuration ===
# Set to 'true' to enable HTTPS (requires SSL certificates)
ENABLE_SSL=false

# SSL certificate paths (if ENABLE_SSL=true)
# Place your SSL certificates in ./ssl/ directory
SSL_CERT_PATH=./ssl/cert.pem
SSL_KEY_PATH=./ssl/key.pem

# === Python Configuration ===
PYTHONUNBUFFERED=1

# === Optional: Node API Configuration ===
# If running additional RustChain services
# NODE_API_HOST=localhost
# NODE_API_PORT=8088

# === Docker Resource Limits (optional) ===
# Uncomment to set memory/CPU limits
# RUSTCHAIN_NODE_MEMORY=1g
# RUSTCHAIN_NODE_CPUS=1.0

# === Logging ===
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO

# === Backup Configuration (optional) ===
# Backup directory on host
# BACKUP_DIR=./backups
# Backup retention (days)
# BACKUP_RETENTION_DAYS=7

# === Advanced: Custom Node Settings ===
# Wallet name (for mining)
# MINER_WALLET=my-rustchain-wallet

# === Security ===
# Set to 'true' to run container as non-root user
RUN_AS_NON_ROOT=true
21 changes: 21 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# RustChain Code Owners
# These users will be auto-requested for review on PRs touching these paths

# Core node & consensus — security-critical
rustchain_v2_integrated*.py @Scottcjn
rip_200_round_robin_1cpu1vote.py @Scottcjn
rewards_implementation_rip200.py @Scottcjn

# Security & fingerprinting
fingerprint_checks.py @Scottcjn
hardware_fingerprint.py @Scottcjn
rustchain_crypto.py @Scottcjn

# Wallet & transfers
rustchain_wallet_*.py @Scottcjn

# CI/CD & repo config
.github/ @Scottcjn

# Documentation — community can review
# docs/ (no owner = anyone can review)
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: [Scottcjn]
ko_fi: elyanlabs
custom: ["https://rustchain.elyanlabs.ai/donate"]
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bounty-claim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bounty Claim
description: Claim an RTC bounty for your contribution
title: "[Bounty Claim] "
labels: [bounty-claim]
body:
- type: markdown
attributes:
value: |
## Claim an RTC Bounty
Fill out this form after your PR is merged to receive your RTC payment.
**Reference rate: 1 RTC = $0.10 USD**

- type: input
id: pr-link
attributes:
label: Merged PR Link
description: Link to your merged pull request
placeholder: https://github.com/Scottcjn/Rustchain/pull/123
validations:
required: true

- type: input
id: bounty-issue
attributes:
label: Bounty Issue Link
description: Link to the bounty issue you completed
placeholder: https://github.com/Scottcjn/rustchain-bounties/issues/123
validations:
required: true

- type: input
id: wallet
attributes:
label: RTC Wallet Name
description: Your RustChain wallet name (create one at rustchain.org/wallet.html)
placeholder: my-wallet-name
validations:
required: true

- type: dropdown
id: tier
attributes:
label: Bounty Tier
options:
- Micro (1-10 RTC)
- Standard (20-50 RTC)
- Major (75-100 RTC)
- Critical (100-150 RTC)
validations:
required: true

- type: textarea
id: summary
attributes:
label: What did you do?
description: Brief summary of your contribution
placeholder: Fixed the epoch settlement calculation for edge cases...
validations:
required: true
82 changes: 82 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Bug Report
description: Report a bug in RustChain node, miner, or wallet
title: "[Bug] "
labels: [bug]
body:
- type: markdown
attributes:
value: |
## Report a Bug
Thanks for helping improve RustChain! Bug fixes can earn RTC bounties.

- type: dropdown
id: component
attributes:
label: Component
options:
- Node (rustchain_v2_integrated)
- Miner (rustchain_*_miner)
- Wallet (rustchain_wallet_*)
- Consensus (RIP-200)
- API Endpoint
- Block Explorer
- Documentation
- Other
validations:
required: true

- type: textarea
id: description
attributes:
label: What happened?
description: Clear description of the bug
placeholder: When I run the miner with --wallet flag, it crashes with...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What should have happened?
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: How can we reproduce this?
placeholder: |
1. Run `python3 rustchain_linux_miner.py --wallet test`
2. Wait for attestation cycle
3. See error in log
validations:
required: true

- type: input
id: version
attributes:
label: Version / Commit
description: Which version or commit hash?
placeholder: v2.2.1-rip200 or commit abc1234

- type: dropdown
id: os
attributes:
label: Operating System
options:
- Linux (x86_64)
- Linux (ARM/aarch64)
- Linux (PowerPC)
- macOS (Apple Silicon)
- macOS (Intel)
- Windows
- Other

- type: textarea
id: logs
attributes:
label: Relevant logs
description: Paste any error messages or logs
render: shell
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Feature Request
description: Suggest a new feature or improvement
title: "[Feature] "
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
## Suggest a Feature
Great ideas can become bounties! Feature implementations earn RTC.

- type: textarea
id: problem
attributes:
label: Problem or motivation
description: What problem does this solve?
placeholder: Currently there's no way to...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: How should this work?
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you thought about

- type: dropdown
id: scope
attributes:
label: Scope
options:
- Small (few hours)
- Medium (1-2 days)
- Large (week+)
- Not sure

- type: checkboxes
id: willing
attributes:
label: Contribution
options:
- label: I'd like to implement this myself (for RTC bounty)
- label: I need help implementing this
31 changes: 31 additions & 0 deletions .github/actions/mining-status-badge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# RustChain Mining Status Badge Action

A reusable GitHub Action that writes a RustChain mining status badge into a README file.

## Usage

```yaml
- uses: ./.github/actions/mining-status-badge
with:
wallet: my-wallet-name
readme-path: README.md
badge-style: flat-square
```

## Inputs

- `wallet` (required): RustChain wallet used in `/api/badge/{wallet}`.
- `readme-path` (default: `README.md`): Target file.
- `badge-style` (default: `flat-square`): Shields.io badge style.

## Behavior

If the marker block exists, it is replaced:

```md
<!-- rustchain-mining-badge-start -->
![RustChain Mining Status](https://img.shields.io/endpoint?...)
<!-- rustchain-mining-badge-end -->
```

If missing, a new section `## Mining Status` is appended to the file.
28 changes: 28 additions & 0 deletions .github/actions/mining-status-badge/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: RustChain Mining Status Badge
description: Updates a README badge for RustChain mining status
author: Scottcjn
branding:
icon: cpu
color: blue
inputs:
wallet:
description: RustChain wallet identifier for /api/badge/{wallet}
required: true
readme-path:
description: Path to README file to update
required: false
default: README.md
badge-style:
description: Shields.io badge style for the endpoint URL
required: false
default: flat-square
runs:
using: composite
steps:
- name: Update mining badge block
shell: bash
run: |
export WALLET="${{ inputs.wallet }}"
export STYLE="${{ inputs.badge-style }}"
python3 "${{ github.action_path }}/update_badge.py" "${{ inputs.readme-path }}"
echo "Badge updated for wallet: $WALLET"
30 changes: 30 additions & 0 deletions .github/actions/mining-status-badge/update_badge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3
"""Update README mining status badge."""
import os
import sys
from pathlib import Path

def main():
readme_path = sys.argv[1] if len(sys.argv) > 1 else "README.md"
wallet = os.environ.get("WALLET", "frozen-factorio-ryan")
style = os.environ.get("STYLE", "flat-square")
readme = Path(readme_path)
if not readme.exists():
print(f"README not found: {readme_path}")
sys.exit(1)
text = readme.read_text(encoding="utf-8")
start = "<!-- rustchain-mining-badge-start -->"
end = "<!-- rustchain-mining-badge-end -->"
badge_url = f"https://img.shields.io/endpoint?url=https://rustchain.org/api/badge/{wallet}&style={style}"
block = f"{start}\n![RustChain Mining Status]({badge_url})\n{end}"
start_idx = text.find(start)
end_idx = text.find(end)
if start_idx != -1 and end_idx != -1 and end_idx > start_idx:
new = text[:start_idx] + block + text[end_idx + len(end):]
else:
new = text.rstrip() + "\n\n## Mining Status\n" + block + "\n"
readme.write_text(new, encoding="utf-8")
print(f"Updated {readme_path} with mining badge for wallet: {wallet}")

if __name__ == "__main__":
main()
Loading
Loading