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

feat: Update documentation with detailed logging configuration #303

Merged
merged 7 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 15 additions & 0 deletions aptos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ The workspace is divided into the following:
- `aptos-programs`: A library that exposes the Sphinx programs used to generate proofs for our light client.*
- `programs/*`: Actual implementations of the Sphinx programs.

## Logging Configuration

The light client uses two logging systems:

- Rust logging via `tokio-tracing`, configured through the `RUST_LOG` environment variable. See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for detailed configuration options.
- Go logging for FFI calls, configured through the `SP1_GO_LOG` environment variable.

To set a global log level (e.g. warn), configure both variables:

```bash
RUST_LOG=warn SP1_GO_LOG=warn cargo run ...
```

Valid log levels are: error, warn, info, debug, trace, off

## Development

When developing, you might have to update the programs' implementation. The programs implementations are located in
Expand Down
15 changes: 15 additions & 0 deletions aptos/docs/src/run/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,18 @@ sudo apt update && sudo apt-get install -y build-essential libssl-dev pkg-config
```

For non-Ubuntu/non-Debian based distros, make sure to install the equivalent packages.

## Logging Configuration

The light client uses two logging systems:

- Rust logging via `tokio-tracing`, configured through the `RUST_LOG` environment variable. See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for detailed configuration options.
- Go logging for FFI calls, configured through the `SP1_GO_LOG` environment variable.

To set a global log level (e.g. warn), configure both variables:

```bash
RUST_LOG=warn SP1_GO_LOG=warn cargo run ...
```

Valid log levels are: error, warn, info, debug, trace, off
6 changes: 6 additions & 0 deletions aptos/docs/src/run/setup_proof_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ git clone [email protected]:argumentcomputer/zk-light-clients.git && \
cd zk-light-clients/aptos/proof-server && \
SHARD_BATCH_SIZE=0 RUSTFLAGS="-C target-cpu=native --cfg tokio_unstable -C opt-level=3" cargo run --release --bin proof_server -- --mode "split" -a <NETWORK_ADDESS> --snd-addr <SECONDARY_SERVER_ADDRESS>
```

> **Note**
>
> Logging can be configured via `RUST_LOG` for Rust logging and `SP1_GO_LOG` for Go FFI logging.
> For example: `RUST_LOG=debug SP1_GO_LOG=debug cargo run ...`
> See the [configuration documentation](./configuration.md#logging-configuration) for more details.
15 changes: 15 additions & 0 deletions ethereum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ The workspace is divided into the following:
- `ethereum-programs`: A library that exposes the Sphinx programs used to generate proofs for our light client.
- `programs/*`: Actual implementations of the Sphinx programs.

## Logging Configuration

The light client uses two logging systems:

- Rust logging via `tokio-tracing`, configured through the `RUST_LOG` environment variable. See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for detailed configuration options.
- Go logging for FFI calls, configured through the `SP1_GO_LOG` environment variable.

To set a global log level (e.g. warn), configure both variables:

```bash
RUST_LOG=warn SP1_GO_LOG=warn cargo run ...
```

Valid log levels are: error, warn, info, debug, trace, off

## Development

When developing, you might have to update the programs' implementation. The
Expand Down
15 changes: 15 additions & 0 deletions ethereum/docs/src/run/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,18 @@ sudo apt update && sudo apt-get install -y build-essential libssl-dev pkg-config
```

For non-Ubuntu/non-Debian based distros, make sure to install the equivalent packages.

## Logging Configuration

The light client uses two logging systems:

- Rust logging via `tokio-tracing`, configured through the `RUST_LOG` environment variable. See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for detailed configuration options.
- Go logging for FFI calls, configured through the `SP1_GO_LOG` environment variable.

To set a global log level (e.g. warn), configure both variables:

```bash
RUST_LOG=warn SP1_GO_LOG=warn cargo run ...
```

Valid log levels are: error, warn, info, debug, trace, off
6 changes: 6 additions & 0 deletions ethereum/docs/src/run/setup_proof_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ git clone [email protected]:argumentcomputer/zk-light-clients.git && \
cd zk-light-clients/ethereum/light-client && \
RECONSTRUCT_COMMITMENTS=false SHARD_BATCH_SIZE=0 SHARD_CHUNKING_MULTIPLIER=64 SHARD_SIZE=4194304 RUSTFLAGS="-C target-cpu=native -C opt-level=3" cargo run --release --bin proof_server -- --mode "split" -a <NETWORK_ADDESS> --snd-addr <SECONDARY_SERVER_ADDRESS>
```

> **Note**
>
> Logging can be configured via `RUST_LOG` for Rust logging and `SP1_GO_LOG` for Go FFI logging.
> For example: `RUST_LOG=debug SP1_GO_LOG=debug cargo run ...`
> See the [configuration documentation](./configuration.md#logging-configuration) for more details.
15 changes: 15 additions & 0 deletions kadena/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ The workspace is divided into the following:
- `kadena-programs`: A library that exposes the Sphinx programs used to generate proofs for our light client.
- `programs/*`: Actual implementations of the Sphinx programs.

## Logging Configuration

The light client uses two logging systems:

- Rust logging via `tokio-tracing`, configured through the `RUST_LOG` environment variable. See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for detailed configuration options.
- Go logging for FFI calls, configured through the `SP1_GO_LOG` environment variable.

To set a global log level (e.g. warn), configure both variables:

```bash
RUST_LOG=warn SP1_GO_LOG=warn cargo run ...
```

Valid log levels are: error, warn, info, debug, trace, off

## Development

When developing, you might have to update the programs' implementation. The programs implementations are located in
Expand Down
15 changes: 15 additions & 0 deletions kadena/docs/src/run/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,18 @@ sudo apt update && sudo apt-get install -y build-essential libssl-dev pkg-config
```

For non-Ubuntu/non-Debian based distros, make sure to install the equivalent packages.

## Logging Configuration

The light client uses two logging systems:

- Rust logging via `tokio-tracing`, configured through the `RUST_LOG` environment variable. See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for detailed configuration options.
- Go logging for FFI calls, configured through the `SP1_GO_LOG` environment variable.

To set a global log level (e.g. warn), configure both variables:

```bash
RUST_LOG=warn SP1_GO_LOG=warn cargo run ...
```

Valid log levels are: error, warn, info, debug, trace, off
6 changes: 6 additions & 0 deletions kadena/docs/src/run/setup_proof_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ git clone https://github.com/argumentcomputer/zk-light-clients.git && \
cd zk-light-clients/kadena/light-client && \
RECONSTRUCT_COMMITMENTS=false SHARD_BATCH_SIZE=0 SHARD_CHUNKING_MULTIPLIER=64 SHARD_SIZE=4194304 RUSTFLAGS="-C target-cpu=native -C opt-level=3" cargo run --release --bin proof_server -- --mode "split" -a <NETWORK_ADDESS> --snd-addr <SECONDARY_SERVER_ADDRESS>
```

> **Note**
>
> Logging can be configured via `RUST_LOG` for Rust logging and `SP1_GO_LOG` for Go FFI logging.
> For example: `RUST_LOG=debug SP1_GO_LOG=debug cargo run ...`
> See the [configuration documentation](./configuration.md#logging-configuration) for more details.
Loading