Update the consumed compute units cost for hashing syscalls (backport #23124)

This commit is contained in:
Dmitri Makarov
2022-02-23 19:09:09 -08:00
parent 5a06701a9a
commit 9803e19500
3 changed files with 48 additions and 14 deletions

View File

@@ -164,6 +164,8 @@ pub struct BpfComputeBudget {
pub sha256_base_cost: u64,
/// Incremental number of units consumed by SHA256 (based on bytes)
pub sha256_byte_cost: u64,
/// Maximum number of slices hashed per syscall
pub sha256_max_slices: u64,
/// Maximum BPF to BPF call depth
pub max_call_depth: usize,
/// Size of a stack frame in bytes, must match the size specified in the LLVM BPF backend
@@ -205,6 +207,7 @@ impl BpfComputeBudget {
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,