简述
Every transaction pays a small flat network fee, currently a fraction of a cent, whatever the amount. The transaction’s fee payer pays, and that can be your app rather than your customer.You’ve used this in: Quickstart Step 2 Payments Overview Pay-per-call Overview
每笔交易都需以 SOL 支付费用,费用分为两部分:
基础费用,用于向 validator 支付签名验证的报酬;以及可选的
优先费用,可使当前 leader 更有可能将
你的交易排在其他交易之前。
关键要点
- 基础费用:按签名收取,50% 销毁,50% 归 validator。
- 优先费用:
ceil(compute_unit_price * compute_unit_limit / 1,000,000)lamport。100% 归 validator。在 v1 格式中,该费用 改为在消息配置中设置的绝对 lamport 总额。
限制
| 限制项 | 数值 | 来源 |
|---|---|---|
| 每个签名的基础费用 | 5,000 lamport | lamports_per_signature |
| 每条指令的默认 CU 上限 | 200,000 | DEFAULT_INSTRUCTION_COMPUTE_UNIT_LIMIT |
| 内置指令的默认 CU | 3,000 | MAX_BUILTIN_ALLOCATION_COMPUTE_UNIT_LIMIT |
| 每笔交易的最大 CU 上限 | 1,400,000 | MAX_COMPUTE_UNIT_LIMIT |
| 每 lamport 对应的微 lamport 数 | 1,000,000 | MICRO_LAMPORTS_PER_LAMPORT |