Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0420c16
fix(pnpm): ignore .pnpm-store/
RembrandtK Aug 13, 2025
1eec283
feat(container): ugrade dev container to use Claude, /work dir, and J…
RembrandtK Aug 13, 2025
85bc48f
feat: upgrade of pnpm, linting, package dependencies, and linting fixes
RembrandtK Aug 14, 2025
7ec4d30
feat: service quality oracle contract and tests
RembrandtK Aug 14, 2025
18c01e0
fix(contracts/task): fix TypeScript rootDir configuration
RembrandtK Aug 14, 2025
818be27
fix: applying CoPilot review suggestions
RembrandtK Aug 15, 2025
def2365
Update packages/issuance/test/tests/helpers/fixtures.ts
RembrandtK Aug 15, 2025
73d23bd
Update packages/issuance/test/scripts/coverage
RembrandtK Aug 15, 2025
e882dc8
Update packages/issuance/contracts/quality/ServiceQualityOracle.sol
RembrandtK Aug 15, 2025
5ba7608
chore: cleaning files and versions
RembrandtK Sep 4, 2025
96f2fcb
fix(container): fixing pnpm cache and container build
RembrandtK Sep 4, 2025
092d2ba
chore: updating TS code
RembrandtK Sep 4, 2025
ab5b6fe
fix(container): improving caching and directory handling
RembrandtK Sep 17, 2025
1c4e557
feat(build): removing obsolete .yarn/patches
RembrandtK Sep 17, 2025
c22bddc
feat: renaming Service Quality Oracle to Rewards Eligibility Oracle
RembrandtK Sep 17, 2025
92c288a
feat: changing dir from quality to eligibility
RembrandtK Sep 17, 2025
05f0d4e
fix: missed references to service quality
RembrandtK Sep 17, 2025
3acec27
fix(devcontainer): improve pnpm cache setup and permissions
RembrandtK Sep 17, 2025
41c7b96
feat: merging post-horizon main
RembrandtK Sep 18, 2025
cd6d67f
chore: add core dump files to .gitignore
RembrandtK Sep 19, 2025
e65b5bb
fix: set legacy contracts to zero address in protocol deployment mode…
tmigone Sep 18, 2025
3df3071
chore: tmp pr planning docs
RembrandtK Sep 19, 2025
a763fb4
chore: merging dev container update from main b7f507af
RembrandtK Sep 19, 2025
db7d0ac
feat(build): matching main pnpm v10.17 from b5848dfa
RembrandtK Sep 19, 2025
a03c9bd
feat: remove hardhat-dependency-compiler from contracts/test
RembrandtK Sep 19, 2025
310db0b
release: interfaces 0.6.3 and toolshed 0.6.16
tmigone Sep 19, 2025
960e25c
feat: add LegacyRewardsManager to interfaces and horizon contracts
tmigone Sep 19, 2025
4eb9cdf
chore: add subgraph service to allowed locked verifier in migrate scr…
Maikol Sep 18, 2025
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
  •  
  •  
  •  
45 changes: 2 additions & 43 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,52 +1,15 @@
FROM mcr.microsoft.com/devcontainers/base:debian

# Set non-interactive frontend for apt
ENV DEBIAN_FRONTEND=noninteractive
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04

# Switch to root for installing packages
USER root

# Install additional dependencies
RUN apt update && apt install -y \
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
build-essential \
curl \
jq \
python3 \
python3-pip \
python3-venv \
pipx \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

