Misc offchain cleanup in codec, txm, logpoller, chainaccessor#573
Misc offchain cleanup in codec, txm, logpoller, chainaccessor#573ogtownsend merged 13 commits intomainfrom
Conversation
|
👋 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! |
There was a problem hiding this comment.
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
ToRawAddrfunction 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.
Changes are grouped by component/area via commits