Skip to content

Commit 6f76074

Browse files
committed
Merge branch 'master' into raoul/is-valid-jump-dest
2 parents 772ea32 + a93086e commit 6f76074

File tree

234 files changed

+12911
-2665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+12911
-2665
lines changed

.github/workflows/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RUN apt-get update \
2323
libboost-test-dev \
2424
libcrypto++-dev \
2525
libprocps-dev \
26+
libsecp256k1-dev \
2627
libssl-dev \
2728
libyaml-dev \
2829
llvm-${LLVM_VERSION}-dev \

.github/workflows/test-pr.yml

+11-23
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
version-bump:
1313
name: 'Version Bump'
14-
runs-on: [self-hosted, linux, flyweight-ephemeral]
14+
runs-on: ubuntu-latest
1515
steps:
1616
- name: 'Check out code'
1717
uses: actions/checkout@v3
@@ -37,13 +37,12 @@ jobs:
3737

3838
kevm-pyk-code-quality-checks:
3939
name: 'Code Quality Checks'
40-
runs-on: [self-hosted, linux, flyweight-ephemeral]
40+
runs-on: ubuntu-latest
4141
steps:
4242
- name: 'Check out code'
4343
uses: actions/checkout@v3
44-
- uses: actions/setup-python@v4
4544
with:
46-
python-version: "3.10"
45+
submodules: recursive
4746
- name: 'Install Poetry'
4847
uses: Gr1N/setup-poetry@v8
4948
- name: 'Run code quality checks'
@@ -54,36 +53,26 @@ jobs:
5453
kevm-pyk-unit-tests:
5554
needs: kevm-pyk-code-quality-checks
5655
name: 'Unit Tests'
57-
runs-on: [self-hosted, linux, normal-ephemeral]
56+
runs-on: ubuntu-latest
5857
steps:
5958
- name: 'Check out code'
6059
uses: actions/checkout@v3
6160
with:
62-
submodules: true
63-
fetch-depth: 0
64-
- uses: actions/setup-python@v4
65-
with:
66-
python-version: "3.10"
61+
submodules: recursive
6762
- name: 'Install Poetry'
6863
uses: Gr1N/setup-poetry@v8
6964
- name: 'Run unit tests'
70-
run: |
71-
make -C kevm-pyk cov-unit
65+
run: make -C kevm-pyk cov-unit
7266

7367
kevm-pyk-profile:
7468
needs: kevm-pyk-code-quality-checks
7569
name: 'Profiling'
76-
runs-on: [self-hosted, linux, normal-ephemeral]
70+
runs-on: ubuntu-latest
7771
steps:
7872
- name: 'Check out code'
7973
uses: actions/checkout@v3
8074
with:
8175
submodules: recursive
82-
fetch-depth: 0
83-
- name: Setup Python
84-
uses: actions/setup-python@v4
85-
with:
86-
python-version: '3.10'
8776
- name: 'Install Poetry'
8877
uses: Gr1N/setup-poetry@v8
8978
- name: 'Run profiling'
@@ -100,15 +89,14 @@ jobs:
10089
uses: actions/checkout@v3
10190
with:
10291
submodules: recursive
103-
fetch-depth: 0
10492
- name: 'Set up Docker'
10593
uses: ./.github/actions/with-docker
10694
with:
10795
container-name: kevm-ci-concrete-${{ github.sha }}
10896
- name: 'Build kevm-pyk'
10997
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'make poetry'
11098
- name: 'Build targets'
111-
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.llvm evm-semantics.haskell'
99+
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.haskell evm-semantics.kllvm evm-semantics.kllvm-runtime'
112100
- name: 'Test integration'
113101
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'make test-integration'
114102
- name: 'Test conformance'
@@ -178,16 +166,16 @@ jobs:
178166
ref: ${{ github.event.pull_request.head.sha }}
179167
- name: 'Install Nix'
180168
if: ${{ matrix.runner == 'macos-13' }}
181-
uses: cachix/install-nix-action@v19
169+
uses: cachix/install-nix-action@v25
182170
with:
183-
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
171+
install_url: https://releases.nixos.org/nix/nix-2.19.3/install
184172
extra_nix_config: |
185173
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
186174
substituters = http://cache.nixos.org https://cache.iog.io
187175
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
188176
- name: 'Install Cachix'
189177
if: ${{ matrix.runner == 'macos-13' }}
190-
uses: cachix/cachix-action@v12
178+
uses: cachix/cachix-action@v14
191179
with:
192180
name: k-framework
193181
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}

