Merge ElementsProject/elements#1036: Rewrite assets tutorial

1d2dacb1e2 assets_tutorial: basically rewrite the whole thing (Andrew Poelstra)
6a74528a40 assets_tutorial: clean up PIDs and temp directories correctly (Andrew Poelstra)
6bd3df60e0 assets_tutorial: fix argument and path handling (Andrew Poelstra)

Pull request description:

  Clean up and rewrite the assets tutorial

  * Updates RPC to handle 0.21 changes (you now need createwallet/loadwallet)
  * Cleans up stray processes and temp directories even when it crashes
  * Significantly expands comments
  * Modernizes the Python, removes weird idioms like calling `raise` in an `except: pass` block

ACKs for top commit:
  gwillen:
    utACK 1d2dacb.

Tree-SHA512: dae8c7e02d3f5aa56cc714034667d3efdbc307744ec86d348cfccf117db80989e4089e095563ba8d91c4bab762972c3fd75ec0da2bd66c5ec0bb8449eae0fdcd
This commit is contained in:
Andrew Poelstra 2021-09-09 13:08:09 +00:00
commit 532d55d059
No known key found for this signature in database
GPG key ID: C588D63CE41B97C1
4 changed files with 662 additions and 312 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,20 @@
regtest=1
daemon=1
txindex=1
regtest.rpcport=18888
regtest.port=18889
# We are spawning these inside a Python script which will manage them, so don't daemonize
daemon=0
# Extra debugging output in case things go wrong
debug=1
debugexclude=libevent
debugexclude=leveldb
printtoconsole=0
rpcuser=user3
rpcpassword=password3
# Set a fallback fee, since initially the nodes will have no transaction data
# to do fee estimation from
fallbackfee=0.0002
[regtest]
rpcport=18888
port=18889

View file

@ -3,19 +3,20 @@ chain=elementsregtest
# Standard bitcoind stuff
rpcuser=user1
rpcpassword=password1
elementsregtest.rpcport=18884
elementsregtest.port=18886
rpcport=18884
# Over p2p we will only connect to local other elementsd
elementsregtest.connect=localhost:18887
daemon=1
# We are spawning these inside a Python script which will manage them, so don't daemonize
daemon=0
# Make sure you set listen after -connect, otherwise neither
# will accept incoming connections!
listen=1
# Just for looking at random txs
txindex=1
# Extra debugging output in case things go wrong
debug=1
debugexclude=libevent
debugexclude=leveldb
printtoconsole=0
# This is the script that controls pegged in funds in Bitcoin network
# Users will be pegging into a P2SH of this, and the "watchmen"
@ -42,3 +43,12 @@ mainchainrpcpassword=password3
# Free money to make testing easier
initialfreecoins=2100000000000000
# Set a fallback fee, since initially the nodes will have no transaction data
# to do fee estimation from
fallbackfee=0.0002
[elementsregtest]
rpcport=18884
port=18886

View file

@ -2,13 +2,16 @@ chain=elementsregtest
rpcuser=user2
rpcpassword=password2
elementsregtest.rpcport=18885
elementsregtest.port=18887
elementsregtest.connect=localhost:18886
daemon=1
# We are spawning these inside a Python script which will manage them, so don't daemonize
daemon=0
listen=1
txindex=1
# Extra debugging output in case things go wrong
debug=1
debugexclude=libevent
debugexclude=leveldb
printtoconsole=0
#fedpegscript=51<pubkey>51ae
#signblockscript=51<pubkey2>51ae
@ -19,3 +22,12 @@ mainchainrpcpassword=password3
validatepegin=1
initialfreecoins=2100000000000000
# Set a fallback fee, since initially the nodes will have no transaction data
# to do fee estimation from
fallbackfee=0.0002
[elementsregtest]
rpcport=18885
port=18887