Skip to content

add Rate limit docs#328

Open
evanorti wants to merge 5 commits into
mainfrom
rate-limit
Open

add Rate limit docs#328
evanorti wants to merge 5 commits into
mainfrom
rate-limit

Conversation

@evanorti

Copy link
Copy Markdown
Contributor

Add rate limit documentation to docs site. Includes migration from ibc-apps.

@evanorti evanorti requested a review from srdtrk July 10, 2026 18:31
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a complete Rate Limit Middleware documentation set to the IBC docs site, covering overview, integration (IBC v1 and v2), limit configuration, and migration from ibc-apps. It also fixes a long-standing fmt.Errof typo in the middleware development guide for both latest/ and next/.

  • New overview.mdx provides detailed explanations of quotas, net-flow accounting, rolling windows, packet-failure reversal, and whitelist/blacklist ordering, including an embedded Mermaid sequence diagram.
  • New integration.mdx rewrites the wiring guide with verified code blocks for both IBC v1 (IBCStackBuilder) and v2 (direct module wrapping), plus a PFM stacking example. Previously flagged issues (missing SetOrderInitGenesis/SetOrderExportGenesis call and absent PFM wiring code) are resolved in this revision.
  • New migration.mdx covers the ibc-apps v10 → ibc-go v11 migration with diff-style before/after blocks for imports, keeper, v1/v2 wiring, and AppModule constructor.

Confidence Score: 5/5

Safe to merge. All changes are documentation; no code is executed at runtime.

The documentation is well-structured and code-verified, previously flagged correctness issues are resolved, and the remaining notes are minor stylistic inconsistencies in code comments and an SEO question about noindex removal from next/ pages.

ibc/latest/middleware/rate-limit-middleware/integration.mdx and its next/ counterpart for the stack-comment inconsistency; ibc/next/ overview, integration, and setting-limits for the intentionality of the noindex/canonical removal.

Important Files Changed

Filename Overview
docs.json Adds Rate Limit Middleware navigation group for both latest/ and next/ versions with all four new pages correctly registered.
ibc/CLAUDE.md Directory tree updated to include migration.mdx alongside the other rate-limit-middleware pages in next/.
ibc/latest/ibc/middleware/develop.mdx One-line typo fix: fmt.Errof → fmt.Errorf in a code snippet. Correct fix, mirrored in next/.
ibc/latest/middleware/rate-limit-middleware/integration.mdx Major content rewrite adding complete v1 and v2 wiring examples; previously raised issues with genesisModuleOrder and PFM example are resolved. Minor inconsistency: v1 stack comment includes core IBC as a layer, but the PFM section in the same file correctly omits it.
ibc/latest/middleware/rate-limit-middleware/migration.mdx New file documenting migration from ibc-apps v10 to ibc-go v11; covers imports, keeper changes, v1/v2 wiring, and AppModule constructor updates with clear diff blocks.
ibc/latest/middleware/rate-limit-middleware/overview.mdx Comprehensive rewrite covering quotas, net-flow accounting, rolling windows, reversal on failure, and whitelist/blacklist ordering. Includes a Mermaid sequence diagram for packet flow.
ibc/latest/middleware/rate-limit-middleware/setting-limits.mdx Expanded to cover all four governance messages, quota field validation rules, genesis-only whitelist/blacklist configuration, and query commands for verifying limits.
ibc/next/middleware/rate-limit-middleware/integration.mdx Synced from latest/ with links updated to /ibc/next/ paths. Removes noindex/canonical front matter; same minor stack comment inconsistency as latest/ version.
ibc/next/middleware/rate-limit-middleware/migration.mdx New file, parallel to latest/ version with /ibc/next/ links. Content is identical in substance.
ibc/next/middleware/rate-limit-middleware/overview.mdx Synced from latest/; noindex/canonical removed, links updated to next/ paths.
ibc/next/middleware/rate-limit-middleware/setting-limits.mdx Synced from latest/; noindex/canonical removed, links updated to next/ paths.
work-log/rate-limit.md Work log entry correctly formatted per work-log/CLAUDE.md, covering all major changes in the PR.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph v1["IBC v1 Transfer Stack"]
        direction TB
        CoreIBC_v1["IBC Core (channel keeper)"]
        RL_v1["Rate Limiting Middleware"]
        PFM_v1["Packet Forward Middleware (optional)"]
        Transfer_v1["Transfer Module"]
        CoreIBC_v1 --> RL_v1 --> PFM_v1 --> Transfer_v1
    end
    subgraph v2["IBC v2 (direct wrapping)"]
        direction TB
        RouterV2["IBC v2 Router"]
        RL_v2["Rate Limiting v2 Middleware"]
        Transfer_v2["Transfer v2 Module"]
        RouterV2 --> RL_v2 --> Transfer_v2
    end
    Gov["Governance (MsgAddRateLimit etc.)"] --> Keeper["RateLimitKeeper"]
    Keeper --> RL_v1
    Keeper --> RL_v2
    style v1 fill:#e8f4fd,stroke:#2196F3
    style v2 fill:#e8f5e9,stroke:#4CAF50
    style Gov fill:#fff3e0,stroke:#FF9800
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph v1["IBC v1 Transfer Stack"]
        direction TB
        CoreIBC_v1["IBC Core (channel keeper)"]
        RL_v1["Rate Limiting Middleware"]
        PFM_v1["Packet Forward Middleware (optional)"]
        Transfer_v1["Transfer Module"]
        CoreIBC_v1 --> RL_v1 --> PFM_v1 --> Transfer_v1
    end
    subgraph v2["IBC v2 (direct wrapping)"]
        direction TB
        RouterV2["IBC v2 Router"]
        RL_v2["Rate Limiting v2 Middleware"]
        Transfer_v2["Transfer v2 Module"]
        RouterV2 --> RL_v2 --> Transfer_v2
    end
    Gov["Governance (MsgAddRateLimit etc.)"] --> Keeper["RateLimitKeeper"]
    Keeper --> RL_v1
    Keeper --> RL_v2
    style v1 fill:#e8f4fd,stroke:#2196F3
    style v2 fill:#e8f5e9,stroke:#4CAF50
    style Gov fill:#fff3e0,stroke:#FF9800
Loading

Reviews (3): Last reviewed commit: "updates" | Re-trigger Greptile

Comment thread ibc/latest/middleware/rate-limit-middleware/integration.mdx
@linear-code

linear-code Bot commented Jul 10, 2026

Copy link
Copy Markdown

FOU-635

@evanorti

Copy link
Copy Markdown
Contributor Author

@greptileai

@evanorti

Copy link
Copy Markdown
Contributor Author

@greptileai
please rereview

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