Commit Graph

27573 Commits

Author SHA1 Message Date
Jon Atack
79a2576af1
doc: update ConnectionType Doxygen documentation 2021-01-10 21:34:17 +01:00
Jon Atack
f3153dc08f
gui: improve markup handling of connection type tooltip
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2021-01-10 21:34:15 +01:00
Jon Atack
4f09615733
gui: return inbound {full, block} relay type in peer details 2021-01-10 21:33:10 +01:00
Vasil Dimov
39b43298d9
test: add test for banning of non-IP addresses
Co-authored-by: Jon Atack <jon@atack.com>
2021-01-10 15:51:25 +01:00
Vasil Dimov
94d335da7f
net: allow CSubNet of non-IP networks
Allow creation of valid `CSubNet` objects of non-IP networks and only
match the single address they were created from (like /32 for IPv4 or
/128 for IPv6).

This fixes a deficiency in `CConnman::DisconnectNode(const CNetAddr& addr)`
and in `BanMan` which assume that creating a subnet from any address
using the `CSubNet(CNetAddr)` constructor would later match that address
only. Before this change a non-IP subnet would be invalid and would not
match any address.
2021-01-10 15:51:15 +01:00
Hennadii Stepanov
3642b2ed34
refactor, net: Increase CNode data member encapsulation
All protected CNode data members could be private.
2021-01-10 12:00:46 +02:00
Hennadii Stepanov
acebb79d3f
refactor, move-only: Relocate CNode private members 2021-01-10 12:00:44 +02:00
MarcoFalke
0944024309
Merge bitcoin-core/gui#163: Peer details: replace Direction with Connection Type
06ba9b3008 rpc: move getpeerinfo connection_type help to correct place (Jon Atack)
c95fe6e38f gui: improve connection type tooltip (Hennadii Stepanov)
2c19ba2e1d gui: replace Direction with Connection Type in peer details (Jon Atack)
7e2beab2d2 gui: create GUIUtil::ConnectionTypeToQString utility function (Jon Atack)

