Minor fixes, deploy (#1051)

Co-authored-by: Nam Chu Hoai <nambrot@googlemail.com>
pull/1058/head
Trevor Porter 2 years ago committed by GitHub
parent 1f44f4377b
commit a067a6235f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      rust/helm/abacus-agent/templates/configmap.yaml
  2. 8
      rust/helm/abacus-agent/templates/external-secret.yaml
  3. 6
      rust/helm/abacus-agent/values.yaml
  4. 4
      typescript/infra/config/environments/mainnet/agent.ts
  5. 6
      typescript/infra/config/environments/testnet2/agent.ts
  6. 33
      typescript/infra/src/agents/index.ts

@ -11,8 +11,8 @@ data:
ABC_BASE_DB: {{ .Values.abacus.dbPath }}
ABC_BASE_TRACING_FMT: {{ .Values.abacus.tracing.format }}
ABC_BASE_TRACING_LEVEL: {{ .Values.abacus.tracing.level }}
{{- if .Values.abacus.outboxChain.connectionType }}
ABC_BASE_OUTBOX_CONNECTION_TYPE: {{ .Values.abacus.outboxChain.connectionType }}
{{- if .Values.abacus.outboxChain.connection.type }}
ABC_BASE_OUTBOX_CONNECTION_TYPE: {{ .Values.abacus.outboxChain.connection.type }}
{{- end }}
{{- range .Values.abacus.inboxChains }}
{{- include "abacus-agent.config-env-vars" (dict "config" . "agent_name" "base" "key_name_prefix" (printf "INBOXES_%s_" (.name | upper)) "format" "config_map") | indent 2 }}

@ -21,7 +21,7 @@ spec:
{{- include "abacus-agent.labels" . | nindent 10 }}
data:
{{/* RPC URLs */}}
{{- if eq .Values.abacus.outboxChain.connectionType "httpQuorum" }}
{{- if eq .Values.abacus.outboxChain.connection.type "httpQuorum" }}
ABC_BASE_OUTBOX_CONNECTION_URLS: {{ print "'{{ .outbox_rpcs | fromJson | join \",\" }}'" }}
{{- else }}
ABC_BASE_OUTBOX_CONNECTION_URL: {{ print "'{{ .outbox_rpc | toString }}'" }}
@ -33,7 +33,7 @@ spec:
*/}}
{{- range .Values.abacus.inboxChains }}
{{- if not .disabled }}
{{- if eq .connectionType "httpQuorum" }}
{{- if eq .connection.type "httpQuorum" }}
ABC_BASE_INBOXES_{{ .name | upper }}_CONNECTION_URLS: {{ printf "'{{ .%s_rpcs | fromJson | join \",\" }}'" .name }}
{{- else }}
ABC_BASE_INBOXES_{{ .name | upper }}_CONNECTION_URL: {{ printf "'{{ .%s_rpc | toString }}'" .name }}
@ -41,7 +41,7 @@ spec:
{{- end }}
{{- end }}
data:
{{- if eq .Values.abacus.outboxChain.connectionType "httpQuorum" }}
{{- if eq .Values.abacus.outboxChain.connection.type "httpQuorum" }}
- secretKey: outbox_rpcs
remoteRef:
key: {{ printf "%s-rpc-endpoints-%s" .Values.abacus.runEnv .Values.abacus.outboxChain.name }}
@ -56,7 +56,7 @@ spec:
*/}}
{{- range .Values.abacus.inboxChains }}
{{- if not .disabled }}
{{- if eq .connectionType "httpQuorum" }}
{{- if eq .connection.type "httpQuorum" }}
- secretKey: {{ printf "%s_rpcs" .name }}
remoteRef:
key: {{ printf "%s-rpc-endpoints-%s" $.Values.abacus.runEnv .name }}

@ -52,7 +52,8 @@ abacus:
domain:
# -- RPC Style
rpcStyle: # "ethereum"
connectionType: # "http"
connection:
type: # "http"
# -- Connection string pointing to an RPC endpoint for the home chain
aws: # true | false
@ -64,7 +65,8 @@ abacus:
address:
domain:
rpcStyle: # "ethereum"
connectionType: # "http"
connection:
type: # "http"
# -- Connection string pointing to an RPC endpoint for the replica chain
# Abacus Agent Roles

