Skip to content

Commit

Permalink
chore(chart): update cm values; fix updater ctx cancellation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
oyyblin committed Jan 6, 2025
1 parent f8e5697 commit 4eea903
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions charts/updater/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ data:
CHAIN_ID: "{{ .Values.config.chainId }}"
SET_RANDOMNESS_GAS_LIMIT: "{{ .Values.config.setRandomnessGasLimit }}"
GENESIS_ROUND: "{{ .Values.config.genesisRound }}"
MAX_RETRIES: "{{ .Values.config.maxRetries }}"
{{- with .Values.extraConfig }}
{{- toYaml . | nindent 2 }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/updater/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ config:
chainId: "31337"
genesisRound: "4496672"
setRandomnessGasLimit: "500000"
maxRetries: "5"

extraConfig: {}

useExistingSecrets: false
existingSecretName: ""
Expand Down
2 changes: 1 addition & 1 deletion updater/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ANVIL_RPC="http://localhost:8545"
ANVIL_DRAND_ORACLE_ADDRESS="0xa6F9208a7F9d8CFBDe24417CfAE3092AF31029d0"
ANVIL_SIGNER_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
ANVIL_SENDER_PRIVATE_KEY="0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
ANVIL_SENDER_PRIVATE_KEY="0x2bfdc1fb0bea671f30f341f27ba8c3c39e1c329448383d1f5871ed7508c7af87"
ANVIL_CHAIN_ID=31337
ANVIL_GENESIS_ROUND=4496672

Expand Down
6 changes: 5 additions & 1 deletion updater/internal/service/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,14 @@ func (u *Updater) watchNewRounds(ctx context.Context) error {
u.latestDrandRound = result.Round()
u.metrics.SetDrandRound(float64(result.Round()))
u.latestDrandRoundMutex.Unlock()
u.roundChan <- &roundData{
select {
case <-ctx.Done():
return ctx.Err()
case u.roundChan <- &roundData{
round: result.Round(),
randomness: result.Randomness(),
signature: result.Signature(),
}:
}
}
return nil
Expand Down

0 comments on commit 4eea903

Please sign in to comment.