holochain-open-dev / holoom

Tools for weaving blockchain data into holochain
2 stars 1 forks source link

Micro-services fight for signing credentials #58

Open 8e8b2c opened 1 month ago

8e8b2c commented 1 month ago

Launching the various services that attach to the authority agent in unison sometimes fails thus:

webhook-1               | Connecting to holochain admin websocket
webhook-1               | Authorising holochain signing credentials
webhook-1               | internal_error: Attempted to commit a bundle to the source chain, but the source chain head has moved since the bundle began. Bundle head: Some(ActionHash(uhCkk8fmCFQ7vBdiPLz55POx89glTz18QQRje1IeyhzEMQai_nyrN)), Current head: Some(HeadInfo { action: ActionHash(uhCkkitzgg5Vwt70TzOq5OtsGCejNXhaCUm8VIr3j1pTath3qTpeu), seq: 5, timestamp: Timestamp(2024-08-01T08:51:23.665075Z) })
webhook-1               |     at catchError (file:///home/node/node_modules/@holochain/client/lib/api/common.js:37:23)
external-id-attestor-1  | internal_error: Attempted to commit a bundle to the source chain, but the source chain head has moved since the bundle began. Bundle head: Some(ActionHash(uhCkk8fmCFQ7vBdiPLz55POx89glTz18QQRje1IeyhzEMQai_nyrN)), Current head: Some(HeadInfo { action: ActionHash(uhCkkitzgg5Vwt70TzOq5OtsGCejNXhaCUm8VIr3j1pTath3qTpeu), seq: 5, timestamp: Timestamp(2024-08-01T08:51:23.665075Z) })
webhook-1               |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
external-id-attestor-1  |     at catchError (file:///home/node/node_modules/@holochain/client/lib/api/common.js:37:23)
webhook-1               |     at async AdminWebsocket.grantZomeCallCapability (file:///home/node/node_modules/@holochain/client/lib/api/common.js:13:22)
external-id-attestor-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
webhook-1               |     at async AdminWebsocket.grantSigningKey (file:///home/node/node_modules/@holochain/client/lib/api/admin/websocket.js:143:9)
external-id-attestor-1  |     at async AdminWebsocket.grantZomeCallCapability (file:///home/node/node_modules/@holochain/client/lib/api/common.js:13:22)
webhook-1               |     at async AdminWebsocket.authorizeSigningCredentials (file:///home/node/node_modules/@holochain/client/lib/api/admin/websocket.js:168:27)
external-id-attestor-1  |     at async AdminWebsocket.grantSigningKey (file:///home/node/node_modules/@holochain/client/lib/api/admin/websocket.js:143:9)
external-id-attestor-1  |     at async AdminWebsocket.authorizeSigningCredentials (file:///home/node/node_modules/@holochain/client/lib/api/admin/websocket.js:168:27)
external-id-attestor-1  |     at async runExternalIdAttestorFromEnv (file:///home/node/node_modules/@holoom/authority/dist/index.node.js:144:5)

The micro-services need some retry or coordination strategy to address this, else manual restarts are required.

More generally, it would be useful to solve this problem for all commit types that happen not just on launch but in operation too.

8e8b2c commented 1 month ago

Marking as low priority since we're likely to head in a direction where different agents take on different authority responsibilities, and therefore there will likely only be a single micro-service per agent.