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-3110: Update Solana to v1.18.18 #302

Merged
merged 8 commits into from
Jul 24, 2024

Conversation

andreisilviudragnea
Copy link

@andreisilviudragnea andreisilviudragnea commented Mar 6, 2024

Solana v1.18.18 is the new recommended version on Solana Mainnet: https://discord.com/channels/428295358100013066/669406841830244375

  • Fix SolanaSimulator Bank creation logic.
  • Fix replace_blockhash logic.
  • Use ACCOUNTS_DB_CONFIG_FOR_TESTING with 0 flush threads.
  • Increased --limit-ledger-size 400000000, since the ledger started being truncated before the end of proxy CI swap report generation.
  • Use cargo build-sbf.
  • Added more useful logs in debug mode.
  • Added id: Option<String> field to neon-api requests, which is populated with neon-proxy ctx value, for easier log correlation in neon-proxy while debugging.
  • Updated all other dependencies to latest versions.
  • Update SolanaSimulator to use MessageProcessor.

@andreisilviudragnea andreisilviudragnea added the fullTestSuite Run OZ tests and part of dapps tests label Mar 6, 2024
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 4 times, most recently from e81a541 to 0391ea1 Compare March 11, 2024 07:32
@andreisilviudragnea andreisilviudragnea deleted the NDEV-2736-solana-1.18 branch March 11, 2024 10:51
@andreisilviudragnea andreisilviudragnea restored the NDEV-2736-solana-1.18 branch March 11, 2024 10:52
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 5 times, most recently from 3ed1275 to 07e4c04 Compare March 15, 2024 08:51
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 6 times, most recently from b37850e to 346649a Compare March 22, 2024 09:22
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 3 times, most recently from b98ba57 to 8e796a0 Compare April 4, 2024 07:48
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 2 times, most recently from e911b36 to 7ce83a6 Compare April 13, 2024 11:43
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 2 times, most recently from 9a9fe5e to 1d5caba Compare April 18, 2024 20:09
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 3 times, most recently from 746732b to a50c9ec Compare May 15, 2024 17:45
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 7 times, most recently from 8dfeb47 to 5b1dded Compare July 1, 2024 10:02
@andreisilviudragnea andreisilviudragnea changed the title NDEV-3110: Update Solana to v1.18.15 NDEV-3110: Update Solana to v1.18.18 Jul 15, 2024
@andreisilviudragnea andreisilviudragnea force-pushed the NDEV-2736-solana-1.18 branch 3 times, most recently from 4867c53 to 2092154 Compare July 21, 2024 08:23
anton-lisanin
anton-lisanin previously approved these changes Jul 23, 2024
andreisilviudragnea and others added 7 commits July 23, 2024 12:47
Fix SolanaSimulator Bank creation logic

Fix replace_blockhash

Use ACCOUNTS_DB_CONFIG_FOR_TESTING

Enable dev-context-only-utils feature

Use 0 flush_threads

Increase --limit-ledger-size 400000000

Use cargo build-sbf
New logs to debug level
Fix program_indices

wip

Add TODO

wip

wip

wip

wip

wip

wip

wip

wip

Transation execution works

Populate TransactionExecutionDetails

Try fix simulate_transaction

Clean up error handling

cargo clippy

cargo clippy

cargo clippy

Complete process_transaction

More simulate_transaction

Use TransactionSimulationResult to return post_simulation_accounts

Add test_encode

Remove TransactionExecutionDetails usage

Log encoded tx

Remove unused genesis_config_info

Remove unused sync_sysvar_accounts

Remove unused errors

Remove redundant timings logic

Make some logs debug

Remove unused code

Extract load_programs

Extract build_program_indices

Make fn private

Cleanup

Cleanup

Fix sync_sysvar_accounts

Fix tx JSON encoding
This reverts commit fc4acab.
@neonlabstech
Copy link

Dapps report

Cost report for "Aave" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Token mint 0.00234464 0.001382399744 9 1 1192320 1172320 98.32
Token approve 0.00234464 0.001382399744 9 1 1192320 1172320 98.32
Deposit to lending pool 0.00797264 0.0047004293648 4 2 4156320 3986320 95.91
Borrow from lending pool 0.00477928 0.002817863488 5 10 2644640 2389640 90.36
Repay 0.00013 7.664669999999999e-05 5 10 290000 65000 22.41
Flashloan 0.00473928 0.002794279488 4 7 2634640 2369640 89.94
Withdraw 7e-05 4.1272e-05 5 5 250000 35000 14.0
Liquidation 0.00249464 0.0014707649048 5 12 1752320 1247320 71.18

