Add opt-in Hedera broadcast sequence polling config#494
Conversation
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.
|
👋 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! |
✅ API Diff Results -
|
There was a problem hiding this comment.
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]withSequencePollTimeoutandSequencePollInterval, including validation and documentation/examples. - Exposes
HederaSequencePollTimeout/Intervalgetters on the chain-scoped transactions config (plus test helper stubs and unit tests). - Bumps
github.com/smartcontractkit/chainlink-framework/chainsto 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.
| } | ||
|
|
||
| // HederaBroadcastValidationConfig controls optional post-send mined-nonce polling on Hedera. | ||
| // Unset or zero SequencePollTimeout keeps legacy single-check behavior. |
| 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.
Summary
[Transactions.HederaBroadcastValidation]TOML config withSequencePollTimeoutandSequencePollIntervalkeys.HederaBroadcastConfiggetters on chain-scoped transactions config so TXM can opt into post-broadcastSequenceAtpolling on Hedera.SequencePollTimeout = '30s',SequencePollInterval = '2s'.chainlink-framework/chainsto framework#108 commit until that PR merges.Depends on: smartcontractkit/chainlink-framework#108
Test plan
go test ./pkg/config/...latestlag window