Skip to content

feat: Cleaner gasless implementation #360

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

GabrielePicco
Copy link
Contributor

@GabrielePicco GabrielePicco commented May 9, 2025

Greptile Summary

Implemented a gasless transaction handling mechanism in the magicblock-validator, focusing on fee payer account management and transaction processing.

  • Modified bank.rs to add unsafe_create_account_overrides function and inject temporary fee payer accounts with 100 lamports
  • Reduced initial payer SOL allocation from 1,000 to 1 in ephem-localnet.toml for testing gasless scenarios
  • Added test case in transaction_execute.rs to verify transactions with non-existent fee payers and zero fees
  • Changed solana-svm dependency to use custom Git repository for modified VM handling
  • Made create_noop_instruction public in transactions.rs for broader testing access

Note: The implementation uses unsafe code to modify private fields which should be reviewed carefully for memory safety.

Copy link
Contributor

@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.

5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -150,7 +150,7 @@ solana-rpc = "2.2"
solana-rpc-client = { version = "2.2" }
solana-rpc-client-api = { version = "2.2" }
solana-sdk = { version = "2.2" }
solana-svm = { version = "2.2", features = [ "dev-context-only-utils" ] }
solana-svm = { git = "https://github.com/magicblock-labs/magicblock-svm.git", features = [ "dev-context-only-utils" ] }
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Missing commit hash/revision for Git dependency. Add a rev = "..." field to ensure dependency stability.

Suggested change
solana-svm = { git = "https://github.com/magicblock-labs/magicblock-svm.git", features = [ "dev-context-only-utils" ] }
solana-svm = { git = "https://github.com/magicblock-labs/magicblock-svm.git", rev = "HEAD", features = [ "dev-context-only-utils" ] }

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.

1 participant