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

test: Spammer #2821

Draft
wants to merge 5 commits into
base: rlnv2-only
Choose a base branch
from
Draft

test: Spammer #2821

wants to merge 5 commits into from

Conversation

vpavlin
Copy link
Member

@vpavlin vpavlin commented Jun 18, 2024

DO NOT MERGE!

Description

This adds a simple async loop which publishes a message in a given interval.

It is based on #2759 and attempts to make minimal changes.

Changes

  • adds extra config options
  • adds async loop publishing messages
  • automatically registers a new membership on start

@vpavlin vpavlin requested a review from alrevuelta June 18, 2024 13:36
@vpavlin vpavlin marked this pull request as draft June 18, 2024 13:36
@vpavlin vpavlin changed the title WIP: Spammer test: Spammer Jun 18, 2024
Copy link

github-actions bot commented Jun 18, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2821-rln-v2

Built from e3b260a

Copy link

github-actions bot commented Jun 18, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2821-rln-v1

Built from e3b260a

@alrevuelta alrevuelta changed the base branch from master to rlnv2-only June 19, 2024 13:34
Copy link
Contributor

@alrevuelta alrevuelta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not to be merged but lgtm thanks. very useful for testing.

var i: uint64 = 0
var start = getTime().toUnixFloat()

while i < conf.rlnRelayUserMessageLimit:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe i not needed?
and here
for i in conf.rlnRelayUserMessageLimit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not how Nim works:-P There is a function I could use to turn the msg limit into iterator, but I am not sure it is worth searching for it:D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah my bad. gues for i in 0..<conf.rlnRelayUserMessageLimit
no big deal tho

error "RLN not configured!"
quit(QuitFailure)

var gotPeers = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotPeers not needed?
while true:
if xx:
break

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough:) fixed:)

Copy link

github-actions bot commented Jun 20, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2821

Built from 33c52f6

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

Successfully merging this pull request may close these issues.

3 participants