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 'no-blockchain' blockchain_source option. #478

Merged
merged 2 commits into from
Jan 6, 2020
Merged

Conversation

AdamISZ
Copy link
Member

@AdamISZ AdamISZ commented Dec 26, 2019

This is intended primarily to support running the
ob-watcher.py script from any environment that has no
blockchain access.
It could be used in debug and possibly recovery scenarios,
but this is explicitly unsupported (see comments in config).

This is intended primarily to support running the
ob-watcher.py script from any environment that has no
blockchain access.
It could be used in debug and possibly recovery scenarios,
but this is explicitly unsupported (see comments in config).
Copy link
Member

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

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

Makes sense, ACK 931a5c8 (tested with no Bitcoin Core running)

@chris-belcher
Copy link
Contributor

chris-belcher commented Dec 26, 2019

Could this also work for exporting individual private keys using the -H option of wallet-tool ?

Edit: By my brief reading of the code it might work for methods in the noscan_methods list in wallet_tool_main()

@AdamISZ
Copy link
Member Author

AdamISZ commented Dec 26, 2019

Yeah we could think this through a bit, sorry I was being a bit lazy :) Could be used for noscan methods right?

I think where it starts to get tricky is when we want to support "loading" a wallet without any usage information. There starts to be a danger of misleading users.
But for stuff where they're expert users and/or they only want some very specific information, it could be good. Obvious ones would be getting the seedphrase for recovery and getting individual keys (or batches of them). Or just printing out lists of addresses.

@AdamISZ
Copy link
Member Author

AdamISZ commented Dec 26, 2019

Btw was also thinking about going further and supporting display of some information on the GUI with this, by adding some kind of connectivity icon in the status bar that would show clearly a 'disconnected' state, but it's a significantly more complicated thing. Perhaps in future.

(If we did this it could make some sense to have a connectivity heartbeat loop in the wallet service or blockchain code so you could actually show if the rpc connection to Core was unavailable, also. On CLI the same function could just have the effect of an error level logging message.)

@kristapsk
Copy link
Member

Accidentally had kept this setting from previous testing and noticed that joinmarket-qt will fail on wallet load with error, but on console output only, no messages in GUI itself. Probably it's worth adding check there, that it will not even start with a such configuration (with an error in GUI message box).

2020-01-03 21:37:35,840 [ERROR]  Failure to get blockheight from Bitcoin Core:
2020-01-03 21:37:35,840 [ERROR]  AttributeError("'NoneType' object has no attribute 'rpc'",)

@kristapsk
Copy link
Member

Of course, not if the some partial support of this is added to the GUI, but likely it will remain in "perhaps in future" state for at least some time. :)

@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 3, 2020

Yeah this needs to have something in GUI so the user knows what happened, and corrects the setting, will do, thanks.

@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 5, 2020

8ae41b1 tests OK (error message box and quit if no-blockchain configured with Qt).

AdamISZ added a commit that referenced this pull request Jan 6, 2020
8ae41b1 noblockchain error message for Qt (Adam Gibson)
931a5c8 Add 'no-blockchain' blockchain_source option. (Adam Gibson)
@AdamISZ AdamISZ merged commit 8ae41b1 into master Jan 6, 2020
@AdamISZ AdamISZ deleted the no-blockchain branch January 8, 2020 13:26
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.

3 participants