-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1123 from input-output-hk/lc/remove-submodules
remove git submodules
- Loading branch information
Showing
59 changed files
with
20,970 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Submodule cardano-configurations
deleted from
f414e7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
54 changes: 54 additions & 0 deletions
54
hydra-cluster/config/cardano-configurations/.github/scripts/download-all.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
# Download configuration files from a nominated URL for a nominated network | ||
# If p2p is enabled, create an explicit p2p version, keeping the default aligned with the production | ||
# networks, at least until https://github.com/input-output-hk/ouroboros-network/pull/3844 has been | ||
# inclded in a cardano-node release. | ||
|
||
CARDANO_CONFIG_URL=$1 | ||
CARDANO_NETWORK=$2 | ||
|
||
mkdir -p \ | ||
network/$CARDANO_NETWORK/cardano-node \ | ||
network/$CARDANO_NETWORK/genesis \ | ||
network/$CARDANO_NETWORK/cardano-db-sync | ||
|
||
SOURCE_TOPOLOGY=$(wget -qO- $CARDANO_CONFIG_URL/$CARDANO_NETWORK/topology.json) | ||
NODE_CONFIG=$(wget -qO- $CARDANO_CONFIG_URL/$CARDANO_NETWORK/config.json | jq '.ByronGenesisFile = "../genesis/byron.json" | .ShelleyGenesisFile = "../genesis/shelley.json" | .AlonzoGenesisFile = "../genesis/alonzo.json" | .ConwayGenesisFile = "../genesis/conway.json"') | ||
DB_SYNC_CONFIG=$(wget -qO- $CARDANO_CONFIG_URL/$CARDANO_NETWORK/db-sync-config.json | jq '.NodeConfigFile = "../cardano-node/config.json"') | ||
|
||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/byron-genesis.json -O network/$CARDANO_NETWORK/genesis/byron.json | ||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/shelley-genesis.json -O network/$CARDANO_NETWORK/genesis/shelley.json | ||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/alonzo-genesis.json -O network/$CARDANO_NETWORK/genesis/alonzo.json | ||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/conway-genesis.json -O network/$CARDANO_NETWORK/genesis/conway.json | ||
|
||
if [ $(echo $SOURCE_TOPOLOGY | jq 'has("publicRoots")') = true ]; | ||
then | ||
ACCESS_POINT=$(echo $SOURCE_TOPOLOGY | jq '.publicRoots[0].accessPoints[0]') | ||
|
||
# Add separate p2p config | ||
mkdir -p \ | ||
network/${CARDANO_NETWORK}_p2p/cardano-node \ | ||
network/${CARDANO_NETWORK}_p2p/genesis \ | ||
network/${CARDANO_NETWORK}_p2p/cardano-db-sync | ||
|
||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/byron-genesis.json -O network/${CARDANO_NETWORK}_p2p/genesis/byron.json | ||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/shelley-genesis.json -O network/${CARDANO_NETWORK}_p2p/genesis/shelley.json | ||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/alonzo-genesis.json -O network/${CARDANO_NETWORK}_p2p/genesis/alonzo.json | ||
wget -q $CARDANO_CONFIG_URL/$CARDANO_NETWORK/conway-genesis.json -O network/${CARDANO_NETWORK}_p2p/genesis/conway.json | ||
|
||
echo $SOURCE_TOPOLOGY | jq '.' > network/${CARDANO_NETWORK}_p2p/cardano-node/topology.json | ||
echo $NODE_CONFIG | jq '.' > network/${CARDANO_NETWORK}_p2p/cardano-node/config.json | ||
echo $DB_SYNC_CONFIG | jq '.' > network/${CARDANO_NETWORK}_p2p/cardano-db-sync/config.json | ||
|
||
# Transform defaults to disable p2p | ||
jq -nj --argjson address $(echo $ACCESS_POINT | jq '.address') --argjson port $(echo $ACCESS_POINT | jq '.port') '{"Producers": [{"addr": $address, "port": $port, "valency": 1 }]}' > network/$CARDANO_NETWORK/cardano-node/topology.json | ||
# See https://github.com/input-output-hk/cardano-node/blob/0681cdeb07d81b3b088a6c14e703d03751c3d25d/cardano-node/src/Cardano/Node/Tracing/Tracers/Startup.hs#L366 | ||
echo $NODE_CONFIG | jq '.EnableP2P = false | del(.TestEnableDevelopmentNetworkProtocols)'> network/$CARDANO_NETWORK/cardano-node/config.json | ||
echo $DB_SYNC_CONFIG | jq '.' > network/$CARDANO_NETWORK/cardano-db-sync/config.json | ||
else | ||
# Source config doesn't have p2p enabled, so no further transformation required | ||
echo $SOURCE_TOPOLOGY | jq '.' > network/$CARDANO_NETWORK/cardano-node/topology.json | ||
echo $NODE_CONFIG | jq '.' > network/$CARDANO_NETWORK/cardano-node/config.json | ||
echo $DB_SYNC_CONFIG | jq '.' > network/$CARDANO_NETWORK/cardano-db-sync/config.json | ||
fi |
14 changes: 14 additions & 0 deletions
14
hydra-cluster/config/cardano-configurations/.github/scripts/update-when-new.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Update an upstream repository if there's any new file updates. | ||
|
||
STATUS=$(git status -s) | ||
if [ -z "$STATUS" ]; then | ||
echo "Nothing to update." | ||
else | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Automated Bot" | ||
git add . | ||
git commit -m "Upload configuration from: $1" | ||
git push --set-upstream origin "master" | ||
fi |
53 changes: 53 additions & 0 deletions
53
hydra-cluster/config/cardano-configurations/.github/workflows/refresh-configurations.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Refresh Configurations | ||
|
||
on: | ||
schedule: | ||
- cron: '00 01 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
nightly: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Download from The Cardano Book (mainnet) | ||
shell: bash | ||
run: | | ||
.github/scripts/download-all.sh $CARDANO_CONFIG_URL $CARDANO_NETWORK | ||
env: | ||
CARDANO_CONFIG_URL: https://book.world.dev.cardano.org/environments/ | ||
CARDANO_NETWORK: mainnet | ||
|
||
- name: Download from The Cardano Book (preprod) | ||
shell: bash | ||
run: | | ||
.github/scripts/download-all.sh $CARDANO_CONFIG_URL $CARDANO_NETWORK | ||
env: | ||
CARDANO_CONFIG_URL: https://book.world.dev.cardano.org/environments | ||
CARDANO_NETWORK: preprod | ||
|
||
- name: Download from The Cardano Book (preview) | ||
shell: bash | ||
run: | | ||
.github/scripts/download-all.sh $CARDANO_CONFIG_URL $CARDANO_NETWORK | ||
env: | ||
CARDANO_CONFIG_URL: https://book.world.dev.cardano.org/environments | ||
CARDANO_NETWORK: preview | ||
|
||
- name: Download from The Cardano Book (sanchonet) | ||
shell: bash | ||
run: | | ||
.github/scripts/download-all.sh $CARDANO_CONFIG_URL $CARDANO_NETWORK | ||
env: | ||
CARDANO_CONFIG_URL: https://book.world.dev.cardano.org/environments | ||
CARDANO_NETWORK: sanchonet | ||
|
||
- name: Push new configurations | ||
shell: bash | ||
run: | | ||
.github/scripts/update-when-new.sh $CARDANO_CONFIG_URL | ||
env: | ||
CARDANO_CONFIG_URL: https://book.world.dev.cardano.org/environments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Cardano Configurations | ||
|
||
This repository holds the latest configurations for various core Cardano components (cardano-node, cardano-db-sync...), as well as the genesis configurations of well-known networks (i.e. mainnet and testnet...). It's **updated automatically, when required, by a cron-job once a day**, using the [The Cardano Book](https://book.world.dev.cardano.org/environments.html) as a source, and, since they're a Git repository, can be added to a project as a Git submodule and specific configurations can be pinned via a commit reference. The folder structure is network-centric and works well for setup where the network is fixed via a command-line option or environment variable. | ||
|
||
--- | ||
|
||
<p align="center"> | ||
<a href='https://github.com/input-output-hk/cardano-configurations/actions/workflows/refresh-configurations.yaml'><img src="https://img.shields.io/github/actions/workflow/status/input-output-hk/cardano-configurations/refresh-configurations.yaml?label=CRON%20JOB&style=for-the-badge"/></a> | ||
</p> |
114 changes: 114 additions & 0 deletions
114
hydra-cluster/config/cardano-configurations/network/mainnet/cardano-db-sync/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
"EnableLogMetrics": false, | ||
"EnableLogging": true, | ||
"NetworkName": "mainnet", | ||
"NodeConfigFile": "../cardano-node/config.json", | ||
"PrometheusPort": 8080, | ||
"RequiresNetworkMagic": "RequiresNoMagic", | ||
"defaultBackends": [ | ||
"KatipBK" | ||
], | ||
"defaultScribes": [ | ||
[ | ||
"StdoutSK", | ||
"stdout" | ||
] | ||
], | ||
"minSeverity": "Info", | ||
"options": { | ||
"cfokey": { | ||
"value": "Release-1.0.0" | ||
}, | ||
"mapBackends": {}, | ||
"mapSeverity": { | ||
"db-sync-node": "Info", | ||
"db-sync-node.Mux": "Error", | ||
"db-sync-node.Subscription": "Error" | ||
}, | ||
"mapSubtrace": { | ||
"#ekgview": { | ||
"contents": [ | ||
[ | ||
{ | ||
"contents": "cardano.epoch-validation.benchmark", | ||
"tag": "Contains" | ||
}, | ||
[ | ||
{ | ||
"contents": ".monoclock.basic.", | ||
"tag": "Contains" | ||
} | ||
] | ||
], | ||
[ | ||
{ | ||
"contents": "cardano.epoch-validation.benchmark", | ||
"tag": "Contains" | ||
}, | ||
[ | ||
{ | ||
"contents": "diff.RTS.cpuNs.timed.", | ||
"tag": "Contains" | ||
} | ||
] | ||
], | ||
[ | ||
{ | ||
"contents": "#ekgview.#aggregation.cardano.epoch-validation.benchmark", | ||
"tag": "StartsWith" | ||
}, | ||
[ | ||
{ | ||
"contents": "diff.RTS.gcNum.timed.", | ||
"tag": "Contains" | ||
} | ||
] | ||
] | ||
], | ||
"subtrace": "FilterTrace" | ||
}, | ||
"#messagecounters.aggregation": { | ||
"subtrace": "NoTrace" | ||
}, | ||
"#messagecounters.ekgview": { | ||
"subtrace": "NoTrace" | ||
}, | ||
"#messagecounters.katip": { | ||
"subtrace": "NoTrace" | ||
}, | ||
"#messagecounters.monitoring": { | ||
"subtrace": "NoTrace" | ||
}, | ||
"#messagecounters.switchboard": { | ||
"subtrace": "NoTrace" | ||
}, | ||
"benchmark": { | ||
"contents": [ | ||
"GhcRtsStats", | ||
"MonotonicClock" | ||
], | ||
"subtrace": "ObservableTrace" | ||
}, | ||
"cardano.epoch-validation.utxo-stats": { | ||
"subtrace": "NoTrace" | ||
} | ||
} | ||
}, | ||
"rotation": { | ||
"rpKeepFilesNum": 10, | ||
"rpLogLimitBytes": 5000000, | ||
"rpMaxAgeHours": 24 | ||
}, | ||
"setupBackends": [ | ||
"AggregationBK", | ||
"KatipBK" | ||
], | ||
"setupScribes": [ | ||
{ | ||
"scFormat": "ScText", | ||
"scKind": "StdoutSK", | ||
"scName": "stdout", | ||
"scRotation": null | ||
} | ||
] | ||
} |
103 changes: 103 additions & 0 deletions
103
hydra-cluster/config/cardano-configurations/network/mainnet/cardano-node/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"AlonzoGenesisFile": "../genesis/alonzo.json", | ||
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874", | ||
"ApplicationName": "cardano-sl", | ||
"ApplicationVersion": 1, | ||
"ByronGenesisFile": "../genesis/byron.json", | ||
"ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb", | ||
"ConwayGenesisFile": "../genesis/conway.json", | ||
"ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1", | ||
"LastKnownBlockVersion-Alt": 0, | ||
"LastKnownBlockVersion-Major": 3, | ||
"LastKnownBlockVersion-Minor": 0, | ||
"MaxKnownMajorProtocolVersion": 2, | ||
"Protocol": "Cardano", | ||
"RequiresNetworkMagic": "RequiresNoMagic", | ||
"ShelleyGenesisFile": "../genesis/shelley.json", | ||
"ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81", | ||
"TraceAcceptPolicy": true, | ||
"TraceBlockFetchClient": false, | ||
"TraceBlockFetchDecisions": false, | ||
"TraceBlockFetchProtocol": false, | ||
"TraceBlockFetchProtocolSerialised": false, | ||
"TraceBlockFetchServer": false, | ||
"TraceChainDb": true, | ||
"TraceChainSyncBlockServer": false, | ||
"TraceChainSyncClient": false, | ||
"TraceChainSyncHeaderServer": false, | ||
"TraceChainSyncProtocol": false, | ||
"TraceConnectionManager": true, | ||
"TraceDNSResolver": true, | ||
"TraceDNSSubscription": true, | ||
"TraceDiffusionInitialization": true, | ||
"TraceErrorPolicy": true, | ||
"TraceForge": true, | ||
"TraceHandshake": false, | ||
"TraceInboundGovernor": true, | ||
"TraceIpSubscription": true, | ||
"TraceLedgerPeers": true, | ||
"TraceLocalChainSyncProtocol": false, | ||
"TraceLocalErrorPolicy": true, | ||
"TraceLocalHandshake": false, | ||
"TraceLocalRootPeers": true, | ||
"TraceLocalTxSubmissionProtocol": false, | ||
"TraceLocalTxSubmissionServer": false, | ||
"TraceMempool": true, | ||
"TraceMux": false, | ||
"TracePeerSelection": true, | ||
"TracePeerSelectionActions": true, | ||
"TracePublicRootPeers": true, | ||
"TraceServer": true, | ||
"TraceTxInbound": false, | ||
"TraceTxOutbound": false, | ||
"TraceTxSubmissionProtocol": false, | ||
"TracingVerbosity": "NormalVerbosity", | ||
"TurnOnLogMetrics": true, | ||
"TurnOnLogging": true, | ||
"defaultBackends": [ | ||
"KatipBK" | ||
], | ||
"defaultScribes": [ | ||
[ | ||
"StdoutSK", | ||
"stdout" | ||
] | ||
], | ||
"hasEKG": 12788, | ||
"hasPrometheus": [ | ||
"127.0.0.1", | ||
12798 | ||
], | ||
"minSeverity": "Info", | ||
"options": { | ||
"mapBackends": { | ||
"cardano.node.metrics": [ | ||
"EKGViewBK" | ||
], | ||
"cardano.node.resources": [ | ||
"EKGViewBK" | ||
] | ||
}, | ||
"mapSubtrace": { | ||
"cardano.node.metrics": { | ||
"subtrace": "Neutral" | ||
} | ||
} | ||
}, | ||
"rotation": { | ||
"rpKeepFilesNum": 10, | ||
"rpLogLimitBytes": 5000000, | ||
"rpMaxAgeHours": 24 | ||
}, | ||
"setupBackends": [ | ||
"KatipBK" | ||
], | ||
"setupScribes": [ | ||
{ | ||
"scFormat": "ScText", | ||
"scKind": "StdoutSK", | ||
"scName": "stdout", | ||
"scRotation": null | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
hydra-cluster/config/cardano-configurations/network/mainnet/cardano-node/topology.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Producers": [ | ||
{ | ||
"addr": "relays-new.cardano-mainnet.iohk.io", | ||
"port": 3001, | ||
"valency": 2 | ||
} | ||
] | ||
} |
Oops, something went wrong.