Skip to content

Conversation

@ygrishajev
Copy link
Contributor

@ygrishajev ygrishajev commented Oct 23, 2025

closes #2091

Summary by CodeRabbit

  • New Features

    • HTTP SDK adds getMeta to fetch and validate network metadata (including recommended version).
  • Refactor

    • Routing streamlined: duplicate/obsolete version route and handler removed.
  • Breaking Changes

    • API no longer exposes a public version endpoint.
  • Chores

    • Network data generation now sources and validates meta.json.
    • Added schema validation tooling (zod) as a dev dependency.
  • Tests

    • Version endpoint tests removed.

@ygrishajev ygrishajev requested a review from a team as a code owner October 23, 2025 10:22
@codecov
Copy link

codecov bot commented Oct 23, 2025

❌ 49 Tests Failed:

Tests completed Failed Passed Skipped
1457 49 1408 0
View the top 3 failed test(s) by shortest run time
Addresses API GET /v1/addresses/{address}/deployments/{skip}/{limit} returns 400 when limit is not a number
Stack Traces | 0.031s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:198:27)
Addresses API GET /v1/addresses/{address}/deployments/{skip}/{limit} returns 400 when skip is not a number
Stack Traces | 0.031s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:190:27)
Addresses API GET /v1/addresses/{address}/deployments/{skip}/{limit} returns 400 when status is not active or closed
Stack Traces | 0.034s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:206:27)
Addresses API GET /v1/addresses/{address}/deployments/{skip}/{limit} returns 400 when address is not a valid akash address
Stack Traces | 0.037s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:182:7)
Addresses API GET /v1/addresses/{address}/deployments/{skip}/{limit} returns paginated deployments for an address
Stack Traces | 0.037s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:165:27)
Addresses API GET /v1/addresses/{address}/transactions/{skip}/{limit} returns paginated transactions for an address
Stack Traces | 0.037s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:119:41)
Addresses API GET /v1/addresses/{address} returns 400 when address is not a valid akash address
Stack Traces | 0.039s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:109:7)
Addresses API GET /v1/addresses/{address}/transactions/{skip}/{limit} returns 400 when limit is not a number
Stack Traces | 0.045s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:155:27)
Addresses API GET /v1/addresses/{address}/transactions/{skip}/{limit} returns 400 when address is not a valid akash address
Stack Traces | 0.047s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:139:7)
Addresses API GET /v1/addresses/{address}/transactions/{skip}/{limit} returns 400 when skip is not a number
Stack Traces | 0.053s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:147:27)
HTTP Tools functional validation should succeed with valid request and response
Stack Traces | 0.069s run time
Error: expect(received).toBe(expected) // Object.is equality

Expected: 201
Received: 400
    at Object.<anonymous> (.../test/functional/http-tools.spec.ts:27:26)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
