Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,39 @@

set -e

SIMPLE_NETWORKING_URL="https://github.com/zdave-parity/jam-np/blob/main/simple.md"
HOST_CALL_LOG_URL="https://github.com/polkadot-fellows/JIPs/blob/main/JIP-1.md"
JIP2_URL="https://github.com/polkadot-fellows/JIPs/blob/main/JIP-2.md"

# Convert github.com blob URLs to raw.githubusercontent.com URLs
to_raw_url() {
echo "$1" | perl -pe 's|github\.com/(.+?)/(.+?)/blob/(.+)|raw.githubusercontent.com/$1/$2/refs/heads/$3|'
}

BUILD_DATE=$(date +%Y-%m-%d)

mkdir -p node_modules
wget https://raw.githubusercontent.com/zdave-parity/jam-np/refs/heads/main/simple.md -O node_modules/simple.md
wget https://hackmd.io/@polkadot/jip1/download -O node_modules/host-call-log.md
wget https://hackmd.io/@polkadot/jip2/download -O node_modules/jip2-gav.md
wget "$(to_raw_url "$SIMPLE_NETWORKING_URL")" -O node_modules/simple.md
wget "$(to_raw_url "$HOST_CALL_LOG_URL")" -O node_modules/host-call-log.md
wget "$(to_raw_url "$JIP2_URL")" -O node_modules/jip2-gav.md

cp docs/knowledge/simple-networking/spec.md.tmpl docs/knowledge/simple-networking/spec.md
cat node_modules/simple.md >> docs/knowledge/simple-networking/spec.md
perl -pi -e "s/BUILD_DATE/$(date +%Y-%m-%d)/" docs/knowledge/simple-networking/spec.md
perl -pi -e "s|SOURCE_URL|${SIMPLE_NETWORKING_URL}|" docs/knowledge/simple-networking/spec.md
perl -pi -e "s/BUILD_DATE/${BUILD_DATE}/" docs/knowledge/simple-networking/spec.md

cp docs/knowledge/testing/pvm/host-call-log.md.tmpl docs/knowledge/testing/pvm/host-call-log.md
cat node_modules/host-call-log.md >> docs/knowledge/testing/pvm/host-call-log.md
perl -pi -e "s/BUILD_DATE/$(date +%Y-%m-%d)/" docs/knowledge/testing/pvm/host-call-log.md
perl -pi -e "s|SOURCE_URL|${HOST_CALL_LOG_URL}|" docs/knowledge/testing/pvm/host-call-log.md
perl -pi -e "s/BUILD_DATE/${BUILD_DATE}/" docs/knowledge/testing/pvm/host-call-log.md

cp docs/knowledge/rpc/jip2-gav.md.tmpl docs/knowledge/rpc/jip2-gav.md
cat node_modules/jip2-gav.md >> docs/knowledge/rpc/jip2-gav.md
perl -pi -e "s/BUILD_DATE/$(date +%Y-%m-%d)/" docs/knowledge/rpc/jip2-gav.md
perl -pi -e "s|SOURCE_URL|${JIP2_URL}|" docs/knowledge/rpc/jip2-gav.md
perl -pi -e "s/BUILD_DATE/${BUILD_DATE}/" docs/knowledge/rpc/jip2-gav.md
# Fix MDX-incompatible syntax in downloaded JIP-2 content
perl -pi -e 's/<(https?:\/\/[^>]+)>/[$1]($1)/g' docs/knowledge/rpc/jip2-gav.md
perl -pi -e 'if (!/\$|`/) { s/\{/\\{/g; s/\}/\\}/g }' docs/knowledge/rpc/jip2-gav.md

npm run convert-yaml docs/dao/index.md

Expand Down
15 changes: 15 additions & 0 deletions docs/knowledge/jam-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: jam-chain
title: What is JAM?
sidebar_label: What Is JAM?
sidebar_position: 0
slug: /knowledge/jam-chain
---

# JAM Chain

