Skip to content

Disable debug flags for tagged builds#83

Merged
oskarszoon merged 1 commit into
bsv-blockchain:mainfrom
oskarszoon:bugfix/debug-builds
Oct 30, 2025
Merged

Disable debug flags for tagged builds#83
oskarszoon merged 1 commit into
bsv-blockchain:mainfrom
oskarszoon:bugfix/debug-builds

Conversation

@oskarszoon

Copy link
Copy Markdown
Contributor

DEBUG=true adds -N -l flags which disables compiler optimizations and inlining, making the binary ~10-15% slower with no benefit for production builds. Debug symbols (DWARF) are kept by default anyway for stack traces, so DEBUG=true only hurts performance without adding value.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Status: Complete


Current Review:

No issues found. This change correctly removes the DEBUG=true build argument for tagged production builds.

Analysis:

  • The DEBUG=true flag was adding -N -l gcflags (line 24 in Makefile) which disable optimizations and inlining
  • Debug symbols (DWARF) are preserved by default regardless of this flag, so production builds still get useful stack traces
  • The Dockerfile doesn't reference the DEBUG build arg, so removing it from the workflow has no negative impact
  • This change only affects tagged builds (tags: - 'v*' on line 5-6), so development builds are unaffected

The PR description's claim of ~10-15% performance improvement is reasonable for builds with disabled optimizations.

@sonarqubecloud

Copy link
Copy Markdown

@oskarszoon oskarszoon self-assigned this Oct 30, 2025
@oskarszoon oskarszoon merged commit d35aedd into bsv-blockchain:main Oct 30, 2025
8 checks passed
oskarszoon added a commit to oskarszoon/teranode that referenced this pull request Jun 2, 2026
Address the open CodeQL code-scanning alerts:

- httpimpl: bound-check int->uint32 conversions before casting in
  GetBlocks (offset) and GetNearestForkHeights (range) to prevent
  truncation/wrap-around (go/incorrect-integer-conversion, bsv-blockchain#90 bsv-blockchain#91 bsv-blockchain#117)
- daemon: change formatBytes to take uint64, removing the unchecked
  int64(limit) narrowing of the cgroup memory limit (bsv-blockchain#113)
- dashboard p2pStore: reject __proto__/constructor/prototype peer_id
  keys before any plain-object write to prevent prototype pollution
  from WebSocket data (bsv-blockchain#79 bsv-blockchain#81 bsv-blockchain#83)
- dashboard urlUtils: remove the dead sanitizeUrl function entirely
  (no callers, no tests); its broken script-tag regex was the source
  of the alerts (js/bad-tag-filter, js/incomplete-multi-character-sanitization, bsv-blockchain#2 bsv-blockchain#4)
- centrifuge client: use textContent instead of innerHTML in drawText
  to fix DOM XSS from server-controlled push data (bsv-blockchain#1)
- grpc_helper: document that SecurityLevel 1 leaves the server cert
  unverified (MITM); behaviour unchanged, bsv-blockchain#42 is an intentional
  config-gated mode dismissed on GitHub
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