.github/workflows/update-version.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- '_update-deps/runtimeverification/blockchain-k-plugin'
6-
- '_update-deps/runtimeverification/pyk'
6+
- '_update-deps/runtimeverification/k'
77
workflow_dispatch:
88
# Stop in progress workflows on the same branch and same workflow to use latest committed code
99
concurrency:
@@ -30,15 +30,10 @@ jobs:
3030
uses: Gr1N/setup-poetry@v8
3131
- name: 'Update pyk release tag'
3232
run: |
33-
PYK_VERSION="$(cat deps/pyk_release)"
34-
sed -i 's!pyk = { git = "https://github.com/runtimeverification/pyk.git", tag="[v0-9\.]*" }!pyk = { git = "https://github.com/runtimeverification/pyk.git", tag="'${PYK_VERSION}'" }!' kevm-pyk/pyproject.toml
33+
K_VERSION=v$(cat deps/k_release)
34+
sed -i 's!pyk = { git = "https://github.com/runtimeverification/k.git", tag="[v0-9\.]*", subdirectory = "pyk" }!pyk = { git = "https://github.com/runtimeverification/k.git", tag="'${K_VERSION}'", subdirectory = "pyk" }!' kevm-pyk/pyproject.toml
3535
poetry -C kevm-pyk update
36-
git add kevm-pyk/ && git commit -m "kevm-pyk/: sync poetry files pyk version ${PYK_VERSION}" || true
37-
- name: 'Update K release file'
38-
run: |
39-
K_VERSION=$(poetry -C kevm-pyk run python3 -c 'import pyk; print(pyk.K_VERSION)')
40-
echo ${K_VERSION} > deps/k_release
41-
git add deps/k_release && git commit -m "deps/k_release: sync release file version ${K_VERSION}" || true
36+
git add kevm-pyk/ && git commit -m "kevm-pyk/: sync poetry files pyk version ${K_VERSION}" || true
4237
- name: 'Update plugin release file'
4338
run: |
4439
BKP_VERSION=$(git -C kevm-pyk/src/kevm_pyk/kproj/plugin rev-parse HEAD)
@@ -56,12 +51,11 @@ jobs:
5651
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
5752
- name: 'Update nix flake inputs'
5853
run: |
59-
K_VERSION=$(cat deps/k_release)
54+
K_VERSION=v$(cat deps/k_release)
6055
BKP_VERSION=$(cat deps/blockchain-k-plugin_release)
61-
PYK_VERSION=$(cat deps/pyk_release)
62-
sed -i 's! k-framework.url = "github:runtimeverification/k/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/v'"${K_VERSION}"'"!' flake.nix
56+
sed -i 's! k-framework.url = "github:runtimeverification/k/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/'"${K_VERSION}"'"!' flake.nix
6357
sed -i 's! blockchain-k-plugin.url = "github:runtimeverification/blockchain-k-plugin/[0-9a-f]*"! blockchain-k-plugin.url = "github:runtimeverification/blockchain-k-plugin/'"${BKP_VERSION}"'"!' flake.nix
64-
sed -i 's! pyk.url = "github:runtimeverification/pyk/[v0-9\.]*"! pyk.url = "github:runtimeverification/pyk/'"${PYK_VERSION}"'"!' flake.nix
58+
sed -i 's! pyk.url = "github:runtimeverification/k/[v0-9\.]*?dir=pyk"! pyk.url = "github:runtimeverification/k/'"${K_VERSION}"'?dir=pyk"!' flake.nix
6559
nix run .#update-from-submodules
6660
nix flake update
6761
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test-prove-kprove: tests/specs/opcodes/evm-optimizations-spec.md poetry
6060

6161
# to generate optimizations.md, run: ./optimizer/optimize.sh &> output
6262
tests/specs/opcodes/evm-optimizations-spec.md: kevm-pyk/src/kevm_pyk/kproj/evm-semantics/optimizations.md
63-
cat kevm-pyk/src/kevm_pyk/kproj/evm-semantics/optimizations.md | sed 's/^rule/claim/' | sed 's/EVM-OPTIMIZATIONS/EVM-OPTIMIZATIONS-SPEC/' | grep -v 'priority(40)' > $@
63+
cat kevm-pyk/src/kevm_pyk/kproj/evm-semantics/optimizations.md | sed 's/^ rule/ claim/' | sed 's/EVM-OPTIMIZATIONS/EVM-OPTIMIZATIONS-SPEC/' | grep -v 'priority(40)' > $@
6464

6565

6666
# Integration Tests

README.md

