From 62b698878676182870fcd84fa7fce0b11b1d1ee7 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Sun, 24 Sep 2023 18:36:25 -0700 Subject: [PATCH 1/3] Update manpage Makefile --- doc/man/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 51566a72a8..c2a6694472 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -5,8 +5,7 @@ if BUILD_BITCOIND endif if ENABLE_QT -#TODO(stevenroose) uncomment and fix -# dist_man1_MANS+=elements-qt.1 + dist_man1_MANS+=elements-qt.1 endif if BUILD_BITCOIN_CLI @@ -18,7 +17,7 @@ if BUILD_BITCOIN_TX endif if BUILD_BITCOIN_UTIL - dist_man1_MANS+=bitcoin-util.1 + dist_man1_MANS+=elements-util.1 endif if ENABLE_WALLET From 0a1b02a9d6291f6ca73ca53d194eb36546b3e3f7 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Mon, 25 Sep 2023 18:39:03 -0700 Subject: [PATCH 2/3] Fix placeholder manpages --- doc/man/{bitcoin-util.1 => elements-qt.1} | 4 +- doc/man/elements-tx.1 | 212 +--------------------- doc/man/elements-util.1 | 5 + 3 files changed, 10 insertions(+), 211 deletions(-) rename doc/man/{bitcoin-util.1 => elements-qt.1} (69%) create mode 100644 doc/man/elements-util.1 diff --git a/doc/man/bitcoin-util.1 b/doc/man/elements-qt.1 similarity index 69% rename from doc/man/bitcoin-util.1 rename to doc/man/elements-qt.1 index 5c733c6e21..738374031d 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/elements-qt.1 @@ -1,5 +1,5 @@ -.TH BITCOIN-UTIL "1" +.TH ELEMENTS-QT "1" .SH NAME -bitcoin-util \- manual page for bitcoin-util +elements-qt \- manual page for elements-qt This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/man/elements-tx.1 b/doc/man/elements-tx.1 index d22150ed69..b54eef991b 100644 --- a/doc/man/elements-tx.1 +++ b/doc/man/elements-tx.1 @@ -1,211 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10. -.TH ELEMENTS-TX "1" "May 2019" "elements-tx v0.17.0.1" "User Commands" +.TH ELEMENTS-TX "1" .SH NAME -elements-tx \- manual page for elements-tx v0.17.0.1 -.SH SYNOPSIS -.B elements-tx -[\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR -.br -.B elements-tx -[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR -.SH DESCRIPTION -Elements Core elements\-tx utility version v0.17.0.1\-dirty -.SH OPTIONS -.HP -\-? -.IP -This help message -.HP -\fB\-create\fR -.IP -Create new, empty TX. -.HP -\fB\-json\fR -.IP -Select JSON output -.HP -\fB\-txid\fR -.IP -Output only the hex\-encoded transaction id of the resultant transaction. -.PP -Chain selection options: -.HP -\fB\-chain=\fR -.IP -Use the 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 -.IP -Delete input N from TX -.IP -delout=N -.IP -Delete output N from TX -.IP -in=TXID:VOUT(:SEQUENCE_NUMBER) -.IP -Add input to TX -.IP -locktime=N -.IP -Set TX lock time to N -.IP -nversion=N -.IP -Set TX version to N -.IP -outaddr=VALUE:ADDRESS(:ASSET) -.IP -Add address\-based output to TX -.IP -outdata=[VALUE:]DATA -.IP -Add data\-based output to TX -.IP -outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS] -.IP -Add Pay To n\-of\-m Multi\-sig output to TX. n = REQUIRED, m = PUBKEYS. -Optionally add the "W" flag to produce a -pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to -wrap the output in a pay\-to\-script\-hash. -.IP -outpubkey=VALUE:PUBKEY[:FLAGS] -.IP -Add pay\-to\-pubkey output to TX. Optionally add the "W" flag to produce a -pay\-to\-witness\-pubkey\-hash output. Optionally add the "S" flag to -wrap the output in a pay\-to\-script\-hash. -.IP -outscript=VALUE:SCRIPT[:FLAGS] -.IP -Add raw script output to TX. Optionally add the "W" flag to produce a -pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to -wrap the output in a pay\-to\-script\-hash. -.IP -replaceable(=N) -.IP -Set RBF opt\-in sequence number for input N (if not provided, opt\-in all -available inputs) -.IP -sign=SIGHASH\-FLAGS -.IP -Add zero or more signatures to transaction. This command requires JSON -registers:prevtxs=JSON object, privatekeys=JSON object. See -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 -Load JSON file FILENAME into register NAME -.IP -set=NAME:JSON\-STRING -.IP -Set register NAME to given JSON\-STRING -.SH COPYRIGHT -Copyright (C) 2009-2019 The Elements Project developers -Copyright (C) 2009-2019 The Bitcoin Core developers - -Please contribute if you find Elements Core useful. Visit - for further information about the software. -The source code is available from . - -This is experimental software. -Distributed under the MIT software license, see the accompanying file COPYING -or +elements-tx \- manual page for elements-tx +This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/man/elements-util.1 b/doc/man/elements-util.1 new file mode 100644 index 0000000000..bc9824ad57 --- /dev/null +++ b/doc/man/elements-util.1 @@ -0,0 +1,5 @@ +.TH ELEMENTS-UTIL "1" +.SH NAME +elements-util \- manual page for elements-util + +This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. From 3eaccae830727ae76d8ad97ac238be97526d229c Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Wed, 27 Sep 2023 10:02:15 +0200 Subject: [PATCH 3/3] lint: fix codespell warnings --- doc/elements-block-header-format.md | 2 +- src/wallet/wallet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/elements-block-header-format.md b/doc/elements-block-header-format.md index c80377ad2d..8a15399ac0 100644 --- a/doc/elements-block-header-format.md +++ b/doc/elements-block-header-format.md @@ -83,7 +83,7 @@ DynaFed has been active on LiquidV1 from block height `1517040` onwards. | Current | Yes | | `DynaFedParamEntry` | The active DynaFed parameters at this height | | Proposed | Yes | | `DynaFedParamEntry` | The proposed DynaFed parameters for the next [epoch](https://github.com/ElementsProject/elements/blob/elements-22.1/src/chainparamsbase.cpp#L60) | -In DynaFed, the chain is initalized with a *dynamic epoch length*. This is the number of blocks that Dynamic Federation voting and enforcement are in effect for. In Liquid this value is 20160 blocks, approximately 2 weeks. When DynaFed is active, the Current parameters will always either be a Full set of all fields in the DynaFedParamEntry (given below), or a set of Compact parameters indicating no change since the previous Full parameters. During a normal non-proposing epoch, the Proposed parameters will be Null, indicating that no change in the Federation is being proposed for the next epoch. During a proposing epoch, block producers will include their intended parameters in the Proposed field, either as Full parameters or Compact parameters commiting to their previous proposal. +In DynaFed, the chain is initialized with a *dynamic epoch length*. This is the number of blocks that Dynamic Federation voting and enforcement are in effect for. In Liquid this value is 20160 blocks, approximately 2 weeks. When DynaFed is active, the Current parameters will always either be a Full set of all fields in the DynaFedParamEntry (given below), or a set of Compact parameters indicating no change since the previous Full parameters. During a normal non-proposing epoch, the Proposed parameters will be Null, indicating that no change in the Federation is being proposed for the next epoch. During a proposing epoch, block producers will include their intended parameters in the Proposed field, either as Full parameters or Compact parameters committing to their previous proposal. In order for a Proposed entry to be locked-in, at the end of the proposing epoch at least 4/5 blocks in that epoch must agree on the same Proposed parameters. If that condition is satisfied, then in the following epoch those Proposed parameters will become the Current parameters. There is a configurable `total_valid_epochs` consensus setting that defines how many epochs a given fedpegscript is valid for. In Liquid, this value is 2, meaning that once Proposed parameters become Current (ie. a successful transition), the fedpegscript of the previous epoch is valid for a grace period of 1 more epoch. #### DynaFed Parameters Entry (`class DynaFedParamEntry`) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 400c6461c9..e7444556ea 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -58,7 +58,7 @@ using interfaces::FoundBlock; namespace wallet { -isminetype InputIsMine(const CWallet& wallet, const COutPoint& txin); // ELEMENTS: foward declaration to remove circular dep on receive.h +isminetype InputIsMine(const CWallet& wallet, const COutPoint& txin); // ELEMENTS: forward declaration to remove circular dep on receive.h const std::map WALLET_FLAG_CAVEATS{ {WALLET_FLAG_AVOID_REUSE, "You need to rescan the blockchain in order to correctly mark used "