Cost report for "Yearn" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Create new release 0.00234464 0.0013822356192 13 1 1322552 1172320 88.64
Clone strategy 0.0389264 0.022949837648 15 1 21486520 19463200 90.58
Set strategist authority 2e-05 1.1791400000000002e-05 8 1 27500 10000 36.36
Set emergency shutdown 2e-05 1.17906e-05 8 1 27500 10000 36.36
Emergency shutdown 2e-05 1.1792000000000002e-05 8 1 27500 10000 36.36
Call strategy harvest 0.00699392 0.0041231256576 22 1 4033656 3496960 86.69
Withdraw from vault 2e-05 1.1792000000000002e-05 14 1 66000 10000 15.15

Cost report for "Robonomics" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
PublicAmbix setSink 0.00466928 0.0027526806384 10 1 199023576 2334640 1.17
PublicAmbix appendSource 0.00931856 0.005494222976 12 1 199023640 4659280 2.34
XRT approve 0.00234464 0.0013821418335999997 9 1 199022872 1172320 0.59
PublicAmbix run 2e-05 1.17898e-05 20 1 199021400 10000 0.01
DutchAuction started 2e-05 1.1791400000000002e-05 8 1 199021272 10000 0.01
DutchAuction bid 0.00234464 0.0013823294048 13 1 199026200 1172320 0.59
DutchAuction update stage 2e-05 1.17898e-05 8 1 199021272 10000 0.01
DutchAuction claim tokens 2e-05 1.17898e-05 12 1 199021272 10000 0.01
XRT transfer 0.00234464 0.0013822356192 10 1 199023192 1172320 0.59

Cost report for "Saddle Finance" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Add liquidity 0.00235464 0.0013880367335999998 4 2 1432320 1177320 82.2
Swap DAI -> USDC 2e-05 1.17898e-05 21 1 190000 10000 5.26
Swap USDC -> DAI 2e-05 1.17898e-05 21 1 190000 10000 5.26
Remove liquidity 2e-05 1.17898e-05 23 1 100000 10000 10.0
Add liquidity in 3 Tokens 0.00241464 0.0014234061335999999 4 7 1492320 1207320 80.9
Swap DAI -> USDC 3 pool 2e-05 1.17898e-05 21 1 200000 10000 5.0
Swap USDC -> USDT 3 pool 2e-05 1.17898e-05 21 1 200000 10000 5.0
Swap USDC -> DAI 3 pool 2e-05 1.17898e-05 21 1 200000 10000 5.0
Remove liquidity 3 pool 3e-05 1.76847e-05 4 2 180000 15000 8.33
Add liquidity in metapool 0.00241464 0.0014234061335999999 4 7 1522320 1207320 79.31
Swap SUSD -> LP metapool 2e-05 1.17898e-05 22 1 200000 10000 5.0
Swap USDC -> SUSD metapool 0.00015 8.842349999999998e-05 5 10 560000 75000 13.39
Swap DAI -> USDT metapool 0.00013 7.663369999999999e-05 4 7 330000 65000 19.7
Remove liquidity in Metapool 2e-05 1.17898e-05 23 1 100000 10000 10.0

Cost report for "Curve" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Metapool: add liquidity 0.01236256 0.007287605494399999 22 17 9164408 6181280 67.45
Metapool: swap 1 0.00022 0.0001296834 19 13 2530000 110000 4.35
Metapool: swap 2 0.00022 0.0001296878 19 13 2563000 110000 4.29
Metapool: withdraw admin fees 2e-05 1.17898e-05 15 1 44000 10000 22.73
Pool: add liquidity 0.00295464 0.0017417307336 4 36 7625552 1477320 19.37
Pool: swap 1 0.00026 0.00015326739999999998 19 15 2992000 130000 4.34
Pool: swap 2 0.00026 0.0001532622 19 15 2992000 130000 4.34
Pool: swap 3 0.00026 0.0001532622 19 15 2992000 130000 4.34
Pool: withdraw admin fees 2e-05 1.1789400000000003e-05 16 1 55000 10000 18.18
Stablecoin: transfer 2e-05 1.17888e-05 10 1 27500 10000 36.36
Tri pool: add liquidity 0.01493656 0.008804205926399999 4 6 8660608 7468280 86.23
Tri pool: swap 1 8e-05 4.715760000000001e-05 20 6 407000 40000 9.83
Tri pool: swap 2 8e-05 4.71552e-05 20 6 407000 40000 9.83
Tri pool: swap 3 8e-05 4.715760000000001e-05 20 6 396000 40000 10.1
Tri pool: apply new fee 2e-05 1.1789400000000003e-05 8 1 27500 10000 36.36
Tri pool: withdraw admin fees 2e-05 1.17888e-05 18 1 55000 10000 18.18
gauge v3: deposit 0.01907648 0.011245012665600001 28 1 10646064 9538240 89.59
gauge controller: vote 0.01812992 0.010687043942400002 26 1 10257456 9064960 88.37
gauge controller: vote 0.01069664 0.006305348380800001 26 1 6169152 5348320 86.69
gauge controller: vote 0.01069664 0.0063050274816 26 1 6169152 5348320 86.69
gauge controller: vote 0.00791264 0.0046640265216 26 1 4637952 3956320 85.3
gauge controller: vote 0.005588 0.0032937907199999997 26 1 3359400 2794000 83.17
gauge controller: vote 0.005588 0.0032937907199999997 26 1 3359400 2794000 83.17
gauge controller: vote 0.00791264 0.0046640265216 26 1 4637952 3956320 85.3
gauge controller: vote 0.005588 0.0032937907199999997 26 1 3359400 2794000 83.17
gauge controller: vote 0.005588 0.0032937907199999997 26 1 3359400 2794000 83.17

