So: are there good reasons to not relay valid transactions? Or should we just rely on consensus?
There definitely are good reasons to not relay every valid transaction: Denial of Service vectors.
For example the Dust-Limit.
Or take a look at RBF. We wouldn't want to let someone flood our nodes with hundreds of tiny fee increments:
// Rule #4: The new transaction must pay for its own bandwidth. Otherwise, we have a DoS
// vector where attackers can cause a transaction to be replaced (and relayed) repeatedly by
// increasing the fee by tiny amounts.
There definitely are good reasons to not relay every valid transaction: Denial of Service vectors.
For example the Dust-Limit.
Or take a look at RBF. We wouldn't want to let someone flood our nodes with hundreds of tiny fee increments:
// Rule #4: The new transaction must pay for its own bandwidth. Otherwise, we have a DoS // vector where attackers can cause a transaction to be replaced (and relayed) repeatedly by // increasing the fee by tiny amounts.Source: https://github.com/bitcoin/bitcoin/blob/4169e72d9ed6320251feea821eb7c047793a50bc/src/policy/rbf.cpp#L114-L123