Skip to content

proof of concept: faster pid in sequencer #624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: optimism
Choose a base branch
from

Conversation

angel-ding-cb
Copy link

@angel-ding-cb angel-ding-cb commented Jun 5, 2025

Description
This PR introduces a hierarchical PID controller system to replace EIP-1559's simple proportional control with sophisticated real-time base fee management. The fast layer (sequencer) provides immediate response to gas utilization changes, while maintaining compatibility with existing batcher coordination.

Problem
Current EIP-1559 implementation on Base suffers from:

  • Slow response: Takes too long to adjust to demand spikes
  • High volatility: ±60% fee swings during congestion
  • Poor user experience: Transactions fail during rapid fee changes
  • Inefficient resource usage: Cannot handle burst capacity effectively

Solution
Hierarchical PID Controller System with two coordinated layers:

A. Fast Layer (Sequencer) - This PR
Real-time base fee adjustment in op-geth

  • Location: op-geth sequencer
  • Input: Gas utilization vs target
  • Output: Immediate base fee adjustments
  • Frequency: Every 2-second block
  • Logic: Local PID based on execution capacity

B. Slow Layer (Batcher) - Future Integration
Strategic DA cost management in op-batcher

  • Location: op-batcher
  • Inputs:
    • DA sliding window (10MB/10 blocks)
    • L1 gas prices
    • Batch economics
    • Historical patterns
  • Output: Parameter updates to sequencer via RPC
  • Frequency: Every 20-60 seconds
  • Logic: Combined PID considering all L1/DA constraints

Tests

some basic unit tests and integration tests are written just to test the expected behavior of the pid control

Additional context

Metadata

@angel-ding-cb angel-ding-cb requested a review from a team as a code owner June 5, 2025 06:14
@angel-ding-cb angel-ding-cb requested a review from teddyknox June 5, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant