Skip to content

Commit

Permalink
⬆️ Update to eRRPC v.0.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Sep 2, 2024
1 parent 6db24c1 commit 9b77bba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,28 @@ import type { OptionalField } from "./types/utils";
type ConfigWithOptionalServer = Omit<Config, "server" | "metrics"> & {
server?: OptionalField<
ServerConfig,
"httpPort" | "httpHostV4" | "httpHostV6"
"httpPort" | "httpHostV4" | "httpHostV6" | "listenV4" | "listenV6"
>;
metrics?: OptionalField<
MetricsConfig,
"port" | "hostV4" | "hostV6" | "listenV4" | "listenV6"
>;
metrics?: OptionalField<MetricsConfig, "port" | "hostV4" | "hostV6">;
};

// Default config for metrics and server
const defaultServerConfig = {
httpPort: 4000,
httpHostV4: "0.0.0.0",
httpHostV6: "[::]",
listenV4: true,
listenV6: true,
};
const defaultMetricsCofnig = {
port: 4001,
hostV4: "0.0.0.0",
hostV6: "[::]",
listenV4: true,
listenV6: true,
};

/**
Expand Down
12 changes: 10 additions & 2 deletions src/generatedTypes/erpcTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export interface Config {
admin?: AdminConfig;
}
export interface ServerConfig {
listenV4: boolean;
httpHostV4: string;
listenV6: boolean;
httpHostV6: string;
httpPort: number /* int */;
maxTimeout: string;
Expand Down Expand Up @@ -122,7 +124,12 @@ export interface EvmUpstreamConfig {
nodeType: EvmNodeType;
engine: string;
getLogsMaxBlockRange: number /* int */;
syncing: boolean;
statePollerInterval: string;
/**
* By default "Syncing" is marked as unknown (nil) and that means we will be retrying empty responses
* from such upstream, unless we explicitly know that the upstream is fully synced (false).
*/
syncing?: boolean;
}
export interface FailsafeConfig {
retry?: RetryPolicyConfig;
Expand Down Expand Up @@ -217,7 +224,9 @@ export interface NetworkStrategyConfig {
}
export interface MetricsConfig {
enabled: boolean;
listenV4: boolean;
hostV4: string;
listenV6: boolean;
hostV6: string;
port: number /* int */;
}
Expand All @@ -230,7 +239,6 @@ export const EvmNodeTypeFull: EvmNodeType = "full";
export const EvmNodeTypeArchive: EvmNodeType = "archive";
export const EvmNodeTypeSequencer: EvmNodeType = "sequencer";
export const EvmNodeTypeExecution: EvmNodeType = "execution";
export type EvmBlockTracker = any;

//////////
// source: network.go
Expand Down

0 comments on commit 9b77bba

Please sign in to comment.