0xMiden / 0xMiden/protocol

AggLayer: onchain verification of metadata hash during faucet registration

Abierto
#2,586 0 comentarios 0 reacciones 0 asignados Ver en GitHub
agglayer
Lenguaje dominante
Rust
Estrellas
132
Forks
167
Merge medio
1 d 23 h
PR fusionados (30 d)
110

Descripción

During faucet registration (`register_faucet` in `bridge_config.masm`), the bridge should verify that the faucet's stored `metadata_hash` matches `keccak256(abi.encode(name, symbol, decimals))` computed from the faucet's actual storage values.

Currently the metadata hash is trusted from the faucet deployer with no on-chain verification. A malicious or misconfigured deployer could set an incorrect hash, causing bridge-out claims to fail on the EVM side.

Prerequisites:
- #2585 (token name in faucet storage)
- Implement `abi.encode(string, string, uint8)` in MASM

The verification would:
1. FPI to the faucet to read name, symbol, decimals
2. ABI-encode them in MASM
3. Keccak256 the encoded bytes
4. FPI to the faucet to read the stored metadata hash
5. Assert they match

There is a TODO in `bridge_config.masm::register_faucet` tracking as of PR #2583

Related: #2453

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.