Allow setting shorter pollingInterval
for tx receipts + requirements for tx receipt validity
#27221
Labels
pollingInterval
for tx receipts + requirements for tx receipt validity
#27221
This issue is related to #13302 but it also close to a feature request.
Context
I'm experimenting with adding support for inclusion preconfirmations on Ethereum Mainnet using Bolt (Flow docs). In essence, this consists of giving an user a near-instant feedback of successful execution on transactions which cannot fail like transfers (after basic balance checks), for which inclusion is credibly guaranteed by proposers using collateral at a later block.
Why
pollingInterval
and receiptsOne way this could be achieved in MetaMask would be leveraging a shorter
pollingInterval
to ask for a transaction receipt which would be returned by an appropriate RPC aware of this primitive. This is because the wallet knowns already how to update its internal state and display such changes to the user, and the receipt is what's needed in order to show an execution confirmation.Receipts validity
However, one challenge of this is that it requires MetaMask accepting a receipt that isn't completely backed by real data, because
blockHash
,blockNumber
,transactionIndex
,cumulativeGasUsed
cannot be predicted until the block is actually created. At the same time, I'm not sure which of these fields is needed in order to make MetaMask work correctly. I did some attempts and my mocked receipts where rejected, and the tx was shown as still pending.Desiderata
I'd be very grateful to know if it possible to:
pollingInterval
for the transactions receipts -- this would benefit the UX also on rollups as outlined on [Performance Issue]: PollingBlockTracker is instantiated with too high pollingInterval #13302Thanks a lot for the collaboration.
The text was updated successfully, but these errors were encountered: