-
Notifications
You must be signed in to change notification settings - Fork 53
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
chore: remove rln epoch hardcoding #2483
Conversation
This PR may contain changes to configuration options of one of the apps. If you are introducing a breaking change (i.e. the set of options in latest release would no longer be applicable) make sure the original option is preserved with a deprecation note for 2 following releases before it is actually removed. Please also make sure the label |
@@ -546,6 +548,7 @@ when isMainModule: | |||
rlnRelayCredPath: "", | |||
rlnRelayCredPassword: "", | |||
rlnRelayTreePath: conf.rlnRelayTreePath, | |||
rlnEpochSizeSec: conf.rlnEpochSizeSec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vpavlin if you can have a look just in case.
You can find the image built from this PR at
Built from 3e691c7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is a required feature, are there any applications who want to use a larger epoch size?
@rymnc well, at some point us? With rln v2 epoch size would have to be greater than 1. And if someone else wants to deploy a network with a different configuration, then this would be interesting. Adding it for completeness as well, because right now you can configure the rlnv2 message limit but not the epoch size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks so much!
Added minor comments. We should probably address the failed test. Taking a look at it
apps/chat2/config_chat2.nim
Outdated
@@ -272,6 +272,11 @@ type | |||
defaultValue: 1, | |||
name: "rln-relay-user-message-limit" .}: uint64 | |||
|
|||
rlnEpochSizeSec* {. | |||
desc: "Epoch size in second used to rate limit RLN memberships. Default is 1 second.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super mega nitpick
desc: "Epoch size in second used to rate limit RLN memberships. Default is 1 second.", | |
desc: "Epoch size in seconds used to rate limit RLN memberships. Default is 1 second.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! fixed 857810d
@@ -494,6 +494,8 @@ when isMainModule: | |||
conf.pubsubTopics = twnClusterConf.pubsubTopics | |||
conf.rlnRelayDynamic = twnClusterConf.rlnRelayDynamic | |||
conf.rlnRelayEthContractAddress = twnClusterConf.rlnRelayEthContractAddress | |||
conf.rlnEpochSizeSec = twnClusterConf.rlnEpochSizeSec | |||
conf.rlnRelayUserMessageLimit: twnClusterConf.rlnRelayUserMessageLimit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be like this?
conf.rlnRelayUserMessageLimit: twnClusterConf.rlnRelayUserMessageLimit | |
conf.rlnRelayUserMessageLimit = twnClusterConf.rlnRelayUserMessageLimit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks fixed! 3932fe2
Ok so the failed test is because we need to add |
EpochUnitSeconds
and allows configuring it viarln-relay-epoch-sec
.