bitcoin/contrib
W. J. van der Laan 1bbe289f20
Merge bitcoin/bitcoin#22565: [script] signet's getcoins.py improvements
b0c8246cac Add cleaner errors for unsuccessful faucet transactions (NikhilBartwal)
1c612b274b [script] Update signet getcoins.py for custom network (NikhilBartwal)

Pull request description:

  Currently, using the getcoins.py with a custom signet executes successfully and shows the transfer of 0.001 testBTC as complete, however for obvious reasons, it should not. In fact, upon verification it does not actually execute the transaction, but rather gives the output that it did, as shown below which can be misleading:

  ```
  [nikhilb@nikhil-PC bitcoin]$ echo $datadir
  /home/nikhilb/signet-custom
  [nikhilb@nikhil-PC bitcoin]$ contrib/signet/getcoins.py -- -datadir=$datadir
  Payment of 0.00100000 BTC sent with txid dd22c7d996e95f3e5baf20f73140d517ff48f1b26d0e4fefd61e3c37991b8f86
  [nikhilb@nikhil-PC bitcoin]$ bitcoin-cli -datadir=$datadir getrawtransaction dd22c7d996e95f3e5baf20f73140d517ff48f1b26d0e4fefd61e3c37991b8f86
  error code: -5
  error message:
  No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
  [nikhilb@nikhil-PC bitcoin]$ bitcoin-cli -datadir=$datadir gettransaction dd22c7d996e95f3e5baf20f73140d517ff48f1b26d0e4fefd61e3c37991b8f86
  error code: -5
  error message:
  Invalid or non-wallet transaction id

  ```
  This PR adds a sanity check for custom signet by comparing the current network's first block hash (the block after the genesis block) with global signet's respective block hash (since all signet networks share the same genesis block) and if a custom network is detected, the user is prompted to either work on the global signet or setup their own faucet.

  The PR was checked to be working successfully, giving the output as below:

  ```
  [nikhilb@nikhil-PC bitcoin]$ git checkout update_signet_getcoins
  Switched to branch 'update_signet_getcoins'
  Your branch is ahead of 'upstream/master' by 1 commit.
    (use "git push" to publish your local commits)
  [nikhilb@nikhil-PC bitcoin]$ contrib/signet/getcoins.py -- -datadir=$datadir
  The global faucet cannot be used with a custom Signet network. Please use the global signet or setup your custom faucet for the same.

  You can have a look here for setting up your own faucet: https://en.bitcoin.it/wiki/Signet

  ```

ACKs for top commit:
  prayank23:
    utACK b0c8246cac
  kallewoof:
    ACK b0c8246cac
  arnabsen1729:
    utACK b0c8246
  prakash1512:
    utACK b0c8246
  0xB10C:
    Tested ACK b0c8246cac
  theStack:
    Tested ACK b0c8246cac
  Zero-1729:
    crACK b0c8246 🧉

Tree-SHA512: 144b47a83008521a5cda13f4c1b12809a125a744f865a8e0f792132d52fdb88926d4f4f4d7230452c2e129b5879892cdbeda981b8af10b789e9fc0cda2905a5d
2021-08-23 19:19:00 +02:00
..
builder-keys contrib: use hkps://keys.openpgp.org to retrieve builder keys 2021-08-17 08:59:04 +08:00
debian doc: Fix external links (IRC, ...) 2021-05-31 17:27:57 +02:00
devtools scripts: prevent GCC optimising test symbols in test-symbol-check 2021-08-09 13:59:48 +08:00
gitian-descriptors Merge bitcoin/bitcoin#21871: scripts: add checks for minimum required OS versions 2021-06-18 15:21:47 +08:00
guix guix: Don't include directory name in SHA256SUMS 2021-08-18 20:07:32 -04:00
init Merge #21418: contrib: Make systemd invoke dependencies only when ready 2021-03-22 15:15:14 +01:00
linearize refactor: replace remaining binascii method calls 2021-08-16 19:30:56 +01:00
macdeploy macdeploy: alternative info to download the macOS SDK 2021-07-29 10:59:14 +02:00
message-capture Add documentation to contrib folder 2021-01-23 16:15:05 -05:00
qos test: fix file permissions on various scripts 2021-04-23 17:13:28 -07:00
seeds contrib, p2p: update I2P hardcoded seeds 2021-07-30 11:03:44 +02:00
shell guix: Add source-able bash prelude and utils 2021-04-05 11:00:21 -04:00
signet Merge bitcoin/bitcoin#22565: [script] signet's getcoins.py improvements 2021-08-23 19:19:00 +02:00
testgen bugfix: fix bech32_encode calls in gen_key_io_test_vectors.py 2021-03-18 14:28:46 -07:00
tracing tracing: Tracepoint for connected blocks 2021-07-27 17:12:38 +02:00
verify-commits contrib: use hkps://keys.openpgp.org to retrieve builder keys 2021-08-17 08:59:04 +08:00
verifybinaries Fix typo in comment 2021-07-27 14:01:08 +07:00
windeploy Merge bitcoin/bitcoin#22017: Update Windows code signing certificate 2021-05-27 21:51:58 +02:00
zmq refactor: replace remaining binascii method calls 2021-08-16 19:30:56 +01:00
bitcoin-cli.bash-completion scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
bitcoin-tx.bash-completion bash-completion: Adapt for 0.12 and 0.13 2016-07-07 07:52:59 -04:00
bitcoind.bash-completion scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
filter-lcov.py scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
gitian-build.py build: Xcode 12.1, macOS SDK 10.15.6 2021-05-01 13:39:45 +08:00
install_db4.sh contrib: use newer config.guess & config.sub in install_db4.sh 2021-07-22 14:49:21 +08:00
README.md tree-wide: Rename gitian-keys to builder-keys 2021-07-08 11:29:54 -04:00
valgrind.supp contrib: Fixup valgrind suppressions file 2020-08-05 16:43:30 +02:00

Repository Tools

Developer tools

Specific tools for developers working on this repository. Additional tools, including the github-merge.py script, are available in the maintainer-tools repository.

Verify-Commits

Tool to verify that every merge commit was signed by a developer using the github-merge.py script.

Linearize

Construct a linear, no-fork, best version of the blockchain.

Qos

A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.

Seeds

Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys

Packaging

The Debian subfolder contains the copyright file.

All other packaging related files can be found in the bitcoin-core/packaging repository.

Gitian-descriptors

Files used during the gitian build process. For more information about gitian, see the the Bitcoin Core documentation repository.

Builder keys

PGP keys used for signing Bitcoin Core release results.

MacDeploy

Scripts and notes for Mac builds.

Gitian-build

Script for running full Gitian builds.

Test and Verify Tools

TestGen

Utilities to generate test vectors for the data-driven Bitcoin tests.

Verify Binaries

This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.