Skip to content

Commit

Permalink
syscalls: update costs for curve25519 operations (solana-labs#28152)
Browse files Browse the repository at this point in the history
update costs
  • Loading branch information
samkim-crypto authored Oct 1, 2022
1 parent 9255506 commit fcd301e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions program-runtime/src/compute_budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ impl ComputeBudget {
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,
curve25519_edwards_validate_point_cost: 111,
curve25519_edwards_add_cost: 331,
curve25519_edwards_subtract_cost: 329,
curve25519_edwards_multiply_cost: 1_753,
curve25519_ristretto_validate_point_cost: 117,
curve25519_ristretto_add_cost: 367,
curve25519_ristretto_subtract_cost: 366,
curve25519_ristretto_multiply_cost: 1_804,
heap_size: None,
heap_cost: 8,
mem_op_base_cost: 10,
Expand Down

0 comments on commit fcd301e

Please sign in to comment.