Deprecate SysvarRecentBlockhashes#18875
Conversation
4f58764 to
5a1da03
Compare
|
@t-nelson Step one in reducing FeeCalculator exposure |
Codecov Report
@@ Coverage Diff @@
## master #18875 +/- ##
=========================================
- Coverage 82.8% 82.8% -0.1%
=========================================
Files 444 444
Lines 126568 126662 +94
=========================================
+ Hits 104859 104918 +59
- Misses 21709 21744 +35 |
t-nelson
left a comment
There was a problem hiding this comment.
lgtm!
let's add an issue to update the deprecation warning strings with the invoke context method once it's ready
The invoke_context mechanism will only be available to built-in programs and even there we are planning for it to only return the current blockhash and fee_calculator. RecentBlockhashes will no longer be available to developers. |
2f367fa to
91649b2
Compare
91649b2 to
2c095c3
Compare
|
Hi, we are using this sysvar in Lido for Solana. Not in the on-chain program, but to be able to know what the most recent blockhash was when you call |
@ruuda , the Does that help? |
It helps a little; this context is not exposed in the Rust client, but I can see it is available internally, so if we fork |
|
@jackcmay |
|
Hi, I see the |
|
the sysvar is only queried and used to perform a legacy check. it can be removed. all instances where the blockhash is actually used, query the invoke context |
Problem
SysvarRecentBlockhashesexposes the fee structure internals and thus locks the Solana blockchain down to the current fee structure.Summary of Changes
This sysvar is mostly used by Nonce accounts (only as far as I can tell) and Nonce accounts don't even need it since they could get the information from
InvokeContext. Deprecate the sysvar so no new developers start to use it.Next step is to switch nonce handling over to getting the blockhash/fee calculator from InvokeContext and then hopefully drop fee_calculator altogether and just use the fee calculator available at the time the transaction is submitted for processing.
Fixes #18817