mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 00:43:06 +00:00
chore(rln-relay): updated metrics for testnet 3 (#1744)
* fix(rln-relay): trace log * chore(rln-relay): updated metrics for testnet 3 fix(rln-relay): group manager metric import
This commit is contained in:
parent
905603eff7
commit
16e6be274a
@ -1,5 +1,6 @@
|
||||
import
|
||||
../protocol_types,
|
||||
../protocol_metrics,
|
||||
../constants,
|
||||
../rln
|
||||
import
|
||||
@ -13,6 +14,7 @@ export
|
||||
chronos,
|
||||
results,
|
||||
protocol_types,
|
||||
protocol_metrics,
|
||||
deques
|
||||
|
||||
# This module contains the GroupManager interface
|
||||
@ -148,6 +150,7 @@ method generateProof*(g: GroupManager,
|
||||
return err("identity credentials are not set")
|
||||
if g.membershipIndex.isNone():
|
||||
return err("membership index is not set")
|
||||
waku_rln_proof_generation_duration_seconds.nanosecondTime:
|
||||
let proofGenRes = proofGen(rlnInstance = g.rlnInstance,
|
||||
data = data,
|
||||
memKeys = g.idCredentials.get(),
|
||||
|
||||
@ -75,6 +75,7 @@ method atomicBatch*(g: OnchainGroupManager,
|
||||
initializedGuard(g)
|
||||
|
||||
let startIndex = g.latestIndex
|
||||
waku_rln_membership_insertion_duration_seconds.nanosecondTime:
|
||||
let operationSuccess = g.rlnInstance.atomicWrite(some(startIndex), idCommitments, toRemoveIndices)
|
||||
if not operationSuccess:
|
||||
raise newException(ValueError, "atomic batch operation failed")
|
||||
@ -371,6 +372,7 @@ method startGroupSync*(g: OnchainGroupManager): Future[void] {.async.} =
|
||||
g.idCredentials = some(idCredential)
|
||||
|
||||
debug "registering commitment on contract"
|
||||
waku_rln_registration_duration_seconds.nanosecondTime:
|
||||
await g.register(idCredential)
|
||||
if g.registrationHandler.isSome():
|
||||
# We need to callback with the tx hash
|
||||
@ -427,6 +429,7 @@ method init*(g: OnchainGroupManager): Future[void] {.async.} =
|
||||
g.membershipFee = some(membershipFee)
|
||||
|
||||
if g.keystorePath.isSome() and g.keystorePassword.isSome():
|
||||
waku_rln_membership_credentials_import_duration_seconds.nanosecondTime:
|
||||
let parsedCredsRes = getMembershipCredentials(path = g.keystorePath.get(),
|
||||
password = g.keystorePassword.get(),
|
||||
filterMembershipContracts = @[MembershipContract(chainId: $chainId,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user