To add support for the starknet_getMessagesStatus method (https://github.com/starkware-libs/starknet-specs/pull/223) we'd need to revamp our Ethereum client. We need access to events, both for getting historical stuff and ideally a Websocket subscription too so that we don't have to poll.
The idea is that using alloy we would fetch the relevant Ethereum logs from the Starknet core contract and store the Ethereum tx hash -> message association in our database (maybe using the message hash?). We would then use that association when syncing L1 handler transactions to store the Starknet transaction hash associated with the Ethereum transaction hash.
To add support for the
starknet_getMessagesStatus
method (https://github.com/starkware-libs/starknet-specs/pull/223) we'd need to revamp our Ethereum client. We need access to events, both for getting historical stuff and ideally a Websocket subscription too so that we don't have to poll.I've done some research using alloy and its API seems to be OK: https://github.com/eqlabs/pathfinder/compare/main...krisztian/poc-associate-l1-tx-with-l2-tx
The idea is that using
alloy
we would fetch the relevant Ethereum logs from the Starknet core contract and store the Ethereum tx hash -> message association in our database (maybe using the message hash?). We would then use that association when syncing L1 handler transactions to store the Starknet transaction hash associated with the Ethereum transaction hash.