Cost report for "Pancake Lottery" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Cost to start the lottery 0.01474736 0.008692683878399998 9 1 7413680 7373680 99.46
Cost to buy a stand-alone ticket 0.0232664 0.013714146815999998 23 1 11693200 11633200 99.49
Cost to do injection 2e-05 1.17888e-05 13 1 50000 10000 20.0

Cost report for "Compound-Finance" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
borrow erc20 cToken 0.00512864 0.0030230255616 16 1 2875752 2564320 89.17
borrow ether cToken 0.002804 0.00165278976 13 1 1575200 1402000 89.0
Repay borrow erc20 cToken 2e-05 1.17888e-05 17 1 99000 10000 10.1
Mint erc20 cToken 2e-05 1.17888e-05 16 1 77000 10000 12.99
Mint ether cToken 2e-05 1.17888e-05 11 1 44000 10000 22.73
Transfer erc20 cToken 0.0116432 0.006862967808 21 1 6535760 5821600 89.07
Add reserves for ether cToken 2e-05 1.17888e-05 9 1 27500 10000 36.36
Liquidate borrow 2e-05 1.17888e-05 20 1 165000 10000 6.06
Redeem erc20 cToken 2e-05 1.17888e-05 16 1 66000 10000 15.15

Cost report for "Uniswap V2" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Token approve 0.00234464 0.0013820246015999998 9 1 1192320 1172320 98.32
Direct swap 2e-05 1.17888e-05 18 1 130000 10000 7.69

Cost report for "Uniswap V3" dApp

Action Fee Cost in $ Accounts TRx Estimated Gas Used Gas Used % of EG
Token approve 0.00234464 0.0013820246015999998 9 1 1192320 1172320 98.32
NonfungiblePositionManager - Mint position 0.02747064 0.0161922940416 4 7 14000320 13735320 98.11
NonfungiblePositionManager - Increase liquidity 8e-05 4.71552e-05 23 6 230000 40000 17.39
NonfungiblePositionManager - Decrease Liquidity 0.00139808 0.0008240842751999999 17 1 829040 699040 84.32
NonfungiblePositionManager - Collect Fees 0.00466928 0.0027522604031999997 20 1 2404640 2334640 97.09
NonfungiblePositionManager - Burn Liquidity Position 2e-05 1.17888e-05 15 1 50000 10000 20.0
Direct swap 2e-05 1.17888e-05 17 1 180000 10000 5.56
Burn transaction 0.00047936 0.0002825539584 11 1 279680 239680 85.7
Collect transaction 0.00234464 0.0013820246015999998 12 1 1202320 1172320 97.5

@neonlabstech
Copy link

Solana Requests Statistics
count min_time max_time average_time median_time
getAccountInfo 424037 0 0.656 0.00346001 0.001
getSlot 285592 0 0.657 0.0024327 0.001
getTransaction 224205 0 0.54 0.00715321 0.003
sendTransaction 191259 0 0.752 0.0111616 0.004
getBlocks 87223 0 0.393 0.00123049 0.001
getMultipleAccounts 77819 0 0.546 0.00401992 0.001
getBlockTime 51710 0 0.66 0.0018461 0.001
getBlock 44131 0.001 0.08 0.00236253 0.002
getLatestBlockhash 36489 0 0.519 0.0046294 0.001
getBalance 15326 0 0.421 0.00346855 0.001
getSignatureStatuses 1342 0 0.427 0.00564829 0.001
getVersion 693 0 0.221 0.00569408 0.001
isBlockhashValid 652 0 0.104 0.00266411 0.001
getSignaturesForAddress 173 0 0.102 0.00595954 0.004
requestAirdrop 32 0 0.002 0.001125 0.001
simulateTransaction 23 0 0.001 0.000695652 0.001
getHealth 3 0 0.065 0.029 0.022
getTokenAccountBalance 3 0 0.001 0.000333333 0
getFirstAvailableBlock 2 0.001 0.001 0.001 0.001
getMinimumBalanceForRentExemption 1 0 0 0 0
getClusterNodes 1 0.018 0.018 0.018 0.018

@andreisilviudragnea andreisilviudragnea merged commit 9febc46 into develop Jul 24, 2024
4 checks passed
@andreisilviudragnea andreisilviudragnea deleted the NDEV-2736-solana-1.18 branch July 24, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fullTestSuite Run OZ tests and part of dapps tests
Projects
None yet
3 participants