async _registerNodeOnL2URSM () {
    // Wait until URSM contract has been deployed (for backwards-compatibility)
    let retryTimeoutMs = (this.nodeConfig.get('devMode')) ? 10000 /** 10sec */ : 600000 /* 10min */

    let isInitialized = false
    while (!isInitialized) {
      this.logInfo(`Attempting to init UserReplicaSetManagerClient on ${retryTimeoutMs}ms interval...`)
      try {
        await this.libs.contracts.initUserReplicaSetManagerClient(false)

        if (this.libs.contracts.UserReplicaSetManagerClient) {
          isInitialized = true
          // Short circuit earlier instead of waiting for another timeout and loop iteration
          break
        }

        // Swallow any errors in contract client init
      } catch (e) {
        this.logError(`Error initting UserReplicaSetManagerClient ${e}`)
      }

      await utils.timeout(retryTimeoutMs, false)
    }

    this.URSMRegistrationManager = new URSMRegistrationManager(this.nodeConfig, this.libs)

    // Attempt to register on URSM with infinite retries
    isInitialized = false
    let attempt = 0
    retryTimeoutMs = 10000 // 10sec
    while (!isInitialized) {
      this.logInfo(`Attempting to register node on L2 URSM on ${retryTimeoutMs}ms interval || attempt #${++attempt} ...`)

      try {
        await this.URSMRegistrationManager.run()

        isInitialized = true
        // Short circuit earlier instead of waiting for another timeout and loop iteration
        break

        // Swallow any errors during registration attempt
      } catch (e) {
        this.logError(`RegisterNodeOnL2URSM Error ${e}`)
      }

      await utils.timeout(retryTimeoutMs, false)
    }

    this.logInfo('URSM Registration completed')
  }
/**
   * Wait until URSM contract is deployed, then attempt to register on L2 URSM with infinite retries
   * Requires L1 identity
   */
Wait until URSM contract is deployed, then attempt to register on L2 URSM with infinite retries
Requires L1 identity
Wait until URSM contract is deployed then attempt to register on L2 URSM with infinite retries Requires L1 identity
async _registerNodeOnL2URSM () {
    let retryTimeoutMs = (this.nodeConfig.get('devMode')) ? 10000  : 600000 
    let isInitialized = false
    while (!isInitialized) {
      this.logInfo(`Attempting to init UserReplicaSetManagerClient on ${retryTimeoutMs}ms interval...`)
      try {
        await this.libs.contracts.initUserReplicaSetManagerClient(false)
        if (this.libs.contracts.UserReplicaSetManagerClient) {
          isInitialized = true
          break
        }
      } catch (e) {
        this.logError(`Error initting UserReplicaSetManagerClient ${e}`)
      }
      await utils.timeout(retryTimeoutMs, false)
    }
    this.URSMRegistrationManager = new URSMRegistrationManager(this.nodeConfig, this.libs)
    isInitialized = false
    let attempt = 0
    retryTimeoutMs = 10000 
    while (!isInitialized) {
      this.logInfo(`Attempting to register node on L2 URSM on ${retryTimeoutMs}ms interval || attempt #${++attempt} ...`)
      try {
        await this.URSMRegistrationManager.run()
        isInitialized = true
        break
      } catch (e) {
        this.logError(`RegisterNodeOnL2URSM Error ${e}`)
      }
      await utils.timeout(retryTimeoutMs, false)
    }
    this.logInfo('URSM Registration completed')
  }
async _registerNodeOnL2URSM ( ) { let retryTimeoutMs = ( this . nodeConfig . get ( 'devMode' ) ) ? 10000 : 600000 let isInitialized = false while ( ! isInitialized ) { this . logInfo ( ` ${ retryTimeoutMs } ` ) try { await this . libs . contracts . initUserReplicaSetManagerClient ( false ) if ( this . libs . contracts . UserReplicaSetManagerClient ) { isInitialized = true break } } catch ( e ) { this . logError ( ` ${ e } ` ) } await utils . timeout ( retryTimeoutMs , false ) } this . URSMRegistrationManager = new URSMRegistrationManager ( this . nodeConfig , this . libs ) isInitialized = false let attempt = 0 retryTimeoutMs = 10000 while ( ! isInitialized ) { this . logInfo ( ` ${ retryTimeoutMs } ${ ++ attempt } ` ) try { await this . URSMRegistrationManager . run ( ) isInitialized = true break } catch ( e ) { this . logError ( ` ${ e } ` ) } await utils . timeout ( retryTimeoutMs , false ) } this . logInfo ( 'URSM Registration completed' ) }
Wait until URSM contract is deployed, then attempt to register on L2 URSM with infinite retries
 Requires L1 identity
Wait until URSM contract is deployed then attempt to register on L2 URSM with infinite retries Requires L1 identity
// Wait until URSM contract has been deployed (for backwards-compatibility) /** 10sec */ /* 10min */ // Short circuit earlier instead of waiting for another timeout and loop iteration // Swallow any errors in contract client init // Attempt to register on URSM with infinite retries // 10sec // Short circuit earlier instead of waiting for another timeout and loop iteration // Swallow any errors during registration attempt