fix: create missing ip_rate_limit table in init_db #71#225
fix: create missing ip_rate_limit table in init_db #71#225createkr wants to merge 1 commit intoScottcjn:mainfrom
Conversation
liu971227-sys
left a comment
There was a problem hiding this comment.
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)
- current hot query is
That should keep rate-limit checks fast as row count grows.
|
@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? |
|
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. |
|
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. |
|
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. |
Fixed a bug where the attestation endpoint would crash due to a missing
ip_rate_limittable definition. \n\n- Miner ID: createker02140054RTC