feat: comment out older onchain GM put it new GM

This commit is contained in:
darshankabariya 2025-03-19 15:38:10 +05:30
parent b736f419ff
commit 3e33d3803c
2 changed files with 876 additions and 405 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12,17 +12,6 @@ import
logScope:
topics = "waku rln_relay onchain_sync_group_manager"
type OnchainSyncGroupManager* = ref object of GroupManager
ethClientUrl*: string
ethContractAddress*: string
ethRpc*: Option[Web3]
wakuRlnContract*: Option[WakuRlnContractWithSender]
chainId*: uint
keystorePath*: Option[string]
keystorePassword*: Option[string]
registrationHandler*: Option[RegistrationHandler]
validRootBuffer*: Deque[MerkleNode]
# using the when predicate does not work within the contract macro, hence need to dupe
contract(WakuRlnContract):
# this serves as an entrypoint into the rln membership set
@ -44,6 +33,17 @@ contract(WakuRlnContract):
# this function returns the Merkle root
proc root(): Uint256 {.view.}
type OnchainSyncGroupManager* = ref object of GroupManager
ethClientUrl*: string
ethContractAddress*: string
ethRpc*: Option[Web3]
wakuRlnContract*: Option[WakuRlnContractWithSender]
chainId*: uint
keystorePath*: Option[string]
keystorePassword*: Option[string]
registrationHandler*: Option[RegistrationHandler]
validRootBuffer*: Deque[MerkleNode]
proc fetchMerkleProof*(g: OnchainSyncGroupManager) {.async.} =
let index = stuint(g.membershipIndex.get(), 256)
try:
@ -414,4 +414,4 @@ method init*(g: OnchainSyncGroupManager): Future[GroupManagerResult[void]] {.asy
waku_rln_number_registered_memberships.set(int64(g.rlnInstance.leavesSet()))
g.initialized = true
return ok()
return ok()