Pull request description:

  ![Screenshot from 2021-01-09 11-23-17](https://user-images.githubusercontent.com/2415484/104089297-c5e18d80-5265-11eb-9251-49afcfdb562b.png)

  Closes #159.

ACKs for top commit:
  hebasto:
    re-ACK 06ba9b3008, the tooltip content is organized as unordered list.
  jarolrod:
    re-ACK 06ba9b3008

Tree-SHA512: 24f46494ceb42ed308e4a4f2a543dbc4f4e6409a6f738c145a9f16e175bf69d411cbc944a4fd969f1829d57644dfbc194182fa8d4e9e6bce82acbeca8c673748
2021-01-10 10:42:50 +01:00
MarcoFalke
555fc0789d
Merge #20881: fuzz: net permission flags in net processing
fad327ca65 fuzz: net permission flags in net processing (MarcoFalke)

Pull request description:

  to increase coverage

ACKs for top commit:
  Crypt-iQ:
    cr ACK fad327c
  practicalswift:
    ACK fad327ca65

Tree-SHA512: f8643d1774ff13524ab97ab228ad070489e080435e5742af26e6e325fd002e4c1fd78b9887e11622e79d6fe0c4daaddce5e033e6cd4b32e50fd68b434aab7333
2021-01-10 10:33:57 +01:00
fanquake
708ef4424a
Merge #20890: doc: Add explicit macdeployqtplus dependencies install step
3e61b8c800 doc: Add explicit macdeployqtplus dependencies install step (Hennadii Stepanov)

Pull request description:

  This PR adds to macOS docs an explicit step to install `macdeployqtplus` script dependencies that are not part of the [Python Standard Library](https://docs.python.org/3/library/index.html):
  - https://pypi.org/project/ds-store/
  - https://pypi.org/project/mac-alias/

  This change is required on macOS 11 Big Sur:

  -  #20371
  - #20878

  Close #20878.

ACKs for top commit:
  fanquake:
    ACK 3e61b8c800

Tree-SHA512: d177139ee142d47cb27ad878d721cafcd03403ef861965ff532d712da461416380ec5878f70accf223a552a1f1e65eedb1e0ad72cb7a96791f8a55536ce28645
2021-01-10 15:03:05 +08:00
Anthony Towns
c97f70c861 net_processing: move Peer definition to .cpp 2021-01-09 23:27:45 +10:00
Anthony Towns
e0f2e6d2df net_processing: move PeerManagerImpl into cpp file 2021-01-09 23:27:45 +10:00
Anthony Towns
a568b82feb net_processing: split PeerManager into interface and implementation classes 2021-01-09 23:27:45 +10:00
Anthony Towns
0df3d3fd6b net_processing: make more of PeerManager private 2021-01-09 23:27:45 +10:00
Anthony Towns
0d246a59b6 net, net_processing: move NetEventsInterface method docs to net.h 2021-01-09 23:27:45 +10:00
Jon Atack
06ba9b3008
rpc: move getpeerinfo connection_type help to correct place
per review feedback
2021-01-09 13:50:00 +01:00
Hennadii Stepanov
c95fe6e38f
gui: improve connection type tooltip
- remove RPC and option names from the translatable string
- use non-breaking hyphens
2021-01-09 13:49:51 +01:00
Jon Atack
2c19ba2e1d
gui: replace Direction with Connection Type in peer details 2021-01-09 13:49:20 +01:00
Wladimir J. van der Laan
5574e48963
Merge #20741: doc: Update 'Secure string handling'
7117d7503f Update 'Secure string handling' (Prayank)

Pull request description:

  - Add information about possible path traversal attack
  - [wallet_name](https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/createwallet/) (string): _The name for the new wallet. If this is a 'path', the wallet will be created at the 'path' location._

  Fixes https://github.com/bitcoin/bitcoin/issues/20128 (Not really fixing it but workaround)

  This PR is an alternative to https://github.com/bitcoin/bitcoin/pull/20393

ACKs for top commit:
  michaelfolkson:
    ACK 7117d7503f
  RiccardoMasutti:
    ACK 7117d7503f
  benthecarman:
    ACK 7117d7503f

Tree-SHA512: 0d6c4f8db5feba848bbb583e87a99e6c4b655deaa2b566164e2632acc1aabf470d4626d2dc4b82c4997effc30d9b474d860d0e0d3e896648c5cc9bfdb623da6d
2021-01-09 09:00:23 +01:00
Hennadii Stepanov
3e61b8c800
doc: Add explicit macdeployqtplus dependencies install step
This change is required on macOS 11 Big Sur.
2021-01-09 09:37:12 +02:00
Andrew Chow
ea0a7ec949 Remove deprecated bumpfee behavior 2021-01-08 18:58:58 -05:00
Carl Dong
570e43fe72 guix: Print build params inside/outside of container 2021-01-08 11:40:02 -05:00
Carl Dong
2f9d1fdde6 guix: Move DISTSRC determination to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
0b7cd07bb5 guix: Move OUTDIR determination+creation to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
d27ff8b86a guix: Add more sanity checks to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
57f9533146 guix: Add section headings to guix-build.sh 2021-01-08 11:40:01 -05:00
Carl Dong
38b7b2ed72 genbuild: Specify rev-parse length 2021-01-08 11:40:01 -05:00
Carl Dong
036dc740da docs: Point to contrib/guix/README.md in doc/guix.md 2021-01-08 11:40:01 -05:00
Carl Dong
34f0fda2d3 guix: Small updates to README wording 2021-01-08 11:40:01 -05:00
Carl Dong
402e3a5b1e guix: Update HOSTS README entry for new architectures 2021-01-08 11:40:01 -05:00
Carl Dong
cfa7ceb21b guix: Remove README development environment section 2021-01-08 11:40:01 -05:00
Carl Dong
93b6a8544a guix: Add ADDITIONAL_GUIX_{COMMON,TIMEMACHINE}_FLAGS options 2021-01-08 11:40:01 -05:00
Carl Dong
0f31e24703 guix: Add SUBSTITUTE_URLS option 2021-01-08 11:40:01 -05:00
Carl Dong
444fcfca90 guix: Make guix honor MAX_JOBS setting 2021-01-08 11:40:01 -05:00
Hennadii Stepanov
9d02654677
doc: Fix systemd spelling and link to doc/init.md
See https://www.freedesktop.org/wiki/Software/systemd/
2021-01-08 17:55:34 +02:00
Hennadii Stepanov
601778c310
script: Add Documentation key to bitcoind.service 2021-01-08 17:55:34 +02:00
Hennadii Stepanov
d9392b724c
script: Improve robustness of bitcoind.service on startup 2021-01-08 17:34:48 +02:00
Hennadii Stepanov
af58f5b12c
qt: Stop the effect of hidden widgets on the size of QStackedWidget
Layouts of the hidden widgets, those are children of QStackedWidget,
could prevent to adjust the size of the parent widget in the
WalletFrame widget.
2021-01-08 16:53:20 +02:00
Jon Atack
7e2beab2d2
gui: create GUIUtil::ConnectionTypeToQString utility function 2021-01-08 15:24:31 +01:00
Hennadii Stepanov
4e1154dfd1
qt: Use "fusion" style on macOS Big Sur with old Qt
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8.
2021-01-08 16:20:49 +02:00
MarcoFalke
9158d6f341
Merge #20786: net: [refactor] Prefer integral types in CNodeStats
faecb74562 Expose integral m_conn_type in CNodeStats, remove m_conn_type_string (Jon Atack)

Pull request description:

  Currently, strings are stored for what are actually integral (strong) enum types. This is fine, because the strings are only used as-is for the debug log and RPC. However, it complicates using them in the GUI. User facing strings in the GUI should be translated and only string literals can be picked up for translation, not runtime `std::string`s.

  Fix that by removing the `std::string` members and replace them by strong enum integral types.

ACKs for top commit:
  jonatack:
    Code review ACK faecb74562
  theStack:
    Code review ACK faecb74562 🌲

Tree-SHA512: 24df2bd0645432060e393eb44b8abaf20fe296457d07a867b0e735c3e2e75af7b03fc6bfeca734ec33ab816a7c8e1f8591a5ec342f3afe3098a4e41f5c2cfebb
2021-01-08 15:14:53 +01:00
MarcoFalke
1e078f17b5
Merge #20882: fuzz: Add missing muhash registration
fa44417fcb fuzz: Add missing muhash registration (MarcoFalke)

Pull request description:

  otherwise it is not possible to run the target

ACKs for top commit:
  laanwj:
    Code review ACK fa44417fcb

Tree-SHA512: b6495b84890a778d3569deddfc5703d1bed95d7d5c1eb0766fd5bd9afe86a3a0ccf4726aa16cba4a5fd182d23bfb7e815f3af4eb635915397c90805585b5699e
2021-01-08 14:00:17 +01:00
MarcoFalke
fa44417fcb
fuzz: Add missing muhash registration 2021-01-08 09:40:50 +01:00
MarcoFalke
faabc26a61
test: Replace getmempoolentry with testmempoolaccept in MiniWallet 2021-01-08 09:07:33 +01:00
MarcoFalke
5082324225
Merge #20688: test: run mempool_compatibility.py even with wallet disabled
a7599c80eb test: run mempool_compatibility.py even with wallet disabled (Michael Dietz)

Pull request description:

  Another functional test rewritten as proposed in https://github.com/bitcoin/bitcoin/issues/20078

ACKs for top commit:
  MarcoFalke:
    review ACK a7599c80eb didn't test

Tree-SHA512: cc7a617e5489ed27bbdbdee85a82fa08525375061f7f4524577a6b8ecb340396adac88419b51f513be22ca53edd0a3bd5d572d9f43ffc2c18550b0ef9069d238
2021-01-08 08:35:01 +01:00
Wladimir J. van der Laan
76b45d5fd7
Merge #19683: depends: Pin clang search paths for darwin host
196b727649 depends: Add comment about cache invalidation (Carl Dong)
949c480e52 depends: Fully determine path for darwin cctools (Carl Dong)
880660acfa depends: Fully determine path for darwin_{CC,CXX} (Carl Dong)
8033110741 depends: Quote to prevent word splitting in config.site (Carl Dong)
77b1ef89a0 depends: Remove -fuse-ld line (Carl Dong)
3007339218 depends: Pin clang search paths for darwin host (Carl Dong)
107f33d434 depends: Delay expansion of per-package vars (Carl Dong)

Pull request description:

  > Hello clang/lib/frontend,
  > I search your headers once again.
  > Because it's time for some housekeeping,
  > Within the code I was tweaking,
  > And the targets I was making with my build,
  > Are unfulfilled,
  > It's just language compliance.
  >
  > In reference works I scroll alone
  > Pages cribbed from holy tomes
  > In the details of a template
  > My code's behaviour has now found its fate
  > When my hopes were dashed as a note left it as described:
  > As undefined
  > It's not in compliance
  >
  > And from the standard text I saw
  > Ten thousand errors, maybe more
  > Threading used without locking
  > Pointers referenced after freeing
  > Linters writing warnings that coders will never fix
  > But still they tick
  > The box that claims compliance
  >
  > "Fools," said I, "you do not know"
  > Errors, like a cancer, grow
  > Hear my words that I might reach you
  > Use -Wall and it might teach you
  > But my words and compiler errors fade.
  > Schedules forbade compliance.
  >
  > And the people bowed and prayed
  > With static checking torn and frayed
  > The markets flashed out their warning
  > In the words that they were forming
  > As recruiters said "The search for more profits leads to writing stuff in CSS,
  > And node.js.
  > Without a need for compliance"

  Many thanks to ajtowns for the above contribution!

  -----

  This PR is ready for review!

  When cross-compiling for macOS, the SDK gives us the entire context/sysroot on which we should base the build. This means that we can be extremely specific w/re our search path ordering in order to avoid build problems that arise out of a user's specific environment/system setup and improve the robustness of our macOS toolchain. This PR does 2 things to this end:

  1. Unset environment variables which are known to alter search paths.
  1. Makes us (in the case of macOS builds) explicitly specify the list of system include search paths and its ordering, rather than rely on `clang`'s unreliable autodetection routine. Here is the [rabbit-hole gist](https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9).

      See the added comments in `depends/hosts/darwin.mk` for more details:

      8b8296dc70/depends/hosts/darwin.mk (L37-L60)

  We can be this specific _only_ because macOS builds are neatly contained in an SDK, **and** we are cross-compiling. Native toolchains should rely on the environment/distro/user to know how best to build for the running system.

  Note: Although the `-u` flag of `env` is not a POSIX standard flag, it seems like it is useful enough to be implemented in [coreutils](https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html), [busybox](https://busybox.net/downloads/BusyBox.html#env), [FreeBSD](https://www.freebsd.org/cgi/man.cgi?env).

ACKs for top commit:
  laanwj:
    code review ACK 196b727649

Tree-SHA512: 406442df16d9aa0aef62f9fa94f72d7e48374301f3d826bf32f183e1610942aa44a4adfac7bead1f14aded0044fac400e1328fcd933b2337e55a024f034b5013
2021-01-08 06:10:24 +01:00
Wladimir J. van der Laan
86a8b35f32
Merge #14501: Fix possible data race when committing block files
ef712298c3 util: Check for file being NULL in DirectoryCommit (Luke Dashjr)
4574904038 Fix possible data race when committing block files (Evan Klitzke)
220bb16cbe util: Introduce DirectoryCommit commit function to sync a directory (Evan Klitzke)
ce5cbaea63 util.h: Document FileCommit function (Evan Klitzke)
844d650eea util: Prefer Mac-specific F_FULLSYNC over fdatasync in FileCommit (Evan Klitzke)
f6cec0bcaf util: Refactor FileCommit from an #if sequence nested in #else, to a sequence of #elif (Evan Klitzke)

Pull request description:

  Reviving #12696

ACKs for top commit:
  laanwj:
    Code review ACK ef712298c3

Tree-SHA512: 07d650990ef4c18d645dee3f9a199a940683ad17557d79d93979a76c4e710d8d70e6eae01d1a5991494a24a7654eb7db868be0c34a31e70b2509945d95bc9cce
2021-01-07 22:07:33 +01:00
Andrew Chow
2c403279e2 gitian: Remove codesign_allocate and pagestuff from MacOS build 2021-01-07 15:33:19 -05:00
Andrew Chow
f55eed2514 gitian: use signapple to create the MacOS code signature 2021-01-07 15:33:19 -05:00
Andrew Chow
95b06d2185 gitian: use signapple to apply the MacOS code signature 2021-01-07 15:33:19 -05:00