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

Add instruction of how to debug the fuel-core #1236

Closed
xgreenx opened this issue Jul 3, 2023 · 0 comments · Fixed by #1309
Closed

Add instruction of how to debug the fuel-core #1236

xgreenx opened this issue Jul 3, 2023 · 0 comments · Fixed by #1309
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Jul 3, 2023

  • Add instructions with screenshots of how to debug the project.
    • In the Clion
    • In the VSCode
  • How to build with/without p2p and relayer
  • How to connect the node to the existing network
@xgreenx xgreenx added good first issue Good for newcomers documentation Improvements or additions to documentation labels Jul 3, 2023
bvrooman pushed a commit that referenced this issue Aug 3, 2023
Related issues:
- #1236

This PR disables P2P by default, and adds a new flag to the `fuel-core`
CLI to allow users to expressly enable P2P:
```
--enable-p2p
```
Currently, the P2P service is only enabled when the user provides CLI
arguments for `keypair` and `network`. If either of these values are
missing, P2P is implicitly disabled without warning to the user. There
is no way to tell if the user accidentally omitted these values, or
deliberately omitted them in order to disable P2P.

A better user experience is to enable P2P explicitly using
`--enable-p2p` and to make `keypair` and `network` mandatory. This will
raise an error if either of these values is missing. P2P should be
disabled by default. This flag replaces having to add or remove the
`network` argument to enable or disable P2P implicitly.

If a user wants to run `fuel-core` with P2P, and supplies
`--enable-p2p`, but forgets to include `keypair` and/or `network`, they
will encounter an error:
```
error: the following required arguments were not provided:
  --keypair <KEYPAIR>
  --network <NETWORK>
  ```

---------

Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
bvrooman pushed a commit that referenced this issue Aug 15, 2023
Related issues:
- #1236

This PR adds a new CLI flag to enable the Relayer service
`--enable-relayer`, and disable the Relayer service by default.

When supplying the `--enable-relayer` flag, the `--relayer` argument
becomes mandatory, and omitting it is an error. Similarly, providing a
`--relayer` argument without the `--enable-relayer` flag is an error.

Lastly, providing the `--keypair` or `--network` arguments will also
produce an error if the `--enable-p2p` flag is not set.
bvrooman pushed a commit that referenced this issue Aug 22, 2023
Related issues:
- #1236

This PR adds conditional support for loading a local `.env` for
environment variables. This support is only enabled when compiling the
client binary with the `env` feature or when passing `--all-features` to
Cargo. This is not enabled by default for production environments.

Users can add a `.env` to the root directory of their local copy of
their Fuel node (or wherever their working directory is).

This helps users provide CLI arguments in a way that is more convenient
and more secure than entering these values in an IDE directly:
- Users can reuse environment variables across IDEs (e.g., VS Code and
CLion) and IDE configurations seamlessly, rather than specifying them in
each IDE specific configuration
- Users can avoid putting secrets in shared commands or configurations
- CLion users can greatly shorten their `run` commands, which is helpful
since the configuration window does not word wrap long commands

The `.env` is also added to `.gitignore` to prevent users from uploading
individual environment configurations that may include secrets.

This approach acts as a sort of stop gap for handling secrets before we
have SOPS.

This PR also renames the internal `eth_client` component of the relayer
configuration to `relayer`. This allow users to use the environment
variable name `RELAYER` to supply this value. Prior to this, the CLI
expected an environment variable called `ETH_CLIENT`, even though the
CLI argument is named `relayer`.

Note: Due to the order in which the initialization functions are called,
we cannot supply `RUST_LOG` in the .env file; this has to be provided
elsewhere or directly to Cargo.
bvrooman pushed a commit that referenced this issue Aug 22, 2023
Related issues:
- Closes #1236

This PR adds documentation on debugging.

---------

Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
GoldenPath1109 added a commit to GoldenPath1109/fuel-core that referenced this issue Sep 7, 2024
Related issues:
- FuelLabs/fuel-core#1236

This PR disables P2P by default, and adds a new flag to the `fuel-core`
CLI to allow users to expressly enable P2P:
```
--enable-p2p
```
Currently, the P2P service is only enabled when the user provides CLI
arguments for `keypair` and `network`. If either of these values are
missing, P2P is implicitly disabled without warning to the user. There
is no way to tell if the user accidentally omitted these values, or
deliberately omitted them in order to disable P2P.

A better user experience is to enable P2P explicitly using
`--enable-p2p` and to make `keypair` and `network` mandatory. This will
raise an error if either of these values is missing. P2P should be
disabled by default. This flag replaces having to add or remove the
`network` argument to enable or disable P2P implicitly.

If a user wants to run `fuel-core` with P2P, and supplies
`--enable-p2p`, but forgets to include `keypair` and/or `network`, they
will encounter an error:
```
error: the following required arguments were not provided:
  --keypair <KEYPAIR>
  --network <NETWORK>
  ```

---------

Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
GoldenPath1109 added a commit to GoldenPath1109/fuel-core that referenced this issue Sep 7, 2024
Related issues:
- FuelLabs/fuel-core#1236

This PR adds a new CLI flag to enable the Relayer service
`--enable-relayer`, and disable the Relayer service by default.

When supplying the `--enable-relayer` flag, the `--relayer` argument
becomes mandatory, and omitting it is an error. Similarly, providing a
`--relayer` argument without the `--enable-relayer` flag is an error.

Lastly, providing the `--keypair` or `--network` arguments will also
produce an error if the `--enable-p2p` flag is not set.
GoldenPath1109 added a commit to GoldenPath1109/fuel-core that referenced this issue Sep 7, 2024
Related issues:
- FuelLabs/fuel-core#1236

This PR adds conditional support for loading a local `.env` for
environment variables. This support is only enabled when compiling the
client binary with the `env` feature or when passing `--all-features` to
Cargo. This is not enabled by default for production environments.

Users can add a `.env` to the root directory of their local copy of
their Fuel node (or wherever their working directory is).

This helps users provide CLI arguments in a way that is more convenient
and more secure than entering these values in an IDE directly:
- Users can reuse environment variables across IDEs (e.g., VS Code and
CLion) and IDE configurations seamlessly, rather than specifying them in
each IDE specific configuration
- Users can avoid putting secrets in shared commands or configurations
- CLion users can greatly shorten their `run` commands, which is helpful
since the configuration window does not word wrap long commands

The `.env` is also added to `.gitignore` to prevent users from uploading
individual environment configurations that may include secrets.

This approach acts as a sort of stop gap for handling secrets before we
have SOPS.

This PR also renames the internal `eth_client` component of the relayer
configuration to `relayer`. This allow users to use the environment
variable name `RELAYER` to supply this value. Prior to this, the CLI
expected an environment variable called `ETH_CLIENT`, even though the
CLI argument is named `relayer`.

Note: Due to the order in which the initialization functions are called,
we cannot supply `RUST_LOG` in the .env file; this has to be provided
elsewhere or directly to Cargo.
GoldenPath1109 added a commit to GoldenPath1109/fuel-core that referenced this issue Sep 7, 2024
Related issues:
- Closes FuelLabs/fuel-core#1236

This PR adds documentation on debugging.

---------

Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants