EIP-7549: validator client (#14158)

* EIP-7549: validator client

* server code

* tests

* build fix

* review

* remove context

* Revert "Auxiliary commit to revert individual files from 16fed79a1ae0bbe4a08cb9819c2785d6e34958dd"

This reverts commit f59e1459f3f7561e0483bc8542110794951585c5.
This commit is contained in:
Radosław Kapka
2024-07-11 20:41:09 +02:00
committed by GitHub
parent 7c81c7da90
commit 365c6252ba
30 changed files with 1460 additions and 570 deletions

View File

@@ -73,7 +73,7 @@ func TestWaitActivation_StreamSetupFails_AttemptsToReconnect(t *testing.T) {
PublicKeys: [][]byte{kp.pub[:]},
},
).Return(clientStream, errors.New("failed stream")).Return(clientStream, nil)
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -104,7 +104,7 @@ func TestWaitForActivation_ReceiveErrorFromStream_AttemptsReconnection(t *testin
PublicKeys: [][]byte{kp.pub[:]},
},
).Return(clientStream, nil)
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -143,7 +143,7 @@ func TestWaitActivation_LogsActivationEpochOK(t *testing.T) {
PublicKeys: [][]byte{kp.pub[:]},
},
).Return(clientStream, nil)
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -178,7 +178,7 @@ func TestWaitForActivation_Exiting(t *testing.T) {
PublicKeys: [][]byte{kp.pub[:]},
},
).Return(clientStream, nil)
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -221,7 +221,7 @@ func TestWaitForActivation_RefetchKeys(t *testing.T) {
PublicKeys: [][]byte{kp.pub[:]},
},
).Return(clientStream, nil)
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -278,7 +278,7 @@ func TestWaitForActivation_AccountsChanged(t *testing.T) {
time.Sleep(time.Second * 2)
return inactiveClientStream, nil
})
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -370,7 +370,7 @@ func TestWaitForActivation_AccountsChanged(t *testing.T) {
time.Sleep(time.Second * 2)
return inactiveClientStream, nil
})
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},
@@ -431,7 +431,7 @@ func TestWaitActivation_NotAllValidatorsActivatedOK(t *testing.T) {
gomock.Any(),
gomock.Any(),
).Return(clientStream, nil)
prysmChainClient.EXPECT().GetValidatorCount(
prysmChainClient.EXPECT().ValidatorCount(
gomock.Any(),
"head",
[]validatorType.Status{validatorType.Active},