From fe8ccb8ef22600afb7ecc6f225105178c17216ee Mon Sep 17 00:00:00 2001 From: ClaytonNorthey92 Date: Fri, 25 Oct 2024 11:40:07 -0400 Subject: [PATCH] updated the readme; added full instructions to run your own bfg --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a7e4d6d..10ff7395 100644 --- a/README.md +++ b/README.md @@ -144,12 +144,23 @@ go run ./integrationtest If you'd like to run your own `bfgd` and don't want to rely on Hemi Labs (or any third party) for _broadcasting transactions_, you may run `bfgd` and connect it to a _trusted_ `bfgd` run by a third party to _receive l2 keystones only_ (l2 keystones represent l2 state and are what are mined in PoP transactions). In this case, the third party `bfgd` will only send you l2 keystones, your `bfgd` can notify your local pop miner and this will broadcast them to your Electrs+bitcoind setup so you don't rely on Hemi Labs--or any third party--which may be congested. -If you'd like to do so, use the following environment variables when running bfgd: +You'll need the following running to do this: +* bitcoind +* electrs +* postgres +* bfgd + +_Note: make sure you run all of the *.sql files for bfg in `database/bfgd/postgres/scripts`_ + +When running BFG, you'll want the following env variables set: * `BFG_BFG_URL`: the _trusted_ `bfgd`'s websocket url that you will connect to * `BFG_BTC_PRIVKEY`: your btc private key. note that this can be an unfunded private key and you'll still receive l2 keystones to mine +* `BFG_POSTGRES_URI`: the connection URI for your postgres instance +* `BFG_BTC_START_HEIGHT`: when your db is empty, bfgd will need a starting point to parse btc blocks at, set this to the tip of the bitcoin chain at first deploy +* `BFG_EXBTC_ADDRESS`: your electrs rpc address -then you may connect your local `popmd` to your aforementioned local `bfgd` +then you may connect your local `popmd` to your aforementioned local `bfgd` via the `POPM_BFG_URL` env variable ## ▶️ Running bssd