Skip to content

Commit

Permalink
Fix CN reconfig + enable entitymanager locally (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
SidSethi authored Jan 11, 2023
1 parent 979c34c commit 97c0a04
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 3 additions & 1 deletion creator-node/compose/env/base.env
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ enforceWriteQuorum=true
recoverOrphanedDataQueueRateLimitInterval=60000 #1min in ms
recoverOrphanedDataQueueRateLimitJobsPerInterval=1
mergePrimaryAndSecondaryEnabled=true
maxNumberSecondsPrimaryRemainsUnhealthy=30
maxNumberSecondsSecondaryRemainsUnhealthy=10

# peerSetManager
peerHealthCheckRequestTimeout=2000 # ms
Expand All @@ -77,7 +79,7 @@ maxBatchClockStatusBatchSize=5
reconfigSPIdBlacklistString=

entityManagerAddress=0x5b9b42d6e4B2e4Bf8d42Eba32D46918e10899B66
entityManagerReplicaSetEnabled=false
entityManagerReplicaSetEnabled=true

# Premium content
premiumContentEnabled=true
1 change: 1 addition & 0 deletions creator-node/src/monitors/MonitoringQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class MonitoringQueue {

/**
* Refresh monitor in redis and prometheus (if integer)
* @notice throws Error on failure to refresh
* @param {Object} monitorProps Object containing the monitor props like { func, ttl, type, name }
* @param {*} monitorKey name of the monitor eg `THIRTY_DAY_ROLLING_SYNC_SUCCESS_COUNT`
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,9 @@ const _issueUpdateReplicaSetOp = async (
if (!audiusLibs) {
tracing.info('init AudiusLibs')
audiusLibs = await initAudiusLibs({
enableEthContracts: false,
enableEthContracts: true,
enableContracts: true,
enableDiscovery: false,
enableDiscovery: true,
enableIdentity: true,
logger
})
Expand Down Expand Up @@ -718,9 +718,9 @@ const _issueUpdateReplicaSetOp = async (
newReplicaSetSPIds,
blockNumber
)
} catch (err) {
} catch (err: any) {
throw new Error(
`[_issueUpdateReplicaSetOp] waitForReplicaSetDiscovery Indexing Unable to confirm updated replica set for user ${userId}`
`[_issueUpdateReplicaSetOp] waitForReplicaSetDiscovery Indexing Unable to confirm updated replica set for user ${userId}. Error: ${err.message}`
)
}

Expand All @@ -732,7 +732,7 @@ const _issueUpdateReplicaSetOp = async (
)
} catch (e: any) {
throw new Error(
`UserReplicaSetManagerClient._updateReplicaSet() Failed in ${
`[_issueUpdateReplicaSetOp] _updateReplicaSet Failed in ${
Date.now() - startTimeMs
}ms - Error ${e.message}`
)
Expand Down
3 changes: 3 additions & 0 deletions dev-tools/commands/src/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const initializeAudiusLibs = async (handle) => {
web3Config: AudiusLibs.configInternalWeb3(
process.env.POA_REGISTRY_ADDRESS,
process.env.POA_PROVIDER_URL,
null,
process.env.ENTITY_MANAGER_ADDRESS
),
solanaWeb3Config: AudiusLibs.configSolanaWeb3({
solanaClusterEndpoint: process.env.SOLANA_ENDPOINT,
Expand Down Expand Up @@ -66,6 +68,7 @@ export const initializeAudiusSdk = async () => {
web3Config: AudiusLibs.configInternalWeb3(
process.env.POA_REGISTRY_ADDRESS,
process.env.POA_PROVIDER_URL,
process.env.ENTITY_MANAGER_ADDRESS
),
});
}
Expand Down
2 changes: 1 addition & 1 deletion identity-service/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ const config = convict({
doc: 'Enable replica set updates with Entity Manager',
format: Boolean,
env: 'entityManagerReplicaSetEnabled',
default: false
default: true
},
updateReplicaSetReconfigurationLimit: {
doc: 'The limit of the replica set reconfiguration transactions that we will relay in 10 seconds. This limit is per cluster worker, not service wide',
Expand Down

0 comments on commit 97c0a04

Please sign in to comment.