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

Handle user running lumina-wasm in multiple tabs #215

Open
fl0rek opened this issue Feb 6, 2024 · 0 comments
Open

Handle user running lumina-wasm in multiple tabs #215

fl0rek opened this issue Feb 6, 2024 · 0 comments

Comments

@fl0rek
Copy link
Member

fl0rek commented Feb 6, 2024

Lumina-wasm running in multiple tabs all hit the same store. Since inserting ExtendedHeader is idempotent and atomic, this works, but it basically results in all the running instances racing to get and add the next header.

Should we support running separate lumina instances in separate tabs? Is it beneficial for celestia to have a guy running lumina in 3 tabs on the same browser instead of just a single instance?

If we want to support separate instances, each one should probably have its own separate data store (headers and any future data).

If we want to support single instance, how do we enforce it. There's Broadcast Channel API, that allows inter-tab communication.
In the first pass we could just error, if there's another instance running.
Ultimately, we could have it so each new opened tab, connects to the same lumina-wasm node started previously (running in a web worker?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant