Skip to content

Conversation

@cryptoflops
Copy link

Overview

This PR implements architectural modernizations for the node's HTTP layer and fee estimation engine. The main goals were reducing the runtime dependency footprint and ensuring more accurate fee estimates during periods of network congestion.

Detailed Changes

1. HTTP Routing Modernization

  • Specialized Routing: Replaced the previous regular expression dependency in the runtime with a custom, segment-based routing system.
  • Performance & Footprint: The new system is optimized for the node's specific URL patterns. This reduces the final binary size and removes the processing overhead of a full regular expression engine.
  • Support: The system correctly handles exact segments, name captures, and optional path segments.

2. Improved Fee Estimation

  • Mempool Awareness: Updated the fee estimation logic to look at the current state of the mempool.
  • Logic: The estimator now returns the highest value between historical block data and the current weighted mempool distribution. This prevents users from receiving outdated, low fee suggestions when the network is busy.

3. General Code Modernization

  • Global State: Migrated globally initialized data in several core areas to use standard library lazy-initialization patterns. This aligns the codebase with modern standards and simplifies global state management.

4. Resolved Issues

  • Stacking Data: Updated the stacking information response to include the current epoch ID for better state tracking.
  • Signer Tool: Adjusted the signer command-line logic to ensure it returns a success code when showing help or running without arguments.
  • Version String: Fixed a display issue where the binary name appeared twice in the version information.

5. Interface Consistency

  • Standardized how requests are parsed and how parameters are named across the latest tenure-related endpoints to ensure architectural consistency.
  • Standardized how the system accesses captured path segments throughout the API layer.

Impact Assessment

  • Breaking Changes: None. All existing URL patterns and data schemas are preserved.
  • Performance: Improved routing efficiency and significantly more accurate fee suggestions under load.

Checklist

  • Verified all new and modified code logic
  • Updated the project changelog
  • Checked API parameter consistency

@CLAassistant
Copy link

CLAassistant commented Dec 20, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants