Skip to content

Commit

Permalink
Merge branch 'main' into ENG-718/rework_fees_again
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanoroshiba committed Oct 1, 2024
2 parents f55673c + 6d9eb28 commit e84060e
Show file tree
Hide file tree
Showing 165 changed files with 6,450 additions and 2,630 deletions.
18 changes: 18 additions & 0 deletions .github/code-freeze-filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Each component that is being frozen should have a section in this file.
# The `changed` section should pull all the files that are changed
# in order to put an error on the given file if it is changed.

# Please provide a reasoning for each component that is frozen.

# Frozen for audit.
conductor: &conductor
- crates/astria-conductor/src/**
# Frozen for audit.
sequencer-relayer: &sequencer-relayer
- crates/astria-sequencer-relayer/src/**

# if new components are added above update the list below to get better
# gh pr level visibility into which files are frozen.
changed:
- *conductor
- *sequencer-relayer
60 changes: 60 additions & 0 deletions .github/workflows/code-freeze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Code Freeze
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
branches:
- main

jobs:
code_freeze:
name: Code Freeze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Filter Check
id: filters
uses: dorny/paths-filter@v3
with:
list-files: shell
filters: .github/code-freeze-filter.yaml
- name: Output Failure
if: steps.filters.outputs.changes != '' && !contains(github.event.pull_request.labels.*.name, 'override-freeze')
run: |
TITLE="Code Freeze in Effect"
LEGIBLE_CHANGES=$(echo "${{ steps.filters.outputs.changes }}" | sed 's/,changed//g' | sed 's/,/, /g' | sed 's/[][]//g')
echo "### ${TITLE}" >> $GITHUB_STEP_SUMMARY
echo "This PR updates the following components which are code frozen: ${LEGIBLE_CHANGES}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The following files are modified and frozen:" >> $GITHUB_STEP_SUMMARY
IFS="," read -ra FILE_LIST <<< "${{ steps.filters.outputs.changed_files }}"
FILE_MESSAGE="This file is under code freeze."
for FILE in "${FILE_LIST[@]}"; do
echo " - ${FILE}" >> $GITHUB_STEP_SUMMARY
echo "::error file=$FILE,title=$TITLE::$FILE_MESSAGE"
done
echo "" >> $GITHUB_STEP_SUMMARY
echo "Freeze can be overriden by adding the 'override-freeze' label to the PR." >> $GITHUB_STEP_SUMMARY
exit 1
- name: Output Bypass
if: steps.filters.outputs.changes != '' && !contains(github.event.pull_request.labels.*.name, 'override-freeze')
run: |
TITLE="Code Freeze in Effect - Bypassed"
LEGIBLE_CHANGES=$(echo "${{ steps.filters.outputs.changes }}" | sed 's/,changed//g' | sed 's/,/, /g' | sed 's/[][]//g')
echo "### ${TITLE}" >> $GITHUB_STEP_SUMMARY
echo "This PR updates the following components which are code frozen: ${LEGIBLE_CHANGES}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The following files are modified and frozen:" >> $GITHUB_STEP_SUMMARY
IFS="," read -ra FILE_LIST <<< "${{ steps.filters.outputs.changed_files }}"
FILE_MESSAGE="This file is under code freeze."
for FILE in "${FILE_LIST[@]}"; do
echo " - ${FILE}" >> $GITHUB_STEP_SUMMARY
echo "::warning file=$FILE,title=$TITLE::$FILE_MESSAGE"
done
echo "" >> $GITHUB_STEP_SUMMARY
echo "Freeze has been overriden by adding the 'override-freeze' label to the PR." >> $GITHUB_STEP_SUMMARY
exit 0
2 changes: 1 addition & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rustsec/audit-check@v1.4.1
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
- uses: rustsec/audit-check@v1.4.1
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions charts/evm-rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.27.3
version: 0.27.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.14.1"
appVersion: "0.14.2"

maintainers:
- name: wafflesvonmaple
Expand Down
2 changes: 2 additions & 0 deletions charts/evm-rollup/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ data:
OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceNamePrefix . }}-conductor"
{{- if not .Values.global.dev }}
{{- else }}
ASTRIA_CONDUCTOR_EXPECTED_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.conductor.sequencerChainId . }}"
ASTRIA_CONDUCTOR_EXPECTED_CELESTIA_CHAIN_ID: "{{ tpl .Values.config.conductor.celestiaChainId . }}"
{{- end }}
---
apiVersion: v1
Expand Down
4 changes: 3 additions & 1 deletion charts/evm-rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ images:
conductor:
repo: ghcr.io/astriaorg/conductor
pullPolicy: IfNotPresent
tag: "0.20.1"
tag: "0.21.0"
devTag: latest


Expand Down Expand Up @@ -178,6 +178,8 @@ config:
sequencerGrpc: ""
# The maximum number of requests to make to the sequencer per second
sequencerRequestsPerSecond: 500
# The chain id of the celestia network the conductor communicates with
celestiaChainId: ""

celestia:
# if config.rollup.executionLevel is NOT 'SoftOnly' AND celestia-node is not enabled
Expand Down
6 changes: 3 additions & 3 deletions charts/evm-stack/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 0.3.6
- name: evm-rollup
repository: file://../evm-rollup
version: 0.27.3
version: 0.27.4
- name: composer
repository: file://../composer
version: 0.1.4
Expand All @@ -20,5 +20,5 @@ dependencies:
- name: blockscout-stack
repository: https://blockscout.github.io/helm-charts
version: 1.6.2
digest: sha256:6e62801b5f401ba653f88a5ed9d33a6de38b8bba5ba942d01a2af68371c8bfd8
generated: "2024-09-19T12:52:41.503045-07:00"
digest: sha256:b086adf099e986e3a5c1f7f25481aaf42ebf597029a70ee0bd3ff6711e6bdccf
generated: "2024-09-25T14:31:21.35488-05:00"
4 changes: 2 additions & 2 deletions charts/evm-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.0
version: 0.6.1

dependencies:
- name: celestia-node
version: 0.3.6
repository: "file://../celestia-node"
condition: celestia-node.enabled
- name: evm-rollup
version: 0.27.3
version: 0.27.4
repository: "file://../evm-rollup"
- name: composer
version: 0.1.4
Expand Down
2 changes: 2 additions & 0 deletions charts/evm-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ global:
rollupName: ""
evmChainId: ""
sequencerChainId: ""
celestiaChainId: ""
otel:
endpoint: ""
tracesEndpoint: ""
Expand All @@ -29,6 +30,7 @@ evm-rollup:
config:
conductor:
sequencerChainId: "{{ .Values.global.sequencerChainId }}"
celestiaChainId: "{{ .Values.global.celestiaChainId }}"
sequencerRpc: "{{ .Values.global.sequencerRpc }}"
sequencerGrpc: "{{ .Values.global.sequencerGrpc }}"
otel:
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer-relayer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.12.1
version: 0.12.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
22 changes: 22 additions & 0 deletions charts/sequencer-relayer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ Namepsace to deploy elements into.
{{ .Values.images.sequencerRelayer.repo }}:{{ if .Values.global.dev }}{{ .Values.images.sequencerRelayer.devTag }}{{ else }}{{ .Values.images.sequencerRelayer.tag }}{{ end }}
{{- end }}

{{/*
Expand the name of the chart.
*/}}
{{- define "sequencer-relayer.name" -}}
sequencer-relayer
{{- end }}

