Skip to content

Commit 2d8726f

Browse files
Merge pull request #46 from runtimeverification/deps/bump-komet-v0.1.86
chore(deps): bump komet to v0.1.86
2 parents b5b0642 + 826fcfb commit 2d8726f

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ curl -s http://localhost:8000 -H 'Content-Type: application/json' \
136136
"to": {"type": "address", "addrType": "contract", "value": "6a20fec1a9081773a5f23ce370f925f236346e510438ddd6d40f6b2711c134e0"},
137137
"function": "foo", "args":[], "depth":1, "storage":[]
138138
},
139-
{"pos": 3, "instr": ["const", "i32", 1048576], "stack": [], "locals": {}},
140-
{"pos": 11, "instr": ["const", "i32", 1048576], "stack": [], "locals": {}},
141-
{"pos": 19, "instr": ["const", "i32", 1048576], "stack": [], "locals": {}},
142-
{"pos": null, "instr": ["block"], "stack": [], "locals": {}},
143-
{"pos": 3, "instr": ["const", "i64", 2], "stack": [], "locals": {}},
139+
{"pos": 3, "instr": ["const", "i32", 1048576], "stack": [], "locals": {}, "mem": null},
140+
{"pos": 11, "instr": ["const", "i32", 1048576], "stack": [], "locals": {}, "mem": null},
141+
{"pos": 19, "instr": ["const", "i32", 1048576], "stack": [], "locals": {}, "mem": null},
142+
{"pos": null, "instr": ["block"], "stack": [], "locals": {}, "mem": null},
143+
{"pos": 3, "instr": ["const", "i64", 2], "stack": [], "locals": {}, "mem": null},
144144
{"pos": null, "instr": ["endWasm"], "success":true, "depth":1, "result": {"type": "void"}}
145145
]
146146
}
@@ -159,7 +159,7 @@ The example above only has three of these: `callContract`, instruction records,
159159
Here's what each record type carries:
160160

161161
- `callContract`: logged for each contract call in the transaction, including contract-to-contract calls. Records the caller, the callee, the function name, the arguments, the call depth, and the callee's storage before the call runs.
162-
- Instruction records: logged at each WebAssembly instruction's entry. `pos` is the instruction's byte offset in the binary (`null` for synthetic instructions), `instr` is the instruction and its operands, and `stack`/`locals` are the value stack and locals as `[type, value]` pairs.
162+
- Instruction records: logged at each WebAssembly instruction's entry. `pos` is the instruction's byte offset in the binary (`null` for synthetic instructions), `instr` is the instruction and its operands, and `stack`/`locals` are the value stack and locals as `[type, value]` pairs. `mem` is a snapshot of linear memory as a list of `{addr, bytes}` runs, emitted only when memory changed since the previous record and `null` otherwise (reuse the most recent snapshot).
163163
- `hostCall`: logged when the contract calls a host function. `instr` gives `["hostCall", moduleId, functionId]`, identifying which host function ran. `locals` holds the function's arguments, indexed by position. Host calls don't use the stack, so `stack` is absent.
164164
Here's a `hostCall` record for a call to `put_contract_data`, module id `l`, function id `_`:
165165
```jsonc

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
requires-python = "~=3.10"
1111
dependencies = [
1212
"stellar-sdk>=13.2.1",
13-
"komet@git+https://github.com/runtimeverification/komet.git@v0.1.85",
13+
"komet@git+https://github.com/runtimeverification/komet.git@v0.1.86",
1414
"kframework>=7.1.323,<7.1.324",
1515
]
1616

src/tests/integration/test_server.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,11 @@ def test_trace_transaction_returns_full_instruction_trace_for_foo(server: Stella
503503

504504
# The executed WebAssembly instructions, exactly as shown in the README.
505505
assert trace[1:-1] == [
506-
{'pos': 3, 'instr': ['const', 'i32', 1048576], 'stack': [], 'locals': {}},
507-
{'pos': 11, 'instr': ['const', 'i32', 1048576], 'stack': [], 'locals': {}},
508-
{'pos': 19, 'instr': ['const', 'i32', 1048576], 'stack': [], 'locals': {}},
509-
{'pos': None, 'instr': ['block'], 'stack': [], 'locals': {}},
510-
{'pos': 3, 'instr': ['const', 'i64', 2], 'stack': [], 'locals': {}},
506+
{'pos': 3, 'instr': ['const', 'i32', 1048576], 'stack': [], 'locals': {}, 'mem': None},
507+
{'pos': 11, 'instr': ['const', 'i32', 1048576], 'stack': [], 'locals': {}, 'mem': None},
508+
{'pos': 19, 'instr': ['const', 'i32', 1048576], 'stack': [], 'locals': {}, 'mem': None},
509+
{'pos': None, 'instr': ['block'], 'stack': [], 'locals': {}, 'mem': None},
510+
{'pos': 3, 'instr': ['const', 'i64', 2], 'stack': [], 'locals': {}, 'mem': None},
511511
]
512512

513513
# An endWasm exit frame closes the trace: the call succeeded and returned Void.
@@ -555,8 +555,10 @@ def test_trace_records_have_expected_structure_and_reflect_arguments(server: Ste
555555
instr_records = [record for record in trace if 'locals' in record]
556556
assert instr_records
557557
for record in instr_records:
558-
assert set(record) == {'pos', 'instr', 'stack', 'locals'}
558+
assert set(record) == {'pos', 'instr', 'stack', 'locals', 'mem'}
559559
assert record['pos'] is None or isinstance(record['pos'], int)
560+
# mem is null when linear memory is unchanged since the previous record, else a list of runs.
561+
assert record['mem'] is None or isinstance(record['mem'], list)
560562
assert isinstance(record['instr'], list) and record['instr']
561563
assert isinstance(record['instr'][0], str) # opcode mnemonic
562564
# stack and locals hold [type, value] pairs.

uv.lock

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

0 commit comments

Comments
 (0)