js-waku
js-waku copied to clipboard
feat: create helper for running docker locally
Problem
Under harsh network conditions, especially at hackathons, it becomes difficult for a js-waku instance in the browser to connect to a Waku node on the network. It's easier for a user to move forward and build when there is a local instance of nwaku running that js-waku can connect to.
Proposed Solutions
Create an npm script that:
- checks if docker is installed
- pulls the latest stable image of
nwaku
- runs
nwaku
- prints the multiaddr of the node once running
Notes
Proposed solution: similarly to how we use npx @waku/create-app [options]
we can publish npm package so that consumer can spin nwaku docker container with simple command: npx @waku/docker [options]
.
@waku-org/eco-dev your thoughts?
I think that if we are clear about only using this node for development and ideally just making it work without any extra configuration, it sounds good and fits into https://github.com/waku-org/pm/issues/137
2 questions/considerations:
- Should the node be/stay isolated, or attempt to connect to the waku network - in which case it would need to deal with RLN
- Should we ignore RLN on this dev node and risk that the app will not be compatible with the waku network, or push for having some RLN membership set there (think something like hardhat dev accounts on local dev blockchain)
My perspective here is:
- It should stay isolated with option to connect to the network - but in that case you might as well just use default bootstrap.
- Default probably should be without RLN verification but with ability to enable it.
What about RLN? Using ganache or something like that?
Yeah, I think that if we talk about being able to run everything locally, we might need to consider something like Ganache, Hardhat, Foundry to run alongside the docker waku node to make it all self-contained.
I'd also say that once we have the UX for working with RLN in js-waku polished, we should enable it by default, but might be worth to keep it off by default initially
I'd also say that once we have the UX for working with RLN in js-waku polished, we should enable it by default, but might be worth to keep it off by default initially
I expect different APIs to be available.