Skip to content

fix: create missing ip_rate_limit table in init_db #71#225

Open
createkr wants to merge 1 commit intoScottcjn:mainfrom
createkr:raybot/fix-missing-table-71
Open

fix: create missing ip_rate_limit table in init_db #71#225
createkr wants to merge 1 commit intoScottcjn:mainfrom
createkr:raybot/fix-missing-table-71

Conversation

@createkr
Copy link
Contributor

Fixed a bug where the attestation endpoint would crash due to a missing ip_rate_limit table definition. \n\n- Miner ID: createker02140054RTC

Copy link
Contributor

@liu971227-sys liu971227-sys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice minimal fix - this addresses the immediate crash path by ensuring ip_rate_limit exists.

One follow-up suggestion before/after merge:

  • Consider adding an index aligned to lookup pattern in check_ip_rate_limit:
    • current hot query is WHERE client_ip = ? AND ts >= ?
    • table PK is (client_ip, miner_id), which is not ideal for timestamp-window scans
    • suggested: CREATE INDEX IF NOT EXISTS idx_ip_rate_limit_ip_ts ON ip_rate_limit(client_ip, ts)

That should keep rate-limit checks fast as row count grows.

@createkr
Copy link
Contributor Author

@Scottcjn Checking the CI failure: "Review Tier Label Gate" failed because of missing labels. I don't have permissions to add labels directly to this repo. Could you please add the appropriate BCOS-L* label to trigger the gate?

@createkr
Copy link
Contributor Author

CI is failing only on Review Tier Label Gate. Could you please add tier label BCOS-L1? After the label is added, the gate should pass and SBOM/SPDX will run.

@createkr
Copy link
Contributor Author

CI is currently failing on 'Review Tier Label Gate' because the PR is missing a required BCOS label. Could a maintainer please add one of: BCOS-L1 / BCOS-L2 (or bcos:l1 / bcos:l2) so checks can proceed? Thanks.

@liu971227-sys
Copy link
Contributor

I also attempted label assignment here and hit permission restriction (AddLabelsToLabelable).\n\nTo unblock CI, maintainer needs to apply an accepted BCOS tier label (likely BCOS-L1 for this low-risk fix), then Review Tier Label Gate should clear.

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