Skip to content

Commit a6ada60

Browse files
authored
Experimental DeltaQ analysis of transaction lifecycle (#311)
* Nix flake for Jupyter environment with Haskell deltaq * Completed (non-QAed) delta-q analysis of tx lifecycle * Updated logbook
1 parent 457764e commit a6ada60

File tree

7 files changed

+9104
-0
lines changed

7 files changed

+9104
-0
lines changed

Logbook.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Leios logbook
22

3+
## 2025-04-28
4+
5+
### Delta-QSD analysis of transaction lifecycle
6+
7+
An experimental Delta-QSD expression was created for computing the delay between transaction submission and its referencing by a Praos block: see [analysis/deltaq/tx-lifecycle.ipynb](analysis/deltaq/tx-lifecycle.ipynb).
8+
39
## 2025-04-25
410

511
### Draft CIP

analysis/deltaq/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.jupyter/
2+
.ipynb_checkpoints/

analysis/deltaq/Installation.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Jupyter kernel for DeltaQ
2+
3+
A customized Jupyter iHaskell kernel for use with the [deltaq](https://github.com/DeltaQ-SD/deltaq) tool.
4+
5+
6+
## Running a Jupyter server using Nix
7+
8+
Launch Jupyter with the iHaskell kernel including the `deltaq` and `probability-polynomial` packages:
9+
10+
```bash
11+
nix run
12+
```
13+
14+
In fact, this Jupyter kernel can be launced without directly cloning this repository:
15+
16+
```bash
17+
nix run github:functionally/deltaq-jupyter
18+
```
19+
20+
## Docker
21+
22+
23+
### Building a docker image using Nix
24+
25+
First build the image.
26+
27+
```console
28+
$ nix build -o deltaq-jupyter-docker.tar.gz ".#docker"
29+
30+
$ docker load --quiet < deltaq-jupyter-docker.tar.gz
31+
Loaded image: localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k
32+
```
33+
34+
35+
### Push to docker registry
36+
37+
You can push the image to a registry.
38+
39+
```bash
40+
docker push localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k \
41+
docker.io/bwbush/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k
42+
```
43+
44+
45+
### Run the server in docker.
46+
47+
You can run the local image, exposing the service on port 9999 for example. The container should have at least 4 GB of memory and two CPUs, but larger computations require more memory. If you deploy this on kubernetes, you can use the HTTP path `/api` as the health check.
48+
49+
Locally,
50+
51+
```bash
52+
docker run --publish 9999:8888 localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34kj4bn42k
53+
```
54+
55+
or from DockerHub,
56+
57+
```bash
58+
docker run --publish 9999:8888 ghcr.io/functionally/deltaq-jupyter:latest
59+
```
60+
61+
The default password is `deltaq`: you can change this by visiting http://localhost:9999/lab in a web browser. Alternatively, you can use with the default password by visiting http://localhost:9999/lab?token=deltaq.
62+
63+
Use the "upload" and "download" features to move notebooks in and out of the container.
64+
65+
66+
## Updates
67+
68+
In order to use the latest version of the `deltaq` packages, update the nix flake.
69+
70+
```bash
71+
nix flake lock --update-input deltaq
72+
```

0 commit comments

Comments
 (0)