arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
Add minimum documentation of serveapi command
Eduard S eduard@iden3.io
Mon, 22 Mar 2021 15:41:35 +0100
commit

8c51cfb3d23a75fe74f287b980f9ac25400abe75

parent

d80e3a898830e2023746323c683b5fa31ecc9a26

1 files changed, 13 insertions(+), 0 deletions(-)

jump to
M cli/node/README.md → cli/node/README.md

@@ -24,6 +24,7 @@ importkey Import ethereum private key

genbjj Generate a new BabyJubJub key wipesql Wipe the SQL DB (HistoryDB and L2DB) and the StateDBs, leaving the DB in a clean state run Run the hermez-node in the indicated mode + serveapi Serve the API only discard Discard blocks up to a specified block number help, h Shows a list of commands or help for one command

@@ -53,6 +54,10 @@ `type Node` and `type Coordinator` at

[config/config.go](../../config/config.go). All the sections that are prefixed with `Coordinator` are only used in coord mode, and don't need to be defined when running the coordinator in sync mode + +When running the API in standalone mode, the required configuration is a subset +of the node configuration. Please, check the `type APIServer` at +[config/config.go](../../config/config.go) to learn about all the parametes. ### Notes

@@ -105,6 +110,14 @@

Run the node in mode coordinator: ```shell ./node run --mode coord --cfg cfg.buidler.toml +``` + +Serve the API in standalone mode. This command allows serving the API just +with access to the PostgreSQL database that a node is using. Several instances +of `serveapi` can be running at the same time with a single PostgreSQL +database: +```shell +./node serveapi --mode coord --cfg cfg.buidler.toml ``` Import an ethereum private key into the keystore: