-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0.9] backports and final changes for v2.0.9-rc2 #99
Conversation
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp src/zcash/*/*.tcc ; -END VERIFY SCRIPT-
-BEGIN VERIFY SCRIPT- sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ; -END VERIFY SCRIPT-
nHeight > GetCommunityFeeStartHeight() && nHeight <= GetLastCommunityFeeBlockHeight()
Merge 'dev1' branch
Merge 'dev2' branch
Merge 'dev3' branch
…pted in main thread
- Small httpserver.cpp backports - Optimise reindex - Don't recommend -reindex-chainstate - Make -reindex and -reindex-chainstate imply -rescan - Scan wallet from genesis when reindexing - Bitcoin 0.12 Merkle tree PRs - Reduce memory usage of CBlockIndex - Remove const annotation from blockinfo iterator type - Fetch recently conflicted transactions incrementally in ThreadNotifyWallet - Set hashFinalSaplingRoot in AddToBlockIndex and ConnectBlock
@ezzygarmyz I'll try on this new Linux Mint install I'm about to do and let you know how it works out and what I did to get there. You can reach me in the BTCZ App team discord https://discord.gg/bhRVrP2 |
so you got it working? |
Skip note which has been spent and locked notes before decrypting
I tried to build a BitcoinZ wallet for macOS on a Mac with an M2 CPU. However, I encountered the following problem:
Previously, I successfully built a Bitcoin wallet without any issues using the guide found here. Thank you. |
Notable changes
DoS Mitigation: Mempool Size Limit and Random Drop
This release adds a mechanism for preventing nodes from running out of memory
in the situation where an attacker is trying to overwhelm the network with
transactions. This is achieved by keeping track of and limiting the total
cost
andevictionWeight
of all transactions in the mempool. Thecost
of atransaction is determined by its size in bytes, and its
evictionWeight
is afunction of the transaction's
cost
and its fee. The maximum total cost isconfigurable via the parameter
mempooltxcostlimit
which defaults to80,000,000 (up to 20,000 txs). If a node's total mempool
cost
exceeds thislimit the node will evict a random transaction, preferentially picking larger
transactions and ones with below the standard fee. To prevent a node from
re-accepting evicted transactions, it keeps track of ones that it has evicted
recently. By default, a transaction will be considered recently evicted for 60
minutes, but this can be configured with the parameter
mempoolevictionmemoryminutes
.For full details see ZIP 401.
Asynchronous Operations Incorrectly Reporting Success
We fixed an issue where asynchronous operations were sometimes reporting sucess
when they had actually failed. One way this could occur was when trying to use
z_sendmany
to create a transaction spending coinbase funds in a way wherechange would be generated (not a valid use of
z_sendmany
). In this case theoperation would erroneously report success, and the only way to see that the
transaction had actually failed was to look in the
debug.log
file. Suchoperations will now correctly report that they have failed.
Fake chain detection during initial block download
One of the mechanisms that
bitcoinzd
uses to detect whether it is in "initialblock download" (IBD) mode is to compare the active chain's cumulative work
against a hard-coded "minimum chain work" value. This mechanism (inherited from
Bitcoin Core) means that once a node exits IBD mode, it is either on the main
chain, or a fake alternate chain with similar amounts of work. In the latter
case, the node has most likely become the victim of a 50% + 1 adversary.
Starting from this release,
bitcoinzd
additionally hard-codes the block hashesfor the activation blocks of each past network upgrade (NU). During initial
chain synchronization, and after the active chain has reached "minimum chain
work", the node checks the blocks at each NU activation height against the
hard-coded hashes. If any of them do not match, the node will immediately alert
the user and shut down for safety.
Disabling old Sprout proofs
As part of our ongoing work to clean up the codebase and minimise the security
surface of
bitcoinzd
, we are removinglibsnark
from the codebase, and droppingsupport for creating and verifying old Sprout proofs. Funds stored in Sprout
addresses are not affected, as they are spent using the hybrid Sprout circuit
(built using
bellman
) that was deployed during the Sapling network upgrade.This change has several implications:
bitcoinzd
no longer verifies old Sprout proofs, and will instead assume theyare valid. This has a minor implication for nodes: during initial block
download, an adversary could feed the node fake blocks containing invalid old
Sprout proofs, and the node would accept the fake chain as valid. However,
as soon as the active chain contains at least as much work as the hard-coded
"minimum chain work" value, the node will detect this situation and shut down.
Shielded transactions can no longer be created before Sapling has activated.
This does not affect BitcoinZ itself, but will affect downstream codebases that
have not yet activated Sapling (or that start a new chain after this point and
do not activate Sapling from launch). Note that the old Sprout circuit is
vulnerable to counterfeiting
and should not be used in current deployments.
Starting from this release, the circuit parameters from the original Sprout
MPC are no longer required to start
bitcoinzd
, and will not be downloaded byfetch-params.sh
. They are not being automatically deleted at this time.Option parsing behavior
Command line options are now parsed strictly in the order in which they are
specified. It used to be the case that
-X -noX
ends up, unintuitively, with Xset, as
-X
had precedence over-noX
. This is no longer the case. Like forother software, the last specified value for an option will hold.
Low-level RPC changes
incoming payments. As this feature was only available for multisig outputs for
which you had all private keys in your wallet, there was generally no use for
them compared to single-key schemes. Furthermore, no address format for such
outputs is defined, and wallet software can't easily send to it. These outputs
will no longer show up in
listtransactions
,listunspent
, or contribute toyour balance, unless they are explicitly watched (using
importaddress
orimportmulti
with hex script argument).signrawtransaction*
also stillworks for them.
View shielded information in wallet transactions
In previous
bitcoinzd
versions, to obtain information about shielded transactionsyou would use either the
z_listreceivedbyaddress
RPC method (which returns allnotes received by an address) or
z_listunspent
(which returns unspent notes,optionally filtered by addresses). There were no RPC methods that directly
returned details about spends, or anything equivalent to the
gettransaction
method (which returns transparent information about in-wallet transactions).
This release introduces a new RPC method
z_viewtransaction
to fill that gap.Given the ID of a transaction in the wallet, it decrypts the transaction and
returns detailed shielded information for all decryptable new and spent notes,
including:
outgoing
flag on each new note, which will betrue
if the output is notfor an address in the wallet.
memoStr
field for each new note, containing its text memo (if its memofield contains a valid UTF-8 string).
Information will be shown for any address that appears in
z_listaddresses
;this includes watch-only addresses linked to viewing keys imported with
z_importviewingkey
, as well as addresses with spending keys (both generatedwith
z_getnewaddress
and imported withz_importkey
).Build system
The
--enable-lcov
,--disable-tests
, and--disable-mining
flags forzcutil/build.sh
have been removed. You can pass these flags instead by usingthe
CONFIGURE_FLAGS
environment variable. For example, to enable coverageinstrumentation (thus enabling "make cov" to work), call:
The build system no longer defaults to verbose output. You can re-enable
verbose output with
./zcutil/build.sh V=1