good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 9e7ed07f authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

Remove restapi and debug-ui from readme and docker-compose (#1263)

* rm_restapi_from_readme

* rm_restapi_from_readme

* rm_restapi_from_readme

* rm_restapi_from_readme
parent 0a438673
Branches
Tags
No related merge requests found
...@@ -19,7 +19,7 @@ ifeq ($(OS),Linux) ...@@ -19,7 +19,7 @@ ifeq ($(OS),Linux)
PROTOC_OS = linux PROTOC_OS = linux
endif endif
all: tg hack tester rpctest state restapi pics rpcdaemon integration lmdb-tools all: tg hack tester rpctest state pics rpcdaemon integration lmdb-tools
docker: docker:
docker build -t turbo-geth:latest . docker build -t turbo-geth:latest .
......
...@@ -167,35 +167,9 @@ trace_filter ...@@ -167,35 +167,9 @@ trace_filter
\* net_peerCount currently always returns a count of 25 as work continues on Sentry. \* net_peerCount currently always returns a count of 25 as work continues on Sentry.
#### REST API Daemon
Apart from JSON-RPC daemon, Turbo-Geth also contains REST API daemon. It uses
turbo-geth remote DB functionality.
<code>🔬 See [REST API docs](./cmd/restapi/README.md)</code>
Run turbo-geth in one terminal window
```
> ./build/bin/tg --private.api.addr=localhost:9090
```
Run REST daemon
```
> make restapi
> ./build/bin/restapi --private.api.addr=localhost:9090
```
This API is very limited at the moment too:
```
GET /api/v1/accounts/<accountAddress>
GET /api/v1/storage/?prefix=PREFIX
```
#### Or run all components by docker-compose #### Or run all components by docker-compose
Next command starts: turbo-geth on port 30303, rpcdaemon 8545, restapi 8080, debug-web-ui 3001, prometheus 9090, grafana 3000 Next command starts: turbo-geth on port 30303, rpcdaemon 8545, prometheus 9090, grafana 3000
``` ```
docker-compose build docker-compose build
...@@ -222,7 +196,7 @@ Core contributors: ...@@ -222,7 +196,7 @@ Core contributors:
* Alexey Akhunov ([@realLedgerwatch](https://twitter.com/realLedgerwatch)) * Alexey Akhunov ([@realLedgerwatch](https://twitter.com/realLedgerwatch))
* Alex Sharov ([AskAlexSharov](https://github.com/AskAlexSharov)) * Alex Sharov ([AskAlexSharov](https://twitter.com/AskAlexSharov))
* Andrew Ashikhmin ([yperbasis](https://github.com/yperbasis)) * Andrew Ashikhmin ([yperbasis](https://github.com/yperbasis))
......
...@@ -30,23 +30,9 @@ services: ...@@ -30,23 +30,9 @@ services:
- ./cmd/prometheus/dashboards:/etc/grafana/provisioning/dashboards - ./cmd/prometheus/dashboards:/etc/grafana/provisioning/dashboards
- ${XDG_DATA_HOME:-~/.local/share}/tg-grafana:/var/lib/grafana - ${XDG_DATA_HOME:-~/.local/share}/tg-grafana:/var/lib/grafana
restapi:
image: turbo-geth:latest
command: restapi --http.addr="0.0.0.0:8080" --private.api.addr="turbo-geth:9090"
ports:
- 8080:8080
rpcdaemon: rpcdaemon:
image: turbo-geth:latest image: turbo-geth:latest
command: rpcdaemon --private.api.addr="turbo-geth:9090" --http.addr="0.0.0.0" --http.vhosts="*" --http.corsdomain="*" --http.api="eth,debug,net" command: rpcdaemon --private.api.addr="turbo-geth:9090" --http.addr="0.0.0.0" --http.vhosts="*" --http.corsdomain="*" --http.api="eth,debug,net"
ports: ports:
- 8545:8545 - 8545:8545
debugui:
image: turbo-geth:debugui
build: ./debug-web-ui/
stdin_open: true
ports:
- 3001:3000
...@@ -658,6 +658,16 @@ func (tx *lmdbTx) BucketSize(name string) (uint64, error) { ...@@ -658,6 +658,16 @@ func (tx *lmdbTx) BucketSize(name string) (uint64, error) {
return (st.LeafPages + st.BranchPages + st.OverflowPages) * uint64(os.Getpagesize()), nil return (st.LeafPages + st.BranchPages + st.OverflowPages) * uint64(os.Getpagesize()), nil
} }
func (tx *lmdbTx) BucketStat(name string) (*lmdb.Stat, error) {
if name == "freelist" || name == "gc" || name == "free_list" { //nolint:goconst
return tx.tx.Stat(lmdb.DBI(0))
}
if name == "root" { //nolint:goconst
return tx.tx.Stat(lmdb.DBI(1))
}
return tx.tx.Stat(tx.db.buckets[name].DBI)
}
func (tx *lmdbTx) Cursor(bucket string) Cursor { func (tx *lmdbTx) Cursor(bucket string) Cursor {
b := tx.db.buckets[bucket] b := tx.db.buckets[bucket]
if b.AutoDupSortKeysConversion { if b.AutoDupSortKeysConversion {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment