[bisq-network/bisq] Add Makefile for automating localnet setup (#3718)

Julian Knutsen notifications at github.com
Sat Nov 30 01:41:30 UTC 2019


julianknutsen commented on this pull request.

I'm actually of the opinion that it is OK if devs don't understand all of the internals of the dao setup and genesis transactions on their first day when they are just trying to get the software up and running to mess around with the features.

This is a great first step and the docs should be updated to recommend this as opposed to the list of manual commands. Scripts like these are easy to bikeshed about, but erring on the side of getting something committed that people can use to save time seems prudent. It is easy to add features later than can be driven by more dev use cases.

The next iteration should probably do everything from scratch so the zip file can be deprecated.  There are already issues with the zip file having different default accounts due to the pre-existing data. It is just error-prone to maintain default persistent data.

Going forward it seems like doing everything from scratch and utilizing the gRPC system to automate the "default" pieces that are time-consuming makes a lot of sense. It would be great to see things like default accounts added by a set of gRPC commands when that part of the API becomes available. Internal use cases are good drivers of features because the acceptance criteria is well-defined and the users are developers who can give feedback faster than typical Bisq users.


> +# Deploy a complete localnet by running all required Bitcoin and Bisq
+# nodes, each in their own named screen window. If you are not a screen
+# user, you'll need to run each of the make commands manually in a
+# separate terminal or as a background job.
+#
+# NOTE: You MUST already be attached to a screen session for the
+# following commands to work properly.
+deploy: setup
+	screen -t bitcoin make bitcoind
+	sleep 2    # wait for bitcoind rpc server to start
+	make block # generate a block to ensure Bisq nodes get dao-synced
+	screen -t seednode make seednode
+	screen -t seednode2 make seednode2
+	screen -t alice make alice
+	screen -t bob make bob
+	screen -t mediator make mediator

This is close to what I have locally just in a .rc file. Does bisq not handle bitcoind not having the rpc server up first? I've never run into a problem, but I always start bitcoind first so maybe I just got lucky?

> +		-blocknotify='localnet/bitcoind/blocknotify %s'
+
+seednode: build
+	./bisq-seednode \
+		--baseCurrencyNetwork=BTC_REGTEST \
+		--useLocalhostForP2P=true \
+		--useDevPrivilegeKeys=true \
+		--fullDaoNode=true \
+		--rpcUser=bisqdao \
+		--rpcPassword=bsq \
+		--rpcBlockNotificationPort=5120 \
+		--nodePort=2002 \
+		--userDataDir=localnet \
+		--appName=seednode
+
+seednode2: build

Is the second seednode just for more testing of p2p forwarding? My setup has always been fine with just one so curious as to the extra benefit and if it is worth the resources.

> +		--genesisTxId=30af0050040befd8af25068cc697e418e09c2d8ebd8d411d2240591b9ec203cf \
+		--appDataDir=localnet/alice \
+		--appName=Alice
+
+bob: setup
+	./bisq-desktop \
+		--baseCurrencyNetwork=BTC_REGTEST \
+		--useLocalhostForP2P=true \
+		--useDevPrivilegeKeys=true \
+		--nodePort=6666 \
+		--appDataDir=localnet/bob \
+		--appName=Bob
+
+# Generate a new block on your Bitcoin regtest network. Requires that
+# bitcoind is already running. See the `bitcoind` target above.
+block:

I think this could use another sentence or so in the preamble. You end up needing to create blocks to test features like governance so helping new users fix common errors like "I created a proposal from Alice, but it isn't visible on Bob. Why not?" may help the onboarding.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3718#pullrequestreview-324872357
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191129/229ce81f/attachment.html>


More information about the bisq-github mailing list