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

lib: expose random module #987

Merged

Conversation

jp1ac4
Copy link
Collaborator

@jp1ac4 jp1ac4 commented Feb 29, 2024

This is motivated by #929. The GUI will need to generate a salt and password for RPC user/password authentication to the managed bitcoind, and can use this module to get random bytes.

This is motivated by the GUI needing to generate a salt and
password for RPC user/password authentication to the
managed bitcoind.
@darosior
Copy link
Member

darosior commented Feb 29, 2024 via email

@darosior darosior merged commit 16afa3e into wizardsardine:master Mar 9, 2024
18 checks passed
darosior added a commit that referenced this pull request Mar 11, 2024
a997a7b gui: don't rely on cookie to check successful start (jp1ac4)
5e5c333 gui: use rpcauth in installer for internal bitcoind (jp1ac4)
7584b63 gui: start internal bitcoind with given config (jp1ac4)
b5980fb gui: add sections check to internal bitcoind config test (jp1ac4)
c3aad0f gui: add optional rpcauth to internal bitcoind config (jp1ac4)
e172ecd gui: move internal bitcoind config to bitcoind module (jp1ac4)

Pull request description:

  This is to resolve #929.

  The installer will generate an `rpcauth=` string for use in the managed bitcoind's bitcoin.conf file and will use the corresponding user and password in the Liana daemon config file.

  ~~The existence of the cookie file is still checked by `Bitcoind::start()` to determine if the process started successfully. An alternative approach could be considered in a follow-up PR (or as part of this one).~~

  For #924, we might still need to use the cookie path to stop an already-running process, as we would probably no longer have the password used to generate the previous `rpcauth=` string.

  Once #987 is merged, I'll update the Cargo files in this PR.

  In the first commit, I move some code from the installer to the bitcoind module. In the end, this wasn't strictly required for the other changes I made, but I kept it as I thought it made sense anyway.

ACKs for top commit:
  edouardparis:
    ACK a997a7b

Tree-SHA512: ec475bb3c82db4e30c42612e93c63e9b0387311a26d5433421f275e24ac5b0923eba9bd1daff612e60a6cf0bdcc10de0812ff69972237e6785c0835b5a31450f
@jp1ac4 jp1ac4 deleted the liana-lib-expose-random-module branch March 11, 2024 17:10
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