Skip to content

Commit 230e820

Browse files
authored
feat: enable tracemempool and peersharing on relays (#140)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent f2f1f5c commit 230e820

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

bin/run-network

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ if ! test -e /data/db/protocolMagicId; then
4444
fi
4545
fi
4646

47+
# Enable TraceMempool and PeerSharing
48+
sed -i \
49+
-e 's/"PeerSharing": false/"PeerSharing": true/' \
50+
-e 's/"TraceMempool": false/"TraceMempool": true/' \
51+
/opt/cardano/config/${NETWORK}/config.json
52+
4753
echo "Starting: /usr/local/bin/cardano-node run"
4854
echo "--config /opt/cardano/config/${NETWORK}/config.json"
4955
echo "--database-path /data/db"

bin/run-node

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ if [[ ${CARDANO_BLOCK_PRODUCER} == true ]]; then
7575
echo CARDANO_SHELLEY_KES_KEY=${CARDANO_SHELLEY_KES_KEY}
7676
echo CARDANO_SHELLEY_VRF_KEY=${CARDANO_SHELLEY_VRF_KEY}
7777
echo CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=${CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE}
78+
else
79+
sed -i \
80+
-e 's/"PeerSharing": false/"PeerSharing": true/' \
81+
-e 's/"TraceMempool": false/"TraceMempool": true/' \
82+
${CARDANO_CONFIG}
7883
fi
7984

8085
echo AGGREGATOR_ENDPOINT=${AGGREGATOR_ENDPOINT}

config/mainnet/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"LastKnownBlockVersion-Major": 3,
1111
"LastKnownBlockVersion-Minor": 0,
1212
"MaxKnownMajorProtocolVersion": 2,
13+
"PeerSharing": false,
1314
"Protocol": "Cardano",
1415
"RequiresNetworkMagic": "RequiresNoMagic",
1516
"ShelleyGenesisFile": "shelley-genesis.json",

config/preprod/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"LastKnownBlockVersion-Alt": 0,
1010
"LastKnownBlockVersion-Major": 2,
1111
"LastKnownBlockVersion-Minor": 0,
12+
"PeerSharing": false,
1213
"Protocol": "Cardano",
1314
"RequiresNetworkMagic": "RequiresMagic",
1415
"ShelleyGenesisFile": "shelley-genesis.json",

config/preview/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"LastKnownBlockVersion-Alt": 0,
1212
"LastKnownBlockVersion-Major": 3,
1313
"LastKnownBlockVersion-Minor": 1,
14+
"PeerSharing": false,
1415
"Protocol": "Cardano",
1516
"RequiresNetworkMagic": "RequiresMagic",
1617
"ShelleyGenesisFile": "shelley-genesis.json",

0 commit comments

Comments
 (0)