# Install Node.js 20.x using NodeSource
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt update && \
apt install -y nodejs && \
apt clean && \
rm -rf /var/lib/apt/lists/*

# Install Solidity compiler using pipx (isolated environment)
RUN pipx install solc-select && \
pipx ensurepath && \
/root/.local/bin/solc-select install 0.8.27 && \
/root/.local/bin/solc-select use 0.8.27 && \
# Copy binaries to /usr/local/bin with proper permissions (not symlinks)
cp /root/.local/bin/solc /usr/local/bin/solc && \
cp /root/.local/bin/solc-select /usr/local/bin/solc-select && \
chmod 755 /usr/local/bin/solc && \
chmod 755 /usr/local/bin/solc-select && \
# Make sure pipx directory is accessible
chmod -R a+rx /root/.local/pipx && \
# Set up for vscode user
mkdir -p /home/vscode/.solc-select && \
cp -r /root/.solc-select/* /home/vscode/.solc-select/ && \
chown -R vscode:vscode /home/vscode/.solc-select

RUN npm install -g [email protected]

# Install cloc for code analysis
RUN npm install -g cloc

# Install Foundry for Anvil (as root for global installation)
RUN curl -L https://foundry.paradigm.xyz | bash && \
/root/.foundry/bin/foundryup && \
Expand All @@ -61,10 +24,6 @@ RUN curl -L https://foundry.paradigm.xyz | bash && \
chmod 755 /usr/local/bin/forge && \
chmod 755 /usr/local/bin/chisel

# Set up pnpm
RUN corepack enable && \
corepack prepare [email protected] --activate

# Ensure all users have access to the tools
RUN chmod 755 /usr/local/bin/* && \
# Create a directory for vscode user's binaries
Expand Down
61 changes: 12 additions & 49 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,6 @@ The dev container provides a consistent development environment with caching to
1. **Docker Compose Configuration**: Defines the container setup, volume mounts, and environment variables
2. **Dockerfile**: Specifies the container image and installed tools
3. **project-setup.sh**: Configures the environment after container creation
4. **host-setup.sh**: Sets up the host environment before starting the container
5. **setup-git-signing.sh**: Automatically configures Git to use SSH signing with forwarded SSH keys

## Cache System

The container uses a conservative caching approach to prevent cache corruption issues:

1. **Local Cache Directories**: Each container instance maintains its own cache directories

- `vscode-cache` → `/home/vscode/.cache` (VS Code cache)
- `vscode-config` → `/home/vscode/.config` (VS Code configuration)
- `vscode-data` → `/home/vscode/.local/share` (VS Code data)
- `vscode-bin` → `/home/vscode/.local/bin` (User binaries)

2. **Safe Caches Only**: Only caches that won't cause cross-branch issues are configured

- GitHub CLI: `/home/vscode/.cache/github`
- Python packages: `/home/vscode/.cache/pip`

3. **Intentionally Not Cached**: These tools use their default cache locations to avoid contamination
- NPM (different dependency versions per branch)
- Foundry, Solidity (different compilation artifacts per branch)
- Hardhat (different build artifacts per branch)

## Setup Instructions

Expand All @@ -50,7 +27,7 @@ To start the dev container:
When the container starts, the `project-setup.sh` script will automatically run and:

- Install project dependencies using pnpm
- Configure Git to use SSH signing with your forwarded SSH key
- Configure basic Git settings (user.name, user.email) from environment variables
- Source shell customizations if available in PATH

## Environment Variables
Expand All @@ -62,10 +39,10 @@ Environment variables are defined in two places:

### Git Configuration

To enable Git commit signing, add the following settings to your environment file:
To configure Git user settings, add the following to your environment file:

```env
# Git settings for commit signing
# Git settings
GIT_USER_NAME=Your Name
[email protected]
```
Expand All @@ -74,34 +51,20 @@ These environment variables are needed for Git commit signing to work properly.

## Troubleshooting

### Cache Issues
### Build Issues

If you encounter build or compilation issues that seem related to cached artifacts:
If you encounter build or compilation issues:

1. **Rebuild the container**: This will start with fresh local caches
1. **Rebuild the container**: This will start with fresh isolated caches
2. **Clean project caches**: Run `pnpm clean` to clear project-specific build artifacts
3. **Clear node modules**: Delete `node_modules` and run `pnpm install` again

### Git SSH Signing Issues

If you encounter issues with Git SSH signing:

1. **SSH Agent Forwarding**: Make sure SSH agent forwarding is properly set up in your VS Code settings
2. **GitHub Configuration**: Ensure your SSH key is added to GitHub as a signing key in your account settings
3. **Manual Setup**: If automatic setup fails, you can manually configure SSH signing:
### Git Authentication Issues

```bash
# Check available SSH keys
ssh-add -l
If you encounter issues with Git operations:

# Configure Git to use SSH signing
git config --global gpg.format ssh
git config --global user.signingkey "key::ssh-ed25519 YOUR_KEY_CONTENT"
git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers
git config --global commit.gpgsign true

# Create allowed signers file
echo "[email protected] ssh-ed25519 YOUR_KEY_CONTENT" > ~/.ssh/allowed_signers
```
1. **GitHub CLI**: Use `gh auth login` to authenticate with GitHub
2. **Git Configuration**: Set user.name and user.email if not configured via environment variables
3. **Commit Signing**: Handle commit signing on your host machine for security

For other issues, check the `project-setup.sh` and `setup-git-signing.sh` scripts for any errors.
For other issues, check the `project-setup.sh` script for any errors.
16 changes: 10 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"name": "graph contracts",
"dockerComposeFile": ["docker-compose.yml"],
"service": "dev-graph-contracts",
"features": {
Expand All @@ -8,15 +7,20 @@
"gitCredentialHelper": "cache"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/common-utils:2.5.3": {},
"ghcr.io/devcontainers/features/common-utils:2.5.4": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "20"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11"
}
},
"mounts": [
"source=${localWorkspaceFolder},target=/work/${localWorkspaceFolderBasename},type=bind,consistency=cached"
],
"postCreateCommand": ".devcontainer/project-setup.sh",
"remoteUser": "vscode",
"workspaceFolder": "${localWorkspaceFolder}",
"workspaceFolder": "/work/${localWorkspaceFolderBasename}",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -28,14 +32,14 @@
"shd101wyy.markdown-preview-enhanced",
"bierner.markdown-preview-github-styles",
"Gruntfuggly.todo-tree",
"ms-azuretools.vscode-docker",
"donjayamanne.githistory",
"eamodio.gitlens",
"fill-labs.dependi",
"streetsidesoftware.code-spell-checker",
"Augment.vscode-augment",
"NomicFoundation.hardhat-solidity",
"foundry-rs.foundry-vscode"
"foundry-rs.foundry-vscode",
"esbenp.prettier-vscode"
]
}
}
Expand Down
33 changes: 0 additions & 33 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,6 @@ services:
# Disable interactive prompts
- COREPACK_ENABLE_DOWNLOAD_PROMPT=0

# Standard user directories
- XDG_CACHE_HOME=/home/vscode/.cache
- XDG_CONFIG_HOME=/home/vscode/.config
- XDG_DATA_HOME=/home/vscode/.local/share

# Safe caches (won't cause cross-branch issues)
- GH_CONFIG_DIR=/home/vscode/.cache/github
- PIP_CACHE_DIR=/home/vscode/.cache/pip

# pnpm cache is safe to share due to content-addressable storage
- PNPM_HOME=/home/vscode/.local/share/pnpm
- PNPM_CACHE_DIR=/home/vscode/.cache/pnpm

# Note: NPM, Foundry, and Solidity caches are intentionally not set
# to avoid cross-branch contamination. Tools will use their default locations.
volumes:
# Git repo root
- /git:/git

# Local directories for user data (keep local to container)
- vscode-cache:/home/vscode/.cache
- vscode-config:/home/vscode/.config
- vscode-data:/home/vscode/.local/share
- vscode-bin:/home/vscode/.local/bin

# Shared pnpm cache (safe due to content-addressable storage)
- pnpm-store:/home/vscode/.local/share/pnpm
- pnpm-cache:/home/vscode/.cache/pnpm

volumes:
vscode-cache:
vscode-config:
vscode-data:
vscode-bin:
pnpm-store:
pnpm-cache:
48 changes: 0 additions & 48 deletions .devcontainer/host-setup.sh

This file was deleted.

37 changes: 33 additions & 4 deletions .devcontainer/project-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,28 @@ sudo chmod -R 755 /home/vscode/.cache /home/vscode/.config /home/vscode/.local

echo "User directories set up with proper permissions"

# Install Solidity compiler (moved from Dockerfile since Python/pipx is now available)
echo "Installing Solidity compiler..."
pipx install solc-select
pipx ensurepath
solc-select install 0.8.27
solc-select use 0.8.27

# Upgrade npm to latest version for better compatibility and security
echo "Upgrading npm to latest version..."
npm install -g npm@latest

npm install -g [email protected] cloc @anthropic-ai/claude-code

# Set up pnpm with correct version (matching package.json)
echo "Setting up pnpm..."
corepack enable
corepack prepare [email protected] --activate

# Verify pnpm is working
echo "Verifying pnpm installation..."
pnpm --version

# Install project dependencies
echo "Installing project dependencies..."
if [ -f "$REPO_ROOT/package.json" ]; then
Expand Down Expand Up @@ -72,11 +94,18 @@ else
echo "Shell customizations not found in PATH, skipping..."
fi

# Set up Git SSH signing
if [ -f "$SCRIPT_DIR/setup-git-signing.sh" ]; then
"$SCRIPT_DIR/setup-git-signing.sh"
# Set up basic Git configuration (user.name and user.email from environment)
echo "Setting up basic Git configuration..."
if [[ -n "${GIT_USER_NAME:-}" && -n "${GIT_USER_EMAIL:-}" ]]; then
echo "Setting Git user.name: $GIT_USER_NAME"
git config --global user.name "$GIT_USER_NAME"
echo "Setting Git user.email: $GIT_USER_EMAIL"
git config --global user.email "$GIT_USER_EMAIL"
echo "Git user configuration complete"
else
echo "WARNING: setup-git-signing.sh not found, skipping Git SSH signing setup"
echo "GIT_USER_NAME and/or GIT_USER_EMAIL not set - skipping Git user configuration"
echo "You can set these manually with: git config --global user.name 'Your Name'"
echo "and: git config --global user.email '[email protected]'"
fi

echo "Project-specific setup completed"
12 changes: 0 additions & 12 deletions .devcontainer/sample-graph.env

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:
cache: 'pnpm'
- name: Set up pnpm via Corepack
shell: bash
run: corepack prepare pnpm@9.0.6 --activate
run: corepack prepare pnpm@10.17.0 --activate
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
files: ${{ steps.coverage_files.outputs.files }}
flags: unittests
name: graphprotocol-contracts
fail_ci_if_error: true
fail_ci_if_error: false
Loading