chore: set limit to 5000 to not choke eth1 node and start rln before relay

This commit is contained in:
Richard Ramos 2023-08-24 10:25:17 -04:00 committed by richΛrd
parent 624fe1bb2f
commit ddb08adbbd
3 changed files with 12 additions and 8 deletions

View File

@ -413,6 +413,13 @@ func (w *WakuNode) Start(ctx context.Context) error {
}
}
if w.opts.enableRLN {
err = w.startRlnRelay(ctx)
if err != nil {
return err
}
}
w.relay.SetHost(host)
if w.opts.enableRelay {
@ -492,13 +499,6 @@ func (w *WakuNode) Start(ctx context.Context) error {
}
}
if w.opts.enableRLN {
err = w.startRlnRelay(ctx)
if err != nil {
return err
}
}
return nil
}

View File

@ -24,6 +24,10 @@ func (w *WakuNode) setupRLNRelay() error {
var err error
var groupManager rln.GroupManager
if !w.opts.enableRLN {
return nil
}
if !w.opts.rlnRelayDynamic {
w.log.Info("setting up waku-rln-relay in off-chain mode")

View File

@ -107,7 +107,7 @@ func (gm *DynamicGroupManager) watchNewEvents(ctx context.Context, rlnContract *
}
}
const maxBatchSize = uint64(5000000) // TODO: tune this
const maxBatchSize = uint64(5000)
const additiveFactorMultiplier = 0.10
const multiplicativeDecreaseDivisor = 2