File tree 1 file changed +42
-1
lines changed
1 file changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ go run ./cmd/main.go -node=Node1 -port=<PORT> -ip=<IP> -coding=<RS/LT>
12
12
```
13
13
14
14
Manual running - Retriever Node:
15
-
16
15
``` bash
17
16
go run ./cmd/main.go -node=< Node$id > -port=< PORT> -ip=< IP> -coding=< RS/LT>
18
17
```
@@ -25,4 +24,46 @@ Automatic running (Prefered):
25
24
Stop all the nodes:
26
25
``` terminal
27
26
ps aux | grep go | grep -v grep | awk '{print $2}' | xargs kill -9
27
+ ```
28
+
29
+
30
+ Config:
31
+
32
+ ``` go
33
+ const (
34
+ ExpectedChunks = 6
35
+ )
36
+
37
+ // Reed-Solomon parameters
38
+ const (
39
+ DataShards = 5
40
+ ParityShards = 3
41
+ )
42
+
43
+ // Luby-Transform parameters
44
+ const (
45
+ LTSourceBlocks = 5
46
+ LTEncodedBlockCount = 7
47
+ RandomSeed = 42
48
+ )
49
+
50
+ var (
51
+ NodeID string
52
+ CodingMethod string
53
+ Nodes = 10
54
+ ReceivedChunks = sync.Map {}
55
+ SentChunks = sync.Map {}
56
+ NodeMutex = sync.Mutex {}
57
+ ConnectedPeers []peer.AddrInfo
58
+ Node1ID peer.ID
59
+ ReceivedFrom = sync.Map {}
60
+ Counter = 0
61
+ // Must be changed to the coding method
62
+ // if LT then it should be LTEncodedBlockCount
63
+ // if RS then it should be DataShards + ParityShards
64
+ ChunksRecByNode = make ([][]byte , DataShards +ParityShards)
65
+ ReadyCounter = 0
66
+ StartTime time.Time
67
+ OriginalLength = 29283680
68
+ )
28
69
```
You can’t perform that action at this time.
0 commit comments