Skip to content

Conversation

@dimriou
Copy link
Contributor

@dimriou dimriou commented Jan 30, 2026

This PR distinguishes the errors returned by the MetaClient from the standard RPC errors and marks as fatal the former. Additionally, it for the RPC errors it now rebroadcasts a past attempt instead of reauctioning.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

⚠️ API Diff Results - Breaking changes detected

📦 Module: github-com-smartcontractkit-chainlink-evm

🔴 Breaking Changes (2)

pkg/txm/clientwrappers/dualbroadcast (2)
  • NewMetaClient — Type changed:
func(
  github.com/smartcontractkit/chainlink-common/pkg/logger.Logger, 
  MetaClientRPC, 
  MetaClientKeystore, 
  *net/url.URL, 
  - *math/big.Int
  + *math/big.Int, 
  + MetaClientTxStore
)
(*MetaClient, error)
  • SelectClient — Type changed:
func(
  github.com/smartcontractkit/chainlink-common/pkg/logger.Logger, 
  github.com/smartcontractkit/chainlink-evm/pkg/client.Client, 
  github.com/smartcontractkit/chainlink-evm/pkg/keys.ChainStore, 
  *net/url.URL, 
  - *math/big.Int
  + *math/big.Int, 
  + MetaClientTxStore
)
(github.com/smartcontractkit/chainlink-evm/pkg/txm.Client, github.com/smartcontractkit/chainlink-evm/pkg/txm.ErrorHandler, error)

📄 View full apidiff report

return a.c.PendingNonceAt(ctx, address)
}

// SendTransactions handles three diffenent cases:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// SendTransactions handles three diffenent cases:
// SendTransactions handles three different cases:

Comment on lines +183 to +204
if !tx.IsPurgeable {
if meta != nil &&
meta.DualBroadcast != nil && *meta.DualBroadcast && meta.DualBroadcastParams != nil && meta.FwdrDestAddress != nil &&
tx.AttemptCount == 1 {
meta, err := a.SendRequest(ctx, tx, attempt, *meta.DualBroadcastParams, tx.ToAddress)
if err != nil {
a.metrics.RecordSendRequestError(ctx)
return fmt.Errorf("error sending request for transactionID(%d): %w", tx.ID, ErrAuction)
}
return nil
if meta != nil {
if err := a.SendOperation(ctx, tx, attempt, *meta); err != nil {
a.metrics.RecordSendOperationError(ctx)
return fmt.Errorf("failed to send operation for transactionID(%d): %w", tx.ID, ErrAuction)
}
return nil
}
a.lggr.Infof("No bids for transactionID(%d): ", tx.ID)
return ErrNoBids
}
if len(tx.Attempts) > 1 {
a.lggr.Infow("Intercepted attempt for tx(rebroadcasting first attempt)", "txID", tx.ID, "attempt", tx.Attempts[0])
return a.c.SendTransaction(ctx, tx.Attempts[0].SignedTransaction)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's me, but I find it hard to reason about this many ifs. Is there any way to make this less indented, maybe through an early return?

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