Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
add the ability to easily debug with vscode
Browse files Browse the repository at this point in the history
update readme

original run

dockerfile

remove config files
  • Loading branch information
dmikey committed Jan 9, 2024
1 parent 6b77245 commit a38f6ed
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
dist/
dist/
peer-db/
function-db/
77 changes: 77 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Head Node",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/node",
"args": [
"--peer-db",
"/tmp/upt/head-peer-db",
"--function-db",
"/tmp/upt/head-fdb",
"--log-level",
"debug",
"--port",
"9527",
"--role",
"head",
"--workspace",
"/tmp/debug/head",
"--private-key",
"${workspaceFolder}/configs/testkeys/ident1/priv.bin",
"--rest-api",
":8081"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Launch Worker Node",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/node",
"args": [
"--peer-db",
"/tmp/upt/worker-peer-db",
"--function-db",
"/tmp/upt/worker-fdb",
"--log-level",
"debug",
"--port",
"0",
"--role",
"worker",
"--runtime-path",
"/tmp/runtime",
"--runtime-cli",
"bls-runtime",
"--workspace",
"/tmp/debug/worker",
"--private-key",
"${workspaceFolder}/configs/testkeys/ident2/priv.bin",
"--boot-nodes",
"/ip4/0.0.0.0/tcp/9527/p2p/12D3KooWH9GerdSEroL2nqjpd2GuE5dwmqNi7uHX7FoywBdKcP4q"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Launch Manager",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/manager",
"args": [
"-l",
"3333",
"--private-key",
"${workspaceFolder}/configs/testkeys/ident2/priv.bin",
"--allowed-peer",
"QmSz8bJZjg9gWfvrJjYibo4UhSo8dXYtpNRb4kxn28SoHG"
],
"cwd": "${workspaceFolder}"
}
]
}
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ This node allows model providers to participate providing inferences to the Upsh
```
GOOS=linux GOARCH=amd64 make
docker build -f docker/Dockerfile -t upshot:dev --build-arg "ghcr_token=${YOU_GH_TOKEN}" .
```
```

# Debugging Locally Using VSCode.

This project comes with some static identities, as well as debug settings for `VSCode`. Use the `VSCode` debugger to start a head node instance, and a worker node instance.

* Ensure you've installed the Runtime `make setup`
* Start the Head Node First
* Start the Worker Node
1 change: 1 addition & 0 deletions configs/testkeys/ident1/identity
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12D3KooWH9GerdSEroL2nqjpd2GuE5dwmqNi7uHX7FoywBdKcP4q
Binary file added configs/testkeys/ident1/priv.bin
Binary file not shown.
Binary file added configs/testkeys/ident1/pub.bin
Binary file not shown.
1 change: 1 addition & 0 deletions configs/testkeys/ident2/identity
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12D3KooWQrN5U3BApv4JYjE5HyKXFKkRF2U8c5FgK3zMPjzkZTpQ
2 changes: 2 additions & 0 deletions configs/testkeys/ident2/priv.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@��!������Y�����F��g��o�����b\�Mɏd�n
��o}�m���Vz wC��5
Expand Down
2 changes: 2 additions & 0 deletions configs/testkeys/ident2/pub.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
 �b\�Mɏd�n
��o}�m���Vz wC��5

0 comments on commit a38f6ed

Please sign in to comment.