Skip to content

fix(node): golangci-lint failures + broken test Dockerfile/script#984

Merged
tomatoishealthy merged 2 commits into
feat/sequencer-finalfrom
fix/seq-final-lint-build
Jun 10, 2026
Merged

fix(node): golangci-lint failures + broken test Dockerfile/script#984
tomatoishealthy merged 2 commits into
feat/sequencer-finalfrom
fix/seq-final-lint-build

Conversation

@tomatoishealthy

Copy link
Copy Markdown
Contributor

Summary

Small, behavior-preserving fixes for feat/sequencer-final so CI lint passes and the docker-sequencer-test harness builds/starts again. No logic changes.

Lint (golangci-lint, node module)

  • errcheck: handle ignored error returns — block_fsm.go (rc.Close, sink.Cancel), ha_service.go (transport/stableStore/logStore Close), enclave_signer.go (conn.SetDeadline ×2)
  • gosec G112: set ReadHeaderTimeout on the hakeeper RPC server and the node metrics HTTP server
  • gosec G301: tighten raft StorageDir permissions 0o7550o750
  • gofmt: reformat ha_service.go, signer.go, verifier.go
  • misspell: initialisedinitialized, initialisesinitializes, cancelledcanceled

Build / test harness

  • Drop the dead COPY ./morph/oracle/go.mod step from the l2-node and tx-submitter test Dockerfiles — the oracle project no longer exists on this branch, so the COPY fails the image build.
  • run-test.sh: fix a non-existent compose service name (sentry-geth-0sentry-el-0) that aborted L2 startup under set -e.

Test plan

  • go run ../build/lint.go from node/ → exit 0 (was 18 errors)
  • run-test.sh build → both test images build cleanly (oracle COPY removed)
  • run-test.sh setup + start → 4-node L2 + sentry come up; PBFT→V2 upgrade at height 10; cluster produces blocks and stays hash-consistent
  • Swapped one node to the rebuilt image → applies V2 blocks, hash-consistent with the rest of the cluster

Lint (node module):
- errcheck: handle ignored error returns in block_fsm (rc.Close, sink.Cancel),
  ha_service (transport/stableStore/logStore Close) and enclave_signer
  (conn.SetDeadline)
- gosec G112: set ReadHeaderTimeout on the hakeeper RPC server and the node
  metrics HTTP server
- gosec G301: tighten raft StorageDir permissions from 0o755 to 0o750
- gofmt: reformat ha_service.go, signer.go, verifier.go
- misspell: initialised->initialized, initialises->initializes,
  cancelled->canceled

Build/test harness:
- drop the dead `COPY ./morph/oracle/go.mod` step from the l2-node and
  tx-submitter test Dockerfiles (the oracle project no longer exists, so the
  COPY fails the build)
- run-test.sh: fix a non-existent compose service name (sentry-geth-0 ->
  sentry-el-0) that aborted L2 startup

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomatoishealthy tomatoishealthy requested a review from a team as a code owner June 9, 2026 11:16
@tomatoishealthy tomatoishealthy requested review from dylanCai9 and removed request for a team June 9, 2026 11:16
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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: Pro

Run ID: 66b1298b-5f80-4d6c-ad0d-66e5dad2ca87

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/seq-final-lint-build

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.

The APIBackend methods take context.Context only to satisfy the go-ethereum
JSON-RPC handler signature; the underlying hashicorp/raft membership and
leadership ops are synchronous and not context-cancellable, and already carry
their own raftTimeout. Document this so reviewers don't flag the unused ctx as
a bug.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomatoishealthy tomatoishealthy merged commit d7b9f52 into feat/sequencer-final Jun 10, 2026
7 checks passed
@tomatoishealthy tomatoishealthy deleted the fix/seq-final-lint-build branch June 10, 2026 03:08
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