Toccata Cleanup - Part 4 - #1086
Open
biryukovmaxim wants to merge 1 commit into
Open
Conversation
* Drop the toccata activation argument from the mining manager and mempool * Remove the pre-Toccata standard transaction mass cap and its relaxation window * Make the relay fee floor unconditional and delete the legacy minimum relay fee * Drop the unused priority and DAA score arguments from the standardness checks * Reduce the transient mass activation tests to the durable template limit checks * Remove the mempool mass rejection error variants left without constructors
This was referenced Jul 28, 2026
biryukovmaxim
marked this pull request as ready for review
July 28, 2026 10:54
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
master)Each PR targets the branch below it, so its diff contains only its own layer. Review bottom to top.
Fourth of a stacked series removing dead Toccata activation handling.
This part removes the activation plumbing from
mining/and its single production call site inkaspad/. Mempool policy that was split into a pre-Toccata and a post-Toccata form becomes unconditional.Changes
toccata_activationis dropped fromMiningManager::{new, new_with_extended_config, with_config}, fromMempool::new, and from theMempoolstruct. The only production caller passed the value straight from config.MAXIMUM_STANDARD_TRANSACTION_MASS_PRE_TOCCATA,STANDARD_MASS_RELAXATION_WINDOW_SECONDS,standard_transaction_mass_cap()and both of its call sites. Block-fit admission is still enforced by the template limits, which is a separate check.use_prior_p2p_fee_rulesandLEGACY_MINIMUM_RELAY_TRANSACTION_FEEare deleted. All priorities now usemax(compute_mass, normalized_transient_mass) * minimum_relay_transaction_fee, which is what high priority already used. The compute-versus-transient error selection is unchanged.check_transaction_standard_in_isolationandcheck_transaction_standard_in_contextread neither, so both parameters are removed along with those of the twovalidate_transaction_std_*wrappers.Test module reduction
toccata_transient_mass_activation_tests.rsis renamed totemplate_limits_tests.rsand reduced to the three durable checks named in its own module doc:template_limits_reject_compute_tx_before_consensus_validationtemplate_limits_reject_storage_tx_after_consensus_validationtemplate_limits_reject_gas_even_when_non_standard_transactions_are_allowedThese prove that block-limit admission is not standardness: gas and compute rejections happen before consensus in-context validation and script work, while storage rejection happens only after consensus populates contextual mass. The five tests that existed to cover the activation window are deleted along with the helpers only they used, and the module doc drops its remove-and-keep bookkeeping.
Tests that change policy rather than shape
Three call sites in
manager_tests.rsand one incheck_transaction_limits.rsbuilt the mempool withForkActivation::never(), so they ran under pre-Toccata policy: a 100,000 mass cap plus the legacy fee floor for low priority. Removing the argument moves them to post policy, which raises the low priority floor by two orders of magnitude and removes the cap. Their fixtures were checked against the new rules rather than adjusted to fit:test_evict's low fee heavy transaction has a 2,081 sompi fee at mass 2,441; it was already below the old floor of 2,441 and stays rejected under the new floor of 244,100test_evict's high fee heavy transaction is sized at the worst case for a full block mass transaction, so it clears the floor by constructionError variants
NonStandardError::{RejectComputeMass, RejectTransientMass, RejectStorageMass}lost their only construction sites with the mass cap and are removed together with theirtransaction_idarms. The identically namedRuleErrorvariants are unaffected and still carry the template limit rejections.Three further variants (
RejectVersion,RejectGas,RejectSignatureScriptSize) are also unreachable, but they became so before this series: the version check was removed from the mempool in #847, and the gas and signature script size checks moved out of standardness in #995. Each corresponding rule is enforced elsewhere, in consensus or as a template limit. They carry a TODO rather than being removed here, since deleting public error variants unrelated to this fork belongs in its own change.Not in scope
Params::toccata_activationand theForkedParamaccessors stay until the final part, sotemplate_limits_tests.rsstill pins an activation score to select the prior block mass limits its assertions expect.protocol/flowsfollows in the next part.