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

neptune-cli and neptune-core might disagree about network #256

Closed
Sword-Smith opened this issue Nov 22, 2024 · 2 comments
Closed

neptune-cli and neptune-core might disagree about network #256

Sword-Smith opened this issue Nov 22, 2024 · 2 comments
Assignees

Comments

@Sword-Smith
Copy link
Member

Sword-Smith commented Nov 22, 2024

Each of these two programs have a value for Network. But when the CLI program contacts the RPC server, we don't check that they agree. This could potentially be dangerous.

One potential solution is to include the Network parameter in all requests to the RPC server, and if the two programs disagree, an error is returned.

@dan-da
Copy link
Collaborator

dan-da commented Nov 28, 2024

I already dealt with this in #185. But it seems those changes were omitted when merging. 😞

The approach taken was to to remove the --network argument. Only the commands that deal with wallet files offline accept a network arg directly. Anything else that requires network knowledge calls node's network RPC, ie client.network. This is also what the dashboard and block explorer do.

@Sword-Smith
Copy link
Member Author

Sorry I didn't catch that when attempting to port #185 to the new transaction logic.

@dan-da dan-da closed this as completed in 1e8c40f Jan 2, 2025
dan-da added a commit that referenced this issue Jan 2, 2025
closes #256

small refactor to neptune-cli so that online commands obtain network
from neptune-core via rpc and offline commands accept a network
arg and optional data-dir arg.  This prevents a network mis-match
between neptune-cli and neptune-core.

also renames own-receiving-address to next-receiving-address.

These are some of the changes from pr #185 that were missed in the
merge.
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

No branches or pull requests

2 participants