Note that the MTP of a block is the median timestamp of the preceding 11 blocks, i.e. it is
typically (with no or only moderate timestamp manipulation) expected to be 6 block intervals
behind that block's timestamp, which *on average* is 450 seconds behind (after Blossom activation).
So the effective limit on future dating of timestamps is ~82.5 minutes. This makes it
exceptionally unlikely --even taking into account feasible timestamp manipulation of this
and previous blocks-- that the chain will stall because no block is found before the limit.
(This may rely on assumptions that do not hold for testnet.)
If an adversary were to have a sufficient fraction of mining power to engineer this situation
then there would be something seriously wrong, and arguably the chain should stall in that
case, pending manual intervention.
Co-authored-by: Jack Grigg <jack@z.cash>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Update libsodium download-path
This PR fixes the macOS build that is currently failing due to the download path for Libsodium changing - mentioned in issue #4295
depends macOS: hide linker visibility warnings
Closes https://github.com/zcash/zcash/issues/4255
Tested that all lines with `ld: warning: direct access in` are gone from build log.
Bitcoin wallet PRs 3
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7687
- bitcoin/bitcoin#11116
- Excludes SegWit tests
- Excludes `isInvalid` code (which is part of the SegWit support structure)
- bitcoin/bitcoin#13002
- Excludes changes to `importwallet` (missing bitcoin/bitcoin#11667)
- Excludes changes to `ProcessImport` (missing bitcoin/bitcoin#7551)
- Third commit was rewritten to add an internal SigVersion argument (which we didn't have because it was added to support SegWit logic).
Such outputs can still be watched, and signed for, but they aren't treated as valid payments.
That means they won't cause transactions to appear in listtransactions, their outputs to be
shown under listunspent, or affect balances.
Inside IsMine we care about the distinction between scriptPubKey execution
and P2SH redeemScript execution. The consensus code does not care about this
distinction, and thus SigVersion does not have a field for P2SH. As the IsMine
code will care, it uses a separate enum with more fields.
Only IsMine's internal code needs this, as part of a recursion into P2SH and P2WSH
scripts. The exposed functions always operate on actual scriptPubKeys and not on
redeemScripts or witness scripts.
Zcash: Rewrote this commit so that it instead adds an internal
SigVersion argument (which we didn't have because it was added to
support SegWit logic).
Co-authored-by: Jack Grigg <jack@z.cash>