Compute Units in Solana


Default CUs

log_64_units: 100,
create_program_address_units: 1500,
invoke_units: 1000,
max_invoke_depth: 4,
sha256_base_cost: 85,
sha256_byte_cost: 1,
sha256_max_slices: 20_000,
max_call_depth: 64,
stack_frame_size: 4_096,
log_pubkey_units: 100,
max_cpi_instruction_size: 1280, // IPv6 Min MTU size
cpi_bytes_per_unit: 250,        // ~50MB at 200,000 units
sysvar_base_cost: 100,
secp256k1_recover_cost: 25_000,
syscall_base_cost: 100,
curve25519_edwards_validate_point_cost: 5_000, // TODO: precisely determine curve25519 costs
curve25519_edwards_add_cost: 5_000,
curve25519_edwards_subtract_cost: 5_000,
curve25519_edwards_multiply_cost: 10_000,
curve25519_ristretto_validate_point_cost: 5_000,
curve25519_ristretto_add_cost: 5_000,
curve25519_ristretto_subtract_cost: 5_000,
curve25519_ristretto_multiply_cost: 10_000,
heap_size: None,
heap_cost: 8,
mem_op_base_cost: 10,
account_property_update_cost: 10,