Repository navigation
Conversation
SessionKey.syncExpirations read through the session key's own client, so
viem sent the session key as `from` on the eth_call. Lotus rejects a call
from an address with no actor ("actor not found"), which is what a session
key that has never held FIL is, and getExpirations reads that error as
nothing granted. A freshly authorized key therefore reported every scope as
never granted, and Synapse refused it.
FilOzone#645 fixed this inside getExpirations; FilOzone#909 moved read clients to the
caller and dropped that, so the session key now builds an accountless read
client on its own transport for the sync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
filecoin-encryption-envelope
@filoz/keysmith
@filoz/synapse-core
@filoz/synapse-react
@filoz/synapse-sdk
commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A freshly authorized session key reads as never granted, so
Synapserefuses it, until the key has held FIL.Cause
SessionKey.syncExpirationscallsgetExpirationswith the session key's own client. viem sends a client's account asfromoneth_call.eth_callfrom an address with no actor:resolve address t410f…: actor not found. A new session key has never held FIL, so it has none.getExpirationstreatsactor not foundas "nothing granted" and returns zeros.#645 fixed this by stripping the account inside
getExpirations. #909 moved read clients to the caller ("drop obsolete account-stripping tests"), but the session key still passes its account client, so the bug came back. It's insynapse-core0.10.2 and currentmaster.Fix
syncExpirationsbuilds an accountless client on the session key's own transport (custom({ request }), as #645 did) and reads through it. The actions keep #909's contract: callers pass the client they want.Testing
authorization-expiry.test.ts:syncExpirationssends noeth_callwith afrom. It fails without the fix.pnpm turbo build lintandsynapse-core'stest:node(1181 tests) pass.syncExpirationsgives0for every permission, and filecoin-pinaddfails with "never granted";CreateDataSetandAddPieces;eth_calltoauthorizationExpiryanswers with nofromand withfromset to the owner, and givesactor not foundwithfromset to the session key.🤖 Generated with Claude Code