Skip to content

Commit

Permalink
update validation script
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Aug 20, 2023
1 parent 6eb4b9c commit 2d1a968
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/mainnet_param_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ def flatten_params(params):
params["dal_" + p]=dal_params[p]
return params

with open("nairobinet/values.yaml", "r") as f:
with open("oxfordnet/values.yaml", "r") as f:
params = flatten_params(yaml.safe_load(f)["activation"]["protocol_parameters"])

mainnet_params = flatten_params(requests.get("https://mainnet.oxheadhosted.com/chains/main/blocks/head/context/constants").json())

ghostnet_params = flatten_params(requests.get("https://rpc.ghostnet.teztnets.xyz/chains/main/blocks/head/context/constants").json())

mumbainet_params = flatten_params(requests.get("https://rpc.mumbainet.teztnets.xyz/chains/main/blocks/head/context/constants").json())
nairobinet_params = flatten_params(requests.get("https://rpc.nairobinet.teztnets.xyz/chains/main/blocks/head/context/constants").json())

print("Param,mumbainet,limanet,ghostnet,mainnet")
print("Param,oxfordnet,nairobinet,ghostnet,mainnet")
for param in params.keys():
if not (params[param] == mainnet_params.get(param) == ghostnet_params.get(param) == mumbainet_params.get(param)):
print(f"{param},{params[param]},{mumbainet_params.get(param, 'not defined')},{ghostnet_params.get(param, 'not defined')},{mainnet_params.get(param, 'not defined')}")
if not (params[param] == mainnet_params.get(param) == ghostnet_params.get(param) == nairobinet_params.get(param)):
print(f"{param},{params[param]},{nairobinet_params.get(param, 'not defined')},{ghostnet_params.get(param, 'not defined')},{mainnet_params.get(param, 'not defined')}")

0 comments on commit 2d1a968

Please sign in to comment.