初始化最小demo
anchor init hello-cu
anchor test # build program
How to Use Priority Fees on Solana | QuickNode
1 microLamport = 0.000001 lamports
<aside> 💡 Currently, the base Solana transaction fee is set at a static value of 5k lamports per signature. On top of this base fee, any additional prioritization fees can be added.
</aside>
设置一个CU Limit 不设置CU Price,可以看到只扣除了5k的基础费用,使用的CU并不收费

同时设置CU Limit和CU Price,将会乘在一起扣除

300000*500000*0.000001 + 5000 = 155000
设置一个大于1_400_000的cu limit


可以看到,最大还是1_400_000,并且实际的cu也是1_400_000,(1399700 设置一次少150)

CU program调用的顺序也没有关系

In [7]: 1399180+520 Out[7]: 1399700