-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Demote write locks on transaction program ids #19593
Demote write locks on transaction program ids #19593
Conversation
@taozhu-chicago would you mind sanity checking the banking_stage to cost_model changes? |
Be nice to also demote write locks by default in tx/message/instruction construction |
Good idea, I'll add that, once we decide on this approach or #19601 |
1aa7c1c
to
3ec46d7
Compare
the changes on banking_stage/cost_model path look good to me. |
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.
It does take a lot of plumbing to get to banking_stage, maybe there is another way cost_model can check for TX's write locks without diving deep into is_writable()
call?
3ec46d7
to
90655d9
Compare
Codecov Report
@@ Coverage Diff @@
## master #19593 +/- ##
=========================================
- Coverage 82.7% 82.5% -0.2%
=========================================
Files 461 468 +7
Lines 131215 131820 +605
=========================================
+ Hits 108519 108772 +253
- Misses 22696 23048 +352 |
96445ed
to
68e989d
Compare
Not a bad idea @taozhu-chicago , but no worries for this pr. We need the changes in |
I tried this out here: CriesofCarrots@19ee2de |
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 good to me, just a few nits
Pull request has been modified.
Feature_set conflicts make me sad |
c4c3879
to
ce89201
Compare
😱 New commits were pushed while the automerge label was present. |
Pull request has been modified.
* Add feature * Demote write lock on program ids * Fixup bpf tests * Update MappedMessage::is_writable * Comma nit * Review comments (cherry picked from commit decec3c) # Conflicts: # cli-output/src/display.rs # core/src/banking_stage.rs # core/src/cost_model.rs # core/src/cost_tracker.rs # core/src/transaction_status_service.rs # ledger-tool/src/main.rs # program-runtime/src/instruction_processor.rs # program-test/src/lib.rs # programs/bpf/tests/programs.rs # programs/bpf_loader/src/syscalls.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message.rs # sdk/program/src/message/mapped.rs # sdk/program/src/message/sanitized.rs # sdk/src/feature_set.rs # sdk/src/transaction/sanitized.rs # transaction-status/src/parse_accounts.rs
* Add feature * Demote write lock on program ids * Fixup bpf tests * Update MappedMessage::is_writable * Comma nit * Review comments (cherry picked from commit decec3c) # Conflicts: # core/src/banking_stage.rs # core/src/cost_model.rs # core/src/cost_tracker.rs # ledger-tool/src/main.rs # program-runtime/src/instruction_processor.rs # programs/bpf/tests/programs.rs # programs/bpf_loader/src/syscalls.rs # rpc/src/transaction_status_service.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message/mapped.rs # sdk/program/src/message/sanitized.rs # sdk/src/transaction/sanitized.rs
* Demote write locks on transaction program ids (#19593) * Add feature * Demote write lock on program ids * Fixup bpf tests * Update MappedMessage::is_writable * Comma nit * Review comments (cherry picked from commit decec3c) # Conflicts: # core/src/banking_stage.rs # core/src/cost_model.rs # core/src/cost_tracker.rs # ledger-tool/src/main.rs # program-runtime/src/instruction_processor.rs # programs/bpf/tests/programs.rs # programs/bpf_loader/src/syscalls.rs # rpc/src/transaction_status_service.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message/mapped.rs # sdk/program/src/message/sanitized.rs # sdk/src/transaction/sanitized.rs * Fix conflicts Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Demote write locks on transaction program ids (#19593) * Add feature * Demote write lock on program ids * Fixup bpf tests * Update MappedMessage::is_writable * Comma nit * Review comments (cherry picked from commit decec3c) # Conflicts: # core/src/banking_stage.rs # core/src/cost_model.rs # core/src/cost_tracker.rs # ledger-tool/src/main.rs # program-runtime/src/instruction_processor.rs # programs/bpf/tests/programs.rs # programs/bpf_loader/src/syscalls.rs # rpc/src/transaction_status_service.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message/mapped.rs # sdk/program/src/message/sanitized.rs # sdk/src/transaction/sanitized.rs * Fix conflicts Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com> (cherry picked from commit fcda5d4) # Conflicts: # cli-output/src/display.rs # core/src/transaction_status_service.rs # program-test/src/lib.rs # programs/bpf_loader/src/syscalls.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message.rs # sdk/src/feature_set.rs # transaction-status/src/parse_accounts.rs
…port #19633) (#19637) * Demote write locks on transaction program ids (backport #19593) (#19633) * Demote write locks on transaction program ids (#19593) * Add feature * Demote write lock on program ids * Fixup bpf tests * Update MappedMessage::is_writable * Comma nit * Review comments (cherry picked from commit decec3c) # Conflicts: # core/src/banking_stage.rs # core/src/cost_model.rs # core/src/cost_tracker.rs # ledger-tool/src/main.rs # program-runtime/src/instruction_processor.rs # programs/bpf/tests/programs.rs # programs/bpf_loader/src/syscalls.rs # rpc/src/transaction_status_service.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message/mapped.rs # sdk/program/src/message/sanitized.rs # sdk/src/transaction/sanitized.rs * Fix conflicts Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com> (cherry picked from commit fcda5d4) # Conflicts: # cli-output/src/display.rs # core/src/transaction_status_service.rs # program-test/src/lib.rs # programs/bpf_loader/src/syscalls.rs # runtime/src/accounts.rs # runtime/src/bank.rs # runtime/src/message_processor.rs # sdk/benches/serialize_instructions.rs # sdk/program/src/message.rs # sdk/src/feature_set.rs # transaction-status/src/parse_accounts.rs * Replace feature and fix conflicts Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
)" This reverts commit 824e9c9.
Problem
Programs can't be written to, and taking a write lock on them can make batch sizes smaller than they should be.
Summary of Changes
Lower write lock to read lock for accounts marked as program-ids in a transaction.