Skip to content

Commit

Permalink
cluster: fix definition version
Browse files Browse the repository at this point in the history
  • Loading branch information
corverroos committed Jul 21, 2022
1 parent 6e82ea9 commit 2d46066
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 42 deletions.
2 changes: 1 addition & 1 deletion cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestBackwardsCompatability(t *testing.T) {
version: "v1.0.0",
},
{
version: "v1.0.1",
version: "v1.1.0",
},
// Note: Add testdata files for newer versions when bumped.
}
Expand Down
2 changes: 1 addition & 1 deletion cluster/definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
)

const (
definitionVersion = "v1.0.1"
definitionVersion = "v1.1.0"
dkgAlgo = "default"
)

Expand Down
6 changes: 3 additions & 3 deletions cluster/testdata/TestEncode_definition_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
}
],
"uuid": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8",
"version": "v1.0.1",
"version": "v1.1.0",
"timestamp": "2022-07-19T18:19:58+02:00",
"num_validators": 2,
"threshold": 3,
"fee_recipient_address": "0x52fdfc072182654f163f5f0f9a621d729566c74d",
"withdrawal_address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c4",
"dkg_algorithm": "default",
"fork_version": "0x00000002",
"config_hash": "ZCLGlOnXppJPp+Xv7A43AMJrqxy1714qExb6uk6VOzw=",
"definition_hash": "tjeuHGM+Vq2UpAoxfK+ieyk5C7D0vJKjvPIQpsDPucc="
"config_hash": "2aQgQp1b6QndUKjumibFjupLfcIObxLdo1mQPRcqogE=",
"definition_hash": "PZt47OFSnfSvu6YYN8GnjB6+p6IApPAo6qvfq1hOJWI="
}
6 changes: 3 additions & 3 deletions cluster/testdata/TestEncode_definition_yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ operators:
config_signature: KbAiO+6l9PdDkfRF0Vr9QpQEA3T2kkuYy/hxP42WLXw=
enr_signature: jQGRksJCJOLK/Mrjph+1hrFDI6a8j5598dkpMz/5k5M=
uuid: 0194FDC2-FA2F-FCC0-41D3-FF12045B73C8
version: v1.0.1
version: v1.1.0
timestamp: 2022-07-19T18:19:58+02:00
num_validators: 2
threshold: 3
fee_recipient_address: "0x52fdfc072182654f163f5f0f9a621d729566c74d"
withdrawal_address: "0x81855ad8681d0d86d1e91e00167939cb6694d2c4"
dkg_algorithm: default
fork_version: "0x00000002"
config_hash: ZCLGlOnXppJPp+Xv7A43AMJrqxy1714qExb6uk6VOzw=
definition_hash: tjeuHGM+Vq2UpAoxfK+ieyk5C7D0vJKjvPIQpsDPucc=
config_hash: 2aQgQp1b6QndUKjumibFjupLfcIObxLdo1mQPRcqogE=
definition_hash: PZt47OFSnfSvu6YYN8GnjB6+p6IApPAo6qvfq1hOJWI=
8 changes: 4 additions & 4 deletions cluster/testdata/TestEncode_lock_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
}
],
"uuid": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8",
"version": "v1.0.1",
"version": "v1.1.0",
"timestamp": "2022-07-19T18:19:58+02:00",
"num_validators": 2,
"threshold": 3,
"fee_recipient_address": "0x52fdfc072182654f163f5f0f9a621d729566c74d",
"withdrawal_address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c4",
"dkg_algorithm": "default",
"fork_version": "0x00000002",
"config_hash": "ZCLGlOnXppJPp+Xv7A43AMJrqxy1714qExb6uk6VOzw=",
"definition_hash": "tjeuHGM+Vq2UpAoxfK+ieyk5C7D0vJKjvPIQpsDPucc="
"config_hash": "2aQgQp1b6QndUKjumibFjupLfcIObxLdo1mQPRcqogE=",
"definition_hash": "PZt47OFSnfSvu6YYN8GnjB6+p6IApPAo6qvfq1hOJWI="
},
"distributed_validators": [
{
Expand All @@ -46,5 +46,5 @@
}
],
"signature_aggregate": "O+pvWzr23gN0NmxHGeQ6GwZ9ibx/AfH1c5gWWaRP8Xo=",
"lock_hash": "XlMaUhjUK0QNp0NZuDuhlsO3avrYLux7iWWrr4EOp1w="
"lock_hash": "eTtY56eXcUpCPa52lFHSpj5cNGCLAegX/UK1UuEOUmA="
}
8 changes: 4 additions & 4 deletions cluster/testdata/TestEncode_lock_yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ cluster_definition:
config_signature: KbAiO+6l9PdDkfRF0Vr9QpQEA3T2kkuYy/hxP42WLXw=
enr_signature: jQGRksJCJOLK/Mrjph+1hrFDI6a8j5598dkpMz/5k5M=
uuid: 0194FDC2-FA2F-FCC0-41D3-FF12045B73C8
version: v1.0.1
version: v1.1.0
timestamp: 2022-07-19T18:19:58+02:00
num_validators: 2
threshold: 3
fee_recipient_address: "0x52fdfc072182654f163f5f0f9a621d729566c74d"
withdrawal_address: "0x81855ad8681d0d86d1e91e00167939cb6694d2c4"
dkg_algorithm: default
fork_version: "0x00000002"
config_hash: ZCLGlOnXppJPp+Xv7A43AMJrqxy1714qExb6uk6VOzw=
definition_hash: tjeuHGM+Vq2UpAoxfK+ieyk5C7D0vJKjvPIQpsDPucc=
config_hash: 2aQgQp1b6QndUKjumibFjupLfcIObxLdo1mQPRcqogE=
definition_hash: PZt47OFSnfSvu6YYN8GnjB6+p6IApPAo6qvfq1hOJWI=
distributed_validators:
- distributed_public_key: "0x4c7215a3b539eb1e5849c6077dbb5722f5717a28"
public_shares:
Expand All @@ -32,4 +32,4 @@ distributed_validators:
- n45NpkMBBSINCyloi3NLjqDzypk26EYfENd8luqAp6Y=
- ZfYG9qY7fz39JWfBiXnk1g8maG2b8vsmyQH/NUzeFgc=
signature_aggregate: O+pvWzr23gN0NmxHGeQ6GwZ9ibx/AfH1c5gWWaRP8Xo=
lock_hash: XlMaUhjUK0QNp0NZuDuhlsO3avrYLux7iWWrr4EOp1w=
lock_hash: eTtY56eXcUpCPa52lFHSpj5cNGCLAegX/UK1UuEOUmA=
48 changes: 29 additions & 19 deletions cluster/testdata/definition_v1_0_0.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
{
"name": "test definition",
"operators": [
{
"address": "0xe2d3d0d0de6bf8f9b44ce85ff044c6b1f83b8e88",
"enr": "enr://32f3a8aeb79ef856f659c18f0dcecc77c75e7a81bfde275f67cfe242cf3cc354",
"address": "",
"enr": "enr:-JG4QBu2tQrP82j98uSOKg2hx6dOeBfvx1cKAp1DNlJ0rPaUXNplL0w__vis9qRg2zqXKQQQ42jur3VUC2UVAFivfhKGAYHndPf1gmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQKL6Kkc15-1J63KMyg93VIp3SulwL64uVNXPVapUZOTPoN0Y3CCDhqDdWRwgg4u",
"nonce": 0,
"enr_signature": "8+3i1r7MTqOuXohSap9KV4vLnvLUplMUdo1tKZdh6p4="
"config_signature": null,
"enr_signature": null
},
{
"address": "0x4f5aa6aec3fc78c6aae081ac8120c720efcd6cea",
"enr": "enr://cdd01d75045c3f000f8a796bce6c512c3801aacaeedfad5b506664e8c0e4a771",
"nonce": 1,
"enr_signature": "7OC4t8GWXZGBJRt8nJylIFr8FqI2ou/N0tEtKnnQdKg="
"address": "",
"enr": "enr:-JG4QKPM230NVMGArEeDbJ3ai5Bt8OkLPr3S-4yuiy6UdawrWw26pG-Rxabb1VIEEXM_wbQDyHOnW8f7XktpoLFOWvCGAYHneeC3gmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQJtxJaeIkcsqIKQixzWpb2SWQOjxCdIg-M5gpIMB6CJ7oN0Y3CCDhqDdWRwgg4u",
"nonce": 0,
"config_signature": null,
"enr_signature": null
},
{
"address": "",
"enr": "enr:-JG4QJSe4GPEyYJ5TMQYGPe2sUz0-x5N3IzM-ihh__jm9NVWFKDZoDisKxVDwnwWIVFbQdQyfFjq7WHViprAQsQoxwCGAYHnduhbgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQMSUIVbYXPvvw87UXX14TUilw-BuNpc_iDx0t6MYnjA04N0Y3CCDhqDdWRwgg4u",
"nonce": 0,
"config_signature": null,
"enr_signature": null
},
{
"address": "",
"enr": "enr:-JG4QAFDSkbh7VzCpAXlvg9g23n6yIyuzZ23Sj08dZgNAj14PnIpmUnFCRjPCYyGub9zNb2oEurlsn_64PC94hk1d_iGAYHnelV6gmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQMdEi3jUyPMbW6HGwmEcAc4WfBVqH4WxNcznd27yUzYpIN0Y3CCDhqDdWRwgg4u",
"nonce": 0,
"config_signature": null,
"enr_signature": null
}
],
"uuid": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8",
"uuid": "DFEC0255-4DC4-2458-935C-9B80495B4478",
"version": "v1.0.0",
"num_validators": 2,
"num_validators": 1,
"threshold": 3,
"fee_recipient_address": "0x0194fdc2fa2ffcc041d3ff12045b73c86e4ff95f",
"withdrawal_address": "0xfb180daf48a79ee0b10d394651850fd4a178892e",
"withdrawal_address": "0x0000000000000000000000000000000000000000",
"dkg_algorithm": "default",
"fork_version": "0x00000002",
"config_hash": "LqJVMStxA0vnlMFG9PSK/po3DcLwovWmeAe9S/JjRgU=",
"definition_hash": "fn33ROAtquN1FNg5W6qGmO661Y4vNO6VO81c+R22hpc=",
"operator_signatures": [
"KArpQ56w1q7KCCOuAtZ9hmrCxP5KclBT2hGbnU9RUUA=",
"otcjnEC0WsOVDZQfxP4cDLlq0yLWIoIpX7/hHiakMwc="
]
"fork_version": "0x00001020",
"config_hash": "YTEoXt5ieiBuGsbFb+zAV4r3uHLwhWQcOOYmnJX1kGU=",
"definition_hash": "NcGdp2ZscwyHPcZGOz8YXh/fT1M9lRvLQtHGhLrUJ+w="
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
}
],
"uuid": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8",
"version": "v1.0.1",
"version": "v1.1.0",
"timestamp": "2022-07-19T18:19:58+02:00",
"num_validators": 2,
"threshold": 3,
"fee_recipient_address": "0x52fdfc072182654f163f5f0f9a621d729566c74d",
"withdrawal_address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c4",
"dkg_algorithm": "default",
"fork_version": "0x00000002",
"config_hash": "ZCLGlOnXppJPp+Xv7A43AMJrqxy1714qExb6uk6VOzw=",
"definition_hash": "tjeuHGM+Vq2UpAoxfK+ieyk5C7D0vJKjvPIQpsDPucc="
"config_hash": "2aQgQp1b6QndUKjumibFjupLfcIObxLdo1mQPRcqogE=",
"definition_hash": "PZt47OFSnfSvu6YYN8GnjB6+p6IApPAo6qvfq1hOJWI="
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
}
],
"uuid": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8",
"version": "v1.0.1",
"version": "v1.1.0",
"timestamp": "2022-07-19T18:19:58+02:00",
"num_validators": 2,
"threshold": 3,
"fee_recipient_address": "0x52fdfc072182654f163f5f0f9a621d729566c74d",
"withdrawal_address": "0x81855ad8681d0d86d1e91e00167939cb6694d2c4",
"dkg_algorithm": "default",
"fork_version": "0x00000002",
"config_hash": "ZCLGlOnXppJPp+Xv7A43AMJrqxy1714qExb6uk6VOzw=",
"definition_hash": "tjeuHGM+Vq2UpAoxfK+ieyk5C7D0vJKjvPIQpsDPucc="
"config_hash": "2aQgQp1b6QndUKjumibFjupLfcIObxLdo1mQPRcqogE=",
"definition_hash": "PZt47OFSnfSvu6YYN8GnjB6+p6IApPAo6qvfq1hOJWI="
},
"distributed_validators": [
{
Expand All @@ -46,5 +46,5 @@
}
],
"signature_aggregate": "O+pvWzr23gN0NmxHGeQ6GwZ9ibx/AfH1c5gWWaRP8Xo=",
"lock_hash": "XlMaUhjUK0QNp0NZuDuhlsO3avrYLux7iWWrr4EOp1w="
"lock_hash": "eTtY56eXcUpCPa52lFHSpj5cNGCLAegX/UK1UuEOUmA="
}

0 comments on commit 2d46066

Please sign in to comment.