[go: up one dir, main page]

Fill in gas cost for list-key-value-step

Need to fill in the value for the cost Storage_cost.list_key_value_step.

The following script can be used to infer the parameters. Note that the paramters may need to be tweaked:

BENCHMARK="List_key_values_alpha"
MODEL="list_key_values_step"

BENCH_NUM=3000
NSAMPLES=500

SEED=1234
WORKLOAD_FILE="${BENCHMARK}.workload"
SOL_FILE="${BENCHMARK}.sol"

# Run benchmark
./tezos-snoop benchmark \
    "${BENCHMARK}" \
    and save to "${BENCHMARK}.workload" \
    --bench-num "${BENCH_NUM}" \
    --nsamples "${NSAMPLES}" \
    --seed "${SEED}"

# Infer parameters
./tezos-snoop \
    infer parameters for model "${MODEL}" \
    on data "${WORKLOAD_FILE}" using lasso --lasso-positive \
    --save-solution "${SOL_FILE}" \
    --plot

# Generate code
./tezos-snoop generate code using solution "${SOL_FILE}" and model "${BENCHMARK}"
Edited by Joel Bjornson