Skip to content

feat(server): Session Keys#376

Open
wjmelements wants to merge 12 commits intomasterfrom
session-key-server
Open

feat(server): Session Keys#376
wjmelements wants to merge 12 commits intomasterfrom
session-key-server

Conversation

@wjmelements
Copy link
Copy Markdown
Contributor

@wjmelements wjmelements commented Mar 24, 2026

Reviewer @SgtPooki

Changes

  • config: session key flags
  • use viem types Address, Hash, Hex

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wjmelements wjmelements requested a review from SgtPooki March 24, 2026 22:37
@FilOzzy FilOzzy added team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board. labels Mar 24, 2026
@FilOzzy FilOzzy added this to FOC Mar 24, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Mar 24, 2026
@wjmelements
Copy link
Copy Markdown
Contributor Author

(I've only tested this in conjunction with #375)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds session-key based authentication support to the pinning server startup flow, extending configuration and CLI flags so the server can be run without a full private key when a session key is available.

Changes:

  • Add WALLET_ADDRESS / SESSION_KEY (and VIEW_ADDRESS) to the app Config and createConfig() env parsing.
  • Update pinning server Synapse initialization to accept either private-key auth or session-key auth.
  • Extend the server CLI command and startup error messaging to reflect the new auth options.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/server.ts Updates startup error messaging to guide users toward private-key or session-key auth.
src/filecoin-pinning-server.ts Adds auth selection logic (buildSynapseConfig) and switches Synapse initialization to the new union config.
src/core/synapse/index.ts Extends the shared Config interface with session-key and view-address fields.
src/config.ts Reads new auth-related environment variables into config.
src/commands/server.ts Adds --wallet-address and --session-key flags and maps them into env vars before starting the daemon.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

wjmelements and others added 4 commits March 25, 2026 14:53
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Mar 27, 2026
@SgtPooki
Copy link
Copy Markdown
Collaborator

sorry i didn't get to this. heading on vacation so i wont be able to look until 2026 APR 8+

@silent-cipher can you take over?

Copy link
Copy Markdown

@silent-cipher silent-cipher left a comment

Choose a reason for hiding this comment

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

Overall, this looks good to me.

It would be great to add a few more test cases for the Filecoin pin server:

  • sessionKey without walletAddress/ walletAddress without sessionKey
  • Invalid format for walletAddress or sessionKey

@rjan90 rjan90 added this to the M4.2: mainnet GA milestone Mar 30, 2026
Copy link
Copy Markdown
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

lgtm but viewAddress / VIEW_ADDRESS isn't needed in here as far as I can tell, it's dead code in src/config.ts or src/core/synapse/index.ts as we don't use it for the pinning server and the CLI doesn't use createConfig() and has its own path to consume --view-address. Probably also best to not add it to the README. I don't think we have a good use for it in the CLI now anyway because we now use viem chains to do the config of addresses.

@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to ⌨️ In Progress in FOC Mar 30, 2026
@wjmelements wjmelements requested a review from rvagg April 1, 2026 22:24
@wjmelements wjmelements requested a review from rvagg April 3, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants