Emitting MsgProofs

Set emitMsgProofs to false and reduce gas fees

When the oracle submits a message proof, the relayer and/or anyone monitoring the chain need to get these proofs to check them against application messages. By default, the protocol broadcasts message proofs so that the oracle and other entities can pick up the proofs from on-chain events.

Unfortunately, it costs money to save data (i.e. broadcast events) on blockchains. So, instead of broadcasting events, we can look at the arguments supplied to the function for submitting message proofs. To get message proofs from function call arguments, the monitoring entity (i.e. relayer, disputers, etc) needs to run on infrastructure that supports that; for EVM chains, it needs to be running a node that supports debug traces (learn more here and here).

To save on gas this way, you need to:

  1. Get the address of a relayer that support this functionality, and then

  2. Call updateReceiveModuleConfigs on IEndpoint to set emitMsgProofs to false.

It is important to note that not all relayers will support this on every chain. In fact, depending on the gas costs on particular chains, it may be cheaper to emit events as opposed to running nodes that support debug traces. Ethereum is obviously a perfect candidate to utilize this optimization.

Last updated