14171 Commits

Author SHA1 Message Date
chromatic
249a540dc2
Merge pull request #3033 from patricklodder/1.14.6-crosslink-readme
doc: crosslink the translated readme files
2022-07-15 11:06:33 -07:00
chromatic
74633f7d5f
Merge pull request #3034 from patricklodder/1.14.6-cleanup-fee-recommendation
doc: clean up fee-recommendation.md for 1.14.6
2022-07-15 11:06:22 -07:00
chromatic
dd6b6923fc
Merge pull request #3035 from patricklodder/1.14.6-draft-release-notes
Draft release notes for 1.14.6
2022-07-15 09:17:54 -07:00
chromatic
1729aaaf1f
Merge pull request #3030 from patricklodder/1.14.6-rework-tx-download
net: rework transaction download scheduling
2022-07-13 23:14:32 -07:00
Patrick Lodder
581db6e47d
doc: first iteration of release notes 2022-07-13 22:06:28 +02:00
Patrick Lodder
893ae00fab
doc: move 1.14.5 release notes to the archive
and re-link the internal links in the document
2022-07-13 17:14:23 +02:00
Patrick Lodder
a758fa7982
doc: clean up fee-recommendation.md for 1.14.6
Removes the note that dust recommendations are done in a future
release, as 1.14.6 is that future release
2022-07-13 16:08:39 +02:00
Patrick Lodder
8a2d744fbb
doc: crosslink the translated readme files 2022-07-13 15:56:58 +02:00
Patrick Lodder
ae38534692
qa: add transaction download test
Tests 5 scenarios for transaction download scheduling:

1. Whether eventually, after a series of timeouts, all our peers
   that announced a transaction are sent a getdata request
2. Whether outbound peers are prioritized over inbound peers when
   a getdata request takes longer than optimal
3. That we honor the maximum in-flight capacity, that this is on
   a per-peer basis and that it resets itself after timeout
4. That when we have an inflight getdata request when a peer
   disconnects, we recover after the initial 30 second timeout
   and fetch the transaction from another peer
5. That we recover after a peer sends us a notfound message for
   a tx we had an inflight getdata request for.
