Skip to content

Commit bb32dcf

Browse files
committed
Phase 1 SUCCESSFUL
1 parent d5ab850 commit bb32dcf

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,37 @@ join our [telegram](https://t.me/joinchat/CgTftxXJvp6iYayqDjP7lQ) or [gitter](ht
88
### Building
99

1010
clone
11-
`git clone https://github.com/ninabreznik/service.js.git`
11+
`git clone https://github.com/playproject-io/datdot-service.git`
1212

1313
change directory
1414
`cd service`
1515

1616
install dependencies
1717
`npm install`
1818

19+
To run the service, you will also need to run the [datdot-substrate](https://github.com/playproject-io/datdot-substrate) chain
20+
21+
clone
22+
`git clone `git clone https://github.com/playproject-io/datdot-substrate.git`
23+
24+
build
25+
`cargo build -p datdot-node --release`
26+
27+
purge storage
28+
`./target/release/datdot-node purge-chain --dev`
29+
1930
### Running
2031

21-
Currently you can only run the scenarios, stored in /lab folder.
32+
We are using scenarios to debug the flow. This scenario is part of our first milestone (Phase 1).
33+
34+
1. To run the chain and the service process at once use the command `node cli.js` (recommended)
35+
36+
2. To run the chain and the service process individually, use:
2237

23-
To run a scenario, run `node lab/scenarios/<some-scenario>`, for example `DEBUG=*,-hypercore-protocol node lab/scenarios/mvp-1.js `.
38+
$`DEBUG=*,-hypercore-protocol node lab/scenarios/mvp-1.js` (for [datdot-service](https://github.com/playproject-io/datdot-service))
39+
$`.target/release/datdot-node --dev` ([datdot-substrate](https://github.com/playproject-io/datdot-substrate))
2440

25-
We are using scenarios to debug the flow. Current scenarios are working only with the chain simulation (simulate-chain.js).
41+
3. To re-run the scenario, you will need to purge the chain storage (for `./target/release/datdot-node purge-chain --dev`)
2642

2743

2844
## License

cli.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
const spawn = require('cross-spawn')
22
const path = require('path')
33

4-
const command1 = path.join(__dirname, '../substrate/target/datdot-node')
4+
process.env.DEBUG = '*,-hypercore-protocol'
5+
6+
const command1 = path.join(__dirname, '../substrate/target/release/datdot-node')
57
const child1 = spawn(command1, ['--dev'], { stdio: 'inherit' })
68

7-
const args = [path.join(__dirname, 'lab/scenarios/service-mvp.js')] // work in progress
9+
const args = [path.join(__dirname, 'lab/scenarios/mvp-1.js')] // work in progress
810
const child2 = spawn('node', args, { stdio: 'inherit' })

src/types.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"AttestationId": "u32",
1313
"NoiseKey": "Public",
1414
"FeedKey": "Public",
15-
"Proof": "Vec<u8>",
15+
"Proof": "Public",
1616
"Ranges": "Vec<(ChunkIndex, ChunkIndex)>",
1717
"Nonce": "u64",
1818
"Role": {

0 commit comments

Comments
 (0)