This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Return FeeCalculator with TransactionResults to use in transaction_status_service#10967
Closed
CriesofCarrots wants to merge 2 commits intosolana-labs:masterfrom
Closed
Return FeeCalculator with TransactionResults to use in transaction_status_service#10967CriesofCarrots wants to merge 2 commits intosolana-labs:masterfrom
CriesofCarrots wants to merge 2 commits intosolana-labs:masterfrom
Conversation
Contributor
Author
Contributor
Sounds right. |
added 2 commits
July 9, 2020 09:52
Codecov Report
@@ Coverage Diff @@
## master #10967 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.1%
=========================================
Files 318 318
Lines 72747 72741 -6
=========================================
- Hits 59777 59770 -7
- Misses 12970 12971 +1 |
Contributor
Author
|
Nonce issue described is not actually an issue, as the fee calculator is pulled from the actual account in |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
This
.expect()is reachable by a mainnet-beta validator:solana/core/src/transaction_status_service.rs
Lines 65 to 71 in 6429042
Summary of Changes
Return FeeCalculators used in processing transactions with TransactionResults, ensuring that if the transaction assessed fees successfully, the FeeCalculator is available for the TransactionStatusService.
Caveat: So far I haven't been able to write a test that fails on that
expect.A recent_blockhash transaction doesn't hit this exception, even if the blockhash is relatively old, because the bank uses the stricter MAX_PROCESSING_AGE to pass/fail transactions, so the recent_blockhash can be at worst in the middle of the bank's blockhash_queue.
Nonce transactions seem more suspicious, but I didn't come up with a failure case. I tried to remove a nonce account immediately after using it, before pulling the fee calculator from that bank, and the removal was caught by this error:
solana/sdk/src/nonce/account.rs
Line 90 in 17a8cc8
fee_calculator_ofactually doesn't care if it's returning the right fee calculator (I think this could lead to incorrect nonced-tx fees being cached in Blockstore).I still think this pr makes this area more robust, and if nothing else it resolves the potential issue with nonce transactions caching incorrect fee data in TSS.
Fixes #10958