跳到内容

​简述

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. 每笔交易都需以 SOL 支付费用,费用分为两部分: 基础费用,用于向 validator 支付签名验证的报酬;以及可选的 优先费用,可使当前 leader 更有可能将 你的交易排在其他交易之前。
A transaction fee is the base fee, 5,000 lamports per signature, plus an optional prioritization fee, compute unit price times compute unit limit.A transaction fee is the base fee, 5,000 lamports per signature, plus an optional prioritization fee, compute unit price times compute unit limit.
交易费用的两个组成部分及其各自的去向。

​关键要点

  • 基础费用:按签名收取,50% 销毁,50% 归 validator。
  • 优先费用: ceil(compute_unit_price * compute_unit_limit / 1,000,000) lamport。100% 归 validator。在 v1 格式中,该费用 改为在消息配置中设置的绝对 lamport 总额。

​限制

限制项数值来源
每个签名的基础费用5,000 lamportlamports_per_signature
每条指令的默认 CU 上限200,000DEFAULT_INSTRUCTION_COMPUTE_UNIT_LIMIT
内置指令的默认 CU3,000MAX_BUILTIN_ALLOCATION_COMPUTE_UNIT_LIMIT
每笔交易的最大 CU 上限1,400,000MAX_COMPUTE_UNIT_LIMIT
每 lamport 对应的微 lamport 数1,000,000MICRO_LAMPORTS_PER_LAMPORT