smartcontractkit / ccip

Cross Chain Interoperability Protocol
Other
119 stars 47 forks source link

Standardize message hashing functions #1424

Closed RayXpub closed 1 month ago

RayXpub commented 1 month ago

Motivation

The goal of this PR is to standardize the message hashing functions. Currently we have equivalent but inconsistent message hashing functions:

function _hash(Any2EVMRampMessage memory original, bytes memory onRamp) internal pure returns (bytes32)

and

function _hash(EVM2AnyRampMessage memory original, bytes32 metadataHash) internal pure returns (bytes32)

Solution

Standardize to function _hash(message, metadataHash) and consistently encode dynamic fields.

github-actions[bot] commented 1 month ago

LCOV of commit 62190cf during Solidity Foundry #8163

Summary coverage rate:
  lines......: 97.7% (2203 of 2256 lines)
  functions..: 94.5% (411 of 435 functions)
  branches...: 93.4% (525 of 562 branches)

Files changed coverage rate: n/a
cl-sonarqube-production[bot] commented 1 month ago

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube