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: adapt node manager add command for evm network #2235

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

jacderida
Copy link
Contributor

Description

  • c276fb2 feat: configure anvil to listen on non-local address

    For use in a remote network, Anvil must listen on the public IP address of the VM it is running on.
    The anvil binary respects the ANVIL_IP_ADDR variable for configuring a listener address.
    However, it turns out the alloy crate is actually hard coded to work with "localhost", so
    unfortunately the AnvilInstance::endpoint function cannot be used to return the resulting RPC URL.
    For that reason, a new rpc_url field was added to the Testnet struct to keep track of the
    non-local listening address.

    The deployer wallet private key was also saved in the CSV data because it will be necessary for
    testnet-deploy to obtain this.

  • edd5103 feat: adapt node manager add command for evm network

    BREAKING CHANGE: services configured by the node manager are no longer compatible with networks that
    are not EVM.

    The node manager add command now supports the following EVM arguments:

    • The subcommand for selecting the network type is appended.
    • The evm-custom subcommand makes the --data-payments-address, --payment-token-address and
      --rpc-url arguments available.
    • The --rewards-address argument is provided.

    The CustomNetwork type was modified to enable it to be serialized in the node manager registry.

Type of Change

Please mark the types of changes made in this pull request.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devskim found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@jacderida jacderida force-pushed the feat-evm_testnet_non_local branch from edd5103 to 3cbe821 Compare October 14, 2024 20:10
For use in a remote network, Anvil must listen on the public IP address of the VM it is running on.
The `anvil` binary respects the `ANVIL_IP_ADDR` variable for configuring a listener address.
However, it turns out the `alloy` crate is actually hard coded to work with "localhost", so
unfortunately the `AnvilInstance::endpoint` function cannot be used to return the resulting RPC URL.
For that reason, a new `rpc_url` field was added to the `Testnet` struct to keep track of the
non-local listening address.

The deployer wallet private key was also saved in the CSV data because it will be necessary for
`testnet-deploy` to obtain this.
@jacderida jacderida force-pushed the feat-evm_testnet_non_local branch from 3cbe821 to fe4b1ee Compare October 14, 2024 20:12
BREAKING CHANGE: services configured by the node manager are no longer compatible with networks that
are not EVM.

The node manager `add` command now supports the following EVM arguments:

* The subcommand for selecting the network type is appended.
* The `evm-custom` subcommand makes the `--data-payments-address`, `--payment-token-address` and
  `--rpc-url` arguments available.
* The `--rewards-address` argument is provided.

The `CustomNetwork` type was modified to enable it to be serialized in the node manager registry.
@jacderida jacderida force-pushed the feat-evm_testnet_non_local branch from fe4b1ee to eaee023 Compare October 15, 2024 12:37
@jacderida jacderida enabled auto-merge October 15, 2024 12:45
@jacderida jacderida added this pull request to the merge queue Oct 15, 2024
Merged via the queue into maidsafe:main with commit 00ad51d Oct 15, 2024
25 checks passed
@jacderida jacderida deleted the feat-evm_testnet_non_local branch October 15, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants