Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Adds tessera and genesis flags for the enhanced privacy feature. (#109)
Browse files Browse the repository at this point in the history
* Adds tessera and genesis flags for the enhanced privacy feature, updates tessera version check logic
* Update bash tessera version check
  • Loading branch information
bmcd authored Oct 30, 2020
1 parent 88eb468 commit b23c909
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions 7nodes/istanbul-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"privacyEnhancementsBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
Expand Down
1 change: 1 addition & 0 deletions 7nodes/raft-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"privacyEnhancementsBlock": 0,
"eip150block": 0,
"eip150hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155block": 0,
Expand Down
3 changes: 2 additions & 1 deletion 7nodes/tessera-config-9.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@
}
]
},
"alwaysSendTo": []
"alwaysSendTo": [],
"enablePrivacyEnhancements": true
}
6 changes: 3 additions & 3 deletions templates/k8s/quorum-deployment.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ spec:
echo \"Tessera version - suffix ${TESSERA_VERSION}\";
TESSERA_CONFIG_TYPE=;

if [ \"${Tess_Ver_Second}\" -ge \"8\" ]; then TESSERA_CONFIG_TYPE=\"-enhanced\"; fi;
if [[ \"${Tess_Ver_Second}\" -ge \"9\" ]]; then TESSERA_CONFIG_TYPE=\"-9.0\"; fi;
if [ \"${Tess_Ver_First}\" -lt \"1\" ] && [ \"${Tess_Ver_Second}\" -eq \"8\" ]; then TESSERA_CONFIG_TYPE=\"-enhanced\"; fi;
if [ \"${Tess_Ver_First}\" -ge \"1\" ] || [ \"${Tess_Ver_Second}\" -ge \"9\" ]; then TESSERA_CONFIG_TYPE=\"-9.0\"; fi;

echo Config type [${TESSERA_CONFIG_TYPE}];

Expand All @@ -140,7 +140,7 @@ spec:
CONFIG_FINAL=$(echo $CONFIG_WITH_THIS_HOST | sed \"s-%THIS_PRIV_KEY%-${PRIV_KEY}-g\" | sed \"s-%THIS_PUB_KEY%-${PUB_KEY}-g\");
CONFIG_FINAL_9_0=$(echo $CONFIG_WITH_THIS_HOST | sed \"s-%THIS_PRIV_KEY%-${DDIR}/tm.key-g\" | sed \"s-%THIS_PUB_KEY%-${DDIR}/tm.pub-g\");

if [[ \"${Tess_Ver_Second}\" -ge \"9\" ]]; then CONFIG_FINAL=${CONFIG_FINAL_9_0}; fi;
if [ \"${Tess_Ver_First}\" -ge \"1\" ] || [ \"${Tess_Ver_Second}\" -ge \"9\" ]; then CONFIG_FINAL=${CONFIG_FINAL_9_0}; fi;
echo $CONFIG_FINAL > ${DDIR}/tessera-config-with-hosts.json;
cat ${DDIR}/tessera-config-with-hosts.json;
java -Xms128M -Xmx128M -jar /tessera/tessera-app.jar -configfile ${DDIR}/tessera-config-with-hosts.json | tee -a ${QHOME}/logs/tessera.log;
Expand Down
2 changes: 2 additions & 0 deletions templates/quorum/genesis.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ end
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"privacyEnhancementsBlock": 0,
"eip150block": 0,
"eip150hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155block": 0,
Expand Down Expand Up @@ -123,6 +124,7 @@ end
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"privacyEnhancementsBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
Expand Down
5 changes: 3 additions & 2 deletions templates/quorum/tessera-config-9.0.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def set_node_template_vars(values)
end
-%>

<%
<%
# for more information about the tessera-config file see https://github.com/jpmorganchase/tessera/wiki/Configuration-overview.
%>
<%
Expand Down Expand Up @@ -91,5 +91,6 @@ end
}
]
},
"alwaysSendTo": []
"alwaysSendTo": [],
"enablePrivacyEnhancements": true
}

0 comments on commit b23c909

Please sign in to comment.