When responding to "mempool" message, do not include the txid of an
expiring soon transaction in the "inv" message reply.
When responding to "getdata" message, do not reply with a "tx" message
for a transaction which is expiring soon.
Don't accept transactions which are about to expire (next 3 blocks).
Don't set a ban score if a peer does propragate these transactions.
See ZEC-013 for more detail.
Load sapling chain value into memory
`CBlockIndex::nSaplingValue` has been correctly set and written to disk since before Sapling activated, meaning that all nodes now are correctly tracking the Sapling shielded pool value on-disk. However, on restart the per-block values are not being read into memory, and so the in-memory pool value appears to be zero on every restart. Setting `nSaplingValue` in-memory during block index loading fixes the problem.
Add a call to SetupNetworking in BasicTestingSetup
In issue https://github.com/zcash/zcash/issues/3668 , the error code returned by `getaddrinfo_a` (10093) is `WSANOTINITIALISED`:
> Successful WSAStartup not yet performed. Either the application has not called WSAStartup or WSAStartup failed. The application may be accessing a socket that the current active task does not own (that is, trying to share a socket between tasks), or WSACleanup has been called too many times.
https://docs.microsoft.com/en-us/windows/desktop/winsock/windows-sockets-error-codes-2
`WSAStartup` is called from the `SetupNetworking` function in `util.cpp`, but `SetupNetworking` was not being called during test setup. This pull request adds that call.
Here is a gitlab pipeline running tests in the `test_bitcoin.exe` executable before this change:
https://gitlab.com/charlieok/zcash/pipelines/36483478
...and here is the same set of tests run after this change:
https://gitlab.com/charlieok/zcash/pipelines/36485098
Update IncrementalMerkleTree test vectors to use valid commitments
The original commitments were SHA256 outputs, and some were outside the
scalar field. This didn't affect the Merkle hash, which drops the high
bit from each commitment, but it does affect the creation of the Merkle
path in Rust, which requires path nodes to be valid scalars.
Here, we explicitly drop the high bit of all test vector commitments,
as well as reducing the two that remain outside the field. The test
vectors still pass, and can now also be used in the Rust implementation.
Add clarifying text for parameter size
Addresses #3648.
Parameter size was previously specified to the nearest MB so not sure if 1.7GB/800MB is not specific enough? The true figures on disk are 1647MB and 777MB.
Save and restore current_path in TestingSetup constructor/destructor
In issue https://github.com/zcash/zcash/issues/3653 , the affected tests change their current working directory to a temporary directory that is created in the TestingSetup constructor and deleted in the destructor. In Windows it seems to cause a problem when a process attempts to delete its current working directory.
This change fixes the issue by saving the path of the current working directory in the constructor, and restoring the working directory to that path in the destructor before deleting the temporary directory.
3604 fix sapling default memo - 0xF6 plus zeros
Closes#3604. For Sapling outputs, set the default memo to `no_memo` instead of all zeros. (See section 5.5 of the Sapling protocol specification.)
Closes#3329. Send alert to put non-Sapling nodes into safe mode.
The alert targets nodes running protocol version <= 170006.
Sapling compatible nodes run protocol version >= 170007.