-
Notifications
You must be signed in to change notification settings - Fork 970
Brave Payments should have a dev mode using testnet Bitcoin #4286
Comments
FYI, there is now a WIP PR in brave/ledger which should make it much easier to run a testnet server (brave/ledger#8) Partial instructions for running a Ledger server in AWS using docker-machine with that branch are here: |
Availability is not guaranteed, but I will be running a Ledger server using testnet bitcoin at ledger-testnet.entropi.info most of the time, see http://ledger-testnet.entropi.info/documentation to test availability. #4297 shows how to point Brave at the testnet Ledger server. |
@willy-b - it seems to me that if the browser uses a ledger server using testnet, then that ledger server will be telling it where to get the server list for balances (GET /v1/balance/providers), and the ledger server will be talking to testnet as well. if so, then to resolve this we really need to add an option that tells the browser what ledger server to boot from, right? |
@mrose17, my thoughts exactly. There's an open PR #4297 for letting an ENV variable "LEDGER_SERVER_URL" tell the browser what Ledger server to use. I think an ENV variable is sufficient rather than adding this to the UI since it is really is only useful for development (We don't actually want to pay Publishers testnet coin :-) ). |
With the resolution of brave/ledger-balance#1 and #4297 I'm going to mark this closed. Anyone can use testnet coin to test Ledger features now by running Brave with the environment variable "LEDGER_SERVER_URL" set to point to a Ledger server running against Bitcoin testnet (e.g. "http://ledger-testnet.entropi.info" ). LMK if anyone has difficulty doing this. Thanks. |
will do @luixxiul |
Lovely! thanks 👍 |
Did you search for similar issues before submitting this one?
Yes
Describe the issue you encountered:
While testing/developing for Brave Payments, one must buy at least $5 of Bitcoin to get started.
Every time browsing data is updated with the Ledger server, >= $5 of Bitcoin must be contributed again.
Expected behavior:
For development purposes, one should be able to use testnet Bitcoin, which can be obtained on demand from a testnet faucet (without signing up with Coinbase, etc), saving time and money for those who want to contribute to Brave Ledger development.
Proposed solution:
The current Ledger server code supports testnet if run with BITGO_ENVIRONMENT=test , with a BITGO_TOKEN obtained from test.bitgo.com .
A second Ledger instance with these settings could be run, say on ledger-test.brave.com . (I am running such an instance privately now for my own testing.)
It then only takes a couple of tiny updates to ledger-balance, ledger-client, and browser-laptop to support an environment variable allowing testnet bitcoin to be used.
Once this is done, here's what it looks like to setup a fresh install of Brave with a " >$3,000 " deposit in < 2min by visiting a testnet faucet webpage:

After that you can test Brave Payments 600 times without thinking of funding again :-).
The text was updated successfully, but these errors were encountered: