diff --git a/docs/Build/node-cli.md b/docs/Build/node-cli.md index 52711cd58..8ec0f5718 100644 --- a/docs/Build/node-cli.md +++ b/docs/Build/node-cli.md @@ -91,19 +91,20 @@ Press Ctrl-C to exit node and return to console. Now that you've tested the basic node operation, you might want to customise your config files (assuming you are in top-level folder , i.e. `cd "${CNODE_HOME}"`) : 1. files/config.json : -This file contains the logging configurations (tracers of to tune logging, paths for other genesis config files, address/ports on which the prometheus/EKG monitoring will listen, etc). Unless running more than one node on same machine (not recommended), you should be alright to use this file as-is. +This file contains the logging configurations (tracers of to tune logging, paths for other genesis config files, address/ports on which the prometheus/EKG monitoring will listen, etc). Unless running more than one node on same machine (not recommended), you should be alright to use most of this file as-is. You might - however - want to double-check `PeerSharing` in this file, if using a relay node where you'd like connecting peers (marked as `"advertise": "true"` in topology.json) to be shared , you may turn this setting to `true`. 2. files/topology.json : This file tells your node how to connect to other nodes (especially initially to start synching). You would want to update this file as below: * Update the `localRoots` > `accessPoints` section to include your local nodes that you want persistent connection against (eg: this could be your BP and own relay nodes) against definition where `trustable` is set to `true`. - * You'd want to update `localRoots` > `valency` to number of connections from your localRoots that you always want to keep active connection to. + * If you want specific peers to be advertised on the network for discovery, you may set `advertise` to `true` for that peer group. You do NOT want to do that on BP + * You'd want to update `localRoots` > `valency` (`valency` is the same as `hotValency`, not yet replaced since the example in cardano-node-wiki repo still suggests `valency`) to number of connections from your localRoots that you always want to keep active connection to for that node. * [Optional] - you can add/remove nodes from `publicRoots` section as well as `localRoots` > `accessPoints` as desired, tho defaults populated should work fine. On mainnet, we did add a few additional nodes to help add more redundancy for initial sync. * `useLedgerAfterSlot` tells the node to establish networking with nodes from defined peers to sync the node initially until reaching an absolute slot number, after which - it can start attempting to connect to peers registered as pool relays on the network. You may want this number to be relatively recent (eg: not have it 50 epochs old). * You can read further about topology file configuration [here](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/understanding-config-files.md#the-p2p-topologyjson-file) !!! important - You'd want to set `useLedgerAfterSlot` to `-1` for your Block Producing (Core) node - thereby, telling your Core node to remain in non-P2P mode. + On BP, You'd want to set `useLedgerAfterSlot` to `-1` for your Block Producing (Core) node - thereby, telling your Core node to remain in non-P2P mode, and ensure `PeerSharing` is to `false`. The resultant topology file could look something like below: diff --git a/files/configs/guild/config.json b/files/configs/guild/config.json index 164dbb4e0..024ea00a8 100644 --- a/files/configs/guild/config.json +++ b/files/configs/guild/config.json @@ -3,21 +3,21 @@ "ByronGenesisFile": "/opt/cardano/cnode/files/byron-genesis.json", "ConwayGenesisFile": "/opt/cardano/cnode/files/conway-genesis.json", "EnableP2P": true, - "ExperimentalHardForksEnabled": false, - "ExperimentalProtocolsEnabled": false, "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 3, "LastKnownBlockVersion-Minor": 1, + "MinNodeVersion": "8.9.2", + "PeerSharing": true, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresMagic", "PBftSignatureThreshold": 1, "ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json", + "EnableLogging": true, + "EnableLogMetrics": false, "TargetNumberOfActivePeers": 10, "TargetNumberOfEstablishedPeers": 25, "TargetNumberOfKnownPeers": 50, - "TargetNumberOfRootPeers": 50, - "EnableLogging": true, - "EnableLogMetrics": false, + "TargetNumberOfRootPeers": 25, "TraceAcceptPolicy": true, "TraceBlockFetchClient": true, "TraceBlockFetchDecisions": false, diff --git a/files/configs/mainnet/config.json b/files/configs/mainnet/config.json index 722d1f6fd..a60ea7136 100644 --- a/files/configs/mainnet/config.json +++ b/files/configs/mainnet/config.json @@ -7,6 +7,8 @@ "LastKnownBlockVersion-Major": 3, "LastKnownBlockVersion-Minor": 0, "MaxKnownMajorProtocolVersion": 2, + "MinNodeVersion": "8.9.2", + "PeerSharing": false, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresNoMagic", "ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json", @@ -15,7 +17,7 @@ "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, "TargetNumberOfKnownPeers": 100, - "TargetNumberOfRootPeers": 100, + "TargetNumberOfRootPeers": 60, "TraceAcceptPolicy": true, "TraceBlockFetchClient": true, "TraceBlockFetchDecisions": false, diff --git a/files/configs/mainnet/topology.json b/files/configs/mainnet/topology.json index a6086208a..ab5bdb447 100644 --- a/files/configs/mainnet/topology.json +++ b/files/configs/mainnet/topology.json @@ -17,7 +17,6 @@ ], "advertise": false, "trustable": true, - "valency_INFO": "set the .localRoots.valency to the number of configured accessPoints", "valency": 2 }, { @@ -46,6 +45,5 @@ "advertise": false } ], - "useLedgerAfterSlot_INFO": "the node will use the .publicRoots.accessPoints only until he synchronised up to slot .useLedgerAfterSlot. then P2P peering jumps in, plus static links to .localRoots.accessPoints", "useLedgerAfterSlot": 119160667 } diff --git a/files/configs/preprod/config.json b/files/configs/preprod/config.json index 86e1ff01a..7523ba613 100644 --- a/files/configs/preprod/config.json +++ b/files/configs/preprod/config.json @@ -6,6 +6,8 @@ "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 2, "LastKnownBlockVersion-Minor": 0, + "MinNodeVersion": "8.9.2", + "PeerSharing": false, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresMagic", "ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json", @@ -14,7 +16,7 @@ "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, "TargetNumberOfKnownPeers": 100, - "TargetNumberOfRootPeers": 100, + "TargetNumberOfRootPeers": 60, "TraceAcceptPolicy": true, "TraceBlockFetchClient": true, "TraceBlockFetchDecisions": false, diff --git a/files/configs/preview/config.json b/files/configs/preview/config.json index 88815b3d7..81d1ed3e3 100644 --- a/files/configs/preview/config.json +++ b/files/configs/preview/config.json @@ -8,19 +8,21 @@ "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 3, "LastKnownBlockVersion-Minor": 1, + "MinNodeVersion": "8.9.2", + "PeerSharing": false, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresMagic", "ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json", + "EnableLogging": true, + "EnableLogMetrics": false, "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, "TargetNumberOfKnownPeers": 100, - "TargetNumberOfRootPeers": 100, + "TargetNumberOfRootPeers": 60, "TestAllegraHardForkAtEpoch": 0, "TestAlonzoHardForkAtEpoch": 0, "TestMaryHardForkAtEpoch": 0, "TestShelleyHardForkAtEpoch": 0, - "EnableLogging": true, - "EnableLogMetrics": false, "TraceAcceptPolicy": true, "TraceBlockFetchClient": true, "TraceBlockFetchDecisions": false, diff --git a/files/configs/sanchonet/config.json b/files/configs/sanchonet/config.json index f5c123b7c..471fb23b9 100644 --- a/files/configs/sanchonet/config.json +++ b/files/configs/sanchonet/config.json @@ -8,19 +8,21 @@ "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 3, "LastKnownBlockVersion-Minor": 1, + "MinNodeVersion": "8.10.0", + "PeerSharing": false, "Protocol": "Cardano", "RequiresNetworkMagic": "RequiresMagic", "ShelleyGenesisFile": "/opt/cardano/cnode/files/shelley-genesis.json", + "EnableLogging": true, + "EnableLogMetrics": false, "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, "TargetNumberOfKnownPeers": 100, - "TargetNumberOfRootPeers": 100, + "TargetNumberOfRootPeers": 60, "TestAllegraHardForkAtEpoch": 0, "TestAlonzoHardForkAtEpoch": 0, "TestMaryHardForkAtEpoch": 0, "TestShelleyHardForkAtEpoch": 0, - "EnableLogging": true, - "EnableLogMetrics": false, "TraceAcceptPolicy": true, "TraceBlockFetchClient": true, "TraceBlockFetchDecisions": false, diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index 03f386eea..c7d149979 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -364,7 +364,7 @@ build_libblst() { } # Download cardano-node, cardano-cli, cardano-db-sync, bech32 and cardano-submit-api -# TODO: Replace these with self-hosted ones (potentially consider IPFS as upload destination for CI) +# TODO: Replace these with self-hosted ones (potentially consider snapshots.koios.rest as upload destination for CI) download_cnodebins() { [[ -z ${ARCH##*aarch64*} ]] && err_exit " The build archives are not available for ARM, you might need to build them!" echo -e "\nDownloading binaries.." @@ -382,7 +382,9 @@ download_cnodebins() { [[ -f cardano-address ]] || err_exit " cardano-address archive downloaded but binary (bin/cardano-address) not found after extracting package!" if [[ "${SKIP_DBSYNC_DOWNLOAD}" == "N" ]]; then echo -e "\n Downloading Cardano DB Sync archive created from GitHub.." - curl -m 200 -sfL https://github.com/IntersectMBO/cardano-db-sync/releases/download/sancho-4-2-1/cardano-db-sync-13.2.0.1-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.0 from GitHub!" + # TODO: Replace CI Build artifact against 13.2.0.2 tag with release from github artefacts once available + #curl -m 200 -sfL https://github.com/IntersectMBO/cardano-db-sync/releases/download/13.2.0.2/cardano-db-sync-13.2.0.1-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.2 from GitHub!" + curl -m 200 -sfL https://ci.iog.io/build/3735786/download/1/cardano-db-sync-13.2.0.2-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.2 from GitHub!" tar zxf cnodedbsync.tar.gz --strip-components 1 ./cardano-db-sync &>/dev/null [[ -f cardano-db-sync ]] || err_exit " cardano-db-sync archive downloaded but binary (cardano-db-sync) not found after extracting package!" rm -f cnodedbsync.tar.gz