Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/era-import
Browse files Browse the repository at this point in the history
  • Loading branch information
asdacap committed Oct 21, 2024
2 parents d29eb72 + 631f879 commit db95f85
Show file tree
Hide file tree
Showing 123 changed files with 3,948 additions and 1,458 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo "Import GPG owner trust"
echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust
- name: Install PPA dependencies
run: sudo apt-get update && sudo apt-get install debhelper devscripts -y
run: sudo apt-get update && sudo apt-get install build-essential debhelper devscripts -y
- name: Submit package
env:
PPA_GPG_KEYID: ${{ secrets.PPA_GPG_KEYID }}
Expand Down Expand Up @@ -65,6 +65,8 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install debhelper devscripts ubuntu-dev-tools -y
- name: Set up Python
uses: actions/setup-python@v5
- name: Install launchpadlib
run: pip install launchpadlib --upgrade
- name: Copy to other series
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/sync-supported-chains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
description: "Docker image to be used by action"
default: ""
required: false
network_filter:
description: "Usefull for manual execution on only specified networks - provide partial or full name. Will execute action only on networks which contains phrase."
default: ""
required: false

env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: "1"
Expand All @@ -29,7 +33,14 @@ jobs:
path: nethermind
- name: Set Matrix
id: set-matrix
run: echo "matrix=$(jq -c . nethermind/scripts/workflow_config/sync_testnets_matrix.json)" >> $GITHUB_OUTPUT
run: |
matrix=$(cat nethermind/scripts/workflow_config/sync_testnets_matrix.json)
if [ -n "${{ github.event.inputs.network_filter }}" ]; then
matrix=$(echo "$matrix" | jq --arg filter "${{ github.event.inputs.network_filter }}" '[.[] | select(.network | contains($filter))]')
fi
echo "matrix=$(echo "$matrix" | jq -c .)" >> $GITHUB_OUTPUT
create_a_runner:
needs: [setup-matrix]
Expand Down Expand Up @@ -188,7 +199,7 @@ jobs:
required_count["Processed"]=20
network="${{ matrix.config.network }}"
if [[ "$network" != "joc-mainnet" && "$network" != "joc-testnet" ]]; then
if [[ "$network" != "joc-mainnet" && "$network" != "joc-testnet" && "$network" != "linea-mainnet" && "$network" != "linea-sepolia" ]]; then
good_logs["Synced Chain Head"]=0
required_count["Synced Chain Head"]=20
fi
Expand Down Expand Up @@ -250,7 +261,7 @@ jobs:
done

- name: Get Consensus Logs
if: always() && matrix.config.network != 'joc-mainnet' && matrix.config.network != 'joc-testnet'
if: always() && matrix.config.network != 'joc-mainnet' && matrix.config.network != 'joc-testnet' && matrix.config.network != 'linea-mainnet' && matrix.config.network != 'linea-sepolia'
run: |
network="${{ matrix.config.network }}"
if [[ "$network" == base-* || "$network" == op-* ]]; then
Expand All @@ -265,6 +276,7 @@ jobs:
- name: Destroy VM
if: always()
continue-on-error: true
id: run-linode-action
uses: kamilchodola/linode-github-runner/.github/actions/linode-machine-manager@main
with:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Trivy scanner

on:
pull_request:
branches: [master]
push:
branches: [master]
schedule:
- cron: '29 19 * * 4'
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
env:
IMAGE_TAG: nethermind:${{ github.sha }}
steps:
- name: Check out repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1

- name: Build Docker image
run: docker build -t $IMAGE_TAG .

- name: Scan
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 #v0.28.0
with:
image-ref: ${{ env.IMAGE_TAG }}
format: template
template: '@/contrib/sarif.tpl'
output: trivy-results.sarif
severity: CRITICAL,HIGH
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db

- name: Upload scan results
uses: github/codeql-action/upload-sarif@cf5b0a9041d3c1d336516f1944c96d96598193cc #v2.19.1
with:
sarif_file: trivy-results.sarif
6 changes: 4 additions & 2 deletions .github/workflows/update-fast-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip3 install setuptools --break-system-packages
pip3 install emoji --break-system-packages
pip install setuptools
pip install emoji
- name: Update config files
run: python3 scripts/syncSettings.py ${{ secrets.ETHERSCAN_API_KEY }}
- name: Create GitHub app token
Expand Down
10 changes: 10 additions & 0 deletions scripts/syncSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@
"url": "https://sepolia.optimism.io",
"blockReduced": 8192,
"multiplierRequirement": 10000
},
"linea-mainnet": {
"url": "https://rpc.linea.build",
"blockReduced": 8192,
"multiplierRequirement": 10000
},
"linea-sepolia": {
"url": "https://rpc.sepolia.linea.build",
"blockReduced": 8192,
"multiplierRequirement": 10000
}
}

Expand Down
16 changes: 16 additions & 0 deletions scripts/workflow_config/sync_testnets_matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,21 @@
"checkpoint-sync-url": "",
"timeout": 180,
"agent": "g6-standard-6"
},
{
"network": "linea-mainnet",
"cl": "",
"cl_image": "",
"checkpoint-sync-url": "",
"timeout": 180,
"agent": "g6-standard-6"
},
{
"network": "linea-sepolia",
"cl": "",
"cl_image": "",
"checkpoint-sync-url": "",
"timeout": 180,
"agent": "g6-standard-6"
}
]
Loading

0 comments on commit db95f85

Please sign in to comment.