madara
madara copied to clipboard
bug: read only finalised `LogMessageToL2` events
Currently, if I understand it correctly, Madara reads events instantly from the L1 even if they arne't finalised. First, we need to confirm this is the case. If it yes, we need to change this so that only finalised events are read.
@apoorvsadana Picking this up
Sure, assgined
Yes, right now Madara starts processing immediately as it receives events. Confirmed by checking code and logging L1 current block number and block number at which event was dispatched, both are same - meaning waiting for block confirmations are not in place.
Approach we could take is - instead of streaming events, we can watch for new blocks. On every new block production we can iterate through events of latest_block - block_confirmation
block and process them
@apoorvsadana what do you think?
How will you watch for new blocks @prtk418? @tdelabro, are you aware how many blocks does Starknet wait for currently before it reads a message, is it 2 epochs?
How will you watch for new blocks @prtk418? @tdelabro, are you aware how many blocks does Starknet wait for currently before it reads a message, is it 2 epochs?
Similar to stream_with_meta
for events we have watch_blocks
in ethers that we can use for watching blocks. Ref - https://docs.rs/ethers/latest/ethers/middleware/trait.Middleware.html#method.watch_blocks
As discussed with @apoorvsadana , its better to rely on rpc to tell us finalized blocks to be 100% deterministic and efficient. Will come back to this once we migrate to alloy
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
blocked by #1532 #1528
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
still blocked
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
repository archived in favor of https://github.com/madara-alliance/madara