Skip to content

Commit 0ee2749

Browse files
y0sherMatheusFranco99GalRogozinski
authored
Spec - create validator-registration struct with gas limit (#516)
* chore: receive full validator-registration struct instead of recreating it to allow the runner to manage the gas limit instead of beacon client * use duty slot instead of first slot of epoch * fix tests to store the SignedValidatorRegistration obj * generate JSON tests * add wrongly removed test cases * delete get share --------- Co-authored-by: MatheusFranco99 <[email protected]> Co-authored-by: Gal Rogozinski <[email protected]>
1 parent 4066ef0 commit 0ee2749

24 files changed

+74
-44
lines changed
147 Bytes
Binary file not shown.

ssv/spectest/tests/runner/consensus/invalid_signature.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func InvalidSignature() tests.SpecTest {
158158
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
159159
},
160160
BeaconBroadcastedRoots: []string{
161-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
161+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
162162
},
163163
ExpectedError: expectedError,
164164
},

ssv/spectest/tests/runner/consensus/signedssvmsg_diff_length.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func SignersAndSignaturesWithDifferentLength() tests.SpecTest {
148148
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
149149
},
150150
BeaconBroadcastedRoots: []string{
151-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
151+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
152152
},
153153
ExpectedError: expectedError,
154154
},

ssv/spectest/tests/runner/consensus/signedssvmsg_empty_signature.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func EmptySignature() tests.SpecTest {
148148
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
149149
},
150150
BeaconBroadcastedRoots: []string{
151-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
151+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
152152
},
153153
ExpectedError: expectedError,
154154
},

ssv/spectest/tests/runner/consensus/signedssvmsg_nil_ssvmessage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func NilSSVMessage() tests.SpecTest {
148148
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
149149
},
150150
BeaconBroadcastedRoots: []string{
151-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
151+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
152152
},
153153
ExpectedError: expectedError,
154154
},

ssv/spectest/tests/runner/consensus/signedssvmsg_no_signatures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func NoSignatures() tests.SpecTest {
148148
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
149149
},
150150
BeaconBroadcastedRoots: []string{
151-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
151+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
152152
},
153153
ExpectedError: expectedError,
154154
},

ssv/spectest/tests/runner/consensus/signedssvmsg_no_signers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func NoSigners() tests.SpecTest {
148148
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
149149
},
150150
BeaconBroadcastedRoots: []string{
151-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
151+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
152152
},
153153
ExpectedError: expectedError,
154154
},

ssv/spectest/tests/runner/consensus/signedssvmsg_non_unique_signer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func NonUniqueSigners() tests.SpecTest {
149149
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
150150
},
151151
BeaconBroadcastedRoots: []string{
152-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
152+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
153153
},
154154
ExpectedError: expectedError,
155155
},

ssv/spectest/tests/runner/consensus/signedssvmsg_zero_signer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func ZeroSigner() tests.SpecTest {
148148
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
149149
},
150150
BeaconBroadcastedRoots: []string{
151-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
151+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
152152
},
153153
ExpectedError: expectedError,
154154
},

ssv/spectest/tests/runner/consensus/valid_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func ValidMessage() tests.SpecTest {
134134
testingutils.PreConsensusValidatorRegistrationMsg(ks.Shares[1], 1), // broadcasts when starting a new duty
135135
},
136136
BeaconBroadcastedRoots: []string{
137-
testingutils.GetSSZRootNoError(testingutils.TestingValidatorRegistration),
137+
testingutils.GetSSZRootNoError(testingutils.TestingSignedValidatorRegistration(ks)),
138138
},
139139
ExpectedError: "no consensus phase for validator registration",
140140
},

0 commit comments

Comments
 (0)