You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The approach we take now for the eth indexer is every 5 second, we call the RPC to get the latest block and process it.
This approach may have the issue that there will always be delay for the user who initiates the sign request because we do not call RPC at the exact block time that the sign request comes in.
subscription will make sure we receive the latest block/log once it appears on eth side. I've not seen complaints about the subscribed stream being delayed, but it is a possibility.
In terms of pricing, I've only looked into Infura's pricing so far:
subcription is 300 credits/block
getting latest block (eth_getBlockByNumber) is 80 credits
getting latest block number (eth_getBlockNumber) is 80 credits
For infura costs are comparable, but not sure about other providers.
The text was updated successfully, but these errors were encountered:
This is a great idea! Looking at the approach you proposed, the docs says eth_subscribe can subscribe to new logs instead of blocks, so it will cost 300 credit only when there is a new sign request that will be very cheap and we can even use a free plan.
Theoratically we only need sign requests instead of latest block number, but if we do want block number, eth_subscribe to newHead (get notified each new block added to chain) is 5 credit. Eth sepolia block time is 12 seconds, so this is also much cheaper than current implementation
the docs says eth_subscribe can subscribe to new logs instead of blocks
Yes, but their pricing still indicates that they charge per block tho by the following: "The credit costs for the logs and newHeads events are charged per block, whereas newPendingTransaction events are charged at approximately one second intervals."
Still, the benefit is no delay in processing requests in a block once logs show up.
80% done implementing it, but hardhat node web socket connection drops after a while locally. This is a common and known issue in the community. People reported that when they use Infura or Alchemy's websocket urls, this issue never happens. I'll try infura on our testnet contract to verify.
ppca
linked a pull request
Jan 22, 2025
that will
close
this issue
The approach we take now for the eth indexer is every 5 second, we call the RPC to get the latest block and process it.
This approach may have the issue that there will always be delay for the user who initiates the sign request because we do not call RPC at the exact block time that the sign request comes in.
subscription will make sure we receive the latest block/log once it appears on eth side. I've not seen complaints about the subscribed stream being delayed, but it is a possibility.
In terms of pricing, I've only looked into Infura's pricing so far:
For infura costs are comparable, but not sure about other providers.
The text was updated successfully, but these errors were encountered: