Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: read only finalised LogMessageToL2 events #1521

Open
apoorvsadana opened this issue Mar 19, 2024 · 10 comments
Open

bug: read only finalised LogMessageToL2 events #1521

apoorvsadana opened this issue Mar 19, 2024 · 10 comments
Assignees
Labels
bug Something isn't working needed-for-mainnet

Comments

@apoorvsadana
Copy link
Collaborator

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 apoorvsadana added bug Something isn't working needed-for-mainnet labels Mar 19, 2024
@prtk418
Copy link

prtk418 commented Mar 19, 2024

@apoorvsadana Picking this up

@apoorvsadana
Copy link
Collaborator Author

Sure, assgined

@prtk418
Copy link

prtk418 commented Mar 21, 2024

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?

@apoorvsadana
Copy link
Collaborator Author

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?

@prtk418
Copy link

prtk418 commented Mar 21, 2024

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

@prtk418
Copy link

prtk418 commented Mar 22, 2024

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

Copy link

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!

@github-actions github-actions bot added the stale label Apr 22, 2024
@tdelabro
Copy link
Collaborator

tdelabro commented Apr 26, 2024

blocked by #1532 #1528

@github-actions github-actions bot removed the stale label Apr 27, 2024
Copy link

github-actions bot commented Jun 6, 2024

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!

@github-actions github-actions bot added the stale label Jun 6, 2024
@tdelabro
Copy link
Collaborator

tdelabro commented Jun 6, 2024

still blocked

@github-actions github-actions bot removed the stale label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needed-for-mainnet
Projects
None yet
Development

No branches or pull requests

3 participants