Skip to content

✨ Session keys #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Feb 9, 2025
Merged

✨ Session keys #126

merged 31 commits into from
Feb 9, 2025

Conversation

notdanilo
Copy link
Contributor

@notdanilo notdanilo commented Jan 17, 2025

Status Type ⚠️ Core Change Issue
Hold Feature Yes #40

Problem

Add build-in support for session keys, so that systems execution can be delegated.

Solution

A built-in feature in Bolt, so that all systems can be delegated

Greptile Summary

This PR adds built-in session key support to the Bolt framework, enabling delegated execution of systems through a new GPL Session protocol integration.

  • Added session-keys dependency and GPL Session protocol implementation in crates/bolt-lang/Cargo.toml and clients/bolt-sdk/src/generated/idl/gpl_session.json
  • Modified World program to support optional session tokens in system execution via sessionToken field in Apply struct
  • Added new session key management functions like FindSessionTokenPda and CreateSession in clients/bolt-sdk/src/index.ts
  • Implemented comprehensive test coverage for session keys across low-level and intermediate-level APIs in new test files
  • Potential concern: Using two versions of Anchor dependencies (@coral-xyz/anchor 0.30.1 and @project-serum/anchor 0.26.0) could cause conflicts

💡 (4/5) You can add custom instructions or style guidelines for the bot here!

@notdanilo notdanilo force-pushed the feature/session-keys branch 3 times, most recently from f3c469c to 2c71613 Compare January 24, 2025 15:19
@notdanilo notdanilo force-pushed the feature/session-keys branch 3 times, most recently from 54b1f7d to 8ad8603 Compare January 31, 2025 19:37
@notdanilo notdanilo force-pushed the feature/session-keys branch from 8ad8603 to d9ca41a Compare February 1, 2025 22:23
@notdanilo notdanilo marked this pull request as ready for review February 3, 2025 13:58
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

38 file(s) reviewed, 60 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +91 to +94
"name": "valid_until",
"type": {
"option": "i64"
}
Copy link

Choose a reason for hiding this comment

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

logic: valid_until is optional but no default expiration is enforced. This could lead to indefinite sessions if not properly handled in the implementation.

@notdanilo notdanilo force-pushed the feature/session-keys branch 2 times, most recently from a5d5a40 to 3928e4b Compare February 4, 2025 02:39
Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

Left a few questions in the review, but LGTM in general. Thanks @notdanilo

@notdanilo notdanilo merged commit 66b40af into main Feb 9, 2025
5 checks passed
@notdanilo notdanilo mentioned this pull request Feb 12, 2025
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