pub struct SpamFilterConfig {Show 26 fields
pub filter_ordinals: bool,
pub filter_dust: bool,
pub filter_brc20: bool,
pub filter_large_witness: bool,
pub filter_low_fee_rate: bool,
pub filter_high_size_value_ratio: bool,
pub filter_many_small_outputs: bool,
pub dust_threshold: i64,
pub min_output_value: i64,
pub min_fee_rate: u64,
pub max_witness_size: usize,
pub max_size_value_ratio: f64,
pub max_small_outputs: usize,
pub use_adaptive_thresholds: bool,
pub adaptive_thresholds: WitnessSizeThresholds,
pub filter_taproot_spam: bool,
pub max_taproot_control_size: usize,
pub reject_taproot_annexes: bool,
pub filter_large_total_witness: bool,
pub max_total_witness_size: usize,
pub use_improved_envelope_detection: bool,
pub use_json_validation_brc20: bool,
pub require_utxo_for_fee_rate: bool,
pub min_fee_rate_large_tx: u64,
pub large_tx_threshold_bytes: usize,
pub ordinals_strict_mode: bool,
}Expand description
Spam filter configuration
Fields§
§filter_ordinals: boolFilter Ordinals/Inscriptions
filter_dust: boolFilter dust outputs
filter_brc20: boolFilter BRC-20 patterns
filter_large_witness: boolFilter transactions with large witness data
filter_low_fee_rate: boolFilter transactions with low fee rate
filter_high_size_value_ratio: boolFilter transactions with high size-to-value ratio
filter_many_small_outputs: boolFilter transactions with many small outputs
dust_threshold: i64Minimum output value to consider non-dust (satoshis)
min_output_value: i64Minimum output value to include in filtered blocks (satoshis)
min_fee_rate: u64Minimum fee rate threshold (satoshis per vbyte)
max_witness_size: usizeMaximum witness size before flagging (bytes)
Note: This is now adaptive based on script type when use_adaptive_thresholds is enabled
max_size_value_ratio: f64Maximum size-to-value ratio (bytes per satoshi)
max_small_outputs: usizeMaximum number of small outputs before flagging
use_adaptive_thresholds: boolUse adaptive witness size thresholds based on script type Default: true (enables data-driven thresholds)
adaptive_thresholds: WitnessSizeThresholdsAdaptive threshold configuration
filter_taproot_spam: boolFilter Taproot-specific spam patterns (control blocks, annexes) Default: true
max_taproot_control_size: usizeMaximum Taproot control block size (bytes) Control blocks: 33 bytes base + 32 bytes per tree level BIP-110 limits to 257 bytes (depth 7), we use 289 bytes (depth 8) for policy Default: 289 bytes (allows depth 8, more lenient than BIP-110)
reject_taproot_annexes: boolReject Taproot annexes (last witness element starting with OP_RESERVED) Default: true
filter_large_total_witness: boolFilter transactions with large total witness size across all inputs Default: false (disabled by default, can be aggressive)
max_total_witness_size: usizeMaximum total witness size across all inputs (bytes) Default: 5000 bytes
use_improved_envelope_detection: boolUse improved envelope protocol detection (checks for OP_ENDIF) Default: true
use_json_validation_brc20: boolUse JSON validation for BRC-20 detection (requires serde_json) Default: true (if serde_json available)
require_utxo_for_fee_rate: boolRequire UTXO set for fee rate calculation (reject if unavailable) If false, falls back to heuristic when UTXO set unavailable Default: false (use heuristic fallback)
min_fee_rate_large_tx: u64Minimum fee rate for large transactions (satoshis per vbyte) Transactions larger than large_tx_threshold_bytes require this fee rate Default: 2 sat/vB (higher than standard 1 sat/vB)
large_tx_threshold_bytes: usizeLarge transaction threshold (bytes) Transactions larger than this require min_fee_rate_large_tx Default: 1000 bytes
ordinals_strict_mode: boolOrdinals detection mode: strict (envelope/pattern only) vs legacy (includes large witness heuristics) When true: Ordinals = envelope protocol, ordinal output patterns, Taproot annex/control-block. Large witness alone is NOT Ordinals (handled by LargeWitness category). When false: Legacy behavior - large witness and witness data patterns also trigger Ordinals. Default: true (minimize false positives; Miniscript/vaults no longer misclassified as Ordinals)
Trait Implementations§
Source§impl Clone for SpamFilterConfig
impl Clone for SpamFilterConfig
Source§fn clone(&self) -> SpamFilterConfig
fn clone(&self) -> SpamFilterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpamFilterConfig
impl Debug for SpamFilterConfig
Source§impl Default for SpamFilterConfig
impl Default for SpamFilterConfig
Source§impl From<SpamFilterConfig> for SpamFilterConfigSerializable
impl From<SpamFilterConfig> for SpamFilterConfigSerializable
Source§fn from(config: SpamFilterConfig) -> Self
fn from(config: SpamFilterConfig) -> Self
Source§impl From<SpamFilterConfigSerializable> for SpamFilterConfig
impl From<SpamFilterConfigSerializable> for SpamFilterConfig
Source§fn from(serializable: SpamFilterConfigSerializable) -> Self
fn from(serializable: SpamFilterConfigSerializable) -> Self
Auto Trait Implementations§
impl Freeze for SpamFilterConfig
impl RefUnwindSafe for SpamFilterConfig
impl Send for SpamFilterConfig
impl Sync for SpamFilterConfig
impl Unpin for SpamFilterConfig
impl UnsafeUnpin for SpamFilterConfig
impl UnwindSafe for SpamFilterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more