Conversation
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.
Section 15 claimed there is no cheap per-position cancel without a configuration update. That is wrong. The wallet is the Permit2 owner, so it can call
invalidateUnorderedNonces(wordPos, mask)on its own tape words in a normal transaction.permit2NonceWord(policyRoot, nonceIndex)gives the word and the low byte of the index gives the bit, so a payer can kill a signed-but-unsettled payment or pre-burn a range of future positions to pause a policy, without touching the sapient leaf. Removing the leaf is still the only permanent revocation. Section 15 now documents the derivation and the pause-versus-revoke distinction, and also states that the signer readsblock.timestampand so cannot be validated inside ERC-4337validateUserOp, which only constrains the approval setup path.Section 13 gained the point that the stateless exposure formula is per Permit2 owner rather than per policy root. The tape word base commits to the signer and the policy root but not the wallet, so a parent wallet nesting the same leaf becomes a second Permit2 owner with an untouched tape, and the bound multiplies by the number of reachable owners. Nesting has to be signed for explicitly. A new section 16 covers deployment: the two constructor addresses, the canonical values, and the
cast callchecks forWITNESS_TYPE_STRING()andPERMIT2()on the target chain. The witness typestring is a compile-time constant and the x402 exact-EVM scheme has already changed that struct once, so a proxy that disagrees makes every payment revert withInvalidDigest. It also notes that the signer address feedspermit2NonceWordBase, so per-chain constructor differences mean per-chain tapes.script/Deploy.s.soldid not deployX402SessionSapientSignerat all; it now does, readingPERMIT2andX402_PERMIT2_PROXYfrom the environment with the canonical addresses as defaults, and both are added to.env.sample. Verified withforge buildandforge fmt --checkon the script, plusforge testontest/extensions/x402/X402SessionSapientSigner.t.solas a smoke check: 47 passed, 0 failed. The contract itself is unchanged, so no new tests. An actual deployment still needs the per-chain proxy verification described in section 16.