Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
39619b2
feat: document FWSS upgrade process
rjan90 Jan 12, 2026
5f6154e
docs: enhance UPGRADE-PROCESS.md with detailed AFTER_EPOCH guidelines…
rjan90 Jan 15, 2026
a79de37
fix: wording in two-step upgrade
rjan90 Jan 15, 2026
608d91e
chore: remove thousands seperator
rjan90 Jan 16, 2026
cbc7641
chore: re-ordering upgrade processa
rjan90 Jan 16, 2026
33f824f
chore: bump FWSS-version and ServiceProviderRegistry
rjan90 Jan 16, 2026
20a168d
chore: update upgrade announcement workflow to include changelog PR i…
rjan90 Jan 16, 2026
f15a275
chore: remove action required input and changelog link from upgrade a…
rjan90 Jan 16, 2026
4b0253f
feat: enhance deploy-registry-calibnet.sh with proxy deployment option
rjan90 Jan 16, 2026
25ec0bf
feat: enhance deploy-warm-storage-implementation-only.sh to load defa…
rjan90 Jan 20, 2026
d49a18a
feat: enhance warm storage view scripts to load deployment defaults a…
rjan90 Jan 21, 2026
d8b9b6d
refactor: enhance deploy-registry-calibnet.sh for better network comp…
rjan90 Jan 21, 2026
6a774b8
feat: add network-specific USDFC token address handling in deploy-war…
rjan90 Jan 21, 2026
79055ef
chore: update version to 1.1.0 in ServiceProviderRegistry and Filecoi…
rjan90 Jan 21, 2026
3f41420
docs: update upgrade-process document
rjan90 Jan 21, 2026
38a0caf
feat: enhance upgrade announcement workflow with new upgrade options …
rjan90 Jan 21, 2026
77bf6dd
Update service_contracts/tools/UPGRADE-PROCESS.md
rjan90 Jan 22, 2026
41ee70d
Update service_contracts/tools/UPGRADE-PROCESS.md
rjan90 Jan 22, 2026
9d05a18
Update .github/workflows/upgrade-announcement.yml
rjan90 Jan 22, 2026
2141519
chore: remove deploy-registry-calibnet script
rjan90 Jan 26, 2026
18086d7
chore: make implementation "mode" wording clearer
rjan90 Jan 26, 2026
52d1947
chore: rename workflow to `create-upgrade-announcement-issue.yml`
rjan90 Jan 26, 2026
9827322
fix: address `UPGRADE-PROCESS` comments
rjan90 Jan 26, 2026
041c9ae
Update service_contracts/tools/UPGRADE-PROCESS.md
rjan90 Jan 26, 2026
a899196
Update service_contracts/tools/README.md
rjan90 Jan 26, 2026
2fc6bd3
fix: update migrate data handling in upgrade script
rjan90 Jan 28, 2026
67f2c33
Revert "fix: update migrate data handling in upgrade script"
rjan90 Jan 30, 2026
203e00d
fix: incorporate PR feedback in UPGRADE-PROCESS.md
rjan90 Jan 30, 2026
4191992
fix: notify stakeholders
rjan90 Jan 30, 2026
ea506df
refactor: extract upgrade announcement logic into standalone script
rjan90 Feb 2, 2026
08942c1
refactor: consolidate upgrade announcement into release issue format
rjan90 Feb 4, 2026
f8ffc6a
chore: address PR review comments
rjan90 Feb 6, 2026
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
440 changes: 440 additions & 0 deletions .github/scripts/create-upgrade-announcement.js

Large diffs are not rendered by default.

103 changes: 103 additions & 0 deletions .github/workflows/create-upgrade-announcement-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Create Release Issue

on:
workflow_dispatch:
inputs:
network:
description: 'Target network'
required: true
type: choice
options:
- Calibnet
- Mainnet
upgrade_type:
description: 'Type of upgrade'
required: true
type: choice
options:
- Routine
- Breaking Change
upgrade_registry:
description: '(Rare) Also upgrading ServiceProviderRegistry?'
required: false
type: boolean
default: false
upgrade_state_view:
description: '(Rare) Also redeploying FilecoinWarmStorageServiceStateView?'
required: false
type: boolean
default: false
after_epoch:
description: 'AFTER_EPOCH (block number after which upgrade can execute)'
required: true
type: string
changelog_pr:
description: 'PR number with changelog updates'
required: true
type: string
changes_summary:
description: 'Summary of changes (use | for multiple lines)'
required: true
type: string
action_required:
description: 'Action required for integrators (or "None" if no action needed)'
required: true
type: string
default: 'None'
release_tag:
description: 'Release tag if already created (usually added after upgrade completes)'
required: false
type: string
dry_run:
description: 'Dry run (preview issue without creating)'
required: false
type: boolean
default: false

jobs:
create-announcement:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Create announcement issue
id: create_issue
env:
NETWORK: ${{ inputs.network }}
UPGRADE_TYPE: ${{ inputs.upgrade_type }}
UPGRADE_REGISTRY: ${{ inputs.upgrade_registry }}
UPGRADE_STATE_VIEW: ${{ inputs.upgrade_state_view }}
AFTER_EPOCH: ${{ inputs.after_epoch }}
CHANGELOG_PR: ${{ inputs.changelog_pr }}
CHANGES_SUMMARY: ${{ inputs.changes_summary }}
ACTION_REQUIRED: ${{ inputs.action_required }}
RELEASE_TAG: ${{ inputs.release_tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
if [ "${{ inputs.dry_run }}" = "true" ]; then
node .github/scripts/create-upgrade-announcement.js --dry-run
else
node .github/scripts/create-upgrade-announcement.js
fi

- name: Summary
run: |
echo "## Release Issue ${{ inputs.dry_run == true && '(Dry Run)' || 'Created' }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Network**: ${{ inputs.network }}" >> $GITHUB_STEP_SUMMARY
echo "**After Epoch**: ${{ inputs.after_epoch }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ inputs.dry_run }}" = "true" ]; then
echo "This was a dry run. No issue was created." >> $GITHUB_STEP_SUMMARY
else
echo "See the created issue for full details." >> $GITHUB_STEP_SUMMARY
fi
2 changes: 1 addition & 1 deletion service_contracts/src/FilecoinWarmStorageService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract FilecoinWarmStorageService is
EIP712Upgradeable
{
// Version tracking
string public constant VERSION = "1.0.0";
string public constant VERSION = "1.1.0";

// =========================================================================
// Events
Expand Down
2 changes: 1 addition & 1 deletion service_contracts/src/ServiceProviderRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract ServiceProviderRegistry is
}

/// @notice Version of the contract implementation
string public constant VERSION = "1.0.0";
string public constant VERSION = "1.1.0";

/// @notice Maximum length for service URL
uint256 private constant MAX_SERVICE_URL_LENGTH = 256;
Expand Down
2 changes: 1 addition & 1 deletion service_contracts/test/FilecoinWarmStorageService.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5387,7 +5387,7 @@ contract FilecoinWarmStorageServiceUpgradeTest is Test {
if (logs[i].topics[0] == expectedTopic) {
// Decode and verify the event data
(string memory version, address implementation) = abi.decode(logs[i].data, (string, address));
assertEq(version, "1.0.0", "Version should be 1.0.0");
assertEq(version, "1.1.0", "Version should be 1.1.0");
assertTrue(implementation != address(0), "Implementation address should not be zero");
foundEvent = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion service_contracts/test/ServiceProviderRegistry.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract ServiceProviderRegistryTest is MockFVMTest {

function testInitialState() public view {
// Check version
assertEq(registry.VERSION(), "1.0.0", "Version should be 1.0.0");
assertEq(registry.VERSION(), "1.1.0", "Version should be 1.1.0");

// Check owner
assertEq(registry.owner(), owner, "Service provider should be deployer");
Expand Down
2 changes: 1 addition & 1 deletion service_contracts/test/ServiceProviderRegistryFull.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ contract ServiceProviderRegistryFullTest is MockFVMTest {
// ========== Initial State Tests ==========

function testInitialState() public view {
assertEq(registry.VERSION(), "1.0.0", "Version should be 1.0.0");
assertEq(registry.VERSION(), "1.1.0", "Version should be 1.1.0");
assertEq(registry.owner(), owner, "Service provider should be deployer");
assertEq(registry.getNextProviderId(), 1, "Next provider ID should start at 1");
assertEq(registry.REGISTRATION_FEE(), 5 ether, "Registration fee should be 5 FIL");
Expand Down
53 changes: 30 additions & 23 deletions service_contracts/tools/README.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@

This directory contains scripts for deploying and upgrading the FilecoinWarmStorageService contract on Calibration testnet and Mainnet.

> **For detailed upgrade procedures**, see [UPGRADE-PROCESS.md](./UPGRADE-PROCESS.md).

## Scripts Overview

### Available Scripts
### Deployment Scripts

- `deploy-warm-storage-calibnet.sh` - Deploy FilecoinWarmStorageService only (requires existing PDPVerifier and FilecoinPayV1 contracts)
- `deploy-warm-storage-calibnet.sh` - Deploy FilecoinWarmStorageService to **Calibnet only** (deploys both the ERC1967 proxy and implementation, plus the SignatureVerificationLib library; requires existing PDPVerifier, FilecoinPayV1, FilBeam, SessionKeyRegistry, and ServiceProviderRegistry contracts)
- `deploy-warm-storage-implementation-only.sh` - Deploy FWSS implementation only; loads defaults from `deployments.json` and writes back new implementation + metadata (reuses existing signature lib unless redeployed)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What networks does it deploy to? I'm asking given some scripts specify a network name in the file name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can deploy to both. I´m fixing up a lot of the naming issues with regards to the scripts in a PR ontop of this: #414

- `deploy-all-warm-storage.sh` - Deploy all contracts to either Calibnet or Mainnet
- `upgrade-warm-storage-calibnet.sh` - Upgrade existing FilecoinWarmStorageService contract with new proving period parameters

### Upgrade Scripts

For the [two step upgrade process](#contract-upgrade-process):
- `announce-planned-upgrade.sh` - Announce a planned FWSS upgrade (two-step process)
- `upgrade.sh` - Execute a previously announced FWSS upgrade
- `announce-planned-upgrade-registry.sh` - Announce a planned ServiceProviderRegistry upgrade
- `upgrade-registry.sh` - Execute a previously announced registry upgrade

### Usage

Expand All @@ -19,8 +29,9 @@ This directory contains scripts for deploying and upgrading the FilecoinWarmStor
# Deploy all contracts
./tools/deploy-all-warm-storage.sh

# Upgrade existing deployment
./tools/upgrade-warm-storage-calibnet.sh
# Upgrade existing deployment (see UPGRADE-PROCESS.md for details)
./tools/announce-planned-upgrade.sh # Step 1: Announce
./tools/upgrade.sh # Step 2: Execute (after AFTER_EPOCH)
```

## Deployment Parameters
Expand Down Expand Up @@ -116,16 +127,13 @@ These scripts now follow forge/cast's environment variable conventions. Set the

### Required for specific scripts:
- `deploy-warm-storage-calibnet.sh` requires:

- `PDP_VERIFIER_PROXY_ADDRESS` - Address of deployed PDPVerifier contract
- `FILECOIN_PAY_ADDRESS` - Address of deployed FilecoinPayV1 contract


- `deploy-all-warm-storage.sh` requires:
- `CHALLENGE_FINALITY` - Challenge finality parameter for PDPVerifier

- `upgrade-warm-storage-calibnet.sh` requires:
- `WARM_STORAGE_SERVICE_PROXY_ADDRESS` - Address of existing FilecoinWarmStorageService proxy to upgrade
- Upgrade scripts - see [UPGRADE-PROCESS.md](./UPGRADE-PROCESS.md) for complete environment variable reference

## Usage Examples

Expand Down Expand Up @@ -160,25 +168,24 @@ export FILECOIN_PAY_ADDRESS="0x456..."

### Upgrade Existing Contract

```bash
export ETH_KEYSTORE="/path/to/keystore.json"
export PASSWORD="your-password"
export ETH_RPC_URL="https://api.calibration.node.glif.io/rpc/v1"
export WARM_STORAGE_SERVICE_PROXY_ADDRESS="0x789..."
See [UPGRADE-PROCESS.md](./UPGRADE-PROCESS.md) for the complete two-step upgrade workflow.

# Optional: Custom proving periods
export MAX_PROVING_PERIOD="240" # 240 epochs for calibnet, 2880 for mainnet
export CHALLENGE_WINDOW_SIZE="20" # 20 epochs for calibnet, 60 for mainnet
## Contract Upgrade Process

./upgrade-warm-storage-calibnet.sh
```
The FilecoinWarmStorageService and ServiceProviderRegistry contracts use a **two-step upgrade process** for security:

## Contract Upgrade Process
1. **Announce**: Call `announcePlannedUpgrade()` with the new implementation address and a future epoch
2. **Execute**: After the announced epoch, call `upgradeToAndCall()` to complete the upgrade

This gives stakeholders time to review changes before execution.

The FilecoinWarmStorageService contract uses OpenZeppelin's upgradeable pattern. When upgrading:
**For complete upgrade documentation**, including:
- Step-by-step upgrade workflows
- Environment variable reference
- Immutable dependency handling
- Verification procedures

1. **Deploy new implementation**: The script deploys a new implementation contract
2. **Upgrade proxy**: Uses `upgradeToAndCall` to point the proxy to the new implementation
See [UPGRADE-PROCESS.md](./UPGRADE-PROCESS.md).

## Testing

Expand Down
Loading
Loading