Skip to content

Conversation

@rstout
Copy link
Contributor

@rstout rstout commented Oct 29, 2025

We need TxHash in order to call CCTPv2's HTTP API: https://developers.circle.com/api-reference/cctp/all/get-messages-v-2

Naively setting TxHash in message headers will cause OCR consensus issues, as seen when the Solana chain accessor populated TxHash. In order to prevent consensus issues, setting TxHash is now behind a feature flag in the OffchainConfig (stored in CCIPHome). The DefaultAccessor now populates TxHash by default, but ccipChainReader clears TxHash by default. This means initially, we'll set TxHash and then immediately clear it (maintaining the previous behavior of not having set TxHash). populateTxHashEnabled can then be set for either Commit or Exec to then switch to the mode where TxHash gets populated. This is done via an MCMS proposal to update CCIPHome config, which should be picked up by all nodes within 10s of each other and allow DONs to proceed without consensus issues.

@github-actions
Copy link

👋 rstout, 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!

@ogtownsend
Copy link
Contributor

@rstout
Copy link
Contributor Author

rstout commented Nov 5, 2025

TxHash is left out of several of the exec codecs, will this be a problem? Example:

It shouldn't be, the codecs are for encoding/decoding reports, and TxHash doesn't need to be included in the reports. The place that needs to populate TxHash is the chain readers, and this seems to be the case, so TxHash should be populated.

ogtownsend
ogtownsend previously approved these changes Nov 5, 2025
Copy link
Contributor

@ogtownsend ogtownsend left a comment

Choose a reason for hiding this comment

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

lgtm!

Copilot AI review requested due to automatic review settings November 24, 2025 20:49
Copilot finished reviewing on behalf of rstout November 24, 2025 20:51
Copy link

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 adds support for populating the TxHash field in CCIP message headers, which is required for calling CCTPv2's HTTP API. The implementation includes a feature flag (PopulateTxHashEnabled) to control this behavior for backwards compatibility.

Key changes:

  • Adds PopulateTxHashEnabled configuration flag to control TxHash population
  • Updates MsgsBetweenSeqNums to populate TxHash from types.Sequence.TxHash field
  • Introduces a ChainAccessorWrapper to conditionally clear TxHash based on the feature flag

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pluginconfig/execute.go Adds PopulateTxHashEnabled configuration field
pkg/chainaccessor/default_accessor.go Populates TxHash from sequence item using hexutil.Encode
pkg/chainaccessor/default_accessor_test.go Comprehensive tests for TxHash population scenarios
execute/chainaccessor_wrapper.go Wrapper implementation to conditionally clear TxHash
execute/chainaccessor_wrapper_test.go Tests for wrapper's TxHash enable/disable logic
execute/factory.go Integrates wrapper with configuration flag

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

@rstout rstout marked this pull request as draft November 24, 2025 21:39
@rstout rstout marked this pull request as ready for review November 25, 2025 16:58
makramkd
makramkd previously approved these changes Nov 25, 2025
ogtownsend
ogtownsend previously approved these changes Nov 25, 2025
Copy link
Contributor

@ogtownsend ogtownsend left a comment

Choose a reason for hiding this comment

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

much cleaner, thanks!

@rstout rstout dismissed stale reviews from ogtownsend and makramkd via 2ae4bc7 November 25, 2025 21:01
@github-actions
Copy link

Metric add-msg-tx-hash main
Coverage 70.4% 69.4%

@rstout rstout added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit 99a6fc1 Nov 25, 2025
55 checks passed
@rstout rstout deleted the add-msg-tx-hash branch November 25, 2025 22:03
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