2022-07-12 02:57:00 +02:00
Patrick Lodder
054bd7f087
net: tune the timeouts around tx download
- Lower the timeout until we will request a transaction from an
  additional peer on top of the one we received an inv from, from
  1 minute to 30 seconds. Waiting a full minute will often mean
  that the transaction will skip 2 blocks (one that is currently
  templated, and the one that we'd make a minute after that.
  This allows the transaction to at least have a chance to be
  included in the next block template.

- (Inferred) lower the timeout between requesting and receiving a
  transaction from 10 minutes to 5 minutes. We keep the multiplier
  from Bitcoin Core of 10x the re-request timeout, to allow faster
  cleanup of stale requests when 2 peers have a slow connection.

- Change the frequency of checking timeouts from once every 10
  minutes, to once every 90 seconds, on average. We randomize this
  check to be performed every 60-120 seconds. This allows the node
  to be triggered into cleanup more frequently and with that also
  helps towards the goal of faster cleanup of stale requests.
2022-07-12 02:51:22 +02:00
Patrick Lodder
0664e73401
net: make inv timing mockable
Changes all timing around when we send inv messages to our peers to
be mockable with setmocktime (on regtest.)

This is needed for testing transaction scheduling in time that is
faster-than-real.
2022-07-12 02:51:21 +02:00
Suhas Daftuar
1e596ed731
net: improve upon transaction scheduling rework
- Add an explicit memory bound to m_tx_process_time
  Previously there was an implicit bound based on the handling
  of m_tx_announced, but that approach is error-prone
  (particularly if we start automatically removing things from
  that set).

- Remove NOTFOUND transactions from in-flight data structures
  This prevents a bug where the in-flight queue for our peers
  will not be drained, resulting in not downloading any new
  transactions from our peers.

- Expire old entries from the in-flight tx map
  If a peer hasn't responded to a getdata request, eventually
  time out the request and remove it from the in-flight data
  structures. This is to prevent any bugs in our handling of
  those in-flight data structures from filling up the
  in-flight map and preventing us from requesting more
  transactions (such as the NOTFOUND bug mentioned above).

- Fix bug around transaction requests
  If a transaction is already in-flight when a peer announces
  a new tx to us, we schedule a time in the future to
  reconsider whether to download. At that future time, there
  was a bug that would prevent transactions from being
  rescheduled for potential download again (ie if the
  transaction was still in-flight at the time of
  reconsideration, such as from some other peer). This fixes
  that bug.

- Improve NOTFOUND comment

Cherry-picked from: 218697b6, 23163b75, e32e0840, f635a3ba
                    and 308b7673
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2022-07-12 02:51:03 +02:00
alamshafil
596041ccb7
net: rework transaction scheduling
This prevents invblock related attacks.

Backported-from: 1cff3d6c
Original author: Gleb Naumenko <naumenko.gs@gmail.com>
2022-07-12 02:12:07 +02:00
Old Dip Tracker
82d1997235
Merge pull request #3014 from MishaBoar/misha_italian_1.14.6_latest
Updated italian phrases for 1.14.6 release.
2022-07-10 17:43:59 -04:00
chromatic
d5f4e810a4
Merge pull request #2409 from patricklodder/1.14.4-libevent-2.1.12
depends: libevent 2.1.12-stable
2022-07-10 13:06:40 -07:00
MishaBoar
46743f646d Updated italian phrases for 1.14.6 release. 2022-07-09 20:51:51 +02:00
Old Dip Tracker
c6900bbb7b
Merge pull request #3022 from dogespacewizard/1.14.6-dev
Update bitcoin_ko_KR.ts
2022-07-09 14:47:35 -04:00
dogespacewizard
1b353d33a7
Update bitcoin_ko_KR.ts 2022-07-06 12:02:43 +09:00
chromatic
4674dc1b82
Merge pull request #2910 from patricklodder/1.14.6-fix-autogen
build: Fix warnings when running autogen.sh
2022-07-02 10:01:56 -07:00
Old Dip Tracker
c5ab255fbb
Merge pull request #3015 from chromatic/fix-network-types-and-sizes
Improve data types for network data
2022-06-29 09:55:53 -04:00
chromatic
14196d56b3 Improve data types for network data
While working with other networking code, Patrick and I noticed that we
use signed types and wrongly-sized types for several networking related
values, including data lengths, timeout durations, and port numbers.

This commit corrects several of these types and improves error handling
slightly to account for potentially invalid values.
2022-06-25 11:57:08 -07:00
Evan Klitzke
c4ef2d1f03
build: fix automake warnings when running autogen.sh
- Removes hard coded GZIP_ENV because this is now handled properly
  by gitian.
- Removes target '.mm.o' because that was needed for XCode <= 4.2

Cherry-picked from: f8c6697
2022-06-25 18:36:02 +02:00
fanquake
3ad3cd5647
[Build] Add AM_OBJCXXFLAGS and QT_PIE_FLAGS to OBJCXXFLAGS to future-proof darwin targets
Cherry-picked from: cc5c39dd
Conflicts: changed libbitcoinqt into libdogecoinqt
2022-06-25 18:36:01 +02:00
Old Dip Tracker
d0bc620154
Merge pull request #2964 from True-Mining/1.14.6-dev
Set the wallet's discard threshold to 0.01 DOGE
2022-06-25 10:28:10 -04:00
Old Dip Tracker
54a6dbe0bb
Merge pull request #2974 from chromatic/add-rescanchain-rpc-command
Add rescan RPC command
2022-06-25 09:29:40 -04:00
matheusbach
bd3500adcb set the wallet's discard threshold to 0.01 DOGE 2022-06-23 22:03:55 -03:00
chromatic
666e174f1f
Merge pull request #3011 from patricklodder/1.14.6-translations-remainder
locale: update languages that have no recent updates
2022-06-23 14:44:07 -07:00
Patrick Lodder
2a0c36b691
locale: update languages that have no recent updates
Omitted all unmaintained dialects unless there only is a dialect.

Excluded files:

- bg_BG -> bg
- ca@valencia and ca_ES -> ca
- el_GR -> el
- es_AR, es_CL, es_CO, es_DO, es_ES, es_MX, es_UY and es_VE -> es
- et_EE -> et
- fa_IR -> fa
- fr_CA and fr_FR -> fr
- ro_RO -> ro
- ru_RU -> ru
- tr_TR -> tr
- vi_VN -> vi
- zh and zh_HK -> zh_CN
2022-06-23 17:38:13 +02:00
chromatic
eecc9325bf
Merge pull request #3010 from patricklodder/1.14.6-translations-recent
locale: update recent translations
2022-06-22 22:52:24 -07:00
chromatic
7c67087d61
Merge pull request #3009 from patricklodder/1.14.6-translation-str
locale: update the strings and english translation files
2022-06-22 22:45:24 -07:00
chromatic
f74e27da05 Add rescan RPC command 2022-06-22 22:34:42 -07:00
Patrick Lodder
1d00bfe82c
locale: update recent translations 2022-06-22 22:17:33 +02:00
Patrick Lodder
09475f19cb
locale: update the strings and english translation files 2022-06-22 22:15:54 +02:00
Old Dip Tracker
b38a23cdfe
Merge pull request #3001 from patricklodder/1.14.6-remove-bad-info
wallet: remove misleading information about transaction state
2022-06-22 16:14:18 -04:00
chromatic
de26bbfbe1
Merge pull request #2998 from patricklodder/1.14.6-textual-improvements
improve some user-facing strings
2022-06-21 22:06:32 -07:00
Patrick Lodder
90373b711e
wallet: remove misleading information about transaction state
Qt wallets display information to users about the broadcast state
of transactions, without truly knowing the actual state. The fact
that a peer has requested details for a transaction does not mean
it was accepted to their mempool or relayed to any other peers and
miners, because the only way to test if the transaction can be
accepted is by requesting and processing it.

We remove the "offline" and "maturity warning" statuses, which
saves large wallets memory and processing time.

Backported from: beef7ec4
Original author: Matt Corallo <git@bluematt.me>
2022-06-21 16:36:19 +02:00
Old Dip Tracker
5121eef492
Merge pull request #3003 from patricklodder/1.14.6-fix-p2p-policy
qa: harden the p2p-policy test
2022-06-21 10:34:54 -04:00
chromatic
f91b29e1ca
Merge pull request #2997 from patricklodder/1.14.6-enhance-addnode-memory
net: constrain the memory usage of manually added nodes
2022-06-20 21:31:50 -07:00
chromatic
77bb8b9f07
Merge pull request #2995 from patricklodder/1.14.6-biplist
doc: maintain the biplist
2022-06-20 16:56:54 -07:00
chromatic
d71725e699
Merge pull request #2973 from patricklodder/1.14-gitian-building-script
Improved gitian build script
2022-06-20 16:50:25 -07:00
Old Dip Tracker
96d34ae4da
Merge pull request #3000 from chromatic/forbid-negative-verifychain-blocks
Force `verifychain` RPC args to be positive
2022-06-20 19:38:58 -04:00
Patrick Lodder
f209f710af
qa: harden the p2p-policy test
the p2p-policy test has a number of issues because it is a real-
time relay test that can at the moment not be mocked and it is
insufficiently hardened against signature length variation.

This makes 2 changes to the test to make it more reliable:

1. Increase the maximum wait time for transactions to be relayed to
   2 minutes instead of 30 seconds. This gives us more certainty
   that the PoissonNextSend() function doesn't schedule outside of
   our window.
2. Whenever we sign a transaction with an unexpected signature
   length, retry constructing the transaction (with a different
   input). Fees are changed to be 100% exact.

Note that this makes the test potentially take a longer time to
complete, so we move it up in the list of the test runner, to
be triggered early.
2022-06-20 19:08:54 +02:00
Old Dip Tracker
f132f56ac3
Merge pull request #2996 from chromatic/add-backupdir-option
Add configurable backup directory for wallet dumps and backups
2022-06-19 21:06:40 -04:00
Patrick Lodder
8c5dc302ba
net: constrain the memory usage of manually added nodes
Each node keeps a registry of manually added nodes (through the
addnode parameter, rpc call or UI) but there are currently no
limits imposed on that usage, which is a bit sloppy and can lead
to situations where memory is being used for storing addresses
that are never connected to, because the maximum number of
connections used for addnode entries is hardcoded as 8. This
could prevent smaller systems that host nodes (like those
running on an ARM SoC) to optimally use the available memory.

This enhancement limits the addnode functionality as follows:

1. Whenever over 799 nodes are added to the registry, require
   the user to remove an entry before a new one can be added
2. Disallow very large addresses (more than 256 characters).
   This limit provides for at least 4 levels of subdomains as
   specified under RFC1035.

See https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.1
2022-06-20 01:54:31 +02:00
Old Dip Tracker
5eb3a70cdc
Merge pull request #2988 from alamshafil/liststucktx
Add an RPC method showing wallet transactions that are not in the mempool
2022-06-19 19:00:29 -04:00
chromatic
8c20b002a6 Force verifychain RPC args to be positive
Verification levels must be between 0 and 4 inclusive, and block heights should
always be positive. While code in the scan process handles the latter case with
a default value, it's better to verify and reject invalid input where it first
enters the system.
2022-06-19 07:01:45 -07:00
Patrick Lodder
0bca077efb
improve some user-facing strings
- improves conciseness of tips displayed in Qt
- makes the function of the reset button on the importkeydialog
  describe reality
- describe alertnotify to match the new reality after 565280f4
- make sure that "koinu" is not expressed as "koinus"
- fix type in advanced send screen
2022-06-19 00:56:30 +02:00
chromatic
5f5d6a381c Extract wallet RPC utility file 2022-06-18 12:14:34 -07:00
chromatic
c0e27fc825 Make dumpwallet/backupwallet use backupdir path
This adds more defensiveness around dumping or backing up wallets, so
that the directory and filepaths are always available (even if they were
on transient storage that was removed), and that they never overwrite
other files.
2022-06-18 12:14:34 -07:00
chromatic
5735276cc5 Add -backupdir CLI option
This allows users to set the directory in which to store backups and
datadumps.  If not provided, defaults to a subdirectory of `datadir`
called `backups/`, and if that cannot be created, defaults to `datadir`.
2022-06-18 12:14:20 -07:00