+52-34
Original file line numberDiff line numberDiff line change
@@ -61,42 +61,41 @@ This repository generates the build-products for each backend in `$XDG_CACHE_HOM
6161

6262
### System Dependencies
6363

64-
First install the following tools:
65-
66-
- [git](https://git-scm.com/)
67-
- GNU [Bison](https://www.gnu.org/software/bison/), [Flex](https://github.com/westes/flex), and [Autoconf](http://www.gnu.org/software/autoconf/).
68-
- GNU [libmpfr](https://www.mpfr.org/) and [libtool](https://www.gnu.org/software/libtool/).
69-
- [Z3](https://github.com/Z3Prover/z3) version 4.12.1
70-
71-
#### Installing Z3
72-
73-
KEVM requires Z3 version 4.12.1, which you may need to install from a source build if your package manager supplies a different version.
74-
To do so, follow the instructions [here](https://github.com/Z3Prover/z3#building-z3-using-make-and-gccclang) after checking out the correct tag in the Z3 repository:
75-
76-
```sh
77-
git clone https://github.com/Z3Prover/z3.git
78-
cd z3
79-
git checkout z3-4.12.1
80-
python scripts/mk_make.py
81-
cd build
82-
make
83-
sudo make install
84-
```
85-
86-
On macOS, it is easiest to install Z3 from Homebrew.
87-
If you wish to install from the source, install it to an appropriate prefix (e.g. `/usr/local` on Intel machines).
8864

8965
#### Ubuntu
9066

9167
On Ubuntu >= 22.04 (for example):
9268

9369
```sh
94-
sudo apt-get install --yes \
95-
autoconf bison clang-12 cmake curl flex gcc jq libboost-test-dev \
96-
libcrypto++-dev libffi-dev libgflags-dev libjemalloc-dev libmpfr-dev \
97-
libprocps-dev libsecp256k1-dev libssl-dev libtool libyaml-dev lld-12 \
98-
llvm-12-tools make maven openjdk-11-jdk pkg-config python3 python3-dev \
99-
python3-pip rapidjson-dev time zlib1g-dev libfmt-dev
70+
sudo apt-get install \
71+
bison \
72+
build-essential \
73+
clang-15 \
74+
cmake \
75+
curl \
76+
flex \
77+
g++ \
78+
gcc \
79+
libboost-test-dev \
80+
libfmt-dev \
81+
libgmp-dev \
82+
libjemalloc-dev \
83+
libmpfr-dev \
84+
libsecp256k1-dev \
85+
libstdc++-12-dev \
86+
libtool \
87+
libyaml-dev \
88+
libz3-dev \
89+
lld-15 \
90+
llvm-15-tools \
91+
m4 \
92+
maven \
93+
openjdk-17-jdk \
94+
pkg-config \
95+
python3 \
96+
python3-dev \
97+
z3 \
98+
zlib1g-dev
10099
```
101100

102101
On Ubuntu < 18.04, you'll need to skip `libsecp256k1-dev` and instead build it from source (via our `Makefile`):
@@ -122,8 +121,27 @@ After installing the Command Line Tools, [Homebrew](https://brew.sh/), and getti
122121

123122
```sh
124123
brew tap runtimeverification/k
125-
brew install java automake libtool gmp mpfr pkg-config maven libffi llvm@14 openssl python bash runtimeverification/k/[email protected] poetry solidity
126-
make libsecp256k1
124+
brew install \
125+
bison \
126+
boost \
127+
cmake \
128+
flex \
129+
fmt \
130+
gcc \
131+
gmp \
132+
openjdk \
133+
jemalloc \
134+
libyaml \
135+
llvm \
136+
make \
137+
maven \
138+
mpfr \
139+
pkg-config \
140+
python \
141+
secp256k1 \
142+
stack \
143+
zlib \
144+
z3
127145
```
128146

129147
**NOTE**: It is recommended to use the homebrew version of `flex` and XCode.
@@ -204,10 +222,10 @@ APPLE_SILICON=true poetry -C kevm-pyk run kdist --verbose build evm-semantics.pl
204222
Finally, you can build the semantics.
205223

206224
```sh
207-
poetry -C kevm-pyk run kdist --verbose build -j4
225+
poetry -C kevm-pyk run kdist --verbose build -j6
208226
```
209227

210-
You can build specific targets using options `evm-semantics.{llvm,haskell,haskell-standalone,plugin}`, e.g.:
228+
You can build specific targets using options `evm-semantics.{llvm,kllvm,kllvm-runtime,haskell,haskell-standalone,plugin}`, e.g.:
211229

212230
```sh
213231
poetry -C kevm-pyk run kdist build -j2 evm-semantics.llvm evm-semantics.haskell

VERIFICATION.md

-112
This file was deleted.

deps/blockchain-k-plugin_release

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b42e6ede9f6b72cedabc519810416e2994caad45
1+
4bbc741e910e41fd6c590edf5488d2b0bcf740e2

deps/k_release

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1.46
1+
7.0.70

deps/pyk_release

-1
This file was deleted.

0 commit comments

Comments
 (0)