{{/*
Common labels
*/}}
{{- define "sequencer-relayer.labels" -}}
{{ include "sequencer-relayer.selectorLabels" . }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "sequencer-relayer.selectorLabels" -}}
app: {{ include "sequencer-relayer.name" . }}
name: {{ include "sequencer-relayer.name" . }}-metrics
{{- end }}

{{- define "sequencer-relayer.storage.mountPath" -}}
/astria-sequencer-relayer
{{- end }}
Expand Down
20 changes: 20 additions & 0 deletions charts/sequencer-relayer/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.alerting.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "sequencer-relayer.name" . }}
{{- if .Values.alerting.prometheusRule.namespace }}
namespace: {{ .Values.alerting.prometheusRule.namespace | quote }}
{{- end }}
labels:
{{- include "sequencer-relayer.labels" . | nindent 4 }}
{{- if .Values.alerting.prometheusRule.additionalLabels }}
{{- toYaml .Values.alerting.prometheusRule.additionalLabels | nindent 4 }}
{{- end }}
spec:
{{- if .Values.alerting.prometheusRule.rules }}
groups:
- name: {{ template "sequencer-relayer.name" . }}
rules: {{- toYaml .Values.alerting.prometheusRule.rules | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/sequencer-relayer/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apiVersion: v1
metadata:
name: sequencer-relayer-metrics
namespace: {{ include "sequencer-relayer.namespace" . }}
labels:
{{- include "sequencer-relayer.labels" . | nindent 4 }}
spec:
selector:
app: sequencer-relayer
Expand Down
4 changes: 2 additions & 2 deletions charts/sequencer-relayer/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceMonitor
metadata:
name: sequencer-relayer-metrics
labels:
app: sequencer-relayer
{{- include "sequencer-relayer.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand All @@ -15,7 +15,7 @@ spec:
- {{ include "sequencer-relayer.namespace" . }}
selector:
matchLabels:
app: sequencer-relayer
{{- include "sequencer-relayer.labels" . | nindent 6 }}
endpoints:
- port: metrics
path: /
Expand Down
24 changes: 24 additions & 0 deletions charts/sequencer-relayer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ serviceMonitor:
additionalLabels:
release: kube-prometheus-stack

# Alerting Configuration
alerting:
enabled: false
interval: ""
additionalLabels:
release: kube-prometheus-stack
annotations: {}
# scrapeTimeout: 10s
# path: /metrics
prometheusRule:
enabled: true
additionalLabels:
release: kube-prometheus-stack
namespace: monitoring
rules:
- alert: Sequencer_Relayer_Down
expr: up{container="sequencer-relayer"} == 0 # Insert your query Expression
for: 1m # Rough number but should be enough to init warn
labels:
severity: warning
annotations:
summary: Sequencer Relayer is Down (instance {{ $labels.instance }})
description: "Sequencer relayer '{{ $labels.namespace }}' has disappeared from Prometheus target discovery.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"

storage:
enabled: false
local: true
Expand Down
6 changes: 3 additions & 3 deletions charts/sequencer/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: sequencer-relayer
repository: file://../sequencer-relayer
version: 0.12.1
digest: sha256:470368e9d1cbb0456ba3a198c42f708591454cc6638c9a0d9918828d898627b0
generated: "2024-09-10T11:55:38.765161-07:00"
version: 0.12.2
digest: sha256:3ee234bbedc042030976130a12c0fe364ff171a40d341fec820c49720fef9378
generated: "2024-09-30T11:40:37.590749-04:00"
4 changes: 2 additions & 2 deletions charts/sequencer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.23.0
version: 0.23.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand All @@ -24,7 +24,7 @@ appVersion: "0.17.0"

dependencies:
- name: sequencer-relayer
version: "0.12.1"
version: "0.12.2"
repository: "file://../sequencer-relayer"
condition: sequencer-relayer.enabled

Expand Down
4 changes: 2 additions & 2 deletions charts/sequencer/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "sequencer.fullname" . }}
name: {{ include "sequencer.name" . }}
{{- if .Values.alerting.prometheusRule.namespace }}
namespace: {{ .Values.alerting.prometheusRule.namespace | quote }}
{{- end }}
Expand All @@ -14,7 +14,7 @@ metadata:
spec:
{{- if .Values.alerting.prometheusRule.rules }}
groups:
- name: {{ template "sequencer.fullname" . }}
- name: {{ template "sequencer.name" . }}
rules: {{- toYaml .Values.alerting.prometheusRule.rules | nindent 4 }}
{{- end }}
{{- end }}
Loading

0 comments on commit e84060e

Please sign in to comment.