From 99a39cbd1fdd6fcdd9eb598dd55957088c811e6e Mon Sep 17 00:00:00 2001 From: rv-jenkins Date: Sun, 24 Mar 2024 17:41:49 -0600 Subject: [PATCH] Update dependency: deps/k_release (#534) ## Summary by CodeRabbit - **Chores** - Updated a key dependency to enhance performance and stability. --------- Co-authored-by: devops Co-authored-by: Jost Berthold --- deps/blockchain-k-plugin_release | 2 +- deps/k_release | 2 +- scripts/integration-tests.sh | 2 ++ .../resources/foundry-bug-report.kompile | 12 +++++++----- test/rpc-integration/runDirectoryTest.sh | 8 +++++++- .../response-if-then-else-arity-error.json | 6 +++--- .../response-if-then-else-indeterminate.json | 2 +- .../response-if-then-else-sort-error.json | 2 +- .../state-if-then-else-arity-error.simplify | 2 +- .../test-simplify/state-if-then-else-eval.simplify | 2 +- .../test-simplify/state-if-then-else-false.simplify | 2 +- .../state-if-then-else-indeterminate.simplify | 2 +- .../state-if-then-else-sort-error.simplify | 2 +- .../test-simplify/state-if-then-else-true.simplify | 2 +- 14 files changed, 29 insertions(+), 19 deletions(-) diff --git a/deps/blockchain-k-plugin_release b/deps/blockchain-k-plugin_release index e4aa32837..bad7f7faf 100644 --- a/deps/blockchain-k-plugin_release +++ b/deps/blockchain-k-plugin_release @@ -1 +1 @@ -f27c5ec4861272c1ad4496bc6aab9f47dd6d473a +5aa6993fab90675d971b8b98b3430d11f1ec2a2b diff --git a/deps/k_release b/deps/k_release index 02b0a53c2..b35e0e9e4 100644 --- a/deps/k_release +++ b/deps/k_release @@ -1 +1 @@ -6.3.23 +6.3.58 diff --git a/scripts/integration-tests.sh b/scripts/integration-tests.sh index 2adb01e7b..2f7f9443d 100755 --- a/scripts/integration-tests.sh +++ b/scripts/integration-tests.sh @@ -14,6 +14,8 @@ cabal test llvm-integration # The runDirectoryTest.sh script expects the following env vars to be set export PLUGIN_DIR=$(nix build github:runtimeverification/blockchain-k-plugin/$PLUGIN_VERSION --no-link --json | jq -r '.[].outputs | to_entries[].value') +export SECP256K1_DIR=$(nix build nixpkgs#secp256k1 --no-link --json | jq -r '.[].outputs | to_entries[].value') + cabal build all KORE_RPC_BOOSTER=$(cabal exec which kore-rpc-booster) BOOSTER_DEV=$(cabal exec which booster-dev) diff --git a/test/rpc-integration/resources/foundry-bug-report.kompile b/test/rpc-integration/resources/foundry-bug-report.kompile index 24be12fa1..a4867d9d1 100755 --- a/test/rpc-integration/resources/foundry-bug-report.kompile +++ b/test/rpc-integration/resources/foundry-bug-report.kompile @@ -2,22 +2,24 @@ set -eux SCRIPT_DIR=$(dirname $0) PLUGIN_DIR=${PLUGIN_DIR:-""} - +SECP=${SECP256K1_DIR:-/usr} if [ -z "$PLUGIN_DIR" ]; then echo "PLUGIN_DIR required to link in a crypto plugin dependency" exit 1 else - for lib in libff libcryptopp libsecp256k1; do + for lib in libff libcryptopp blake2; do LIBFILE=$(find ${PLUGIN_DIR} -name "${lib}.a" | head -1) [ -z "$LIBFILE" ] && (echo "[Error] Unable to locate ${lib}.a"; exit 1) PLUGIN_LIBS+="$LIBFILE " - PLUGIN_INCLUDE+="-I$(dirname $LIBFILE)/../include " + PLUGIN_INCLUDE+="-I$(dirname $LIBFILE) -I$(dirname $LIBFILE)/../include " done #PLUGIN_CPP=$(find ${PLUGIN_DIR}/plugin-c -name "*.cpp") - PLUGIN_CPP="${PLUGIN_DIR}/include/plugin-c/blake2.cpp ${PLUGIN_DIR}/include/plugin-c/crypto.cpp ${PLUGIN_DIR}/include/plugin-c/plugin_util.cpp" + PLUGIN_CPP="${PLUGIN_DIR}/include/plugin-c/crypto.cpp ${PLUGIN_DIR}/include/plugin-c/plugin_util.cpp" fi +SECP_OPTS="-I${SECP}/include -L${SECP}/lib" + NAME=$(basename ${0%.tar.gz.kompile}) NAMETGZ=$(basename ${0%.kompile}) @@ -39,7 +41,7 @@ esac llvm-kompile foundry-bug-report.llvm.kore ./dt c -- \ -fPIC -std=c++17 -o interpreter \ $PLUGIN_LIBS $PLUGIN_INCLUDE $PLUGIN_CPP \ - -lcrypto -lssl $LPROCPS + -lcrypto -lssl $LPROCPS ${SECP_OPTS} mv interpreter.* foundry-bug-report.dylib # remove temporary artefacts diff --git a/test/rpc-integration/runDirectoryTest.sh b/test/rpc-integration/runDirectoryTest.sh index 20599c871..3669f97b3 100755 --- a/test/rpc-integration/runDirectoryTest.sh +++ b/test/rpc-integration/runDirectoryTest.sh @@ -85,7 +85,13 @@ done # find server port via lsof server_port=$(lsof -a -p${server_pid} -sTCP:LISTEN -iTCP | grep ${server_pid} | sed -e 's/.* TCP \*:\([0-9]*\).*$/\1/') -echo "Server listening on port ${server_port}" + +if [ -z "${server_port}" ]; then + echo "Unable to identify the server, aborting" + exit 4 +else + echo "Server listening on port ${server_port}" +fi client="$client -p ${server_port}" diff --git a/test/rpc-integration/test-simplify/response-if-then-else-arity-error.json b/test/rpc-integration/test-simplify/response-if-then-else-arity-error.json index beea6b3be..166fe5655 100644 --- a/test/rpc-integration/test-simplify/response-if-then-else-arity-error.json +++ b/test/rpc-integration/test-simplify/response-if-then-else-arity-error.json @@ -24,7 +24,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", @@ -62,7 +62,7 @@ "context": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", @@ -92,7 +92,7 @@ ] } ], - "error": "Inconsistent pattern. Symbol 'Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort' expected 3 arguments but got 2" + "error": "Inconsistent pattern. Symbol 'Lblite' expected 3 arguments but got 2" } ], "message": "Could not verify pattern" diff --git a/test/rpc-integration/test-simplify/response-if-then-else-indeterminate.json b/test/rpc-integration/test-simplify/response-if-then-else-indeterminate.json index 943a6120e..8ce41ff74 100644 --- a/test/rpc-integration/test-simplify/response-if-then-else-indeterminate.json +++ b/test/rpc-integration/test-simplify/response-if-then-else-indeterminate.json @@ -23,7 +23,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/response-if-then-else-sort-error.json b/test/rpc-integration/test-simplify/response-if-then-else-sort-error.json index dc39713a8..d7d54aa76 100644 --- a/test/rpc-integration/test-simplify/response-if-then-else-sort-error.json +++ b/test/rpc-integration/test-simplify/response-if-then-else-sort-error.json @@ -24,7 +24,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/state-if-then-else-arity-error.simplify b/test/rpc-integration/test-simplify/state-if-then-else-arity-error.simplify index e876bc219..b765d0151 100644 --- a/test/rpc-integration/test-simplify/state-if-then-else-arity-error.simplify +++ b/test/rpc-integration/test-simplify/state-if-then-else-arity-error.simplify @@ -19,7 +19,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/state-if-then-else-eval.simplify b/test/rpc-integration/test-simplify/state-if-then-else-eval.simplify index 8236ad347..b2830bfe4 100644 --- a/test/rpc-integration/test-simplify/state-if-then-else-eval.simplify +++ b/test/rpc-integration/test-simplify/state-if-then-else-eval.simplify @@ -19,7 +19,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/state-if-then-else-false.simplify b/test/rpc-integration/test-simplify/state-if-then-else-false.simplify index 6ed7c5270..4bfada14d 100644 --- a/test/rpc-integration/test-simplify/state-if-then-else-false.simplify +++ b/test/rpc-integration/test-simplify/state-if-then-else-false.simplify @@ -19,7 +19,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/state-if-then-else-indeterminate.simplify b/test/rpc-integration/test-simplify/state-if-then-else-indeterminate.simplify index d4d1a58be..7348f80cf 100644 --- a/test/rpc-integration/test-simplify/state-if-then-else-indeterminate.simplify +++ b/test/rpc-integration/test-simplify/state-if-then-else-indeterminate.simplify @@ -19,7 +19,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/state-if-then-else-sort-error.simplify b/test/rpc-integration/test-simplify/state-if-then-else-sort-error.simplify index 13ed983ae..8f66a227c 100644 --- a/test/rpc-integration/test-simplify/state-if-then-else-sort-error.simplify +++ b/test/rpc-integration/test-simplify/state-if-then-else-sort-error.simplify @@ -19,7 +19,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp", diff --git a/test/rpc-integration/test-simplify/state-if-then-else-true.simplify b/test/rpc-integration/test-simplify/state-if-then-else-true.simplify index c063162ec..7427e7d05 100644 --- a/test/rpc-integration/test-simplify/state-if-then-else-true.simplify +++ b/test/rpc-integration/test-simplify/state-if-then-else-true.simplify @@ -19,7 +19,7 @@ "args": [ { "tag": "App", - "name": "Lbl'Hash'if'UndsHash'then'UndsHash'else'UndsHash'fi'Unds'K-EQUAL-SYNTAX'Unds'Sort'Unds'Bool'Unds'Sort'Unds'Sort", + "name": "Lblite", "sorts": [ { "tag": "SortApp",