feat: Cleaner gasless implementation - #360
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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>
bmuddha
approved these changes
May 13, 2025
bmuddha
left a comment
Collaborator
There was a problem hiding this comment.
Looks quite neat, too neat to be true even, wonder why we haven't considered this approach before.
| 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" ] } |
Collaborator
There was a problem hiding this comment.
Would be nice to see the introduced changes to the SVM as well.
Collaborator
Author
There was a problem hiding this comment.
True. I should have committed the starting point of magicblock-svm, core changes are here:
taco-paco
approved these changes
May 14, 2025
Dodecahedr0x
approved these changes
May 16, 2025
<!-- 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 -->
GabrielePicco
added a commit
that referenced
this pull request
Jun 23, 2025
This reverts commit 84fd7b8.
GabrielePicco
added a commit
that referenced
this pull request
Jun 23, 2025
Reverts #360 <!-- greptile_comment --> ## Greptile Summary This PR reverts a gasless transaction implementation (#360), restoring traditional fee handling across the codebase. - Changed `LAMPORTS_PER_SIGNATURE` from 0 back to 5000 in `magicblock-bank/src/consts.rs`, re-enabling standard transaction fees - Restored payer account initialization with 1000 SOL in `configs/ephem-*.toml` files, requiring SOL for transaction fees again - Added validation in `magicblock-config/src/errors.rs` to prevent ambiguous account initialization (lamports vs SOL) - Reverted from custom magicblock-svm fork back to official solana-svm v2.2 in `Cargo.toml` - Modified bank and genesis config setup in `magicblock-bank/src/genesis_utils.rs` to restore fee-based transaction processing <!-- /greptile_comment -->
Merged
GabrielePicco
added a commit
that referenced
this pull request
Jun 23, 2025
See #360 <!-- greptile_comment --> ## Greptile Summary Major architectural changes to implement native gasless transaction support by removing automatic airdrops and modifying fee handling across the validator. - Modified `magicblock-bank/src/consts.rs` to set `DEFAULT_LAMPORTS_PER_SIGNATURE` to 0 and integrate with patched solana-svm for zero-fee transactions - Removed payer initialization and automatic airdrop functionality from configs and `magicblock-accounts/src/config.rs` - Updated genesis configuration in `magicblock-bank/src/genesis_utils.rs` to support configurable transaction fees - Modified `Cargo.toml` to use custom magicblock-labs/magicblock-svm fork at commit e93eb57 - Added support for executing transactions with non-existent fee payers in `magicblock-bank/tests/transaction_execute.rs` <!-- /greptile_comment --> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
thlorenz
added a commit
that referenced
this pull request
Jul 2, 2025
* master: release: v0.1.7 (#409) Feat: simpler gasless implementation (#406) perf: run ensure accounts concurrently feat: account hydration on background task (#407) Revert "feat: Cleaner gasless implementation" (#405) feat: Cleaner gasless implementation (#360) fix: cleanup slots on non-fresh ledger (#404) release: v0.1.5 (#403) fix: properly init geyser plugin for rpc and use valid dummy Library (#402) release: v0.1.4 (#401) fix: remove grpc plugin altogether from geyser manager (#400) Patch tests from failing on subscription due to rate limits (#386)
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.
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-svmdependency to use a patched version that allows signers without lamportstransaction_execute.rsto verify transactions with non-existent fee payers and zero feesNotes