datahaven/test/utils
Gonza Montiel 733218ac79
fix: 🛡️ Check origin for validator set messages (#343)
### Context
The function `v2_sendMessage()` on Snowbridge Gateway contract is
**permissionless** (I'm shocked this is the design choice). Any
EOA/contract on Ethereum can build a message and send it through our DH
bridge. While we don't change our Snowbridge fork, then this will
continue to be the case.

### Problem
We use `v2_sendMessage()` to send **permissioned** operations to our
chain. For instance: update our validator set message (coming next,
_slashing-related_ messages). So we do need to restrict the processing
of the incoming messages on the Substrate side.

### Fix
- I've added a check to `EigenLayerMessageProcessor` that enforces
`message.origin` to be only a configured `AuthorisedOrigin`.
- I've added an `AuthorisedOrigin` to
`pallet_external_validators::Config`
- I've configured the `AuthorisedOrigin` to be
`DatahavenServiceManagerAddress` in all three runtimes

### Stages
- [x] Implementation
- [x] Runtime integration tests
- [x] Collect `DatahavenServiceManagerAddress` parameter for e2e tests
to work

Fixes https://github.com/datahaven-xyz/sr-datahaven/issues/12

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2025-12-15 14:11:08 +01:00
..
blockscout.ts test: Add E2E Tests (#36) 2025-04-14 16:22:43 -03:00
constants.ts test: port ethereum tests from moonbeam (#278) 2025-11-22 10:02:05 +01:00
contracts.ts test: Update validator set e2e test (#126) 2025-10-02 11:23:40 +00:00
docker.ts test: port ethereum tests from moonbeam (#278) 2025-11-22 10:02:05 +01:00
events.ts test: Update validator set e2e test (#126) 2025-10-02 11:23:40 +00:00
index.ts test: port ethereum tests from moonbeam (#278) 2025-11-22 10:02:05 +01:00
input.ts fix: 🚨 Add error in TS for missing awaits (#81) 2025-05-19 22:28:43 +00:00
kurtosis.ts test: port ethereum tests from moonbeam (#278) 2025-11-22 10:02:05 +01:00
logger.ts feat: Add Polkadot API support to CLI and e2e testing infra (#68) 2025-05-13 03:03:21 +00:00
papi.ts fix: 🚨 Add error in TS for missing awaits (#81) 2025-05-19 22:28:43 +00:00
parameters.ts test: 🏗️ Setup e2e testing framework (#104) 2025-07-16 18:51:07 +02:00
parser.ts feat: Deployment improvements & environmental overrides (#103) 2025-06-26 13:48:33 +02:00
rewards-helpers.ts test: Rewards distribution end to end Tests (#132) 2025-09-17 09:10:54 +00:00
rpc.ts test: Add E2E Tests (#36) 2025-04-14 16:22:43 -03:00
service-mappings.ts test: port ethereum tests from moonbeam (#278) 2025-11-22 10:02:05 +01:00
shell.ts Fix: command cli deploy contracts (#319) 2025-11-27 15:06:04 +01:00
storage.ts test: Update validator set e2e test (#126) 2025-10-02 11:23:40 +00:00
types.ts fix: 🛡️ Check origin for validator set messages (#343) 2025-12-15 14:11:08 +01:00
validators.ts test: Update validator set e2e test (#126) 2025-10-02 11:23:40 +00:00
viem.ts fix: 🚨 Add error in TS for missing awaits (#81) 2025-05-19 22:28:43 +00:00
waits.ts feat: 🚀 Add deploy command to CLI (#87) 2025-06-12 10:24:03 +02:00