From 0518b922e737f57d8b07936f7ff5302b36b8624f Mon Sep 17 00:00:00 2001 From: Agustina Aldasoro Date: Thu, 1 Aug 2024 13:45:47 -0300 Subject: [PATCH] Avoid sending already verified signatures when transmitting (#1224) ## Motivation Exec plugin submits reports which do not have their signatures checked on chain. This is to save gas, because signature checking is expensive and executions can only be for committed data which is already authenticated. It is executed using a OCR2 plugin as it handles the turn taking functionality. Gas can be saved by not even submitting the signatures as calldata. Each signature is about 64 bytes and it costs 16 per non-zero byte of calldata. ## Solution In the Exec Provider, configure the Transmitter to skip sending the signatures. The exec provider was modified in https://github.com/smartcontractkit/chainlink/pull/13761 --- core/services/relay/evm/evm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index 73a3aed4a1..fe84949903 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -509,7 +509,7 @@ func (r *Relayer) NewCCIPExecProvider(rargs commontypes.RelayArgs, pargs commont subjectID := chainToUUID(configWatcher.chain.ID()) contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{ subjectID: &subjectID, - }, OCR2AggregatorTransmissionContractABI, WithReportToEthMetadata(fn), WithRetention(0)) + }, OCR2AggregatorTransmissionContractABI, WithReportToEthMetadata(fn), WithRetention(0), WithExcludeSignatures()) if err != nil { return nil, err }