AttributesQueue stage with custom logic for monitoring, validation, or transformation.
Core Concepts
The derivation pipeline uses a stage-based architecture where each stage wraps the previous one:Key Traits
Custom stages that wrap theAttributesQueue must implement:
NextAttributes- Provides payload attributes for block buildingOriginProvider- Provides current L1 originSignalReceiver- Handles pipeline resetsOriginAdvancer- Advances L1 origin
Example: Monitoring Stage
Wrap theAttributesQueue to add metrics tracking:
Custom stages wrap the
AttributesQueue (top-level stage). For deeper pipeline modifications, you’d need to rebuild the entire pipeline.Integration
Testing
Related Resources
- kona-derive - Core derivation pipeline
- Pipeline Traits - Trait definitions
- Stage Examples - Built-in stages
- OP Stack Derivation Spec - Protocol specification