Skip to content

feat: charge escrow if present - #3

Merged
GabrielePicco merged 22 commits into
mainfrom
feat/add-charge-escrow
Sep 9, 2025
Merged

GabrielePicco merged 22 commits into
mainfrom
feat/add-charge-escrow

Conversation

@GabrielePicco

@GabrielePicco GabrielePicco commented Aug 26, 2025 •

Copy link
Copy Markdown
Contributor

Ephemeral Escrow Fee Payer Support

  • Added the ephemeral_balance_pda_from_payer function in the new escrow module to derive an ephemeral escrow account for a given payer, and integrated it into transaction fee validation so that if the main fee payer account does not exist, the system will attempt to charge fees from the escrow account instead (src/escrow.rs, src/transaction_processor.rs). [1] [2] [3]

CI and Dependency Updates

  • Added a GitHub Actions workflow for running Rust tests, and updated Cargo.toml with new dependencies required for escrow and reserved account key support (.github/workflows/cargo-test.yml, Cargo.toml). [1] [2] [3] [4]

@GabrielePicco
GabrielePicco force-pushed the feat/add-charge-escrow branch from cc2cb87 to 845a6fe Compare August 28, 2025 08:52
@GabrielePicco
GabrielePicco requested a review from bmuddha August 28, 2025 10:45
Comment thread src/transaction_processor.rs Outdated
Comment thread src/transaction_processor.rs Outdated
@bmuddha
bmuddha self-requested a review August 29, 2025 14:26

@bmuddha bmuddha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

have a few concerns, and a potentially an escrow account dissociation bug.

@GabrielePicco

Copy link
Copy Markdown
Contributor Author

have a few concerns, and a potentially an escrow account dissociation bug.

Verified correct behaviour with integration test: https://github.com/magicblock-labs/magicblock-validator/pull/528/files#diff-eee5d643b14736cae0b44b1bbf83a985a87987b65fcbd1f02a57cd4d3617a52eR15 (which can be merged once the new cloning pipeline is integrated)

@bmuddha bmuddha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM overall, with a few minor nits, I need to test the interaction with the accountsdb, that correct feepayer is charged and persisted. And it should be good to merge.

Comment thread src/account_loader.rs
Comment thread src/transaction_processor.rs Outdated
Comment thread src/transaction_processor.rs Outdated
Comment thread src/transaction_processor.rs
GabrielePicco and others added 3 commits September 8, 2025 10:54
Co-authored-by: Babur Makhmudov <31780624+bmuddha@users.noreply.github.com>
@GabrielePicco

Copy link
Copy Markdown
Contributor Author

LGTM overall, with a few minor nits, I need to test the interaction with the accountsdb, that correct feepayer is charged and persisted. And it should be good to merge.

Thanks @bmuddha, applied suggested nits

@bmuddha bmuddha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, higher level integration tests are green

@GabrielePicco
GabrielePicco merged commit 38b42a6 into main Sep 9, 2025
1 check passed
@GabrielePicco
GabrielePicco deleted the feat/add-charge-escrow branch September 9, 2025 10:20
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