Skip to content

Commit 94ae57f

Browse files
rv-jenkinsrv-auditortothtamas28
authored
Update dependency: deps/kevm_release (#1139)
* deps/kevm_release: Set Version 1.0.901 * Sync uv files: kevm-pyk version 1.0.901 * deps/k_release: sync release file version 7.1.322 * flake.{nix,lock}: update Nix derivations * Update custom step function signatures * Update expected output * Fix warnings in `Dockerfile` * Split `RUN` command, reduce number of `kdist` workers * Pin `foundry` version in `Dockerfile` --------- Co-authored-by: devops <devops@runtimeverification.com> Co-authored-by: Tamás Tóth <tothtamas28@users.noreply.github.com>
1 parent e3ea776 commit 94ae57f

59 files changed

Lines changed: 2068 additions & 1262 deletions

File tree

Some content is hidden

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

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ARG Z3_VERSION
22
ARG K_VERSION
3-
FROM runtimeverificationinc/z3:ubuntu-jammy-${Z3_VERSION} as Z3
3+
FROM runtimeverificationinc/z3:ubuntu-jammy-${Z3_VERSION} AS z3
44

55
ARG K_VERSION
66
FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_VERSION}
77

88
ARG PYTHON_VERSION=3.10
99

1010
# Upgrade z3 to match the version Kontrol was built with not minimum version used in K.
11-
COPY --from=Z3 /usr/bin/z3 /usr/bin/z3
11+
COPY --from=z3 /usr/bin/z3 /usr/bin/z3
1212

1313
RUN apt-get -y update \
1414
&& apt-get -y install \
@@ -31,9 +31,10 @@ RUN groupadd -g ${GROUP_ID} user \
3131
USER user
3232
WORKDIR /home/user
3333

34+
ARG FOUNDRY_VERSION=v1.5.1
3435
ENV PATH=/home/user/.foundry/bin:${PATH}
3536
RUN curl -L https://foundry.paradigm.xyz | bash \
36-
&& foundryup
37+
&& foundryup --install ${FOUNDRY_VERSION}
3738

3839
ADD . kontrol
3940
USER root
@@ -42,5 +43,6 @@ USER user
4243

4344
ENV PATH=/home/user/.local/bin:${PATH}
4445
RUN pip install ./kontrol \
45-
&& rm -rf kontrol \
46-
&& CXX=clang++-14 kdist --verbose build -j4
46+
&& rm -rf kontrol
47+
48+
RUN CXX=clang++-14 kdist --verbose build -j3

deps/k_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.318
1+
7.1.322

deps/kevm_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.896
1+
1.0.901

flake.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4";
66
nixpkgs.follows = "rv-nix-tools/nixpkgs";
77

8-
kevm.url = "github:runtimeverification/evm-semantics/v1.0.896";
8+
kevm.url = "github:runtimeverification/evm-semantics/v1.0.901";
99
kevm.inputs.nixpkgs.follows = "nixpkgs";
1010

1111
k-framework.follows = "kevm/k-framework";

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version = "1.0.0"
88
description = "Foundry integration for KEVM"
99
requires-python = "~=3.10"
1010
dependencies = [
11-
"kevm-pyk@git+https://github.com/runtimeverification/evm-semantics.git@v1.0.896#subdirectory=kevm-pyk",
11+
"kevm-pyk@git+https://github.com/runtimeverification/evm-semantics.git@v1.0.901#subdirectory=kevm-pyk",
1212
"eth-utils>=5,<6",
1313
"pycryptodome>=3.20.0,<4",
1414
"pyevmasm>=0.2.3,<0.3",

src/kontrol/foundry.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,13 @@ def _console_log_pattern(self) -> KSequence:
158158
def _ffi_pattern(self) -> KSequence:
159159
return KSequence([KApply('ffi_shell', KVariable('###CMD')), KVariable('###CONTINUATION')])
160160

161-
def _exec_rename_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermSymbolic) -> KCFGExtendResult | None:
161+
def _exec_rename_custom_step(
162+
self,
163+
subst: Subst,
164+
cterm: CTerm,
165+
_c: CTermSymbolic,
166+
_node_id: int,
167+
) -> KCFGExtendResult | None:
162168
# Extract the target var and new name from the substitution
163169
target_var = subst['###RENAME_TARGET']
164170
name_token = subst['###NEW_NAME']
@@ -182,12 +188,17 @@ def _exec_rename_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermSymbolic
182188
return Step(CTerm(new_cterm.config, constraints), 1, (), ['foundry_rename'], cut=True)
183189