@ -23,7 +23,7 @@ export const abacus: AgentConfig<MainnetChains> = {
context: Contexts.Abacus,
docker: {
repo: 'gcr.io/abacus-labs-dev/abacus-agent',
tag: 'sha-1027312',
tag: 'sha-f19110f',
},
aws: {
region: 'us-east-1',
@ -80,7 +80,7 @@ export const releaseCandidate: AgentConfig<MainnetChains> = {
context: Contexts.ReleaseCandidate,
docker: {
repo: 'gcr.io/abacus-labs-dev/abacus-agent',
tag: 'sha-1027312',
tag: 'sha-f19110f',
},
aws: {
region: 'us-east-1',

@ -26,7 +26,7 @@ export const abacus: AgentConfig<TestnetChains> = {
context: Contexts.Abacus,
docker: {
repo: 'gcr.io/abacus-labs-dev/abacus-agent',
tag: 'sha-1027312',
tag: 'sha-f19110f',
},
aws: {
region: 'us-east-1',
@ -83,7 +83,7 @@ export const flowcarbon: AgentConfig<TestnetChains> = {
context: Contexts.Flowcarbon,
docker: {
repo: 'gcr.io/abacus-labs-dev/abacus-agent',
tag: 'sha-1027312',
tag: 'sha-f19110f',
},
aws: {
region: 'us-east-1',
@ -91,7 +91,7 @@ export const flowcarbon: AgentConfig<TestnetChains> = {
environmentChainNames: chainNames,
contextChainNames: ['alfajores', 'kovan'],
validatorSets: validators,
connectionType: ConnectionType.Http,
connectionType: ConnectionType.HttpQuorum,
relayer: {
default: {
signedCheckpointPollingInterval: 5,

@ -3,7 +3,11 @@ import { utils } from '@abacus-network/utils';
import { Contexts } from '../../config/contexts';
import { AgentConfig, DeployEnvironment } from '../config';
import { ChainAgentConfig, CheckpointSyncerType } from '../config/agent';
import {
ChainAgentConfig,
CheckpointSyncerType,
ConnectionType,
} from '../config/agent';
import { fetchGCPSecret } from '../utils/gcloud';
import { HelmCommand, helmifyValues } from '../utils/helm';
import { execCmd } from '../utils/utils';
@ -26,6 +30,27 @@ async function helmValuesForChain<Chain extends ChainName>(
? true
: agentConfig.gelato?.enabledChains.includes(chainName) ?? false;
// By default, if a context only enables a subset of chains, the
// connection url (or urls, when HttpQuorum is used) are not fetched
// from GCP secret manager. For Http/Ws, the `url` param is expected,
// which is set by default to "" in the agent json configs. For HttpQuorum,
// no default is present in those configs, so we make sure to pass in urls
// as "" to avoid startup configuration issues.
let baseConnectionConfig: Record<string, string> = {
type: agentConfig.connectionType,
};
if (baseConnectionConfig.type == ConnectionType.HttpQuorum) {
baseConnectionConfig = {
...baseConnectionConfig,
urls: '',
};
} else {
baseConnectionConfig = {
...baseConnectionConfig,
url: '',
};
}
return {
image: {
repository: agentConfig.docker.repo,
@ -37,7 +62,7 @@ async function helmValuesForChain<Chain extends ChainName>(
baseConfig: `${chainName}_config.json`,
outboxChain: {
name: chainName,
connectionType: agentConfig.connectionType,
connection: baseConnectionConfig,
},
aws: !!agentConfig.aws,
inboxChains: agentConfig.environmentChainNames
@ -52,9 +77,7 @@ async function helmValuesForChain<Chain extends ChainName>(
(agentConfig.gelato?.enabledChains?.includes(remoteChainName) ??
false),
},
connection: {
type: agentConfig.connectionType,
},
connection: baseConnectionConfig,
};
}),
validator: {

Loading…
Cancel
Save