Skip to content
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

Allow Self-Conflicting Entries in execution #1025

Open
Huzaifa696 opened this issue Apr 24, 2024 · 5 comments
Open

Allow Self-Conflicting Entries in execution #1025

Huzaifa696 opened this issue Apr 24, 2024 · 5 comments

Comments

@Huzaifa696
Copy link

Huzaifa696 commented Apr 24, 2024

Description

This issue is to keep track of the progress of SIMD#83. The changes as discussed on discord include:

  1. Updating transaction execution to handle conflicting transactions within an entry.
  2. Add feature-gate to allow conflicting txs in batch on replay-side - Adjustments to scheduler
  3. Support feature-gate in block-production method to generate entries with self-conflicting transactions (not strictly required for SIMD feature to be activated)

@apfitzge , should this be split over separate PRs? We can start with point 1 and follow up with you for review. In the meanwhile, can you create the feature-gate for 2?

References:
Issue: solana-labs#33899
Old PR: solana-labs#34104

@apfitzge apfitzge changed the title Allow Self-Conflicting Entries in execution (Enables bankless leader and flexible txn scheduling) Allow Self-Conflicting Entries in execution Apr 24, 2024
@apfitzge
Copy link

@Huzaifa696, yes this should ideally be split across a few PRs. The above 3 points seem reasonable ways to split up the PRs.

I updated this issue title, since this will not enable bankless leader yet.
I will create a feature issue for the SIMD using this pubkey: ENTRYnPAoT5Swwx73YDGzMp3XnNH1kxacyvLosRHza1i

@Huzaifa696
Copy link
Author

For reference, the first two points will be divided into the following three PRs.

  1. SVM changes to allow conflicting entries
  2. Allow conflicting entries in the account locking function
  3. Replay changes to allow self-conflicting entries

And the unit tests for the first two PRs will be as follows:
Cases 1:

  1. no conflicts (easy - just basic sanity check)
  2. 2 transfers with same fee-payer (valid in both)
  3. 2 transfers with same fee-payer (only enough to pay first fee)
  4. 2 transfers with same fee-payer (cannot pay 2nd fee because of first transfer)
  5. 2 duplicate transactions
  6. 2 nonced txs using same nonce

Cases 2:

  1. no conflicting locks
  2. batch write-write conflict. no outstanding conflicting lock
  3. batch write-read conflict. no outstanding conflicting lock
  4. batch write-write conflict. outstanding (read/write lock)
  5. batch write-read conflict. outstanding (read/write lock)

@Huzaifa696
Copy link
Author

Huzaifa696 commented Jun 6, 2024

Just pushed the first two PRs regarding the SVM changes [link] and the account locking changes [link] to allow self-conflicting entries. While these are being reviewed, we try to finalize the third PR.

@talalim
Copy link

talalim commented Jun 15, 2024

Suggested changes for both PR1,2 incorporated for review.

@Huzaifa696
Copy link
Author

Initial implementation of PR3 (regarding replay side to allow self conflicting entries) code changes is done.
Implementation of its benches and unit tests is WIP.

@apfitzge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants