diff --git a/USAGE.md b/USAGE.md index 896d3d63..66cb5dd0 100644 --- a/USAGE.md +++ b/USAGE.md @@ -146,6 +146,24 @@ data:"Shutdown" id:8 ``` +## Replaying the Event Stream + +This command will replay the event stream from an old event onward. The server will replay all the cached events if the ID is 0 or if you specify an event ID already purged from the node's cache. + +Replace the `HOST`, `PORT`, and `ID` fields with the values needed. + +```sh +curl -sN http://HOST:PORT/events?start_from=ID +``` + +**Example:** + +```sh +curl -sN http://65.21.235.219:9999/events?start_from=29267508 +``` + +Note that certain shells like `zsh` may require an escape character before the question mark. + ## The REST Server The Sidecar provides a RESTful endpoint for useful queries about the state of the network. diff --git a/resources/ETC_README.md b/resources/ETC_README.md index 92a49c33..9ac25ceb 100644 --- a/resources/ETC_README.md +++ b/resources/ETC_README.md @@ -7,7 +7,8 @@ This page contains specific instructions for node operators. Before proceeding, - [Running and testing the Sidecar](../README.md#running-and-testing-the-sidecar) - [Troubleshooting tips](../README.md#troubleshooting-tips) -## Sidecar Configuration on the Node + +## Configuring the Sidecar The file `/etc/casper-sidecar/config.toml` holds a default configuration. This should work if installed on a Casper node. @@ -15,16 +16,30 @@ If you install the Sidecar on an external server, you must update the `ip-addres For more information, including how to setup the SSE, RPC, REST, and Admin servers, read the [configuration options](../README.md#configuring-the-sidecar) in the main README. -## Storage on the Node -This directory stores the SSE cache and a database if the Sidecar was configured to use one. +## Installing the Sidecar on a Node -```toml -[storage] -storage_path = "/var/lib/casper-sidecar" +The following command will install the Debian package for the Casper Sidecar service on various flavors of Linux. + + + +```bash +sudo apt install ./casper-sidecar_0.1.0-0_amd64.deb ``` -The DB setup is described [here](../README#database-connectivity-setup). +Check the service status: + +```bash +systemctl status casper-sidecar +``` + +Check the logs and make sure the service is running as expected. + +```bash +journalctl --no-pager -u casper-sidecar +``` + +If you see any errors, you may need to [update the configuration](#configuring-the-service) and restart the service with the commands below. ## Running the Sidecar on a Node @@ -38,9 +53,17 @@ The `casper-sidecar` service starts after installation, using the systemd servic `sudo systemctl start casper-sidecar.service` -### Logs -`journalctl --no-pager -u casper-sidecar` +## Sidecar Storage + +This directory stores the SSE cache and a database if the Sidecar was configured to use one. + +```toml +[storage] +storage_path = "/var/lib/casper-sidecar" +``` + +The DB setup is described [here](../README#database-connectivity-setup). ## Swagger Documentation