The **J**oin **A**ccumulate **M**achine (JAM) is an invention by Dr Gavin Wood formally specified in the [Gray Paper](https://graypaper.com). It is a blockchain network that will provide permissionless and scalable compute to anyone who pays for it.

## The Gray Paper Is Actually *Gray*

Yes is is not just the name. The original color schema is inspired by the 2000's electronics music album [Lemonjelly.ky](https://en.wikipedia.org/wiki/Lemonjelly.ky). Other color schemas available on [jamcha.in](https://jamcha.in/spec) for your eye's convenience.
639 changes: 437 additions & 202 deletions docs/knowledge/rpc/jip2-gav.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/knowledge/rpc/jip2-gav.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ sidebar_position: 1
slug: /advanced/rpc/jip2-node-rpc
---

(source https://hackmd.io/@polkadot/jip2 from BUILD_DATE)
(fetched from [here](SOURCE_URL) on BUILD_DATE)

<!-- The raw MD from above will be downloaded and appended -->
8 changes: 7 additions & 1 deletion docs/knowledge/simple-networking/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 1
slug: /knowledge/advanced/simple-networking/spec
---

(source https://github.com/zdave-parity/jam-np/blob/main/simple.md from 2025-12-04)
(fetched from [here](https://github.com/zdave-parity/jam-np/blob/main/simple.md) on 2026-02-11)

<!-- The raw MD from above will be downloaded and appended -->
# JAM Simple Networking Protocol (JAMNP-S)
Expand Down Expand Up @@ -805,12 +805,18 @@ On receipt of a new negative judgment for a work-report that the node is respons
- The node should audit the work-report, if it has not already done so, publishing its own judgment
following this.

A negative judgement should include the guarantees supporting the report. This is not needed for positive judgements.
The guarantees is a bounded vector of at most 3 elements, preceded by the guarantees' slot.

```
Validity = 0 (Invalid) OR 1 (Valid) (Single byte)
GuaranteeSignature = Validator Index ++ Ed25519 Signature
Guarantee = Slot ++ len++[GuaranteeSignature] (2 or 3 elements only)

Auditor -> Validator

--> Epoch Index ++ Validator Index ++ Validity ++ Work-Report Hash ++ Ed25519 Signature
--> Guarantee [Optional, this message is present if and only if Validity == 0]
--> FIN
<-- FIN
```
2 changes: 1 addition & 1 deletion docs/knowledge/simple-networking/spec.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 1
slug: /knowledge/advanced/simple-networking/spec
---

(source https://github.com/zdave-parity/jam-np/blob/main/simple.md from BUILD_DATE)
(fetched from [here](SOURCE_URL) on BUILD_DATE)

<!-- The raw MD from above will be downloaded and appended -->

29 changes: 18 additions & 11 deletions docs/knowledge/testing/pvm/host-call-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_label: Log Host Call
sidebar_position: 1
---

(source https://hackmd.io/@polkadot/jip1 from 2025-12-04)
(fetched from [here](https://github.com/polkadot-fellows/JIPs/blob/main/JIP-1.md) on 2026-02-11)

<!-- The raw MD from above will be downloaded and appended -->
# JIP-1: Debug message host call
Expand All @@ -13,15 +13,22 @@ A host call for passing a debugging message from the service/authorizer to the h

## Host-call specification

Index: 100
Name: `log`
Gas usage: 0
Input registers: $\omega_{7\dots+5}$
Output registers: $\{\}$
**Index**: 100

- `level` = $\omega_7$
- `target` = $\begin{cases}\varnothing &\text{when } \omega_8 = 0 \wedge \omega_9 = 0 \\ \mu_{\omega_8\dots+\omega_9} &\text{otherwise}\end{cases}$
- `message` = $\mu_{\omega_{10}\dots+\omega_{11}}$
**Name**: `log`

**Gas usage**: 10 (same as host-call with bad index)

**Input registers**: $\varphi_{7\dots+5}$

- `level` = $\varphi_7$
- `target` = $\varnothing$ if $\varphi_8 = 0 \wedge \varphi_9 = 0$, otherwise $\mu_{\varphi_8\dots+\varphi_9}$
- `message` = $\mu_{\varphi_{10}\dots+\varphi_{11}}$

**Output registers**: $\varphi'_7$

- $\varphi'_7$ = `WHAT`. `WHAT` is always returned so that authorizer/service behaviour is the same
whether or not this JIP is implemented.

### Side-effects

Expand All @@ -43,14 +50,14 @@ Otherwise, express a message to user according to the user-agent.

### Display format for console logging

Note that `<CORE>` is assumed to be the integer index of the core on which the PVM is executing, which may not exist (e.g. in the On-Transfer logic).
Note that `<CORE>` is assumed to be the integer index of the core on which the PVM is executing, which may not exist (e.g. in the Accumulate logic).

Note that `<SERVICE_ID>` is assumed to be the integer index of the service for which the PVM is executing, which may not exist (e.g. in the Is-Authorized logic).


```
<YYYY-MM-DD hh-mm-ss> <LEVEL>[@<CORE>]?[#<SERVICE_ID>]? [<TARGET>]? <MESSAGE>
```
```

#### Example log item

Expand Down
2 changes: 1 addition & 1 deletion docs/knowledge/testing/pvm/host-call-log.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_label: Log Host Call
sidebar_position: 1
---

(source https://hackmd.io/@polkadot/jip1 from BUILD_DATE)
(fetched from [here](SOURCE_URL) on BUILD_DATE)

<!-- The raw MD from above will be downloaded and appended -->

9 changes: 7 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config: Config = {
favicon: 'img/favicon.png',

// Set the production url of your site here
url: 'https://jam-docs.onrender.com',
url: 'https://docs.jamcha.in',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
Expand All @@ -22,7 +22,12 @@ const config: Config = {
projectName: 'jam-docs', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',

markdown: {
hooks: {
onBrokenMarkdownLinks: 'throw',
},
},

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@mdx-js/react": "^3.1.1",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0"
},
Expand Down
Loading