waku-org / bounties

Community bounties for the waku ecosystem
10 stars 2 forks source link

Benchmark waku in Raspberry Pi #17

Closed alrevuelta closed 4 months ago

alrevuelta commented 9 months ago

Context

Run nwaku in a Raspberry Pi and benchmark it, taking RLN into account. Detects bottlenecks and limitations if any. Write a report with the findings identifying any problems that should be addressed and how viable it is to run in RPi and with which limitations. Provide clear instructions + guide on how it can be installed.


Waku Is Uncompromising Web3 Communication at Scale. A family of robust, censorship-resistant communication protocols, designed to enable privacy-focused messaging for web3 apps.

Disclaimer: Waku is experimental, you may find blocking issues while tacking this bounty. We will prioritize their resolution to unblock you, which means you may have to pause development until done. Thank you for your patience and understanding.

Your participation in this bounty is subject to your acceptance of our terms and conditions. Please see waku-org/bounties#applying-for-a-bounty for details.

Rewards

1000 DAI

Timeframe to Completion

30 days

Application Evaluation

To ensure you are selected for this bounty, provide the following information:

Bounty

Impact

Extend nwaku adoption by allowing people to run it on inexpensive hardware such as Raspberry Pi with minimum effort and clear instructions. Assesses its viability with benchmarks.

Deliverables

Resources

Learn more about Waku at https://docs.waku.org/. Join our Discord to get support at https://discord.waku.org/. nwaku GitHub repo: https://github.com/waku-org/nwaku

Ivansete-status commented 9 months ago

Thanks for creating this @alrevuelta!

IMHO, one deliverable that should be part of this bounty is to have clear steps on how to perform cross-compilation.

I mean, building nwaku the whole night is good but not very handy in the long-term. That is actually what Daniel (Smart NeSt web3-IoT) did at EthGlobal-Istanbul.

It will give a lot of value once we have the cross-compilation made for both go-waku and nwaku.

Therefore, I would add the next two points to the bounty:

( cc @vpavlin )

alrevuelta commented 9 months ago

@Ivansete-status Sure, but go-waku is out of scope.

cortze commented 9 months ago

Hey there, this is Mikel Cortes (@cortze). I've been following the work at Waku for a while, and I'd like to look at this particular bounty. I have a Rasberry Pi 4 with 4GB of memory that has been getting little use lately, so I'll be happy to compile and run Nwaku there. I can create a separate repo to share the compiled binaries and the guide on setting everything up at a fresh RasberryPi OS image.

I'd expect to have this ready over the Xmas break, presenting the report at the beginning of January (around the 8th).

I have research and monitoring experience in the field. I've performed a few measurement studies for IPFS's DHT and Ethereum's related topics; here I leave some relevant past works of mine that give some context:

Let me know if you would be interested and which would be the next move on the bounty.

chair28980 commented 9 months ago

@cortze Thank you for your interest! Please check https://github.com/waku-org/bounties#applying-for-a-bounty

If you are not already please join us in our discord community! https://discord.waku.org

fryorcraken commented 9 months ago

@cortze sounds good. Please apply https://github.com/waku-org/bounties/#applying-for-a-bounty before we can select you.

fryorcraken commented 9 months ago

Bounty assigned to @cortze

@cortze application approved, you can start the work.

fryorcraken commented 9 months ago

@cortze something I am thinking about is that there is no mention of store. I think it may be interested to include running store node on Raspberry pi. However, SQLite is likely to be the preferred engine here. WDYT?

cortze commented 8 months ago

I'm not sure what are you meaning with "store node", do you refer to the DB gathering all the data?

fryorcraken commented 8 months ago

I'm not sure what are you meaning with "store node", do you refer to the DB gathering all the data?

Yes the "store" is the protocol that stores the data in a DB.

vpavlin commented 8 months ago

Btw, I just bought a Raspberry Pi (v4, 8GB RAM) as well, so if you have a build to test (and maybe collect more metrics for your analysis?) let me know:)

cortze commented 8 months ago

I'm not sure what are you meaning with "store node", do you refer to the DB gathering all the data?

Yes the "store" is the protocol that stores the data in a DB.

I see, I thought of using Postgres as the nwaku-compose suggests, but no problem from my side on using SQLite

Btw, I just bought a Raspberry Pi (v4, 8GB RAM) as well, so if you have a build to test (and maybe collect more metrics for your analysis?) let me know:)

There seems not to be any problem compiling the wakunode2 on the Pi, it only takes ~30mins if I use the -j4 flag on the make nwakunode2 command

fryorcraken commented 7 months ago

Hi @cortze, how is it going?

alrevuelta commented 7 months ago

We just synced and @cortze will be finishing the bounty by next week. The only thing left is to stress test RPi with few dozens of RLN msg per second and see how it responds. Gave him some hints on how to achieve this.

cortze commented 6 months ago

@fryorcraken @alrevuelta I made this repository, including all the used files, binaries, figures, and the report's draft.

Let me know what you think about it :)

alrevuelta commented 6 months ago

Great work thanks. Looks great, I would just use a more realistic message size (10kB) and we can close this. Great to see nwaku working well in rpi, with very reasonable proof verification/generation times and a reasonable CPU consumption processing 20/30 msg/sec, which is a significant rate. Hope with 10kB it doesn't change much.

cortze commented 6 months ago

@alrevuelta I've recreated the same tests but with a larger message size, 16KB this time. I've pushed the changes into the repo and updated the report.

All the points in the proposal should be covered, so let me know what you think about it.

alrevuelta commented 6 months ago

@cortze Thanks for your work!

@fryorcraken I consider this bounty as completed, as it meets the deliverables stated in the description. Let me know if you have any concerns.

cortze commented 6 months ago

Any news on the state of the bounty @fryorcraken ?

fryorcraken commented 6 months ago

Any news on the state of the bounty @fryorcraken ?

Transfer in progress. You should see it in the next few days.

cortze commented 6 months ago

Transfer received, @fryorcraken !

alrevuelta commented 4 months ago

Finished, paid, and received. Closing.