Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merc 1516 v 1 0 multichain mercury parallel composition with verifier #11789

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/scripts/native_solc_compile_all_llo-feeds
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ compileContract llo-feeds/test/mocks/ExposedVerifier.sol

# Streams
compileContract llo-feeds/dev/ChannelConfigStore.sol
compileContract llo-feeds/dev/ChannelVerifierProxy.sol
compileContract llo-feeds/dev/ChannelVerifier.sol
530 changes: 530 additions & 0 deletions contracts/src/v0.8/llo-feeds/dev/ChannelVerifier.sol

Large diffs are not rendered by default.

50 changes: 0 additions & 50 deletions contracts/src/v0.8/llo-feeds/dev/ChannelVerifierProxy.sol

This file was deleted.

112 changes: 112 additions & 0 deletions contracts/src/v0.8/llo-feeds/dev/interfaces/IChannelVerifier.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol";
import {Common} from "../../libraries/Common.sol";

interface IChannelVerifier is IERC165 {

/**
* @notice Verifies that the data encoded has been signed
* correctly by routing to the correct verifier.
* @param signedReport The encoded data to be verified.
* @param sender The address that requested to verify the contract.
* This is only used for logging purposes.
* @dev Verification is typically only done through the proxy contract so
* we can't just use msg.sender to log the requester as the msg.sender
* contract will always be the proxy.
* @return verifierResponse The encoded verified response.
*/
function verify(bytes calldata signedReport, address sender) external returns (bytes memory verifierResponse);

/**
* @notice sets offchain reporting protocol configuration incl. participating oracles
* @param signers addresses with which oracles sign the reports
* @param offchainTransmitters CSA key for the ith Oracle
* @param f number of faulty oracles the system can tolerate
* @param onchainConfig serialized configuration used by the contract (and possibly oracles)
* @param offchainConfigVersion version number for offchainEncoding schema
* @param offchainConfig serialized configuration used by the oracles exclusively and only passed through the contract
* @param recipientAddressesAndWeights the addresses and weights of all the recipients to receive rewards
*/
function setConfig(
address[] memory signers,
bytes32[] memory offchainTransmitters,
uint8 f,
bytes memory onchainConfig,
uint64 offchainConfigVersion,
bytes memory offchainConfig,
Common.AddressAndWeight[] memory recipientAddressesAndWeights
) external;

/**
* @notice identical to `setConfig` except with args for sourceChainId and sourceAddress
* @param sourceChainId Chain ID of source config
* @param sourceAddress Address of source config Verifier
* @param newConfigCount Param to force the new config count
* @param signers addresses with which oracles sign the reports
* @param offchainTransmitters CSA key for the ith Oracle
* @param f number of faulty oracles the system can tolerate
* @param onchainConfig serialized configuration used by the contract (and possibly oracles)
* @param offchainConfigVersion version number for offchainEncoding schema
* @param offchainConfig serialized configuration used by the oracles exclusively and only passed through the contract
* @param recipientAddressesAndWeights the addresses and weights of all the recipients to receive rewards
*/
function setConfigFromSource(
uint256 sourceChainId,
address sourceAddress,
uint32 newConfigCount,
address[] memory signers,
bytes32[] memory offchainTransmitters,
uint8 f,
bytes memory onchainConfig,
uint64 offchainConfigVersion,
bytes memory offchainConfig,
Common.AddressAndWeight[] memory recipientAddressesAndWeights
) external;

/**
* @notice Activates the configuration for a config digest
* @param configDigest The config digest to activate
* @dev This function can be called by the contract admin to activate a configuration.
*/
function activateConfig(bytes32 configDigest) external;

/**
* @notice Deactivates the configuration for a config digest
* @param configDigest The config digest to deactivate
* @dev This function can be called by the contract admin to deactivate an incorrect configuration.
*/
function deactivateConfig(bytes32 configDigest) external;

/**
* @notice Activates the given feed
* @param feedId Feed ID to activated
* @dev This function can be called by the contract admin to activate a feed
*/
function activateFeed(bytes32 feedId) external;

/**
* @notice Deactivates the given feed
* @param feedId Feed ID to deactivated
* @dev This function can be called by the contract admin to deactivate a feed
*/
function deactivateFeed(bytes32 feedId) external;

/**
* @notice returns the latest config digest and epoch
* @return scanLogs indicates whether to rely on the configDigest and epoch
* returned or whether to scan logs for the Transmitted event instead.
* @return configDigest
* @return epoch
*/
function latestConfigDigestAndEpoch() external view returns (bool scanLogs, bytes32 configDigest, uint32 epoch);

/**
* @notice information about current offchain reporting protocol configuration
* @return configCount ordinal number of current config, out of all configs applied to this contract so far
* @return blockNumber block at which this config was set
* @return configDigest domain-separation tag for current config
*/
function latestConfigDetails() external view returns (uint32 configCount, uint32 blockNumber, bytes32 configDigest);
}

This file was deleted.

Loading
Loading