Skip to content

Commit

Permalink
Add costs for new cryptography host functions (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon authored Jun 13, 2023
1 parent 72c85fd commit 0f5e556
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Stellar-contract-config-setting.x
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,17 @@ enum ContractCostType {
// Roundtrip cost of invoking a VM function from the host.
InvokeVmFunction = 19,
// Cost of charging a value to the budgeting system.
ChargeBudget = 20
ChargeBudget = 20,
// Cost of computing a keccak256 hash from bytes.
ComputeKeccak256Hash = 21,
// Cost of computing an ECDSA secp256k1 pubkey from bytes.
ComputeEcdsaSecp256k1Key = 22,
// Cost of computing an ECDSA secp256k1 signature from bytes.
ComputeEcdsaSecp256k1Sig = 23,
// Cost of verifying an ECDSA secp256k1 signature.
VerifyEcdsaSecp256k1Sig = 24,
// Cost of recovering an ECDSA secp256k1 key from a signature.
RecoverEcdsaSecp256k1Key = 25
};

struct ContractCostParamEntry {
Expand Down

0 comments on commit 0f5e556

Please sign in to comment.