aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.cpp
AgeCommit message (Collapse)Author
2020-10-01signet: do not log signet startup messages for other chainsJon Atack
and move signet network magic logging from chainparams.cpp to init.cpp
2020-09-30Merge #20004: test: Add signet witness commitment section parse testsWladimir J. van der Laan
fa29b5ae666bbb4c19188f0dcf8a1ba738aac624 test: Add signet witness commitment section parse tests (MarcoFalke) fa23308e9aad70c99a31f91d8556f1876ea02c04 Remove gArgs global from CreateChainParams to aid testing (MarcoFalke) Pull request description: ACKs for top commit: laanwj: ACK fa29b5ae666bbb4c19188f0dcf8a1ba738aac624 Tree-SHA512: f956407d690decbfb8178bcb8f101d107389fecc3aa7be515f7b0f5ceac26d798c165100f7ddf08cec569beabcc6514862dda23b667cc4fd0a784316784735c2
2020-09-29signet: Add assumed values for default signetMarcoFalke
2020-09-29Remove gArgs global from CreateChainParams to aid testingMarcoFalke
2020-09-18signet: hard-coded parameters for Signet Global Network VI (2020-09-07)Karl-Johan Alm
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2020-09-18add signet chain and accompanying parametersKarl-Johan Alm
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2020-08-12Merge #19316: [net] Cleanup logic around connection typesfanquake
01e283068b9e6214f2d77a2f772a4244ebfe2274 [net] Remove unnecessary default args on CNode constructor (Amiti Uttarwar) bc5d65b3ca41eebb1738fdda4451d1466e77772e [refactor] Remove IsOutboundDisconnectionCandidate (Amiti Uttarwar) 2f2e13b6c2c8741ca9d825eaaef736ede484bc85 [net/refactor] Simplify multiple-connection checks (Amiti Uttarwar) 7f7b83deb2427599c129f4ff581d4d045461e459 [net/refactor] Rework ThreadOpenConnections logic (Amiti Uttarwar) 35839e963bf61d2da0d12f5b8cea74ac0e0fbd7b [net] Fix bug where AddrFetch connections would be counted as outbound full relay (Amiti Uttarwar) 4972c21b671ff73f13a1b5053338b6abbdb471b5 [net/refactor] Clarify logic for selecting connections in ThreadOpenConnections (Amiti Uttarwar) 60156f5fc40d56bb532278f16ce632c5a8b8035e [net/refactor] Remove fInbound flag from CNode (Amiti Uttarwar) 7b322df6296609570e368e5f326979279041c11f [net/refactor] Remove m_addr_fetch member var from CNode (Amiti Uttarwar) 14923422b08ac4b21b35c426bf0e1b9e7c97983b [net/refactor] Remove fFeeler flag from CNode (Amiti Uttarwar) 49efac5cae7333c6700d9b737d09fae0f3f4d7fa [net/refactor] Remove m_manual_connection flag from CNode (Amiti Uttarwar) d3698b5ee309cf0f0cdfb286d6b30a256d7deae5 [net/refactor] Add connection type as a member var to CNode (Amiti Uttarwar) 46578c03e92a55925308363ccdad04dcfc820d96 [doc] Describe different connection types (Amiti Uttarwar) 442abae2bac7bff85886143df01e14215532b974 [net/refactor] Add AddrFetch connections to ConnectionType enum (Amiti Uttarwar) af59feb05235ecb85ec9d75b09c66e71268c9889 [net/refactor] Extract m_addr_known logic from initializer list (Amiti Uttarwar) e1bc29812ddf1d946bc5acca406a7ed2dca064a6 [net/refactor] Add block relay only connections to ConnectionType enum (Amiti Uttarwar) 0e52a659a2de915fc3dce37fc8fac39be1c8b6fa [net/refactor] Add feeler connections to ConnectionType enum (Amiti Uttarwar) 1521c47438537e192230486dffcec0228a53878d [net/refactor] Add manual connections to ConnectionType enum (Amiti Uttarwar) 26304b4100201754fb32440bec3e3b78cd3f0e6d [net/refactor] Introduce an enum to distinguish type of connection (Amiti Uttarwar) 3f1b7140e95d0f8f958cb35f31c3d964c57e484d scripted-diff: Rename OneShot to AddrFetch (Amiti Uttarwar) Pull request description: **This is part 1 of #19315, which enables the ability to test `outbound` and `block-relay-only` connections from the functional tests.** Please see that PR for more information of overall functionality. **This PR simplifies how we manage different connection types.** It introduces an enum with the various types of connections so we can explicitly define the connection type. The existing system relies on a series of independent flags, then has asserts scattered around to ensure that conflicting flags are not enabled at the same time. I find this approach to be both brittle and confusing. While making these changes, I found a small bug due to the silent assumptions. This PR also proposes a rename from `OneShot` to `AddrFetch`. I find the name `OneShot` to be very confusing, especially when we also have `onetry` manual connections. Everyone I've talked to offline has agreed that the name is confusing, so I propose a potential alternative. I think this is a good opportunity for a rename since I'm creating an enum to explicitly define the connection types. (some context for the unfamiliar: `oneshot` or `addrfetch` connections are short-lived connections created on startup. They connect to the seed peers, send a `getaddr` to solicit addresses, then close the connection.) Overview of this PR: * rename `oneshot` to `addrfetch` * introduce `ConnectionType` enum * one by one, add different connection types to the enum * expose the `conn_type` on CNode, and use this to reduce reliance on flags (& asserts) * fix the bug in counting different type of connections * some additional cleanup to simplify logic and make expectations explicit/inclusive rather than implicit/exclusive. ACKs for top commit: jnewbery: utACK 01e283068b9e6214f2d77a2f772a4244ebfe2274 laanwj: Code review ACK 01e283068b9e6214f2d77a2f772a4244ebfe2274, the commits are pretty straightforward to follow, and I think this is a move in the right direction overall vasild: ACK 01e283068 sdaftuar: ACK 01e283068b9e6214f2d77a2f772a4244ebfe2274. fanquake: ACK 01e283068b9e6214f2d77a2f772a4244ebfe2274 - I don't have as much experience with the networking code but these changes look fairly straight forward, the new code seems more robust/understandable and the additional documentation is great. I'm glad that a followup branch is already underway. There might be some more review comments here later today, so keep an eye on the discussion, however I'm going to merge this now. jb55: wow this code was messy before... ACK 01e283068b9e6214f2d77a2f772a4244ebfe2274 Tree-SHA512: 7bb644a6ed5849913d777ebc2ff89133ca0fbef680355a9a344e07496a979e6f9ff21a958e8eea93dcd7d5c343682b0c7174b1a3de380a4247eaae73da436e15
2020-08-07scripted-diff: Rename OneShot to AddrFetchAmiti Uttarwar
-BEGIN VERIFY SCRIPT- sed -i 's/a oneshot/an addrfetch/g' src/chainparams.cpp #comment sed -i 's/oneshot/addrfetch/g' src/net.cpp #comment sed -i 's/AddOneShot/AddAddrFetch/g' src/net.h src/net.cpp sed -i 's/cs_vOneShots/m_addr_fetches_mutex/g' src/net.h src/net.cpp sed -i 's/vOneShots/m_addr_fetches/g' src/net.h src/net.cpp sed -i 's/fOneShot/m_addr_fetch/g' src/net.h src/net.cpp src/net_processing.cpp sed -i 's/ProcessOneShot/ProcessAddrFetch/g' src/net.h src/net.cpp -END VERIFY SCRIPT-
2020-07-29refactor: use local argsmanager in CRegTestParamsIvan Metlushko
2020-06-15[net] Add seed.bitcoin.wiz.biz to DNS seedswiz
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-02chainparams: Bump assumed valid hashMarcoFalke
2020-02-13[test] add chainparams property to indicate chain allows time mockingAmiti Uttarwar
2019-12-30scripted-diff: Bump copyright of files changed in 2019MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2019-11-12fix uninitialized variable nMinerConfirmationWindowNullFunctor
fix uninitialized variable hard code the MinBIP9WarningHeight fix uninitialized var hard code the MinBIP9WarningHeight instead
2019-10-29Chainparams: Use name constants in chainparams initializationJorge Timón
2019-10-01chainparams: Bump assumed chain paramsMarcoFalke
2019-09-05Ignore old versionbit activationsAnthony Towns
Adds a hardcoded height to the consensus chain parameters for ignoring versionbit activations prior to a fixed height.
2019-08-14[Consensus] Bury segwit deploymentJohn Newbery
Hardcode segwit deployment height to 481824 for mainnet.
2019-08-14[Consensus] Bury CSV deployment heightJohn Newbery
Hard code CSV deployment height to 419328 for mainnet.
2019-07-16Remove wallet settings from chainparamsMarcoFalke
2019-06-21test: Require standard txs in regtestMarcoFalke
2019-06-18chainparams: Remove unused fMineBlocksOnDemandMarcoFalke
It is equal to consensus.fPowNoRetargeting
2019-02-17Update assumevalid, minimumchainwork, and getchaintxstats to height 563378.Gregory Maxwell
m_assumed_blockchain_size/m_assumed_chain_state_size were still accurate.
2019-02-14fixes m_assumed_blockchain_size variables values:marcoagner
This commit was a fix to `m_assumed_blockchain_size` reverted from 3fc2063's 220 to 9d0e528's 200 since work on 9d0e528 was being done in parallel and ended up reverting `m_assumed_blockchain_size`. This commits is now a intended to be a bump of `m_assumed_blockchain_size` for both mainnet and testnet for new reasonable values.
2019-01-21Merge #14970: [net] add dnsseed.emzy.de to DNS seedsWladimir J. van der Laan
de7266fc3c9962cc3571c6ff72d616d2e8327fbb [net] add dnsseed.emzy.de to DNS seeds (Stephan Oeste) Pull request description: ACK https://github.com/bitcoin/bitcoin/blob/master/doc/dnsseed-policy.md I'm willing to keep it up and running, unless something bad happens. I have 15+ years experience running dns servers. About my setup: - the server may change over time, but the service will be up all the time - running [sipa/bitcoin-seeder](https://github.com/sipa/bitcoin-seeder) with default settings (and the non-root port redirect) Tree-SHA512: 7abc975c148cc738d045c79d5bdb8d9926da41bb8dde66c21e954652b3c72a7aa2526af0c3c4fb8c234d3deaed5563542defe8a5137188d65ad7201b6b1d80eb
2019-01-11Merge #13216: [Qt] implements concept for different disk sizes on introJonas Schnelli
9d0e52834 implements different disk sizes for different networks on intro (marcoagner) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/13213. Mostly, I layed out the concept to open the PR for refinement and getting feedback if the approach is okay. Changes are expected. Two points: - The values for both new consts `TESTNET_BLOCK_CHAIN_SIZE` and `TESTNET_CHAIN_STATE_SIZE` is certainly not optimal; I just checked the size of my testnet3 related dirs and set them to little bit higher values. Which values should be used? - Should we do something like this to regtest? Or these "niceties" do not matter when on regtest? Thanks! Tree-SHA512: 8ae87a29fa8356b899e7a823c76cde793d9126b4ee59554d7a2a8edb088fe42a19976b34c06c2fd4a98a727e1e4971dd983f42b6093ea6caa255b45004e22bb4
2018-12-29test: Add basic test for BIP34MarcoFalke
2018-12-15[net] add dnsseed.emzy.de to DNS seedsStephan Oeste
2018-11-04scripted-diff: Move util files to separate directory.Jim Posen
-BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
2018-10-07implements different disk sizes for different networks on intromarcoagner
- Creates m_assumed_blockchain_size and m_assumed_chain_state_size on CChainParams. - Implements access to CChainParams' m_assumed_blockchain_size and m_assumed_chain_state_size on node interface. - Implements m_assumed_blockchain_size and m_assumed_chain_state_size on qt/intro via node interface. - Updates release process document with the new CChainParam's values.
2018-09-23Don't edit Chainparams after initializationJorge Timón
2018-09-04doxygen: Remove misleading checkpoints comment in CMainParamsMarcoFalke
2018-08-08Merge #13780: 0.17: Pre-branch maintenanceWladimir J. van der Laan
3fc20632a3ad30809356a58d2cf0ea4a4ad4cec3 qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot) 2b6a2f4a28792f2fe9dc1be843b1ff1ecae35e8a Regenerate manpages (DrahtBot) eb7daf4d600eeb631427c018a984a77a34aca66e Update copyright headers to 2018 (DrahtBot) Pull request description: Some trivial maintenance to avoid having to do it again after the 0.17 branch off. (The scripts to do this are in `./contrib/`) Tree-SHA512: 16b2af45e0351b1c691c5311d48025dc6828079e98c2aa2e600dc5910ee8aa01858ca6c356538150dc46fe14c8819ed8ec8e4ec9a0f682b9950dd41bc50518fa
2018-07-30doc: Fix chainTxData commentMarcoFalke
2018-07-29chainparams: Update with data from assumed valid chainMarcoFalke
2018-07-27Update copyright headers to 2018DrahtBot
2018-05-02Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106Russell Yanofsky
2018-04-13Use P2SH consensus rules for all blocksSuhas Daftuar
This commit moves P2SH activation back to the genesis block, with a hardcoded exception for the one historical block in the chain that violated this rule.
2018-04-09Remove duplicate includespracticalswift
2018-04-05Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan
a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr) Pull request description: Not sure why all these includes were missing, but it's breaking builds for some users: https://bugs.gentoo.org/show_bug.cgi?id=652142 (Added to all files with a reference to `std::unique_ptr`) Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
2018-04-02Bugfix: Include <memory> for std::unique_ptrLuke Dashjr
2018-03-26Merge #11962: [net] add seed.bitcoin.sprovoost.nl to DNS seedsWladimir J. van der Laan
ffcc687 [net] add seed.bitcoin.sprovoost.nl to DNS seeds (Sjors Provoost) Pull request description: ACK https://github.com/bitcoin/bitcoin/blob/master/doc/dnsseed-policy.md I'm willing to keep it up and running at least throughout 2018, unless something bad happens. Same setup as #11917, but with a dedicated instance. Tree-SHA512: df0c8ab705628b8da4d0a0cb753759a699a6a91907a76e13c08cbdbeae81131af0f6040183dab7f00851e0c57dcd91f5cd5ce43482d1f13432a58c8943692e90
2018-02-25Disable wallet fallbackfee by default on mainnetJonas Schnelli
2018-01-29[net] add seed.bitcoin.sprovoost.nl to DNS seedsSjors Provoost
2018-01-28Fix typospracticalswift
2018-01-25Update chainTxData for 0.16Wladimir J. van der Laan
Another part of the release process.
2018-01-25Update defaultAssumeValid according to release-process.md.Gregory Maxwell
Updated for block 506067 (0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0).
2018-01-24Merge #11512: Use GetDesireableServiceFlags in seeds, dnsseeds, fixing ↵Wladimir J. van der Laan
static seed adding 2b839ab Update chainparams comment for more info on service bits per dnsseed (Matt Corallo) 62e7642 Fall back to oneshot for DNS Seeds which don't support filtering. (Matt Corallo) 51ae766 Use GetDesireableServiceFlags in static seeds, document this. (Matt Corallo) fb6f6b1 bluematt's testnet-seed now supports x9 (and is just a static list) (Matt Corallo) Pull request description: 4440710 broke inserting entries into addrman from dnsseeds which did not support service bits, as well as static seeds. Static seeds were already being filtered by UA for 0.13.1+ (ie NODE_WITNESS), so simply changing the default service bits to include NODE_WITNESS (and updating docs appropriately) is sufficient. For DNS Seeds, not supporting NODE_WITNESS is no longer useful, so instead use non-filtering seeds as oneshot hosts irrespective of named proxy. I've set my testnet-seed to also support x9, though because it is simply a static host, it may be useful to leave the support off so that it is used as a oneshot to get addresses from a live node instead. I'm fine with either. Tree-SHA512: 3f17d4d2b0b84d876981c962d2b44cb0c8f95f52c56a48c6b35fd882f6d7a40805f320ec452985a1c0b34aebddb1922709156c3ceccd1b9f8363fd7cb537d21d
2018-01-19Update chainparams comment for more info on service bits per dnsseedMatt Corallo