| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Since v2 and v1 blocks will be rejected at exactly the same time,
only check for supermajority once to save 2000 iterations over
blockheaders per block.
Also moves the version check to AcceptBlockHeader() rather than
AcceptBlock() to be able to reject early on.
|
| |
|
|
|
|
|
| |
Backport of #1225 to 1.8.x, sets:
- majority window to 2000 blocks on mainnet, 1000 on testnet
- enforcement triggers to 1500 on mainnet, 501 on testnet
- reject triggers to 1900 on mainnet, 750 on testnet
|
| |
|
|
|
|
|
| |
Because CBlockIndex::IsSuperMajority was disabled since 1.5, we cannot
enforce version 1 block rejection on the live chains with a v2 supermajority.
Instead, we piggyback the version 3 supermajority switch to also enforce the
version 2 softfork and all is good.
|
| |
|
|
|
|
| |
This has been disabled since 1.5 for unclear reasons, but we need it
for the bip66 softfork in 1.10 that is backported here. This commit
re-enables the logic.
|
| |
|
|
|
| |
- nVersion & 0xff to easily compare versions without aux data
- change implementations checking nVersion throughout main.ccp
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Suggested by Jonas Nick.
Rebased-From: 9c2737901b5203f267d21d728019d64b46f1d9f3
Github-Pull: #5860
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a -whitelist option to specify subnet ranges from which peers
that connect are whitelisted. In addition, there is a -whitebind option
which works like -bind, except peers connecting to it are also
whitelisted (allowing a separate listen port for trusted connections).
Being whitelisted has two effects (for now):
* They are immune to DoS disconnection/banning.
* Transactions they broadcast (which are valid) are always relayed,
even if they were already in the mempool. This means that a node
can function as a gateway for a local network, and that rebroadcasts
from the local network will work as expected.
Whitelisting replaces the magic exemption localhost had for DoS
disconnection (local addresses are still never banned, though), which
implied hidden service connects (from a localhost Tor node) were
incorrectly immune to DoS disconnection as well. This old
behaviour is removed for that reason, but can be restored using
-whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind
is safer to use in case non-trusted localhost connections are expected
(like hidden services).
|
| | |
|
| |
|
|
|
|
| |
... instead of after 30 minutes of no sending, for latency measurement
and keep-alive. Also, disconnect if no reply arrives within 20 minutes,
instead of 90 of inactivity (for peers supporting the 'pong' message).
|
| |
|
|
|
| |
- better code readability and it belongs to net
- this is a prerequisite for a pull to add -listen to the GUI
|
| |
|
|
| |
notification is about
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Prevent denial-of-service attacks by banning
peers that send us invalid orphan transactions
and only storing orphan transactions given to
us by a peer while the peer is connected.
Rebased-From: c74332c67806ed92e6e18de174671a7c30608780
Conflicts:
src/main.cpp
|
| |\
| |
| | |
1.8.1 dev limit orphan tx
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
#4253)
Rebased-From: 7b45d943b29a443f1ac808c9ee4eeed6df0db9cc
Conflicts:
src/init.cpp
src/main.h
|
| | | |
|
| | |
| |
| |
| |
| | |
Rebased-From: def2fdb
Rebased-By: Wladimir J. van der Laan
|
| | |
| |
| |
| |
| | |
Rebased-From: 89d91f6
Rebased-By: Wladimir J. van der Laan <[email protected]>
|
| |/
|
|
|
|
| |
and use it for most strings being serialized.
Rebased-From: 216e9a4
|
| |\
| |
| | |
Disable safe mode around AuxPoW switchover
|
| | | |
|
| | | |
|
| |\ \
| | |
| | | |
check block version for aux blocks properly for version warning
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |\ \ \
| |_|/
|/| | |
Correct format of AuxPoW coinbase script
|
| | |/ |
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\
| |
| | |
Check against the right aux block version number
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \
| | |
| | | |
Break testnet difficulty reset out of never matching condition.
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
|
|
| |
set testnet start of auxpow to block 158100
|
| |
|
|
|
| |
Rebased from 1.7.1 into 1.7.2, moved AuxPoW checks from AcceptBlock()
into AcceptBlockHeader()
|
| |
|
|
|
| |
Rebased-By: Wladimir J. van der Laan <[email protected]>
Rebased-From: 305ccaa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Fixes issue #4139.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
(cherry picked from commit 9a2f7a86fca6e243db7745cb1b15b35ce1b97b2e)
|
| |\
| |
| | |
Fix bash-based rpc tests
|
| | |
| |
| |
| |
| | |
This allows sane testing. Regtest mode is primarily intended for automated
testing, so this simplification makes sense
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Also modify some connection logic to deal with non-full blocks in the index.
|
| | | |
|