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

Align config scructure with eth-clients/mainnet repository #116

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
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
7 changes: 0 additions & 7 deletions metadata/bootstrap_nodes.txt

This file was deleted.

7 changes: 6 additions & 1 deletion metadata/chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1053,5 +1053,10 @@
"balance": "0x084595161401484a000000"
}
},
"nodes": []
"nodes": [
"enode://ac906289e4b7f12df423d654c5a962b6ebe5b3a74cc9e06292a85221f9a64a6f1cfdd6b714ed6dacef51578f92b34c60ee91e9ede9c7f8fadc4d347326d95e2b@146.190.13.128:30303",
"enode://a3435a0155a3e837c02f5e7f5662a2f1fbc25b48e4dc232016e1c51b544cb5b4510ef633ea3278c0e970fa8ad8141e2d4d0f9f95456c537ff05fdf9b31c15072@178.128.136.233:30303",
"enode://7fa09f1e8bb179ab5e73f45d3a7169a946e7b3de5ef5cea3a0d4546677e4435ee38baea4dd10b3ddfdc1f1c5e869052932af8b8aeb6f9738598ec4590d0b11a6@65.109.94.124:30303",
"enode://3524632a412f42dee4b9cc899b946912359bb20103d7596bddb9c8009e7683b7bff39ea20040b7ab64d23105d4eac932d86b930a605e632357504df800dba100@172.174.35.249:30303"
]
}
4 changes: 0 additions & 4 deletions metadata/enodes.txt

This file was deleted.

Loading