Github-Pull: #32989
Rebased-From: cc1735d7771
To remove multiple occurances of the respository name, against which we
compare `${{ github.repository }}` to check if we should use Cirrus
Runners, introduce a helper job which can check a single environment
variable and output this as an input to subsequent jobs.
Forks can maintain a trivial patch of their repo name against the
`REPO_USE_CIRRUS_RUNNERS` variable in ci.yml if they have Cirrus Runners
of their own, which will then enable cache actions and docker build
cache to use Cirrus Cache.
It's not possible to use `${{ env.USE_CIRRUS_RUNNERS }}` in the
`runs-on:` directive as the context is not supported by GitHub.
If it was, this job would no longer be necessary.
Github-Pull: #32989
Rebased-From: 020069e6b71
Whilst the action cirruslabs/actions/cache will automatically set this
host, the docker `gha` build cache backend will not be aware of it.
Set the value here, which will later be used in the docker build args to
enable docker build cache on the cirrus cache.
Github-Pull: #32989
Rebased-From: 9c2b96e0d03
This sets the build dir at build time so that Apple SDK gets installed
in the correct/expected location for the runtime to find it.
Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
Github-Pull: #32989
Rebased-From: 18f6be09d02
Reverts: e87429a2d0f23eb59526d335844fa5ff5b50b21f
This was added in PR #31545 with the intention that self-hosted runners
might use it to save build cache.
As we are not using hosted runners with a registry build cache, the bulk
of this commit can be reverted, simply using the value of
$DOCKER_BUILD_CACHE_ARG in the script.
link: https://github.com/bitcoin/bitcoin/pull/31545
Github-Pull: #32989
Rebased-From: 94a09325475
Using buildx is required to properly load the correct driver, for use
with registry caching. Neither build, nor BUILDKIT=1 currently do this
properly.
Use of `docker buildx build` is compatible with podman.
Github-Pull: #32989
Rebased-From: fdf64e55324
Another action to reduce boilerplate in the main ci.yml file.
This action will set up a docker builder compatible with caching build
layers to a container registry using the `gha` build driver.
It will then configure the docker build cache args.
Github-Pull: #32989
Rebased-From: 33ba073df7a
If set, Cirrus runners will be used on pushes to, and pull requests
against, this repository.
Forks can set this if they have their own cirrus runners.
Github-Pull: #32989
Rebased-From: b232b0fa5e9
Add "Restore" and "Save" caching actions.
These actions reduce boilerplate in the main ci.yml configuration file.
These actions are implemented so that caches will be saved on `push`
only.
When a pull request is opened it will cache hit on the caches from the
lastest push, or in the case of depends will hit on any matching depends
hash, falling back to partial matches.
Depends caches are hashed using
`$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)`
and this hash is passed in as an input to the actions. This means we
direct cache hit in cases where depends would not be re-built, otherwise
falling back to a partial match.
Previous releases cache is hashed similarly to depends, but using the
test/get_previous_releases.py file.
The cirruslabs cache action will fallback transparently to GitHub's
cache in the case that the job is not being run on a Cirrus Runner,
making these compatible with running on forks (on free GH hardware).
Tor inbound connections do not reveal the peer's actual network address.
Therefore do not apply whitelist permissions to them.
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Github-Pull: #33395
Rebased-From: f563ce90818d486d2a199439d2f6ba39cd106352
Add test_multiple_blocktxn_response that checks that the peer is
disconnected.
Github-Pull: #33296
Rebased-From: 8b6264768030db1840041abeeaeefd6c227a2644
Previously in debug builds, this would cause an Assume crash if
FillBlock had been called previously. This could happen when multiple
blocktxn messages were received.
Co-Authored-By: Greg Sanders <gsanders87@gmail.com>
Github-Pull: #33296
Rebased-From: 5e585a0fc4fd68dd7b4982054b34deae2e7aeb89
Since #29412, we have not allowed mutated blocks to continue
being processed immediately the block is received, but this
is only done for the legacy BLOCK message.
Extend these checks as belt-and-suspenders to not allow
similar mutation strategies to affect relay by honest peers
by applying the check inside
PartiallyDownloadedBlock::FillBlock, immediately before
returning READ_STATUS_OK.
This also removes the extraneous CheckBlock call.
Github-Pull: #32646
Rebased-From: bac9ee4830664c86c1cb3d38a5b19c722aae2f54
Rather than trying to match the apt installed clang version, which is
prone to intermittent issues. i.e #33345.
Github-Pull: #33364
Rebased-From: b736052e39f1f466f63f261ace3dd2deba171e8a
The `SHA256AutoDetect` return output is used, among other use cases, to
name benchmarks. Using a comma breaks the CSV output.
This change replaces the comma with a semicolon, which fixes the issue.
Github-Pull: #33340
Rebased-From: 790b440197bde322432a5bab161f1869b667e681
Also, use update-alternatives to avoid having to manually specify
clang-${APT_LLVM_V} or llvm-symbolizer-${APT_LLVM_V} everywhere.
Github-Pull: #32999
Rebased-From: fad040a5787a8ac0a13aef5c54e5a675de239e92
084c95a18c9978c0a047ffe219a9eef8ab327ea6 doc: update manual pages for v29.1 (fanquake)
37d115c67eafec68128649651a7e921c3e2635ce build: bump version to v29.1 final (fanquake)
b0d88bcc501bf0fc06e64c2f0a295b99a1101073 doc: finalise release notes for 29.1 (fanquake)
99ab2e70e782bf5ca753ad636f69642da6054283 ci: return to using dash in CentOS job (fanquake)
6448ebb5a7c942949a70ffc4a1d2a93338fac130 doc: Remove wrong and redundant doxygen tag (MarcoFalke)
Pull request description:
Backports:
* #33236
* #33261
Since `rc2`, #33212 was also backported in #33251.
ACKs for top commit:
glozow:
ACK 084c95a18c9978c0a047ffe219a9eef8ab327ea6
willcl-ark:
ACK 084c95a18c9978c0a047ffe219a9eef8ab327ea6
Tree-SHA512: 0698e5b2d12f7328bf5af8dbbd92b0049de401c0a4af27fda2209f9aab35d827c5ac65eb9268aa1fae241e3adf0d3dd89324bb288655ead8af2b5584aae1f6d2
fcac8022d839572f5d8781096eec14ca7ea2e0dd test: index with an unclean restart after a reorg (Martin Zumsande)
16b1710d97464f134a526634a412a4b1b6cc8639 index: don't commit state in BaseIndex::Rewind (Martin Zumsande)
Pull request description:
Backports #33212 to 29.x
ACKs for top commit:
achow101:
ACK fcac8022d839572f5d8781096eec14ca7ea2e0dd
stickies-v:
ACK fcac8022d8
mzumsande:
Code Review ACK fcac8022d839572f5d8781096eec14ca7ea2e0dd
Tree-SHA512: eeb9213f03bbb1d48c3ccb12121a6e475f436895d314b5171007e7e4ee457c74b312fa7f0d1808d6221dc22b192700a93ea21c4e9e04689da7dde7e1f79e9569
The committed state of an index should never
be ahead of the flushed chainstate. Otherwise, in the case
of an unclean shutdown, the blocks necessary to revert
from the prematurely committed state would not be
available, which would corrupt the coinstatsindex in particular.
Instead, the index state will be committed with the next
ChainStateFlushed notification.
Github-Pull: #33212
Rebased-From: 01b95ac6f496e24e525b2fc9d69ee8b543da65ff
0034dcfba9dc599449e7569ed1b30e58d4f4434f [doc] man pages for 29.1rc2 (glozow)
eb1574af0c6cba4918957d704c5c0f17235a10b5 [build] bump version to 29.1rc2 (glozow)
f9f1ca5445fc216c770b583c1db999aaf910f96f [doc] update release notes (glozow)
9dd7efc8c3fc30cd65ae18a8a91e292c71fe7c16 [policy] lower default minrelaytxfee and incrementalrelayfee to 100sat/kvB (glozow)
bbdab3ef7b7e8f3da4e571f35692bc3264c384db [prep/test] make wallet_fundrawtransaction's minrelaytxfee assumption explicit (glozow)
da30ca0efadd3861016f6435636d9b399da65162 [prep/util] help MockMempoolMinFee handle more precise feerates (glozow)
a0ae3fc8a764121b17e11e3a99330e73c0e44c2d [prep/test] replace magic number 1000 with respective feerate vars (glozow)
1c1970fb45896dc5fa7b16370408c34964ed4c19 [miner] lower default -blockmintxfee to 1sat/kvB (glozow)
3a7e093f948571e058db31dd971dc628d9729232 [doc] assert that default min relay feerate and incremental are the same (glozow)
567c3ee3cb937de09d3fe8b7e82e431993fac7c7 [test] explicitly check default -minrelaytxfee and -incrementalrelayfee (glozow)
6b5396c4b1b3561f79e0c4881dad5eb0ca7b44ae [test] RBF rule 4 for various incrementalrelayfee settings (glozow)
03da7aff996eaaddce04448f8461d4f3d15d2a4a [test] check bypass of minrelay for various minrelaytxfee settings (glozow)
4e3cfa660d1ab1552881f2eedb5123ab7d0fe0b0 [test] check miner doesn't select 0fee transactions (glozow)
Pull request description:
Backports #33106 and includes final changes for 29.1rc2. Based on current network conditions (in which nodes rejecting 0.1-1sat/vB are missing many transactions), it is recommended to change these policy settings.
I did not include #32750 because it causes #33177 and I don't foresee any problems; it was just a nice to have.
For reviewers: the backport is unclean but fairly straightforward. I just had to adapt a test that is no longer in master (#32973) and include `-datacarriersize` in order to pad transaction size (#32406).
ACKs for top commit:
dergoegge:
utACK 0034dcfba9dc599449e7569ed1b30e58d4f4434f
marcofleon:
ACK 0034dcfba9dc599449e7569ed1b30e58d4f4434f
murchandamus:
crACK 0034dcfba9dc599449e7569ed1b30e58d4f4434f
brunoerg:
crACK 0034dcfba9dc599449e7569ed1b30e58d4f4434f
Tree-SHA512: 1b7540ac3fec5b15cf36926dbf633054f14549d76aa445a2bf042b5667e8637db4f9c21c869af25a0c3f8c7cca6c585d17896d2f7e95a6264c1ff59817446694
Let's say an attacker wants to use/exhaust the network's bandwidth, and
has the choice between renting resources from a commercial provider and
getting the network to "spam" itself it by sending unconfirmed
transactions. We'd like the latter to be more expensive than the former.
The bandwidth for relaying a transaction across the network is roughly
its serialized size (plus relay overhead) x number of nodes. A 1000vB
transaction is 1000-4000B serialized. With 100k nodes, that's 0.1-0.4GB
If the going rate for commercial services is 10c/GB, that's like 1-4c per kvB
of transaction data, so a 1000vB transaction should pay at least $0.04.
At a price of 120k USD/BTC, 100sat is about $0.12. This price allows us
to tolerate a large decrease in the conversion rate or increase in the
number of nodes.
Github-Pull: #33106
Rebased-From: 6da5de58cabc4133c379baa50845e30e5bc6b3e4
Use a virtual size of 1000 to keep precision when using a feerate
(which is rounded to the nearest satoshi per kvb) that isn't just an
integer.
Github-Pull: #33106
Rebased-From: 457cfb61b5323a13218b3cfb5a6a6d8b3a7c5f7f
Back when we implemented coin age priority as a miner policy, miners
mempools might admit transactions paying very low fees, but then want to
set a higher fee for block inclusion. However, since coin age priority
was removed in v0.15, the block assembly policy is solely based on fees,
so we do not need to apply minimum feerate rules in multiple places. In
fact, the block assembly policy ignoring transactions that are added to
the mempool is likely undesirable as we waste resources accepting and
storing this transaction.
Instead, rely on mempool policy to enforce a minimum entry feerate to
the mempool (minrelaytxfee). Set the minimum block feerate to the
minimum non-zero amount (1sat/kvB) so it collects everything it finds in
mempool into the block.
Github-Pull: #33106
Rebased-From: 5f2df0ef78be7b24798d0983c9b962740608f1f4