Skip to content

Commit

Permalink
make sure pubkeys in cluster test data are same
Browse files Browse the repository at this point in the history
  • Loading branch information
dB2510 committed May 18, 2023
1 parent 15b1f37 commit 9d727a1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ func TestEncode(t *testing.T) {
},
}

// Make sure all the pubkeys are same.
for i := range lock.Validators {
lock.Validators[i].DepositData.PubKey = lock.Validators[i].PubKey
lock.Validators[i].BuilderRegistration.Message.PubKey = lock.Validators[i].PubKey
}

// Lock version prior to v1.6.0 don't support DepositData.
if isAnyVersion(version, v1_0, v1_1, v1_2, v1_3, v1_4, v1_5) {
for i := range lock.Validators {
Expand Down
6 changes: 3 additions & 3 deletions cluster/testdata/cluster_lock_v1_6_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"0x4ebcea406b32d6108bd68584f57e37caac6e33feaa3263a399437024ba9c9b14678a274f01a910ae295f6efbfe5f5abf"
],
"deposit_data": {
"pubkey": "0x44ccde263b5606633e2bf0006f28295d7d39069f01a239c4365854c3af7f6b41d631f92b9a8d12f41257325fff332f75",
"pubkey": "0x1814be823350eab13935f31d84484517e924aef78ae151c00755925836b7075885650c30ec29a3703934bf50a28da102",
"withdrawal_credentials": "0x76b0620556304a3e3eae14c28d0cea39d2901a52720da85ca1e4b38eaf3f44c6",
"amount": "5919415281453547599",
"signature": "0xc6ef8362f2f5640854c15dfcacaa8a2cecce5a3aba53ab705b18db94b4d338a5143e63408d8724b0cf3fae17a3f79be1072fb63c35d6042c4160f38ee9e2a9f3fb4ffb0019b454d522b5ffa17604193fb8966710a7960732ca52cf53c3f520c8"
Expand All @@ -60,13 +60,13 @@
"0x1fbfe831b10b7bf5b15c47a53dbf8e7dcafc9e138647a4b44ed4bce964ed47f74aa594468ced323cb76f0d3fac476c9f"
],
"deposit_data": {
"pubkey": "0xb03fc9228fbae88fd580663a0454b68312207f0a3b584c62316492b49753b5d5027ce15a4f0a58250d8fb50e77f2bf4f",
"pubkey": "0x5125210f0ef1c314090f07c79a6f571c246f3e9ac0b7413ef110bd58b00ce73bff706f7ff4b6f44090a32711f3208e4e",
"withdrawal_credentials": "0x0152e5d49435807f9d4b97be6fb77970466a5626fe33408cf9e88e2c797408a3",
"amount": "534275443587623213",
"signature": "0x329cfffd4a75e498320982c85aad70384859c05a4b13a1d5b2f5bfef5a6ed92da482caa9568e5b6fe9d8a9ddd9eb09277b92cef9046efa18500944cbe800a0b1527ea64729a861d2f6497a3235c37f4192779ec1d96b3b1c5424fce0b727b030"
}
}
],
"signature_aggregate": "0x9347800979d1830356f2a54c3deab2a4b4475d63afbe8fb56987c77f5818526f",
"lock_hash": "0x6f0d53fc66f6adbb1692ec185adeb2bf1880c36e9a2f990c7a8f12bf465f24ac"
"lock_hash": "0xc89f1a4ed2345309ae230f75064d9d58cc0464711f8ce18b3f14a76a5c586e70"
}
10 changes: 5 additions & 5 deletions cluster/testdata/cluster_lock_v1_7_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"0x4ebcea406b32d6108bd68584f57e37caac6e33feaa3263a399437024ba9c9b14678a274f01a910ae295f6efbfe5f5abf"
],
"deposit_data": {
"pubkey": "0x44ccde263b5606633e2bf0006f28295d7d39069f01a239c4365854c3af7f6b41d631f92b9a8d12f41257325fff332f75",
"pubkey": "0x1814be823350eab13935f31d84484517e924aef78ae151c00755925836b7075885650c30ec29a3703934bf50a28da102",
"withdrawal_credentials": "0x76b0620556304a3e3eae14c28d0cea39d2901a52720da85ca1e4b38eaf3f44c6",
"amount": "5919415281453547599",
"signature": "0xc6ef8362f2f5640854c15dfcacaa8a2cecce5a3aba53ab705b18db94b4d338a5143e63408d8724b0cf3fae17a3f79be1072fb63c35d6042c4160f38ee9e2a9f3fb4ffb0019b454d522b5ffa17604193fb8966710a7960732ca52cf53c3f520c8"
Expand All @@ -57,7 +57,7 @@
"fee_recipient": "0x89b79bf504cfb57c7601232d589baccea9d6e263",
"gas_limit": 30000000,
"timestamp": "2000-01-01T00:00:00Z",
"pubkey": "0xafbcbf7f7da41ab0408e3969c2e2cdcf233438bf1774ace7709a4f091e9a83fdeae0ec55eb233a9b5394cb3c7856b546"
"pubkey": "0x1814be823350eab13935f31d84484517e924aef78ae151c00755925836b7075885650c30ec29a3703934bf50a28da102"
},
"signature": "0xd313c8a3b4c1c0e05447f4ba370eb36dbcfdec90b302dcdc3b9ef522e2a6f1ed0afec1f8e20faabedf6b162e717d3a748a58677a0c56348f8921a266b11d0f334c62fe52ba53af19779cb2948b6570ffa0b773963c130ad797ddeafe4e3ad29b"
}
Expand All @@ -69,7 +69,7 @@
"0x1fbfe831b10b7bf5b15c47a53dbf8e7dcafc9e138647a4b44ed4bce964ed47f74aa594468ced323cb76f0d3fac476c9f"
],
"deposit_data": {
"pubkey": "0xb03fc9228fbae88fd580663a0454b68312207f0a3b584c62316492b49753b5d5027ce15a4f0a58250d8fb50e77f2bf4f",
"pubkey": "0x5125210f0ef1c314090f07c79a6f571c246f3e9ac0b7413ef110bd58b00ce73bff706f7ff4b6f44090a32711f3208e4e",
"withdrawal_credentials": "0x0152e5d49435807f9d4b97be6fb77970466a5626fe33408cf9e88e2c797408a3",
"amount": "534275443587623213",
"signature": "0x329cfffd4a75e498320982c85aad70384859c05a4b13a1d5b2f5bfef5a6ed92da482caa9568e5b6fe9d8a9ddd9eb09277b92cef9046efa18500944cbe800a0b1527ea64729a861d2f6497a3235c37f4192779ec1d96b3b1c5424fce0b727b030"
Expand All @@ -79,12 +79,12 @@
"fee_recipient": "0x72e6415a761f03abaa40abc9448fddeb2191d945",
"gas_limit": 30000000,
"timestamp": "2000-01-01T00:00:00Z",
"pubkey": "0xb799acb18e4affabe3037ffe7fa68aa8af5e39cc416e734d373c5ebebc9cdcc595bcce3c7bd3d8df93fab7e125ddebaf"
"pubkey": "0x5125210f0ef1c314090f07c79a6f571c246f3e9ac0b7413ef110bd58b00ce73bff706f7ff4b6f44090a32711f3208e4e"
},
"signature": "0xe65a31bd5d41e2d2ce9c2b17892f0fea1931a290220777a93143dfdcbfa68406e877073ff08834e197a4034aa48afa3f85b8a62708caebbac880b5b89b93da53810164402104e648b6226a1b78021851f5d9ac0f313a89ddfc454c5f8f72ac89"
}
}
],
"signature_aggregate": "0x9347800979d1830356f2a54c3deab2a4b4475d63afbe8fb56987c77f5818526f",
"lock_hash": "0xa3b4a0a4ba40a2b9919cbc581e2ae061fb63f7041416fef9e1301c14f00380ac"
"lock_hash": "0xa9e25fefc6e0e1e081b0c5a43459b111d170260cce006f892898223137bda65d"
}

0 comments on commit 9d727a1

Please sign in to comment.