You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75-2Lines changed: 75 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ To stop Geth, **`crtl+C`** in the terminal window, if you proceed with the start
71
71
``./shyft-geth.sh --start`` Starts GETH
72
72
73
73
To see transactions being submitted on the network see the sendTransactions command in the CLI section of this readme.
74
+
74
75
#### Docker Images
75
76
76
77
Two sets of Docker Images are available for ShyftGeth, the Postgresql Database, and the Shyft Blockchain Explorer, which can be used for local development and testnet connection. The development settings are included in docker-compose.yml, the testnet settings are included in docker-compose.production.yml. To launch these containers you will need to have docker-compose installed on your computer. Installation instructions for docker-compose are available [here](https://docs.docker.com/install/).
@@ -94,6 +95,7 @@ To stop/pause mining - enter:
94
95
**`docker-compose stop`**
95
96
96
97
And then just issue `docker-compose up` to continue mining.
98
+
97
99
#### Docker Postgresql - DB Connection
98
100
From your local machine you can view the database by connecting to the database in the container at
99
101
**``127.0.0.1:8001``**
@@ -225,7 +227,7 @@ For prerequisites and detailed build instructions please read the
Building geth requires both a Go (version 1.7 or later) and a C compiler.
230
+
Building geth requires both a Go (version 1.9 or later) and a C compiler.
229
231
You can install them using your favourite package manager.
230
232
Once the dependencies are installed, run
231
233
@@ -375,7 +377,7 @@ HTTP based JSON-RPC API options:
375
377
-`--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it)
376
378
377
379
You'll need to use your own programming environments' capabilities (libraries, tools, etc) to connect
378
-
via HTTP, WS or IPC to a Geth node configured with the above flags and you'll need to speak [JSON-RPC](http://www.jsonrpc.org/specification)
380
+
via HTTP, WS or IPC to a Geth node configured with the above flags and you'll need to speak [JSON-RPC](https://www.jsonrpc.org/specification)
379
381
on all transports. You can reuse the same connection for multiple requests!
380
382
381
383
**Note: Please understand the security implications of opening up an HTTP/WS based transport before
@@ -487,6 +489,77 @@ Which will start mining blocks and transactions on a single CPU thread, creditin
487
489
the account specified by `--etherbase`. You can further tune the mining by changing the default gas
488
490
limit blocks converge to (`--targetgaslimit`) and the price transactions are accepted at (`--gasprice`).
489
491
492
+
## SHYFT NOTES
493
+
494
+
#### CLI
495
+
496
+
Run `./shyft-geth.sh` with one of the following flags:
497
+
498
+
-`--setup` - Setups postgres and the shyft chain db.
499
+
-`--start` - Starts geth.
500
+
-`--reset` - Drops postgress and chain db, and reinstantiates both.
501
+
-`--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth.sh --js sendTransactions`.
502
+
503
+
#### Docker Images
504
+
505
+
Docker Images are available for ShyftGeth and the Postgresql Database which can be used for development and testing. To launch these containers you will need to have docker-compose installed on your computer. Installation instructions for docker-compose are available [here](https://docs.docker.com/install/).
506
+
507
+
To launch ShyftGeth, PG, the ShyftBlock Explorer Api and UI - issue the following command from the root of the project directory:
508
+
509
+
`docker-compose up`
510
+
511
+
If you would like to reinitialize/rebuild the docker images you can issue the following command:
512
+
513
+
`docker-compose up --build`
514
+
515
+
To rebuild any one of the services - issue the following commands:
516
+
517
+
```
518
+
docker-compose up -d --no-deps --build <docker compose file service name>
519
+
520
+
# ie. for shyftBlockExplorerApi:
521
+
# docker-compose up -d --no-deps --build shyft_block_api
522
+
```
523
+
__The Postgresql Database Container will persist the database data to a folder in the root of the project directory - pg-data" __. So if you do want to reinitialize the database you should delete this docker container prior to launching the docker containers. To delete this docker volume and have it recreated you should input the following command:
524
+
525
+
```docker volume rm go-empyrean_pg-data```
526
+
527
+
From your local machine you can view the database by connecting to the database in the container at 127.0.0.1:8001. To access the shyftBlockExplorer open a browser and visit http://localhost:3000
528
+
529
+
__Blockchain data is persisted to ./ethash/.ethash__ and ./shyftData. If you would like to reset the test blockchain you will need to delete the ./ethash and ./shyftData directories.
530
+
531
+
The docker container for the ShyftBlockExplorerApi utilizes govendor to minimize its image size. __If you would like the docker image for this container to reflect any uncommitted changes which may have occurred in the go-empyrean repository, ie. changes with respect to go-empyrean core (ie. cryptographic functions and database). Prior to launching the docker containers you should rebuild the vendor directory for the shyftBlockExplorerApi - by executing the following steps:__
532
+
533
+
```
534
+
# remove existing shyftBlockExplorerApi vendor.json and vendored components:
535
+
536
+
rm -rf shyftBlockExplorerApi/vendor
537
+
538
+
# reinitialize vendor.json
539
+
540
+
cd shyftBlockExplorerApi && govendor init
541
+
542
+
# rebuild vendor.json using latest uncommitted changes
543
+
544
+
govendor add -tree -uncommitted +external
545
+
546
+
# due to a bug in govendor and it not being able to pull in some dependencies that are c-header files
547
+
# you should execute the following commands - see these issues - which whilst closed
548
+
# appears to have not been fixed: https://github.com/kardianos/govendor/issues/124 && https://github.com/kardianos/govendor/issues/61
0 commit comments