Skip to content

BaseTrigger Max Retries, send backoffs, and Pre-Ack Handling#1969

Open
DylanTinianov wants to merge 28 commits intomainfrom
CRE-3248-basetrigger-attempts-max
Open

BaseTrigger Max Retries, send backoffs, and Pre-Ack Handling#1969
DylanTinianov wants to merge 28 commits intomainfrom
CRE-3248-basetrigger-attempts-max

Conversation

@DylanTinianov
Copy link
Copy Markdown
Contributor

@DylanTinianov DylanTinianov commented Apr 7, 2026

  • Adds max retries to base trigger along with DB pruning loop for cleanup.
  • Adds pre-ACK cache for slow nodes which receive an ACK before even seeing the trigger event
  • Fixes race condition on ACK during event Delivery
  • Adds backoffs + jitter to sending to prevent hiting rate limits

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (1)

pkg/capabilities.BaseTriggerMetrics (1)
  • IncStoppedResending — ➕ Added

✅ Compatible Changes (4)

pkg/capabilities.(*BaseTriggerBeholderMetrics) (1)
  • IncStoppedResending — ➕ Added
pkg/settings/cresettings.Schema (3)
  • BaseTriggerMaxRetries — ➕ Added

  • BaseTriggerMaxSendsPerTick — ➕ Added

  • BaseTriggerPruneAge — ➕ Added


📄 View full apidiff report

@DylanTinianov DylanTinianov changed the title Implement max retries BaseTrigger Max Retries Apr 7, 2026
@DylanTinianov DylanTinianov marked this pull request as ready for review April 7, 2026 15:55
@DylanTinianov DylanTinianov requested a review from a team as a code owner April 7, 2026 15:55
Comment thread pkg/capabilities/base_trigger.go Outdated
Comment thread pkg/capabilities/base_trigger_metrics.go Outdated
Comment thread pkg/capabilities/base_trigger.go Outdated
Comment thread pkg/capabilities/base_trigger.go Outdated
Comment thread pkg/capabilities/base_trigger.go Outdated
Comment thread pkg/capabilities/base_trigger.go Outdated
}
cutoff := time.Now().Add(-age)

recs, err := b.store.List(b.ctx)
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.

it might be better to have a query just to hit the DB asking for events which have been modified recently, and potentially also parameterize the maxAttempts to it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This can be another clean up PR since this changes the interface and will need to be propagated through

Comment thread pkg/capabilities/base_trigger.go Outdated
@DylanTinianov DylanTinianov changed the title BaseTrigger Max Retries BaseTrigger Max Retries + Pre-Ack Handling Apr 7, 2026
…ontractkit/chainlink-common into CRE-3248-basetrigger-attempts-max
@DylanTinianov DylanTinianov changed the title BaseTrigger Max Retries + Pre-Ack Handling BaseTrigger Max Retries, send backoffs, and Pre-Ack Handling Apr 13, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: acf3ecf Previous: 79eab54 Ratio
BenchmarkKeystore_Sign/nop/in-process 749.5 ns/op 354.9 ns/op 2.11

This comment was automatically generated by workflow using github-action-benchmark.

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