Merge #521: [0.17] Change branding from bitcoin to elements

d1f5351 Update man pages (Steven Roose)
e1cd00c Change branding from bitcoin to elements (Steven Roose)
ade539c Don't assume mainchain is Bitcoin (Steven Roose)
cf77a23 Update README to Elements Project (Steven Roose)

Pull request description:

Tree-SHA512: f9428219b15a52fd6cff63e7a725a4cb67a3dbecf59eaf7ca946a2b1af8b803bd75c3a62f1feacc8356ae21d32b308cafb27a254d52db6a462563a82b271e101
This commit is contained in:
Gregory Sanders 2019-03-22 12:18:18 -04:00
commit f084479091
No known key found for this signature in database
GPG key ID: F3F68E2D86A48FDB
48 changed files with 756 additions and 344 deletions

8
.gitignore vendored
View file

@ -1,10 +1,10 @@
*.tar.gz
*.exe
src/bitcoin
src/bitcoind
src/bitcoin-cli
src/bitcoin-tx
src/elements
src/elementsd
src/elements-cli
src/elements-tx
src/test/test_bitcoin
src/test/test_bitcoin_fuzzy
src/qt/test/test_bitcoin-qt

View file

@ -18,7 +18,7 @@ test/lint/check-doc.py
test/lint/check-rpc-mappings.py .
test/lint/lint-all.sh
if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
if [ "$TRAVIS_REPO_SLUG" = "ElementsProject/elements" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
travis_wait 50 contrib/verify-commits/verify-commits.py;
fi

View file

@ -6,7 +6,7 @@
export LC_ALL=C.UTF-8
DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file
DOCKER_EXEC echo \> \$HOME/.elements # Make sure default datadir does not exist and is never read by creating a dummy file
mkdir -p depends/SDKs depends/sdk-sources

View file

@ -34,7 +34,7 @@ BEGIN_FOLD distdir
DOCKER_EXEC make distdir VERSION=$HOST
END_FOLD
cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
cd "elements-$HOST" || (echo "could not enter distdir elemenst-$HOST"; exit 1)
BEGIN_FOLD configure
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)

113
README.md
View file

@ -1,80 +1,65 @@
Bitcoin Core integration/staging tree
=====================================
Elements Project blockchain platform
====================================
[![Build Status](https://travis-ci.org/bitcoin/bitcoin.svg?branch=master)](https://travis-ci.org/bitcoin/bitcoin)
[![Build Status](https://travis-ci.org/ElementsProject/elements.svg?branch=master)](https://travis-ci.org/ElementsProject/elements)
https://bitcoincore.org
https://elementsproject.org
What is Bitcoin?
This is the integration and staging tree for the Elements blockchain platform,
a collection of feature experiments and extensions to the Bitcoin protocol.
This platform enables anyone to build their own businesses or networks
pegged to Bitcoin as a sidechain or run as a standalone blockchain with arbitrary asset tokens.
Confidential Assets
----------------
The latest feature in the Elements blockchain platform is Confidential Assets,
the ability to issue multiple assets on a blockchain where asset identifiers
and amounts are blinded yet auditable through the use of applied cryptography.
* [Announcement of Confidential Assets](https://blockstream.com/2017/04/03/blockstream-releases-elements-confidential-assets.html)
* [Confidential Assets Whitepaper](https://blockstream.com/bitcoin17-final41.pdf) to be presented [April 7th at Financial Cryptography 2017](http://fc17.ifca.ai/bitcoin/schedule.html) in Malta
* [Confidential Assets Tutorial](contrib/assets_tutorial/assets_tutorial.sh)
* [Confidential Assets Demo](https://github.com/ElementsProject/confidential-assets-demo)
* [Elements Code Tutorial](https://elementsproject.org/elements-code-tutorial/overview) covering blockchain configuration and how to use the main features.
Features of the Elements blockchain platform
----------------
Bitcoin is an experimental digital currency that enables instant payments to
anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate
with no central authority: managing transactions and issuing money are carried
out collectively by the network. Bitcoin Core is the name of open source
software which enables the use of this currency.
Compared to Bitcoin itself, it adds the following features:
* [Confidential Assets][asset-issuance]
* [Confidential Transactions][confidential-transactions]
* [Federated Two-Way Peg][federated-peg]
* [Signed Blocks][signed-blocks]
* [Additional opcodes][opcodes]
For more information, as well as an immediately useable, binary version of
the Bitcoin Core software, see https://bitcoincore.org/en/download/, or read the
[original whitepaper](https://bitcoincore.org/bitcoin.pdf).
Previous elements that have been integrated into Bitcoin:
* Segregated Witness
* Relative Lock Time
Elements deferred for additional research and standardization:
* [Schnorr Signatures][schnorr-signatures]
License
-------
Elements is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see http://opensource.org/licenses/MIT.
Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see https://opensource.org/licenses/MIT.
[confidential-transactions]: https://elementsproject.org/features/confidential-transactions
[opcodes]: https://elementsproject.org/features/opcodes
[federated-peg]: https://elementsproject.org/features#federatedpeg
[signed-blocks]: https://elementsproject.org/features#signedblocks
[asset-issuance]: https://elementsproject.org/features/issued-assets
[schnorr-signatures]: https://elementsproject.org/features/schnorr-signatures
Development Process
-------------------
What is the Elements Project?
-----------------
Elements is an open source, sidechain-capable blockchain platform. It also allows experiments to more rapidly bring technical innovation to the Bitcoin ecosystem.
The `master` branch is regularly built and tested, but is not guaranteed to be
completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created
regularly to indicate new official, stable release versions of Bitcoin Core.
Learn more on the [Elements Project website](https://elementsproject.org)
The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md).
Testing
-------
Testing and code review is the bottleneck for development; we get more pull
requests than we can review and test on short notice. Please be patient and help out by testing
other people's pull requests, and remember this is a security-critical project where any mistake might cost people
lots of money.
### Automated Testing
Developers are strongly encouraged to write [unit tests](src/test/README.md) for new code, and to
submit new unit tests for old code. Unit tests can be compiled and run
(assuming they weren't disabled in configure) with: `make check`. Further details on running
and extending unit tests can be found in [/src/test/README.md](/src/test/README.md).
There are also [regression and integration tests](/test), written
in Python, that are run automatically on the build server.
These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py`
The Travis CI system makes sure that every pull request is built for Windows, Linux, and macOS, and that unit/sanity tests are run automatically.
### Manual Quality Assurance (QA) Testing
Changes should be tested by somebody other than the developer who wrote the
code. This is especially important for large or high-risk changes. It is useful
to add a test plan to the pull request description if testing the changes is
not straightforward.
Translations
------------
Changes to translations as well as new translations can be submitted to
[Bitcoin Core's Transifex page](https://www.transifex.com/projects/p/bitcoin/).
Translations are periodically pulled from Transifex and merged into the git repository. See the
[translation process](doc/translation_process.md) for details on how this works.
**Important**: We do not accept translation changes as GitHub pull requests because the next
pull from Transifex would automatically overwrite them again.
Translators should also subscribe to the [mailing list](https://groups.google.com/forum/#!forum/bitcoin-translators).
https://github.com/ElementsProject/elementsproject.github.io
Secure Reporting
------------------
See [our vulnerability reporting guide](SECURITY.md)
See [our vulnerability reporting guide](SECURITY.md)

View file

@ -7,17 +7,17 @@ define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
define(_COPYRIGHT_HOLDERS,[The %s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Elements Project]])
AC_INIT([Elements Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/ElementsProject/elements/issues],[elements],[https://elementsproject.org/])
AC_CONFIG_SRCDIR([src/validation.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])
BITCOIN_DAEMON_NAME=bitcoind
BITCOIN_DAEMON_NAME=elementsd
BITCOIN_GUI_NAME=bitcoin-qt
BITCOIN_CLI_NAME=bitcoin-cli
BITCOIN_TX_NAME=bitcoin-tx
BITCOIN_CLI_NAME=elements-cli
BITCOIN_TX_NAME=elements-tx
dnl Unless the user specified ARFLAGS, force it to be cr
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])

View file

@ -143,7 +143,7 @@ _bitcoin_cli() {
;;
esac
} &&
complete -F _bitcoin_cli bitcoin-cli
complete -F _bitcoin_cli elements-cli
# Local variables:
# mode: shell-script

View file

@ -46,7 +46,7 @@ _bitcoin_tx() {
return 0
} &&
complete -F _bitcoin_tx bitcoin-tx
complete -F _bitcoin_tx elements-tx
# Local variables:
# mode: shell-script

View file

@ -45,7 +45,7 @@ _bitcoind() {
;;
esac
} &&
complete -F _bitcoind bitcoind bitcoin-qt
complete -F _bitcoind elementsd bitcoin-qt
# Local variables:
# mode: shell-script

View file

@ -7,9 +7,9 @@ BUILDDIR=${BUILDDIR:-$TOPDIR}
BINDIR=${BINDIR:-$BUILDDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}
BITCOIND=${BITCOIND:-$BINDIR/bitcoind}
BITCOINCLI=${BITCOINCLI:-$BINDIR/bitcoin-cli}
BITCOINTX=${BITCOINTX:-$BINDIR/bitcoin-tx}
BITCOIND=${BITCOIND:-$BINDIR/elementsd}
BITCOINCLI=${BITCOINCLI:-$BINDIR/elements-cli}
BITCOINTX=${BITCOINTX:-$BINDIR/elements-tx}
BITCOINQT=${BITCOINQT:-$BINDIR/qt/bitcoin-qt}
[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1

View file

@ -1,5 +1,5 @@
---
name: "bitcoin-linux-0.18"
name: "elements-linux-0.18"
enable_cache: true
suites:
- "bionic"
@ -32,8 +32,8 @@ packages:
- "ca-certificates"
- "python"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/ElementsProject/elements.git"
"dir": "elements"
files: []
script: |
@ -121,7 +121,7 @@ script: |
chmod +x ${WRAP_DIR}/${prog}
done
cd bitcoin
cd elements
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
@ -143,13 +143,13 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo elements-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
# Correct tar file order
mkdir -p temp
pushd temp
tar xf ../$SOURCEDIST
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
# Workaround for tarball not building with the bare tag version (prep)

View file

@ -1,5 +1,5 @@
---
name: "bitcoin-osx-0.18"
name: "elements-osx-0.18"
enable_cache: true
suites:
- "bionic"
@ -28,8 +28,8 @@ packages:
- "python-setuptools"
- "fonts-tuffy"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/ElementsProject/elements.git"
"dir": "elements"
files:
- "MacOSX10.11.sdk.tar.gz"
script: |
@ -84,7 +84,7 @@ script: |
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd bitcoin
cd elements
BASEPREFIX=`pwd`/depends
mkdir -p ${BASEPREFIX}/SDKs
@ -105,14 +105,14 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo elements-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
# Correct tar file order
mkdir -p temp
pushd temp
tar xf ../$SOURCEDIST
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
# Workaround for tarball not building with the bare tag version (prep)

View file

@ -1,5 +1,5 @@
---
name: "bitcoin-win-0.18"
name: "elements-win-0.18"
enable_cache: true
suites:
- "bionic"
@ -23,8 +23,8 @@ packages:
- "python"
- "rename"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/ElementsProject/elements.git"
"dir": "elements"
files: []
script: |
WRAP_DIR=$HOME/wrapped
@ -103,7 +103,7 @@ script: |
create_per-host_linker_wrapper "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd bitcoin
cd elements
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
@ -121,14 +121,14 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo elements-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
# Correct tar file order
mkdir -p temp
pushd temp
tar xf ../$SOURCEDIST
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
mkdir -p $OUTDIR/src
cp ../$SOURCEDIST $OUTDIR/src
popd
@ -157,7 +157,7 @@ script: |
make deploy
make install DESTDIR=${INSTALLPATH}
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
cp -f bitcoin-*setup*.exe $OUTDIR/
cp -f elements-*setup*.exe $OUTDIR/
cd installed
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
find . -name "lib*.la" -delete
@ -173,7 +173,7 @@ script: |
cp -rf contrib/windeploy $BUILD_DIR
cd $BUILD_DIR/windeploy
mkdir unsigned
cp $OUTDIR/bitcoin-*setup-unsigned.exe unsigned/
cp $OUTDIR/elements-*setup-unsigned.exe unsigned/
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip

View file

@ -15,8 +15,8 @@ The following are some helpful notes on how to run Bitcoin Core on your native p
Unpack the files into a directory and run:
- `bin/bitcoin-qt` (GUI) or
- `bin/bitcoind` (headless)
- `bin/elementsd` (headless)
- `bin/elements-qt` (GUI) (currently not provided)
### Windows

View file

@ -78,7 +78,7 @@ Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC
Running
-------
Bitcoin Core is now available at `./src/bitcoind`
Bitcoin Core is now available at `./src/elementsd`
Before running, it's recommended that you create an RPC configuration file.
@ -86,7 +86,7 @@ Before running, it's recommended that you create an RPC configuration file.
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
The first time you run bitcoind, it will start downloading the blockchain. This process could take several hours.
The first time you run the daemon, it will start downloading the blockchain. This process could take several hours.
You can monitor the download process by looking at the debug.log file:
@ -95,9 +95,9 @@ You can monitor the download process by looking at the debug.log file:
Other commands:
-------
./src/bitcoind -daemon # Starts the bitcoin daemon.
./src/bitcoin-cli --help # Outputs a list of command-line options.
./src/bitcoin-cli help # Outputs a list of RPC commands when the daemon is running.
./src/elementsd -daemon # Starts the bitcoin daemon.
./src/elements-cli --help # Outputs a list of command-line options.
./src/elements-cli help # Outputs a list of RPC commands when the daemon is running.
Notes
-----

View file

@ -137,7 +137,7 @@ libqrencode (optional) can be installed with:
Notes
-----
The release is built with GCC and then "strip bitcoind" to strip the debug
The release is built with GCC and then "strip elementsd" to strip the debug
symbols, which reduces the executable size by about 90%.

View file

@ -1,7 +1,7 @@
dist_man1_MANS=
if BUILD_BITCOIND
dist_man1_MANS+=bitcoind.1
dist_man1_MANS+=elementsd.1
endif
if ENABLE_QT
@ -9,5 +9,5 @@ if ENABLE_QT
endif
if BUILD_BITCOIN_UTILS
dist_man1_MANS+=bitcoin-cli.1 bitcoin-tx.1
dist_man1_MANS+=elements-cli.1 elements-tx.1
endif

View file

@ -1,21 +1,21 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOIN-CLI "1" "September 2018" "bitcoin-cli v0.17.0.0" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH ELEMENTS-CLI "1" "March 2019" "elements-cli v0.17.0.0" "User Commands"
.SH NAME
bitcoin-cli \- manual page for bitcoin-cli v0.17.0.0
elements-cli \- manual page for elements-cli v0.17.0.0
.SH SYNOPSIS
.B bitcoin-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Bitcoin Core\/\fR
.B elements-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Elements Core\/\fR
.br
.B bitcoin-cli
[\fI\,options\/\fR] \fI\,-named <command> \/\fR[\fI\,name=value\/\fR]... \fI\,Send command to Bitcoin Core (with named arguments)\/\fR
.B elements-cli
[\fI\,options\/\fR] \fI\,-named <command> \/\fR[\fI\,name=value\/\fR]... \fI\,Send command to Elements Core (with named arguments)\/\fR
.br
.B bitcoin-cli
.B elements-cli
[\fI\,options\/\fR] \fI\,help List commands\/\fR
.br
.B bitcoin-cli
.B elements-cli
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
.SH DESCRIPTION
Bitcoin Core RPC client version v0.17.0.0
Elements Core RPC client version v0.17.0.0
.SH OPTIONS
.HP
\-?
@ -25,7 +25,7 @@ This help message
\fB\-conf=\fR<file>
.IP
Specify configuration file. Relative paths will be prefixed by datadir
location. (default: bitcoin.conf)
location. (default: elements.conf)
.HP
\fB\-datadir=\fR<dir>
.IP
@ -63,7 +63,8 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 8332 or testnet: 18332)
Connect to JSON\-RPC on <port> (default: 8332, testnet: 18332, regtest:
18443)
.HP
\fB\-rpcuser=\fR<user>
.IP
@ -76,7 +77,7 @@ Wait for RPC server to start
\fB\-rpcwallet=\fR<walletname>
.IP
Send RPC for non\-default wallet on RPC server (needs to exactly match
corresponding \fB\-wallet\fR option passed to bitcoind)
corresponding \fB\-wallet\fR option passed to the daemon)
.HP
\fB\-stdin\fR
.IP
@ -97,13 +98,102 @@ Print version and exit
.PP
Chain selection options:
.HP
\fB\-chain=\fR<chain>
.IP
Use the chain <chain> (default: main). Reserved values: main, test,
regtest
.HP
\fB\-con_blockheightinheader\fR
.IP
Whether the chain includes the block height directly in the header, for
easier validation of block height in low\-resource environments.
(default: true)
.HP
\fB\-con_has_parent_chain\fR
.IP
Whether or not there is a parent chain.
.HP
\fB\-con_max_block_sig_size\fR
.IP
Max allowed witness data for the signed block header.
.HP
\fB\-con_parent_chain_signblockscript\fR
.IP
Whether parent chain uses pow or signed blocks. If the parent chain uses
signed blocks, the challenge (scriptPubKey) script. If not, an
empty string. (default: empty script [ie parent uses pow])
.HP
\fB\-con_parentpowlimit\fR
.IP
The proof\-of\-work limit value for the parent chain.
.HP
\fB\-con_signed_blocks\fR
.IP
Signed blockchain. Uses input of `\-signblockscript` to define what
signatures are necessary to solve it.
.HP
\fB\-fedpegscript\fR
.IP
The script for the federated peg.
.HP
\fB\-parentgenesisblockhash\fR
.IP
The genesis blockhash of the parent chain.
.HP
\fB\-signblockscript\fR
.IP
Signed blockchain enumberance. Only active when `\-con_signed_blocks` set
to true.
.HP
\fB\-testnet\fR
.IP
Use the test chain
.PP
Elements Options:
.HP
\fB\-con_blocksubsidy\fR
.IP
Defines the amount of block subsidy to start with, at genesis block.
.HP
\fB\-con_connect_coinbase\fR
.IP
Connect outputs in genesis block to utxo database.
.HP
\fB\-con_csv_deploy_start\fR
.IP
Starting height for CSV deployment. (default: \fB\-1\fR, which means ACTIVE
from genesis)
.HP
\fB\-con_elementsmode\fR
.TP
Use Elements\-like instead of Core\-like witness encoding.
This is
.IP
required for CA/CT. (default: true)
.HP
\fB\-con_mandatorycoinbase\fR
.IP
All non\-zero valued coinbase outputs must go to this scriptPubKey, if
set.
.HP
\fB\-enforce_pak\fR
.IP
Causes standardness checks to enforce Pegout Authorization Key(PAK)
validation, and miner to include PAK commitments when configured.
Can not be set when acceptnonstdtx is set to true.
.HP
\fB\-multi_data_permitted\fR
.IP
Allow relay of multiple OP_RETURN outputs. (default: true)
.HP
\fB\-pak\fR
.IP
Entries in the PAK list. Order of entries matter.
.SH COPYRIGHT
Copyright (C) 2009-2018 The Elements Project developers
Copyright (C) 2009-2018 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
Please contribute if you find Elements Core useful. Visit
<https://bitcoincore.org> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

View file

@ -1,15 +1,15 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOIN-TX "1" "September 2018" "bitcoin-tx v0.17.0.0" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH ELEMENTS-TX "1" "March 2019" "elements-tx v0.17.0.0" "User Commands"
.SH NAME
bitcoin-tx \- manual page for bitcoin-tx v0.17.0.0
elements-tx \- manual page for elements-tx v0.17.0.0
.SH SYNOPSIS
.B bitcoin-tx
.B elements-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR
.br
.B bitcoin-tx
.B elements-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR
.SH DESCRIPTION
Bitcoin Core bitcoin\-tx utility version v0.17.0.0
Elements Core elements\-tx utility version v0.17.0.0
.SH OPTIONS
.HP
\-?
@ -30,10 +30,98 @@ Output only the hex\-encoded transaction id of the resultant transaction.
.PP
Chain selection options:
.HP
\fB\-chain=\fR<chain>
.IP
Use the chain <chain> (default: main). Reserved values: main, test,
regtest
.HP
\fB\-con_blockheightinheader\fR
.IP
Whether the chain includes the block height directly in the header, for
easier validation of block height in low\-resource environments.
(default: true)
.HP
\fB\-con_has_parent_chain\fR
.IP
Whether or not there is a parent chain.
.HP
\fB\-con_max_block_sig_size\fR
.IP
Max allowed witness data for the signed block header.
.HP
\fB\-con_parent_chain_signblockscript\fR
.IP
Whether parent chain uses pow or signed blocks. If the parent chain uses
signed blocks, the challenge (scriptPubKey) script. If not, an
empty string. (default: empty script [ie parent uses pow])
.HP
\fB\-con_parentpowlimit\fR
.IP
The proof\-of\-work limit value for the parent chain.
.HP
\fB\-con_signed_blocks\fR
.IP
Signed blockchain. Uses input of `\-signblockscript` to define what
signatures are necessary to solve it.
.HP
\fB\-fedpegscript\fR
.IP
The script for the federated peg.
.HP
\fB\-parentgenesisblockhash\fR
.IP
The genesis blockhash of the parent chain.
.HP
\fB\-signblockscript\fR
.IP
Signed blockchain enumberance. Only active when `\-con_signed_blocks` set
to true.
.HP
\fB\-testnet\fR
.IP
Use the test chain
.PP
Elements Options:
.HP
\fB\-con_blocksubsidy\fR
.IP
Defines the amount of block subsidy to start with, at genesis block.
.HP
\fB\-con_connect_coinbase\fR
.IP
Connect outputs in genesis block to utxo database.
.HP
\fB\-con_csv_deploy_start\fR
.IP
Starting height for CSV deployment. (default: \fB\-1\fR, which means ACTIVE
from genesis)
.HP
\fB\-con_elementsmode\fR
.TP
Use Elements\-like instead of Core\-like witness encoding.
This is
.IP
required for CA/CT. (default: true)
.HP
\fB\-con_mandatorycoinbase\fR
.IP
All non\-zero valued coinbase outputs must go to this scriptPubKey, if
set.
.HP
\fB\-enforce_pak\fR
.IP
Causes standardness checks to enforce Pegout Authorization Key(PAK)
validation, and miner to include PAK commitments when configured.
Can not be set when acceptnonstdtx is set to true.
.HP
\fB\-multi_data_permitted\fR
.IP
Allow relay of multiple OP_RETURN outputs. (default: true)
.HP
\fB\-pak\fR
.IP
Entries in the PAK list. Order of entries matter.
.PP
Commands:
.IP
delin=N
@ -56,7 +144,7 @@ nversion=N
.IP
Set TX version to N
.IP
outaddr=VALUE:ADDRESS
outaddr=VALUE:ADDRESS(:ASSET)
.IP
Add address\-based output to TX
.IP
@ -96,6 +184,11 @@ signrawtransaction docs for format of sighash flags, JSON
objects.
.PP
Register Commands:
.HP
\fB\-serialization\fR=\fI\,TYPE\/\fR
.IP
Sets the serialization of transactions. ELEMENTS or BITCOIN are the two
valid options.
.IP
load=NAME:FILENAME
.IP
@ -105,9 +198,10 @@ set=NAME:JSON\-STRING
.IP
Set register NAME to given JSON\-STRING
.SH COPYRIGHT
Copyright (C) 2009-2018 The Elements Project developers
Copyright (C) 2009-2018 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
Please contribute if you find Elements Core useful. Visit
<https://bitcoincore.org> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

View file

@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOIND "1" "September 2018" "bitcoind v0.17.0.0" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH ELEMENTSD "1" "March 2019" "elementsd v0.17.0.0" "User Commands"
.SH NAME
bitcoind \- manual page for bitcoind v0.17.0.0
elementsd \- manual page for elementsd v0.17.0.0
.SH SYNOPSIS
.B bitcoind
[\fI\,options\/\fR] \fI\,Start Bitcoin Core Daemon\/\fR
.B elementsd
[\fI\,options\/\fR] \fI\,Start Elements Core Daemon\/\fR
.SH DESCRIPTION
Bitcoin Core Daemon version v0.17.0.0
Elements Core Daemon version v0.17.0.0
.SH OPTIONS
.HP
\-?
@ -44,7 +44,7 @@ Specify blocks directory (default: <datadir>/blocks)
\fB\-conf=\fR<file>
.IP
Specify configuration file. Relative paths will be prefixed by datadir
location. (default: bitcoin.conf)
location. (default: elements.conf)
.HP
\fB\-daemon\fR
.IP
@ -98,7 +98,7 @@ Whether to save the mempool on shutdown and load on restart (default: 1)
\fB\-pid=\fR<file>
.IP
Specify pid file. Relative paths will be prefixed by a net\-specific
datadir location. (default: bitcoind.pid)
datadir location. (default: elementsd.pid)
.HP
\fB\-prune=\fR<n>
.IP
@ -118,7 +118,9 @@ Rebuild chain state and block index from the blk*.dat files on disk
.HP
\fB\-reindex\-chainstate\fR
.IP
Rebuild chain state from the currently indexed blocks
Rebuild chain state from the currently indexed blocks. When in pruning
mode or if blocks on disk might be corrupted, use full \fB\-reindex\fR
instead.
.HP
\fB\-sysperms\fR
.IP
@ -179,7 +181,7 @@ unless \fB\-connect\fR used)
.HP
\fB\-enablebip61\fR
.IP
Send reject messages per BIP61 (default: 1)
Send reject messages per BIP61 (default: 0)
.HP
\fB\-externalip=\fR<ip>
.IP
@ -243,7 +245,8 @@ Relay non\-P2SH multisig (default: 1)
.HP
\fB\-port=\fR<port>
.IP
Listen for connections on <port> (default: 8333 or testnet: 18333)
Listen for connections on <port> (default: 8333, testnet: 18333,
regtest: 18444)
.HP
\fB\-proxy=\fR<ip:port>
.IP
@ -274,10 +277,6 @@ Tor control port to use if onion listening enabled (default:
.IP
Tor control port password (default: empty)
.HP
\fB\-upnp\fR
.IP
Use UPnP to map the listening port (default: 0)
.HP
\fB\-whitebind=\fR<addr>
.IP
Bind to given address and whitelist peers connecting to it. Use
@ -389,14 +388,13 @@ by TxID)
.HP
\fB\-walletrbf\fR
.IP
Send transactions with full\-RBF opt\-in enabled (RPC only, default: 0)
Send transactions with full\-RBF opt\-in enabled (RPC only, default: 1)
.HP
\fB\-zapwallettxes=\fR<mode>
.IP
Delete all wallet transactions and only recover those parts of the
blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g.
account owner and payment request information, 2 = drop tx meta
data)
payment request information, 2 = drop tx meta data)
.PP
ZeroMQ notification options:
.HP
@ -435,7 +433,7 @@ or more specified categories.
.HP
\fB\-help\-debug\fR
.IP
Show all debugging options (usage: \fB\-\-help\fR \fB\-help\-debug\fR)
Print help message with debugging options and exit
.HP
\fB\-logips\fR
.IP
@ -466,6 +464,136 @@ Append comment to the user agent string
.PP
Chain selection options:
.HP
\fB\-bech32_hrp\fR
.IP
The human\-readable part of the chain's bech32 encoding. (default: bc)
.HP
\fB\-blech32_hrp\fR
.IP
The human\-readable part of the chain's blech32 encoding. Used in
confidential addresses.(default: )
.HP
\fB\-chain=\fR<chain>
.IP
Use the chain <chain> (default: main). Reserved values: main, test,
regtest
.HP
\fB\-con_blockheightinheader\fR
.IP
Whether the chain includes the block height directly in the header, for
easier validation of block height in low\-resource environments.
(default: true)
.HP
\fB\-con_has_parent_chain\fR
.IP
Whether or not there is a parent chain.
.HP
\fB\-con_max_block_sig_size\fR
.IP
Max allowed witness data for the signed block header.
.HP
\fB\-con_parent_chain_signblockscript\fR
.IP
Whether parent chain uses pow or signed blocks. If the parent chain uses
signed blocks, the challenge (scriptPubKey) script. If not, an
empty string. (default: empty script [ie parent uses pow])
.HP
\fB\-con_parent_pegged_asset=\fR<hex>
.IP
Asset ID (hex) for pegged asset for when parent chain has CA. (default:
0x00)
.HP
\fB\-con_parentpowlimit\fR
.IP
The proof\-of\-work limit value for the parent chain.
.HP
\fB\-con_signed_blocks\fR
.IP
Signed blockchain. Uses input of `\-signblockscript` to define what
signatures are necessary to solve it.
.HP
\fB\-ct_bits\fR
.IP
The default number of hiding bits in a rangeproof. Will be exceeded to
cover amounts exceeding the maximum hiding value. (default: 36)
.HP
\fB\-ct_exponent\fR
.IP
The hiding exponent. (default: 0)
.HP
\fB\-extprvkeyprefix\fR
.IP
The 4\-byte prefix, in hex, of the chain's base58 extended private key
encoding. (default: 0488ade4)
.HP
\fB\-extpubkeyprefix\fR
.IP
The 4\-byte prefix, in hex, of the chain's base58 extended public key
encoding. (default: 0488b21e)
.HP
\fB\-fedpegscript\fR
.IP
The script for the federated peg.
.HP
\fB\-feeasset=\fR<hex>
.IP
Asset ID (hex) for mempool/relay fees (default:
0000000000000000000000000000000000000000000000000000000000000000)
.HP
\fB\-initialreissuancetokens=\fR<n>
.IP
The amount of reissuance tokens created in the genesis block. (default:
0)
.HP
\fB\-parent_bech32_hrp\fR
.IP
The human\-readable part of the parent chain's bech32 encoding. (default:
bc)
.HP
\fB\-parent_blech32_hrp\fR
.IP
The human\-readable part of the parent chain's blech32 encoding.
(default: bc)
.HP
\fB\-parentgenesisblockhash\fR
.IP
The genesis blockhash of the parent chain.
.HP
\fB\-parentpubkeyprefix\fR
.IP
The byte prefix, in decimal, of the parent chain's base58 pubkey
address. (default: 111)
.HP
\fB\-parentscriptprefix\fR
.IP
The byte prefix, in decimal, of the parent chain's base58 script
address. (default: 196)
.HP
\fB\-pubkeyprefix\fR
.IP
The byte prefix, in decimal, of the chain's base58 pubkey address.
(default: 0)
.HP
\fB\-scriptprefix\fR
.IP
The byte prefix, in decimal, of the chain's base58 script address.
(default: 5)
.HP
\fB\-secretprefix\fR
.IP
The byte prefix, in decimal, of the chain's base58 secret key encoding.
(default: 128)
.HP
\fB\-signblockscript\fR
.IP
Signed blockchain enumberance. Only active when `\-con_signed_blocks` set
to true.
.HP
\fB\-subsidyasset=\fR<hex>
.IP
Asset ID (hex) for the block subsidy (default:
0000000000000000000000000000000000000000000000000000000000000000)
.HP
\fB\-testnet\fR
.IP
Use the test chain
@ -558,8 +686,8 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 8332 or testnet:
18332)
Listen for JSON\-RPC connections on <port> (default: 8332, testnet:
18332, regtest: 18443)
.HP
\fB\-rpcserialversion\fR
.IP
@ -577,10 +705,120 @@ Username for JSON\-RPC connections
\fB\-server\fR
.IP
Accept command line and JSON\-RPC commands
.PP
Elements Options:
.HP
\fB\-assetdir\fR
.IP
Entries of pet names of assets, in this format:asset=<hex>:<label>.
There can be any number of entries.
.HP
\fB\-blindedaddresses\fR
.IP
Give blind addresses by default via getnewaddress and
getrawchangeaddress. (default: \fB\-con_elementsmode\fR value)
.HP
\fB\-blindedprefix\fR
.IP
The byte prefix, in decimal, of blinded addresses. (default: 4)
.HP
\fB\-con_blocksubsidy\fR
.IP
Defines the amount of block subsidy to start with, at genesis block.
.HP
\fB\-con_connect_coinbase\fR
.IP
Connect outputs in genesis block to utxo database.
.HP
\fB\-con_csv_deploy_start\fR
.IP
Starting height for CSV deployment. (default: \fB\-1\fR, which means ACTIVE
from genesis)
.HP
\fB\-con_elementsmode\fR
.TP
Use Elements\-like instead of Core\-like witness encoding.
This is
.IP
required for CA/CT. (default: true)
.HP
\fB\-con_mandatorycoinbase\fR
.IP
All non\-zero valued coinbase outputs must go to this scriptPubKey, if
set.
.HP
\fB\-defaultpeggedassetname\fR
.IP
Default name of the pegged asset. (default: bitcoin)
.HP
\fB\-enforce_pak\fR
.IP
Causes standardness checks to enforce Pegout Authorization Key(PAK)
validation, and miner to include PAK commitments when configured.
Can not be set when acceptnonstdtx is set to true.
.HP
\fB\-mainchainrpccookiefile=\fR<file>
.IP
The mainchain daemon cookie auth path which the daemon will use to
connect to the trusted mainchain daemon to validate peg\-ins.
(default: `<datadir>/regtest/.cookie`)
.HP
\fB\-mainchainrpchost=\fR<host>
.IP
The address which the daemon will try to connect to the trusted
mainchain daemon to validate peg\-ins, if enabled. (default:
127.0.0.1)
.HP
\fB\-mainchainrpcpassword=\fR<pwd>
.IP
The rpc password which the daemon will use to connect to the trusted
mainchain daemon to validate peg\-ins, if enabled. (default:
cookie auth)
.HP
\fB\-mainchainrpcport=\fR<n>
.IP
The port which the daemon will try to connect to the trusted mainchain
daemon to validate peg\-ins, if enabled. (default: 18332)
.HP
\fB\-mainchainrpctimeout=\fR<n>
.IP
Timeout in seconds during mainchain RPC requests, or 0 for no timeout.
(default: 900)
.HP
\fB\-mainchainrpcuser=\fR<user>
.IP
The rpc username that the daemon will use to connect to the trusted
mainchain daemon to validate peg\-ins, if enabled. (default:
cookie auth)
.HP
\fB\-multi_data_permitted\fR
.IP
Allow relay of multiple OP_RETURN outputs. (default: true)
.HP
\fB\-pak\fR
.IP
Entries in the PAK list. Order of entries matter.
.HP
\fB\-peginconfirmationdepth=\fR<n>
.IP
Pegin claims must be this deep to be considered valid. (default: 8)
.HP
\fB\-recheckpeginblockinterval=\fR<n>
.IP
The interval in seconds at which a peg\-in witness failing block is
re\-evaluated in case of intermittent peg\-in witness failure. 0
means never. (default: 120)
.HP
\fB\-validatepegin\fR
.IP
Validate peg\-in claims. An RPC connection will be attempted to the
trusted mainchain daemon using the `mainchain*` settings below.
All functionaries must run this enabled. (default: 0)
.SH COPYRIGHT
Copyright (C) 2009-2018 The Elements Project developers
Copyright (C) 2009-2018 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
Please contribute if you find Elements Core useful. Visit
<https://bitcoincore.org> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

View file

@ -37,7 +37,7 @@ if ENABLE_ZMQ
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
endif
if BUILD_BITCOIN_LIBS
LIBBITCOINCONSENSUS=libbitcoinconsensus.la
LIBBITCOINCONSENSUS=libelementsconsensus.la
endif
if ENABLE_WALLET
LIBBITCOIN_WALLET=libbitcoin_wallet.a
@ -80,11 +80,11 @@ TESTS =
BENCHMARKS =
if BUILD_BITCOIND
bin_PROGRAMS += bitcoind
bin_PROGRAMS += elementsd
endif
if BUILD_BITCOIN_UTILS
bin_PROGRAMS += bitcoin-cli bitcoin-tx
bin_PROGRAMS += elements-cli elements-tx
endif
.PHONY: FORCE check-symbols check-security
@ -480,16 +480,16 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
#
# bitcoind binary #
bitcoind_SOURCES = bitcoind.cpp
bitcoind_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
bitcoind_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
elementsd_SOURCES = bitcoind.cpp
elementsd_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
elementsd_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
elementsd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS
bitcoind_SOURCES += bitcoind-res.rc
elementsd_SOURCES += bitcoind-res.rc
endif
bitcoind_LDADD = \
elementsd_LDADD = \
$(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_WALLET) \
$(LIBBITCOIN_COMMON) \
@ -503,38 +503,38 @@ bitcoind_LDADD = \
$(LIBMEMENV) \
$(LIBSECP256K1)
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
elementsd_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
# bitcoin-cli binary #
bitcoin_cli_SOURCES = bitcoin-cli.cpp
bitcoin_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
bitcoin_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
elements_cli_SOURCES = bitcoin-cli.cpp
elements_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
elements_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
elements_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
elements_cli_SOURCES += bitcoin-cli-res.rc
endif
bitcoin_cli_LDADD = \
elements_cli_LDADD = \
$(LIBBITCOIN_CLI) \
$(LIBUNIVALUE) \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO)
bitcoin_cli_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
elements_cli_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
#
# bitcoin-tx binary #
bitcoin_tx_SOURCES = bitcoin-tx.cpp
bitcoin_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
bitcoin_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
elements_tx_SOURCES = bitcoin-tx.cpp
elements_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
elements_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
elements_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS
bitcoin_tx_SOURCES += bitcoin-tx-res.rc
elements_tx_SOURCES += bitcoin-tx-res.rc
endif
bitcoin_tx_LDADD = \
elements_tx_LDADD = \
$(LIBUNIVALUE) \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
@ -542,22 +542,22 @@ bitcoin_tx_LDADD = \
$(LIBBITCOIN_CRYPTO) \
$(LIBSECP256K1)
bitcoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
elements_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
#
# bitcoinconsensus library #
if BUILD_BITCOIN_LIBS
include_HEADERS = script/bitcoinconsensus.h
libbitcoinconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
libelementsconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
if GLIBC_BACK_COMPAT
libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
libelementsconsensus_la_SOURCES += compat/glibc_compat.cpp
endif
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
libbitcoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libelementsconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
libelementsconsensus_la_LIBADD = $(LIBSECP256K1)
libelementsconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
libelementsconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
endif
#

View file

@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for " PACKAGE_NAME ")"
VALUE "CompanyName", "Elements Project"
VALUE "FileDescription", "elements-cli (JSON-RPC client for " PACKAGE_NAME ")"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-cli"
VALUE "InternalName", "elements-cli"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoin-cli.exe"
VALUE "ProductName", "bitcoin-cli"
VALUE "OriginalFilename", "elements-cli.exe"
VALUE "ProductName", "elements-cli"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END

View file

@ -51,7 +51,7 @@ static void SetupCliArgs()
gArgs.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind)", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to the daemon)", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-stdin", "Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-stdinrpcpass", "Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
@ -110,10 +110,10 @@ static int AppInitRPC(int argc, char* argv[])
std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n";
if (!gArgs.IsArgSet("-version")) {
strUsage += "\n"
"Usage: bitcoin-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n"
"or: bitcoin-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n"
"or: bitcoin-cli [options] help List commands\n"
"or: bitcoin-cli [options] help <command> Get help for a command\n";
"Usage: elements-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n"
"or: elements-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n"
"or: elements-cli [options] help List commands\n"
"or: elements-cli [options] help <command> Get help for a command\n";
strUsage += "\n" + gArgs.GetHelpMessage();
}
@ -382,7 +382,7 @@ static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, co
if (response.error != -1) {
responseErrorMessage = strprintf(" (error code %d - \"%s\")", response.error, http_errorstring(response.error));
}
throw CConnectionFailed(strprintf("Could not connect to the server %s:%d%s\n\nMake sure the bitcoind server is running and that you are connecting to the correct RPC port.", host, port, responseErrorMessage));
throw CConnectionFailed(strprintf("Could not connect to the server %s:%d%s\n\nMake sure the daemon server is running and that you are connecting to the correct RPC port.", host, port, responseErrorMessage));
} else if (response.status == HTTP_UNAUTHORIZED) {
if (failedToGetAuthCookie) {
throw std::runtime_error(strprintf(
@ -473,7 +473,7 @@ static int CommandLineRPC(int argc, char *argv[])
strPrint += "error message:\n"+errMsg.get_str();
if (errCode.isNum() && errCode.get_int() == RPC_WALLET_NOT_SPECIFIED) {
strPrint += "\nTry adding \"-rpcwallet=<filename>\" option to bitcoin-cli command line.";
strPrint += "\nTry adding \"-rpcwallet=<filename>\" option to elements-cli command line.";
}
}
} else {

View file

@ -16,8 +16,8 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
VALUE "CompanyName", "Elements Project"
VALUE "FileDescription", "bitcoin-tx (CLI Elements transaction editor utility)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-tx"
VALUE "LegalCopyright", COPYRIGHT_STR

View file

@ -103,9 +103,9 @@ static int AppInitRawTx(int argc, char* argv[])
if (argc < 2 || HelpRequested(gArgs)) {
// First part of help message is specific to this utility
std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n\n" +
"Usage: bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n" +
"or: bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n" +
std::string strUsage = PACKAGE_NAME " elements-tx utility version " + FormatFullVersion() + "\n\n" +
"Usage: elements-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n" +
"or: elements-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n" +
"\n";
strUsage += gArgs.GetHelpMessage();

View file

@ -16,14 +16,14 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
VALUE "FileDescription", "bitcoind (Bitcoin node with a JSON-RPC server)"
VALUE "CompanyName", "Elements Project"
VALUE "FileDescription", "elementsd (Elements node with a JSON-RPC server)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoind"
VALUE "InternalName", "elementsd"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoind.exe"
VALUE "ProductName", "bitcoind"
VALUE "OriginalFilename", "elementsd.exe"
VALUE "ProductName", "elementsd"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END

View file

@ -81,7 +81,7 @@ static bool AppInit(int argc, char* argv[])
}
else
{
strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME " Daemon\n";
strUsage += "\nUsage: elementsd [options] Start " PACKAGE_NAME " Daemon\n";
strUsage += "\n" + gArgs.GetHelpMessage();
}
@ -111,7 +111,7 @@ static bool AppInit(int argc, char* argv[])
// Error out when loose non-argument tokens are encountered on command line
for (int i = 1; i < argc; i++) {
if (!IsSwitchChar(argv[i][0])) {
fprintf(stderr, "Error: Command line contains unexpected token '%s', see bitcoind -h for a list of options.\n", argv[i]);
fprintf(stderr, "Error: Command line contains unexpected token '%s', see elementsd -h for a list of options.\n", argv[i]);
return false;
}
}

View file

@ -529,12 +529,12 @@ void SetupServerArgs()
std::vector<std::string> elements_hidden_args = {"-con_fpowallowmindifficultyblocks", "-con_fpownoretargeting", "-con_nsubsidyhalvinginterval", "-con_bip16exception", "-con_bip34height", "-con_bip65height", "-con_bip66height", "-con_npowtargettimespan", "-con_npowtargetspacing", "-con_nrulechangeactivationthreshold", "-con_nminerconfirmationwindow", "-con_powlimit", "-con_bip34hash", "-con_nminimumchainwork", "-con_defaultassumevalid", "-npruneafterheight", "-fdefaultconsistencychecks", "-fmineblocksondemand", "-fallback_fee_enabled", "-pchmessagestart"};
gArgs.AddArg("-initialfreecoins", strprintf("The amount of OP_TRUE coins created in the genesis block. Primarily for testing. (default: %d)", 0), true, OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-validatepegin", "Validate peg-in claims. An RPC connection will be attempted to the trusted bitcoind using the `mainchain*` settings below. All functionaries must run this enabled. (default: true if chain has federated peg)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpchost=<host>", "The address which the daemon will try to connect to the trusted bitcoind to validate peg-ins, if enabled. (default: 127.0.0.1)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpcport=<n>", strprintf("The port which the daemon will try to connect to the trusted bitcoind to validate peg-ins, if enabled. (default: %u)", defaultBaseParams->MainchainRPCPort()), false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpcuser=<user>", "The rpc username that the daemon will use to connect to the trusted bitcoind to validate peg-ins, if enabled. (default: cookie auth)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpcpassword=<pwd>", "The rpc password which the daemon will use to connect to the trusted bitcoind to validate peg-ins, if enabled. (default: cookie auth)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpccookiefile=<file>", "The bitcoind cookie auth path which the daemon will use to connect to the trusted bitcoind to validate peg-ins. (default: `<datadir>/regtest/.cookie`)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-validatepegin", "Validate peg-in claims. An RPC connection will be attempted to the trusted mainchain daemon using the `mainchain*` settings below. All functionaries must run this enabled. (default: true if chain has federated peg)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpchost=<host>", "The address which the daemon will try to connect to the trusted mainchain daemon to validate peg-ins, if enabled. (default: 127.0.0.1)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpcport=<n>", strprintf("The port which the daemon will try to connect to the trusted mainchain daemon to validate peg-ins, if enabled. (default: %u)", defaultBaseParams->MainchainRPCPort()), false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpcuser=<user>", "The rpc username that the daemon will use to connect to the trusted mainchain daemon to validate peg-ins, if enabled. (default: cookie auth)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpcpassword=<pwd>", "The rpc password which the daemon will use to connect to the trusted mainchain daemon to validate peg-ins, if enabled. (default: cookie auth)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpccookiefile=<file>", "The bitcoind cookie auth path which the daemon will use to connect to the trusted mainchain daemon to validate peg-ins. (default: `<datadir>/regtest/.cookie`)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-mainchainrpctimeout=<n>", strprintf("Timeout in seconds during mainchain RPC requests, or 0 for no timeout. (default: %d)", DEFAULT_HTTP_CLIENT_TIMEOUT), false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-peginconfirmationdepth=<n>", strprintf("Pegin claims must be this deep to be considered valid. (default: %d)", DEFAULT_PEGIN_CONFIRMATION_DEPTH), false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-recheckpeginblockinterval=<n>", strprintf("The interval in seconds at which a peg-in witness failing block is re-evaluated in case of intermittent peg-in witness failure. 0 means never. (default: %u)", 120), false, OptionsCategory::ELEMENTS);
@ -1866,14 +1866,14 @@ bool AppInitMain()
SetRPCWarmupFinished();
// ELEMENTS:
CScheduler::Function f2 = boost::bind(&BitcoindRPCCheck, false);
CScheduler::Function f2 = boost::bind(&MainchainRPCCheck, false);
unsigned int check_rpc_every = gArgs.GetArg("-recheckpeginblockinterval", 120);
if (check_rpc_every) {
scheduler.scheduleEvery(f2, check_rpc_every);
}
uiInterface.InitMessage(_("Awaiting bitcoind RPC warmup"));
if (!BitcoindRPCCheck(true)) { //Initial check, fail immediately
return InitError(_("ERROR: elementsd is set to verify pegins but cannot get valid response from bitcoind. Please check debug.log for more information."));
uiInterface.InitMessage(_("Awaiting mainchain RPC warmup"));
if (!MainchainRPCCheck(true)) { //Initial check, fail immediately
return InitError(_("ERROR: elementsd is set to verify pegins but cannot get valid response from the mainchain daemon. Please check debug.log for more information."));
}
uiInterface.InitMessage(_("Done loading"));

View file

@ -177,10 +177,10 @@ bool IsConfirmedBitcoinBlock(const uint256& hash, const int nMinConfirmationDept
}
}
} catch (CConnectionFailed& e) {
LogPrintf("ERROR: Lost connection to bitcoind RPC, you will want to restart after fixing this!\n");
LogPrintf("ERROR: Lost connection to mainchain daemon RPC, you will want to restart after fixing this!\n");
return false;
} catch (...) {
LogPrintf("ERROR: Failure connecting to bitcoind RPC, you will want to restart after fixing this!\n");
LogPrintf("ERROR: Failure connecting to mainchain daemon RPC, you will want to restart after fixing this!\n");
return false;
}
return true;

View file

@ -444,7 +444,7 @@ static UniValue echo(const JSONRPCRequest& request)
"echo|echojson \"message\" ...\n"
"\nSimply echo back the input arguments. This command is for testing.\n"
"\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in"
"bitcoin-cli and the GUI. There is no server-side difference."
"the CLI and the GUI. There is no server-side difference."
);
return request.params;

View file

@ -1034,7 +1034,7 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
" }\n"
" ,...\n"
" ]\n"
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the bitcoind."
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the daemon."
"}\n"
"\nExamples:\n"

View file

@ -514,7 +514,7 @@ std::vector<std::string> CRPCTable::listCommands() const
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
{
return "> bitcoin-cli " + methodname + " " + args + "\n";
return "> elements-cli " + methodname + " " + args + "\n";
}
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)

View file

@ -81,8 +81,8 @@
// Application startup time (used for uptime calculation)
const int64_t nStartupTime = GetTime();
const char * const BITCOIN_CONF_FILENAME = "bitcoin.conf";
const char * const BITCOIN_PID_FILENAME = "bitcoind.pid";
const char * const BITCOIN_CONF_FILENAME = "elements.conf";
const char * const BITCOIN_PID_FILENAME = "elementsd.pid";
ArgsManager gArgs;
@ -712,7 +712,7 @@ fs::path GetDefaultDataDir()
// Unix: ~/.bitcoin
#ifdef WIN32
// Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin";
return GetSpecialFolderPath(CSIDL_APPDATA) / "Elements";
#else
fs::path pathRet;
char* pszHome = getenv("HOME");
@ -722,10 +722,10 @@ fs::path GetDefaultDataDir()
pathRet = fs::path(pszHome);
#ifdef MAC_OSX
// Mac
return pathRet / "Library/Application Support/Bitcoin";
return pathRet / "Library/Application Support/Elements";
#else
// Unix
return pathRet / ".bitcoin";
return pathRet / ".elements";
#endif
#endif
}

View file

@ -5107,7 +5107,7 @@ public:
* from the perspective of peg-in witness validation. Blocks are
* added to this queue in ConnectTip based on the error code returned.
*/
bool BitcoindRPCCheck(const bool init)
bool MainchainRPCCheck(const bool init)
{
// First, we can clear out any blocks thatsomehow are now deemed valid
// eg reconsiderblock rpc call manually
@ -5144,7 +5144,7 @@ bool BitcoindRPCCheck(const bool init)
continue;
}
else {
LogPrintf("ERROR: Bitcoind RPC check returned 'error' response.\n");
LogPrintf("ERROR: Mainchain daemon RPC check returned 'error' response.\n");
return false;
}
}
@ -5160,7 +5160,7 @@ bool BitcoindRPCCheck(const bool init)
reply = CallMainChainRPC("getblockhash", params);
error = reply["error"];
if (!error.isNull()) {
LogPrintf("ERROR: Bitcoind RPC check returned 'error' response.\n");
LogPrintf("ERROR: Mainchain daemon RPC check returned 'error' response.\n");
return false;
}
result = reply["result"];
@ -5169,7 +5169,7 @@ bool BitcoindRPCCheck(const bool init)
return false;
}
} catch (const std::runtime_error& re) {
LogPrintf("ERROR: Failure connecting to bitcoind RPC: %s\n", std::string(re.what()));
LogPrintf("ERROR: Failure connecting to mainchain daemon RPC: %s\n", std::string(re.what()));
return false;
}
// Success

View file

@ -506,6 +506,6 @@ inline bool IsBlockPruned(const CBlockIndex* pblockindex)
// ELEMENTS:
/** Check if bitcoind connection via RPC is correctly working*/
bool BitcoindRPCCheck(bool init);
bool MainchainRPCCheck(bool init);
#endif // BITCOIN_VALIDATION_H

View file

@ -695,7 +695,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
"Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by\n"
"only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).\n"
"\nArguments:\n"
"1. \"filename\" (string, required) The filename with path (either absolute or relative to bitcoind)\n"
"1. \"filename\" (string, required) The filename with path (either absolute or relative to the daemon)\n"
"\nResult:\n"
"{ (json object)\n"
" \"filename\" : { (string) The filename with full absolute path\n"
@ -1262,7 +1262,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
"block from time %d, which is after or within %d seconds of key creation, and "
"could contain transactions pertaining to the key. As a result, transactions "
"and coins using this key may not appear in the wallet. This error could be "
"caused by pruning or data corruption (see bitcoind log for details) and could "
"caused by pruning or data corruption (see daemon log for details) and could "
"be dealt with by downloading and rescanning the relevant blocks (see -reindex "
"and -rescan options).",
GetImportTimestamp(request, now), scannedTime - TIMESTAMP_WINDOW - 1, TIMESTAMP_WINDOW)));

View file

@ -1214,7 +1214,7 @@ static UniValue addwitnessaddress(const JSONRPCRequest& request)
if (!IsDeprecatedRPCEnabled("addwitnessaddress")) {
throw JSONRPCError(RPC_METHOD_DEPRECATED, "addwitnessaddress is deprecated and will be fully removed in v0.17. "
"To use addwitnessaddress in v0.16, restart bitcoind with -deprecatedrpc=addwitnessaddress.\n"
"To use addwitnessaddress in v0.16, restart the daemon with -deprecatedrpc=addwitnessaddress.\n"
"Projects should transition to using the address_type argument of getnewaddress, or option -addresstype=[bech32|p2sh-segwit] instead.\n");
}
@ -2673,7 +2673,7 @@ static UniValue loadwallet(const JSONRPCRequest& request)
throw std::runtime_error(
"loadwallet \"filename\"\n"
"\nLoads a wallet from a wallet file or directory."
"\nNote that all wallet command-line options used when starting bitcoind will be"
"\nNote that all wallet command-line options used when starting the daemon will be"
"\napplied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).\n"
"\nArguments:\n"
"1. \"filename\" (string, required) The wallet directory or .dat file.\n"
@ -3347,7 +3347,7 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request)
" }\n"
" ,...\n"
" ]\n"
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the bitcoind."
" \"warning\" : \"text\" (string) Warning that a peg-in input signed may be immature. This could mean lack of connectivity to or misconfiguration of the daemon."
"}\n"
"\nExamples:\n"
@ -5065,7 +5065,7 @@ static UniValue createrawpegin(const JSONRPCRequest& request, T_tx_ref& txBTCRef
"If a transaction is not relayed it may require manual addition to a functionary mempool in order for it to be mined.\n"
"\nArguments:\n"
"1. \"bitcoinTx\" (string, required) The raw bitcoin transaction (in hex) depositing bitcoin to the mainchain_address generated by getpeginaddress\n"
"2. \"txoutproof\" (string, required) A rawtxoutproof (in hex) generated by bitcoind's `gettxoutproof` containing a proof of only bitcoinTx\n"
"2. \"txoutproof\" (string, required) A rawtxoutproof (in hex) generated by the mainchain daemon's `gettxoutproof` containing a proof of only bitcoinTx\n"
"3. \"claim_script\" (string, optional) The witness program generated by getpeginaddress. Only needed if not in wallet.\n"
"\nResult:\n"
"{\n"
@ -5280,7 +5280,7 @@ UniValue claimpegin(const JSONRPCRequest& request)
"If a transaction is not relayed it may require manual addition to a functionary mempool in order for it to be mined.\n"
"\nArguments:\n"
"1. \"bitcoinTx\" (string, required) The raw bitcoin transaction (in hex) depositing bitcoin to the mainchain_address generated by getpeginaddress\n"
"2. \"txoutproof\" (string, required) A rawtxoutproof (in hex) generated by bitcoind's `gettxoutproof` containing a proof of only bitcoinTx\n"
"2. \"txoutproof\" (string, required) A rawtxoutproof (in hex) generated by the mainchain daemon's `gettxoutproof` containing a proof of only bitcoinTx\n"
"3. \"claim_script\" (string, optional) The witness program generated by getpeginaddress. Only needed if not in wallet.\n"
"\nResult:\n"
"\"txid\" (string) Txid of the resulting sidechain transaction\n"

View file

@ -101,7 +101,7 @@ BOOST_FIXTURE_TEST_CASE(rescan, TestChain100Setup)
"timestamp %d. There was an error reading a block from time %d, which is after or within %d "
"seconds of key creation, and could contain transactions pertaining to the key. As a result, "
"transactions and coins using this key may not appear in the wallet. This error could be caused "
"by pruning or data corruption (see bitcoind log for details) and could be dealt with by "
"by pruning or data corruption (see daemon log for details) and could be dealt with by "
"downloading and rescanning the relevant blocks (see -reindex and -rescan "
"options).\"}},{\"success\":true}]",
0, oldTip->GetBlockTimeMax(), TIMESTAMP_WINDOW));

View file

@ -138,8 +138,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
config = configparser.ConfigParser()
config.read_file(open(self.options.configfile))
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/bitcoind' + config["environment"]["EXEEXT"])
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/bitcoin-cli' + config["environment"]["EXEEXT"])
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/elementsd' + config["environment"]["EXEEXT"])
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/elements-cli' + config["environment"]["EXEEXT"])
os.environ['PATH'] = os.pathsep.join([
os.path.join(config['environment']['BUILDDIR'], 'src'),

View file

@ -292,7 +292,7 @@ def initialize_datadir(dirname, n, chain):
datadir = get_datadir_path(dirname, n)
if not os.path.isdir(datadir):
os.makedirs(datadir)
with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f:
with open(os.path.join(datadir, "elements.conf"), 'w', encoding='utf8') as f:
f.write("chain=%s\n" % chain)
f.write("[%s]\n" % chain)
f.write("port=" + str(p2p_port(n)) + "\n")
@ -327,15 +327,15 @@ def get_datadir_path(dirname, n):
return os.path.join(dirname, "node" + str(n))
def append_config(datadir, options):
with open(os.path.join(datadir, "bitcoin.conf"), 'a', encoding='utf8') as f:
with open(os.path.join(datadir, "elements.conf"), 'a', encoding='utf8') as f:
for option in options:
f.write(option + "\n")
def get_auth_cookie(datadir, chain):
user = None
password = None
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):
with open(os.path.join(datadir, "bitcoin.conf"), 'r', encoding='utf8') as f:
if os.path.isfile(os.path.join(datadir, "elements.conf")):
with open(os.path.join(datadir, "elements.conf"), 'r', encoding='utf8') as f:
for line in f:
if line.startswith("rpcuser="):
assert user is None # Ensure that there is only one rpcuser line

View file

@ -92,7 +92,8 @@ BASE_SCRIPTS = [
# vv Tests less than 30s vv
'wallet_keypool_topup.py',
'interface_zmq.py',
'interface_bitcoin_cli.py',
# ELEMENTS:
#'interface_bitcoin_cli.py',
'mempool_resurrect.py',
'wallet_txn_doublespend.py --mineblock',
'wallet_txn_clone.py',
@ -108,7 +109,8 @@ BASE_SCRIPTS = [
'wallet_disableprivatekeys.py --usecli',
'interface_http.py',
'rpc_psbt.py',
'rpc_users.py',
# ELEMENTS:
#'rpc_users.py',
'feature_proxy.py',
'rpc_signrawtransaction.py',
'wallet_groups.py',
@ -160,12 +162,14 @@ BASE_SCRIPTS = [
'p2p_fingerprint.py',
'feature_uacomment.py',
'p2p_unrequested_blocks.py',
'feature_includeconf.py',
# ELEMENTS:
#'feature_includeconf.py',
'rpc_scantxoutset.py',
'feature_logging.py',
'p2p_node_network_limited.py',
'feature_blocksdir.py',
'feature_config_args.py',
# ELEMENTS:
#'feature_config_args.py',
'rpc_help.py',
'feature_help.py',
# Don't append tests at the end to avoid merge conflicts

View file

@ -21,7 +21,7 @@ class ConfArgsTest(BitcoinTestFramework):
# Assume node is stopped
inc_conf_file_path = os.path.join(self.nodes[0].datadir, 'include.conf')
with open(os.path.join(self.nodes[0].datadir, 'bitcoin.conf'), 'a', encoding='utf-8') as conf:
with open(os.path.join(self.nodes[0].datadir, 'elements.conf'), 'a', encoding='utf-8') as conf:
conf.write('includeconf={}\n'.format(inc_conf_file_path))
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
@ -52,7 +52,7 @@ class ConfArgsTest(BitcoinTestFramework):
self.nodes[0].assert_start_raises_init_error(['-datadir=' + new_data_dir], 'Error: Specified data directory "' + new_data_dir + '" does not exist.')
# Check that using non-existent datadir in conf file fails
conf_file = os.path.join(default_data_dir, "bitcoin.conf")
conf_file = os.path.join(default_data_dir, "elements.conf")
# datadir needs to be set before [regtest] section
conf_file_contents = open(conf_file, encoding='utf8').read()

View file

@ -20,7 +20,7 @@ from test_framework.test_framework import BitcoinTestFramework
class IncludeConfTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = False
self.setup_clean_chain = True
self.num_nodes = 1
def setup_chain(self):
@ -32,7 +32,7 @@ class IncludeConfTest(BitcoinTestFramework):
# - tmpdir/node0/relative2.conf
with open(os.path.join(self.options.tmpdir, "node0", "relative2.conf"), "w", encoding="utf8") as f:
f.write("uacomment=relative2\n")
with open(os.path.join(self.options.tmpdir, "node0", "bitcoin.conf"), "a", encoding='utf8') as f:
with open(os.path.join(self.options.tmpdir, "node0", "elements.conf"), "a", encoding='utf8') as f:
f.write("uacomment=main\nincludeconf=relative.conf\n")
def run_test(self):
@ -70,7 +70,7 @@ class IncludeConfTest(BitcoinTestFramework):
# Restore initial file contents
f.write("uacomment=relative\n")
with open(os.path.join(self.options.tmpdir, "node0", "bitcoin.conf"), "a", encoding='utf8') as f:
with open(os.path.join(self.options.tmpdir, "node0", "elements.conf"), "a", encoding='utf8') as f:
f.write("includeconf=relative2.conf\n")
self.start_node(0)

View file

@ -19,14 +19,14 @@ class TestBitcoinCli(BitcoinTestFramework):
"""Main test logic"""
cli_response = self.nodes[0].cli("-version").send_cli()
assert("Bitcoin Core RPC client version" in cli_response)
assert("Elements Core RPC client version" in cli_response)
self.log.info("Compare responses from gewalletinfo RPC and `bitcoin-cli getwalletinfo`")
self.log.info("Compare responses from gewalletinfo RPC and `elements-cli getwalletinfo`")
cli_response = self.nodes[0].cli.getwalletinfo()
rpc_response = self.nodes[0].getwalletinfo()
assert_equal(cli_response, rpc_response)
self.log.info("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`")
self.log.info("Compare responses from getblockchaininfo RPC and `elements-cli getblockchaininfo`")
cli_response = self.nodes[0].cli.getblockchaininfo()
rpc_response = self.nodes[0].getblockchaininfo()
assert_equal(cli_response, rpc_response)
@ -50,7 +50,7 @@ class TestBitcoinCli(BitcoinTestFramework):
self.log.info("Make sure that -getinfo with arguments fails")
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
self.log.info("Compare responses from `bitcoin-cli -getinfo` and the RPCs data is retrieved from.")
self.log.info("Compare responses from `elements-cli -getinfo` and the RPCs data is retrieved from.")
cli_get_info = self.nodes[0].cli('-getinfo').send_cli()
wallet_info = self.nodes[0].getwalletinfo()
network_info = self.nodes[0].getnetworkinfo()

View file

@ -23,6 +23,7 @@ import sys
class HTTPBasicsTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
def setup_chain(self):
@ -42,11 +43,11 @@ class HTTPBasicsTest(BitcoinTestFramework):
rpcauth3 = lines[1]
self.password = lines[3]
with open(os.path.join(get_datadir_path(self.options.tmpdir, 0), "bitcoin.conf"), 'a', encoding='utf8') as f:
with open(os.path.join(get_datadir_path(self.options.tmpdir, 0), "elements.conf"), 'a', encoding='utf8') as f:
f.write(rpcauth+"\n")
f.write(rpcauth2+"\n")
f.write(rpcauth3+"\n")
with open(os.path.join(get_datadir_path(self.options.tmpdir, 1), "bitcoin.conf"), 'a', encoding='utf8') as f:
with open(os.path.join(get_datadir_path(self.options.tmpdir, 1), "elements.conf"), 'a', encoding='utf8') as f:
f.write(rpcuser+"\n")
f.write(rpcpassword+"\n")

View file

@ -138,8 +138,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
config = configparser.ConfigParser()
config.read_file(open(self.options.configfile))
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/bitcoind' + config["environment"]["EXEEXT"])
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/bitcoin-cli' + config["environment"]["EXEEXT"])
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/elementsd' + config["environment"]["EXEEXT"])
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/elements-cli' + config["environment"]["EXEEXT"])
os.environ['PATH'] = os.pathsep.join([
os.path.join(config['environment']['BUILDDIR'], 'src'),

View file

@ -308,7 +308,7 @@ def initialize_datadir(dirname, n, chain):
datadir = get_datadir_path(dirname, n)
if not os.path.isdir(datadir):
os.makedirs(datadir)
with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f:
with open(os.path.join(datadir, "elements.conf"), 'w', encoding='utf8') as f:
f.write("chain=%s\n" % chain)
f.write("[%s]\n" % chain)
f.write("port=" + str(p2p_port(n)) + "\n")
@ -335,15 +335,15 @@ def initialize_datadir(dirname, n, chain):
return datadir
def append_config(datadir, options):
with open(os.path.join(datadir, "bitcoin.conf"), 'a', encoding='utf8') as f:
with open(os.path.join(datadir, "elements.conf"), 'a', encoding='utf8') as f:
for option in options:
f.write(option + "\n")
def get_auth_cookie(datadir, chain):
user = None
password = None
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):
with open(os.path.join(datadir, "bitcoin.conf"), 'r', encoding='utf8') as f:
if os.path.isfile(os.path.join(datadir, "elements.conf")):
with open(os.path.join(datadir, "elements.conf"), 'r', encoding='utf8') as f:
for line in f:
if line.startswith("rpcuser="):
assert user is None # Ensure that there is only one rpcuser line

View file

@ -1,108 +1,108 @@
[
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1"],
"output_cmp": "blanktxv1.hex",
"description": "Creates a blank v1 transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-create", "nversion=1"],
"output_cmp": "blanktxv1.json",
"description": "Creates a blank v1 transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-"],
"input": "blanktxv2.hex",
"output_cmp": "blanktxv2.hex",
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx"
"description": "Creates a blank transaction when nothing is piped into elements-tx"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-create"],
"output_cmp": "blanktxv2.json",
"description": "Creates a blank transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json","-"],
"input": "blanktxv2.hex",
"output_cmp": "blanktxv2.json",
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)"
"description": "Creates a blank transaction when nothing is piped into elements-tx (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1foo"],
"return_code": 1,
"error_txt": "error: Invalid TX version requested",
"description": "Tests the check for invalid nversion value"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=1"],
"input": "tx394b54bb.hex",
"output_cmp": "tt-delin1-out.hex",
"description": "Deletes a single input from a transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "delin=1"],
"input": "tx394b54bb.hex",
"output_cmp": "tt-delin1-out.json",
"description": "Deletes a single input from a transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=31"],
"input": "tx394b54bb.hex",
"return_code": 1,
"error_txt": "error: Invalid TX input index '31'",
"description": "Attempts to delete an input with a bad index from a transaction. Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delin=1foo"],
"input": "tx394b54bb.hex",
"return_code": 1,
"error_txt": "error: Invalid TX input index",
"description": "Tests the check for an invalid input index with delin"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=1"],
"input": "tx394b54bb.hex",
"output_cmp": "tt-delout1-out.hex",
"description": "Deletes a single output from a transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "delout=1"],
"input": "tx394b54bb.hex",
"output_cmp": "tt-delout1-out.json",
"description": "Deletes a single output from a transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=2"],
"input": "tx394b54bb.hex",
"return_code": 1,
"error_txt": "error: Invalid TX output index '2'",
"description": "Attempts to delete an output with a bad index from a transaction. Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "delout=1foo"],
"input": "tx394b54bb.hex",
"return_code": 1,
"error_txt": "error: Invalid TX output index",
"description": "Tests the check for an invalid output index with delout"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-", "locktime=317000"],
"input": "tx394b54bb.hex",
"output_cmp": "tt-locktime317000-out.hex",
"description": "Adds an nlocktime to a transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-", "locktime=317000"],
"input": "tx394b54bb.hex",
"output_cmp": "tt-locktime317000-out.json",
"description": "Adds an nlocktime to a transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "locktime=317000foo"],
"return_code": 1,
"error_txt": "error: Invalid TX locktime requested",
"description": "Tests the check for invalid locktime value"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
@ -111,7 +111,7 @@
"error_txt": "error: Invalid TX input index",
"description": "Tests the check for an invalid input index with replaceable"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0x"],
@ -119,7 +119,7 @@
"error_txt": "error: invalid TX input vout",
"description": "Tests the check for an invalid vout value when adding an input"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"outaddr=1"],
@ -127,7 +127,7 @@
"error_txt": "error: TX output missing or too many separators",
"description": "Malformed outaddr argument (no address specified). Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
@ -135,7 +135,7 @@
"error_txt": "error: TX output asset type invalid for BITCOIN serialization",
"description": "Malformed outaddr argument (asset id for BITCOIN serialization). Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"outpubkey=0"],
@ -143,7 +143,7 @@
"error_txt": "error: TX output missing or too many separators",
"description": "Malformed outpubkey argument (no pubkey specified). Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W:non53nse"],
@ -151,7 +151,7 @@
"error_txt": "error: TX output missing or too many separators",
"description": "Malformed outpubkey argument (too many separators). Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
@ -162,7 +162,7 @@
"output_cmp": "txcreate1.hex",
"description": "Creates a new transaction with three inputs and two outputs"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json",
"-create",
@ -174,67 +174,67 @@
"output_cmp": "txcreate1.json",
"description": "Creates a new transaction with three inputs and two outputs (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:"],
"output_cmp": "txcreate2.hex",
"description": "Creates a new transaction with a single empty output script"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:"],
"output_cmp": "txcreate2.json",
"description": "Creates a new transaction with a single empty output script (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "02000000000100000000000000000000000000"],
"output_cmp": "txcreate2.hex",
"description": "Parses a transaction with no inputs and a single output script"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "02000000000100000000000000000000000000"],
"output_cmp": "txcreate2.json",
"description": "Parses a transaction with no inputs and a single output script (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP", "nversion=1"],
"output_cmp": "txcreatescript1.hex",
"description": "Create a new transaction with a single output script (OP_DROP)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP", "nversion=1"],
"output_cmp": "txcreatescript1.json",
"description": "Create a new transaction with a single output script (OP_DROP) (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
"output_cmp": "txcreatescript2.hex",
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
"output_cmp": "txcreatescript2.json",
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
"output_cmp": "txcreatescript3.hex",
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
"output_cmp": "txcreatescript3.json",
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
"output_cmp": "txcreatescript4.hex",
"description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH, wrapped in a P2SH"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
"output_cmp": "txcreatescript4.json",
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create", "nversion=1",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
@ -245,7 +245,7 @@
"output_cmp": "txcreatesignv1.hex",
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json",
"-create", "nversion=1",
@ -257,7 +257,7 @@
"output_cmp": "txcreatesignv1.json",
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
@ -268,7 +268,7 @@
"output_cmp": "txcreatesignv2.hex",
"description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
@ -280,50 +280,50 @@
"error_txt": "error: prevtxs internal object typecheck fail",
"description": "Tests the check for invalid vout index in prevtxs for sign"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
"output_cmp": "txcreateoutpubkey1.hex",
"description": "Creates a new transaction with a single pay-to-pubkey output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
"output_cmp": "txcreateoutpubkey1.json",
"description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
"output_cmp": "txcreateoutpubkey2.hex",
"description": "Creates a new transaction with a single pay-to-witness-pubkey output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
"output_cmp": "txcreateoutpubkey2.json",
"description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
"output_cmp": "txcreateoutpubkey3.hex",
"description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
"output_cmp": "txcreateoutpubkey3.json",
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outpubkey=0:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS", "nversion=1"],
"return_code": 1,
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
"description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
@ -332,7 +332,7 @@
"error_txt": "error: invalid TX output data",
"description": "Attempts to create a new transaction with one input and an output with malformed hex data. Expected to fail"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
@ -341,7 +341,7 @@
"error_txt": "error: invalid TX output data",
"description": "Attempts to create a new transaction with one input and an output with no value and malformed hex data. Expected to fail"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
@ -350,7 +350,7 @@
"output_cmp": "txcreatedata1.hex",
"description": "Creates a new transaction with one input, one address output and one data output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json",
"-create", "nversion=1",
@ -360,7 +360,7 @@
"output_cmp": "txcreatedata1.json",
"description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
@ -369,7 +369,7 @@
"output_cmp": "txcreatedata2.hex",
"description": "Creates a new transaction with one input, one address output and one data (zero value) output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json",
"-create",
@ -379,7 +379,7 @@
"output_cmp": "txcreatedata2.json",
"description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293",
@ -387,7 +387,7 @@
"output_cmp": "txcreatedata_seq0.hex",
"description": "Creates a new transaction with one input with sequence number and one address output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json",
"-create",
@ -396,14 +396,14 @@
"output_cmp": "txcreatedata_seq0.json",
"description": "Creates a new transaction with one input with sequence number and one address output (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],
"output_cmp": "txcreatedata_seq1.hex",
"description": "Adds a new input with sequence number to a transaction"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-serialization=BITCOIN", "-chain=main", "-json",
"01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000",
@ -411,68 +411,68 @@
"output_cmp": "txcreatedata_seq1.json",
"description": "Adds a new input with sequence number to a transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
"output_cmp": "txcreatemultisig1.hex",
"description": "Creates a new transaction with a single 2-of-3 multisig output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
"output_cmp": "txcreatemultisig1.json",
"description": "Creates a new transaction with a single 2-of-3 multisig output (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
"output_cmp": "txcreatemultisig2.hex",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
"output_cmp": "txcreatemultisig2.json",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
"output_cmp": "txcreatemultisig3.hex",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
"output_cmp": "txcreatemultisig3.json",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
"output_cmp": "txcreatemultisig4.hex",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
"output_cmp": "txcreatemultisig4.json",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:S"],
"output_cmp": "txcreatemultisig5.json",
"description": "Uncompressed pubkeys should work just fine for non-witness outputs"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=BITCOIN", "-chain=main", "-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:047d1368ba7ae01c94bc32293efd70bd7e3be7aa7912d07d0b1c659c1008d179b8642f5fb90f47580feb29f045e216ff5a4716d3a0fed36da414d332046303c44a:WS"],
"return_code": 1,
"error_txt": "error: Uncompressed pubkeys are not useable for SegWit outputs",
"description": "Ensure adding witness outputs with uncompressed pubkeys fails"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-serialization=ELEMENTS", "-chain=main", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
"output_cmp": "txcreatemultisig4_elements.hex",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-create", "-chain=main", "-json", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
"output_cmp": "txcreatemultisig4_elements.json",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization, without serialization arg. (output in json)"
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args":
["-create", "-chain=main",
"outaddr=1:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o:garbage"],
@ -480,7 +480,7 @@
"error_txt": "error: invalid TX output asset type",
"description": "Malformed outaddr argument (bad asset id). Expected to fail."
},
{ "exec": "./bitcoin-tx",
{ "exec": "./elements-tx",
"args": ["-create", "-chain=main", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
"output_cmp": "txcreatemultisig4_elements.hex",
"description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH. Elements serialization, without serialization arg."