Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: transaction bot proper configuration #9106

Merged
merged 1 commit into from
Oct 9, 2024
Merged
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
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 @@ -79,9 +79,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
Loading