184190
def _exec_forget_custom_step(
185-
self, subst: Subst, cterm: CTerm, cterm_symbolic: CTermSymbolic
191+
self,
192+
subst: Subst,
193+
cterm: CTerm,
194+
cterm_symbolic: CTermSymbolic,
195+
_node_id: int,
186196
) -> KCFGExtendResult | None:
187197
"""Remove the constraint at the top of K_CELL of a given CTerm from its path constraints,
188198
as part of the 'FOUNDRY-ACCOUNTS.forget' cut-rule.
189199
:param cterm: CTerm representing a proof node
190200
:param cterm_symbolic: CTermSymbolic instance
201+
:param _node_id: Current node id (unused)
191202
:return: A Step of depth 1 carrying a new configuration in which the constraint is consumed from the top
192203
of the K cell and is removed from the initial path constraints if it existed, together with
193204
information that the `cheatcode_forget` rule has been applied.
@@ -293,7 +304,13 @@ def _filter_constraints_by_simplification(
293304
new_cterm = CTerm.from_kast(set_cell(cterm.kast, 'K_CELL', KSequence(subst['###CONTINUATION'])))
294305
return Step(CTerm(new_cterm.config, new_constraints), 1, (), ['cheatcode_forget'], cut=True)
295306

296-
def _exec_console_log_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermSymbolic) -> KCFGExtendResult | None:
307+
def _exec_console_log_custom_step(
308+
self,
309+
subst: Subst,
310+
cterm: CTerm,
311+
_c: CTermSymbolic,
312+
_node_id: int,
313+
) -> KCFGExtendResult | None:
297314
selector_token = subst['###SELECTOR']
298315
data = subst['###DATA']
299316
assert type(selector_token) is KToken
@@ -314,7 +331,13 @@ def _exec_console_log_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermSym
314331
new_cterm = CTerm.from_kast(set_cell(cterm.kast, 'K_CELL', KSequence(subst['###CONTINUATION'])))
315332
return Step(CTerm(new_cterm.config, cterm.constraints), 1, (), ['console.log'], cut=True)
316333

317-
def _exec_ffi_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermSymbolic) -> KCFGExtendResult | None:
334+
def _exec_ffi_custom_step(
335+
self,
336+
subst: Subst,
337+
cterm: CTerm,
338+
_c: CTermSymbolic,
339+
_node_id: int,
340+
) -> KCFGExtendResult | None:
318341
"""Execute vm.ffi() cheatcode by running external commands and encoding their output as ABI bytes.
319342
320343
This function decodes the command from the ABI-encoded string array, executes it as a subprocess, and processes
@@ -325,6 +348,7 @@ def _exec_ffi_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermSymbolic) -
325348
:param subst: Substitution containing the values obtained by matching the `self._ffi_pattern`.
326349
:param cterm: Current configuration term representing the EVM state.
327350
:param _c: Symbolic configuration term (unused).
351+
:param _node_id: Current node id (unused).
328352
:return: None if FFI is disabled. Otherwise, Step with OUTPUT_CELL set to ABI-encoded result and updated K_CELL
329353
continuation, tagged with 'kontrol.ffi.success'.
330354
"""

src/tests/integration/test-data/show/AddConst.applyOp(uint256).cse.expected

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
┌─ 1 (root, split, init)
3-
│ k: #execute ~> CONTINUATION:K
3+
│ k: #execute ~> CONTINUATION:K ~> .K
44
│ pc: 0
55
│ callDepth: CALLDEPTH_CELL:Int
66
│ statusCode: STATUSCODE:StatusCode
@@ -13,7 +13,7 @@
1313
┃ ┃ KV0_x:Int <=Int ( maxUInt256 -Int #lookup ( C_ADDCONST_STORAGE:Map , 0 ) )
1414
┃ │
1515
┃ ├─ 8
16-
┃ │ k: #execute ~> CONTINUATION:K
16+
┃ │ k: #execute ~> CONTINUATION:K ~> .K
1717
┃ │ pc: 0
1818
┃ │ callDepth: CALLDEPTH_CELL:Int
1919
┃ │ statusCode: STATUSCODE:StatusCode
@@ -22,7 +22,7 @@
2222
┃ │
2323
┃ │ (446 steps)
2424
┃ ├─ 6 (terminal)
25-
┃ │ k: #halt ~> CONTINUATION:K
25+
┃ │ k: #halt ~> CONTINUATION:K ~> .K
2626
┃ │ pc: 87
2727
┃ │ callDepth: CALLDEPTH_CELL:Int
2828
┃ │ statusCode: EVMC_SUCCESS
@@ -35,7 +35,7 @@
3535
</acctID> in_keys ( ACCOUNTS_REST:AccountCellMap ) )
3636
┃ ┊ subst: ...
3737
┃ └─ 2 (leaf, target, terminal)
38-
┃ k: #halt ~> CONTINUATION:K
38+
┃ k: #halt ~> CONTINUATION:K ~> .K
3939
┃ pc: PC_CELL_5d410f2a:Int
4040
┃ callDepth: CALLDEPTH_CELL_5d410f2a:Int
4141
┃ statusCode: STATUSCODE_FINAL:StatusCode
@@ -45,7 +45,7 @@
4545
┃ ( maxUInt256 -Int #lookup ( C_ADDCONST_STORAGE:Map , 0 ) ) <Int KV0_x:Int
4646
4747
├─ 9
48-
│ k: #execute ~> CONTINUATION:K
48+
│ k: #execute ~> CONTINUATION:K ~> .K
4949
│ pc: 0
5050
│ callDepth: CALLDEPTH_CELL:Int
5151
│ statusCode: STATUSCODE:StatusCode
@@ -54,7 +54,7 @@
5454
5555
│ (371 steps)
5656
├─ 7 (terminal)
57-
│ k: #halt ~> CONTINUATION:K
57+
│ k: #halt ~> CONTINUATION:K ~> .K
5858
│ pc: 179
5959
│ callDepth: CALLDEPTH_CELL:Int
6060
│ statusCode: EVMC_REVERT
@@ -67,7 +67,7 @@
6767
</acctID> in_keys ( ACCOUNTS_REST:AccountCellMap ) )
6868
┊ subst: ...
6969
└─ 2 (leaf, target, terminal)
70-
k: #halt ~> CONTINUATION:K
70+
k: #halt ~> CONTINUATION:K ~> .K
7171
pc: PC_CELL_5d410f2a:Int
7272
callDepth: CALLDEPTH_CELL_5d410f2a:Int
7373
statusCode: STATUSCODE_FINAL:StatusCode
@@ -83,6 +83,7 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0
8383
<k>
8484
( #execute => #halt )
8585
~> _CONTINUATION:K
86+
~> .K
8687
</k>
8788
<mode>
8889
NORMAL
@@ -256,6 +257,7 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0
256257
<k>
257258
( #execute => #halt )
258259
~> _CONTINUATION:K
260+
~> .K
259261
</k>
260262
<mode>
261263
NORMAL

0 commit comments

Comments
 (0)