-
Notifications
You must be signed in to change notification settings - Fork 14
Feat/gasless #406
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
Feat/gasless #406
Conversation
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
<!-- 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 -->
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.
27 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
assert_eq!( | ||
author_acc.lamports(), | ||
LAMPORTS_PER_SOL - 2 * LAMPORTS_PER_SIGNATURE | ||
LAMPORTS_PER_SOL - 2 * DEFAULT_LAMPORTS_PER_SIGNATURE | ||
); |
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.
style: Same account balance assertion being repeated - consider extracting this check into a helper function since it's used twice with identical logic
let fee_payer = Keypair::new(); | ||
let instruction = create_noop_instruction( | ||
&elfs::noop::id(), | ||
&[fee_payer.insecure_clone()], |
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.
logic: Use of insecure_clone() is dangerous for keypairs - prefer regular clone() unless there's a specific need for insecure cloning
* 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)
See #360
Greptile Summary
Major architectural changes to implement native gasless transaction support by removing automatic airdrops and modifying fee handling across the validator.
magicblock-bank/src/consts.rs
to setDEFAULT_LAMPORTS_PER_SIGNATURE
to 0 and integrate with patched solana-svm for zero-fee transactionsmagicblock-accounts/src/config.rs
magicblock-bank/src/genesis_utils.rs
to support configurable transaction feesCargo.toml
to use custom magicblock-labs/magicblock-svm fork at commit e93eb57magicblock-bank/tests/transaction_execute.rs