Skip to content

Commit

Permalink
fix: transaction bot proper configuration (#9106)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-mitch authored Oct 9, 2024
1 parent bba5674 commit 666fc38
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions spartan/aztec-network/templates/transaction-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ spec:
value: "{{ .Values.bot.privateTransfersPerTx }}"
- name: BOT_PUBLIC_TRANSFERS_PER_TX
value: "{{ .Values.bot.publicTransfersPerTx }}"
- name: BOT_NO_WAIT_FOR_TRANSFERS
value: "{{ .Values.bot.noWaitForTransfers }}"
- name: BOT_FOLLOW_CHAIN
value: "{{ .Values.bot.followChain }}"
- name: BOT_NO_START
value: "{{ .Values.bot.botNoStart }}"
- name: PXE_PROVER_ENABLED
Expand Down
4 changes: 2 additions & 2 deletions spartan/aztec-network/templates/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ spec:
- name: VALIDATOR_DISABLED
value: "{{ .Values.validator.validator.disabled }}"
- name: SEQ_MAX_SECONDS_BETWEEN_BLOCKS
value: "{{ .Values.bootNode.sequencer.maxSecondsBetweenBlocks }}"
value: "{{ .Values.validator.sequencer.maxSecondsBetweenBlocks }}"
- name: SEQ_MIN_TX_PER_BLOCK
value: "{{ .Values.bootNode.sequencer.minTxsPerBlock }}"
value: "{{ .Values.validator.sequencer.minTxsPerBlock }}"
- name: P2P_TCP_ANNOUNCE_ADDR
value: "$(POD_DNS_NAME):{{ .Values.validator.service.p2pPort }}"
- name: P2P_UDP_ANNOUNCE_ADDR
Expand Down
3 changes: 2 additions & 1 deletion spartan/aztec-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ bot:
txIntervalSeconds: 5
privateTransfersPerTx: 1
publicTransfersPerTx: 0
noWaitForTransfers: true
# Do not wait for transactions
followChain: "NONE"
botNoStart: false
pxeProverEnabled: false
proverRealProofs: false
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/values/16-validators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ validator:

bot:
txIntervalSeconds: 2
privateTransfersPerTx: 1
publicTransfersPerTx: 2

bootNode:
validator:
Expand Down
5 changes: 4 additions & 1 deletion yarn-project/bot/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export class Bot {
return;
}

this.log.verbose(`Awaiting tx ${txHash} to be on the ${followChain} (timeout ${txMinedWaitSeconds}s)`, logCtx);
this.log.verbose(
`Awaiting tx ${txHash} to be on the ${followChain} chain (timeout ${txMinedWaitSeconds}s)`,
logCtx,
);
const receipt = await tx.wait({
timeout: txMinedWaitSeconds,
provenTimeout: txMinedWaitSeconds,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/bot/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const botConfigMappings: ConfigMappingsType<BotConfig> = {
followChain: {
env: 'BOT_FOLLOW_CHAIN',
description: 'Which chain the bot follows',
defaultValue: 'none',
defaultValue: 'NONE',
parseEnv(val) {
if (!botFollowChain.includes(val as any)) {
throw new Error(`Invalid value for BOT_FOLLOW_CHAIN: ${val}`);
Expand Down

0 comments on commit 666fc38

Please sign in to comment.