#!/bin/bash
set -euo pipefail
SCRIPTS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
COMPAT_DIR="${SCRIPTS_DIR}/../temp/compat"
TESTNAME="${1?Must specify compat file to run}"
BASEURL="${2:-https://github.com/ethereum-optimism/chain-test-data/releases/download/2024-09-01}"
URL="${BASEURL}/${TESTNAME}.tar.bz"
mkdir -p "${COMPAT_DIR}"
curl --etag-save "${COMPAT_DIR}/${TESTNAME}-etag.txt" --etag-compare "${COMPAT_DIR}/${TESTNAME}-etag.txt" -L --fail -o "${COMPAT_DIR}/${TESTNAME}.tar.bz" "${URL}"
tar jxf "${COMPAT_DIR}/${TESTNAME}.tar.bz" -C "${COMPAT_DIR}"
# shellcheck disable=SC2046
"${SCRIPTS_DIR}/../bin/op-program" --data.format=pebble $(cat "${COMPAT_DIR}/${TESTNAME}/args.txt")
-
Adrian Sutton authored
* feat(op-program): Use `PebbleDB` for `DiskKV` (#11705) * feat(op-program): Use `PebbleDB` for `DiskKV` * close db * fix `testFaultProofProgramScenario` tests * switch to snappy compression https://github.com/cockroachdb/pebble/issues/3434 * fix tempdir * update compat release * defer k/v until preimage server and hinter have both exited * Only open preimage source when actually needing preimages. Avoids concurrent access to the pebbledb. * op-program: Handle interrupts in host Ensures the preimage kv store is closed cleanly even when the process is sent an interrupt signal. Enables non-blocking IO so that read calls return io.EOF when a file handle is closed rather than blocking forever. * op-program: Restore file based kv store. Add pebble as an additional option. * op-program: Add option to specify KV store format to use * op-program: Switch pebble to perform sync writes. * op-program: Rename disk kv to file kv * op-program: Rename DBFormat to DataFormat for consistency. --------- Co-authored-by:
clabby <ben@clab.by>
e80d23b6