Skip to content

fix: address validated review findings - #4338

Open
piotr-roslaniec wants to merge 2 commits into
devfrom
fix/pr-4256-validated-findings
Open

piotr-roslaniec wants to merge 2 commits into
devfrom
fix/pr-4256-validated-findings

Conversation

@piotr-roslaniec

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #4256 that fixes all 13 confirmed review issue groups:

  1. serve client metrics and diagnostics from a private mux so pprof stays disabled unless explicitly enabled
  2. restrict the ECDSA workflow token to read-only permissions
  3. use one buffered fee-floor invariant for proposal leaders and followers
  4. reject a zero SPV proof-header limit whenever the SPV maintainer will run
  5. validate every effective Electrum primary and fallback URL before dialing
  6. redact Electrum URL credentials from validation errors and every URL-bearing log path
  7. reject negative wallet transaction fee settings instead of silently ignoring them
  8. guard the redemption per-request fee-cap multiplication against uint64 overflow
  9. run the bundled Beacon export freshness check for every package or bundle change
  10. construct follower fee-buffer arithmetic with big.Int before addition can overflow
  11. give each ESLint policy process unique fixture paths
  12. remove ESLint policy fixtures on normal completion, SIGINT, and SIGTERM
  13. correct the malformed DKG key recovery comment to describe the former stalled round

Verification

  • go test -timeout 15m ./...
  • go test -race -timeout 3m -count=1 ./pkg/bitcoin/electrum ./config github.com/checksum0/go-electrum/electrum
  • go vet
  • staticcheck -checks=-SA1019 ./...
  • gofmt -l .
  • corepack yarn lint:ts in solidity/ecdsa
  • actionlint -ignore 'SC2086' .github/workflows/contracts-ecdsa.yml .github/workflows/contracts-random-beacon.yml
  • two concurrent yarn lint:eslint-policy runs
  • SIGINT cleanup smoke: exit 130 with no fixture files left behind

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 918af1ae-6806-432b-94b5-eb64a9635b03

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

piotr-roslaniec added a commit that referenced this pull request Sep 23, 2026
Three follow-up fixes to the prior `fix: address validated review findings`
commit, addressing findings raised by the post-PR multi-perspective review:

- pkg/tbtcpg/fee.go: the bufferedFloorRate overflow guard formatted its
  error with `tbtc.MinWalletTxSatPerVByteFee` instead of the value that
  actually triggered the check (`bufferedFloorRate`). Print the correct
  value so operators diagnosing a huge `WalletTxFeeBufferPercent` see
  the buffered rate that overflowed rather than the bare floor.
- pkg/bitcoin/electrum/electrum.go: drop the redundant raw
  `strings.Contains(rawURL, "://")` check in `validateServerURL`. The
  parsed `u.Scheme == ""` switch arm already rejects the same family of
  malformed URLs with the same error message; the raw check duplicated
  the work.
- solidity/ecdsa/scripts/test-eslint-policy.test.mjs (new) +
  solidity/ecdsa/package.json: add an automated regression test for the
  SIGINT/SIGTERM cleanup contract in `test-eslint-policy.mjs`. The script
  had no test for the signal-handler path; the PR description relied on
  a manual smoke only. The new file uses Node's built-in test runner to
  spawn the script as a child process, interrupt it with SIGINT and
  SIGTERM mid-run, and assert no `policy-fixture-*.ts` files remain.
  Wired into the existing `lint:eslint-policy` script so it runs as part
  of `yarn lint`.
Three follow-up fixes to the prior `fix: address validated review findings`
commit, addressing findings raised by the post-PR multi-perspective review:

- pkg/tbtcpg/fee.go: the bufferedFloorRate overflow guard formatted its
  error with `tbtc.MinWalletTxSatPerVByteFee` instead of the value that
  actually triggered the check (`bufferedFloorRate`). Print the correct
  value so operators diagnosing a huge `WalletTxFeeBufferPercent` see
  the buffered rate that overflowed rather than the bare floor.
- pkg/bitcoin/electrum/electrum.go: drop the redundant raw
  `strings.Contains(rawURL, "://")` check in `validateServerURL`. The
  parsed `u.Scheme == ""` switch arm already rejects the same family of
  malformed URLs with the same error message; the raw check duplicated
  the work.
- solidity/ecdsa/scripts/test-eslint-policy.test.mjs (new) +
  solidity/ecdsa/package.json: add an automated regression test for the
  SIGINT/SIGTERM cleanup contract in `test-eslint-policy.mjs`. The script
  had no test for the signal-handler path; the PR description relied on
  a manual smoke only. The new file uses Node's built-in test runner to
  spawn the script as a child process, interrupt it with SIGINT and
  SIGTERM mid-run, and assert no `policy-fixture-*.ts` files remain.
  Wired into the existing `lint:eslint-policy` script so it runs as part
  of `yarn lint`.
@piotr-roslaniec
piotr-roslaniec force-pushed the fix/pr-4256-validated-findings branch from 010c27c to 41fe647 Compare September 23, 2026 13:17

This branch has not been deployed

No deployments
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