Skip to content

Commit

Permalink
Merge branch 'improve_signal_service_and_multihop' into flex_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Feb 14, 2024
2 parents 0ef47b4 + 4ac4c0e commit 49fac81
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Non-package scopes explained:
# - repo: The repository itself (not a specific package)
# - main: For release-please PRs
# - deps: For dependabot dependency update PRs
# - deps-dev: For dependabot devDependency update PRs
scopes: |
repo
main
deps
deps-dev
branding
bridge-ui-v2
eventindexer
Expand Down
7 changes: 3 additions & 4 deletions packages/protocol/contracts/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ contract Bridge is EssentialContract, IBridge {
/// @param signal The signal.
/// @param chainId The ID of the chain the signal is stored on
/// @param proof The merkle inclusion proof.
/// @return True if the message was received.
/// @return success True if the message was received.
function _proveSignalReceived(
address signalService,
bytes32 signal,
Expand All @@ -584,13 +584,12 @@ contract Bridge is EssentialContract, IBridge {
)
private
view
returns (bool)
returns (bool success)
{
bytes memory data = abi.encodeCall(
ISignalService.proveSignalReceived,
(chainId, resolve(chainId, "bridge", false), signal, proof)
);
(bool success, bytes memory ret) = signalService.staticcall(data);
return success ? abi.decode(ret, (bool)) : false;
(success,) = signalService.staticcall(data);
}
}
4 changes: 1 addition & 3 deletions packages/protocol/contracts/signal/ISignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ interface ISignalService {
/// @param signal The signal (message) to send.
/// @param proof Merkle proof that the signal was persisted on the
/// source chain.
/// @return True if the signal has been received, otherwise false.
function proveSignalReceived(
uint64 chainId,
address app,
bytes32 signal,
bytes calldata proof
)
external
returns (bool);
external;

/// @notice Verifies if a particular signal has already been sent.
/// @param app The address that initiated the signal.
Expand Down
2 changes: 0 additions & 2 deletions packages/protocol/contracts/signal/SignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ contract SignalService is EssentialContract, ISignalService {
)
public
virtual
returns (bool)
{
if (app == address(0) || signal == 0) revert SS_INVALID_PARAMS();

Expand Down Expand Up @@ -129,7 +128,6 @@ contract SignalService is EssentialContract, ISignalService {
}

if (!isSignalSent(_app, _signal)) revert SS_LOCAL_CHAIN_DATA_NOT_FOUND();
return true;
}

/// @inheritdoc ISignalService
Expand Down
5 changes: 1 addition & 4 deletions packages/protocol/test/HelperContracts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ contract SkipProofCheckSignal is SignalService {
public
pure
override
returns (bool)
{
return true;
}
{ }
}

contract DummyCrossChainSync is EssentialContract, ICrossChainSync {
Expand Down

0 comments on commit 49fac81

Please sign in to comment.