Skip to content

Misc offchain cleanup in codec, txm, logpoller, chainaccessor#573

Merged
ogtownsend merged 13 commits intomainfrom
ogt/misc-offchain-cleanup
Feb 4, 2026
Merged

Misc offchain cleanup in codec, txm, logpoller, chainaccessor#573
ogtownsend merged 13 commits intomainfrom
ogt/misc-offchain-cleanup

Conversation

@ogtownsend
Copy link
Collaborator

Changes are grouped by component/area via commits

Copilot AI review requested due to automatic review settings February 2, 2026 23:55
@ogtownsend ogtownsend requested a review from a team as a code owner February 2, 2026 23:55
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

👋 ogtownsend, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs cleanup across multiple offchain components including codec, txm, logpoller, and chainaccessor. The primary focus is improving error handling by adding proper error checks to the ToRawAddr function and related address conversion operations.

Changes:

  • Modified ToRawAddr function to return errors instead of panicking on invalid addresses
  • Added graceful shutdown handling in txm's broadcast loop and channel closure
  • Improved nil/zero-value checks across logpoller models and chainaccessor
  • Enhanced address validation in commit codec operations

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/txm/txm.go Added graceful shutdown handling and channel closure
pkg/logpoller/store/postgres/queryparser.go Added error handling for address conversion
pkg/logpoller/store/postgres/models_test.go Updated test to check FromFilter error
pkg/logpoller/store/postgres/models.go Made FromFilter and FromLog return errors
pkg/logpoller/store/postgres/logs.go Improved batch size handling logic
pkg/logpoller/store/postgres/filters.go Added error handling for address conversions
pkg/logpoller/models/models.go Added nil checks for BlockRange and FilterKey
pkg/logpoller/loader/loader.go Added missing channel close
pkg/ccip/ocr/contract_transmitter.go Added error handling for wallet address conversion
pkg/ccip/codec/msghasher_test.go Updated test to handle ToRawAddr error
pkg/ccip/codec/executecodec_test.go Updated test to handle ToRawAddr error
pkg/ccip/codec/commitcodec_test.go Refactored to use randomUnknownAddress helper
pkg/ccip/codec/commitcodec.go Added address validation for merkle roots
pkg/ccip/codec/addresscodec_test.go Updated test to handle ToRawAddr error
pkg/ccip/codec/addresscodec.go Changed ToRawAddr to return error for invalid inputs
pkg/ccip/chainaccessor/ton_accessor.go Added error handling and nil checks throughout
pkg/ccip/chainaccessor/event.go Made convertCCIPMessageSent return error
pkg/ccip/chainaccessor/config.go Updated addrToBytes to handle conversion errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

krebernisak
krebernisak previously approved these changes Feb 3, 2026
@ogtownsend ogtownsend marked this pull request as draft February 4, 2026 15:44
@ogtownsend ogtownsend marked this pull request as ready for review February 4, 2026 17:08
@ogtownsend ogtownsend merged commit 2ef4ef8 into main Feb 4, 2026
36 of 37 checks passed
@ogtownsend ogtownsend deleted the ogt/misc-offchain-cleanup branch February 4, 2026 19:21
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.

4 participants