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

Deprecation of some API breaks mining on remote nodes #581

Open
slavikus opened this issue Jan 17, 2021 · 4 comments
Open

Deprecation of some API breaks mining on remote nodes #581

slavikus opened this issue Jan 17, 2021 · 4 comments

Comments

@slavikus
Copy link

Describe the bug
The recent PR breaks the ability to mine on a node that runs on a remote machine.

ERROR grin_servers::mining::mine_block - Failed to get coinbase from http:/x.x.x.x:3415. Is the wallet listening? Request error: Cannot make request: error trying to connect: tcp connect error: Connection refused (os error 111) ERROR grin_servers::mining::mine_block - Error building new block: Can't connect to wallet listener at "http://x.x.x.x:3415"; will retry

@bladedoyle
Copy link

Known issue.
@jaspervdm Please comment - what is the plan?

@bladedoyle
Copy link

@slavikus As a workaround you can edit the source code and fix with something like this:
sed -i 's/127.0.0.1:{}/0.0.0.0:{}/' config/src/types.rs

@jaspervdm
Copy link
Contributor

We will likely have to introduce a new api type that solely exposes an endpoint to build a coinbase output. In the meanwhile it is recommended to use a reverse proxy in front of the wallet.

@bladedoyle
Copy link

bladedoyle commented Feb 14, 2021

What happened is:
The wallets entire foreign_api was moved to tor listener and hardcoded to localhost

What should have happened:
A new receive_api added to the wallet, hardcoded to listen on localhost and used only by tor. The receive_tx & finalize_tx methods should have been moved to this new api, and no longer available on the foreign_api.
The foreign_api should have been left alone except for removing receive endpoints

edit:
some endpoints - like check_version would be available through both receive_api and foreign_api
It may be good to rename "foreign_api" to something like "local_api" or something since it wont necessarily be exposed to the public internet

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

3 participants