Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First runable code with preliminary testing #13

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
840cc09
Update README.md
yingweiwang Jul 27, 2018
d81bcbe
basic introduction
Jul 27, 2018
038b46d
File structure change, redefine transactions and accounts
Jul 28, 2018
f2f4dcc
transaction to account
Aug 2, 2018
a2876c6
ignore node/
Aug 2, 2018
f4eb05b
updated to fit the cloud-dew folers
Aug 2, 2018
6cc596f
Revert "ignore node/"
Aug 2, 2018
09d333d
conform with master
Aug 2, 2018
610438d
finished draft change for transaction.ts
Aug 4, 2018
6b4ab70
changed 4 files
Aug 5, 2018
195b317
change transactionPool.ts
Aug 5, 2018
1ecfa46
first working code
Aug 7, 2018
2153ff4
licenses and ignore
Aug 7, 2018
160d9c0
invalid tx dealt with
Aug 7, 2018
718146f
update readme
Aug 7, 2018
514e16b
ignore
Aug 7, 2018
19fabf4
fully working, similar to original.
Aug 7, 2018
0310807
ignore
Aug 7, 2018
a9b79e8
cleanup
Aug 7, 2018
bde8f7e
ignore
Aug 7, 2018
3381550
connection between cloud and dew. config and web control
Aug 8, 2018
fce73c4
cloud-dew channel established
Aug 9, 2018
ae95a7c
Dew address web control
Aug 9, 2018
c3ee207
dew mode and local mode both work
Aug 11, 2018
8ea4aca
cloud and dew coordinated
Aug 11, 2018
17712f9
cloud-dew channel accounts messaging added
Aug 11, 2018
4e06bf0
ALTERNATE_ADDRESS message added
Aug 12, 2018
f96b59b
ready for two machine debugging
Aug 12, 2018
b458923
Two machine initial test OK
yingweiwang Aug 12, 2018
6617932
Mine in cloud added
Aug 13, 2018
7d27155
handshaking changed
yingweiwang Aug 13, 2018
174471a
Update Readme
yingweiwang Aug 13, 2018
c9a63eb
Merge branch 'master' into working
yingweiwang Aug 13, 2018
4c8107e
Improved mode switching
yingweiwang Aug 13, 2018
56f4c0b
Merge branch 'working' of https://github.com/yingweiwang/dewcoin into…
yingweiwang Aug 13, 2018
2d7b9bb
Rename
yingweiwang Aug 14, 2018
28afbcc
config files
yingweiwang Aug 14, 2018
fd6dc57
Change package names
yingweiwang Sep 8, 2018
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
15 changes: 10 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
node_modules
npm-debug.log
.idea
src/*.js
src/*.map
Dewblock-cloud-server/node_modules
Dewblock-cloud-server/npm-debug.log
Dewblock-cloud-server/src/*.js
Dewblock-cloud-server/src/*.map
Dewblock-dew-server/node_modules
Dewblock-dew-server/npm-debug.log
Dewblock-dew-server/src/*.js
Dewblock-dew-server/src/*.map


File renamed without changes.
71 changes: 71 additions & 0 deletions Dewblock-cloud-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Dewblock-cloud-server Package

This package has no modes. Dewblock-cloud-server behaves like Naivecoin. Especially, it provides the whole blockchain to other nodes to fulfil the responsibility a full blockchain node. It also uses the complete blochchain to garantee the accuracy of all the transactions.


#### Installation and System Start

```
npm install
npm start
```

##### Set Dew Server Address
```
curl -H "Content-type:application/json" --data '{"address" : "192.168.1.186"}' http://localhost:3001/setdewaddress
```
For Windows:
```
curl -H "Content-type:application/json" --data "{\"address\" : \"192.168.1.186\"}" http://localhost:3001/setdewaddress
```

##### Query the whole blockchain
```
curl http://localhost:3001/blocks
```

##### Query all accounts

```
curl http://localhost:3001/accounts
```

##### Query the transaction pool
```
curl http://localhost:3001/transactionPool
```


#### Query all connected peers
```
curl http://localhost:3001/peers
```


##### Query a block with block hash

```
curl http://localhost:3001/block/:hash
```
In dew mode, this is useless.



##### Query a transaction with transaction id

```
curl http://localhost:3001/transaction/:id
```
In dew mode, this is useless.


##### Query an account with account address

```
curl http://localhost:3001/account/:address
```

#### Stop the server
```
curl -X POST http://localhost:3001/stop
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading