Add Logging and persist async operation for Sapling migration
Currently zcashd will automatically remove the last async migration operations when it reaches the height where it sends the transactions it just made. This is not in alignment with other async operations, which are not removed until a node is restarted or a user calls `z_getoperationresult`. This PR removes the calls to pop the operations so that they can be accessed and reviewed later. In this PR I also correct the operation's `amount_migrated` field to exclude the transaction fee (this field existed for debugging purposes, but should be consistent with `z_getmigrationstatus`), and have included the list of migration txids in the operation's result (this is similar to the async rpcs such as `z_sendmany`).
Documentation: none needed.
Test plan:
* After migration transactions have been created, list the opids and call `z_getoperationresult` on them.
* Check that the operations' `amount_migrated` fields exclude the fee.
Change expiry delta for migration transactions to 450 blocks
Documentation: to be done as part of the ZIP 308 update (zcash/zips#229).
Test plan: manually check that migration transactions have the expected expiry height, using getrawtransaction $TXID 1.
Closes#3999
Don't allow Sprout-to-Sapling migration when syncing during IBD or after wake from sleep.
Prevent migration transactions from being created in response to incoming blocks when a node launches and syncs (the initial block download phase) and when a node wakes from sleep/hibernation and starts syncing old blocks rapidly.
Remove unused specifier from format string
The extra specifier meant that a runtime error would be thrown during Sprout to Sapling migration, if `zrpcunsafe` logging was enabled, preventing migration transactions from being created.
The extra specifier meant that a runtime error would be thrown
during Sprout to Sapling migration if `zrpcunsafe` logging
was enabled:
"tinyformat: Too many conversion specifiers in format string"
add curl to package list for gitian lxc container
This PR fixes the issue we are seeing in the gitian builder:
https://github.com/zcash/zcash-gitian/issues/64
The base lxc image no longer contains curl by default so it must be installed.