-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.txt
More file actions
75 lines (53 loc) · 1.85 KB
/
Copy pathdocumentation.txt
File metadata and controls
75 lines (53 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
==========NOTICE==========
/*
create app configuration file in root folder
filename = config.js
format as below:
*/
var config = {};
config.port = "3002"; //the port you want to listen to
config.tracker_url = "http://localhost:3001/api/nodes"; //your own tracker server
config.first_proof = 100; //cache size
module.exports = config;
==========future improvements==========
Decoupling of functions
Decoupling of routes in separate files
Web frontend
TLS
Appropriate HTTP status and return structure
Naming of variables in json return data
Create log files
Export private key as PEM file
Import private key PEM file on initiation
==========frontend APIs==========
POST /api/frontend/users - TESTING
GET /api/frontend/transactions - DONE
POST /api/frontend/transactions - DONE
GET /api/frontend/nodes - DONE
GET /api/frontend/mine - DONE
GET /api/frontend/catalog" - DONE
==========peer APIs==========
POST /api/nodes - TESTING
POST /api/transactions - TESTING
POST /api/blockchain - TESTING
GET /api/blockchain - DONE
==========blockchain_util functions==========
hash: function(object) - DONE
valid_proof: function(prev_proof, cur_proof) - DONE
valid_chain: function(chain) - DONE
mine_proof: function(prev_proof) - DONE
valid_trans: function(trans) - DONE
verify_sig: function(trans, sig, public_key) - DONE
broadcast_trans: function(trans) - DONE
create_block: function(cur_proof) - DONE
get_last_block: function() - DONE
fetch_chain: function() - TESTING
send_chain: function(url) - TESTING
broadcast_chain: function() - DONE
resolve_conflict: function(chain, url) - DONE
render_catalog: function() - DONE
get_catalog: function() - DONE
==========node_util functions==========
init_node: function(username) - DONE
register_node: function(url) - DONE
get_address: function(req) - DONE