-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
A-op-rethRelated to Optimism and op-rethRelated to Optimism and op-rethA-rpcRelated to the RPC implementationRelated to the RPC implementationC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Milestone
Description
Describe the feature
similar to #18371
but in addition to the regular notification:
while let Some(notification) = stream.next().await { |
this should also lookup the flashblocks
TODO
- extract the stream await logic to a standalone helper type
reth/crates/rpc/rpc-eth-api/src/helpers/transaction.rs
Lines 88 to 110 in 424974c
tokio::time::timeout(TIMEOUT_DURATION, async { | |
while let Some(notification) = stream.next().await { | |
let chain = notification.committed(); | |
for block in chain.blocks_iter() { | |
if block.body().contains_transaction(&hash) { | |
if let Some(receipt) = this.transaction_receipt(hash).await? { | |
return Ok(receipt); | |
} | |
} | |
} | |
} | |
Err(Self::Error::from_eth_err(TransactionConfirmationTimeout { | |
hash, | |
duration: TIMEOUT_DURATION, | |
})) | |
}) | |
.await | |
.unwrap_or_else(|_elapsed| { | |
Err(Self::Error::from_eth_err(TransactionConfirmationTimeout { | |
hash, | |
duration: TIMEOUT_DURATION, | |
})) | |
}) |
that operates on stream of blocks instead, this way we can reuse this logic more easily in op-reth
then specialize this endpoint in the opethapi:
impl<N, Rpc> EthTransactions for OpEthApi<N, Rpc> |
using both the canonstream+ a watch stream over the recent flashblocks
Additional context
No response
Metadata
Metadata
Assignees
Labels
A-op-rethRelated to Optimism and op-rethRelated to Optimism and op-rethA-rpcRelated to the RPC implementationRelated to the RPC implementationC-enhancementNew feature or requestNew feature or requestD-good-first-issueNice and easy! A great choice to get startedNice and easy! A great choice to get started
Type
Projects
Status
Backlog