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

Radical Solana refresh optimizations #15445

Merged
merged 10 commits into from
Dec 2, 2024

Conversation

martykan
Copy link
Member

@martykan martykan commented Nov 19, 2024

Description

Reduce the amount of periodic calls for Solana

  1. Check if the account was updated only based on txids. This means that it uses only 1 request per account + 1 per token. Previously this was more than 5 requests per account + 1 per token.
  2. Remove Solana block subscription from Suite's side and move it to send form only, at a reduced interval of 50 seconds.
  3. Fixed baseFee calculation, increase priority fee unit price x3, added simulations for precise calculation of compute limit, resulting in overall lower fees but higher priority.
  4. Fixed Solana account subscriptions. Added solution to reconnect Solana backend when subscription goes down.
  5. Changed configuration for sending TX to run the preflight check and allow retries
  6. Fixed "send max" in send form

Benchmark

Count of all Solana requests when opening a wallet with 4 accounts and several tokens and waiting for 5 min (including discovery)

  • Before: 449 (121 discovery + 82 per minute)
  • After: 200 (72 discovery + 32 per minute)

Copy link

github-actions bot commented Nov 19, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 12
  • More info

Learn more about 𝝠 Expo Github Action

@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch 2 times, most recently from 577e1b7 to e9b9c72 Compare November 19, 2024 15:40
@martykan martykan marked this pull request as ready for review November 19, 2024 15:45
@martykan martykan requested a review from tomasklim November 19, 2024 15:45
@tomasklim tomasklim requested a review from vytick November 23, 2024 10:21
@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch from e9b9c72 to c656a1a Compare November 27, 2024 16:57
@martykan martykan requested review from a team, szymonlesisz and Nodonisko as code owners November 27, 2024 16:57
Copy link

socket-security bot commented Nov 27, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@martykan martykan changed the title chore(blockchain-link): Solana getAccountInfo - optimize for basic details Radical Solana refresh optimizations Nov 27, 2024
@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch 2 times, most recently from c2cf0de to f2b0997 Compare November 27, 2024 17:27
@martykan martykan changed the base branch from develop to solana-web3-js-two-dot-oh November 27, 2024 20:42
Copy link
Contributor

@vytick vytick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch 2 times, most recently from f054eff to 9c699ab Compare November 28, 2024 11:35
@martykan martykan added solana build-desktop This will trigger the build of desktop apps for your PR labels Nov 28, 2024
@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch from 9c699ab to 018648a Compare November 28, 2024 14:15
@martykan martykan added build-desktop This will trigger the build of desktop apps for your PR and removed build-desktop This will trigger the build of desktop apps for your PR labels Nov 28, 2024
@tomasklim tomasklim force-pushed the solana-web3-js-two-dot-oh branch 2 times, most recently from e7d4b2f to 52c2551 Compare November 29, 2024 08:22
Base automatically changed from solana-web3-js-two-dot-oh to develop November 29, 2024 08:51
@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch from 018648a to 11c79cb Compare November 29, 2024 08:53
@martykan martykan force-pushed the chore/solana-getaccountinfo-optimization branch from 11c79cb to aea5be0 Compare November 29, 2024 10:19
@martykan martykan added build-desktop This will trigger the build of desktop apps for your PR and removed build-desktop This will trigger the build of desktop apps for your PR labels Nov 29, 2024
@jirih-stsh jirih-stsh linked an issue Nov 29, 2024 that may be closed by this pull request
@martykan martykan added build-desktop This will trigger the build of desktop apps for your PR and removed build-desktop This will trigger the build of desktop apps for your PR labels Nov 29, 2024
@martykan martykan merged commit 16cbfef into develop Dec 2, 2024
69 checks passed
@martykan martykan deleted the chore/solana-getaccountinfo-optimization branch December 2, 2024 06:42
@bosomt
Copy link
Contributor

bosomt commented Dec 3, 2024

QA OK

Solana works as expected,

  • discovery, add accounts
  • transactions - sol 0.23541798 RENDER sent from Solana #2 and tokens 0.23541798 RENDER sent from Solana #2

Info:

  • Suite version: desktop 24.12.0 (f7dd25b)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuiteDev/24.12.0 Chrome/130.0.6723.91 Electron/33.1.0 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T3T1 2.8.6 regular (revision 688bddc887b8bb660640cc6e40a99036f2e87f1f)
  • Transport: BridgeTransport 2.0.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-desktop This will trigger the build of desktop apps for your PR solana
Projects
Status: ✅ Approved
Development

Successfully merging this pull request may close these issues.

User cannot send Solana because we set low fees
4 participants