Addresses API GET /v1/addresses/{address} returns address information
Stack Traces | 0.201s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at Function.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:356:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:47:53)
Deployment Settings GET /v1/deployment-settings/{userId}/{dseq} should return deployment settings if found
Stack Traces | 1.76s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys DELETE /v1/api-keys/{id} should delete API key
Stack Traces | 1.8s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings GET /v1/deployment-settings/{userId}/{dseq} should return 404 when accessing other user's deployment settings
Stack Traces | 1.81s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings PATCH /v1/deployment-settings/{userId}/{dseq} should return 404 when updating other user's deployment settings
Stack Traces | 1.82s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings POST /v1/deployment-settings should return 403 when creating deployment settings for another user
Stack Traces | 1.82s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings POST /v1/deployment-settings should create deployment settings
Stack Traces | 1.83s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys PATCH /v1/api-keys/{id} should update API key
Stack Traces | 1.84s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
User Init POST /user/tokenInfo should resolve with existing user without transferring anonymous wallet
Stack Traces | 1.85s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys GET /v1/api-keys/{id} should return API key details with obfuscated key
Stack Traces | 1.89s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys GET /v1/api-keys should not return other user's API keys
Stack Traces | 1.92s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Balances should return 404 when user wallet is not found
Stack Traces | 1.97s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Balances should get balances for a specific address
Stack Traces | 2s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys GET /v1/api-keys/{id} should return 404 if API key not found
Stack Traces | 2.07s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys GET /v1/api-keys should return list of API keys with obfuscated keys
Stack Traces | 2.1s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings PATCH /v1/deployment-settings/{userId}/{dseq} should create and return new setting if not found
Stack Traces | 2.15s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Tx Sign POST /v1/tx should throw 401 provided no auth header
Stack Traces | 2.17s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys POST /v1/api-keys should reject API key creation for trial users
Stack Traces | 2.19s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Tx Sign POST /v1/tx should throw 404 provided a different user auth header
Stack Traces | 2.2s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys POST /v1/api-keys should reject API key creation with past expiration date
Stack Traces | 2.22s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings PATCH /v1/deployment-settings/{userId}/{dseq} should update deployment settings
Stack Traces | 2.26s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Stripe webhook POST /v1/stripe-webhook tops up wallet and drops session from cache for event checkout.session.async_payment_succeeded
Stack Traces | 2.27s run time
Error: expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500
    at Object.<anonymous> (.../test/functional/stripe-webhook.spec.ts:89:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
API Keys POST /v1/api-keys should create API key and return full key once
Stack Traces | 2.28s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
API Keys GET /v1/api-keys should return empty array if no API keys found
Stack Traces | 2.42s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Deployment Settings GET /v1/deployment-settings/{userId}/{dseq} should return a new deployment setting if not found
Stack Traces | 2.46s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Balances should get balances for the current user
Stack Traces | 2.49s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
User Init POST /user/tokenInfo should resolve with existing user and transfer anonymous wallet
Stack Traces | 2.75s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Stripe webhook POST /v1/stripe-webhook tops up wallet and drops session from cache for event checkout.session.completed
Stack Traces | 3.05s run time
Error: expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500
    at Object.<anonymous> (.../test/functional/stripe-webhook.spec.ts:89:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
Certificate API POST /v1/certificate/create creates a certificate for the authenticated user
Stack Traces | 3.05s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Wallets Refill console refill-wallets should refill wallets low on fee allowance
Stack Traces | 3.29s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Tx Sign POST /v1/tx should create a deployment for a user
Stack Traces | 3.46s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Tx Sign POST /v1/tx should create a wallet for a user
Stack Traces | 3.7s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Users stale anonymous users cleanup should remove anonymous users inactive for defined period
Stack Traces | 10.1s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
View the full list of 7 ❄️ flaky test(s)
Bids API GET /v1/bids/:dseq should respond with bids list

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 3.57s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Bids API GET /v1/bids?dseq=:dseq should respond with bids list

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 2.22s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Managed Wallet API Deployment Flow should execute a full deployment cycle with provider JWT auth

Flake rate in main: 73.08% (Passed 7 times, Failed 19 times)

Stack Traces | 2.22s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59807': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Managed Wallet API Deployment Flow should execute a full deployment cycle with provider mTLS auth

Flake rate in main: 73.08% (Passed 7 times, Failed 19 times)

Stack Traces | 3.3s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
Managed Wallet API Deployment Flow should maintain read-only operations during blockchain node outages

Flake rate in main: 73.08% (Passed 7 times, Failed 19 times)

Stack Traces | 2.04s run time
Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: /akash.deployment.v1beta3.MsgDepositDeployment doesn't exist.: invalid type [cosmossdk.io/[email protected]/errors.go:155] with gas used: '59817': unknown request
    at QueryClient.queryAbci (.../apps/api/node_modules/@.../src/queryclient/queryclient.ts:619:13)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Object.request (.../apps/api/node_modules/@.../src/queryclient/utils.ts:35:24)
    at Object.simulate (.../apps/api/node_modules/@.../modules/tx/queries.ts:72:26)
    at SyncSigningStargateClient.simulate (.../apps/api/node_modules/@.../stargate/src/signingstargateclient.ts:192:25)
    at BatchSigningClientService.estimateFee (.../lib/batch-signing-client/batch-signing-client.service.ts:287:27)
    at .../lib/batch-signing-client/batch-signing-client.service.ts:213:23
    at withSpan (.../services/tracing/tracing.service.ts:169:20)
    at BatchSigningClientService.executeTxBatch (.../lib/batch-signing-client/batch-signing-client.service.ts:204:12)
UserProviders tracks user changes

Flake rate in main: 15.00% (Passed 17 times, Failed 3 times)

Stack Traces | 0.132s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: {"bio": "Taceo amplexus testimonium decet tamquam quae.", "email": "[email protected]", "emailVerified": false, "githubUsername": "Neal_Reynolds", "id": "a5a2baf7-ca55-44a6-94a6-4444fb9d574b", "subscribedToNewsletter": false, "twitterUsername": "Jaylin_Spinka79", "userId": "5fcb836f-863e-4eb1-ba8d-84740c90db8e", "youtubeUsername": "Yvette.Maggio"}
Received
       1
          Object {
        -   "bio": "Taceo amplexus testimonium decet tamquam quae.",
        -   "email": "[email protected]",
        +   "bio": "Vulgus cito succurro terreo campana cibo adstringo.",
        +   "email": "[email protected]",
            "emailVerified": false,
        -   "githubUsername": "Neal_Reynolds",
        -   "id": "a5a2baf7-ca55-44a6-94a6-4444fb9d574b",
        +   "githubUsername": "Deven89",
        +   "id": "2766d250-6d56-4092-a45d-5e6c5cdbfbdc",
        +   "name": "Michelle Wisozk III",
        +   "picture": "https://avatars.githubusercontent.com/u/57402103",
        +   "plan": Object {
        +     "code": "COMMUNITY",
        +     "monthlyPrice": 0,
        +     "name": "Community",
        +     "summary": "Get access to free features!",
        +     "yearlyPrice": 0,
        +   },
        +   "planCode": "COMMUNITY",
            "subscribedToNewsletter": false,
        -   "twitterUsername": "Jaylin_Spinka79",
        -   "userId": "5fcb836f-863e-4eb1-ba8d-84740c90db8e",
        -   "youtubeUsername": "Yvette.Maggio",
        +   "twitterUsername": "Mohammad53",
        +   "userId": "cc0935bc-c11d-4ebc-b73f-86aea567db17",
        +   "username": "Jamarcus.Langworth",
        +   "youtubeUsername": "Isidro_Hodkiewicz",
          },
       2: undefined

Number of calls: 2
    at Object.toHaveBeenCalledWith (.../user/UserProviders/UserProviders.spec.tsx:57:31)
start trial POST /v1/start-trial when ANONYMOUS_FREE_TRIAL allowed creates a wallet for a user

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 2.75s run time
Error: User wallet address is null-ish
    at Object.<anonymous> (.../test/functional/start-trial.spec.ts:50:41)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

Walkthrough

Removes the public GET /version/{network} API and its service/controller implementation and tests; adds meta.json validation and consumption across net tooling and HTTP SDK (new NodeHttpService.getMeta); updates NetConfig method signatures to accept string and adds zod as a devDependency.

Changes

Cohort / File(s) Summary
API: Controller / Service / Router
apps/api/src/network/controllers/network/network.controller.ts, apps/api/src/network/services/network/network.service.ts, apps/api/src/network/routes/network/network.router.ts
Removes NetworkController.getVersion and NetworkService.getVersion, and removes the router binding/route for GET /version/{network}; exports networkRouter remains for remaining routes (e.g., GetNodes).
API: Tests
apps/api/test/functional/nodes-v1.spec.ts
Removes the GET /version/{network} test suite and faker-based version generation; remaining tests focus on GET /nodes/{network} and invalid-network cases.
HTTP SDK: Meta support
packages/http-sdk/src/node/node-http.service.ts
Adds Zod-based metaSchema and Meta type and a new getMeta(network: SupportedChainNetworks): Promise<Meta> which fetches and validates net/.../meta.json.
NET package: generator & runtime
packages/net/scripts/generate.ts, packages/net/src/NetConfig/NetConfig.ts
generate.ts now fetches and validates meta.json (via zod), extracts version and API/RPC URLs and writes netConfig output; NetConfig signatures changed to accept network: string for getVersion, getBaseAPIUrl, and getBaseRpcUrl.
NET package: deps
packages/net/package.json
Adds devDependency "zod": "3.*".

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Script as packages/net/scripts/generate.ts
    participant Fetch as Remote (net repo)
    participant Zod as metaSchema.parse
    participant Output as netConfigData.ts

    Script->>Fetch: GET /{network}/meta.json
    Fetch-->>Script: JSON (meta.json) / error
    Script->>Zod: metaSchema.parse(json)
    alt valid meta.json
        Zod-->>Script: parsed Meta
        Script->>Script: extract version, apis.rest, apis.rpc
        Script->>Output: write netConfigData.ts with values
    else invalid meta.json
        Zod-->>Script: ZodError
        Script->>Output: write fallback/null entries
    end
Loading
sequenceDiagram
    autonumber
    participant Client
    participant Router as networkRouter
    participant Controller as NetworkController
    participant Service as NetworkService
    Note over Client,Router: GET /v1/version/{network} route removed
    Client->>Router: GET /v1/version/{network}
    Router-->>Client: 404 Not Found (no binding)
    Note over Client,Controller: For other endpoints (e.g., GET /v1/nodes/{network}) normal flow remains:
    Client->>Router: GET /v1/nodes/{network}
    Router->>Controller: NetworkController.getNodes
    Controller->>Service: NetworkService.getNodes
    Service-->>Controller: Result (nodes)
    Controller-->>Client: 200 application/json
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • baktun14
  • stalniy

Poem

🐰
I nibbled meta.json beneath the moon,
swapped scattered crumbs for one tidy tune.
Zod checked the fields, the version hopped in,
Routes slimmed down — a leaner code bin. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat!(network): uses meta.json instead of version.txt and removes GET /v1/version/{network}" is clear, specific, and directly summarizes the main changes in the changeset. The title accurately reflects the core objective of migrating from separate version.txt and nodes.txt files to meta.json and eliminating the GET /v1/version/{network} endpoint. The phrasing is concise and avoids vague terminology, making it immediately understandable to developers scanning the history.
Linked Issues Check ✅ Passed The pull request successfully addresses all primary objectives from linked issue #2091. The code changes remove the GET /v1/version/{network} endpoint by deleting the getVersion method from NetworkController, NetworkService, and network router, eliminating reliance on version.txt. Simultaneously, the changes implement meta.json integration across the codebase: packages/net/scripts/generate.ts is updated to fetch and validate meta.json instead of separate files, extracting version from meta.codebase.recommended_version and API/RPC addresses from meta.apis, while packages/http-sdk adds a new getMeta method for validation. The GET /v1/nodes/{network} endpoint is preserved and continues to function. Tests reflecting the removed endpoint are also cleaned up, confirming the implementation aligns with the requirements.
Out of Scope Changes Check ✅ Passed The changes in this pull request are properly scoped to the requirements of issue #2091. The removal of the getVersion endpoint across the API layer directly addresses the objective to eliminate reliance on version.txt. The introduction of meta.json fetching and validation in the generation scripts and HTTP SDK layer directly implements the core requirement to switch to meta.json instead of separate files. The type signature changes in NetConfig.ts (changing parameters from SupportedChainNetworks to string) represent a supporting refactoring that enables more flexible network parameter handling while maintaining the same internal control flow and logic, which is a reasonable infrastructural change to facilitate the migration.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/network

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
packages/net/package.json (1)

23-23: Consider a tighter version constraint for zod.

The version specification "3.*" allows all minor and patch updates within major version 3. For better reproducibility and to avoid unexpected breaking changes from future minor releases, consider using "^3.23.0" or similar.

-    "zod": "3.*"
+    "zod": "^3.23.0"
packages/net/scripts/generate.ts (1)

33-44: Consider logging which network failed validation.

When meta.json validation fails, the error is logged but doesn't indicate which network had the invalid meta.json. This could make debugging more difficult.

       .catch(error => {
         if (error instanceof ZodError) {
-          console.log("meta.json is invalid", error);
+          console.log(`meta.json is invalid for network ${network}`, error);
         }

         return null;
       }),
packages/http-sdk/src/node/node-http.service.ts (1)

27-30: Consider wrapping validation errors in domain-specific exception for public API consumers.

The metaSchema.parse() will throw an unhandled ZodError if the meta.json structure doesn't match the expected schema. Since getMeta is a public method of an exported service, consider catching ZodError and wrapping it in a domain-specific error to provide clearer error messages to SDK consumers.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eda2f96 and bc35356.

⛔ Files ignored due to path filters (1)
  • packages/net/src/generated/netConfigData.ts is excluded by !**/generated/**
📒 Files selected for processing (8)
  • apps/api/src/network/controllers/network/network.controller.ts (2 hunks)
  • apps/api/src/network/routes/network/network.router.ts (3 hunks)
  • apps/api/src/network/services/network/network.service.ts (1 hunks)
  • apps/api/test/functional/nodes-v1.spec.ts (3 hunks)
  • packages/http-sdk/src/node/node-http.service.ts (2 hunks)
  • packages/net/package.json (1 hunks)
  • packages/net/scripts/generate.ts (3 hunks)
  • packages/net/src/NetConfig/NetConfig.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/api/src/network/controllers/network/network.controller.ts
  • apps/api/src/network/routes/network/network.router.ts
  • packages/http-sdk/src/node/node-http.service.ts
  • apps/api/src/network/services/network/network.service.ts
  • packages/net/scripts/generate.ts
  • packages/net/src/NetConfig/NetConfig.ts
  • apps/api/test/functional/nodes-v1.spec.ts
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/api/src/network/controllers/network/network.controller.ts
  • apps/api/src/network/routes/network/network.router.ts
  • packages/http-sdk/src/node/node-http.service.ts
  • apps/api/src/network/services/network/network.service.ts
  • packages/net/scripts/generate.ts
  • packages/net/src/NetConfig/NetConfig.ts
  • apps/api/test/functional/nodes-v1.spec.ts
**/*.spec.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/no-jest-mock.mdc)

Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

**/*.spec.{ts,tsx}: Use setup function instead of beforeEach in test files
setup function must be at the bottom of the root describe block in test files
setup function creates an object under test and returns it
setup function should accept a single parameter with inline type definition
Don't use shared state in setup function
Don't specify return type of setup function

Files:

  • apps/api/test/functional/nodes-v1.spec.ts
🧬 Code graph analysis (6)
apps/api/src/network/controllers/network/network.controller.ts (1)
apps/api/src/network/http-schemas/network.schema.ts (1)
  • GetNodesParams (15-15)
apps/api/src/network/routes/network/network.router.ts (1)
apps/api/src/core/services/open-api-hono-handler/open-api-hono-handler.ts (1)
  • OpenApiHonoHandler (11-26)
packages/http-sdk/src/node/node-http.service.ts (2)
packages/net/src/NetConfig/NetConfig.ts (1)
  • SupportedChainNetworks (3-3)
packages/http-sdk/src/http/http.service.ts (2)
  • extractData (12-14)
  • extractData (17-19)
apps/api/src/network/services/network/network.service.ts (1)
apps/api/src/network/http-schemas/network.schema.ts (1)
  • GetNodesParams (15-15)
packages/net/src/NetConfig/NetConfig.ts (1)
packages/net/src/generated/netConfigData.ts (1)
  • netConfigData (1-55)
apps/api/test/functional/nodes-v1.spec.ts (1)
packages/net/src/NetConfig/NetConfig.ts (1)
  • NetConfig (5-44)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: validate (apps/provider-proxy) / validate-unsafe
  • GitHub Check: validate (apps/api) / validate-unsafe
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate (apps/deploy-web) / should-validate-unsafe / should-validate
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: Validate local packages
🔇 Additional comments (9)
apps/api/src/network/services/network/network.service.ts (1)

32-34: LGTM! Effective simplification.

The migration from async HTTP fetch to synchronous local config lookup correctly removes the need for memoization, error handling, and Result wrapping. This aligns well with the PR objective of using meta.json-based configuration.

apps/api/src/network/routes/network/network.router.ts (3)

8-9: LGTM! Cleaner module organization.

Moving the export to the top of the file improves readability and follows common conventions.


30-39: LGTM! Proper Result handling.

The getNodes route correctly handles the Result type with ok/val branching and error propagation.


58-61: LGTM! Simplified version endpoint.

The route correctly adapts to the controller's synchronous getVersion method. Error handling via http-assert in the controller will properly propagate 404 errors through Hono's error handler.

packages/http-sdk/src/node/node-http.service.ts (1)

8-14: Schema definition looks correct.

The metaSchema properly validates the meta.json structure for the codebase.recommended_version field. The schema is appropriately scoped to only the fields needed.

packages/net/scripts/generate.ts (2)

14-26: LGTM! Well-structured schemas.

The zod schemas properly validate the meta.json structure with appropriate nesting. The apiSchema ensures each endpoint has an address field, and metaSchema combines this with codebase version validation.


46-51: Graceful degradation with null fallback.

The networkConfig construction properly handles null meta responses by falling back to null/empty values. This ensures the script completes even if some networks have invalid meta.json files.

apps/api/src/network/controllers/network/network.controller.ts (1)

17-22: LGTM! Appropriate assertion for null version.

The controller correctly uses http-assert to validate the version exists and return a 404 if not. This properly handles the nullable return from the service layer and aligns with the synchronous refactor.

apps/api/test/functional/nodes-v1.spec.ts (1)

54-67: Now let me check if there are references to meta.json or if the PR was supposed to migrate away from HTTP calls:<!-- [scratchpad_start]
[task verify_test_logic_and_http_calls 3/3]
[observations]

  • Web search shows meta.json exists in akash-network/net repository and contains chain metadata
  • version.txt also exists and is referenced in documentation (result 6)
  • Both files coexist in the repository
  • Review comment mentions PR should read from meta.json, but based on code findings, endpoint reads from NetConfig (static config), not HTTP
    [analysis]
  • Web search confirms both version.txt and meta.json exist in external repository
  • This doesn't clarify if PR changed endpoint behavior
  • From code analysis: endpoint calls NetConfig.getVersion() which reads static config data
  • The mock intercepts HTTP call that is never executed by endpoint
  • NodeHttpService.getVersion() still calls version.txt, but endpoint doesn't use this service
    [conclusion]
  • Review comment is CORRECT in substance: test logic is inconsistent
  • However, the root cause is slightly different than stated:
    • Mock is for HTTP call that endpoint does NOT make
    • Endpoint uses NetConfig which reads static config
    • Test validates endpoint returns what NetConfig says (tautological)
  • Recommendation remains: remove mock since endpoint doesn't use HTTP
    [done]
    All analysis complete. Generating final response.
    [scratchpad_start] -->

Remove unnecessary nock mock interceptor; endpoint uses NetConfig static config, not HTTP.

The endpoint at /v1/version/{network} (lines 58-60 in network.router.ts) delegates to NetworkController.getVersion()NetworkService.getVersion()NetConfig.getVersion(). NetConfig.getVersion() returns netConfigData[this.mapped(network)].version (static configuration data), not an HTTP response.

The mock at lines 57-62 intercepts calls to /net/master/{network}/version.txt, but this HTTP endpoint is never invoked by the code path being tested. The test passes because both the mock setup and the assertion reference the same netConfig.getVersion() call, creating a tautology.

Remove the nock interceptor entirely since the endpoint doesn't perform HTTP calls to retrieve version data.

stalniy
stalniy previously approved these changes Oct 23, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (3)
packages/net/scripts/generate.ts (1)

75-82: Resolved: fetchJson return type now matches actual usage.
Changing to Promise aligns with res.json().

packages/net/src/NetConfig/NetConfig.ts (2)

27-30: Guard against empty apiUrls before returning.
Accessing apiUrls[0] may return undefined at runtime; keep contract by throwing a clear error.

   getBaseAPIUrl(network: string): string {
-    const apiUrls = netConfigData[this.mapped(network)].apiUrls;
-    return apiUrls[0];
+    const apiUrls = netConfigData[this.mapped(network)].apiUrls;
+    const first = apiUrls?.[0];
+    if (!first) {
+      throw new Error(`No API URLs configured for network "${network}"`);
+    }
+    return first;
   }

40-43: Guard against empty rpcUrls before returning.
Same issue for RPC; ensure non-empty or throw a descriptive error.

   getBaseRpcUrl(network: string): string {
-    const rpcUrls = netConfigData[this.mapped(network)].rpcUrls;
-    return rpcUrls[0];
+    const rpcUrls = netConfigData[this.mapped(network)].rpcUrls;
+    const first = rpcUrls?.[0];
+    if (!first) {
+      throw new Error(`No RPC URLs configured for network "${network}"`);
+    }
+    return first;
   }
🧹 Nitpick comments (5)
packages/net/scripts/generate.ts (4)

14-16: Validate endpoint addresses as URLs.
Tighten the schema by asserting valid URL format for addresses.

-const apiSchema = z.object({
-  address: z.string()
-});
+const apiSchema = z.object({
+  address: z.string().url()
+});

18-26: Consider enforcing non-empty API/RPC lists (or warn loudly).
If empty arrays are undesirable, enforce with zod; else keep arrays optional but document/log clearly.

-  apis: z.object({
-    rest: z.array(apiSchema),
-    rpc: z.array(apiSchema)
-  })
+  apis: z.object({
+    rest: z.array(apiSchema), // or .nonempty("meta.apis.rest must have at least one endpoint")
+    rpc: z.array(apiSchema)   // or .nonempty("meta.apis.rpc must have at least one endpoint")
+  })

Optionally refine versions:

-    recommended_version: z.string()
+    recommended_version: z.string().regex(/^v[0-9].*$/, "expected semver prefixed with 'v'")

33-43: Improve error handling/logging for meta.json parsing/fetch.
Include network in logs and log non‑Zod errors; safeParse avoids throwing for invalid meta.

-    const [meta, faucetUrl] = await Promise.all([
-      fetchJson(`${baseConfigUrl}/meta.json`)
-        .then(res => metaSchema.parse(res))
-        .catch(error => {
-          if (error instanceof ZodError) {
-            console.log("meta.json is invalid", error);
-          }
-
-          return null;
-        }),
+    const [meta, faucetUrl] = await Promise.all([
+      fetchJson(`${baseConfigUrl}/meta.json`)
+        .then(raw => {
+          const parsed = metaSchema.safeParse(raw);
+          if (!parsed.success) {
+            console.warn(`[${network}] meta.json invalid`, parsed.error.issues);
+            return null;
+          }
+          return parsed.data;
+        })
+        .catch(err => {
+          console.warn(`[${network}] meta.json fetch failed`, err);
+          return null;
+        }),

49-51: Normalize and de‑duplicate endpoint URLs.
Trim whitespace and remove duplicates to stabilize outputs.

-      apiUrls: meta?.apis?.rest?.map(({ address }) => address) ?? [],
-      rpcUrls: meta?.apis?.rpc?.map(({ address }) => address) ?? []
+      apiUrls: [...new Set(meta?.apis?.rest?.map(({ address }) => address.trim()) ?? [])],
+      rpcUrls: [...new Set(meta?.apis?.rpc?.map(({ address }) => address.trim()) ?? [])]
apps/api/src/network/routes/network/network.router.ts (1)

60-60: Refresh OpenAPI docs and response schema for GetVersion.

  • Update description to reflect meta.json (and branch main) instead of version.txt.
  • Declare a plain-text string response in OpenAPI.

Example:

   responses: {
-      description: "Network version"
+      description: "Network version",
+      content: {
+        "text/plain": {
+          schema: { type: "string" }
+        }
+      }
     }
   }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc35356 and 25ede47.

⛔ Files ignored due to path filters (1)
  • packages/net/src/generated/netConfigData.ts is excluded by !**/generated/**
📒 Files selected for processing (8)
  • apps/api/src/network/controllers/network/network.controller.ts (2 hunks)
  • apps/api/src/network/routes/network/network.router.ts (3 hunks)
  • apps/api/src/network/services/network/network.service.ts (1 hunks)
  • apps/api/test/functional/nodes-v1.spec.ts (1 hunks)
  • packages/http-sdk/src/node/node-http.service.ts (2 hunks)
  • packages/net/package.json (1 hunks)
  • packages/net/scripts/generate.ts (3 hunks)
  • packages/net/src/NetConfig/NetConfig.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/http-sdk/src/node/node-http.service.ts
  • packages/net/package.json
  • apps/api/test/functional/nodes-v1.spec.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • packages/net/src/NetConfig/NetConfig.ts
  • packages/net/scripts/generate.ts
  • apps/api/src/network/controllers/network/network.controller.ts
  • apps/api/src/network/services/network/network.service.ts
  • apps/api/src/network/routes/network/network.router.ts
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • packages/net/src/NetConfig/NetConfig.ts
  • packages/net/scripts/generate.ts
  • apps/api/src/network/controllers/network/network.controller.ts
  • apps/api/src/network/services/network/network.service.ts
  • apps/api/src/network/routes/network/network.router.ts
🧬 Code graph analysis (4)
packages/net/src/NetConfig/NetConfig.ts (1)
packages/net/src/generated/netConfigData.ts (1)
  • netConfigData (1-55)
apps/api/src/network/controllers/network/network.controller.ts (1)
apps/api/src/network/http-schemas/network.schema.ts (1)
  • GetNodesParams (15-15)
apps/api/src/network/services/network/network.service.ts (1)
apps/api/src/network/http-schemas/network.schema.ts (1)
  • GetNodesParams (15-15)
apps/api/src/network/routes/network/network.router.ts (1)
apps/api/src/core/services/open-api-hono-handler/open-api-hono-handler.ts (1)
  • OpenApiHonoHandler (11-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: Validate local packages
🔇 Additional comments (7)
packages/net/scripts/generate.ts (2)

4-5: LGTM on adopting zod for runtime validation.
Solid move for guarding generator inputs.


47-47: LGTM on version sourcing from meta.codebase.recommended_version.
Matches PR objective to use meta.json.

packages/net/src/NetConfig/NetConfig.ts (1)

23-25: LGTM on broadening to string network param.
Keeps mapping in one place and matches service/controller updates.

apps/api/src/network/controllers/network/network.controller.ts (1)

17-22: LGTM: sync controller with assert-based 404.
Simple, consistent with service returning string | null.

apps/api/src/network/routes/network/network.router.ts (2)

8-8: LGTM on exporting a single OpenApiHonoHandler instance.
Cleaner public surface.


30-39: LGTM on GetNodes route wiring.
Correctly unwraps Result and throws HttpError on failure.

apps/api/src/network/services/network/network.service.ts (1)

32-34: Code simplification is correct; schema validation and tests confirm safety.

The GetNodesParamsSchema restricts network to exactly ["mainnet", "testnet", "sandbox"], preventing invalid networks from reaching the service layer. The functional test suite explicitly validates all three networks work with netConfig.getVersion(), and the controller adds a 404 assertion if the version is null. No risk of unhandled errors.

baktun14
baktun14 previously approved these changes Oct 23, 2025
@ygrishajev ygrishajev force-pushed the feature/network branch 2 times, most recently from ab455b5 to 752a5ec Compare October 23, 2025 15:00
… /v1/version/{network}

BREAKING CHANGE: removes GET /v1/version/{network}

closes #2091
@ygrishajev ygrishajev changed the title feat(network): uses meta.json instead of version.txt to resolve net versions feat!(network): uses meta.json instead of version.txt and removes GET /v1/version/{network} Oct 23, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/net/package.json (1)

23-23: Consider a more specific version constraint for zod.

The version specifier "3.*" will match any 3.x release, which may introduce inconsistencies across environments. A tighter constraint like "^3.24.0" would improve build reproducibility while still allowing patch updates.

packages/net/scripts/generate.ts (1)

4-5: Consolidate zod imports.

Both imports are from the same package and can be combined for cleaner code:

-import * as z from "zod";
-import { ZodError } from "zod";
+import { z, ZodError } from "zod";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25ede47 and bf95a25.

⛔ Files ignored due to path filters (2)
  • apps/api/test/functional/__snapshots__/docs.spec.ts.snap is excluded by !**/*.snap
  • packages/net/src/generated/netConfigData.ts is excluded by !**/generated/**
📒 Files selected for processing (8)
  • apps/api/src/network/controllers/network/network.controller.ts (0 hunks)
  • apps/api/src/network/routes/network/network.router.ts (1 hunks)
  • apps/api/src/network/services/network/network.service.ts (0 hunks)
  • apps/api/test/functional/nodes-v1.spec.ts (0 hunks)
  • packages/http-sdk/src/node/node-http.service.ts (2 hunks)
  • packages/net/package.json (1 hunks)
  • packages/net/scripts/generate.ts (3 hunks)
  • packages/net/src/NetConfig/NetConfig.ts (2 hunks)
💤 Files with no reviewable changes (3)
  • apps/api/test/functional/nodes-v1.spec.ts
  • apps/api/src/network/controllers/network/network.controller.ts
  • apps/api/src/network/services/network/network.service.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/http-sdk/src/node/node-http.service.ts
  • packages/net/src/NetConfig/NetConfig.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • packages/net/scripts/generate.ts
  • apps/api/src/network/routes/network/network.router.ts
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • packages/net/scripts/generate.ts
  • apps/api/src/network/routes/network/network.router.ts
🧬 Code graph analysis (1)
apps/api/src/network/routes/network/network.router.ts (1)
apps/api/src/core/services/open-api-hono-handler/open-api-hono-handler.ts (1)
  • OpenApiHonoHandler (11-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
🔇 Additional comments (5)
apps/api/src/network/routes/network/network.router.ts (2)

8-9: LGTM! Clean export placement.

Moving the router export to the top of the file is good practice and makes the router instance available for immediate route binding.


10-39: LGTM! GetNodes route implementation is solid.

The route definition and handler correctly implement the GET /v1/nodes/{network} endpoint with proper schema validation and error handling. The underlying meta.json integration occurs at the controller/service layer, which aligns with proper separation of concerns.

packages/net/scripts/generate.ts (3)

14-26: LGTM!

The schema definitions correctly model the expected meta.json structure and will provide runtime validation for the network configuration data.


46-51: LGTM!

The data extraction logic correctly uses optional chaining and provides sensible fallbacks (null for version, empty arrays for URLs) when meta.json is unavailable or invalid.


75-82: LGTM!

The fetchJson helper function correctly returns Promise<unknown> and includes proper error handling with status details. The type annotation issue from the previous review has been resolved.

Comment on lines +33 to 44
const [meta, faucetUrl] = await Promise.all([
fetchJson(`${baseConfigUrl}/meta.json`)
.then(res => metaSchema.parse(res))
.catch(error => {
if (error instanceof ZodError) {
console.log("meta.json is invalid", error);
}

return null;
}),
fetchText(`${baseConfigUrl}/faucet-url.txt`).catch(() => null)
]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Improve error logging clarity.

The catch block handles all errors (network failures, JSON parsing errors, and validation errors) but only logs ZodError instances. Network or JSON parsing failures will silently return null without any logging, which could complicate debugging.

Consider logging all error types with appropriate context:

       .catch(error => {
         if (error instanceof ZodError) {
-          console.log("meta.json is invalid", error);
+          console.error(`[${network}] meta.json validation failed:`, error.message);
+        } else {
+          console.error(`[${network}] Failed to fetch or parse meta.json:`, error.message);
         }
         
         return null;
       }),

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In packages/net/scripts/generate.ts around lines 33 to 44, the current catch
only logs ZodError and swallows network/parse errors silently; update the catch
to log all errors with context and preserve the existing behavior of returning
null. Specifically, inside the catch, if error is a ZodError log a descriptive
message like "meta.json validation failed" plus the error details; otherwise log
a different descriptive message like "failed to fetch or parse meta.json" with
the error; use console.error (or the project logger if available) and then
return null.

@ygrishajev ygrishajev merged commit 46841af into main Oct 27, 2025
65 of 71 checks passed
@ygrishajev ygrishajev deleted the feature/network branch October 27, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move from net files to meta.json config

4 participants