Skip to content

Commit

Permalink
Upgrade to latest dscp-node (#33)
Browse files Browse the repository at this point in the history
* Upgrade to latest dscp-node

* Bump versions

* Remove unused vars
  • Loading branch information
mattdean-digicatapult authored Jul 12, 2022
1 parent 332e703 commit 7d87632
Show file tree
Hide file tree
Showing 10 changed files with 1,052 additions and 715 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ npm run dev
| IPFS_EXECUTABLE | N | `ipfs` | Executable to use to run go-ipfs |
| IPFS_ARGS | N | `["daemon"]` | JSON array of strings to pass as arguments to the `IPFS_EXECUTABLE` |
| IPFS_LOG_LEVEL | N | `info` | Log level of the go-ipfs child process |
| METADATA_KEY_LENGTH | N | `32` | Metadata key length in the substrate node |
| METADATA_VALUE_LITERAL_LENGTH | N | `32` | Metadata literal value length limit in the substrate node |
| PROCESS_IDENTIFIER_LENGTH | N | `32` | Process ID Length |
3 changes: 0 additions & 3 deletions app/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ const vars = envalid.cleanEnv(
}),
IPFS_ARGS: validateArgs({ default: '["daemon"]' }),
IPFS_LOG_LEVEL: envalid.str({ default: 'info', devDefault: 'debug' }),
METADATA_KEY_LENGTH: envalid.num({ default: 32 }),
METADATA_VALUE_LITERAL_LENGTH: envalid.num({ default: 32 }),
PROCESS_IDENTIFIER_LENGTH: envalid.num({ default: 32 }),
HEALTHCHECK_POLL_PERIOD_MS: envalid.num({ default: 30 * 1000, devDefault: 1000 }),
HEALTHCHECK_TIMEOUT_MS: envalid.num({ default: 2 * 1000, devDefault: 1000 }),
},
Expand Down
11 changes: 1 addition & 10 deletions app/keyWatcher/api.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
const { buildApi } = require('@digicatapult/dscp-node')

const {
NODE_HOST,
NODE_PORT,
METADATA_KEY_LENGTH,
METADATA_VALUE_LITERAL_LENGTH,
PROCESS_IDENTIFIER_LENGTH,
} = require('../env')
const { NODE_HOST, NODE_PORT } = require('../env')

const createNodeApi = async () => {
const { api, keyring } = buildApi({
options: {
apiHost: NODE_HOST,
apiPort: NODE_PORT,
metadataKeyLength: METADATA_KEY_LENGTH,
metadataValueLiteralLength: METADATA_VALUE_LITERAL_LENGTH,
processorIdentifierLength: PROCESS_IDENTIFIER_LENGTH,
},
})

Expand Down
5 changes: 1 addition & 4 deletions app/keyWatcher/keyWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ const setupKeyWatcher =
events.forEach((record) => {
// Extract the phase, event and the event types
const { event } = record
const { data, typeDef: types } = event

if (api.isEventKeyUpdate(event)) {
const keyIndex = types.findIndex(({ type }) => type === 'Key')
onKeyUpdate(data[keyIndex])
onKeyUpdate(event.data[0])
}
})
})
Expand Down
6 changes: 3 additions & 3 deletions helm/dscp-ipfs/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: dscp-node
repository: https://digicatapult.github.io/dscp-node/
version: 3.8.0
digest: sha256:6525c15a6c7106f048b6592f6b2c871cf774d4305507ad91f22a07d56b468c39
generated: "2022-07-12T10:07:48.897446+01:00"
version: 4.0.0
digest: sha256:75cd1f032cbcfa1222df6c5058cb82e3933d6646f317d5111e3f4082bcd29306
generated: "2022-07-12T13:42:53.570998+01:00"
6 changes: 3 additions & 3 deletions helm/dscp-ipfs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v2
name: dscp-ipfs
appVersion: '2.2.0'
appVersion: '2.3.0'
description: A Helm chart for dscp-ipfs
version: '2.2.0'
version: '2.3.0'
type: application
dependencies:
- name: dscp-node
version: '3.8.0'
version: '4.0.0'
repository: https://digicatapult.github.io/dscp-node/
condition: dscpNode.enabled
alias: dscpNode
Expand Down
2 changes: 1 addition & 1 deletion helm/dscp-ipfs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ statefulSet:
image:
repository: ghcr.io/digicatapult/dscp-ipfs
pullPolicy: IfNotPresent
tag: 'v2.2.0'
tag: 'v2.3.0'

storage:
storageClass: ""
Expand Down
Loading

0 comments on commit 7d87632

Please sign in to comment.