Skip to content

feat: add filecoin-pin as CAR upload provider#51

Open
lidel wants to merge 1 commit intomainfrom
feat/native-filecoin-pin
Open

feat: add filecoin-pin as CAR upload provider#51
lidel wants to merge 1 commit intomainfrom
feat/native-filecoin-pin

Conversation

@lidel
Copy link
Copy Markdown
Contributor

@lidel lidel commented May 4, 2026

Wires filecoin-pin import into action.yml as a peer to IPFS Cluster, Kubo, and Filebase, so setting filecoin-wallet-key satisfies the at-least-one-provider gate.

New inputs:

  • filecoin-wallet-key: gates the entire upload step.
  • filecoin-network: defaults to mainnet; set calibnet for testing.
  • filecoin-min-runway-days, filecoin-max-balance: required when wallet key is set, no defaults. Both cap wallet spend per run; the right value depends on the caller's traffic and budget, so we force an explicit choice rather than picking one that could drain a wallet.
  • filecoin-pin-version: pinned to 0.20.1 (first release with --min-runway-days and --max-balance on --auto-fund).
  • should we add / expose anything else?

This is alternative to #49 (docs-only composition recipe). TBD which one is chosen -- cc @BigLep @rvagg @SgtPooki for visibility and feedback


Wires `filecoin-pin import` into action.yml as a peer to IPFS
Cluster, Kubo, and Filebase, so setting `filecoin-wallet-key`
satisfies the at-least-one-provider gate. Same root CID is
preserved (no repacking).

New inputs:

- `filecoin-wallet-key`: gates the entire upload step.
- `filecoin-network`: defaults to `mainnet`; set `calibnet` for
  testing.
- `filecoin-min-runway-days`, `filecoin-max-balance`: required
  when wallet key is set, no defaults. Both cap wallet spend per
  run; the right value depends on the caller's traffic and budget,
  so we force an explicit choice rather than picking one that
  could drain a wallet.
- `filecoin-pin-version`: pinned to `0.20.1` (first release with
  `--min-runway-days` and `--max-balance` on `--auto-fund`).

The step bakes in a fork-PR fence (same-repo events only), so a
non-maintainer PR author cannot trigger USDFC deposits.

action.yml top-level description drops the stale Storacha mention
and now lists the active providers. Storacha-specific code paths
are otherwise untouched and remain deprecated; full removal is a
separate concern.

Companion to #49 (docs-only
composition recipe). Both branches are intended to be shown to
upstream maintainers to choose between.
Comment thread action.yml
Comment on lines +328 to +330
# Block fork PRs from this wallet-spending step: same-repo events only,
# so non-maintainer authors cannot trigger USDFC deposits.
if: ${{ inputs.filecoin-wallet-key != '' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The step bakes in a fork-PR fence (same-repo events only), so a non-maintainer PR author cannot trigger USDFC deposits, but we dont have that limitation for other pin providers, so maybe not necessary?

@BigLep BigLep moved this to 🔎 Awaiting review in FOC May 5, 2026
@BigLep BigLep added this to FOC May 5, 2026
@BigLep BigLep moved this from 🔎 Awaiting review to ⌨️ In Progress in FOC May 5, 2026
Comment thread action.yml
# Capture output so we can dump it in the step summary even on failure
# (debugging insufficient USDFC, runway, provider issues, etc).
EXIT=0
npx -y filecoin-pin@${{ inputs.filecoin-pin-version }} import build.car \
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@SgtPooki i've seen in #50 you used node-version: '24.x' explicitly, was that necessary?

the default in ubuntu-latest image (currently ubuntu-24.04) ships Node.js 20.20.2 as the default node on PATH, do we need to install node 24 for filecoin-pin to work?

@lidel lidel marked this pull request as ready for review May 5, 2026 22:52
@BigLep BigLep moved this from ⌨️ In Progress to 🔎 Awaiting review in FOC May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add filecoin-pin support

2 participants