Skip to content

feat(ord-server): add shared command builders and fee rate validator#40

Open
Neurvinch wants to merge 3 commits intoOWASP-BLT:mainfrom
Neurvinch:ord/shared-command-builders
Open

feat(ord-server): add shared command builders and fee rate validator#40
Neurvinch wants to merge 3 commits intoOWASP-BLT:mainfrom
Neurvinch:ord/shared-command-builders

Conversation

@Neurvinch
Copy link
Copy Markdown
Contributor

Summary

  • make_base_command(network) — builds ord CLI prefix for mainnet/regtest
  • make_wallet_args(network) — builds wallet sub-command args per network
  • validate_fee_rate(fee_rate) — range check (1–10000 sat/vbyte)
  • Fix mainnet RPC URL default port from 18443 (regtest) to 8332 (mainnet)

Changes

  • ord-server/ord-api.py — 3 new functions, 1 bug fix

Test plan

  • make_base_command("mainnet") returns mainnet RPC credentials
  • make_base_command("regtest") includes -r flag
  • validate_fee_rate rejects 0, -1, 10001, "abc"; accepts 1, 500, 10000

@owasp-blt
Copy link
Copy Markdown

owasp-blt bot commented Mar 17, 2026

📊 Monthly Leaderboard

Hi @Neurvinch! Here's how you rank for March 2026:

Rank User Open PRs PRs (merged) PRs (closed) Reviews Comments Total
31 snk-git-hub @snk-git-hub 3 1 0 1 9 36
32 Neurvinch @Neurvinch 11 1 0 0 2 25
33 xovishnukosuri @xovishnukosuri 2 2 0 0 1 24

Scoring this month (across OWASP-BLT org): Open PRs (+1 each), Merged PRs (+10), Closed (not merged) (−2), Reviews (+5; first two per PR in-month), Comments (+2, excludes CodeRabbit). Run /leaderboard on any issue or PR to see your rank!

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Warning

Rate limit exceeded

@Neurvinch has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: OWASP-BLT/coderabbit/.coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 69502105-4cb9-4f08-83ab-058f172766c7

📥 Commits

Reviewing files that changed from the base of the PR and between 9a1b356 and 6009ef8.

📒 Files selected for processing (3)
  • ord-server/ord-api.py
  • src/index.py
  • wrangler.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@owasp-blt owasp-blt bot added the needs-peer-review PR needs peer review label Mar 17, 2026
@owasp-blt
Copy link
Copy Markdown

owasp-blt bot commented Mar 17, 2026

👋 Hi @Neurvinch!

This pull request needs a peer review before it can be merged. Please request a review from a team member who is not:

  • The PR author
  • coderabbitai
  • copilot

Once a valid peer review is submitted, this check will pass automatically. Thank you!

⚠️ Peer review enforcement is active.

Neurvinch and others added 3 commits March 17, 2026 12:39
…roxy

Replace placeholder worker with a real Cloudflare Worker that:
- Routes /mainnet/* and /regtest/* as API calls, everything else as static site
- Validates X-Signature-256 HMAC-SHA256 signature before forwarding
- Proxies authenticated API requests to the private ord backend (ORD_BACKEND_URL)
- Returns JSON errors for missing config or invalid signatures
- Add ORD_BACKEND_URL to wrangler.toml [vars]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…helpers

- run_ord_command: exponential-backoff retry on transient errors
  (connection refused, timeout, etc.)
- sanitize_error: strip RPC passwords from stderr before returning
- write_temp_yaml: UUID-suffixed temp files to avoid race conditions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- make_base_command: build ord CLI prefix for mainnet/regtest
- make_wallet_args: build wallet sub-command args per network
- validate_fee_rate: range check (1-10000 sat/vbyte)
- Fix mainnet RPC URL default port (8332, not 18443)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Neurvinch Neurvinch force-pushed the ord/shared-command-builders branch from 8470816 to 6009ef8 Compare March 17, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant