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

Ndev 3112 optimize getting deactivated features #606

Merged
merged 7 commits into from
Jan 30, 2025

Conversation

ancientmage
Copy link

I haven't changed anything except moving get_sysvar method from Rpc trait to standalone function. It's used only in EmulatorAccountStorage. The rest is the same.

The problem was about creating cache (DeactivatedFeaturesCache) with generic method inside of Rpc trait that it should implement. We also don't know the exact type of Rpc because it might be RpcMockFeatures created for tests.

I wasn't able to find the solution leaving get_sysvar method in Rpc trait.

@ancientmage ancientmage force-pushed the NDEV-3112-optimize-getting-deactivated-features branch from c172054 to dc0e5af Compare January 21, 2025 16:32
@ancientmage ancientmage force-pushed the NDEV-3112-optimize-getting-deactivated-features branch from dc0e5af to 7c55115 Compare January 28, 2025 11:51
@neonlabstech
Copy link

Dapps report

🔗Cost report

@neonlabstech
Copy link

Solana Requests Statistics
count min_time max_time average_time median_time
getAccountInfo 48429 0 0.165 0.000928039 0.001
getBlocks 34854 0 0.109 0.00137712 0.001
getBlock 17973 0 0.049 0.00183108 0.001
getLatestBlockhash 11629 0 0.159 0.00216794 0.001
getTransaction 10171 0 0.279 0.0114802 0.003
getMultipleAccounts 7559 0 0.152 0.00174388 0.001
sendTransaction 4986 0 0.18 0.00960108 0.005
getBalance 1813 0 0.08 0.00125869 0.001
simulateTransaction 588 0 0.005 0.00142007 0.001
getSignatureStatuses 440 0 0.029 0.000968182 0.001
isBlockhashValid 202 0 0.039 0.000727723 0
getVersion 178 0 0.048 0.00118539 0
getSignaturesForAddress 62 0 0.006 0.00224194 0.002
requestAirdrop 32 0 0.003 0.00103125 0.001
getSlot 25 0 0.022 0.00276 0.002
getBlockHeight 18 0 0.002 0.000388889 0
getHealth 4 0 0.001 0.0005 0.0005
getTokenAccountBalance 3 0 0.001 0.000666667 0.001
getFirstAvailableBlock 2 0.001 0.001 0.001 0.001
getMinimumBalanceForRentExemption 1 0 0 0 0
getProgramAccounts 1 0.034 0.034 0.034 0.034
getClusterNodes 1 0.005 0.005 0.005 0.005

@s-medvedev s-medvedev merged commit 7866073 into develop Jan 30, 2025
4 checks passed
@s-medvedev s-medvedev deleted the NDEV-3112-optimize-getting-deactivated-features branch January 30, 2025 08:55
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.

3 participants