UpdateTip() was checking block versions against one of two
possible AuxPoW versions. Added consts for version checks and
IsAuxPowVersion(int nVersion) for use with UpdateTip()'s
block version check.
Values for triggering safe mode are time sensitive, and have not been
modified to take into account the differing block times between Bitcoin and
Dogecoin. This patch changes the interval across which a fork must exist to
override any other fork to 6 hours, and increases the number of blocks an
invalid fork must have before it trips safe mode.
This should help mitigate disruption in the 1.7/1.8 hard fork, but miners will
still need to run with -disablesafemode for the preceeding and following 2-3
days to be sure.
PR #589 caused a condition for testnet difficulty to not match at
a couple of cases pre block 145k leading to issues with -reindex.
This makes the testnet fork hard at block 157500, while retaining
every case before that block.
Previous commit 9e9babb was based on a wrong assumption, actual
CBlockHeader->nVersion for auxpow blocks is
CBlockHeader::CURRENT_VERSION | (AUXPOW_CHAIN_ID
* BLOCK_VERSION_CHAIN_START)
and not BLOCK_VERSION_AUXPOW
Testnet resets difficulty if after 2 minutes no block has been
found. However, this feature was implemented with the condition
to only trigger on blocks where no retargeting is done. Since
the introduction of DigiShield, we retarget at every block,
making this condition never to be matched. This commit removes
that condition.
WARNING: THIS COMMIT HARDFORKS THE DOGECOIN TESTNET!
The main network is not affected by this change.
- remove unused int64_t retargetSpacing
- modulate timespan in an isolated int64_t nModulatedTimespan
- keep nActualTimespan intact, to retain the original value
- compress debug.log output from 5 into 3 lines while retaining
all information.
Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs.
Previously with the 500 byte scriptSig limit there were odd restrictions
where even a 1-of-12 P2SH could be spent in a standard transaction(1),
yet multisig scriptPubKey's requiring more signatures quickly ran out of
scriptSig space.
From a "stuff-data-in-the-blockchain" point of view not much has changed
as with the prior commit now only allowing the dummy value to be null
the newly allowed scriptSig space can only be used for signatures. In
any case, just using more outputs is trivial and doesn't cost much.
1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73
Mined by BTC Guild.
Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.
In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.
From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
All functions that use ChainActive but do not aquire the cs_main
lock themselves, need to be called with the cs_main lock held.
This commit adds assertions to all externally callable functions
that use chainActive or chainMostWork.
This will flag usages when built with -DDEBUG_LOCKORDER.
Keep track of which block is being requested (and to be requested) from
each peer, and limit the number of blocks in-flight per peer. In addition,
detect stalled downloads, and disconnect if they persist for too long.
This means blocks are never requested twice, and should eliminate duplicate
downloads during synchronization.
Having this defined in multiple places is suboptimal and may lead
to porting issues, so I extracted it into it's own function and
let both implementations call that instead.