Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/key-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod seal_package;
pub mod tests;
mod time;

const GAS_BUDGET: u64 = 500_000_000;
const MAX_COMPUTATION_UNITS: u64 = 55_000; // 50K tier + 10% extra buffer
const GIT_VERSION: &str = utils::git_version!();
const DEFAULT_PORT: u16 = 2024;

Expand Down Expand Up @@ -419,11 +419,12 @@ impl Server {
.add_staleness_check_to_ptb(self.options.allowed_staleness, vptb.ptb().clone());

// Evaluate the `seal_approve*` function
let gas_budget = MAX_COMPUTATION_UNITS * gas_price;
let tx_data = TransactionData::new_with_gas_coins(
TransactionKind::ProgrammableTransaction(ptb),
sender,
vec![], // Empty gas payment for dry run
GAS_BUDGET,
gas_budget,
gas_price,
);
let dry_run_res = self
Expand Down