You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-24Lines changed: 53 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,21 +16,13 @@
16
16
17
17
## 🌟 Overview
18
18
19
-
`komet-node`is designed for Soroban developers who need advanced debugging capabilities. It extends the standard Stellar RPC with a `traceTransaction` method that provides instruction-level execution traces. The node's ledger state can be saved to and restored from a single file, enabling developers to reproduce exact network conditions and deterministically replay transactions.
19
+
`komet-node` extends the standard Stellar RPC with a `traceTransaction` method that provides instruction-level execution traces. The node's ledger state can be saved to and restored from a single file, allowing the same ledger state to be reproduced and transactions to be replayed.
20
20
21
21
## 🚀 Quick Start
22
22
23
23
### Installation
24
24
25
-
Pick the method that matches how you intend to use `komet-node`:
26
-
27
-
| You are a… | Use |
28
-
|---|---|
29
-
| User who wants the `komet-node` binary |[**kup**](#install-with-kup-recommended) (recommended) |
30
-
| User who prefers containers |[**Docker**](#run-with-docker)|
31
-
| Developer hacking on `komet-node`|[**Dev Container**](#develop-with-the-dev-container)|
32
-
33
-
#### Install with kup (recommended)
25
+
#### Install with kup
34
26
35
27
`komet-node` is distributed through [`kup`](https://github.com/runtimeverification/kup), Runtime Verification's Nix-based package manager. It pulls prebuilt binaries (including the matching K Framework and kompiled semantics) from RV's binary cache, so there is nothing to compile.
36
28
@@ -49,7 +41,7 @@ To upgrade later, run `kup update komet-node`.
49
41
50
42
#### Run with Docker
51
43
52
-
A prebuilt image is published to Docker Hub for each release. It bundles K, the kompiled semantics, and `komet-node` ready to serve.
44
+
Alternatively, a prebuilt image is published to Docker Hub for each release. It bundles K, the kompiled semantics, and `komet-node` ready to serve.
53
45
54
46
```bash
55
47
# Pull the image (replace the tag with the release you want)
@@ -87,7 +79,7 @@ On first start the server creates an empty `state.kore`. Delete that file to res
87
79
88
80
#### Verify the server with `curl`
89
81
90
-
The server is operated via the Stellar RPC protocol. The read-only methods below take no transaction payload, which makes them perfect for a quick health check:
82
+
The server is operated via the Stellar RPC protocol. The read-only methods below take no transaction payload and can be used as a quick health check:
Submitting transactions uses the standard two-step Stellar pattern — `sendTransaction` with a base64 XDR envelope, then poll `getTransaction` by hash:
108
+
Submitting transactions uses the standard two-step Stellar pattern — `sendTransaction` with a base64 XDR envelope, then poll `getTransaction` by hash. Because there is no mempool, `komet-node` executes the transaction synchronously inside `sendTransaction`, so the result is already available by the time you poll. The trace example below shows this flow end-to-end with ready-to-run envelopes; see [docs/server.md](docs/server.md) for the full RPC reference.
109
+
110
+
#### Trace a transaction
111
+
112
+
`traceTransaction` executes a transaction and returns an instruction-level execution trace inline, in a single call. Tracing only applies to contract invocations, so the server must be started with `--trace`:
117
113
118
114
```bash
119
-
# Submit a signed transaction (XDR envelope produced by a Stellar SDK)
A trace requires a deployed contract. The four envelopes below are pre-built and signed (a tiny contract whose `foo()` returns void, deployed from a fixed key) so you can paste them straight in — the local node does not check signatures, sequence numbers, or timebounds, so they work as-is on a fresh chain. Run them in order against the server above.
The final call returns the result inline. The `trace` field is itself a JSONL string (one JSON record per executed WebAssembly instruction); it is shown decoded here for readability:
Because there is no mempool, `komet-node` executes the transaction synchronously inside `sendTransaction`; the result is already available by the time you poll. See [docs/server.md](docs/server.md) for the full RPC reference, including the `traceTransaction` method.
161
+
Each trace record captures the VM state at instruction 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. See [docs/interpreter.md](docs/interpreter.md) for the full trace format.
0 commit comments