Modifier `onlyFromNamed("taiko")` is applied incorrectly assuming there is only one "taiko" address on a chain, thus breaking AssignmentHook::onBlockProposed() and SgxVerifier::verifyProof()
Audit: 2024-03-taiko-findings
Severity: HIGH

# Lines of code

https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/L1/hooks/AssignmentHook.sol#L70
https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/verifiers/SgxVerifier.sol#L145


# Vulnerability details

## Summary
In a [similar PR](https://github.com/taikoxyz/taiko-mono/pull/15807) in February, it was observed that the protocol cannot assume that only one "taiko" address exists on a particular chain, and hence `onlyFromNamed("taiko")` modifier shouldn't be used in Signal Service. Although [that was fixed](https://github.com/taikoxyz/taiko-mono/commit/a652ae8dc0108e2799a449cce4e5f795f87908a1#diff-d764a5c346ea985003ec5db284de6cac04816c864998addb01f2ed2b653ccec4), the same issue still persists in [AssignmentHook::onBlockProposed()](https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/L1/hooks/AssignmentHook.sol#L70) and [SgxVerifier::verifyProof()](https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/verifiers/SgxVerifier.sol#L145).

## Description
```js
  File: contracts/L1/hooks/AssignmentHook.sol

  62:               function onBlockProposed(
  63:                   TaikoData.Block memory _blk,
  64:                   TaikoData.BlockMetadata memory _meta,
  65:                   bytes memory _data
  66:               )
  67:                   external
  68:                   payable
  69:                   nonReentrant
  70:  @--->            onlyFromNamed("taiko")
  71:               {
```

and

```js
  File: contracts/verifiers/SgxVerifier.sol

  139:              function verifyProof(
  140:                  Context calldata _ctx,
  141:                  TaikoData.Transition calldata _tran,
  142:                  TaikoData.TierProof calldata _proof
  143:              )
  144:                  external
  145: @--->            onlyFromNamed("taiko")
  146:              {
```

Although the current tests are setup with [only one relayer on L1](https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/test/L1/TaikoL1TestBase.sol#L112) and [L2](https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/test/L1/TaikoL1TestBase.sol#L118) each and are named "taiko", in production this might not be always true. Multiple relayers could be registered under different names and we need to ensure a relayer is authorized if they are calling [AssignmentHook::onBlockProposed()](https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/L1/hooks/AssignmentHook.sol#L70) or [SgxVerifier::verifyProof()](https://github.com/code-423n4/2024-03-taiko/blob/main/packages/protocol/contracts/verifiers/SgxVerifier.sol#L145).

As per current logic, other relayers will not be able to access these functions, hence breaking major functionality like not being able to verify a proof or assign a block.

## Additional Impact
[SgxVerifier.sol::getSignedHash()](https://github.com/code-423n4/2024-03-taiko/blob