[Release] FWSS v1.7.0 Mainnet Upgrade (includes Calibnet)

Open
#679 10 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
github, solidity
Domain
devops, release

Research direction

Start with the release checklist in this issue, then review the linked release-prep PR #680 and the named dependency issues and repositories. The issue requires coordinating contract upgrades on Calibnet and Mainnet, recording owner decisions and transaction evidence, and completing validation before release; it does not assign a self-contained task with a clear completion point for a first-time contributor.

Written by the indexing model from the issue text.

Description

release

Overview

Field Value
Stack Version v1.7.0
Upgrade Type Routine
Upgrade Path B (josuke migration) on both networks, checked from chain state 26 Nov — see Choose the Upgrade Path
Release-prep PR(s) #680 (merged as 48c81d6), #682 (lib/pdp to v3.6.0, merged as 121d4ce)
Technical Owner @Kubuxu
Go/No-Go Status TBD
Release Exceptions

This release upgrades two contracts outside the default FWSS scope, for SP payee and worker rotation (#674, FilOzone/pdp#318).

Contract Live (both networks) Target Owner How
ServiceProviderRegistry 1.2.0 1.3.0 Safe 0x6386…f2AA (2-of-6) The ServiceProviderRegistry exception boxes in Phases 3 and 4 (service-provider-registry-{announce,execute}-upgrade.sh)
PDPVerifier 3.5.0 3.6.0 Safe 0x3569…F3E5 (2-of-4) FilOzone/pdp upgrade tooling, then PDP-VERIFIER-SYNC.md
FWSS 1.6.0 1.7.0 Safe 0x6386…f2AA (2-of-6) Path B (this checklist)

Delay: Routine, 600 epochs (~5h) for every announcement on both networks (decided 26 Nov), shorter than the 2,880-epoch Routine minimum in Notice Guidance.

Execute order on each network: ServiceProviderRegistry → PDPVerifier → FWSS. PDPVerifier 3.6.0 resolves SP auth through the registry's current worker, so the registry goes first. If the announcements are queued together, give the executes Safe nonces in this order.

Before the frozen deploy commit:

  • FilOzone/pdp tags v3.6.0 Tagged at 591b874 (FilOzone/pdp#319) by @Kubuxu; the only change from 04be8f5 is CHANGELOG.md.
  • lib/pdp points at the tagged release, or the technical owner records why it stays on the deploy commit (v3.5.0 tagged a later docs-only commit) @Kubuxu: lib/pdp should point at the tag, or at least at the same code that will be deployed. #682 moved it to 591b874 (v3.6.0), merged as 121d4ce.

Start here: Choose the upgrade path, then work through the Release Checklist from Phase 1. Expand the supporting sections below only when you need their context or evidence tables.

Choose the Upgrade Path

FWSS is moving from a single UUPS implementation (the v1.4.0 monolith) to an ERC-8167 dispatcher that routes each function selector to a module. The proxy address never changes; what sits behind it decides the path.

  • Path A — one-time dispatcher transition. The proxy still runs the v1.4.0 monolith. The monolith's own delayed UUPS upgrade installs FWSSDispatcherTransition, which in the same call points the proxy at the dispatcher and runs the josuke migration that writes the routes. This happens once per network.
  • Path B — josuke migration. The proxy already runs the dispatcher. Every later upgrade deploys changed modules with josuke deploy, announces the migration that reroutes their selectors, runs it after the delay, and records it with josuke accept.

Determine the path from chain state for each network, not from memory or deployments.json:

cd service_contracts
IMPL=$(cast implementation --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS")
IMPL_CODEHASH=$(cast keccak "$(cast code --rpc-url "$ETH_RPC_URL" "$IMPL")")
PINNED_DISPATCHER_CODEHASH=$(grep -o '0x[0-9a-f]\{64\}' <<< "$(grep 'FWSS_DISPATCHER_CODE_HASH =' src/FWSSDispatcherTransition.sol)")
echo "Implementation $IMPL, code hash $IMPL_CODEHASH"
[ "$IMPL_CODEHASH" = "$PINNED_DISPATCHER_CODEHASH" ] && echo "Path B: dispatcher installed" || echo "Path A: monolith installed"

If Calibnet and Mainnet are on different paths, record the path per network in the Run Log and follow each network's path.

How the Upgrade Functions Differ

The selector migrate(address) exists on both sides of the transition with different meanings. Read this table before preparing or signing any upgrade transaction.

Step Path A: monolith (UUPS) Path B: dispatcher (ERC-8167)
Announce announceUpgradePlan(address newImplementation, uint96 delayEpochs) with the transition as newImplementation announceMigration(address migration, uint96 delayEpochs) with the josuke migration
Pending plan Storage slot 19 of the proxy: (nextImplementation, afterEpoch) Same slot 19: (migration, afterEpoch)
Execute upgradeToAndCall(transition, migrate(migration)) migrate(migration)
What migrate(address) does Inside the upgrade call, the transition's migrate points the proxy at the dispatcher and delegatecalls the pinned migration, which writes every route. On the monolith itself, migrate(address) only ever set the legacy view contract address; it is not part of either flow and must never be signed as a standalone transaction. Runs the announced migration in the proxy's storage after afterEpoch, consumes the plan, then reverts if the migration changed the proxy's implementation or removed the implementation, selectors, announceMigration, or migrate routes.
What pins the code The transition pins the migration's address and code hash, the dispatcher (whose code hash is pinned in source), and the rollback target Only the migration's address is pinned. josuke verify checks the migration's code before the announcement, during the delay, and before execution (see Procedure B).
Abort before execution A later announcement replaces the pending plan A later announcement replaces the pending plan
Recovery after execution abortTransition() on the proxy restores the monolith only if the transition was installed with empty upgrade data. A successful transition cannot be undone; fix forward with Path B. Announce and run another migration that restores the previous routes, subject to the announce delay
Ledger josuke deploy stages the modules and migration under proposed in josuke.json; josuke accept promotes them to current Same
Release tracking and rollout records — tags, versions, deployment snapshots, schedule, and transaction evidence
Release Tracking

The filecoin-services GitHub release version is the stack version. It may differ from an individual contract VERSION() when the stack changes without an FWSS code change.

Item Value
Frozen deploy commit 121d4ce2234230992b72f4b8a8b8f29ffe9b9faf (main after #682; branch release-v1.7.0, tag v1.7.0; lib/pdp at pdp v3.6.0)
GitHub pre-release v1.7.0
Release status Latest since 1 Dec, after the Mainnet upgrade and checks
josuke.json / deployments.json PR(s) #685 (current on both networks: 7fab08b Calibnet, e321944 Mainnet; deployments.json 7ec283b); awaiting review
Synapse SDK PR FilOzone/synapse-sdk#1167 (from the Update Synapse SDK run on v1.7.0); merge now that Mainnet is live, then the synapse-core release

Field ownership for duplicated rollout data:

Data Source of truth Mirror/update
Operator status, owner decisions, exceptions, and in-progress tx/check evidence This release issue: Release Tracking and Run Log Mirror externally useful rollout status to the GitHub Release page
Live contract state Chain state read from the FWSS proxy: implementation slot, pending-plan slot 19, and dispatcher routes Record observed values in the Run Log and use them for go/no-go
Staged and live routes service_contracts/josuke.json: proposed is staged, current is live after josuke accept Commit after each josuke deploy and josuke accept
Consumer-facing release status, addresses, epochs, and tx links GitHub Release page Populate from the Run Log as rollout facts become final
Repo deployment snapshot service_contracts/deployments.json on main Update by follow-up PR(s)
Component Versions
Component Version Changed? Notes
Stack (filecoin-services) v1.7.0 Yes Git tag / GitHub Release
FilecoinWarmStorageService 1.7.0 Yes VERSION() returned by the FWSS proxy
PDPVerifier 3.6.0 Yes FilOzone/pdp v3.6.0 (591b874); see Release Exceptions
ServiceProviderRegistry 1.3.0 Yes See Release Exceptions
Upgrade Schedule
Network Path Requested delay Actual afterEpoch Status
Calibnet B 600 (~5h) Registry 4290488, PDPVerifier 4290481, FWSS 4290855 Done 30 Nov
Mainnet B 600 (~5h) Registry 6592695, PDPVerifier 6592697, FWSS 6592699 Done 1 Dec

Set the requested delay before proposing the Safe transaction. Fill in the actual afterEpoch from slot 19 after the announcement executes. The observed value is the source of truth for the execute step and external communications.

Run Log

The Run Log is this release issue's operator journal for rollout facts discovered during execution: deployed addresses, code hashes, transaction links, validation outputs, exceptions, and owner decisions.

Keep this table current as values become known.

Network Path Announced target (transition or migration) Announce tx Actual afterEpoch Execute tx josuke accept commit Post-upgrade checks
Calibnet B 0x8FddD1C98da331a2FED3d9f667f913B08BCF3458 (josuke migration) 0xee66…a8a6 4290855 0xecd1…938b 7fab08b 30/30 passed; smoke
Mainnet B 0xBD900Fab9eE836a24Ca77c360eF0dedD559eBe86 (josuke migration) 0xa5a1…632f 6592699 0x18b0…5565 e321944 30/30 passed; smoke
Scope and validation plan — cross-repo impact, dependencies, rollback, and pre-live evidence
Scope
  • In scope: the FWSS code behind the existing FWSS proxy — the one-time dispatcher transition (Path A) or the modules and migration of a josuke upgrade (Path B).
  • Out of scope by default: ServiceProviderRegistry, PDPVerifier, FilecoinPay, and SessionKeyRegistry.
  • If this release needs an out-of-scope change, add a clearly labeled exception section to this issue before starting that work.
Cross-Repo Impact

Check every pre-seeded row and list each required cross-repo change or release. Use None only after the technical owner confirms there is no required change for that repository.

Repository Required change, PR, issue, or release Required before Mainnet? Owner/Status
FilOzone/synapse-sdk FilOzone/synapse-sdk#1167: ABI and deployments for v1.7.0 No, merge after Mainnet @Kubuxu; checks green, awaiting merge
FilOzone/pdp Changelog FilOzone/pdp#319, then tag v3.6.0 (FilOzone/pdp#317, FilOzone/pdp#318, FilOzone/pdp#312) Yes, before the frozen deploy commit @Kubuxu; #319 merged, tagged v3.6.0 at 591b874
filecoin-project/curio filecoin-project/curio#1672 (wallet rotation), Curio release after the contract upgrades No @snadrus
FilOzone/filecoin-cloud Auto-generated PRs after the Synapse SDK release No Follows FilOzone/synapse-sdk#1167
Other / none TBD TBD TBD
Dependency Targets and Compatibility

Populate this table while reviewing the Phase 1 inventory. The technical owner records the compatibility disposition for every dependency before approving the inventory.

Dependency Target version/address Calibnet observed Mainnet observed Verification/status
PDPVerifier 3.6.0 (pdp v3.6.0, 591b874) 3.6.0 since 30 Nov 3.6.0 since 1 Dec Upgraded in this release
FilecoinPay Unchanged Unchanged Unchanged Not part of this release
ServiceProviderRegistry 1.3.0 1.3.0 since 30 Nov 1.3.0 since 1 Dec Upgraded in this release
SessionKeyRegistry Unchanged Unchanged Unchanged Not part of this release
Rollback Plan

State the recovery plan before any live announce transaction. The function table lists what each path allows.

Field Value
Recovery status TBD: Abortable / Fix-forward only / Not applicable
Previous implementation (Path A) or previous current routes (Path B) TBD
Recovery procedure TBD
Decision notes TBD
Pre-Live Validation

Record validation that proves the planned upgrade works against the full contract, Curio, and Synapse state before live rollout.

Validation Evidence/status
foc-devnet post-upgrade state validation TBD
Pricing validation v1.7.0 does not change pricing. getPriceList() is identical just before and after each FWSS execute (Calibnet block 4290858 vs live; Mainnet block 6593502 vs live)
Synapse SDK integration build TBD: link the Synapse SDK PR/check run that builds against the intended contract ABI/types and deployment-address state, or record the owner-approved exception.
Operator reference — network constants, operating rules, notice guidance, and required post-upgrade evidence
Network Constants
Network Chain ID RPC URL FWSS Proxy Safe Owner
Calibnet 314159 https://api.calibration.node.glif.io/rpc/v1 0x02925630df557F957f70E112bA06e50965417CA0 0x6386622B4915B027900d65560b0ab84F8a1ff2AA
Mainnet 314 https://api.node.glif.io/rpc/v1 0x8408502033C418E1bbC97cE9ac48E5528F371A9f 0x6386622B4915B027900d65560b0ab84F8a1ff2AA

Every procedure below runs from service_contracts/ in one of these environments:

cd service_contracts

# Calibnet
export CHAIN=314159
export ETH_RPC_URL="https://api.calibration.node.glif.io/rpc/v1"
export FWSS_PROXY_ADDRESS="0x02925630df557F957f70E112bA06e50965417CA0"

# Mainnet
export CHAIN=314
export ETH_RPC_URL="https://api.node.glif.io/rpc/v1"
export FWSS_PROXY_ADDRESS="0x8408502033C418E1bbC97cE9ac48E5528F371A9f"

cast unlocks ETH_KEYSTORE even for read-only calls and then sends them from the keystore address (foundry-rs/foundry#17388, see #621).
Keep ETH_KEYSTORE and ETH_PASSWORD out of the environment for every read-only step; set them only for josuke deploy and the transition deploy script.
cast reads ETH_PASSWORD as --password-file and rejects it without --keystore.

Operating Rules
  • Reproduce before you sign. Every Safe signer regenerates the calldata from this checklist on their own machine, decodes it, and confirms it byte-for-byte against the Safe UI before signing. Never sign calldata you only received from someone else.
  • Read state, not reports. Confirm every announcement, execution, and post-check against chain state (implementation slot, slot 19, dispatcher routes, code hashes). A screenshot, a log line, or deployments.json is not evidence of live state.
  • Verify code, not just addresses. Before signing an announce or execute transaction, run josuke verify, and for Path A check the transition's pins. An address alone does not prove what will run.
  • Treat surprises as incidents. An announcement, route change, or implementation change that is not in this issue's Run Log is an incident: stop, notify the technical owner and signers, and do not execute anything until it is explained. A pending plan can be replaced by a new announcement.
  • Use the release issue as the rollout source of truth. Keep the schedule, Run Log, tx links, and post-upgrade evidence current.
  • Create the stack tag and GitHub Release before any live upgrade transaction. Mark the GitHub Release as a pre-release until Mainnet is complete and verified.
  • Keep the GitHub pre-release page updated as the external rollout tracker for consumers; keep this issue updated as the operator runbook.
  • Keep CHANGELOG focused on what changed. Put mutable deployment status, addresses, epochs, and transaction links on the GitHub Release page.
  • Tag semantics: The vX.Y.Z tag is immutable and points to the frozen deploy commit used for contract deployment and bytecode verification. Post-deploy rollout facts such as live addresses, epochs, tx links, and josuke.json / deployments.json follow-up PRs are not folded back into the tag. They live on main, the release issue Run Log, and the GitHub Release page. Do not create a second "final release" tag.
  • Where to find what: Use the vX.Y.Z tag for the source that produced the deployed bytecode. Use on-chain reads from the FWSS proxy for live state: the implementation slot, slot 19, implementation(bytes4) for each route, and address getters such as pdpVerifierAddress(), paymentsContractAddress(), serviceProviderRegistry(), sessionKeyRegistry(), usdfcTokenAddress(), and filBeamBeneficiaryAddress(). Use the GitHub Release rollout table for the historical record of what was live for this release.
  • josuke.json and deployments.json on a release branch or vX.Y.Z tag are the copies that existed at branch-cut/tag time. Do not use them as live state. Commit josuke.json after every josuke deploy and josuke accept so reviewers verify the same ledger the operator used.
  • The technical owner owns the written upgrade plan, dependency target verification, and final go/no-go decision.
  • Before any live announce transaction, fill in the Technical Owner, Upgrade Path, Cross-Repo Impact, Dependency Targets and Compatibility, Rollback Plan, and foc-devnet validation status.
  • In Safe Transaction Builder, the target is the FWSS proxy, value is 0, and data is the calldata you reproduced.
  • Do not announce Mainnet until Calibnet execution, on-chain checks, josuke accept, explorer checks, smoke/E2E checks, and filecoin-pin Data Set creation validation are complete.
  • Do not announce Mainnet until required cross-repo changes are merged/released or explicitly waived by the technical owner.
  • The requested delay starts when the Safe announcement executes. After execution, read slot 19 and record its exact afterEpoch as the source of truth.
  • A later announcement replaces the pending plan. Record the replacement transaction and explicitly mark it as superseding the previous announcement.
Notice Guidance
Upgrade Type Minimum Notice Recommended
Routine 2880 epochs (~24h) 1-2 days
Breaking change 20160 epochs (~1 week) 1-2 weeks

Calibnet can use a shorter window for rehearsal and validation, but use enough time for signers and reviewers to coordinate. The delay is the window in which anyone can detect a bad announcement, so select a positive operational delay; the contract's one-epoch floor is an emergency safety bound, not the routine notice policy.

export UPGRADE_DELAY_EPOCHS=2880 # use 240+ for Calibnet rehearsal, 20160 for breaking changes
echo "Requested upgrade delay: $UPGRADE_DELAY_EPOCHS epochs"
Post-Upgrade Evidence Required

For each network, record evidence that:

  • The FWSS proxy implementation slot holds the dispatcher, and its code hash equals FWSS_DISPATCHER_CODE_HASH in src/FWSSDispatcherTransition.sol.
  • Slot 19 is cleared.
  • josuke accept succeeded against the live chain and the resulting josuke.json is committed.
  • owner() is still the Safe owner.
  • VERSION() returns the expected FWSS contract version without the leading v.
  • Blockscout shows the proxy and transaction as expected.
  • A smoke/E2E test passes. The v1.2.0 rollout used the Synapse SDK storage E2E example.
  • A filecoin-pin add flow succeeds after the upgrade with unique Data Set metadata, forcing creation of a new Data Set on the target network. Record the command output, metadata, Data Set ID, tx/link, SP, and timestamp in the Run Log.
Release notes and integrator action — summary of changes and any required downstream action
Changes
  • SP payee and worker rotation (#674): the registry lets a provider change its worker and payee, and FWSS can move a data set's payment rail to the provider's current payee.
  • PDPVerifier 3.6.0: SP auth resolves through the registry's current worker (FilOzone/pdp#318), addPieces() enforces FRC-0069 PieceCIDv2 sizing (FilOzone/pdp#317), and the 2,000-piece pending-removal limit is removed (FilOzone/pdp#312).
Action Required for Integrators

TBD


Release Checklist

Work through the phases in order. Do not announce Mainnet until the Calibnet execute transaction, on-chain checks, josuke accept, smoke/E2E test, and filecoin-pin Data Set creation validation are complete.

Phase 1: Issue, PR, Branch, and Checks
  • Create the release issue by running the Create Release Issue workflow from main. Do this before the remaining release-prep and branch steps so the generated issue tracks the complete process.
  • Determine the upgrade path for each network from chain state (Choose the Upgrade Path) and record it in the Overview and Upgrade Schedule
  • All intended FWSS contract changes are merged into main #674 and #680, main at 48c81d6.
  • Release-prep PR(s) opened for review (prefer one PR when practical) with changelog/release notes, a Deployment note linking to the GitHub Release page for rollout status, addresses, and transaction links, and any applicable version/submodule bump. For FWSS contract changes, include the FWSS VERSION() bump. For PDP-only stack releases, use the PDP/submodule bump PR and leave the FWSS VERSION() unchanged. Suggested title: chore: prep FWSS v1.7.0 release
  • Upgrade checks pass on the release candidate: At 48c81d6, 27 Nov: make check-josuke OK, no blocking findings; josuke check --chain 314159 and --chain 314 OK, 3 facets to deploy; make test 1176 passed, 0 failed.
cd service_contracts
make check-josuke   # ledger schema, facet sources, selector collisions, sizes, and storage against every recorded deployment, offline
make test           # builds the ERC-8167 dispatcher artifacts the tests need (make erc8167), then runs forge test

josuke check must list exactly the facets this release intends to change as new, changed, or removed, and nothing else. Stop if it reports a facet it cannot deploy.

  • Release-prep PR(s) merged so main contains the final release notes and applicable version/submodule changes before creating the release branch #680, merged as 48c81d6.
  • Create the release branch from main after the release-prep PR(s) land (recommended: release-v1.7.0), then record its name and commit in the existing release issue. Do not create a second release issue. release-v1.7.0 at 121d4ce.
  • Name the technical owner, update the Overview, and confirm they own the written upgrade plan and go/no-go decision @Kubuxu.
  • Obtain technical-owner approval of the two-network deployment inventory: Approved by @Kubuxu, 27 Nov. josuke check at 48c81d6, both chains: CHANGED FWSSAuthorizationModule (new constructor argument _serviceProviderRegistry, 0x839e…Ac9D on Calibnet and 0xf55d…A5eB on Mainnet, the registry proxies; #674), FWSSDataSetModule (#674), FWSSMetadataModule (VERSION() 1.7.0, #680); everything else UNCHANGED, 81 selectors. The two warnings (slot 17 viewContractAddress renamed to _viewContractAddress against legacy 4cbbea4) predate this release.
    • Run josuke check --chain 314159 and josuke check --chain 314 and record the listed facets.
    • For every CHANGED or NEW facet, changed constructor argument, layout change, and warning in that output, name the merged PR that intends it. josuke check passes on any internally consistent value (a constructor argument changed from 150 to 10 is reported, not failed), so this review is the only gate on what the values should be. A change nobody can attribute blocks the release.
    • Path A only: record each network's current implementation (cast implementation --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS"). It is the transition's rollback target, and Procedure A2 checks the transition pins it.
    • Populate Dependency Targets and Compatibility. Stop, correct the release ref, and rerun for any unapproved difference.
    • Check every dependency record that verify-deployments.sh skips as pinned, PDPVerifier included, against an independent source: the creation transaction's constructor arguments, or the dependency's release build with the pin ignored (as #606 did for PDPVerifier). Record the result. No tool checks these records otherwise.
  • Fill Cross-Repo Impact with required PRs, issues, releases, or None
  • Fill Rollback Plan from the function table
  • Run foc-devnet post-upgrade state validation, or record the technical owner's approved exception
  • Technical owner decides whether this release needs a fork rehearsal and records the decision. @Kubuxu, 27 Nov: no fork rehearsal required; he is running an additional rehearsal on fvm-anvil. If it does, rehearse the upgrade on a local fork of each network with real data sets: announce, execute, and run the post-upgrade checks against the frozen candidate. For the storage-terms introduction, cover data sets with a pending fee, piece additions, piece removals, and termination with an underfunded payer, and confirm the wrapper (not the raw migration) is the rehearsed target. Record the fork block and results.
  • Freeze the deploy commit and record it in Release Tracking 121d4ce; make check-josuke rerun there: no blocking findings, same 3 facets.
  • Create and push the stack tag from the frozen deploy commit before any live upgrade transaction: v1.7.0 at 121d4ce.
git tag v1.7.0
git push origin v1.7.0
  • Create the GitHub Release from v1.7.0, mark it as a pre-release, and include component versions plus a FWSS rollout status table: v1.7.0, with a rollout row for each of the three contracts per network.
GitHub Release creation commands
export RELEASE_ISSUE_URL="TBD" # replace with the generated release issue URL

cat > /tmp/fwss-release-notes.md <<'EOF'
> Status: Pre-release. Calibnet and Mainnet rollout pending; tracked in [the release issue](RELEASE_ISSUE_URL).

## Summary
- TBD

## Component Versions

| Component | Version | Notes |
|---|---|---|
| Stack (`filecoin-services`) | `v1.7.0` | Git tag / GitHub Release |
| `FilecoinWarmStorageService` | `1.7.0` | `VERSION()` returned by the FWSS proxy |
| `PDPVerifier` | `TBD` | Link PDP release if this stack consumes a new PDP version |

## Rollout Status

| Network | FWSS Proxy | Announced target | Announce tx | Actual `afterEpoch` | Execute tx | Status |
|---|---|---|---|---:|---|---|
| Calibnet | `0x02925630df557F957f70E112bA06e50965417CA0` | `TBD` | `TBD` | `TBD` | `TBD` | Pending |
| Mainnet | `0x8408502033C418E1bbC97cE9ac48E5528F371A9f` | `TBD` | `TBD` | `TBD` | `TBD` | Pending |

## Action Required For Integrators
- TBD
EOF

perl -0pi -e 's|RELEASE_ISSUE_URL|$ENV{RELEASE_ISSUE_URL}|g' /tmp/fwss-release-notes.md

gh release create v1.7.0 \
  --verify-tag \
  --prerelease \
  --title "FWSS v1.7.0" \
  --notes-file /tmp/fwss-release-notes.md
  • Confirm the Update Synapse SDK workflow opened or updated the expected Synapse SDK PR and that its integration build passes against the intended contract ABI/types and deployment-address state, or record an exception/owner in Release Tracking. This Phase 1 check is the early ABI/type signal; run the workflow again in Phase 5 after final deployment-address state exists. FilOzone/synapse-sdk#1167.
  • Release issue Overview and Release Tracking updated with PR links, release link, summary, and action required
Phase 2: Deploy Contracts

Deploy both networks from the frozen tag before any announce/execute. Deploying is permissionless and changes nothing behind the proxy; only the Safe's announce and execute transactions do.

  • Calibnet: run Procedure A1 (Path A) or Procedure B1 (Path B) in the Calibnet environment B1, 27 Nov; josuke verify passed. Addresses in the deploy comment below.
  • Mainnet: run Procedure A1 (Path A) or Procedure B1 (Path B) in the Mainnet environment B1, 27 Nov; josuke verify passed. Addresses in the deploy comment below.
  • Open a PR with the updated josuke.json (and, for Path A, deployments.json) and record it in Release Tracking. Reviewers verify against this exact ledger. #685.
  • On the PR's commit, josuke check --strict passes: after josuke deploy, the staged proposed deployment must match the frozen source exactly. Paste its --format markdown report into the PR. Passed on #685's commit ba8c8ec; report in the PR.
  • A second engineer runs josuke verify in each environment from the PR's commit and records the result in the Run Log. josuke verify proves the chain matches the ledger, not that the ledger is right, so the same engineer checks the recorded constructor arguments of each new facet against the Phase 1 attribution.
  • Add the announced target for each network to the GitHub pre-release rollout status
Phase 3: Calibnet Announce + Execute

Announce

  • If this release has a ServiceProviderRegistry exception, generate its Calibnet announcement with NEW_SERVICE_PROVIDER_REGISTRY_IMPLEMENTATION_ADDRESS="$CALI_NEW_SPR_IMPL" UPGRADE_DELAY_EPOCHS=<delay> CALLDATA_ONLY=true ./tools/service-provider-registry-announce-upgrade.sh, execute it through the owner Safe, then verify and record the exact implementation and observed afterEpoch returned by nextUpgrade() before any execute transaction. Done through the reviewed packet (review packet): announceUpgradePlan, then upgradeToAndCall(impl, migrate("1.3.0")).
  • Set the Calibnet requested delay and update the schedule table
  • Run Procedure A2 or Procedure B2 in the Calibnet environment Announces.
  • Record the Calibnet announce tx and observed afterEpoch in the schedule and Run Log
  • Update the GitHub pre-release Calibnet rollout status with the announce tx and observed afterEpoch
  • Create or update the public operational notice on status.filecoin.cloud for the Calibration network before execution. Identify the network and scheduled date/window, link the GitHub pre-release, and keep the maintenance window open through expected post-upgrade validation. Follow the Operational Event Communications Runbook.

Review during the delay

  • Run Procedure A3 or Procedure B3 in the Calibnet environment, by someone other than the announcing operator

Execute

  • Wait for the observed Calibnet afterEpoch
  • If this release has a ServiceProviderRegistry exception, generate its Calibnet execution with NEW_SERVICE_PROVIDER_REGISTRY_IMPLEMENTATION_ADDRESS="$CALI_NEW_SPR_IMPL" NEW_VERSION=<version> CALLDATA_ONLY=true ./tools/service-provider-registry-execute-upgrade.sh, execute it in the approved transaction order, then verify and record its implementation slot, VERSION(), initializer counter, preserved registry state, and cleared nextUpgrade() Done through the reviewed packet (review packet): announceUpgradePlan, then upgradeToAndCall(impl, migrate("1.3.0")).
  • Run Procedure A4 or Procedure B4 in the Calibnet environment Executes, in order.
  • Record the Calibnet execute tx link in the Run Log
  • For Path A, run Procedure A5 in the Calibnet environment N/A: Path B.
  • Run Post-Upgrade Checks in the Calibnet environment, then josuke accept and commit josuke.json; record the commit in the Run Log 30/30; josuke accept 7fab08b.
  • Verify FWSS pricing output, such as getPriceList(), matches the intended release pricing and record the command/output in the Run Log Unchanged across the execute (see Pre-Live Validation).
  • Run and record a Calibnet smoke/E2E test result filecoin-pin smoke.
  • Validate Calibnet Data Set creation through filecoin-pin add with --network calibration and unique --data-set-metadata, then record the command output, metadata, Data Set ID, tx/link, SP, and timestamp in the Run Log Data sets 59204, 59205.
Calibnet filecoin-pin validation
RUN_ID="fwss-v1.7.0-calibnet-$(date -u +%Y%m%dT%H%M%SZ)"
printf "FWSS v1.7.0 Calibnet smoke %s\n" "$RUN_ID" > "/tmp/$RUN_ID.txt"

filecoin-pin add "/tmp/$RUN_ID.txt" \
  --network calibration \
  --data-set-metadata fwss_release=v1.7.0 \
  --data-set-metadata smoke_run="$RUN_ID"

The unique smoke_run metadata is required so this validates new Data Set creation rather than reusing an existing Data Set.

Fund the wallet first. Each new Data Set needs the 30-day data-set fee lockup plus the lifecycle reserve available in Filecoin Pay (0.62 USDFC at v1.5.0 pricing; see getPriceList()), so two copies need about 1.3 USDFC. filecoin-pin also refuses to start below 0.1 FIL. Its own "required" estimate (filecoin-pin 2.2.1) leaves out the per-Data-Set lockup, and an underfunded copy fails with InsufficientLockupFunds.

  • Verify the proxy on Blockscout
  • Update the GitHub pre-release Calibnet rollout status with execute tx, checks, and smoke/E2E evidence
  • Technical owner confirms Calibnet results are good before announcing Mainnet
Phase 4: Mainnet Announce + Execute

Announce

  • Technical owner records Mainnet go/no-go after reviewing Calibnet evidence, rollback status, dependency targets, and cross-repo status
  • Confirm required cross-repo changes are merged/released or explicitly waived by the technical owner The only pre-Mainnet dependency, pdp v3.6.0, is tagged.
  • Create or update the public operational notice on status.filecoin.cloud for Mainnet before or alongside stakeholder notification. Identify the network and scheduled date/window, link the GitHub pre-release, and keep the maintenance window open through expected post-upgrade validation. Follow the Operational Event Communications Runbook.
  • Notify stakeholders before announcing Mainnet, including FilB so they can propagate the upgrade notice
  • If this release has a ServiceProviderRegistry exception, generate its Mainnet announcement with NEW_SERVICE_PROVIDER_REGISTRY_IMPLEMENTATION_ADDRESS="$MAIN_NEW_SPR_IMPL" UPGRADE_DELAY_EPOCHS=<delay> CALLDATA_ONLY=true ./tools/service-provider-registry-announce-upgrade.sh, execute it through the owner Safe, then verify and record the exact implementation and observed afterEpoch returned by nextUpgrade() before any execute transaction. Done through the reviewed packet (review packet): announceUpgradePlan, then upgradeToAndCall(impl, migrate("1.3.0")).
  • Set the Mainnet requested delay and update the schedule table
  • Run Procedure A2 or Procedure B2 in the Mainnet environment Announces.
  • Record the Mainnet announce tx and observed afterEpoch in the schedule and Run Log
  • Update the GitHub pre-release Mainnet rollout status with the announce tx and observed afterEpoch

Review during the delay

  • Run Procedure A3 or Procedure B3 in the Mainnet environment, by someone other than the announcing operator

Execute

  • Wait for the observed Mainnet afterEpoch
  • If this release has a ServiceProviderRegistry exception, generate its Mainnet execution with NEW_SERVICE_PROVIDER_REGISTRY_IMPLEMENTATION_ADDRESS="$MAIN_NEW_SPR_IMPL" NEW_VERSION=<version> CALLDATA_ONLY=true ./tools/service-provider-registry-execute-upgrade.sh, execute it in the approved transaction order, then verify and record its implementation slot, VERSION(), initializer counter, preserved registry state, and cleared nextUpgrade() Done through the reviewed packet (review packet): announceUpgradePlan, then upgradeToAndCall(impl, migrate("1.3.0")).
  • Run Procedure A4 or Procedure B4 in the Mainnet environment Executes, in order.
  • Record the Mainnet execute tx link in the Run Log
  • For Path A, run Procedure A5 in the Mainnet environment N/A: Path B.
  • Run Post-Upgrade Checks in the Mainnet environment, then josuke accept and commit josuke.json; record the commit in the Run Log 30/30; josuke accept e321944.
  • Verify FWSS pricing output, such as getPriceList(), matches the intended release pricing and record the command/output in the Run Log Unchanged across the execute (see Pre-Live Validation).
  • Run and record a Mainnet smoke/E2E test result filecoin-pin smoke.
  • Validate Mainnet Data Set creation through filecoin-pin add with --network mainnet and unique --data-set-metadata, then record the command output, metadata, Data Set ID, tx/link, SP, and timestamp in the Run Log Data sets 2018, 2019.
Mainnet filecoin-pin validation
RUN_ID="fwss-v1.7.0-mainnet-$(date -u +%Y%m%dT%H%M%SZ)"
printf "FWSS v1.7.0 Mainnet smoke %s\n" "$RUN_ID" > "/tmp/$RUN_ID.txt"

filecoin-pin add "/tmp/$RUN_ID.txt" \
  --network mainnet \
  --data-set-metadata fwss_release=v1.7.0 \
  --data-set-metadata smoke_run="$RUN_ID"

The unique smoke_run metadata is required so this validates new Data Set creation rather than reusing an existing Data Set.

Fund the wallet first. Each new Data Set needs the 30-day data-set fee lockup plus the lifecycle reserve available in Filecoin Pay (0.62 USDFC at v1.5.0 pricing; see getPriceList()), so two copies need about 1.3 USDFC. filecoin-pin also refuses to start below 0.1 FIL. Its own "required" estimate (filecoin-pin 2.2.1) leaves out the per-Data-Set lockup, and an underfunded copy fails with InsufficientLockupFunds.

  • Verify the proxy on Blockscout
  • Update the GitHub pre-release Mainnet rollout status with execute tx, checks, and smoke/E2E evidence
Phase 5: Promote Release and Close Out
  • Confirm live Calibnet and Mainnet proxies point at the dispatcher, slot 19 is cleared, and josuke accept has been committed for both
  • Run josuke audit against each network and record the result. On an RPC without historical state, such as Glif, pass --from-block with a block before the execute Clean on both networks.
  • Resolve or complete every public operational notice after the corresponding rollout and post-upgrade validation succeed. Publish a final status update and record each notice link and final state in Release Tracking.
  • Confirm cross-repo follow-ups are complete or tracked with owners Synapse (FilOzone/synapse-sdk#1167, then synapse-core) @Kubuxu; Curio wallet rotation (filecoin-project/curio#1672) @snadrus; filecoin-cloud after Synapse.
  • Merge the josuke.json / deployments.json PR(s) to main after live-state verification, and record the PR link(s) in Release Tracking
  • Verify service_contracts/deployments.json bytecode metadata matches the live deployed contracts verify-deployments.sh on #685's head (7ec283b): "All contracts verified OK" on both chains; the new registry and PDPVerifier implementations now verify rather than being pinned.
Deployment bytecode metadata verification commands
cd service_contracts

ETH_RPC_URL="https://api.calibration.node.glif.io/rpc/v1" ./tools/verify-deployments.sh --chain 314159
ETH_RPC_URL="https://api.node.glif.io/rpc/v1" ./tools/verify-deployments.sh --chain 314
  • Merge release-prep PR(s) if still open, keeping mutable rollout details on the GitHub Release page #680, #682.
  • Promote the GitHub Release from pre-release to latest after the Mainnet upgrade, checks, and release-page status are complete Promoted 1 Dec.
  • Publish or update required ABIs: run make -C service_contracts update-abi for checked-in service_contracts/abi updates, compare against josuke abi "$FWSS_PROXY_ADDRESS" for the live routed ABI, and confirm the Synapse SDK workflow regenerated downstream ABI/types check-abi green on 121d4ce; Synapse ABI regenerated in FilOzone/synapse-sdk#1167.
ABI update commands
make -C service_contracts update-abi
git status --short service_contracts/abi
  • Run the Update Synapse SDK workflow manually with the release tag and the approved source ref/SHA after the intended deployment address state is available, or record an exception/owner in Release Tracking. This Phase 5 run is the final address-state update and should not be skipped because the Phase 1 ABI/type signal already ran. FilOzone/synapse-sdk#1167.
  • Merge auto-generated PRs in filecoin-cloud
  • Confirm Synapse PR/release is merged or owned Owned by @Kubuxu.
  • Capture lessons learned from this rollout and update service_contracts/tools/UPGRADE-CHECKLIST.md if the process should change
  • Add release link to this issue v1.7.0
  • Close this issue

Procedures

Every procedure runs in one network environment from Network Constants. Commands that only read chain state are safe to rerun at any time; rerun them whenever in doubt.

Read the Pending Plan

Both paths store the pending plan in slot 19 of the proxy: the target address in the low 160 bits and afterEpoch in the high 96 bits. Read it from raw storage so the result does not depend on any view contract or route.

read_plan() {
  local word
  word=$(cast storage --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" 19)
  PLANNED_TARGET=$(cast to-check-sum-address "0x${word:26:40}")
  PLANNED_AFTER_EPOCH=$(cast to-dec "0x${word:2:24}")
  echo "Pending target: $PLANNED_TARGET, afterEpoch: $PLANNED_AFTER_EPOCH"
}
read_plan
Reproduce and Decode Safe Calldata

Before signing, every signer runs the generating command for the step, then decodes the result and compares it with the Safe UI:

export SAFE_DATA="0x..." # paste the data field shown in the Safe UI
[ "$SAFE_DATA" = "$CALLDATA" ] && echo "MATCH" || echo "MISMATCH: do not sign"
cast 4byte-calldata "$SAFE_DATA"

Also confirm in the Safe UI that the target is $FWSS_PROXY_ADDRESS, the value is 0, and the operation is a call, not a delegatecall.

Procedure A: One-Time Dispatcher Transition

Prerequisite: Choose the Upgrade Path reports Path A for this network. Run make erc8167 once to build the dispatcher artifact.

A1: Deploy

josuke deploy and josuke verify rehearse the migration against the code at the address josuke.json lists. The proxy still runs the monolith, so until the transition the ledger lists the proxy under the dispatcher instead. The transition scripts find the migration under either address.

forge script script/FWSSDispatcherDeploy.s.sol \
  --rpc-url "$ETH_RPC_URL" --keystore "$ETH_KEYSTORE" --password-file "$ETH_PASSWORD" --broadcast --skip-simulation
export DISPATCHER=$(jq -r ".\"$CHAIN\".FWSS_DISPATCHER_ADDRESS" deployments.json)
(source tools/josuke.sh; josuke_move_entry "$FWSS_PROXY_ADDRESS" "$DISPATCHER")

josuke deploy    # deploys changed modules and the migration, records them under `proposed`
josuke verify    # rebuilds every facet from its recorded commit and checks it against the chain

GIT_COMMIT=$(git rev-parse HEAD) forge script script/FWSSDispatcherTransitionDeploy.s.sol \
  --rpc-url "$ETH_RPC_URL" --keystore "$ETH_KEYSTORE" --password-file "$ETH_PASSWORD" \
  --broadcast --skip-simulation --verify   # verifies on Sourcify, forge's default verifier

Keep --skip-simulation on every forge script --broadcast. Without it forge sets each gas limit from its local EVM simulation, and FEVM gas is not EVM gas: Lotus rejects the two deploys ('GasLimit' field cannot be less than the cost of storing a message on chain), and a broadcast execute mines and reverts out of gas. With it, forge asks the node to estimate gas.

FWSSDispatcherDeploy deploys the dispatcher, or reuses the recorded one after checking its code hash, and records it in deployments.json. The transition deploy script reads the proxy and the dispatcher from deployments.json, the proposed migration from josuke.json, and the proxy's current implementation as the rollback target. It deploys FWSSDispatcherTransition and records it in deployments.json. See tools/README.md for its full behavior and broadcast caveats.

  • Check the deployed transition against source. The transition's getters cannot prove what its code does, and it runs in the proxy's storage, so its runtime bytecode must match the frozen tag's build:
./tools/verify-deployments.sh --chain "$CHAIN" --eth-call
  • Record the transition as the announced target (TRANSITION) and the dispatcher in the Run Log
  • Commit josuke.json and deployments.json to the Phase 2 PR
A2: Announce

Announce the transition through the monolith's announceUpgradePlan:

export DISPATCHER=$(jq -r ".\"$CHAIN\".FWSS_DISPATCHER_ADDRESS" deployments.json)
export TRANSITION=$(jq -r ".\"$CHAIN\".FWSS_DISPATCHER_TRANSITION_ADDRESS" deployments.json)
export NEW_FWSS_IMPLEMENTATION_ADDRESS="$TRANSITION"
export UPGRADE_DELAY_EPOCHS=2880 # per Notice Guidance

CALLDATA_ONLY=true ./tools/warm-storage-announce-upgrade.sh
CALLDATA=$(cast calldata 'announceUpgradePlan(address,uint96)' "$TRANSITION" "$UPGRADE_DELAY_EPOCHS")
  • Every signer reproduces and decodes $CALLDATA and checks the transition's pins before signing
  • After the Safe transaction executes, read the pending plan and confirm PLANNED_TARGET equals $TRANSITION and PLANNED_AFTER_EPOCH equals the announce block plus the requested delay (a delay of 0 becomes 1).
A3: Review During the Delay

Someone other than the announcing operator runs these checks, preferably more than once before afterEpoch:

  • Read the pending plan: the target is still $TRANSITION and nobody announced anything else
  • Check the transition's pins
  • From the frozen tag's build, ./tools/verify-deployments.sh --chain "$CHAIN" --eth-call passes: the transition's code is the source's, so its getters report its real pins
  • josuke verify passes against the committed josuke.json

The execute script repeats the plan and pin checks, but it checks readiness first, so it only reaches the pins after afterEpoch; A4 runs it. It does not run verify-deployments.sh or josuke verify.

Check the Transition's Pins

The transition is immutable, so its pins decide what the upgrade can do. Each value must match the expectation printed beside it:

PINNED_MIGRATION=$(cast call --rpc-url "$ETH_RPC_URL" "$TRANSITION" 'migration()(address)')
PINNED_DISPATCHER=$(cast call --rpc-url "$ETH_RPC_URL" "$TRANSITION" 'dispatcher()(address)')
PINNED_DISPATCHER_CODEHASH=$(grep -o '0x[0-9a-f]\{64\}' <<< "$(grep 'FWSS_DISPATCHER_CODE_HASH =' src/FWSSDispatcherTransition.sol)")
echo "previousImplementation: $(cast call --rpc-url "$ETH_RPC_URL" "$TRANSITION" 'previousImplementation()(address)') (expected $(cast implementation --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS"))"
echo "migration:              $PINNED_MIGRATION (expected $(source tools/josuke.sh; josuke_proposed_migration "$DISPATCHER"))"
echo "dispatcher:             $PINNED_DISPATCHER (expected $DISPATCHER)"
echo "migrationCodeHash:      $(cast call --rpc-url "$ETH_RPC_URL" "$TRANSITION" 'migrationCodeHash()(bytes32)') (expected $(cast keccak "$(cast code --rpc-url "$ETH_RPC_URL" "$PINNED_MIGRATION")"))"
echo "dispatcher code hash:   $(cast keccak "$(cast code --rpc-url "$ETH_RPC_URL" "$PINNED_DISPATCHER")") (expected $PINNED_DISPATCHER_CODEHASH)"
A4: Execute
export FWSS_DISPATCHER_TRANSITION_ADDRESS="$TRANSITION"
CALLDATA_ONLY=true forge script script/FWSSDispatcherTransitionExecute.s.sol --rpc-url "$ETH_RPC_URL"

With CALLDATA_ONLY=true the script checks that the plan is the transition and ready, that the transition pins the migration josuke.json proposes and that migration's unchanged code, the proxy's current implementation as the rollback target, and the pinned dispatcher. It then simulates the upgrade as the proxy owner and prints the Safe transaction: upgradeToAndCall(transition, migrate(migration)) on the proxy. That one call points the proxy at the dispatcher and runs the migration; if any part reverts, nothing changes.

The upgrade call used about 1.36B gas on Calibnet and 1.64B on Mainnet (v1.5.0, 73 routes). Leave the gas limit to the Safe's estimate; a signer must not cap it.

An EOA owner broadcasts the same call instead: replace CALLDATA_ONLY=true with --keystore "$ETH_KEYSTORE" --password-file "$ETH_PASSWORD" --broadcast --skip-simulation.

  • Every signer reproduces and decodes the printed calldata, and decodes the inner migrate(address) call to confirm it names the pinned migration:
export CALLDATA="0x..." # the calldata the script printed
cast calldata-decode 'upgradeToAndCall(address,bytes)' "$CALLDATA" # first line must be $TRANSITION
INNER=$(cast calldata-decode 'upgradeToAndCall(address,bytes)' "$CALLDATA" | sed -n 2p)
cast calldata-decode 'migrate(address)' "$INNER"
  • Never sign upgradeToAndCall(transition, 0x) with empty data. It installs the transition without migrating, and only abortTransition() or a separate migrate(migration) call on the proxy recovers from that state.
A5: List the Proxy in the Ledger Again

After the execute transaction, the proxy holds the routes the migration wrote, and josuke accept reads them from the address josuke.json lists:

(source tools/josuke.sh; josuke_move_entry "$DISPATCHER" "$FWSS_PROXY_ADDRESS")
  • Commit the moved entry with the josuke accept result in the Post-Upgrade Checks
Procedure B: Josuke Migration

Prerequisite: Choose the Upgrade Path reports Path B for this network. The legacy warm-storage-announce-upgrade.sh and announceUpgradePlan do not apply after the transition.

B1: Deploy
josuke deploy    # deploys changed modules and the migration, records them under `proposed`
josuke verify    # rebuilds every facet from its recorded commit and checks it, and that the migration installs exactly the proposed routes

export MIGRATION=$(source tools/josuke.sh; josuke_proposed_migration "$FWSS_PROXY_ADDRESS")
echo "Migration $MIGRATION"

Storage-terms introduction only: this feature upgrades an already-modular
deployment (Path B). Before recording or announcing the target, wrap the raw
Josuke migration so record zero is initialized in the same transaction as the
route installation:

export RAW_MIGRATION="$MIGRATION"
forge create src/FWSSStorageTermsMigration.sol:FWSSStorageTermsMigration \
  --rpc-url "$ETH_RPC_URL" --keystore "$ETH_KEYSTORE" --password-file "$ETH_PASSWORD" \
  --broadcast --constructor-args "$RAW_MIGRATION"
# Set MIGRATION to the wrapper's reported deployment address.
export MIGRATION="<deployed FWSSStorageTermsMigration address>"
cast call --rpc-url "$ETH_RPC_URL" "$MIGRATION" 'migration()(address)'
  • Confirm the wrapper's migration() equals RAW_MIGRATION.
  • From a clean checkout of the frozen deploy commit, with the reviewed,
    committed josuke.json, run the wrapper bytecode check. Record both migration
    addresses and code hashes it prints in the Run Log. josuke verify validates
    the raw route migration and facets, not this wrapper.
unset ETH_KEYSTORE ETH_PASSWORD
./tools/verify-storage-terms-wrapper.sh "$MIGRATION"

The wrapper's sole immutable is the raw migration address. The script fills it
from the reviewed ledger, not from the deployed code or its migration() getter,
then compares the complete runtime bytecode. It prints STOP and exits non-zero
for anything else, the raw migration included.

  • Use the wrapper as MIGRATION for B2–B4. Do not announce or execute the
    raw route migration for the introduction: existing modular migration code does
    not initialize storage terms.

The wrapper obtains USDFC from the installed configuration and initializes zero
only if unregistered. Later upgrades must not re-enable a disabled zero record.
Leave the raw proposal in josuke.json; josuke accept verifies the installed
routes after execution. Fresh modular deployments initialize zero directly.

  • Record MIGRATION as the announced target in the Run Log
  • Commit josuke.json to the Phase 2 PR
B2: Announce
export UPGRADE_DELAY_EPOCHS=2880 # per Notice Guidance
CALLDATA=$(cast calldata 'announceMigration(address,uint96)' "$MIGRATION" "$UPGRADE_DELAY_EPOCHS")
echo "Target: $FWSS_PROXY_ADDRESS"
echo "Data:   $CALLDATA"
  • Every signer reproduces and decodes $CALLDATA and confirms josuke verify passes before signing
  • After the Safe transaction executes, read the pending plan and confirm PLANNED_TARGET equals $MIGRATION and PLANNED_AFTER_EPOCH equals the announce block plus the requested delay (a delay of 0 becomes 1)
B3: Review During the Delay

migrate on the dispatcher checks only the migration's address. josuke verify confirms the raw migration and facets; the storage-terms wrapper requires the additional B1 bytecode check. Someone other than the announcing operator performs these checks, preferably more than once before afterEpoch:

  • Read the pending plan: the target is still $MIGRATION and nobody announced anything else
  • josuke verify passes against the committed josuke.json
  • For the storage-terms introduction, run ./tools/verify-storage-terms-wrapper.sh "$PLANNED_TARGET" from the independent reviewer's frozen checkout against the target read from the pending plan. Record the reviewer and output in the Run Log; stop on any failure.
  • The proxy still points at the dispatcher (rerun Choose the Upgrade Path)
B4: Execute
read_plan
[ "$PLANNED_TARGET" = "$(cast to-check-sum-address "$MIGRATION")" ] || echo "STOP: the pending plan is not the reviewed migration"
josuke verify || echo "STOP: josuke verify failed"
# Storage-terms introduction only: the target must be the reviewed wrapper, never the raw migration
./tools/verify-storage-terms-wrapper.sh "$PLANNED_TARGET" || echo "STOP: the pending plan is not the reviewed storage-terms wrapper"

CALLDATA=$(cast calldata 'migrate(address)' "$MIGRATION")
OWNER=$(cast call --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" 'owner()(address)')
cast call --rpc-url "$ETH_RPC_URL" --from "$OWNER" "$FWSS_PROXY_ADDRESS" "$CALLDATA" && echo "Simulation succeeded"
echo "Target: $FWSS_PROXY_ADDRESS"
echo "Data:   $CALLDATA"
  • Every signer reruns the STOP checks and the simulation, and reproduces and decodes $CALLDATA before signing
  • For the storage-terms introduction, every signer runs the wrapper check above from their own frozen checkout against the freshly read pending target. Stop on any failure; the target must match the independently reviewed wrapper address and code hash.
Post-Upgrade Checks

Run after either path's execute transaction, then run josuke accept, which checks on chain that every proposed selector routes to its facet and every dropped selector is cleared before it promotes proposed to current.

export EXPECTED_FWSS_VERSION="1.7.0"
export EXPECTED_OWNER="0x6386622B4915B027900d65560b0ab84F8a1ff2AA"

IMPL=$(cast implementation --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS")
IMPL_CODEHASH=$(cast keccak "$(cast code --rpc-url "$ETH_RPC_URL" "$IMPL")")
PINNED_DISPATCHER_CODEHASH=$(grep -o '0x[0-9a-f]\{64\}' <<< "$(grep 'FWSS_DISPATCHER_CODE_HASH =' src/FWSSDispatcherTransition.sol)")
echo "Implementation: $IMPL, code hash $IMPL_CODEHASH (expected $PINNED_DISPATCHER_CODEHASH)"

read_plan # expect the zero address and 0

echo "owner(): $(cast call --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" 'owner()(address)') (expected $EXPECTED_OWNER)"
echo "VERSION(): $(cast call --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" 'VERSION()(string)') (expected $EXPECTED_FWSS_VERSION)"

for sig in 'announceMigration(address,uint96)' 'migrate(address)' 'implementation(bytes4)' 'selectors()'; do
  echo "$sig -> $(cast call --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" 'implementation(bytes4)(address)' "$(cast sig "$sig")")"
done

josuke accept
# deployments.json keeps the previous fwss_version until the execute; record the live one now
jq --indent 2 --arg chain "$CHAIN" --arg v "$(cast call --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" 'VERSION()(string)' | tr -d '"')" \
  '.[$chain].metadata.fwss_version = $v' deployments.json > deployments.json.tmp && mv deployments.json.tmp deployments.json
git add josuke.json deployments.json && git commit -m "chore(josuke): accept the $CHAIN migration"

Every upgrade route must point at a deployed module; a zero address means FWSS can no longer be upgraded. Stop and escalate if any check differs from its expected value.

For the storage-terms introduction, additionally confirm:

cast call --rpc-url "$ETH_RPC_URL" "$FWSS_PROXY_ADDRESS" \
  'getStorageTerms(bytes32)((address,uint8,bytes32,uint96),bool)' \
  0x0000000000000000000000000000000000000000000000000000000000000000

The result must be the deployment's USDFC token, decimals 18, zero salt,
price 2500000000000000000, and enabled true. Confirm existing datasets
report zero through getDataSetV2, legacy getter arrays still decode correctly,
and a six-decimal registered currency completes creation, piece addition, and
termination with scaled fees.


Resources
Dominant language
Solidity
Stars
8
Forks
27
Avg merge
2d 5h
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FilOzone/filecoin-services

All issues in FilOzone/filecoin-services

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.