Skip to content

Add opt-in Hedera broadcast sequence polling config#494

Open
HelloKashif wants to merge 3 commits into
developfrom
kashif/hedera-nonce-spam-fix
Open

Add opt-in Hedera broadcast sequence polling config#494
HelloKashif wants to merge 3 commits into
developfrom
kashif/hedera-nonce-spam-fix

Conversation

@HelloKashif

Copy link
Copy Markdown
Contributor

Summary

  • Adds [Transactions.HederaBroadcastValidation] TOML config with SequencePollTimeout and SequencePollInterval keys.
  • Implements HederaBroadcastConfig getters on chain-scoped transactions config so TXM can opt into post-broadcast SequenceAt polling on Hedera.
  • Disabled by default (unset = legacy single immediate check). CCIP Hedera nodes can enable e.g. SequencePollTimeout = '30s', SequencePollInterval = '2s'.
  • Bumps chainlink-framework/chains to framework#108 commit until that PR merges.

Depends on: smartcontractkit/chainlink-framework#108

Test plan

  • go test ./pkg/config/...
  • Enable on Hedera testnet CCIP node and confirm no same-nonce spam during latest lag window
  • Confirm Data Feeds / other Hedera workloads unchanged when config unset

Wire Transactions.HederaBroadcastValidation TOML into chain-scoped
getters for framework HederaBroadcastConfig. Polling stays disabled by
default; CCIP can set timeout/interval per chain. Bumps
chainlink-framework/chains to framework#108 until merged.
Copilot AI review requested due to automatic review settings July 8, 2026 12:23
@HelloKashif HelloKashif requested review from a team as code owners July 8, 2026 12:23
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-evm

✅ Compatible Changes (2)

pkg/config/toml (1)
  • HederaBroadcastValidationConfig — ➕ Added
pkg/config/toml.Transactions (1)
  • HederaBroadcastValidation — ➕ Added

📄 View full apidiff report

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in TOML configuration block to control Hedera post-broadcast “mined sequence/nonce” polling, and wires the chain-scoped transactions config to expose these settings to TXM (via the bumped chainlink-framework/chains dependency). This is intended to reduce same-nonce spam during Hedera node lag windows while remaining disabled by default.

Changes:

  • Introduces [Transactions.HederaBroadcastValidation] with SequencePollTimeout and SequencePollInterval, including validation and documentation/examples.
  • Exposes HederaSequencePollTimeout/Interval getters on the chain-scoped transactions config (plus test helper stubs and unit tests).
  • Bumps github.com/smartcontractkit/chainlink-framework/chains to a newer pseudo-version (framework#108).

Reviewed changes

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

Show a summary per file
File Description
pkg/txmgr/test_helpers.go Updates test helper config to satisfy new Hedera polling getter methods (returns nil to preserve legacy behavior in tests).
pkg/config/toml/testdata/config-full.toml Adds the new HederaBroadcastValidation section to the “full” TOML fixture.
pkg/config/toml/docs.toml Documents the new TOML section with example values and behavior notes.
pkg/config/toml/defaults/Hedera_Testnet.toml Adds commented example configuration for Hedera testnet defaults.
pkg/config/toml/defaults/Hedera_Mainnet.toml Adds commented example configuration for Hedera mainnet defaults.
pkg/config/toml/config.go Adds HederaBroadcastValidation config struct, validation, and merge (setFrom) wiring under Transactions.
pkg/config/toml/config_test.go Extends defaults/docs alignment tests and full-config expectations for the new config block.
pkg/config/chain_scoped_transactions.go Implements chain-scoped getters returning optional *time.Duration values for TXM consumption.
pkg/config/chain_scoped_transactions_hedera_test.go Adds unit tests for getter behavior and validation rules.
go.mod Bumps chainlink-framework/chains to a newer pseudo-version.
go.sum Records checksums for the bumped chainlink-framework/chains version.

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

Comment thread pkg/config/toml/config.go
}

// HederaBroadcastValidationConfig controls optional post-send mined-nonce polling on Hedera.
// Unset or zero SequencePollTimeout keeps legacy single-check behavior.
Comment thread pkg/config/toml/config.go
Comment on lines +631 to +633
if h.SequencePollInterval != nil && (h.SequencePollTimeout == nil || h.SequencePollTimeout.Duration() <= 0) {
err = multierr.Append(err, commonconfig.ErrMissing{Name: "HederaBroadcastValidation.SequencePollTimeout", Msg: "must be set when SequencePollInterval is set"})
}
Restore chainlink-framework/chains to the published develop version so
go.mod validation passes. Framework#108 must merge before bumping the
dependency to enable Hedera sequence polling at runtime.
Fix docs.toml tag to use exact # Example so config doc generation passes
check-tidy.
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