-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite neat, too neat to be true even, wonder why we haven't considered this approach before.
@@ -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", rev = "e93eb57", features = [ "dev-context-only-utils" ] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to see the introduced changes to the SVM as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I should have committed the starting point of magicblock-svm
, core changes are here:
<!-- greptile_comment --> ## Greptile Summary Removed free airdrop functionality and payer configurations across the MagicBlock validator, transitioning towards a gasless transaction model. - Removed `payer_init_lamports` field and related configurations from `configs/ephem-devnet.toml` and `configs/ephem-testnet.toml`, eliminating automatic account funding - Simplified fee payer account cloning in `magicblock-account-cloner/src/remote_account_cloner_worker.rs` by using standard `do_clone_undelegated_account` method for non-charging validators - Removed `Payer` struct and related functionality from `magicblock-config/src/accounts.rs`, including configuration validation and environment variable handling - Modified account initialization logic in `magicblock-api/src/magic_validator.rs` to support gasless transactions while maintaining validator identity and faucet account funding <!-- /greptile_comment -->
Summary
This PR simplifies the gasless setup by removing the automatic airdrop and introducing a native way to execute transactions without charging the payer.
solana-svm
dependency to use a patched version that allows signers without lamportstransaction_execute.rs
to verify transactions with non-existent fee payers and zero feesNotes