Increase default max fuel to 10 billion.

This commit is contained in:
FiveMovesAhead 2025-01-11 01:44:27 +08:00
parent 30a0f59f30
commit f791061142
2 changed files with 8 additions and 2 deletions

View File

@ -76,6 +76,12 @@ if ! is_positive_integer "$num_workers"; then
echo "Error: Number of workers must be a positive integer."
exit 1
fi
read -p "Enter max fuel (default is 10000000000): " max_fuel
max_fuel=${max_fuel:-1}
if ! is_positive_integer "$max_fuel"; then
echo "Error: Max fuel must be a positive integer."
exit 1
fi
read -p "Enable debug mode? (leave blank to disable) " enable_debug
if [[ -n $enable_debug ]]; then
debug_mode=true
@ -117,7 +123,7 @@ while [ $remaining_nonces -gt 0 ]; do
start_time=$(date +%s%3N)
stdout=$(mktemp)
stderr=$(mktemp)
./target/release/tig-worker compute_batch "$SETTINGS" "random_string" $current_nonce $nonces_to_compute $power_of_2_nonces $REPO_DIR/tig-algorithms/wasm/$CHALLENGE/$ALGORITHM.wasm --workers $nonces_to_compute >"$stdout" 2>"$stderr"
./target/release/tig-worker compute_batch "$SETTINGS" "random_string" $current_nonce $nonces_to_compute $power_of_2_nonces $REPO_DIR/tig-algorithms/wasm/$CHALLENGE/$ALGORITHM.wasm --workers $nonces_to_compute --fuel $max_fuel >"$stdout" 2>"$stderr"
exit_code=$?
output_stdout=$(cat "$stdout")
output_stderr=$(cat "$stderr")

View File

@ -28,7 +28,7 @@ fn cli() -> Command {
.arg(arg!(<WASM> "Path to a wasm file").value_parser(clap::value_parser!(PathBuf)))
.arg(
arg!(--fuel [FUEL] "Optional maximum fuel parameter for WASM VM")
.default_value("2000000000")
.default_value("10000000000")
.value_parser(clap::value_parser!(u64)),
)
.arg(