Skip to content

Commit

Permalink
Merge pull request #94 from pk910/pk910/align-with-mainnet
Browse files Browse the repository at this point in the history
Align config scructure with eth-clients/mainnet repository
  • Loading branch information
pk910 authored Dec 3, 2024
2 parents f2c219a + 84908a7 commit da56547
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 14 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/check-bootnode-consistency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

name: Check bootnode consistency

on:
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
check_consistency:
name: Run bootnode consistency checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check bootnode consistency
run: |
cl_bootnodes=$(cat metadata/bootstrap_nodes.yaml | yq ".[]")
el_bootnodes=$(cat metadata/enodes.yaml | yq ".[]")
echo "cl bootnodes ($(echo "$cl_bootnodes" | wc -l)):"
echo "$cl_bootnodes"
echo ""
echo "el bootnodes ($(echo "$el_bootnodes" | wc -l)):"
echo "$el_bootnodes"
echo ""
# check duplicate cl bootnodes
cl_duplicates=$(echo "$cl_bootnodes" | sort | uniq -d)
if [ ! -z "$cl_duplicates" ]; then
echo "duplicate cl bootnodes:"
echo "$cl_duplicates"
exit 1
fi
# check duplicate el bootnodes
el_duplicates=$(echo "$el_bootnodes" | sort | uniq -d)
if [ ! -z "$el_duplicates" ]; then
echo "duplicate el bootnodes:"
echo "$el_duplicates"
exit 1
fi
# check if bootnodes in besu.json match the bootnodes in metadata/enodes.yaml
besu_bootnodes=$(cat metadata/besu.json | jq -r ".config.discovery.bootnodes[]")
besu_bootnodes_diff=$(diff <(echo "$el_bootnodes") <(echo "$besu_bootnodes"))
if [ ! -z "$besu_bootnodes_diff" ]; then
echo "bootnodes in metadata/besu.json do not match the bootnodes in metadata/enodes.yaml"
echo "$besu_bootnodes_diff"
exit 1
fi
# check if bootnodes in chainspec.json match the bootnodes in metadata/enodes.yaml
chainspec_bootnodes=$(cat metadata/chainspec.json | jq -r ".nodes[]")
chainspec_bootnodes_diff=$(diff <(echo "$el_bootnodes") <(echo "$chainspec_bootnodes"))
if [ ! -z "$chainspec_bootnodes_diff" ]; then
echo "bootnodes in metadata/chainspec.json do not match the bootnodes in metadata/enodes.yaml"
echo "$chainspec_bootnodes_diff"
exit 1
fi
9 changes: 0 additions & 9 deletions metadata/bootstrap_nodes.txt

This file was deleted.

5 changes: 0 additions & 5 deletions metadata/enodes.txt

This file was deleted.

0 comments on commit da56547

Please sign in to comment.