Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/cli/src/ceramic-daemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export function makeCeramicConfig(opts: DaemonConfig): CeramicConfig {
anchorServiceUrl: opts.anchor.anchorServiceUrl,
anchorServiceAuthMethod: opts.anchor.authMethod,
ethereumRpcUrl: opts.anchor.ethereumRpcUrl,
httpFetchTimeout: opts.node.httpFetchTimeout,
ipfsPinningEndpoints: opts.ipfs.pinningEndpoints,
ipfsGetTimeout: opts.ipfs.getTimeout,
multiqueryTimeout: opts.node.multiqueryTimeout,
networkName: opts.network.name,
pubsubTopic: opts.network.pubsubTopic,
syncOverride: SYNC_OPTIONS_MAP[opts.node.syncOverride],
Expand Down
18 changes: 18 additions & 0 deletions packages/cli/src/daemon-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ export class DaemonIpfsConfig {
*/
@jsonArrayMember(String, { name: 'pinning-endpoints' })
pinningEndpoints?: string[]

/**
* IPFS Get timeout
*/
@jsonMember(Number, { name: 'get-timeout' })
getTimeout?: number
}

/**
Expand Down Expand Up @@ -316,12 +322,24 @@ export class DaemonCeramicNodeConfig {
return this._privateSeedUrl
}

/**
* http fetch timeout
*/
@jsonMember(Number, { name: 'http-fetch-timeout' })
httpFetchTimeout?: number
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i would like to use this in ./packages/common/src/utils/http-utils.ts but its not clear to me how to best do that - @stbrody would love thoughts on how to set up configuratble flags and feature flags more generally, is daemon config the right way to do it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stephhuynh18 maybe you have an opinion?


/**
* Whether to run the Ceramic node in read-only gateway mode.
*/
@jsonMember(Boolean)
gateway?: boolean

/**
* multiquery timeout
*/
@jsonMember(Number, { name: 'multiquery-timeout' })
multiqueryTimeout?: number

/**
* If set, overrides the 'sync' flag for all stream load operations. Most users should never have
* to set this.
Expand Down