Skip to content

feat(node): session keys that sign ride transactions after one wallet approval - #28

Merged
MehranMazhar merged 1 commit into
mainfrom
claude/project-thread-y381bv
Oct 29, 2026
Merged

MehranMazhar merged 1 commit into
mainfrom
claude/project-thread-y381bv

Conversation

@MehranMazhar

Copy link
Copy Markdown
Member

Requested by Mehran · project thread

What

A new SessionKey transaction (RLP tag 11). The account signs it with its own key (a wallet). It names one key that may then sign that account's ride transactions until a block height. expires_at_block = 0 revokes.

Rules

  • The session key may sign only RideRequest, RideOffer, RideAcceptance, RidePay, RideCancel and RideRequestCancel. Transfer, Burn, WalletTransfer and SessionKey itself still need the account's own signature.
  • One session key per account; a new one replaces the old one.
  • Expiry is checked against the next block height, so every validator decides the same way.
  • Fee and nonce stay on the main account.

Consensus

A node without this code rejects blocks that carry tag 11. It is not gated by config because it has no effect until someone sends one, so validators can be upgraded one at a time first. No chain reset is needed.

Tests

tests/session_key.rs (authorize, ride accepted, Transfer and a second authorization refused, stranger refused, revoke, expiry). Full suite passes.


Generated by Claude Code

… approval

A new SessionKey transaction (RLP tag 11), signed by the account's own key, names one
key that may sign that account's ride transactions until a block height. 0 revokes.
Transfer, Burn, WalletTransfer and SessionKey itself still need the account's own signature.
Not gated by config: the type only has effect once someone sends it, so validators can be
upgraded one by one before the first use.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01U28SAUW9JYTN2EW1gWwsNG
@MehranMazhar MehranMazhar self-assigned this Oct 29, 2026
@MehranMazhar
MehranMazhar merged commit 9e82112 into main Oct 29, 2026
5 checks passed
@MehranMazhar
MehranMazhar deleted the claude/project-thread-y381bv branch October 29, 2026 17:33
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.

2 participants