mirror of
https://github.com/logos-storage/logos-storage-spr.git
synced 2026-01-02 13:33:12 +00:00
https://github.com/codex-storage/infra-codex/issues/319
Codex SPR records
Repository contains Codex nodes SPR records and ENR records for Testnet Geth nodes.
Records also can be found in the docs.
Get records
# Networks
curl https://spr.codex.storage
# Codex
curl https://spr.codex.storage/testnet
curl https://spr.codex.storage/testnet/codex
curl https://spr.codex.storage/devnet/codex
# Geth
curl https://spr.codex.storage/testnet/geth
Update SPR records
-
Update files with SPR/ENR records or add new ones for the new network in the following format
<network>-<nodes>.txt -
Authenticate on AWS
export AWS_ACCESS_KEY_ID="<access key>" export AWS_SECRET_ACCESS_KEY="<secret access key>" export AWS_DEFAULT_REGION="eu-central-1" -
Update files to S3
networks_file="codex" buckets="bucket-1 bucket-2" for bucket in ${buckets}; do # Records for file in *.txt; do # Variables network=$(awk -F '-' '{print $1}' <<< ${file}) nodes=$(awk -F '-' '{print $2}' <<< ${file%%.*}) echo "${network}" >> "${networks_file}" # Upload if [[ "${nodes}" == "codex" ]]; then aws s3 cp --acl public-read --content-type "text/plain" "${file}" "s3://${bucket}/${network}" fi aws s3 cp --acl public-read --content-type "text/plain" "${file}" "s3://${bucket}/${network}/${nodes}" done # Networks sort -u "${networks_file}" -o "${networks_file}" aws s3 cp --acl public-read --content-type "text/plain" "${networks_file}" "s3://${bucket}/${networks_file}" done rm -f "${networks_file}" -
Check the result
# Networks curl https://spr.codex.storage # Codex curl https://spr.codex.storage/testnet curl https://spr.codex.storage/testnet/codex # Geth curl https://spr.codex.storage/testnet/geth
Todo
- Configure GitHub Actions to update records automatically.
Description
Languages
Text
100%