mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-02-17 16:31:32 -05:00
Compare commits
5 Commits
gloas-prop
...
gloas/proc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2200cd007 | ||
|
|
4c36f68190 | ||
|
|
17f4973a5e | ||
|
|
5b36e04f36 | ||
|
|
a9ae4273da |
@@ -11,6 +11,7 @@ go_library(
|
||||
"payload_attestation.go",
|
||||
"pending_payment.go",
|
||||
"proposer_slashing.go",
|
||||
"withdrawal.go",
|
||||
],
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/beacon-chain/core/gloas",
|
||||
visibility = ["//visibility:public"],
|
||||
@@ -49,6 +50,7 @@ go_test(
|
||||
"payload_test.go",
|
||||
"pending_payment_test.go",
|
||||
"proposer_slashing_test.go",
|
||||
"withdrawal_test.go",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
|
||||
@@ -93,26 +93,22 @@ func processDepositRequest(beaconState state.BeaconState, request *enginev1.Depo
|
||||
|
||||
// <spec fn="apply_deposit_for_builder" fork="gloas" hash="e4bc98c7">
|
||||
// def apply_deposit_for_builder(
|
||||
//
|
||||
// state: BeaconState,
|
||||
// pubkey: BLSPubkey,
|
||||
// withdrawal_credentials: Bytes32,
|
||||
// amount: uint64,
|
||||
// signature: BLSSignature,
|
||||
// slot: Slot,
|
||||
//
|
||||
// state: BeaconState,
|
||||
// pubkey: BLSPubkey,
|
||||
// withdrawal_credentials: Bytes32,
|
||||
// amount: uint64,
|
||||
// signature: BLSSignature,
|
||||
// slot: Slot,
|
||||
// ) -> None:
|
||||
//
|
||||
// builder_pubkeys = [b.pubkey for b in state.builders]
|
||||
// if pubkey not in builder_pubkeys:
|
||||
// # Verify the deposit signature (proof of possession) which is not checked by the deposit contract
|
||||
// if is_valid_deposit_signature(pubkey, withdrawal_credentials, amount, signature):
|
||||
// add_builder_to_registry(state, pubkey, withdrawal_credentials, amount, slot)
|
||||
// else:
|
||||
// # Increase balance by deposit amount
|
||||
// builder_index = builder_pubkeys.index(pubkey)
|
||||
// state.builders[builder_index].balance += amount
|
||||
//
|
||||
// builder_pubkeys = [b.pubkey for b in state.builders]
|
||||
// if pubkey not in builder_pubkeys:
|
||||
// # Verify the deposit signature (proof of possession) which is not checked by the deposit contract
|
||||
// if is_valid_deposit_signature(pubkey, withdrawal_credentials, amount, signature):
|
||||
// add_builder_to_registry(state, pubkey, withdrawal_credentials, amount, slot)
|
||||
// else:
|
||||
// # Increase balance by deposit amount
|
||||
// builder_index = builder_pubkeys.index(pubkey)
|
||||
// state.builders[builder_index].balance += amount
|
||||
// </spec>
|
||||
func applyBuilderDepositRequest(beaconState state.BeaconState, request *enginev1.DepositRequest) (bool, error) {
|
||||
if beaconState.Version() < version.Gloas {
|
||||
|
||||
@@ -108,38 +108,10 @@ func ProcessExecutionPayload(
|
||||
st state.BeaconState,
|
||||
signedEnvelope interfaces.ROSignedExecutionPayloadEnvelope,
|
||||
) error {
|
||||
if err := VerifyExecutionPayloadEnvelopeSignature(st, signedEnvelope); err != nil {
|
||||
if err := verifyExecutionPayloadEnvelopeSignature(st, signedEnvelope); err != nil {
|
||||
return errors.Wrap(err, "signature verification failed")
|
||||
}
|
||||
|
||||
envelope, err := signedEnvelope.Envelope()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get envelope from signed envelope")
|
||||
}
|
||||
|
||||
if err := ApplyExecutionPayload(ctx, st, envelope); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r, err := st.HashTreeRoot(ctx)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get hash tree root")
|
||||
}
|
||||
if r != envelope.StateRoot() {
|
||||
return fmt.Errorf("state root mismatch: expected %#x, got %#x", envelope.StateRoot(), r)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ApplyExecutionPayload applies the execution payload envelope to the state and performs the same
|
||||
// consistency checks as the full processing path. This keeps the post-payload state root computation
|
||||
// on a shared code path, even though some bid/payload checks are not strictly required for the root itself.
|
||||
func ApplyExecutionPayload(
|
||||
ctx context.Context,
|
||||
st state.BeaconState,
|
||||
envelope interfaces.ROExecutionPayloadEnvelope,
|
||||
) error {
|
||||
latestHeader := st.LatestBlockHeader()
|
||||
if len(latestHeader.StateRoot) == 0 || bytes.Equal(latestHeader.StateRoot, make([]byte, 32)) {
|
||||
previousStateRoot, err := st.HashTreeRoot(ctx)
|
||||
@@ -156,6 +128,10 @@ func ApplyExecutionPayload(
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not compute block header root")
|
||||
}
|
||||
envelope, err := signedEnvelope.Envelope()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get envelope from signed envelope")
|
||||
}
|
||||
|
||||
beaconBlockRoot := envelope.BeaconBlockRoot()
|
||||
if !bytes.Equal(beaconBlockRoot[:], blockHeaderRoot[:]) {
|
||||
@@ -241,6 +217,14 @@ func ApplyExecutionPayload(
|
||||
return errors.Wrap(err, "could not set latest block hash")
|
||||
}
|
||||
|
||||
r, err := st.HashTreeRoot(ctx)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get hash tree root")
|
||||
}
|
||||
if r != envelope.StateRoot() {
|
||||
return fmt.Errorf("state root mismatch: expected %#x, got %#x", envelope.StateRoot(), r)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -301,28 +285,25 @@ func processExecutionRequests(ctx context.Context, st state.BeaconState, rqs *en
|
||||
return nil
|
||||
}
|
||||
|
||||
// VerifyExecutionPayloadEnvelopeSignature verifies the BLS signature on a signed execution payload envelope.
|
||||
// <spec fn="verify_execution_payload_envelope_signature" fork="gloas" style="full" hash="49483ae2">
|
||||
// def verify_execution_payload_envelope_signature(
|
||||
// verifyExecutionPayloadEnvelopeSignature verifies the BLS signature on a signed execution payload envelope.
|
||||
// Spec v1.7.0-alpha.0 (pseudocode):
|
||||
// builder_index = signed_envelope.message.builder_index
|
||||
// if builder_index == BUILDER_INDEX_SELF_BUILD:
|
||||
//
|
||||
// state: BeaconState, signed_envelope: SignedExecutionPayloadEnvelope
|
||||
// validator_index = state.latest_block_header.proposer_index
|
||||
// pubkey = state.validators[validator_index].pubkey
|
||||
//
|
||||
// ) -> bool:
|
||||
// else:
|
||||
//
|
||||
// builder_index = signed_envelope.message.builder_index
|
||||
// if builder_index == BUILDER_INDEX_SELF_BUILD:
|
||||
// validator_index = state.latest_block_header.proposer_index
|
||||
// pubkey = state.validators[validator_index].pubkey
|
||||
// else:
|
||||
// pubkey = state.builders[builder_index].pubkey
|
||||
// pubkey = state.builders[builder_index].pubkey
|
||||
//
|
||||
// signing_root = compute_signing_root(
|
||||
// signed_envelope.message, get_domain(state, DOMAIN_BEACON_BUILDER)
|
||||
// )
|
||||
// return bls.Verify(pubkey, signing_root, signed_envelope.signature)
|
||||
// signing_root = compute_signing_root(
|
||||
//
|
||||
// </spec>
|
||||
func VerifyExecutionPayloadEnvelopeSignature(st state.BeaconState, signedEnvelope interfaces.ROSignedExecutionPayloadEnvelope) error {
|
||||
// signed_envelope.message, get_domain(state, DOMAIN_BEACON_BUILDER)
|
||||
//
|
||||
// )
|
||||
// return bls.Verify(pubkey, signing_root, signed_envelope.signature)
|
||||
func verifyExecutionPayloadEnvelopeSignature(st state.BeaconState, signedEnvelope interfaces.ROSignedExecutionPayloadEnvelope) error {
|
||||
envelope, err := signedEnvelope.Envelope()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get envelope: %w", err)
|
||||
|
||||
@@ -69,16 +69,16 @@ func buildPayloadFixture(t *testing.T, mutate func(payload *enginev1.ExecutionPa
|
||||
}
|
||||
|
||||
bid := ðpb.ExecutionPayloadBid{
|
||||
ParentBlockHash: parentHash,
|
||||
ParentBlockRoot: bytes.Repeat([]byte{0xDD}, 32),
|
||||
BlockHash: blockHash,
|
||||
PrevRandao: randao,
|
||||
GasLimit: 1,
|
||||
BuilderIndex: builderIdx,
|
||||
Slot: slot,
|
||||
Value: 0,
|
||||
ExecutionPayment: 0,
|
||||
FeeRecipient: bytes.Repeat([]byte{0xEE}, 20),
|
||||
ParentBlockHash: parentHash,
|
||||
ParentBlockRoot: bytes.Repeat([]byte{0xDD}, 32),
|
||||
BlockHash: blockHash,
|
||||
PrevRandao: randao,
|
||||
GasLimit: 1,
|
||||
BuilderIndex: builderIdx,
|
||||
Slot: slot,
|
||||
Value: 0,
|
||||
ExecutionPayment: 0,
|
||||
FeeRecipient: bytes.Repeat([]byte{0xEE}, 20),
|
||||
}
|
||||
|
||||
header := ðpb.BeaconBlockHeader{
|
||||
@@ -91,11 +91,11 @@ func buildPayloadFixture(t *testing.T, mutate func(payload *enginev1.ExecutionPa
|
||||
require.NoError(t, err)
|
||||
|
||||
envelope := ðpb.ExecutionPayloadEnvelope{
|
||||
Slot: slot,
|
||||
BuilderIndex: builderIdx,
|
||||
BeaconBlockRoot: headerRoot[:],
|
||||
Payload: payload,
|
||||
ExecutionRequests: &enginev1.ExecutionRequests{},
|
||||
Slot: slot,
|
||||
BuilderIndex: builderIdx,
|
||||
BeaconBlockRoot: headerRoot[:],
|
||||
Payload: payload,
|
||||
ExecutionRequests: &enginev1.ExecutionRequests{},
|
||||
}
|
||||
|
||||
if mutate != nil {
|
||||
@@ -297,14 +297,14 @@ func TestVerifyExecutionPayloadEnvelopeSignature(t *testing.T) {
|
||||
signed, err := blocks.WrappedROSignedExecutionPayloadEnvelope(signedProto)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, VerifyExecutionPayloadEnvelopeSignature(st, signed))
|
||||
require.NoError(t, verifyExecutionPayloadEnvelopeSignature(st, signed))
|
||||
})
|
||||
|
||||
t.Run("builder", func(t *testing.T) {
|
||||
signed, err := blocks.WrappedROSignedExecutionPayloadEnvelope(fixture.signedProto)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, VerifyExecutionPayloadEnvelopeSignature(fixture.state, signed))
|
||||
require.NoError(t, verifyExecutionPayloadEnvelopeSignature(fixture.state, signed))
|
||||
})
|
||||
|
||||
t.Run("invalid signature", func(t *testing.T) {
|
||||
@@ -330,7 +330,7 @@ func TestVerifyExecutionPayloadEnvelopeSignature(t *testing.T) {
|
||||
badSigned, err := blocks.WrappedROSignedExecutionPayloadEnvelope(signedProto)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = VerifyExecutionPayloadEnvelopeSignature(st, badSigned)
|
||||
err = verifyExecutionPayloadEnvelopeSignature(st, badSigned)
|
||||
require.ErrorContains(t, "invalid signature format", err)
|
||||
})
|
||||
|
||||
@@ -342,7 +342,7 @@ func TestVerifyExecutionPayloadEnvelopeSignature(t *testing.T) {
|
||||
badSigned, err := blocks.WrappedROSignedExecutionPayloadEnvelope(signedProto)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = VerifyExecutionPayloadEnvelopeSignature(fixture.state, badSigned)
|
||||
err = verifyExecutionPayloadEnvelopeSignature(fixture.state, badSigned)
|
||||
require.ErrorContains(t, "invalid signature format", err)
|
||||
})
|
||||
})
|
||||
|
||||
100
beacon-chain/core/gloas/withdrawal.go
Normal file
100
beacon-chain/core/gloas/withdrawal.go
Normal file
@@ -0,0 +1,100 @@
|
||||
package gloas
|
||||
|
||||
import (
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ProcessWithdrawals applies withdrawals to the state for Gloas.
|
||||
//
|
||||
// <spec fn="process_withdrawals" fork="gloas" hash="16d9ad2a">
|
||||
// def process_withdrawals(
|
||||
// state: BeaconState,
|
||||
// # [Modified in Gloas:EIP7732]
|
||||
// # Removed `payload`
|
||||
// ) -> None:
|
||||
// # [New in Gloas:EIP7732]
|
||||
// # Return early if the parent block is empty
|
||||
// if not is_parent_block_full(state):
|
||||
// return
|
||||
//
|
||||
// # Get expected withdrawals
|
||||
// expected = get_expected_withdrawals(state)
|
||||
//
|
||||
// # Apply expected withdrawals
|
||||
// apply_withdrawals(state, expected.withdrawals)
|
||||
//
|
||||
// # Update withdrawals fields in the state
|
||||
// update_next_withdrawal_index(state, expected.withdrawals)
|
||||
// # [New in Gloas:EIP7732]
|
||||
// update_payload_expected_withdrawals(state, expected.withdrawals)
|
||||
// # [New in Gloas:EIP7732]
|
||||
// update_builder_pending_withdrawals(state, expected.processed_builder_withdrawals_count)
|
||||
// update_pending_partial_withdrawals(state, expected.processed_partial_withdrawals_count)
|
||||
// # [New in Gloas:EIP7732]
|
||||
// update_next_withdrawal_builder_index(state, expected.processed_builders_sweep_count)
|
||||
// update_next_withdrawal_validator_index(state, expected.withdrawals)
|
||||
// </spec>
|
||||
func ProcessWithdrawals(st state.BeaconState) error {
|
||||
full, err := st.IsParentBlockFull()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get parent block full status")
|
||||
}
|
||||
if !full {
|
||||
return nil
|
||||
}
|
||||
|
||||
expected, err := st.ExpectedWithdrawalsGloas()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get expected withdrawals")
|
||||
}
|
||||
|
||||
if err := st.DecreaseWithdrawalBalances(expected.Withdrawals); err != nil {
|
||||
return errors.Wrap(err, "could not decrease withdrawal balances")
|
||||
}
|
||||
|
||||
if len(expected.Withdrawals) > 0 {
|
||||
if err := st.SetNextWithdrawalIndex(expected.Withdrawals[len(expected.Withdrawals)-1].Index + 1); err != nil {
|
||||
return errors.Wrap(err, "could not set next withdrawal index")
|
||||
}
|
||||
}
|
||||
|
||||
if err := st.SetPayloadExpectedWithdrawals(expected.Withdrawals); err != nil {
|
||||
return errors.Wrap(err, "could not set payload expected withdrawals")
|
||||
}
|
||||
|
||||
if err := st.DequeueBuilderPendingWithdrawals(expected.ProcessedBuilderWithdrawalsCount); err != nil {
|
||||
return errors.Wrap(err, "unable to dequeue builder pending withdrawals from state")
|
||||
}
|
||||
|
||||
if err := st.DequeuePendingPartialWithdrawals(expected.ProcessedPartialWithdrawalsCount); err != nil {
|
||||
return errors.Wrap(err, "unable to dequeue partial withdrawals from state")
|
||||
}
|
||||
|
||||
err = st.SetNextWithdrawalBuilderIndex(expected.NextWithdrawalBuilderIndex)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not set next withdrawal builder index")
|
||||
}
|
||||
|
||||
var nextValidatorIndex primitives.ValidatorIndex
|
||||
if uint64(len(expected.Withdrawals)) < params.BeaconConfig().MaxWithdrawalsPerPayload {
|
||||
nextValidatorIndex, err = st.NextWithdrawalValidatorIndex()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not get next withdrawal validator index")
|
||||
}
|
||||
nextValidatorIndex += primitives.ValidatorIndex(params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep)
|
||||
nextValidatorIndex = nextValidatorIndex % primitives.ValidatorIndex(st.NumValidators())
|
||||
} else {
|
||||
nextValidatorIndex = expected.Withdrawals[len(expected.Withdrawals)-1].ValidatorIndex + 1
|
||||
if nextValidatorIndex == primitives.ValidatorIndex(st.NumValidators()) {
|
||||
nextValidatorIndex = 0
|
||||
}
|
||||
}
|
||||
if err := st.SetNextWithdrawalValidatorIndex(nextValidatorIndex); err != nil {
|
||||
return errors.Wrap(err, "could not set next withdrawal validator index")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
388
beacon-chain/core/gloas/withdrawal_test.go
Normal file
388
beacon-chain/core/gloas/withdrawal_test.go
Normal file
@@ -0,0 +1,388 @@
|
||||
package gloas
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func TestProcessWithdrawals(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
build func(t *testing.T) *withdrawalsState
|
||||
check func(t *testing.T, st *withdrawalsState)
|
||||
}{
|
||||
{
|
||||
name: "parent block not full",
|
||||
build: func(t *testing.T) *withdrawalsState {
|
||||
return &withdrawalsState{
|
||||
BeaconState: newGloasState(t, nil, nil),
|
||||
parentFull: false,
|
||||
}
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, false, st.expectedCalled)
|
||||
require.Equal(t, false, st.decreaseCalled)
|
||||
require.Equal(t, false, st.setNextWithdrawalIndexCalled)
|
||||
require.Equal(t, false, st.setPayloadExpectedWithdrawalsCalled)
|
||||
require.Equal(t, false, st.dequeueBuilderCalled)
|
||||
require.Equal(t, false, st.dequeuePartialCalled)
|
||||
require.Equal(t, false, st.setNextBuilderIndexCalled)
|
||||
require.Equal(t, false, st.nextValidatorIndexCalled)
|
||||
require.Equal(t, false, st.setNextValidatorIndexCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "updates indexes when not full payload",
|
||||
build: func(t *testing.T) *withdrawalsState {
|
||||
return &withdrawalsState{
|
||||
BeaconState: newGloasState(t, nil, nil),
|
||||
parentFull: true,
|
||||
numValidators: 10,
|
||||
nextValidatorIndex: 3,
|
||||
expectedResult: state.ExpectedWithdrawalsGloasResult{
|
||||
Withdrawals: []*enginev1.Withdrawal{
|
||||
{Index: 7, ValidatorIndex: 2, Amount: 1, Address: []byte{0x01}},
|
||||
{Index: 8, ValidatorIndex: 4, Amount: 2, Address: []byte{0x02}},
|
||||
},
|
||||
ProcessedBuilderWithdrawalsCount: 5,
|
||||
ProcessedPartialWithdrawalsCount: 2,
|
||||
NextWithdrawalBuilderIndex: 7,
|
||||
},
|
||||
}
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.expectedCalled)
|
||||
require.Equal(t, true, st.decreaseCalled)
|
||||
require.NotNil(t, st.setNextWithdrawalIndexArg)
|
||||
require.Equal(t, uint64(9), *st.setNextWithdrawalIndexArg)
|
||||
require.DeepEqual(t, st.expectedResult.Withdrawals, st.setPayloadExpectedWithdrawalsArg)
|
||||
require.Equal(t, uint64(5), *st.dequeueBuilderArg)
|
||||
require.Equal(t, uint64(2), *st.dequeuePartialArg)
|
||||
require.Equal(t, primitives.BuilderIndex(7), *st.setNextBuilderIndexArg)
|
||||
require.Equal(t, true, st.nextValidatorIndexCalled)
|
||||
|
||||
expectedNext := (uint64(st.nextValidatorIndex) + uint64(params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep)) % st.numValidators
|
||||
require.Equal(t, primitives.ValidatorIndex(expectedNext), *st.setNextValidatorIndexArg)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "full payload uses last validator index",
|
||||
build: func(t *testing.T) *withdrawalsState {
|
||||
max := int(params.BeaconConfig().MaxWithdrawalsPerPayload)
|
||||
withdrawals := make([]*enginev1.Withdrawal, max)
|
||||
for i := range max {
|
||||
withdrawals[i] = &enginev1.Withdrawal{
|
||||
Index: uint64(i),
|
||||
ValidatorIndex: 0,
|
||||
Amount: 1,
|
||||
Address: []byte{0x03},
|
||||
}
|
||||
}
|
||||
withdrawals[max-1].ValidatorIndex = 4
|
||||
|
||||
return &withdrawalsState{
|
||||
BeaconState: newGloasState(t, nil, nil),
|
||||
parentFull: true,
|
||||
numValidators: 5,
|
||||
expectedResult: state.ExpectedWithdrawalsGloasResult{
|
||||
Withdrawals: withdrawals,
|
||||
NextWithdrawalBuilderIndex: 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
max := int(params.BeaconConfig().MaxWithdrawalsPerPayload)
|
||||
require.NotNil(t, st.setNextWithdrawalIndexArg)
|
||||
require.Equal(t, uint64(max), *st.setNextWithdrawalIndexArg)
|
||||
require.Equal(t, false, st.nextValidatorIndexCalled)
|
||||
require.Equal(t, primitives.ValidatorIndex(0), *st.setNextValidatorIndexArg)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "empty withdrawals skips next index update",
|
||||
build: func(t *testing.T) *withdrawalsState {
|
||||
return &withdrawalsState{
|
||||
BeaconState: newGloasState(t, nil, nil),
|
||||
parentFull: true,
|
||||
numValidators: 8,
|
||||
expectedResult: state.ExpectedWithdrawalsGloasResult{
|
||||
Withdrawals: []*enginev1.Withdrawal{},
|
||||
ProcessedBuilderWithdrawalsCount: 1,
|
||||
ProcessedPartialWithdrawalsCount: 2,
|
||||
NextWithdrawalBuilderIndex: 4,
|
||||
},
|
||||
}
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, false, st.setNextWithdrawalIndexCalled)
|
||||
require.Equal(t, true, st.setPayloadExpectedWithdrawalsCalled)
|
||||
require.Equal(t, true, st.dequeueBuilderCalled)
|
||||
require.Equal(t, true, st.dequeuePartialCalled)
|
||||
require.Equal(t, true, st.setNextBuilderIndexCalled)
|
||||
require.Equal(t, true, st.nextValidatorIndexCalled)
|
||||
require.Equal(t, true, st.setNextValidatorIndexCalled)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
st := tc.build(t)
|
||||
require.NoError(t, ProcessWithdrawals(st))
|
||||
if tc.check != nil {
|
||||
tc.check(t, st)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestProcessWithdrawals_ErrorPaths(t *testing.T) {
|
||||
base := func(t *testing.T) *withdrawalsState {
|
||||
return &withdrawalsState{
|
||||
BeaconState: newGloasState(t, nil, nil),
|
||||
parentFull: true,
|
||||
numValidators: 16,
|
||||
expectedResult: state.ExpectedWithdrawalsGloasResult{
|
||||
Withdrawals: []*enginev1.Withdrawal{
|
||||
{Index: 1, ValidatorIndex: 2, Amount: 1, Address: []byte{0x01}},
|
||||
},
|
||||
ProcessedBuilderWithdrawalsCount: 1,
|
||||
ProcessedPartialWithdrawalsCount: 1,
|
||||
NextWithdrawalBuilderIndex: 2,
|
||||
},
|
||||
nextValidatorIndex: 5,
|
||||
}
|
||||
}
|
||||
|
||||
cases := []struct {
|
||||
name string
|
||||
err error
|
||||
set func(st *withdrawalsState, err error)
|
||||
check func(t *testing.T, st *withdrawalsState)
|
||||
}{
|
||||
{
|
||||
name: "parent block full error",
|
||||
err: errors.New("parent err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.parentErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, false, st.expectedCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "expected withdrawals error",
|
||||
err: errors.New("expected err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.expectedErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.expectedCalled)
|
||||
require.Equal(t, false, st.decreaseCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "decrease balances error",
|
||||
err: errors.New("decrease err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.decreaseErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.decreaseCalled)
|
||||
require.Equal(t, false, st.setNextWithdrawalIndexCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "set next withdrawal index error",
|
||||
err: errors.New("next index err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.setNextWithdrawalIndexErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.setNextWithdrawalIndexCalled)
|
||||
require.Equal(t, false, st.setPayloadExpectedWithdrawalsCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "set payload expected withdrawals error",
|
||||
err: errors.New("payload expected err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.setPayloadExpectedWithdrawalsErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.setPayloadExpectedWithdrawalsCalled)
|
||||
require.Equal(t, false, st.dequeueBuilderCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "dequeue builder pending withdrawals error",
|
||||
err: errors.New("dequeue builder err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.dequeueBuilderErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.dequeueBuilderCalled)
|
||||
require.Equal(t, false, st.dequeuePartialCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "dequeue pending partial withdrawals error",
|
||||
err: errors.New("dequeue partial err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.dequeuePartialErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.dequeuePartialCalled)
|
||||
require.Equal(t, false, st.setNextBuilderIndexCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "set next withdrawal builder index error",
|
||||
err: errors.New("next builder err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.setNextBuilderIndexErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.setNextBuilderIndexCalled)
|
||||
require.Equal(t, false, st.nextValidatorIndexCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "next withdrawal validator index error",
|
||||
err: errors.New("next validator err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.nextValidatorIndexErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.nextValidatorIndexCalled)
|
||||
require.Equal(t, false, st.setNextValidatorIndexCalled)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "set next withdrawal validator index error",
|
||||
err: errors.New("set next validator err"),
|
||||
set: func(st *withdrawalsState, err error) {
|
||||
st.setNextValidatorIndexErr = err
|
||||
},
|
||||
check: func(t *testing.T, st *withdrawalsState) {
|
||||
require.Equal(t, true, st.setNextValidatorIndexCalled)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
st := base(t)
|
||||
tc.set(st, tc.err)
|
||||
err := ProcessWithdrawals(st)
|
||||
require.ErrorIs(t, err, tc.err)
|
||||
if tc.check != nil {
|
||||
tc.check(t, st)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
type withdrawalsState struct {
|
||||
setNextValidatorIndexCalled bool
|
||||
nextValidatorIndexCalled bool
|
||||
setNextBuilderIndexCalled bool
|
||||
dequeuePartialCalled bool
|
||||
dequeueBuilderCalled bool
|
||||
setPayloadExpectedWithdrawalsCalled bool
|
||||
setNextWithdrawalIndexCalled bool
|
||||
parentFull bool
|
||||
expectedCalled bool
|
||||
decreaseCalled bool
|
||||
numValidators uint64
|
||||
setNextWithdrawalIndexArg *uint64
|
||||
nextValidatorIndex primitives.ValidatorIndex
|
||||
setNextBuilderIndexArg *primitives.BuilderIndex
|
||||
dequeuePartialArg *uint64
|
||||
setNextValidatorIndexArg *primitives.ValidatorIndex
|
||||
dequeueBuilderArg *uint64
|
||||
state.BeaconState
|
||||
setNextValidatorIndexErr error
|
||||
setNextBuilderIndexErr error
|
||||
dequeuePartialErr error
|
||||
dequeueBuilderErr error
|
||||
setPayloadExpectedWithdrawalsErr error
|
||||
nextValidatorIndexErr error
|
||||
decreaseErr error
|
||||
expectedErr error
|
||||
parentErr error
|
||||
setNextWithdrawalIndexErr error
|
||||
setPayloadExpectedWithdrawalsArg []*enginev1.Withdrawal
|
||||
expectedResult state.ExpectedWithdrawalsGloasResult
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) IsParentBlockFull() (bool, error) {
|
||||
return w.parentFull, w.parentErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) ExpectedWithdrawalsGloas() (state.ExpectedWithdrawalsGloasResult, error) {
|
||||
w.expectedCalled = true
|
||||
if w.expectedErr != nil {
|
||||
return state.ExpectedWithdrawalsGloasResult{}, w.expectedErr
|
||||
}
|
||||
return w.expectedResult, nil
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) DecreaseWithdrawalBalances(_ []*enginev1.Withdrawal) error {
|
||||
w.decreaseCalled = true
|
||||
return w.decreaseErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) SetNextWithdrawalIndex(index uint64) error {
|
||||
w.setNextWithdrawalIndexCalled = true
|
||||
w.setNextWithdrawalIndexArg = &index
|
||||
return w.setNextWithdrawalIndexErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) SetPayloadExpectedWithdrawals(withdrawals []*enginev1.Withdrawal) error {
|
||||
w.setPayloadExpectedWithdrawalsCalled = true
|
||||
w.setPayloadExpectedWithdrawalsArg = withdrawals
|
||||
return w.setPayloadExpectedWithdrawalsErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) DequeueBuilderPendingWithdrawals(n uint64) error {
|
||||
w.dequeueBuilderCalled = true
|
||||
w.dequeueBuilderArg = &n
|
||||
return w.dequeueBuilderErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) DequeuePendingPartialWithdrawals(n uint64) error {
|
||||
w.dequeuePartialCalled = true
|
||||
w.dequeuePartialArg = &n
|
||||
return w.dequeuePartialErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) SetNextWithdrawalBuilderIndex(index primitives.BuilderIndex) error {
|
||||
w.setNextBuilderIndexCalled = true
|
||||
w.setNextBuilderIndexArg = &index
|
||||
return w.setNextBuilderIndexErr
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) NextWithdrawalValidatorIndex() (primitives.ValidatorIndex, error) {
|
||||
w.nextValidatorIndexCalled = true
|
||||
if w.nextValidatorIndexErr != nil {
|
||||
return 0, w.nextValidatorIndexErr
|
||||
}
|
||||
return w.nextValidatorIndex, nil
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) NumValidators() int {
|
||||
return int(w.numValidators)
|
||||
}
|
||||
|
||||
func (w *withdrawalsState) SetNextWithdrawalValidatorIndex(index primitives.ValidatorIndex) error {
|
||||
w.setNextValidatorIndexCalled = true
|
||||
w.setNextValidatorIndexArg = &index
|
||||
return w.setNextValidatorIndexErr
|
||||
}
|
||||
@@ -211,7 +211,7 @@ func (s *Store) updateBestDescendantConsensusNode(ctx context.Context, n *Node,
|
||||
n.bestDescendant = en.bestDescendant
|
||||
return nil
|
||||
}
|
||||
// TODO Gloas: pick between full or empty
|
||||
// TODO GLOAS: pick between full or empty
|
||||
if err := s.updateBestDescendantPayloadNode(ctx, fn, justifiedEpoch, finalizedEpoch, currentEpoch); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ func (s *Store) pruneFinalizedNodeByRootMap(ctx context.Context, node, finalized
|
||||
|
||||
// prune prunes the fork choice store. It removes all nodes that compete with the finalized root.
|
||||
// This function does not prune for invalid optimistically synced nodes, it deals only with pruning upon finalization
|
||||
// TODO: Gloas, to ensure that chains up to a full node are found, we may want to consider pruning only up to the latest full block that was finalized
|
||||
// TODO: GLOAS, to ensure that chains up to a full node are found, we may want to consider pruning only up to the latest full block that was finalized
|
||||
func (s *Store) prune(ctx context.Context) error {
|
||||
ctx, span := trace.StartSpan(ctx, "doublyLinkedForkchoice.Prune")
|
||||
defer span.End()
|
||||
|
||||
@@ -84,6 +84,7 @@ func TestGetSpec(t *testing.T) {
|
||||
config.FuluForkVersion = []byte("FuluForkVersion")
|
||||
config.FuluForkEpoch = 109
|
||||
config.GloasForkEpoch = 110
|
||||
config.MaxBuildersPerWithdrawalsSweep = 112
|
||||
config.BLSWithdrawalPrefixByte = byte('b')
|
||||
config.ETH1AddressWithdrawalPrefixByte = byte('c')
|
||||
config.BuilderWithdrawalPrefixByte = byte('e')
|
||||
@@ -221,7 +222,7 @@ func TestGetSpec(t *testing.T) {
|
||||
require.NoError(t, json.Unmarshal(writer.Body.Bytes(), &resp))
|
||||
data, ok := resp.Data.(map[string]any)
|
||||
require.Equal(t, true, ok)
|
||||
assert.Equal(t, 192, len(data))
|
||||
assert.Equal(t, 193, len(data))
|
||||
for k, v := range data {
|
||||
t.Run(k, func(t *testing.T) {
|
||||
switch k {
|
||||
@@ -303,6 +304,8 @@ func TestGetSpec(t *testing.T) {
|
||||
assert.Equal(t, "109", v)
|
||||
case "GLOAS_FORK_EPOCH":
|
||||
assert.Equal(t, "110", v)
|
||||
case "MAX_BUILDERS_PER_WITHDRAWALS_SWEEP":
|
||||
assert.Equal(t, "112", v)
|
||||
case "MIN_ANCHOR_POW_BLOCK_DIFFICULTY":
|
||||
assert.Equal(t, "1000", v)
|
||||
case "BLS_WITHDRAWAL_PREFIX":
|
||||
|
||||
@@ -5,7 +5,6 @@ go_library(
|
||||
srcs = [
|
||||
"handlers.go",
|
||||
"handlers_block.go",
|
||||
"handlers_gloas.go",
|
||||
"log.go",
|
||||
"server.go",
|
||||
],
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/network/httputil"
|
||||
)
|
||||
|
||||
// ProduceBlockV4 requests a beacon node to produce a valid Gloas block.
|
||||
//
|
||||
// TODO: Implement Gloas-specific block production.
|
||||
// Endpoint: GET /eth/v4/validator/blocks/{slot}
|
||||
func (s *Server) ProduceBlockV4(w http.ResponseWriter, r *http.Request) {
|
||||
httputil.HandleError(w, "ProduceBlockV4 not yet implemented", http.StatusNotImplemented)
|
||||
}
|
||||
|
||||
// ExecutionPayloadEnvelope retrieves a cached execution payload envelope.
|
||||
//
|
||||
// TODO: Implement envelope retrieval from cache.
|
||||
// Endpoint: GET /eth/v1/validator/execution_payload_envelope/{slot}/{builder_index}
|
||||
func (s *Server) ExecutionPayloadEnvelope(w http.ResponseWriter, r *http.Request) {
|
||||
httputil.HandleError(w, "ExecutionPayloadEnvelope not yet implemented", http.StatusNotImplemented)
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope broadcasts a signed execution payload envelope.
|
||||
//
|
||||
// TODO: Implement envelope validation and broadcast.
|
||||
// Endpoint: POST /eth/v1/beacon/execution_payload_envelope
|
||||
func (s *Server) PublishExecutionPayloadEnvelope(w http.ResponseWriter, r *http.Request) {
|
||||
httputil.HandleError(w, "PublishExecutionPayloadEnvelope not yet implemented", http.StatusNotImplemented)
|
||||
}
|
||||
@@ -26,9 +26,6 @@ go_library(
|
||||
"proposer_eth1data.go",
|
||||
"proposer_execution_payload.go",
|
||||
"proposer_exits.go",
|
||||
"proposer_bid.go",
|
||||
"proposer_payload_attestation.go",
|
||||
"proposer_payload_envelope.go",
|
||||
"proposer_slashings.go",
|
||||
"proposer_sync_aggregate.go",
|
||||
"server.go",
|
||||
@@ -48,7 +45,6 @@ go_library(
|
||||
"//beacon-chain/cache/depositsnapshot:go_default_library",
|
||||
"//beacon-chain/core/blocks:go_default_library",
|
||||
"//beacon-chain/core/electra:go_default_library",
|
||||
"//beacon-chain/core/gloas:go_default_library",
|
||||
"//beacon-chain/core/feed:go_default_library",
|
||||
"//beacon-chain/core/feed/block:go_default_library",
|
||||
"//beacon-chain/core/feed/operation:go_default_library",
|
||||
|
||||
@@ -57,11 +57,6 @@ func (vs *Server) constructGenericBeaconBlock(
|
||||
return nil, fmt.Errorf("expected *BlobsBundleV2, got %T", blobsBundler)
|
||||
}
|
||||
return vs.constructFuluBlock(blockProto, isBlinded, bidStr, bundle), nil
|
||||
case version.Gloas:
|
||||
// Gloas blocks do not carry a separate payload value — the bid is part of the block body.
|
||||
return ðpb.GenericBeaconBlock{
|
||||
Block: ðpb.GenericBeaconBlock_Gloas{Gloas: blockProto.(*ethpb.BeaconBlockGloas)},
|
||||
}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown block version: %d", sBlk.Version())
|
||||
}
|
||||
|
||||
@@ -237,50 +237,35 @@ func (vs *Server) BuildBlockParallel(ctx context.Context, sBlk interfaces.Signed
|
||||
|
||||
// Set bls to execution change. New in Capella.
|
||||
vs.setBlsToExecData(sBlk, head)
|
||||
|
||||
// Set payload attestations. New in Gloas.
|
||||
if sBlk.Version() >= version.Gloas {
|
||||
if err := sBlk.SetPayloadAttestations(vs.getPayloadAttestations(ctx, head)); err != nil {
|
||||
log.WithError(err).Error("Could not set payload attestations")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
winningBid := primitives.ZeroWei()
|
||||
var bundle enginev1.BlobsBundler
|
||||
var local *blocks.GetPayloadResponse
|
||||
if sBlk.Version() >= version.Bellatrix {
|
||||
var err error
|
||||
local, err = vs.getLocalPayload(ctx, sBlk.Block(), head)
|
||||
local, err := vs.getLocalPayload(ctx, sBlk.Block(), head)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not get local payload: %v", err)
|
||||
}
|
||||
|
||||
if sBlk.Version() < version.Gloas {
|
||||
// There's no reason to try to get a builder bid if local override is true.
|
||||
var builderBid builderapi.Bid
|
||||
if !(local.OverrideBuilder || skipMevBoost) {
|
||||
latestHeader, err := head.LatestExecutionPayloadHeader()
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not get latest execution payload header: %v", err)
|
||||
}
|
||||
parentGasLimit := latestHeader.GasLimit()
|
||||
builderBid, err = vs.getBuilderPayloadAndBlobs(ctx, sBlk.Block().Slot(), sBlk.Block().ProposerIndex(), parentGasLimit)
|
||||
if err != nil {
|
||||
builderGetPayloadMissCount.Inc()
|
||||
log.WithError(err).Error("Could not get builder payload")
|
||||
}
|
||||
}
|
||||
|
||||
winningBid, bundle, err = setExecutionData(ctx, sBlk, local, builderBid, builderBoostFactor)
|
||||
// There's no reason to try to get a builder bid if local override is true.
|
||||
var builderBid builderapi.Bid
|
||||
if !(local.OverrideBuilder || skipMevBoost) {
|
||||
latestHeader, err := head.LatestExecutionPayloadHeader()
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not set execution data: %v", err)
|
||||
return nil, status.Errorf(codes.Internal, "Could not get latest execution payload header: %v", err)
|
||||
}
|
||||
} else {
|
||||
if err := vs.setSelfBuildExecutionPayloadBid(ctx, sBlk, local); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not set execution data for Gloas: %v", err)
|
||||
parentGasLimit := latestHeader.GasLimit()
|
||||
builderBid, err = vs.getBuilderPayloadAndBlobs(ctx, sBlk.Block().Slot(), sBlk.Block().ProposerIndex(), parentGasLimit)
|
||||
if err != nil {
|
||||
builderGetPayloadMissCount.Inc()
|
||||
log.WithError(err).Error("Could not get builder payload")
|
||||
}
|
||||
}
|
||||
|
||||
winningBid, bundle, err = setExecutionData(ctx, sBlk, local, builderBid, builderBoostFactor)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not set execution data: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
@@ -291,15 +276,6 @@ func (vs *Server) BuildBlockParallel(ctx context.Context, sBlk interfaces.Signed
|
||||
}
|
||||
sBlk.SetStateRoot(sr)
|
||||
|
||||
// For Gloas, build and cache the execution payload envelope now that the block
|
||||
// is fully built (state root set). The envelope needs the final block HTR as
|
||||
// BeaconBlockRoot and the post-payload state root as StateRoot.
|
||||
if sBlk.Version() >= version.Gloas {
|
||||
if err := vs.storeExecutionPayloadEnvelope(ctx, sBlk, local); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not build execution payload envelope: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
return vs.constructGenericBeaconBlock(sBlk, bundle, winningBid)
|
||||
}
|
||||
|
||||
@@ -344,7 +320,7 @@ func (vs *Server) ProposeBeaconBlock(ctx context.Context, req *ethpb.GenericSign
|
||||
log.WithError(err).Info("Optimistically proposed block - builder relay temporarily unavailable, block may arrive over P2P")
|
||||
return ðpb.ProposeResponse{BlockRoot: root[:]}, nil
|
||||
}
|
||||
} else if block.Version() >= version.Deneb && block.Version() < version.Gloas {
|
||||
} else if block.Version() >= version.Deneb {
|
||||
blobSidecars, dataColumnSidecars, err = vs.handleUnblindedBlock(rob, req)
|
||||
}
|
||||
if err != nil {
|
||||
@@ -365,10 +341,8 @@ func (vs *Server) ProposeBeaconBlock(ctx context.Context, req *ethpb.GenericSign
|
||||
|
||||
wg.Wait()
|
||||
|
||||
if block.Version() < version.Gloas {
|
||||
if err := vs.broadcastAndReceiveSidecars(ctx, block, root, blobSidecars, dataColumnSidecars); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not broadcast/receive sidecars: %v", err)
|
||||
}
|
||||
if err := vs.broadcastAndReceiveSidecars(ctx, block, root, blobSidecars, dataColumnSidecars); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not broadcast/receive sidecars: %v", err)
|
||||
}
|
||||
if err := <-errChan; err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not broadcast/receive block: %v", err)
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
consensusblocks "github.com/OffchainLabs/prysm/v7/consensus-types/blocks"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v7/monitoring/tracing/trace"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// setSelfBuildExecutionPayloadBid creates an execution payload bid from the local payload
|
||||
// and sets it on the block body. The envelope is created and cached later by
|
||||
// storeExecutionPayloadEnvelope once the block is fully built.
|
||||
func (vs *Server) setSelfBuildExecutionPayloadBid(
|
||||
ctx context.Context,
|
||||
sBlk interfaces.SignedBeaconBlock,
|
||||
local *consensusblocks.GetPayloadResponse,
|
||||
) error {
|
||||
_, span := trace.StartSpan(ctx, "ProposerServer.setSelfBuildExecutionPayloadBid")
|
||||
defer span.End()
|
||||
|
||||
if local == nil || local.ExecutionData == nil {
|
||||
return errors.New("local execution payload is nil")
|
||||
}
|
||||
|
||||
// Create execution payload bid from the local payload.
|
||||
bid, err := vs.createSelfBuildExecutionPayloadBid(local, sBlk.Block())
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not create execution payload bid")
|
||||
}
|
||||
|
||||
// Per spec, self-build bids must use G2 point-at-infinity as the signature.
|
||||
// Only the execution payload envelope requires a real signature from the proposer.
|
||||
signedBid := ðpb.SignedExecutionPayloadBid{
|
||||
Message: bid,
|
||||
Signature: common.InfiniteSignature[:],
|
||||
}
|
||||
if err := sBlk.SetSignedExecutionPayloadBid(signedBid); err != nil {
|
||||
return errors.Wrap(err, "could not set signed execution payload bid")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// createSelfBuildExecutionPayloadBid creates an ExecutionPayloadBid for self-building,
|
||||
// where the proposer acts as its own builder. Per spec, the bid value must be zero
|
||||
// and the builder index must be BUILDER_INDEX_SELF_BUILD.
|
||||
func (vs *Server) createSelfBuildExecutionPayloadBid(
|
||||
local *consensusblocks.GetPayloadResponse,
|
||||
block interfaces.ReadOnlyBeaconBlock,
|
||||
) (*ethpb.ExecutionPayloadBid, error) {
|
||||
ed := local.ExecutionData
|
||||
if ed == nil || ed.IsNil() {
|
||||
return nil, errors.New("execution data is nil")
|
||||
}
|
||||
|
||||
parentBlockRoot := block.ParentRoot()
|
||||
return ðpb.ExecutionPayloadBid{
|
||||
ParentBlockHash: ed.ParentHash(),
|
||||
ParentBlockRoot: bytesutil.SafeCopyBytes(parentBlockRoot[:]),
|
||||
BlockHash: ed.BlockHash(),
|
||||
PrevRandao: ed.PrevRandao(),
|
||||
FeeRecipient: ed.FeeRecipient(),
|
||||
GasLimit: ed.GasLimit(),
|
||||
BuilderIndex: params.BeaconConfig().BuilderIndexSelfBuild,
|
||||
Slot: block.Slot(),
|
||||
Value: 0,
|
||||
ExecutionPayment: 0,
|
||||
BlobKzgCommitments: [][]byte{},
|
||||
}, nil
|
||||
}
|
||||
@@ -16,11 +16,6 @@ func getEmptyBlock(slot primitives.Slot) (interfaces.SignedBeaconBlock, error) {
|
||||
var err error
|
||||
epoch := slots.ToEpoch(slot)
|
||||
switch {
|
||||
case epoch >= params.BeaconConfig().GloasForkEpoch:
|
||||
sBlk, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockGloas{Block: ðpb.BeaconBlockGloas{Body: ðpb.BeaconBlockBodyGloas{}}})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not initialize block for proposal: %v", err)
|
||||
}
|
||||
case epoch >= params.BeaconConfig().FuluForkEpoch:
|
||||
sBlk, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockFulu{Block: ðpb.BeaconBlockElectra{Body: ðpb.BeaconBlockBodyElectra{}}})
|
||||
if err != nil {
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
consensusblocks "github.com/OffchainLabs/prysm/v7/consensus-types/blocks"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func TestSetGloasExecutionData(t *testing.T) {
|
||||
parentRoot := [32]byte{1, 2, 3}
|
||||
slot := primitives.Slot(100)
|
||||
proposerIndex := primitives.ValidatorIndex(42)
|
||||
|
||||
sBlk, err := consensusblocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockGloas{
|
||||
Block: ðpb.BeaconBlockGloas{
|
||||
Slot: slot,
|
||||
ProposerIndex: proposerIndex,
|
||||
ParentRoot: parentRoot[:],
|
||||
Body: ðpb.BeaconBlockBodyGloas{},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
payload := &enginev1.ExecutionPayloadDeneb{
|
||||
ParentHash: make([]byte, 32),
|
||||
FeeRecipient: make([]byte, 20),
|
||||
StateRoot: make([]byte, 32),
|
||||
ReceiptsRoot: make([]byte, 32),
|
||||
LogsBloom: make([]byte, 256),
|
||||
PrevRandao: make([]byte, 32),
|
||||
BaseFeePerGas: make([]byte, 32),
|
||||
BlockHash: make([]byte, 32),
|
||||
ExtraData: make([]byte, 0),
|
||||
}
|
||||
ed, err := consensusblocks.WrappedExecutionPayloadDeneb(payload)
|
||||
require.NoError(t, err)
|
||||
|
||||
// 5 Gwei = 5,000,000,000 Wei
|
||||
bidValue := big.NewInt(5_000_000_000)
|
||||
local := &consensusblocks.GetPayloadResponse{
|
||||
ExecutionData: ed,
|
||||
Bid: bidValue,
|
||||
BlobsBundler: nil,
|
||||
ExecutionRequests: &enginev1.ExecutionRequests{},
|
||||
}
|
||||
|
||||
vs := &Server{}
|
||||
|
||||
err = vs.setSelfBuildExecutionPayloadBid(t.Context(), sBlk, local)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify the signed bid was set on the block.
|
||||
signedBid, err := sBlk.Block().Body().SignedExecutionPayloadBid()
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, signedBid)
|
||||
require.NotNil(t, signedBid.Message)
|
||||
|
||||
// Per spec (process_execution_payload_bid): for self-builds,
|
||||
// signature must be G2 point-at-infinity.
|
||||
require.DeepEqual(t, common.InfiniteSignature[:], signedBid.Signature)
|
||||
|
||||
// Verify bid fields.
|
||||
bid := signedBid.Message
|
||||
require.Equal(t, slot, bid.Slot)
|
||||
require.Equal(t, primitives.BuilderIndex(proposerIndex), bid.BuilderIndex)
|
||||
require.DeepEqual(t, parentRoot[:], bid.ParentBlockRoot)
|
||||
require.Equal(t, primitives.Gwei(5), bid.Value)
|
||||
require.Equal(t, primitives.Gwei(0), bid.ExecutionPayment)
|
||||
}
|
||||
|
||||
func TestSetGloasExecutionData_NilPayload(t *testing.T) {
|
||||
sBlk, err := consensusblocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockGloas{
|
||||
Block: ðpb.BeaconBlockGloas{
|
||||
Slot: 1,
|
||||
ParentRoot: make([]byte, 32),
|
||||
Body: ðpb.BeaconBlockBodyGloas{},
|
||||
},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
vs := &Server{}
|
||||
|
||||
err = vs.setSelfBuildExecutionPayloadBid(t.Context(), sBlk, nil)
|
||||
require.ErrorContains(t, "local execution payload is nil", err)
|
||||
|
||||
err = vs.setSelfBuildExecutionPayloadBid(t.Context(), sBlk, &consensusblocks.GetPayloadResponse{})
|
||||
require.ErrorContains(t, "local execution payload is nil", err)
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/time/slots"
|
||||
)
|
||||
|
||||
// getPayloadAttestations returns payload attestations for inclusion in a Gloas block.
|
||||
// PTC members broadcast PayloadAttestationMessages via P2P gossip during slot N.
|
||||
// All nodes collect these in a pool. The slot N+1 proposer retrieves and aggregates
|
||||
// them into PayloadAttestations for block inclusion.
|
||||
func (vs *Server) getPayloadAttestations(ctx context.Context, head state.BeaconState) []*ethpb.PayloadAttestation {
|
||||
if slots.ToEpoch(head.Slot()) < params.BeaconConfig().GloasForkEpoch {
|
||||
return nil
|
||||
}
|
||||
// TODO: Retrieve and aggregate PayloadAttestationMessages from the pool
|
||||
// for the previous slot. Blocks are valid without payload attestations.
|
||||
return []*ethpb.PayloadAttestation{}
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
coregloas "github.com/OffchainLabs/prysm/v7/beacon-chain/core/gloas"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
consensusblocks "github.com/OffchainLabs/prysm/v7/consensus-types/blocks"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/time/slots"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// storeExecutionPayloadEnvelope creates and caches the execution payload envelope
|
||||
// after the block is fully built (state root set). The envelope is cached with a
|
||||
// zeroed state root; the actual post-payload state root is computed lazily in
|
||||
// GetExecutionPayloadEnvelope once the block has been submitted and the post-block
|
||||
// state is available via StateGen.
|
||||
func (vs *Server) storeExecutionPayloadEnvelope(
|
||||
ctx context.Context,
|
||||
sBlk interfaces.SignedBeaconBlock,
|
||||
local *consensusblocks.GetPayloadResponse,
|
||||
) error {
|
||||
blockRoot, err := sBlk.Block().HashTreeRoot()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not compute block hash tree root")
|
||||
}
|
||||
|
||||
payload := extractExecutionPayloadDeneb(local)
|
||||
|
||||
envelope := ðpb.ExecutionPayloadEnvelope{
|
||||
Payload: payload,
|
||||
ExecutionRequests: local.ExecutionRequests,
|
||||
BuilderIndex: params.BeaconConfig().BuilderIndexSelfBuild,
|
||||
BeaconBlockRoot: blockRoot[:],
|
||||
Slot: sBlk.Block().Slot(),
|
||||
StateRoot: make([]byte, 32), // zeroed; computed lazily in GetExecutionPayloadEnvelope
|
||||
}
|
||||
|
||||
vs.setExecutionPayloadEnvelope(envelope)
|
||||
return nil
|
||||
}
|
||||
|
||||
func extractExecutionPayloadDeneb(local *consensusblocks.GetPayloadResponse) *enginev1.ExecutionPayloadDeneb {
|
||||
if local == nil || local.ExecutionData == nil || local.ExecutionData.IsNil() {
|
||||
return nil
|
||||
}
|
||||
if p, ok := local.ExecutionData.Proto().(*enginev1.ExecutionPayloadDeneb); ok {
|
||||
return p
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (vs *Server) setExecutionPayloadEnvelope(envelope *ethpb.ExecutionPayloadEnvelope) {
|
||||
if envelope == nil {
|
||||
return
|
||||
}
|
||||
vs.executionPayloadEnvelopeMu.Lock()
|
||||
vs.executionPayloadEnvelope = envelope
|
||||
vs.executionPayloadEnvelopeMu.Unlock()
|
||||
}
|
||||
|
||||
func (vs *Server) getExecutionPayloadEnvelope(slot primitives.Slot, builderIndex primitives.BuilderIndex) (*ethpb.ExecutionPayloadEnvelope, bool) {
|
||||
vs.executionPayloadEnvelopeMu.RLock()
|
||||
envelope := vs.executionPayloadEnvelope
|
||||
vs.executionPayloadEnvelopeMu.RUnlock()
|
||||
if envelope == nil {
|
||||
return nil, false
|
||||
}
|
||||
if envelope.Slot != slot || envelope.BuilderIndex != builderIndex {
|
||||
return nil, false
|
||||
}
|
||||
return envelope, true
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope implements the gRPC endpoint:
|
||||
// /eth/v1alpha1/validator/execution_payload_envelope/{slot}/{builder_index}
|
||||
// It returns the stored execution payload envelope for a slot/builder and, for
|
||||
// self-build envelopes, computes the post-payload state root on demand.
|
||||
func (vs *Server) GetExecutionPayloadEnvelope(
|
||||
ctx context.Context,
|
||||
req *ethpb.ExecutionPayloadEnvelopeRequest,
|
||||
) (*ethpb.ExecutionPayloadEnvelopeResponse, error) {
|
||||
if req == nil {
|
||||
return nil, status.Error(codes.InvalidArgument, "request cannot be nil")
|
||||
}
|
||||
|
||||
if slots.ToEpoch(req.Slot) < params.BeaconConfig().GloasForkEpoch {
|
||||
return nil, status.Errorf(codes.InvalidArgument,
|
||||
"execution payload envelopes are not supported before Gloas fork (slot %d)", req.Slot)
|
||||
}
|
||||
|
||||
envelope, found := vs.getExecutionPayloadEnvelope(req.Slot, req.BuilderIndex)
|
||||
if !found {
|
||||
return nil, status.Errorf(
|
||||
codes.NotFound,
|
||||
"execution payload envelope not found for slot %d builder %d",
|
||||
req.Slot,
|
||||
req.BuilderIndex,
|
||||
)
|
||||
}
|
||||
|
||||
roEnvelope, err := consensusblocks.WrappedROExecutionPayloadEnvelope(envelope)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not wrap envelope: %v", err)
|
||||
}
|
||||
stateRoot, err := vs.computePostPayloadStateRoot(ctx, roEnvelope)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not compute post-payload state root: %v", err)
|
||||
}
|
||||
vs.executionPayloadEnvelopeMu.Lock()
|
||||
envelope.StateRoot = stateRoot
|
||||
vs.executionPayloadEnvelopeMu.Unlock()
|
||||
|
||||
return ðpb.ExecutionPayloadEnvelopeResponse{
|
||||
Envelope: envelope,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// computePostPayloadStateRoot retrieves the post-block state (after the block has
|
||||
// been submitted and processed) and applies the execution payload state mutations
|
||||
// to compute the post-payload state root for the envelope.
|
||||
func (vs *Server) computePostPayloadStateRoot(ctx context.Context, envelope interfaces.ROExecutionPayloadEnvelope) ([]byte, error) {
|
||||
beaconState, err := vs.StateGen.StateByRoot(ctx, envelope.BeaconBlockRoot())
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not retrieve post-block state")
|
||||
}
|
||||
beaconState = beaconState.Copy()
|
||||
if err := coregloas.ApplyExecutionPayload(ctx, beaconState, envelope); err != nil {
|
||||
return nil, errors.Wrapf(err, "could not apply execution payload at slot %d", beaconState.Slot())
|
||||
}
|
||||
root, err := beaconState.HashTreeRoot(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "could not compute post-payload state root at slot %d", beaconState.Slot())
|
||||
}
|
||||
return root[:], nil
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope validates and broadcasts a signed execution payload envelope.
|
||||
// This is called by validators after signing the envelope retrieved from GetExecutionPayloadEnvelope.
|
||||
//
|
||||
// gRPC endpoint: POST /eth/v1alpha1/validator/execution_payload_envelope
|
||||
func (vs *Server) PublishExecutionPayloadEnvelope(
|
||||
ctx context.Context,
|
||||
req *ethpb.SignedExecutionPayloadEnvelope,
|
||||
) (*emptypb.Empty, error) {
|
||||
if req == nil || req.Message == nil {
|
||||
return nil, status.Error(codes.InvalidArgument, "signed envelope cannot be nil")
|
||||
}
|
||||
|
||||
if slots.ToEpoch(req.Message.Slot) < params.BeaconConfig().GloasForkEpoch {
|
||||
return nil, status.Errorf(codes.InvalidArgument,
|
||||
"execution payload envelopes are not supported before Gloas fork (slot %d)", req.Message.Slot)
|
||||
}
|
||||
|
||||
beaconBlockRoot := bytesutil.ToBytes32(req.Message.BeaconBlockRoot)
|
||||
|
||||
log := log.WithFields(logrus.Fields{
|
||||
"slot": req.Message.Slot,
|
||||
"builderIndex": req.Message.BuilderIndex,
|
||||
"beaconBlockRoot": fmt.Sprintf("%#x", beaconBlockRoot[:8]),
|
||||
})
|
||||
log.Info("Publishing signed execution payload envelope")
|
||||
|
||||
if err := vs.P2P.Broadcast(ctx, req); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to broadcast execution payload envelope: %v", err)
|
||||
}
|
||||
|
||||
// TODO: Receive the envelope locally following the broadcastReceiveBlock pattern.
|
||||
|
||||
// TODO: Build and broadcast data column sidecars from the cached blobs bundle.
|
||||
// In Gloas, blob data is delivered alongside the execution payload envelope
|
||||
// rather than with the beacon block (which only carries the bid). Not needed
|
||||
// for devnet-0.
|
||||
|
||||
log.Info("Successfully published execution payload envelope")
|
||||
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
@@ -6,7 +6,6 @@ package validator
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/blockchain"
|
||||
@@ -28,7 +27,7 @@ import (
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/rpc/core"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/startup"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state/stategen"
|
||||
prysmSync "github.com/OffchainLabs/prysm/v7/beacon-chain/sync"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/sync"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
@@ -45,48 +44,46 @@ import (
|
||||
// and committees in which particular validators need to perform their responsibilities,
|
||||
// and more.
|
||||
type Server struct {
|
||||
Ctx context.Context
|
||||
PayloadIDCache *cache.PayloadIDCache
|
||||
TrackedValidatorsCache *cache.TrackedValidatorsCache
|
||||
executionPayloadEnvelopeMu sync.RWMutex
|
||||
executionPayloadEnvelope *ethpb.ExecutionPayloadEnvelope
|
||||
HeadFetcher blockchain.HeadFetcher
|
||||
ForkFetcher blockchain.ForkFetcher
|
||||
ForkchoiceFetcher blockchain.ForkchoiceFetcher
|
||||
GenesisFetcher blockchain.GenesisFetcher
|
||||
FinalizationFetcher blockchain.FinalizationFetcher
|
||||
TimeFetcher blockchain.TimeFetcher
|
||||
BlockFetcher execution.POWBlockFetcher
|
||||
DepositFetcher cache.DepositFetcher
|
||||
ChainStartFetcher execution.ChainStartFetcher
|
||||
Eth1InfoFetcher execution.ChainInfoFetcher
|
||||
OptimisticModeFetcher blockchain.OptimisticModeFetcher
|
||||
SyncChecker prysmSync.Checker
|
||||
StateNotifier statefeed.Notifier
|
||||
BlockNotifier blockfeed.Notifier
|
||||
P2P p2p.Broadcaster
|
||||
AttestationCache *cache.AttestationCache
|
||||
AttPool attestations.Pool
|
||||
SlashingsPool slashings.PoolManager
|
||||
ExitPool voluntaryexits.PoolManager
|
||||
SyncCommitteePool synccommittee.Pool
|
||||
BlockReceiver blockchain.BlockReceiver
|
||||
BlobReceiver blockchain.BlobReceiver
|
||||
DataColumnReceiver blockchain.DataColumnReceiver
|
||||
MockEth1Votes bool
|
||||
Eth1BlockFetcher execution.POWBlockFetcher
|
||||
PendingDepositsFetcher depositsnapshot.PendingDepositsFetcher
|
||||
OperationNotifier opfeed.Notifier
|
||||
StateGen stategen.StateManager
|
||||
ReplayerBuilder stategen.ReplayerBuilder
|
||||
BeaconDB db.HeadAccessDatabase
|
||||
ExecutionEngineCaller execution.EngineCaller
|
||||
BlockBuilder builder.BlockBuilder
|
||||
BLSChangesPool blstoexec.PoolManager
|
||||
ClockWaiter startup.ClockWaiter
|
||||
CoreService *core.Service
|
||||
AttestationStateFetcher blockchain.AttestationStateFetcher
|
||||
GraffitiInfo *execution.GraffitiInfo
|
||||
Ctx context.Context
|
||||
PayloadIDCache *cache.PayloadIDCache
|
||||
TrackedValidatorsCache *cache.TrackedValidatorsCache
|
||||
HeadFetcher blockchain.HeadFetcher
|
||||
ForkFetcher blockchain.ForkFetcher
|
||||
ForkchoiceFetcher blockchain.ForkchoiceFetcher
|
||||
GenesisFetcher blockchain.GenesisFetcher
|
||||
FinalizationFetcher blockchain.FinalizationFetcher
|
||||
TimeFetcher blockchain.TimeFetcher
|
||||
BlockFetcher execution.POWBlockFetcher
|
||||
DepositFetcher cache.DepositFetcher
|
||||
ChainStartFetcher execution.ChainStartFetcher
|
||||
Eth1InfoFetcher execution.ChainInfoFetcher
|
||||
OptimisticModeFetcher blockchain.OptimisticModeFetcher
|
||||
SyncChecker sync.Checker
|
||||
StateNotifier statefeed.Notifier
|
||||
BlockNotifier blockfeed.Notifier
|
||||
P2P p2p.Broadcaster
|
||||
AttestationCache *cache.AttestationCache
|
||||
AttPool attestations.Pool
|
||||
SlashingsPool slashings.PoolManager
|
||||
ExitPool voluntaryexits.PoolManager
|
||||
SyncCommitteePool synccommittee.Pool
|
||||
BlockReceiver blockchain.BlockReceiver
|
||||
BlobReceiver blockchain.BlobReceiver
|
||||
DataColumnReceiver blockchain.DataColumnReceiver
|
||||
MockEth1Votes bool
|
||||
Eth1BlockFetcher execution.POWBlockFetcher
|
||||
PendingDepositsFetcher depositsnapshot.PendingDepositsFetcher
|
||||
OperationNotifier opfeed.Notifier
|
||||
StateGen stategen.StateManager
|
||||
ReplayerBuilder stategen.ReplayerBuilder
|
||||
BeaconDB db.HeadAccessDatabase
|
||||
ExecutionEngineCaller execution.EngineCaller
|
||||
BlockBuilder builder.BlockBuilder
|
||||
BLSChangesPool blstoexec.PoolManager
|
||||
ClockWaiter startup.ClockWaiter
|
||||
CoreService *core.Service
|
||||
AttestationStateFetcher blockchain.AttestationStateFetcher
|
||||
GraffitiInfo *execution.GraffitiInfo
|
||||
}
|
||||
|
||||
// Deprecated: The gRPC API will remain the default and fully supported through v8 (expected in 2026) but will be eventually removed in favor of REST API.
|
||||
|
||||
@@ -30,6 +30,12 @@ type writeOnlyGloasFields interface {
|
||||
IncreaseBuilderBalance(index primitives.BuilderIndex, amount uint64) error
|
||||
AddBuilderFromDeposit(pubkey [fieldparams.BLSPubkeyLength]byte, withdrawalCredentials [fieldparams.RootLength]byte, amount uint64) error
|
||||
UpdatePendingPaymentWeight(att ethpb.Att, indices []uint64, participatedFlags map[uint8]bool) error
|
||||
|
||||
// Withdrawals.
|
||||
SetPayloadExpectedWithdrawals(withdrawals []*enginev1.Withdrawal) error
|
||||
DecreaseWithdrawalBalances(withdrawals []*enginev1.Withdrawal) error
|
||||
DequeueBuilderPendingWithdrawals(num uint64) error
|
||||
SetNextWithdrawalBuilderIndex(idx primitives.BuilderIndex) error
|
||||
}
|
||||
|
||||
type readOnlyGloasFields interface {
|
||||
@@ -52,4 +58,17 @@ type readOnlyGloasFields interface {
|
||||
IsAttestationSameSlot(blockRoot [32]byte, slot primitives.Slot) (bool, error)
|
||||
BuilderPendingPayment(index uint64) (*ethpb.BuilderPendingPayment, error)
|
||||
ExecutionPayloadAvailability(slot primitives.Slot) (uint64, error)
|
||||
|
||||
// Withdrawals
|
||||
IsParentBlockFull() (bool, error)
|
||||
ExpectedWithdrawalsGloas() (ExpectedWithdrawalsGloasResult, error)
|
||||
}
|
||||
|
||||
// ExpectedWithdrawalsGloasResult bundles the expected withdrawals and related counters
|
||||
// for the Gloas fork to avoid positional return mistakes.
|
||||
type ExpectedWithdrawalsGloasResult struct {
|
||||
Withdrawals []*enginev1.Withdrawal
|
||||
ProcessedBuilderWithdrawalsCount uint64
|
||||
ProcessedPartialWithdrawalsCount uint64
|
||||
NextWithdrawalBuilderIndex primitives.BuilderIndex
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/helpers"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/blocks"
|
||||
@@ -13,6 +14,7 @@ import (
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||
"github.com/OffchainLabs/prysm/v7/time/slots"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -263,6 +265,29 @@ func withdrawalsEqual(a, b []*enginev1.Withdrawal) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsParentBlockFull returns true if the last committed payload bid was fulfilled with a payload,
|
||||
// which can only happen when both beacon block and payload were present.
|
||||
// This function must be called on a beacon state before processing the bid in the block.
|
||||
//
|
||||
// <spec fn="is_parent_block_full" fork="gloas" hash="b59640c9">
|
||||
// def is_parent_block_full(state: BeaconState) -> bool:
|
||||
// return state.latest_execution_payload_bid.block_hash == state.latest_block_hash
|
||||
// </spec>
|
||||
func (b *BeaconState) IsParentBlockFull() (bool, error) {
|
||||
if b.version < version.Gloas {
|
||||
return false, errNotSupported("IsParentBlockFull", b.version)
|
||||
}
|
||||
|
||||
b.lock.RLock()
|
||||
defer b.lock.RUnlock()
|
||||
|
||||
if b.latestExecutionPayloadBid == nil {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return bytes.Equal(b.latestExecutionPayloadBid.BlockHash, b.latestBlockHash), nil
|
||||
}
|
||||
|
||||
// ExecutionPayloadAvailability returns the execution payload availability bit for the given slot.
|
||||
func (b *BeaconState) ExecutionPayloadAvailability(slot primitives.Slot) (uint64, error) {
|
||||
if b.version < version.Gloas {
|
||||
@@ -314,3 +339,205 @@ func (b *BeaconState) BuilderIndexByPubkey(pubkey [fieldparams.BLSPubkeyLength]b
|
||||
}
|
||||
return 0, false
|
||||
}
|
||||
|
||||
// ExpectedWithdrawalsGloas returns the withdrawals that a proposer will need to pack in the next block
|
||||
// applied to the current state. It is also used by validators to check that the execution payload carried
|
||||
// the right number of withdrawals.
|
||||
//
|
||||
// <spec fn="get_expected_withdrawals" fork="gloas" hash="8d0675cb">
|
||||
// def get_expected_withdrawals(state: BeaconState) -> ExpectedWithdrawals:
|
||||
// withdrawal_index = state.next_withdrawal_index
|
||||
// withdrawals: List[Withdrawal] = []
|
||||
//
|
||||
// # [New in Gloas:EIP7732]
|
||||
// # Get builder withdrawals
|
||||
// builder_withdrawals, withdrawal_index, processed_builder_withdrawals_count = (
|
||||
// get_builder_withdrawals(state, withdrawal_index, withdrawals)
|
||||
// )
|
||||
// withdrawals.extend(builder_withdrawals)
|
||||
//
|
||||
// # Get partial withdrawals
|
||||
// partial_withdrawals, withdrawal_index, processed_partial_withdrawals_count = (
|
||||
// get_pending_partial_withdrawals(state, withdrawal_index, withdrawals)
|
||||
// )
|
||||
// withdrawals.extend(partial_withdrawals)
|
||||
//
|
||||
// # [New in Gloas:EIP7732]
|
||||
// # Get builders sweep withdrawals
|
||||
// builders_sweep_withdrawals, withdrawal_index, processed_builders_sweep_count = (
|
||||
// get_builders_sweep_withdrawals(state, withdrawal_index, withdrawals)
|
||||
// )
|
||||
// withdrawals.extend(builders_sweep_withdrawals)
|
||||
//
|
||||
// # Get validators sweep withdrawals
|
||||
// validators_sweep_withdrawals, withdrawal_index, processed_validators_sweep_count = (
|
||||
// get_validators_sweep_withdrawals(state, withdrawal_index, withdrawals)
|
||||
// )
|
||||
// withdrawals.extend(validators_sweep_withdrawals)
|
||||
//
|
||||
// return ExpectedWithdrawals(
|
||||
// withdrawals,
|
||||
// # [New in Gloas:EIP7732]
|
||||
// processed_builder_withdrawals_count,
|
||||
// processed_partial_withdrawals_count,
|
||||
// # [New in Gloas:EIP7732]
|
||||
// processed_builders_sweep_count,
|
||||
// processed_validators_sweep_count,
|
||||
// )
|
||||
// </spec>
|
||||
func (b *BeaconState) ExpectedWithdrawalsGloas() (state.ExpectedWithdrawalsGloasResult, error) {
|
||||
if b.version < version.Gloas {
|
||||
return state.ExpectedWithdrawalsGloasResult{}, errNotSupported("ExpectedWithdrawalsGloas", b.version)
|
||||
}
|
||||
|
||||
b.lock.RLock()
|
||||
defer b.lock.RUnlock()
|
||||
|
||||
cfg := params.BeaconConfig()
|
||||
withdrawals := make([]*enginev1.Withdrawal, 0, cfg.MaxWithdrawalsPerPayload)
|
||||
withdrawalIndex := b.nextWithdrawalIndex
|
||||
|
||||
withdrawalIndex, processedBuilderWithdrawalsCount, err := b.appendBuilderWithdrawals(withdrawalIndex, &withdrawals)
|
||||
if err != nil {
|
||||
return state.ExpectedWithdrawalsGloasResult{}, err
|
||||
}
|
||||
|
||||
withdrawalIndex, processedPartialWithdrawalsCount, err := b.appendPendingPartialWithdrawals(withdrawalIndex, &withdrawals)
|
||||
if err != nil {
|
||||
return state.ExpectedWithdrawalsGloasResult{}, err
|
||||
}
|
||||
|
||||
withdrawalIndex, nextBuilderIndex, err := b.appendBuildersSweepWithdrawals(withdrawalIndex, &withdrawals)
|
||||
if err != nil {
|
||||
return state.ExpectedWithdrawalsGloasResult{}, err
|
||||
}
|
||||
|
||||
err = b.appendValidatorsSweepWithdrawals(withdrawalIndex, &withdrawals)
|
||||
if err != nil {
|
||||
return state.ExpectedWithdrawalsGloasResult{}, err
|
||||
}
|
||||
|
||||
return state.ExpectedWithdrawalsGloasResult{
|
||||
Withdrawals: withdrawals,
|
||||
ProcessedBuilderWithdrawalsCount: processedBuilderWithdrawalsCount,
|
||||
ProcessedPartialWithdrawalsCount: processedPartialWithdrawalsCount,
|
||||
NextWithdrawalBuilderIndex: nextBuilderIndex,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// appendBuilderWithdrawals returns builder pending withdrawals, the updated withdrawal index,
|
||||
// and the processed count, following spec v1.7.0-alpha.2:
|
||||
//
|
||||
// def get_builder_withdrawals(state, withdrawal_index, prior_withdrawals):
|
||||
// withdrawals_limit = MAX_WITHDRAWALS_PER_PAYLOAD - 1
|
||||
// assert len(prior_withdrawals) <= withdrawals_limit
|
||||
// processed_count = 0
|
||||
// withdrawals = []
|
||||
// for withdrawal in state.builder_pending_withdrawals:
|
||||
// if len(prior_withdrawals + withdrawals) >= withdrawals_limit:
|
||||
// break
|
||||
// withdrawals.append(Withdrawal(
|
||||
// index=withdrawal_index,
|
||||
// validator_index=convert_builder_index_to_validator_index(withdrawal.builder_index),
|
||||
// address=withdrawal.fee_recipient,
|
||||
// amount=withdrawal.amount,
|
||||
// ))
|
||||
// withdrawal_index += 1
|
||||
// processed_count += 1
|
||||
// return withdrawals, withdrawal_index, processed_count
|
||||
func (b *BeaconState) appendBuilderWithdrawals(withdrawalIndex uint64, withdrawals *[]*enginev1.Withdrawal) (uint64, uint64, error) {
|
||||
cfg := params.BeaconConfig()
|
||||
withdrawalsLimit := int(cfg.MaxWithdrawalsPerPayload - 1)
|
||||
ws := *withdrawals
|
||||
if len(ws) > withdrawalsLimit {
|
||||
return withdrawalIndex, 0, fmt.Errorf("prior withdrawals length %d exceeds limit %d", len(ws), withdrawalsLimit)
|
||||
}
|
||||
|
||||
var processedCount uint64
|
||||
for _, w := range b.builderPendingWithdrawals {
|
||||
if len(ws) >= withdrawalsLimit {
|
||||
break
|
||||
}
|
||||
|
||||
ws = append(ws, &enginev1.Withdrawal{
|
||||
Index: withdrawalIndex,
|
||||
ValidatorIndex: w.BuilderIndex.ToValidatorIndex(),
|
||||
Address: w.FeeRecipient,
|
||||
Amount: uint64(w.Amount),
|
||||
})
|
||||
withdrawalIndex++
|
||||
processedCount++
|
||||
}
|
||||
|
||||
*withdrawals = ws
|
||||
return withdrawalIndex, processedCount, nil
|
||||
}
|
||||
|
||||
// appendBuildersSweepWithdrawals returns builder sweep withdrawals, the updated withdrawal index,
|
||||
// and the processed count, following spec v1.7.0-alpha.2:
|
||||
//
|
||||
// def get_builders_sweep_withdrawals(state, withdrawal_index, prior_withdrawals):
|
||||
// epoch = get_current_epoch(state)
|
||||
// builders_limit = min(len(state.builders), MAX_BUILDERS_PER_WITHDRAWALS_SWEEP)
|
||||
// withdrawals_limit = MAX_WITHDRAWALS_PER_PAYLOAD - 1
|
||||
// assert len(prior_withdrawals) <= withdrawals_limit
|
||||
// processed_count = 0
|
||||
// withdrawals = []
|
||||
// builder_index = state.next_withdrawal_builder_index
|
||||
// for _ in range(builders_limit):
|
||||
// if len(prior_withdrawals + withdrawals) >= withdrawals_limit:
|
||||
// break
|
||||
// builder = state.builders[builder_index]
|
||||
// if builder.withdrawable_epoch <= epoch and builder.balance > 0:
|
||||
// withdrawals.append(Withdrawal(
|
||||
// index=withdrawal_index,
|
||||
// validator_index=convert_builder_index_to_validator_index(builder_index),
|
||||
// address=builder.execution_address,
|
||||
// amount=builder.balance,
|
||||
// ))
|
||||
// withdrawal_index += 1
|
||||
// builder_index = BuilderIndex((builder_index + 1) % len(state.builders))
|
||||
// processed_count += 1
|
||||
// return withdrawals, withdrawal_index, processed_count
|
||||
func (b *BeaconState) appendBuildersSweepWithdrawals(withdrawalIndex uint64, withdrawals *[]*enginev1.Withdrawal) (uint64, primitives.BuilderIndex, error) {
|
||||
cfg := params.BeaconConfig()
|
||||
withdrawalsLimit := int(cfg.MaxWithdrawalsPerPayload - 1)
|
||||
if len(*withdrawals) > withdrawalsLimit {
|
||||
return withdrawalIndex, 0, fmt.Errorf("prior withdrawals length %d exceeds limit %d", len(*withdrawals), withdrawalsLimit)
|
||||
}
|
||||
|
||||
ws := *withdrawals
|
||||
|
||||
if b.builders == nil {
|
||||
return withdrawalIndex, 0, errors.New("builders list is nil")
|
||||
}
|
||||
|
||||
buildersLimit := min(len(b.builders), int(cfg.MaxBuildersPerWithdrawalsSweep))
|
||||
|
||||
builderIndex := b.nextWithdrawalBuilderIndex
|
||||
epoch := slots.ToEpoch(b.slot)
|
||||
for range buildersLimit {
|
||||
if len(ws) >= withdrawalsLimit {
|
||||
break
|
||||
}
|
||||
|
||||
builder := b.builders[builderIndex]
|
||||
if builder == nil {
|
||||
return withdrawalIndex, 0, fmt.Errorf("builder at index %d is nil", builderIndex)
|
||||
}
|
||||
if builder.WithdrawableEpoch <= epoch && builder.Balance > 0 {
|
||||
ws = append(ws, &enginev1.Withdrawal{
|
||||
Index: withdrawalIndex,
|
||||
ValidatorIndex: builderIndex.ToValidatorIndex(),
|
||||
Address: builder.ExecutionAddress,
|
||||
Amount: uint64(builder.Balance),
|
||||
})
|
||||
withdrawalIndex++
|
||||
}
|
||||
|
||||
builderIndex = primitives.BuilderIndex((uint64(builderIndex) + 1) % uint64(len(b.builders)))
|
||||
}
|
||||
|
||||
*withdrawals = ws
|
||||
return withdrawalIndex, builderIndex, nil
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
package state_native_test
|
||||
package state_native
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
state_native "github.com/OffchainLabs/prysm/v7/beacon-chain/state/state-native"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/util"
|
||||
"github.com/OffchainLabs/prysm/v7/time/slots"
|
||||
)
|
||||
|
||||
func TestLatestBlockHash(t *testing.T) {
|
||||
t.Run("returns error before gloas", func(t *testing.T) {
|
||||
st, _ := util.DeterministicGenesisState(t, 1)
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
_, err := st.LatestBlockHash()
|
||||
require.ErrorContains(t, "is not supported", err)
|
||||
})
|
||||
|
||||
t.Run("returns zero hash when unset", func(t *testing.T) {
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{})
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{})
|
||||
require.NoError(t, err)
|
||||
|
||||
got, err := st.LatestBlockHash()
|
||||
@@ -35,7 +35,7 @@ func TestLatestBlockHash(t *testing.T) {
|
||||
var want [32]byte
|
||||
copy(want[:], hashBytes)
|
||||
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
LatestBlockHash: hashBytes,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -48,17 +48,14 @@ func TestLatestBlockHash(t *testing.T) {
|
||||
|
||||
func TestLatestExecutionPayloadBid(t *testing.T) {
|
||||
t.Run("returns error before gloas", func(t *testing.T) {
|
||||
stIface, _ := util.DeterministicGenesisState(t, 1)
|
||||
native, ok := stIface.(*state_native.BeaconState)
|
||||
require.Equal(t, true, ok)
|
||||
|
||||
_, err := native.LatestExecutionPayloadBid()
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
_, err := st.LatestExecutionPayloadBid()
|
||||
require.ErrorContains(t, "is not supported", err)
|
||||
})
|
||||
}
|
||||
|
||||
func TestIsAttestationSameSlot(t *testing.T) {
|
||||
buildStateWithBlockRoots := func(t *testing.T, stateSlot primitives.Slot, roots map[primitives.Slot][]byte) *state_native.BeaconState {
|
||||
buildStateWithBlockRoots := func(t *testing.T, stateSlot primitives.Slot, roots map[primitives.Slot][]byte) *BeaconState {
|
||||
t.Helper()
|
||||
|
||||
cfg := params.BeaconConfig()
|
||||
@@ -67,12 +64,12 @@ func TestIsAttestationSameSlot(t *testing.T) {
|
||||
blockRoots[slot%cfg.SlotsPerHistoricalRoot] = root
|
||||
}
|
||||
|
||||
stIface, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
stIface, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Slot: stateSlot,
|
||||
BlockRoots: blockRoots,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
return stIface.(*state_native.BeaconState)
|
||||
return stIface.(*BeaconState)
|
||||
}
|
||||
|
||||
rootA := bytes.Repeat([]byte{0xAA}, 32)
|
||||
@@ -145,17 +142,14 @@ func TestIsAttestationSameSlot(t *testing.T) {
|
||||
|
||||
func TestBuilderPubkey(t *testing.T) {
|
||||
t.Run("returns error before gloas", func(t *testing.T) {
|
||||
stIface, _ := util.DeterministicGenesisState(t, 1)
|
||||
native, ok := stIface.(*state_native.BeaconState)
|
||||
require.Equal(t, true, ok)
|
||||
|
||||
_, err := native.BuilderPubkey(0)
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
_, err := st.BuilderPubkey(0)
|
||||
require.ErrorContains(t, "is not supported", err)
|
||||
})
|
||||
|
||||
t.Run("returns pubkey copy", func(t *testing.T) {
|
||||
pubkey := bytes.Repeat([]byte{0xAA}, 48)
|
||||
stIface, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
stIface, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{
|
||||
{
|
||||
Pubkey: pubkey,
|
||||
@@ -179,12 +173,12 @@ func TestBuilderPubkey(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("out of range returns error", func(t *testing.T) {
|
||||
stIface, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
stIface, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
st := stIface.(*state_native.BeaconState)
|
||||
st := stIface.(*BeaconState)
|
||||
_, err = st.BuilderPubkey(1)
|
||||
require.ErrorContains(t, "out of range", err)
|
||||
})
|
||||
@@ -192,7 +186,7 @@ func TestBuilderPubkey(t *testing.T) {
|
||||
|
||||
func TestBuilderHelpers(t *testing.T) {
|
||||
t.Run("is active builder", func(t *testing.T) {
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{
|
||||
{
|
||||
Balance: 10,
|
||||
@@ -219,7 +213,7 @@ func TestBuilderHelpers(t *testing.T) {
|
||||
},
|
||||
FinalizedCheckpoint: ðpb.Checkpoint{Epoch: 2},
|
||||
}
|
||||
stInactive, err := state_native.InitializeFromProtoGloas(stProto)
|
||||
stInactive, err := InitializeFromProtoGloas(stProto)
|
||||
require.NoError(t, err)
|
||||
|
||||
active, err = stInactive.IsActiveBuilder(0)
|
||||
@@ -228,7 +222,7 @@ func TestBuilderHelpers(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("can builder cover bid", func(t *testing.T) {
|
||||
stIface, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
stIface, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{
|
||||
{
|
||||
Balance: primitives.Gwei(params.BeaconConfig().MinDepositAmount + 50),
|
||||
@@ -246,7 +240,7 @@ func TestBuilderHelpers(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
st := stIface.(*state_native.BeaconState)
|
||||
st := stIface.(*BeaconState)
|
||||
ok, err := st.CanBuilderCoverBid(0, 20)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, true, ok)
|
||||
@@ -258,9 +252,9 @@ func TestBuilderHelpers(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBuilderPendingPayments_UnsupportedVersion(t *testing.T) {
|
||||
stIface, err := state_native.InitializeFromProtoElectra(ðpb.BeaconStateElectra{})
|
||||
stIface, err := InitializeFromProtoElectra(ðpb.BeaconStateElectra{})
|
||||
require.NoError(t, err)
|
||||
st := stIface.(*state_native.BeaconState)
|
||||
st := stIface.(*BeaconState)
|
||||
|
||||
_, err = st.BuilderPendingPayments()
|
||||
require.ErrorContains(t, "BuilderPendingPayments", err)
|
||||
@@ -268,11 +262,8 @@ func TestBuilderPendingPayments_UnsupportedVersion(t *testing.T) {
|
||||
|
||||
func TestWithdrawalsMatchPayloadExpected(t *testing.T) {
|
||||
t.Run("returns error before gloas", func(t *testing.T) {
|
||||
stIface, _ := util.DeterministicGenesisState(t, 1)
|
||||
native, ok := stIface.(*state_native.BeaconState)
|
||||
require.Equal(t, true, ok)
|
||||
|
||||
_, err := native.WithdrawalsMatchPayloadExpected(nil)
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
_, err := st.WithdrawalsMatchPayloadExpected(nil)
|
||||
require.ErrorContains(t, "is not supported", err)
|
||||
})
|
||||
|
||||
@@ -280,7 +271,7 @@ func TestWithdrawalsMatchPayloadExpected(t *testing.T) {
|
||||
withdrawals := []*enginev1.Withdrawal{
|
||||
{Index: 0, ValidatorIndex: 1, Address: bytes.Repeat([]byte{0x01}, 20), Amount: 10},
|
||||
}
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
PayloadExpectedWithdrawals: withdrawals,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -298,7 +289,7 @@ func TestWithdrawalsMatchPayloadExpected(t *testing.T) {
|
||||
{Index: 0, ValidatorIndex: 1, Address: bytes.Repeat([]byte{0x01}, 20), Amount: 11},
|
||||
}
|
||||
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
PayloadExpectedWithdrawals: expected,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -311,7 +302,7 @@ func TestWithdrawalsMatchPayloadExpected(t *testing.T) {
|
||||
|
||||
func TestBuilder(t *testing.T) {
|
||||
t.Run("nil builders returns nil", func(t *testing.T) {
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: nil,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -322,7 +313,7 @@ func TestBuilder(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("out of bounds returns error", func(t *testing.T) {
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{{}},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -333,7 +324,7 @@ func TestBuilder(t *testing.T) {
|
||||
|
||||
t.Run("returns copy", func(t *testing.T) {
|
||||
pubkey := bytes.Repeat([]byte{0xAA}, fieldparams.BLSPubkeyLength)
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{
|
||||
{
|
||||
Pubkey: pubkey,
|
||||
@@ -361,7 +352,7 @@ func TestBuilder(t *testing.T) {
|
||||
|
||||
func TestBuilderIndexByPubkey(t *testing.T) {
|
||||
t.Run("not found returns false", func(t *testing.T) {
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{
|
||||
{Pubkey: bytes.Repeat([]byte{0x11}, fieldparams.BLSPubkeyLength)},
|
||||
},
|
||||
@@ -379,7 +370,7 @@ func TestBuilderIndexByPubkey(t *testing.T) {
|
||||
wantIdx := primitives.BuilderIndex(1)
|
||||
wantPkBytes := bytes.Repeat([]byte{0xAB}, fieldparams.BLSPubkeyLength)
|
||||
|
||||
st, err := state_native.InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoGloas(ðpb.BeaconStateGloas{
|
||||
Builders: []*ethpb.Builder{
|
||||
nil,
|
||||
{Pubkey: wantPkBytes},
|
||||
@@ -402,7 +393,7 @@ func TestBuilderPendingPayment(t *testing.T) {
|
||||
target := uint64(slotsPerEpoch + 1)
|
||||
payments[target] = ðpb.BuilderPendingPayment{Weight: 10}
|
||||
|
||||
st, err := state_native.InitializeFromProtoUnsafeGloas(ðpb.BeaconStateGloas{
|
||||
st, err := InitializeFromProtoUnsafeGloas(ðpb.BeaconStateGloas{
|
||||
BuilderPendingPayments: payments,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -419,16 +410,16 @@ func TestBuilderPendingPayment(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("unsupported version", func(t *testing.T) {
|
||||
stIface, err := state_native.InitializeFromProtoElectra(ðpb.BeaconStateElectra{})
|
||||
stIface, err := InitializeFromProtoElectra(ðpb.BeaconStateElectra{})
|
||||
require.NoError(t, err)
|
||||
st := stIface.(*state_native.BeaconState)
|
||||
st := stIface.(*BeaconState)
|
||||
|
||||
_, err = st.BuilderPendingPayment(0)
|
||||
require.ErrorContains(t, "BuilderPendingPayment", err)
|
||||
})
|
||||
|
||||
t.Run("out of range", func(t *testing.T) {
|
||||
stIface, err := state_native.InitializeFromProtoUnsafeGloas(ðpb.BeaconStateGloas{
|
||||
stIface, err := InitializeFromProtoUnsafeGloas(ðpb.BeaconStateGloas{
|
||||
BuilderPendingPayments: []*ethpb.BuilderPendingPayment{},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -440,9 +431,9 @@ func TestBuilderPendingPayment(t *testing.T) {
|
||||
|
||||
func TestExecutionPayloadAvailability(t *testing.T) {
|
||||
t.Run("unsupported version", func(t *testing.T) {
|
||||
stIface, err := state_native.InitializeFromProtoElectra(ðpb.BeaconStateElectra{})
|
||||
stIface, err := InitializeFromProtoElectra(ðpb.BeaconStateElectra{})
|
||||
require.NoError(t, err)
|
||||
st := stIface.(*state_native.BeaconState)
|
||||
st := stIface.(*BeaconState)
|
||||
|
||||
_, err = st.ExecutionPayloadAvailability(0)
|
||||
require.ErrorContains(t, "ExecutionPayloadAvailability", err)
|
||||
@@ -456,7 +447,7 @@ func TestExecutionPayloadAvailability(t *testing.T) {
|
||||
slot := primitives.Slot(9) // byteIndex=1, bitIndex=1
|
||||
availability[1] = 0b00000010
|
||||
|
||||
stIface, err := state_native.InitializeFromProtoUnsafeGloas(ðpb.BeaconStateGloas{
|
||||
stIface, err := InitializeFromProtoUnsafeGloas(ðpb.BeaconStateGloas{
|
||||
ExecutionPayloadAvailability: availability,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
@@ -470,3 +461,238 @@ func TestExecutionPayloadAvailability(t *testing.T) {
|
||||
require.Equal(t, uint64(0), otherBit)
|
||||
})
|
||||
}
|
||||
|
||||
func TestIsParentBlockFull(t *testing.T) {
|
||||
t.Run("returns error before gloas", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
_, err := st.IsParentBlockFull()
|
||||
require.ErrorContains(t, "is not supported", err)
|
||||
})
|
||||
|
||||
t.Run("returns false when bid is nil", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Gloas}
|
||||
got, err := st.IsParentBlockFull()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, false, got)
|
||||
})
|
||||
|
||||
t.Run("returns true when hashes match", func(t *testing.T) {
|
||||
hash := bytes.Repeat([]byte{0xAB}, 32)
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
latestExecutionPayloadBid: ðpb.ExecutionPayloadBid{
|
||||
BlockHash: hash,
|
||||
},
|
||||
latestBlockHash: hash,
|
||||
}
|
||||
|
||||
got, err := st.IsParentBlockFull()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, true, got)
|
||||
})
|
||||
|
||||
t.Run("returns false when hashes differ", func(t *testing.T) {
|
||||
hash := bytes.Repeat([]byte{0xAB}, 32)
|
||||
other := bytes.Repeat([]byte{0xCD}, 32)
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
latestExecutionPayloadBid: ðpb.ExecutionPayloadBid{
|
||||
BlockHash: hash,
|
||||
},
|
||||
latestBlockHash: other,
|
||||
}
|
||||
|
||||
got, err := st.IsParentBlockFull()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, false, got)
|
||||
})
|
||||
}
|
||||
|
||||
func TestAppendBuilderWithdrawals(t *testing.T) {
|
||||
t.Run("errors when prior withdrawals exceed limit", func(t *testing.T) {
|
||||
st := &BeaconState{}
|
||||
limit := params.BeaconConfig().MaxWithdrawalsPerPayload - 1
|
||||
withdrawals := make([]*enginev1.Withdrawal, limit+1)
|
||||
|
||||
nextIndex, processed, err := st.appendBuilderWithdrawals(5, &withdrawals)
|
||||
require.ErrorContains(t, "exceeds limit", err)
|
||||
require.Equal(t, uint64(5), nextIndex)
|
||||
require.Equal(t, uint64(0), processed)
|
||||
require.Equal(t, int(limit+1), len(withdrawals))
|
||||
})
|
||||
|
||||
t.Run("appends builder withdrawals and increments index", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
builderPendingWithdrawals: []*ethpb.BuilderPendingWithdrawal{
|
||||
{BuilderIndex: 1, FeeRecipient: []byte{0x01}, Amount: 11},
|
||||
{BuilderIndex: 2, FeeRecipient: []byte{0x02}, Amount: 22},
|
||||
{BuilderIndex: 3, FeeRecipient: []byte{0x03}, Amount: 33},
|
||||
},
|
||||
}
|
||||
withdrawals := []*enginev1.Withdrawal{
|
||||
{Index: 7, ValidatorIndex: 9, Address: []byte{0xAA}, Amount: 99},
|
||||
}
|
||||
|
||||
nextIndex, processed, err := st.appendBuilderWithdrawals(10, &withdrawals)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, uint64(13), nextIndex)
|
||||
require.Equal(t, uint64(3), processed)
|
||||
require.Equal(t, 4, len(withdrawals))
|
||||
|
||||
require.DeepEqual(t, &enginev1.Withdrawal{
|
||||
Index: 10,
|
||||
ValidatorIndex: primitives.BuilderIndex(1).ToValidatorIndex(),
|
||||
Address: []byte{0x01},
|
||||
Amount: 11,
|
||||
}, withdrawals[1])
|
||||
require.DeepEqual(t, &enginev1.Withdrawal{
|
||||
Index: 11,
|
||||
ValidatorIndex: primitives.BuilderIndex(2).ToValidatorIndex(),
|
||||
Address: []byte{0x02},
|
||||
Amount: 22,
|
||||
}, withdrawals[2])
|
||||
require.DeepEqual(t, &enginev1.Withdrawal{
|
||||
Index: 12,
|
||||
ValidatorIndex: primitives.BuilderIndex(3).ToValidatorIndex(),
|
||||
Address: []byte{0x03},
|
||||
Amount: 33,
|
||||
}, withdrawals[3])
|
||||
})
|
||||
|
||||
t.Run("respects per-payload limit", func(t *testing.T) {
|
||||
limit := params.BeaconConfig().MaxWithdrawalsPerPayload - 1
|
||||
st := &BeaconState{
|
||||
builderPendingWithdrawals: []*ethpb.BuilderPendingWithdrawal{
|
||||
{BuilderIndex: 4, FeeRecipient: []byte{0x04}, Amount: 44},
|
||||
{BuilderIndex: 5, FeeRecipient: []byte{0x05}, Amount: 55},
|
||||
},
|
||||
}
|
||||
withdrawals := make([]*enginev1.Withdrawal, limit-1)
|
||||
|
||||
nextIndex, processed, err := st.appendBuilderWithdrawals(20, &withdrawals)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, uint64(21), nextIndex)
|
||||
require.Equal(t, uint64(1), processed)
|
||||
require.Equal(t, int(limit), len(withdrawals))
|
||||
require.DeepEqual(t, &enginev1.Withdrawal{
|
||||
Index: 20,
|
||||
ValidatorIndex: primitives.BuilderIndex(4).ToValidatorIndex(),
|
||||
Address: []byte{0x04},
|
||||
Amount: 44,
|
||||
}, withdrawals[len(withdrawals)-1])
|
||||
})
|
||||
|
||||
t.Run("does not append when already at limit", func(t *testing.T) {
|
||||
limit := params.BeaconConfig().MaxWithdrawalsPerPayload - 1
|
||||
if limit == 0 {
|
||||
t.Skip("withdrawals limit too small")
|
||||
}
|
||||
st := &BeaconState{
|
||||
builderPendingWithdrawals: []*ethpb.BuilderPendingWithdrawal{
|
||||
{BuilderIndex: 6, FeeRecipient: []byte{0x06}, Amount: 66},
|
||||
},
|
||||
}
|
||||
withdrawals := make([]*enginev1.Withdrawal, limit)
|
||||
|
||||
nextIndex, processed, err := st.appendBuilderWithdrawals(30, &withdrawals)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, uint64(30), nextIndex)
|
||||
require.Equal(t, uint64(0), processed)
|
||||
require.Equal(t, int(limit), len(withdrawals))
|
||||
})
|
||||
}
|
||||
|
||||
func TestAppendBuildersSweepWithdrawals(t *testing.T) {
|
||||
t.Run("errors when prior withdrawals exceed limit", func(t *testing.T) {
|
||||
st := &BeaconState{}
|
||||
limit := params.BeaconConfig().MaxWithdrawalsPerPayload - 1
|
||||
withdrawals := make([]*enginev1.Withdrawal, limit+1)
|
||||
|
||||
nextIndex, nextBuilderIndex, err := st.appendBuildersSweepWithdrawals(5, &withdrawals)
|
||||
require.ErrorContains(t, "exceeds limit", err)
|
||||
require.Equal(t, uint64(5), nextIndex)
|
||||
require.Equal(t, primitives.BuilderIndex(0), nextBuilderIndex)
|
||||
require.Equal(t, int(limit+1), len(withdrawals))
|
||||
})
|
||||
|
||||
t.Run("appends eligible builders, skips ineligible", func(t *testing.T) {
|
||||
epoch := primitives.Epoch(3)
|
||||
st := &BeaconState{
|
||||
slot: slots.UnsafeEpochStart(epoch),
|
||||
nextWithdrawalBuilderIndex: 2,
|
||||
builders: []*ethpb.Builder{
|
||||
{ExecutionAddress: []byte{0x01}, Balance: 0, WithdrawableEpoch: epoch},
|
||||
{ExecutionAddress: []byte{0x02}, Balance: 10, WithdrawableEpoch: epoch + 1},
|
||||
{ExecutionAddress: []byte{0x03}, Balance: 20, WithdrawableEpoch: epoch},
|
||||
},
|
||||
}
|
||||
withdrawals := []*enginev1.Withdrawal{}
|
||||
|
||||
nextIndex, nextBuilderIndex, err := st.appendBuildersSweepWithdrawals(100, &withdrawals)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, uint64(101), nextIndex)
|
||||
require.Equal(t, primitives.BuilderIndex(2), nextBuilderIndex)
|
||||
require.Equal(t, 1, len(withdrawals))
|
||||
require.DeepEqual(t, &enginev1.Withdrawal{
|
||||
Index: 100,
|
||||
ValidatorIndex: primitives.BuilderIndex(2).ToValidatorIndex(),
|
||||
Address: []byte{0x03},
|
||||
Amount: 20,
|
||||
}, withdrawals[0])
|
||||
})
|
||||
|
||||
t.Run("respects max builders per sweep", func(t *testing.T) {
|
||||
cfg := params.BeaconConfig()
|
||||
max := int(cfg.MaxBuildersPerWithdrawalsSweep)
|
||||
epoch := primitives.Epoch(1)
|
||||
builders := make([]*ethpb.Builder, max+2)
|
||||
for i := range builders {
|
||||
builders[i] = ðpb.Builder{
|
||||
ExecutionAddress: []byte{byte(i + 1)},
|
||||
Balance: 1,
|
||||
WithdrawableEpoch: epoch,
|
||||
}
|
||||
}
|
||||
start := len(builders) - 1
|
||||
st := &BeaconState{
|
||||
slot: slots.UnsafeEpochStart(epoch),
|
||||
nextWithdrawalBuilderIndex: primitives.BuilderIndex(start),
|
||||
builders: builders,
|
||||
}
|
||||
withdrawals := []*enginev1.Withdrawal{}
|
||||
|
||||
nextIndex, nextBuilderIndex, err := st.appendBuildersSweepWithdrawals(7, &withdrawals)
|
||||
require.NoError(t, err)
|
||||
limit := int(cfg.MaxWithdrawalsPerPayload - 1)
|
||||
expectedCount := min(max, limit)
|
||||
require.Equal(t, uint64(7)+uint64(expectedCount), nextIndex)
|
||||
require.Equal(t, expectedCount, len(withdrawals))
|
||||
expectedNext := primitives.BuilderIndex((uint64(start) + uint64(expectedCount)) % uint64(len(builders)))
|
||||
require.Equal(t, expectedNext, nextBuilderIndex)
|
||||
})
|
||||
|
||||
t.Run("stops when payload limit reached", func(t *testing.T) {
|
||||
cfg := params.BeaconConfig()
|
||||
limit := cfg.MaxWithdrawalsPerPayload - 1
|
||||
if limit < 1 {
|
||||
t.Skip("withdrawals limit too small")
|
||||
}
|
||||
epoch := primitives.Epoch(2)
|
||||
builders := []*ethpb.Builder{
|
||||
{ExecutionAddress: []byte{0x0A}, Balance: 3, WithdrawableEpoch: epoch},
|
||||
{ExecutionAddress: []byte{0x0B}, Balance: 4, WithdrawableEpoch: epoch},
|
||||
}
|
||||
st := &BeaconState{
|
||||
slot: slots.UnsafeEpochStart(epoch),
|
||||
nextWithdrawalBuilderIndex: 0,
|
||||
builders: builders,
|
||||
}
|
||||
withdrawals := make([]*enginev1.Withdrawal, limit)
|
||||
|
||||
nextIndex, nextBuilderIndex, err := st.appendBuildersSweepWithdrawals(20, &withdrawals)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, uint64(20), nextIndex)
|
||||
require.Equal(t, int(limit), len(withdrawals))
|
||||
require.Equal(t, primitives.BuilderIndex(0), nextBuilderIndex)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -133,11 +133,22 @@ func (b *BeaconState) appendPendingPartialWithdrawals(withdrawalIndex uint64, wi
|
||||
return withdrawalIndex, 0, nil
|
||||
}
|
||||
|
||||
cfg := params.BeaconConfig()
|
||||
var withdrawalsLimit int
|
||||
if b.version >= version.Gloas {
|
||||
withdrawalsLimit = min(
|
||||
len(*withdrawals)+int(cfg.MaxPendingPartialsPerWithdrawalsSweep),
|
||||
int(cfg.MaxWithdrawalsPerPayload-1),
|
||||
)
|
||||
} else {
|
||||
withdrawalsLimit = int(cfg.MaxPendingPartialsPerWithdrawalsSweep)
|
||||
}
|
||||
|
||||
ws := *withdrawals
|
||||
epoch := slots.ToEpoch(b.slot)
|
||||
var processedPartialWithdrawalsCount uint64
|
||||
for _, w := range b.pendingPartialWithdrawals {
|
||||
if w.WithdrawableEpoch > epoch || len(ws) >= int(params.BeaconConfig().MaxPendingPartialsPerWithdrawalsSweep) {
|
||||
if w.WithdrawableEpoch > epoch || len(ws) >= withdrawalsLimit {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -149,7 +160,7 @@ func (b *BeaconState) appendPendingPartialWithdrawals(withdrawalIndex uint64, wi
|
||||
if err != nil {
|
||||
return withdrawalIndex, 0, fmt.Errorf("could not retrieve balance at index %d: %w", w.Index, err)
|
||||
}
|
||||
hasSufficientEffectiveBalance := v.EffectiveBalance() >= params.BeaconConfig().MinActivationBalance
|
||||
hasSufficientEffectiveBalance := v.EffectiveBalance() >= cfg.MinActivationBalance
|
||||
var totalWithdrawn uint64
|
||||
for _, wi := range ws {
|
||||
if wi.ValidatorIndex == w.Index {
|
||||
@@ -160,9 +171,9 @@ func (b *BeaconState) appendPendingPartialWithdrawals(withdrawalIndex uint64, wi
|
||||
if err != nil {
|
||||
return withdrawalIndex, 0, errors.Wrapf(err, "failed to subtract balance %d with total withdrawn %d", vBal, totalWithdrawn)
|
||||
}
|
||||
hasExcessBalance := balance > params.BeaconConfig().MinActivationBalance
|
||||
if v.ExitEpoch() == params.BeaconConfig().FarFutureEpoch && hasSufficientEffectiveBalance && hasExcessBalance {
|
||||
amount := min(balance-params.BeaconConfig().MinActivationBalance, w.Amount)
|
||||
hasExcessBalance := balance > cfg.MinActivationBalance
|
||||
if v.ExitEpoch() == cfg.FarFutureEpoch && hasSufficientEffectiveBalance && hasExcessBalance {
|
||||
amount := min(balance-cfg.MinActivationBalance, w.Amount)
|
||||
ws = append(ws, &enginev1.Withdrawal{
|
||||
Index: withdrawalIndex,
|
||||
ValidatorIndex: w.Index,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package state_native
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state/state-native/types"
|
||||
@@ -10,9 +11,11 @@ import (
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||
"github.com/OffchainLabs/prysm/v7/time/slots"
|
||||
pkgerrors "github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// RotateBuilderPendingPayments rotates the queue by dropping slots per epoch payments from the
|
||||
@@ -214,6 +217,21 @@ func (b *BeaconState) SetLatestBlockHash(hash [32]byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetPayloadExpectedWithdrawals stores the expected withdrawals for the next payload.
|
||||
func (b *BeaconState) SetPayloadExpectedWithdrawals(withdrawals []*enginev1.Withdrawal) error {
|
||||
if b.version < version.Gloas {
|
||||
return errNotSupported("SetPayloadExpectedWithdrawals", b.version)
|
||||
}
|
||||
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
b.payloadExpectedWithdrawals = withdrawals
|
||||
b.markFieldAsDirty(types.PayloadExpectedWithdrawals)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetExecutionPayloadAvailability sets the execution payload availability bit for a specific slot.
|
||||
func (b *BeaconState) SetExecutionPayloadAvailability(index primitives.Slot, available bool) error {
|
||||
if b.version < version.Gloas {
|
||||
@@ -445,3 +463,136 @@ func (b *BeaconState) UpdatePendingPaymentWeight(att ethpb.Att, indices []uint64
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DequeueBuilderPendingWithdrawals removes processed builder withdrawals from the front of the queue.
|
||||
func (b *BeaconState) DequeueBuilderPendingWithdrawals(n uint64) error {
|
||||
if b.version < version.Gloas {
|
||||
return errNotSupported("DequeueBuilderPendingWithdrawals", b.version)
|
||||
}
|
||||
|
||||
if n == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
if n > uint64(len(b.builderPendingWithdrawals)) {
|
||||
return errors.New("cannot dequeue more builder withdrawals than are in the queue")
|
||||
}
|
||||
|
||||
if b.sharedFieldReferences[types.BuilderPendingWithdrawals].Refs() > 1 {
|
||||
withdrawals := make([]*ethpb.BuilderPendingWithdrawal, len(b.builderPendingWithdrawals))
|
||||
copy(withdrawals, b.builderPendingWithdrawals)
|
||||
b.builderPendingWithdrawals = withdrawals
|
||||
b.sharedFieldReferences[types.BuilderPendingWithdrawals].MinusRef()
|
||||
b.sharedFieldReferences[types.BuilderPendingWithdrawals] = stateutil.NewRef(1)
|
||||
}
|
||||
|
||||
b.builderPendingWithdrawals = b.builderPendingWithdrawals[n:]
|
||||
b.markFieldAsDirty(types.BuilderPendingWithdrawals)
|
||||
b.rebuildTrie[types.BuilderPendingWithdrawals] = true
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetNextWithdrawalBuilderIndex sets the next builder index for the withdrawals sweep.
|
||||
func (b *BeaconState) SetNextWithdrawalBuilderIndex(index primitives.BuilderIndex) error {
|
||||
if b.version < version.Gloas {
|
||||
return errNotSupported("SetNextWithdrawalBuilderIndex", b.version)
|
||||
}
|
||||
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
b.nextWithdrawalBuilderIndex = index
|
||||
b.markFieldAsDirty(types.NextWithdrawalBuilderIndex)
|
||||
return nil
|
||||
}
|
||||
|
||||
// DecreaseWithdrawalBalances applies withdrawal balance decreases for validators and builders.
|
||||
// This method holds the state lock for the full batch to avoid lock churn.
|
||||
func (b *BeaconState) DecreaseWithdrawalBalances(withdrawals []*enginev1.Withdrawal) error {
|
||||
if b.version < version.Gloas {
|
||||
return errNotSupported("DecreaseWithdrawalBalances", b.version)
|
||||
}
|
||||
if len(withdrawals) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
var (
|
||||
balanceIndices []uint64
|
||||
builderIndices []uint64
|
||||
)
|
||||
|
||||
for _, withdrawal := range withdrawals {
|
||||
if withdrawal == nil {
|
||||
return errors.New("withdrawal is nil")
|
||||
}
|
||||
if withdrawal.Amount == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
if withdrawal.ValidatorIndex.IsBuilderIndex() {
|
||||
builderIndex := withdrawal.ValidatorIndex.ToBuilderIndex()
|
||||
if err := b.decreaseBuilderBalanceLockFree(builderIndex, withdrawal.Amount); err != nil {
|
||||
return err
|
||||
}
|
||||
builderIndices = append(builderIndices, uint64(builderIndex))
|
||||
continue
|
||||
}
|
||||
|
||||
balAtIdx, err := b.balanceAtIndex(withdrawal.ValidatorIndex)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newBal := decreaseBalanceWithVal(primitives.Gwei(balAtIdx), primitives.Gwei(withdrawal.Amount))
|
||||
if err := b.balancesMultiValue.UpdateAt(b, uint64(withdrawal.ValidatorIndex), uint64(newBal)); err != nil {
|
||||
return pkgerrors.Wrap(err, "could not update balances")
|
||||
}
|
||||
balanceIndices = append(balanceIndices, uint64(withdrawal.ValidatorIndex))
|
||||
}
|
||||
|
||||
if len(balanceIndices) > 0 {
|
||||
b.markFieldAsDirty(types.Balances)
|
||||
b.addDirtyIndices(types.Balances, balanceIndices)
|
||||
}
|
||||
if len(builderIndices) > 0 {
|
||||
b.markFieldAsDirty(types.Builders)
|
||||
b.addDirtyIndices(types.Builders, builderIndices)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *BeaconState) decreaseBuilderBalanceLockFree(builderIndex primitives.BuilderIndex, amount uint64) error {
|
||||
idx := uint64(builderIndex)
|
||||
if idx >= uint64(len(b.builders)) {
|
||||
return fmt.Errorf("builder index %d out of range (len=%d)", builderIndex, len(b.builders))
|
||||
}
|
||||
|
||||
if b.sharedFieldReferences[types.Builders].Refs() > 1 {
|
||||
builders := make([]*ethpb.Builder, len(b.builders))
|
||||
copy(builders, b.builders)
|
||||
builder := ethpb.CopyBuilder(builders[idx])
|
||||
builders[idx] = builder
|
||||
b.builders = builders
|
||||
b.sharedFieldReferences[types.Builders].MinusRef()
|
||||
b.sharedFieldReferences[types.Builders] = stateutil.NewRef(1)
|
||||
}
|
||||
|
||||
builder := b.builders[idx]
|
||||
builder.Balance = decreaseBalanceWithVal(builder.Balance, primitives.Gwei(amount))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func decreaseBalanceWithVal(currBalance, delta primitives.Gwei) primitives.Gwei {
|
||||
if delta > currBalance {
|
||||
return 0
|
||||
}
|
||||
return currBalance - delta
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state/stateutil"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
@@ -400,6 +401,235 @@ func TestRotateBuilderPendingPayments_UnsupportedVersion(t *testing.T) {
|
||||
require.ErrorContains(t, "RotateBuilderPendingPayments", err)
|
||||
}
|
||||
|
||||
func TestSetPayloadExpectedWithdrawals(t *testing.T) {
|
||||
t.Run("previous fork returns expected error", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
err := st.SetPayloadExpectedWithdrawals([]*enginev1.Withdrawal{})
|
||||
require.ErrorContains(t, "SetPayloadExpectedWithdrawals", err)
|
||||
})
|
||||
|
||||
t.Run("allows nil input and marks dirty", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
}
|
||||
|
||||
require.NoError(t, st.SetPayloadExpectedWithdrawals(nil))
|
||||
require.Equal(t, true, st.payloadExpectedWithdrawals == nil)
|
||||
require.Equal(t, true, st.dirtyFields[types.PayloadExpectedWithdrawals])
|
||||
})
|
||||
|
||||
t.Run("sets and marks dirty", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
payloadExpectedWithdrawals: []*enginev1.Withdrawal{{Index: 1}, {Index: 2}},
|
||||
}
|
||||
|
||||
withdrawals := []*enginev1.Withdrawal{{Index: 3}}
|
||||
require.NoError(t, st.SetPayloadExpectedWithdrawals(withdrawals))
|
||||
|
||||
require.DeepEqual(t, withdrawals, st.payloadExpectedWithdrawals)
|
||||
require.Equal(t, true, st.dirtyFields[types.PayloadExpectedWithdrawals])
|
||||
})
|
||||
}
|
||||
|
||||
func TestDecreaseWithdrawalBalances(t *testing.T) {
|
||||
t.Run("previous fork returns expected error", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
err := st.DecreaseWithdrawalBalances([]*enginev1.Withdrawal{{}})
|
||||
require.ErrorContains(t, "DecreaseWithdrawalBalances", err)
|
||||
})
|
||||
|
||||
t.Run("rejects nil withdrawal", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Gloas}
|
||||
err := st.DecreaseWithdrawalBalances([]*enginev1.Withdrawal{nil})
|
||||
require.ErrorContains(t, "withdrawal is nil", err)
|
||||
})
|
||||
|
||||
t.Run("no-op on empty input", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
dirtyIndices: make(map[types.FieldIndex][]uint64),
|
||||
rebuildTrie: make(map[types.FieldIndex]bool),
|
||||
}
|
||||
|
||||
require.NoError(t, st.DecreaseWithdrawalBalances(nil))
|
||||
require.Equal(t, 0, len(st.dirtyFields))
|
||||
require.Equal(t, 0, len(st.dirtyIndices))
|
||||
})
|
||||
|
||||
t.Run("updates validator and builder balances and tracks dirty indices", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
dirtyIndices: make(map[types.FieldIndex][]uint64),
|
||||
rebuildTrie: make(map[types.FieldIndex]bool),
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.Builders: stateutil.NewRef(1),
|
||||
},
|
||||
balancesMultiValue: NewMultiValueBalances([]uint64{100, 200, 300}),
|
||||
builders: []*ethpb.Builder{
|
||||
{Balance: 1000},
|
||||
{Balance: 50},
|
||||
},
|
||||
}
|
||||
|
||||
withdrawals := []*enginev1.Withdrawal{
|
||||
{ValidatorIndex: primitives.ValidatorIndex(1), Amount: 20},
|
||||
{ValidatorIndex: primitives.BuilderIndex(1).ToValidatorIndex(), Amount: 30},
|
||||
{ValidatorIndex: primitives.ValidatorIndex(2), Amount: 400},
|
||||
{ValidatorIndex: primitives.BuilderIndex(0).ToValidatorIndex(), Amount: 2000},
|
||||
{ValidatorIndex: primitives.ValidatorIndex(0), Amount: 0},
|
||||
}
|
||||
|
||||
require.NoError(t, st.DecreaseWithdrawalBalances(withdrawals))
|
||||
|
||||
require.DeepEqual(t, []uint64{100, 180, 0}, st.Balances())
|
||||
require.Equal(t, primitives.Gwei(0), st.builders[0].Balance)
|
||||
require.Equal(t, primitives.Gwei(20), st.builders[1].Balance)
|
||||
|
||||
require.Equal(t, true, st.dirtyFields[types.Balances])
|
||||
require.Equal(t, true, st.dirtyFields[types.Builders])
|
||||
require.DeepEqual(t, []uint64{1, 2}, st.dirtyIndices[types.Balances])
|
||||
require.DeepEqual(t, []uint64{1, 0}, st.dirtyIndices[types.Builders])
|
||||
})
|
||||
|
||||
t.Run("returns error on builder index out of range", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
dirtyIndices: make(map[types.FieldIndex][]uint64),
|
||||
rebuildTrie: make(map[types.FieldIndex]bool),
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.Builders: stateutil.NewRef(1),
|
||||
},
|
||||
builders: []*ethpb.Builder{{Balance: 5}},
|
||||
}
|
||||
|
||||
err := st.DecreaseWithdrawalBalances([]*enginev1.Withdrawal{
|
||||
{ValidatorIndex: primitives.BuilderIndex(2).ToValidatorIndex(), Amount: 1},
|
||||
})
|
||||
require.ErrorContains(t, "out of range", err)
|
||||
require.Equal(t, false, st.dirtyFields[types.Builders])
|
||||
require.Equal(t, 0, len(st.dirtyIndices[types.Builders]))
|
||||
})
|
||||
}
|
||||
|
||||
func TestDequeueBuilderPendingWithdrawals(t *testing.T) {
|
||||
t.Run("previous fork returns expected error", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
err := st.DequeueBuilderPendingWithdrawals(1)
|
||||
require.ErrorContains(t, "DequeueBuilderPendingWithdrawals", err)
|
||||
})
|
||||
|
||||
t.Run("returns error when dequeueing more than length", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.BuilderPendingWithdrawals: stateutil.NewRef(1),
|
||||
},
|
||||
builderPendingWithdrawals: []*ethpb.BuilderPendingWithdrawal{{Amount: 1}},
|
||||
}
|
||||
|
||||
err := st.DequeueBuilderPendingWithdrawals(2)
|
||||
require.ErrorContains(t, "cannot dequeue more builder withdrawals", err)
|
||||
require.Equal(t, 1, len(st.builderPendingWithdrawals))
|
||||
require.Equal(t, false, st.dirtyFields[types.BuilderPendingWithdrawals])
|
||||
})
|
||||
|
||||
t.Run("no-op on zero", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.BuilderPendingWithdrawals: stateutil.NewRef(1),
|
||||
},
|
||||
builderPendingWithdrawals: []*ethpb.BuilderPendingWithdrawal{{Amount: 1}},
|
||||
}
|
||||
|
||||
require.NoError(t, st.DequeueBuilderPendingWithdrawals(0))
|
||||
require.Equal(t, 1, len(st.builderPendingWithdrawals))
|
||||
require.Equal(t, false, st.dirtyFields[types.BuilderPendingWithdrawals])
|
||||
require.Equal(t, false, st.rebuildTrie[types.BuilderPendingWithdrawals])
|
||||
})
|
||||
|
||||
t.Run("dequeues and marks dirty", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.BuilderPendingWithdrawals: stateutil.NewRef(1),
|
||||
},
|
||||
builderPendingWithdrawals: []*ethpb.BuilderPendingWithdrawal{
|
||||
{Amount: 1},
|
||||
{Amount: 2},
|
||||
{Amount: 3},
|
||||
},
|
||||
rebuildTrie: make(map[types.FieldIndex]bool),
|
||||
}
|
||||
|
||||
require.NoError(t, st.DequeueBuilderPendingWithdrawals(2))
|
||||
require.Equal(t, 1, len(st.builderPendingWithdrawals))
|
||||
require.Equal(t, primitives.Gwei(3), st.builderPendingWithdrawals[0].Amount)
|
||||
require.Equal(t, true, st.dirtyFields[types.BuilderPendingWithdrawals])
|
||||
require.Equal(t, true, st.rebuildTrie[types.BuilderPendingWithdrawals])
|
||||
})
|
||||
|
||||
t.Run("copy-on-write preserves shared state", func(t *testing.T) {
|
||||
sharedRef := stateutil.NewRef(2)
|
||||
sharedWithdrawals := []*ethpb.BuilderPendingWithdrawal{
|
||||
{Amount: 1},
|
||||
{Amount: 2},
|
||||
{Amount: 3},
|
||||
}
|
||||
|
||||
st1 := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.BuilderPendingWithdrawals: sharedRef,
|
||||
},
|
||||
builderPendingWithdrawals: sharedWithdrawals,
|
||||
rebuildTrie: make(map[types.FieldIndex]bool),
|
||||
}
|
||||
st2 := &BeaconState{
|
||||
sharedFieldReferences: map[types.FieldIndex]*stateutil.Reference{
|
||||
types.BuilderPendingWithdrawals: sharedRef,
|
||||
},
|
||||
builderPendingWithdrawals: sharedWithdrawals,
|
||||
}
|
||||
|
||||
require.NoError(t, st1.DequeueBuilderPendingWithdrawals(2))
|
||||
require.Equal(t, primitives.Gwei(3), st1.builderPendingWithdrawals[0].Amount)
|
||||
require.Equal(t, 3, len(st2.builderPendingWithdrawals))
|
||||
require.Equal(t, primitives.Gwei(1), st2.builderPendingWithdrawals[0].Amount)
|
||||
require.Equal(t, uint(1), st1.sharedFieldReferences[types.BuilderPendingWithdrawals].Refs())
|
||||
require.Equal(t, uint(1), st2.sharedFieldReferences[types.BuilderPendingWithdrawals].Refs())
|
||||
})
|
||||
}
|
||||
|
||||
func TestSetNextWithdrawalBuilderIndex(t *testing.T) {
|
||||
t.Run("previous fork returns expected error", func(t *testing.T) {
|
||||
st := &BeaconState{version: version.Fulu}
|
||||
err := st.SetNextWithdrawalBuilderIndex(1)
|
||||
require.ErrorContains(t, "SetNextWithdrawalBuilderIndex", err)
|
||||
})
|
||||
|
||||
t.Run("sets and marks dirty", func(t *testing.T) {
|
||||
st := &BeaconState{
|
||||
version: version.Gloas,
|
||||
dirtyFields: make(map[types.FieldIndex]bool),
|
||||
}
|
||||
|
||||
require.NoError(t, st.SetNextWithdrawalBuilderIndex(7))
|
||||
require.Equal(t, primitives.BuilderIndex(7), st.nextWithdrawalBuilderIndex)
|
||||
require.Equal(t, true, st.dirtyFields[types.NextWithdrawalBuilderIndex])
|
||||
})
|
||||
}
|
||||
|
||||
func TestAppendBuilderPendingWithdrawal_CopyOnWrite(t *testing.T) {
|
||||
wd := ðpb.BuilderPendingWithdrawal{
|
||||
FeeRecipient: make([]byte, 20),
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
### Added
|
||||
|
||||
- gRPC endpoints for get block, propose block for gloas - excludes PTC attestations
|
||||
- gRPC endpoints for get payload envelope, and propose payload envelope - excludes blob propogation
|
||||
@@ -1,2 +0,0 @@
|
||||
### Ignored
|
||||
- Refactor ProcessExecutionPayload to ApplyExecutionPayload
|
||||
2
changelog/tt_process-withdrawals-gloas.md
Normal file
2
changelog/tt_process-withdrawals-gloas.md
Normal file
@@ -0,0 +1,2 @@
|
||||
### Added
|
||||
- add modified process withdrawals for gloas
|
||||
@@ -130,6 +130,7 @@ type BeaconChainConfig struct {
|
||||
MaxWithdrawalsPerPayload uint64 `yaml:"MAX_WITHDRAWALS_PER_PAYLOAD" spec:"true"` // MaxWithdrawalsPerPayload defines the maximum number of withdrawals in a block.
|
||||
MaxBlsToExecutionChanges uint64 `yaml:"MAX_BLS_TO_EXECUTION_CHANGES" spec:"true"` // MaxBlsToExecutionChanges defines the maximum number of BLS-to-execution-change objects in a block.
|
||||
MaxValidatorsPerWithdrawalsSweep uint64 `yaml:"MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP" spec:"true"` // MaxValidatorsPerWithdrawalsSweep bounds the size of the sweep searching for withdrawals per slot.
|
||||
MaxBuildersPerWithdrawalsSweep uint64 `yaml:"MAX_BUILDERS_PER_WITHDRAWALS_SWEEP" spec:"true"` // MaxBuildersPerWithdrawalsSweep bounds the size of the builder withdrawals sweep per slot.
|
||||
|
||||
// BLS domain values.
|
||||
DomainBeaconProposer [4]byte `yaml:"DOMAIN_BEACON_PROPOSER" spec:"true"` // DomainBeaconProposer defines the BLS signature domain for beacon proposal verification.
|
||||
|
||||
@@ -194,6 +194,7 @@ func ConfigToYaml(cfg *BeaconChainConfig) []byte {
|
||||
fmt.Sprintf("SHARD_COMMITTEE_PERIOD: %d", cfg.ShardCommitteePeriod),
|
||||
fmt.Sprintf("MIN_VALIDATOR_WITHDRAWABILITY_DELAY: %d", cfg.MinValidatorWithdrawabilityDelay),
|
||||
fmt.Sprintf("MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP: %d", cfg.MaxValidatorsPerWithdrawalsSweep),
|
||||
fmt.Sprintf("MAX_BUILDERS_PER_WITHDRAWALS_SWEEP: %d", cfg.MaxBuildersPerWithdrawalsSweep),
|
||||
fmt.Sprintf("MAX_SEED_LOOKAHEAD: %d", cfg.MaxSeedLookahead),
|
||||
fmt.Sprintf("EJECTION_BALANCE: %d", cfg.EjectionBalance),
|
||||
fmt.Sprintf("MIN_PER_EPOCH_CHURN_LIMIT: %d", cfg.MinPerEpochChurnLimit),
|
||||
|
||||
@@ -175,6 +175,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{
|
||||
MaxWithdrawalsPerPayload: 16,
|
||||
MaxBlsToExecutionChanges: 16,
|
||||
MaxValidatorsPerWithdrawalsSweep: 16384,
|
||||
MaxBuildersPerWithdrawalsSweep: 16384,
|
||||
|
||||
// BLS domain values.
|
||||
DomainBeaconProposer: bytesutil.Uint32ToBytes4(0x00000000),
|
||||
|
||||
@@ -95,6 +95,7 @@ func compareConfigs(t *testing.T, expected, actual *params.BeaconChainConfig) {
|
||||
require.DeepEqual(t, expected.MaxDeposits, actual.MaxDeposits)
|
||||
require.DeepEqual(t, expected.MaxVoluntaryExits, actual.MaxVoluntaryExits)
|
||||
require.DeepEqual(t, expected.MaxWithdrawalsPerPayload, actual.MaxWithdrawalsPerPayload)
|
||||
require.DeepEqual(t, expected.MaxBuildersPerWithdrawalsSweep, actual.MaxBuildersPerWithdrawalsSweep)
|
||||
require.DeepEqual(t, expected.DomainBeaconProposer, actual.DomainBeaconProposer)
|
||||
require.DeepEqual(t, expected.DomainRandao, actual.DomainRandao)
|
||||
require.DeepEqual(t, expected.DomainBeaconAttester, actual.DomainBeaconAttester)
|
||||
|
||||
@@ -140,8 +140,6 @@ func NewBeaconBlock(i any) (interfaces.ReadOnlyBeaconBlock, error) {
|
||||
return initBlindedBlockFromProtoFulu(b)
|
||||
case *eth.GenericBeaconBlock_BlindedFulu:
|
||||
return initBlindedBlockFromProtoFulu(b.BlindedFulu)
|
||||
case *eth.GenericBeaconBlock_Gloas:
|
||||
return initBlockFromProtoGloas(b.Gloas)
|
||||
case *eth.BeaconBlockGloas:
|
||||
return initBlockFromProtoGloas(b)
|
||||
default:
|
||||
|
||||
@@ -160,9 +160,8 @@ func (b *SignedBeaconBlock) PbGenericBlock() (*eth.GenericSignedBeaconBlock, err
|
||||
Block: ð.GenericSignedBeaconBlock_Fulu{Fulu: bc},
|
||||
}, nil
|
||||
case version.Gloas:
|
||||
return ð.GenericSignedBeaconBlock{
|
||||
Block: ð.GenericSignedBeaconBlock_Gloas{Gloas: pb.(*eth.SignedBeaconBlockGloas)},
|
||||
}, nil
|
||||
// Gloas doesn't support GenericSignedBeaconBlock yet
|
||||
return nil, errors.New("Gloas blocks don't support GenericSignedBeaconBlock conversion")
|
||||
default:
|
||||
return nil, errIncorrectBlockVersion
|
||||
}
|
||||
@@ -1147,8 +1146,6 @@ func (b *BeaconBlock) AsSignRequestObject() (validatorpb.SignRequestObject, erro
|
||||
return &validatorpb.SignRequest_BlindedBlockFulu{BlindedBlockFulu: pb.(*eth.BlindedBeaconBlockFulu)}, nil
|
||||
}
|
||||
return &validatorpb.SignRequest_BlockFulu{BlockFulu: pb.(*eth.BeaconBlockElectra)}, nil
|
||||
case version.Gloas:
|
||||
return &validatorpb.SignRequest_BlockGloas{BlockGloas: pb.(*eth.BeaconBlockGloas)}, nil
|
||||
default:
|
||||
return nil, errIncorrectBlockVersion
|
||||
}
|
||||
|
||||
@@ -164,26 +164,14 @@ func Test_SignedBeaconBlock_Header(t *testing.T) {
|
||||
assert.DeepEqual(t, expectedHTR[:], h.Header.BodyRoot)
|
||||
}
|
||||
|
||||
func Test_SignedBeaconBlock_PbGenericBlockGloas(t *testing.T) {
|
||||
blk := ð.SignedBeaconBlockGloas{
|
||||
Block: ð.BeaconBlockGloas{
|
||||
ParentRoot: make([]byte, fieldparams.RootLength),
|
||||
StateRoot: make([]byte, fieldparams.RootLength),
|
||||
Body: ð.BeaconBlockBodyGloas{
|
||||
RandaoReveal: make([]byte, fieldparams.BLSSignatureLength),
|
||||
Graffiti: make([]byte, fieldparams.RootLength),
|
||||
},
|
||||
},
|
||||
Signature: make([]byte, fieldparams.BLSSignatureLength),
|
||||
func Test_SignedBeaconBlock_PbGenericBlockGloasUnsupported(t *testing.T) {
|
||||
sb := &SignedBeaconBlock{
|
||||
version: version.Gloas,
|
||||
block: &BeaconBlock{version: version.Gloas, body: &BeaconBlockBody{version: version.Gloas}},
|
||||
}
|
||||
sb, err := NewSignedBeaconBlock(blk)
|
||||
require.NoError(t, err)
|
||||
|
||||
generic, err := sb.PbGenericBlock()
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, generic)
|
||||
_, ok := generic.Block.(*eth.GenericSignedBeaconBlock_Gloas)
|
||||
require.Equal(t, true, ok)
|
||||
_, err := sb.PbGenericBlock()
|
||||
require.ErrorContains(t, "Gloas blocks don't support GenericSignedBeaconBlock conversion", err)
|
||||
}
|
||||
|
||||
func Test_SignedBeaconBlock_UnmarshalSSZ(t *testing.T) {
|
||||
@@ -678,12 +666,12 @@ func hydrateBeaconBlockBodyGloas() *eth.BeaconBlockBodyGloas {
|
||||
},
|
||||
SignedExecutionPayloadBid: ð.SignedExecutionPayloadBid{
|
||||
Message: ð.ExecutionPayloadBid{
|
||||
ParentBlockHash: make([]byte, fieldparams.RootLength),
|
||||
ParentBlockRoot: make([]byte, fieldparams.RootLength),
|
||||
BlockHash: make([]byte, fieldparams.RootLength),
|
||||
PrevRandao: make([]byte, fieldparams.RootLength),
|
||||
FeeRecipient: make([]byte, 20),
|
||||
BlobKzgCommitments: [][]byte{make([]byte, fieldparams.BLSPubkeyLength)},
|
||||
ParentBlockHash: make([]byte, fieldparams.RootLength),
|
||||
ParentBlockRoot: make([]byte, fieldparams.RootLength),
|
||||
BlockHash: make([]byte, fieldparams.RootLength),
|
||||
PrevRandao: make([]byte, fieldparams.RootLength),
|
||||
FeeRecipient: make([]byte, 20),
|
||||
BlobKzgCommitments: [][]byte{make([]byte, fieldparams.BLSPubkeyLength)},
|
||||
},
|
||||
Signature: make([]byte, fieldparams.BLSSignatureLength),
|
||||
},
|
||||
|
||||
@@ -13,6 +13,16 @@ var _ fssz.Unmarshaler = (*BuilderIndex)(nil)
|
||||
// BuilderIndex is an index into the builder registry.
|
||||
type BuilderIndex uint64
|
||||
|
||||
// ToValidatorIndex sets the builder flag on a builder index.
|
||||
//
|
||||
// Spec v1.6.1 (pseudocode):
|
||||
// def convert_builder_index_to_validator_index(builder_index: BuilderIndex) -> ValidatorIndex:
|
||||
//
|
||||
// return ValidatorIndex(builder_index | BUILDER_INDEX_FLAG)
|
||||
func (b BuilderIndex) ToValidatorIndex() ValidatorIndex {
|
||||
return ValidatorIndex(uint64(b) | BuilderIndexFlag)
|
||||
}
|
||||
|
||||
// HashTreeRoot returns the SSZ hash tree root of the index.
|
||||
func (b BuilderIndex) HashTreeRoot() ([32]byte, error) {
|
||||
return fssz.HashWithDefaultHasher(b)
|
||||
|
||||
@@ -10,9 +10,34 @@ var _ fssz.HashRoot = (ValidatorIndex)(0)
|
||||
var _ fssz.Marshaler = (*ValidatorIndex)(nil)
|
||||
var _ fssz.Unmarshaler = (*ValidatorIndex)(nil)
|
||||
|
||||
// BuilderIndexFlag marks a ValidatorIndex as a BuilderIndex when the bit is set.
|
||||
//
|
||||
// Spec v1.6.1: BUILDER_INDEX_FLAG.
|
||||
const BuilderIndexFlag uint64 = 1 << 40
|
||||
|
||||
// ValidatorIndex in eth2.
|
||||
type ValidatorIndex uint64
|
||||
|
||||
// IsBuilderIndex returns true when the BuilderIndex flag is set on the validator index.
|
||||
//
|
||||
// <spec fn="is_builder_index" fork="gloas" hash="2fbd46e9">
|
||||
// def is_builder_index(validator_index: ValidatorIndex) -> bool:
|
||||
// return (validator_index & BUILDER_INDEX_FLAG) != 0
|
||||
// </spec>
|
||||
func (v ValidatorIndex) IsBuilderIndex() bool {
|
||||
return uint64(v)&BuilderIndexFlag != 0
|
||||
}
|
||||
|
||||
// ToBuilderIndex strips the builder flag from a validator index.
|
||||
//
|
||||
// <spec fn="convert_validator_index_to_builder_index" fork="gloas" hash="2fea5b47">
|
||||
// def convert_validator_index_to_builder_index(validator_index: ValidatorIndex) -> BuilderIndex:
|
||||
// return BuilderIndex(validator_index & ~BUILDER_INDEX_FLAG)
|
||||
// </spec>
|
||||
func (v ValidatorIndex) ToBuilderIndex() BuilderIndex {
|
||||
return BuilderIndex(uint64(v) & ^BuilderIndexFlag)
|
||||
}
|
||||
|
||||
// Div divides validator index by x.
|
||||
// This method panics if dividing by zero!
|
||||
func (v ValidatorIndex) Div(x uint64) ValidatorIndex {
|
||||
|
||||
@@ -33,3 +33,32 @@ func TestValidatorIndex_Casting(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestValidatorIndex_BuilderIndexFlagConversions(t *testing.T) {
|
||||
base := uint64(42)
|
||||
|
||||
unflagged := ValidatorIndex(base)
|
||||
if unflagged.IsBuilderIndex() {
|
||||
t.Fatalf("expected unflagged validator index to not be a builder index")
|
||||
}
|
||||
if got, want := unflagged.ToBuilderIndex(), BuilderIndex(base); got != want {
|
||||
t.Fatalf("unexpected builder index: got %d want %d", got, want)
|
||||
}
|
||||
|
||||
flagged := ValidatorIndex(base | BuilderIndexFlag)
|
||||
if !flagged.IsBuilderIndex() {
|
||||
t.Fatalf("expected flagged validator index to be a builder index")
|
||||
}
|
||||
if got, want := flagged.ToBuilderIndex(), BuilderIndex(base); got != want {
|
||||
t.Fatalf("unexpected builder index: got %d want %d", got, want)
|
||||
}
|
||||
|
||||
builder := BuilderIndex(base)
|
||||
roundTrip := builder.ToValidatorIndex()
|
||||
if !roundTrip.IsBuilderIndex() {
|
||||
t.Fatalf("expected round-tripped validator index to be a builder index")
|
||||
}
|
||||
if got, want := roundTrip.ToBuilderIndex(), builder; got != want {
|
||||
t.Fatalf("unexpected round-trip builder index: got %d want %d", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
496
proto/prysm/v1alpha1/validator-client/keymanager.pb.go
generated
496
proto/prysm/v1alpha1/validator-client/keymanager.pb.go
generated
@@ -106,8 +106,6 @@ type SignRequest struct {
|
||||
// *SignRequest_AggregateAttestationAndProofElectra
|
||||
// *SignRequest_BlockFulu
|
||||
// *SignRequest_BlindedBlockFulu
|
||||
// *SignRequest_BlockGloas
|
||||
// *SignRequest_ExecutionPayloadEnvelope
|
||||
Object isSignRequest_Object `protobuf_oneof:"object"`
|
||||
SigningSlot github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot `protobuf:"varint,6,opt,name=signing_slot,json=signingSlot,proto3" json:"signing_slot,omitempty" cast-type:"github.com/OffchainLabs/prysm/v7/consensus-types/primitives.Slot"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -370,24 +368,6 @@ func (x *SignRequest) GetBlindedBlockFulu() *v1alpha1.BlindedBeaconBlockFulu {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignRequest) GetBlockGloas() *v1alpha1.BeaconBlockGloas {
|
||||
if x != nil {
|
||||
if x, ok := x.Object.(*SignRequest_BlockGloas); ok {
|
||||
return x.BlockGloas
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignRequest) GetExecutionPayloadEnvelope() *v1alpha1.ExecutionPayloadEnvelope {
|
||||
if x != nil {
|
||||
if x, ok := x.Object.(*SignRequest_ExecutionPayloadEnvelope); ok {
|
||||
return x.ExecutionPayloadEnvelope
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignRequest) GetSigningSlot() github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot {
|
||||
if x != nil {
|
||||
return x.SigningSlot
|
||||
@@ -487,14 +467,6 @@ type SignRequest_BlindedBlockFulu struct {
|
||||
BlindedBlockFulu *v1alpha1.BlindedBeaconBlockFulu `protobuf:"bytes,122,opt,name=blinded_block_fulu,json=blindedBlockFulu,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignRequest_BlockGloas struct {
|
||||
BlockGloas *v1alpha1.BeaconBlockGloas `protobuf:"bytes,123,opt,name=block_gloas,json=blockGloas,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SignRequest_ExecutionPayloadEnvelope struct {
|
||||
ExecutionPayloadEnvelope *v1alpha1.ExecutionPayloadEnvelope `protobuf:"bytes,124,opt,name=execution_payload_envelope,json=executionPayloadEnvelope,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SignRequest_Block) isSignRequest_Object() {}
|
||||
|
||||
func (*SignRequest_AttestationData) isSignRequest_Object() {}
|
||||
@@ -539,10 +511,6 @@ func (*SignRequest_BlockFulu) isSignRequest_Object() {}
|
||||
|
||||
func (*SignRequest_BlindedBlockFulu) isSignRequest_Object() {}
|
||||
|
||||
func (*SignRequest_BlockGloas) isSignRequest_Object() {}
|
||||
|
||||
func (*SignRequest_ExecutionPayloadEnvelope) isSignRequest_Object() {}
|
||||
|
||||
type SignResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
@@ -787,236 +755,222 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_rawDesc = []byte
|
||||
0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73,
|
||||
0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f,
|
||||
0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70,
|
||||
0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
|
||||
0x68, 0x61, 0x31, 0x2f, 0x67, 0x6c, 0x6f, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x29, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61,
|
||||
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69,
|
||||
0x74, 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x13, 0x0a, 0x0b, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
|
||||
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x10,
|
||||
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
|
||||
0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42,
|
||||
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61,
|
||||
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x7c, 0x0a, 0x1f, 0x61, 0x67, 0x67, 0x72,
|
||||
0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x67, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67,
|
||||
0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e,
|
||||
0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x1c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67,
|
||||
0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e,
|
||||
0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3a, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x68,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x6c,
|
||||
0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78,
|
||||
0x69, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x04,
|
||||
0x42, 0x44, 0x82, 0xb5, 0x18, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72,
|
||||
0x79, 0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73,
|
||||
0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65,
|
||||
0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d,
|
||||
0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82,
|
||||
0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x66,
|
||||
0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d,
|
||||
0x2f, 0x76, 0x37, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79,
|
||||
0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45,
|
||||
0x70, 0x6f, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x4d, 0x0a,
|
||||
0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x18, 0x6b, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63,
|
||||
0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52,
|
||||
0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x79, 0x0a, 0x1e,
|
||||
0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f,
|
||||
0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x6c,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e,
|
||||
0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x79, 0x6e, 0x63,
|
||||
0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f,
|
||||
0x66, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
|
||||
0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50,
|
||||
0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x17,
|
||||
0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52,
|
||||
0x14, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62,
|
||||
0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x6c, 0x0a,
|
||||
0x17, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62,
|
||||
0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65,
|
||||
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72,
|
||||
0x69, 0x78, 0x48, 0x00, 0x52, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x54, 0x0a, 0x0c, 0x72,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x71, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56,
|
||||
0x31, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c,
|
||||
0x6c, 0x61, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
|
||||
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
||||
0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65,
|
||||
0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65,
|
||||
0x6c, 0x6c, 0x61, 0x12, 0x66, 0x0a, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x73, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74,
|
||||
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70,
|
||||
0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x4a, 0x0a, 0x0b, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x60, 0x0a, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x75,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44,
|
||||
0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x66, 0x0a, 0x15, 0x62,
|
||||
0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x72, 0x61, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
|
||||
0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e,
|
||||
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x13,
|
||||
0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x72, 0x61, 0x12, 0x92, 0x01, 0x0a, 0x27, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e,
|
||||
0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18,
|
||||
0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67,
|
||||
0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72,
|
||||
0x61, 0x48, 0x00, 0x52, 0x23, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74,
|
||||
0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f,
|
||||
0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x4a, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x5f, 0x66, 0x75, 0x6c, 0x75, 0x18, 0x79, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
|
||||
0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x46, 0x75, 0x6c, 0x75, 0x12, 0x5d, 0x0a, 0x12, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x66, 0x75, 0x6c, 0x75, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64,
|
||||
0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x75, 0x6c, 0x75, 0x48,
|
||||
0x00, 0x52, 0x10, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46,
|
||||
0x75, 0x6c, 0x75, 0x12, 0x4a, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x67, 0x6c, 0x6f,
|
||||
0x61, 0x73, 0x18, 0x7b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
|
||||
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
||||
0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x6c, 0x6f, 0x61,
|
||||
0x73, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x6c, 0x6f, 0x61, 0x73, 0x12,
|
||||
0x6f, 0x0a, 0x1a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x7c, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65,
|
||||
0x6c, 0x6f, 0x70, 0x65, 0x48, 0x00, 0x52, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65,
|
||||
0x12, 0x67, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xb5, 0x18, 0x40, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c,
|
||||
0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x63, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69,
|
||||
0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0b, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22,
|
||||
0xb7, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4b,
|
||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
|
||||
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10,
|
||||
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a,
|
||||
0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x50, 0x72,
|
||||
0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52,
|
||||
0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c,
|
||||
0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65,
|
||||
0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65,
|
||||
0x72, 0x12, 0x1f, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x88,
|
||||
0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x22,
|
||||
0xa5, 0x01, 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x09, 0x67,
|
||||
0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45,
|
||||
0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f,
|
||||
0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74,
|
||||
0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x11, 0x0a, 0x0b, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69,
|
||||
0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x65,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61,
|
||||
0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x12, 0x53, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74,
|
||||
0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
|
||||
0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44,
|
||||
0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x7c, 0x0a, 0x1f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67,
|
||||
0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
|
||||
0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50,
|
||||
0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x1c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
|
||||
0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50,
|
||||
0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3a, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x68, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74,
|
||||
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6e,
|
||||
0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74,
|
||||
0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44,
|
||||
0x82, 0xb5, 0x18, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f,
|
||||
0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73,
|
||||
0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74,
|
||||
0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55,
|
||||
0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xe7, 0x02, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x12, 0x74, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f,
|
||||
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72,
|
||||
0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61,
|
||||
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x64, 0x65, 0x66,
|
||||
0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x78, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x4b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50,
|
||||
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x42, 0xcd, 0x01, 0x0a, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
|
||||
0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e,
|
||||
0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74,
|
||||
0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e,
|
||||
0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x05,
|
||||
0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18,
|
||||
0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x66, 0x66, 0x63,
|
||||
0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76,
|
||||
0x37, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f,
|
||||
0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x4d, 0x0a, 0x0c, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x18, 0x6b, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e,
|
||||
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x79, 0x0a, 0x1e, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x6c, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74,
|
||||
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41,
|
||||
0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67,
|
||||
0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18,
|
||||
0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f,
|
||||
0x6f, 0x66, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x17, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x14, 0x73,
|
||||
0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52,
|
||||
0x6f, 0x6f, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x65, 0x6c,
|
||||
0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
|
||||
0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x6c, 0x0a, 0x17, 0x62,
|
||||
0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x65, 0x6c,
|
||||
0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c,
|
||||
0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63,
|
||||
0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78,
|
||||
0x48, 0x00, 0x52, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x54, 0x0a, 0x0c, 0x72, 0x65, 0x67,
|
||||
0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76,
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f,
|
||||
0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48,
|
||||
0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61,
|
||||
0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75,
|
||||
0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42,
|
||||
0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c,
|
||||
0x61, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c,
|
||||
0x61, 0x12, 0x66, 0x0a, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64,
|
||||
0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c,
|
||||
0x6c, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x4a, 0x0a, 0x0b, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x60, 0x0a, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64,
|
||||
0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x75, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74,
|
||||
0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e,
|
||||
0x65, 0x62, 0x48, 0x00, 0x52, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x66, 0x0a, 0x15, 0x62, 0x6c, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x72, 0x61, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
|
||||
0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
||||
0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x6c,
|
||||
0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72,
|
||||
0x61, 0x12, 0x92, 0x01, 0x0a, 0x27, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f,
|
||||
0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x78, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65,
|
||||
0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72,
|
||||
0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48,
|
||||
0x00, 0x52, 0x23, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65,
|
||||
0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x45,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x4a, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
|
||||
0x66, 0x75, 0x6c, 0x75, 0x18, 0x79, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
|
||||
0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c,
|
||||
0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x75,
|
||||
0x6c, 0x75, 0x12, 0x5d, 0x0a, 0x12, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x5f, 0x66, 0x75, 0x6c, 0x75, 0x18, 0x7a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d,
|
||||
0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65,
|
||||
0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x75, 0x6c, 0x75, 0x48, 0x00, 0x52,
|
||||
0x10, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x75, 0x6c,
|
||||
0x75, 0x12, 0x67, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f,
|
||||
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xb5, 0x18, 0x40, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e,
|
||||
0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
|
||||
0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa,
|
||||
0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32,
|
||||
0xca, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56,
|
||||
0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x63, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0b, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06,
|
||||
0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12,
|
||||
0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x06,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
|
||||
0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44,
|
||||
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a,
|
||||
0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69,
|
||||
0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65,
|
||||
0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x62, 0x75, 0x69,
|
||||
0x6c, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68,
|
||||
0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c,
|
||||
0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x65, 0x72, 0x12, 0x1f, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69,
|
||||
0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69,
|
||||
0x22, 0xa5, 0x01, 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x09,
|
||||
0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42,
|
||||
0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79,
|
||||
0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d,
|
||||
0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e,
|
||||
0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xe7, 0x02, 0x0a, 0x17, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x74, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72,
|
||||
0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e,
|
||||
0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
|
||||
0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50,
|
||||
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x64, 0x65,
|
||||
0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x78, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x4b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||
0x38, 0x01, 0x42, 0xcd, 0x01, 0x0a, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72,
|
||||
0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4b, 0x65, 0x79, 0x6d, 0x61,
|
||||
0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69,
|
||||
0x6e, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x37, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
|
||||
0x68, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62,
|
||||
0xaa, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56,
|
||||
0x32, 0xca, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c,
|
||||
0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -1059,8 +1013,6 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_goTypes = []any{
|
||||
(*v1alpha1.BlindedBeaconBlockElectra)(nil), // 22: ethereum.eth.v1alpha1.BlindedBeaconBlockElectra
|
||||
(*v1alpha1.AggregateAttestationAndProofElectra)(nil), // 23: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra
|
||||
(*v1alpha1.BlindedBeaconBlockFulu)(nil), // 24: ethereum.eth.v1alpha1.BlindedBeaconBlockFulu
|
||||
(*v1alpha1.BeaconBlockGloas)(nil), // 25: ethereum.eth.v1alpha1.BeaconBlockGloas
|
||||
(*v1alpha1.ExecutionPayloadEnvelope)(nil), // 26: ethereum.eth.v1alpha1.ExecutionPayloadEnvelope
|
||||
}
|
||||
var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_depIdxs = []int32{
|
||||
7, // 0: ethereum.validator.accounts.v2.SignRequest.block:type_name -> ethereum.eth.v1alpha1.BeaconBlock
|
||||
@@ -1082,18 +1034,16 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_depIdxs = []int3
|
||||
23, // 16: ethereum.validator.accounts.v2.SignRequest.aggregate_attestation_and_proof_electra:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra
|
||||
21, // 17: ethereum.validator.accounts.v2.SignRequest.block_fulu:type_name -> ethereum.eth.v1alpha1.BeaconBlockElectra
|
||||
24, // 18: ethereum.validator.accounts.v2.SignRequest.blinded_block_fulu:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockFulu
|
||||
25, // 19: ethereum.validator.accounts.v2.SignRequest.block_gloas:type_name -> ethereum.eth.v1alpha1.BeaconBlockGloas
|
||||
26, // 20: ethereum.validator.accounts.v2.SignRequest.execution_payload_envelope:type_name -> ethereum.eth.v1alpha1.ExecutionPayloadEnvelope
|
||||
0, // 21: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status
|
||||
4, // 22: ethereum.validator.accounts.v2.ProposerOptionPayload.builder:type_name -> ethereum.validator.accounts.v2.BuilderConfig
|
||||
6, // 23: ethereum.validator.accounts.v2.ProposerSettingsPayload.proposer_config:type_name -> ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry
|
||||
3, // 24: ethereum.validator.accounts.v2.ProposerSettingsPayload.default_config:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload
|
||||
3, // 25: ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry.value:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload
|
||||
26, // [26:26] is the sub-list for method output_type
|
||||
26, // [26:26] is the sub-list for method input_type
|
||||
26, // [26:26] is the sub-list for extension type_name
|
||||
26, // [26:26] is the sub-list for extension extendee
|
||||
0, // [0:26] is the sub-list for field type_name
|
||||
0, // 19: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status
|
||||
4, // 20: ethereum.validator.accounts.v2.ProposerOptionPayload.builder:type_name -> ethereum.validator.accounts.v2.BuilderConfig
|
||||
6, // 21: ethereum.validator.accounts.v2.ProposerSettingsPayload.proposer_config:type_name -> ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry
|
||||
3, // 22: ethereum.validator.accounts.v2.ProposerSettingsPayload.default_config:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload
|
||||
3, // 23: ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry.value:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload
|
||||
24, // [24:24] is the sub-list for method output_type
|
||||
24, // [24:24] is the sub-list for method input_type
|
||||
24, // [24:24] is the sub-list for extension type_name
|
||||
24, // [24:24] is the sub-list for extension extendee
|
||||
0, // [0:24] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_prysm_v1alpha1_validator_client_keymanager_proto_init() }
|
||||
@@ -1124,8 +1074,6 @@ func file_proto_prysm_v1alpha1_validator_client_keymanager_proto_init() {
|
||||
(*SignRequest_AggregateAttestationAndProofElectra)(nil),
|
||||
(*SignRequest_BlockFulu)(nil),
|
||||
(*SignRequest_BlindedBlockFulu)(nil),
|
||||
(*SignRequest_BlockGloas)(nil),
|
||||
(*SignRequest_ExecutionPayloadEnvelope)(nil),
|
||||
}
|
||||
file_proto_prysm_v1alpha1_validator_client_keymanager_proto_msgTypes[2].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
|
||||
@@ -6,7 +6,6 @@ import "proto/prysm/v1alpha1/attestation.proto";
|
||||
import "proto/prysm/v1alpha1/beacon_block.proto";
|
||||
import "proto/prysm/v1alpha1/beacon_core_types.proto";
|
||||
import "proto/prysm/v1alpha1/beacon_state.proto";
|
||||
import "proto/prysm/v1alpha1/gloas.proto";
|
||||
import "proto/prysm/v1alpha1/sync_committee.proto";
|
||||
|
||||
option csharp_namespace = "Ethereum.Validator.Accounts.V2";
|
||||
@@ -81,10 +80,6 @@ message SignRequest {
|
||||
// Fulu objects.
|
||||
ethereum.eth.v1alpha1.BeaconBlockElectra block_fulu = 121;
|
||||
ethereum.eth.v1alpha1.BlindedBeaconBlockFulu blinded_block_fulu = 122;
|
||||
|
||||
// Gloas objects.
|
||||
ethereum.eth.v1alpha1.BeaconBlockGloas block_gloas = 123;
|
||||
ethereum.eth.v1alpha1.ExecutionPayloadEnvelope execution_payload_envelope = 124;
|
||||
}
|
||||
|
||||
reserved 4, 5; // Reserving old, deleted fields.
|
||||
|
||||
2414
proto/prysm/v1alpha1/validator.pb.go
generated
2414
proto/prysm/v1alpha1/validator.pb.go
generated
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,6 @@ import "proto/prysm/v1alpha1/beacon_block.proto";
|
||||
import "proto/prysm/v1alpha1/beacon_core_types.proto";
|
||||
import "proto/prysm/v1alpha1/sync_committee.proto";
|
||||
import "proto/prysm/v1alpha1/attestation.proto";
|
||||
import "proto/prysm/v1alpha1/gloas.proto";
|
||||
|
||||
option csharp_namespace = "Ethereum.Eth.V1";
|
||||
option go_package = "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1;eth";
|
||||
@@ -440,39 +439,6 @@ service BeaconNodeValidator {
|
||||
get : "/eth/v1alpha1/validator/blocks/aggregated_sig_and_aggregation_bits"
|
||||
};
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// Gloas Fork Endpoints
|
||||
// ==========================================================================
|
||||
|
||||
// GetExecutionPayloadEnvelope retrieves a cached execution payload envelope
|
||||
// for the given slot and builder index. This is called by validators after
|
||||
// receiving a Gloas block to get the envelope they need to sign and broadcast.
|
||||
//
|
||||
// The envelope is cached by the beacon node during block production and
|
||||
// contains the full execution payload that corresponds to the bid in the block.
|
||||
rpc GetExecutionPayloadEnvelope(ExecutionPayloadEnvelopeRequest)
|
||||
returns (ExecutionPayloadEnvelopeResponse) {
|
||||
option deprecated = true;
|
||||
option (google.api.http) = {
|
||||
get : "/eth/v1alpha1/validator/execution_payload_envelope/{slot}/{builder_index}"
|
||||
};
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope broadcasts a signed execution payload envelope
|
||||
// to the P2P network. This is called by validators after signing the envelope
|
||||
// retrieved from GetExecutionPayloadEnvelope.
|
||||
//
|
||||
// The beacon node validates the envelope signature and broadcasts it to peers
|
||||
// via the execution_payload_envelope gossip topic.
|
||||
rpc PublishExecutionPayloadEnvelope(SignedExecutionPayloadEnvelope)
|
||||
returns (google.protobuf.Empty) {
|
||||
option deprecated = true;
|
||||
option (google.api.http) = {
|
||||
post : "/eth/v1alpha1/validator/execution_payload_envelope"
|
||||
body : "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// SyncMessageBlockRootResponse for beacon chain validator to retrieve and
|
||||
@@ -1168,34 +1134,3 @@ message AggregatedSigAndAggregationBitsResponse {
|
||||
bytes aggregated_sig = 1;
|
||||
bytes bits = 2;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Gloas Fork Messages
|
||||
// =============================================================================
|
||||
|
||||
// ExecutionPayloadEnvelopeRequest is the request for retrieving a cached
|
||||
// execution payload envelope from the beacon node.
|
||||
message ExecutionPayloadEnvelopeRequest {
|
||||
option deprecated = true;
|
||||
|
||||
// The slot for which to retrieve the execution payload envelope.
|
||||
uint64 slot = 1 [
|
||||
(ethereum.eth.ext.cast_type) =
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives.Slot"
|
||||
];
|
||||
|
||||
// The builder index that created the payload envelope.
|
||||
uint64 builder_index = 2 [
|
||||
(ethereum.eth.ext.cast_type) =
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives.BuilderIndex"
|
||||
];
|
||||
}
|
||||
|
||||
// ExecutionPayloadEnvelopeResponse is the response containing the cached
|
||||
// execution payload envelope.
|
||||
message ExecutionPayloadEnvelopeResponse {
|
||||
option deprecated = true;
|
||||
|
||||
// The execution payload envelope for the requested slot and builder.
|
||||
ExecutionPayloadEnvelope envelope = 1;
|
||||
}
|
||||
|
||||
424
testing/mock/beacon_validator_client_mock.go
generated
424
testing/mock/beacon_validator_client_mock.go
generated
@@ -24,7 +24,6 @@ import (
|
||||
type MockBeaconNodeValidatorClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidatorClientMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidatorClientMockRecorder is the mock recorder for MockBeaconNodeValidatorClient.
|
||||
@@ -45,10 +44,10 @@ func (m *MockBeaconNodeValidatorClient) EXPECT() *MockBeaconNodeValidatorClientM
|
||||
}
|
||||
|
||||
// AggregatedSigAndAggregationBits mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) AggregatedSigAndAggregationBits(ctx context.Context, in *eth.AggregatedSigAndAggregationBitsRequest, opts ...grpc.CallOption) (*eth.AggregatedSigAndAggregationBitsResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) AggregatedSigAndAggregationBits(arg0 context.Context, arg1 *eth.AggregatedSigAndAggregationBitsRequest, arg2 ...grpc.CallOption) (*eth.AggregatedSigAndAggregationBitsResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "AggregatedSigAndAggregationBits", varargs...)
|
||||
@@ -58,17 +57,17 @@ func (m *MockBeaconNodeValidatorClient) AggregatedSigAndAggregationBits(ctx cont
|
||||
}
|
||||
|
||||
// AggregatedSigAndAggregationBits indicates an expected call of AggregatedSigAndAggregationBits.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) AggregatedSigAndAggregationBits(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) AggregatedSigAndAggregationBits(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AggregatedSigAndAggregationBits", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).AggregatedSigAndAggregationBits), varargs...)
|
||||
}
|
||||
|
||||
// AssignValidatorToSubnet mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) AssignValidatorToSubnet(ctx context.Context, in *eth.AssignValidatorToSubnetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) AssignValidatorToSubnet(arg0 context.Context, arg1 *eth.AssignValidatorToSubnetRequest, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "AssignValidatorToSubnet", varargs...)
|
||||
@@ -78,17 +77,17 @@ func (m *MockBeaconNodeValidatorClient) AssignValidatorToSubnet(ctx context.Cont
|
||||
}
|
||||
|
||||
// AssignValidatorToSubnet indicates an expected call of AssignValidatorToSubnet.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) AssignValidatorToSubnet(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) AssignValidatorToSubnet(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignValidatorToSubnet", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).AssignValidatorToSubnet), varargs...)
|
||||
}
|
||||
|
||||
// CheckDoppelGanger mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) CheckDoppelGanger(ctx context.Context, in *eth.DoppelGangerRequest, opts ...grpc.CallOption) (*eth.DoppelGangerResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) CheckDoppelGanger(arg0 context.Context, arg1 *eth.DoppelGangerRequest, arg2 ...grpc.CallOption) (*eth.DoppelGangerResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "CheckDoppelGanger", varargs...)
|
||||
@@ -98,17 +97,17 @@ func (m *MockBeaconNodeValidatorClient) CheckDoppelGanger(ctx context.Context, i
|
||||
}
|
||||
|
||||
// CheckDoppelGanger indicates an expected call of CheckDoppelGanger.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) CheckDoppelGanger(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) CheckDoppelGanger(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckDoppelGanger", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).CheckDoppelGanger), varargs...)
|
||||
}
|
||||
|
||||
// DomainData mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) DomainData(ctx context.Context, in *eth.DomainRequest, opts ...grpc.CallOption) (*eth.DomainResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) DomainData(arg0 context.Context, arg1 *eth.DomainRequest, arg2 ...grpc.CallOption) (*eth.DomainResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "DomainData", varargs...)
|
||||
@@ -118,17 +117,17 @@ func (m *MockBeaconNodeValidatorClient) DomainData(ctx context.Context, in *eth.
|
||||
}
|
||||
|
||||
// DomainData indicates an expected call of DomainData.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) DomainData(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) DomainData(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DomainData", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).DomainData), varargs...)
|
||||
}
|
||||
|
||||
// GetAttestationData mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetAttestationData(ctx context.Context, in *eth.AttestationDataRequest, opts ...grpc.CallOption) (*eth.AttestationData, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetAttestationData(arg0 context.Context, arg1 *eth.AttestationDataRequest, arg2 ...grpc.CallOption) (*eth.AttestationData, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetAttestationData", varargs...)
|
||||
@@ -138,17 +137,17 @@ func (m *MockBeaconNodeValidatorClient) GetAttestationData(ctx context.Context,
|
||||
}
|
||||
|
||||
// GetAttestationData indicates an expected call of GetAttestationData.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetAttestationData(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetAttestationData(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttestationData", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetAttestationData), varargs...)
|
||||
}
|
||||
|
||||
// GetBeaconBlock mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetBeaconBlock(ctx context.Context, in *eth.BlockRequest, opts ...grpc.CallOption) (*eth.GenericBeaconBlock, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetBeaconBlock(arg0 context.Context, arg1 *eth.BlockRequest, arg2 ...grpc.CallOption) (*eth.GenericBeaconBlock, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetBeaconBlock", varargs...)
|
||||
@@ -158,17 +157,17 @@ func (m *MockBeaconNodeValidatorClient) GetBeaconBlock(ctx context.Context, in *
|
||||
}
|
||||
|
||||
// GetBeaconBlock indicates an expected call of GetBeaconBlock.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetBeaconBlock(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetBeaconBlock(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBeaconBlock", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetBeaconBlock), varargs...)
|
||||
}
|
||||
|
||||
// GetDuties mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetDuties(ctx context.Context, in *eth.DutiesRequest, opts ...grpc.CallOption) (*eth.DutiesResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetDuties(arg0 context.Context, arg1 *eth.DutiesRequest, arg2 ...grpc.CallOption) (*eth.DutiesResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetDuties", varargs...)
|
||||
@@ -178,17 +177,17 @@ func (m *MockBeaconNodeValidatorClient) GetDuties(ctx context.Context, in *eth.D
|
||||
}
|
||||
|
||||
// GetDuties indicates an expected call of GetDuties.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetDuties(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetDuties(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDuties", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetDuties), varargs...)
|
||||
}
|
||||
|
||||
// GetDutiesV2 mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetDutiesV2(ctx context.Context, in *eth.DutiesRequest, opts ...grpc.CallOption) (*eth.DutiesV2Response, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetDutiesV2(arg0 context.Context, arg1 *eth.DutiesRequest, arg2 ...grpc.CallOption) (*eth.DutiesV2Response, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetDutiesV2", varargs...)
|
||||
@@ -198,37 +197,17 @@ func (m *MockBeaconNodeValidatorClient) GetDutiesV2(ctx context.Context, in *eth
|
||||
}
|
||||
|
||||
// GetDutiesV2 indicates an expected call of GetDutiesV2.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetDutiesV2(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetDutiesV2(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetDutiesV2), varargs...)
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, in *eth.ExecutionPayloadEnvelopeRequest, opts ...grpc.CallOption) (*eth.ExecutionPayloadEnvelopeResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetExecutionPayloadEnvelope", varargs...)
|
||||
ret0, _ := ret[0].(*eth.ExecutionPayloadEnvelopeResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetExecutionPayloadEnvelope(ctx, in any, opts ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetExecutionPayloadEnvelope), varargs...)
|
||||
}
|
||||
|
||||
// GetFeeRecipientByPubKey mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetFeeRecipientByPubKey(ctx context.Context, in *eth.FeeRecipientByPubKeyRequest, opts ...grpc.CallOption) (*eth.FeeRecipientByPubKeyResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetFeeRecipientByPubKey(arg0 context.Context, arg1 *eth.FeeRecipientByPubKeyRequest, arg2 ...grpc.CallOption) (*eth.FeeRecipientByPubKeyResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetFeeRecipientByPubKey", varargs...)
|
||||
@@ -238,17 +217,17 @@ func (m *MockBeaconNodeValidatorClient) GetFeeRecipientByPubKey(ctx context.Cont
|
||||
}
|
||||
|
||||
// GetFeeRecipientByPubKey indicates an expected call of GetFeeRecipientByPubKey.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetFeeRecipientByPubKey(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetFeeRecipientByPubKey(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetFeeRecipientByPubKey), varargs...)
|
||||
}
|
||||
|
||||
// GetSyncCommitteeContribution mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeContribution(ctx context.Context, in *eth.SyncCommitteeContributionRequest, opts ...grpc.CallOption) (*eth.SyncCommitteeContribution, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeContribution(arg0 context.Context, arg1 *eth.SyncCommitteeContributionRequest, arg2 ...grpc.CallOption) (*eth.SyncCommitteeContribution, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetSyncCommitteeContribution", varargs...)
|
||||
@@ -258,17 +237,17 @@ func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeContribution(ctx context
|
||||
}
|
||||
|
||||
// GetSyncCommitteeContribution indicates an expected call of GetSyncCommitteeContribution.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncCommitteeContribution(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncCommitteeContribution(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncCommitteeContribution", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncCommitteeContribution), varargs...)
|
||||
}
|
||||
|
||||
// GetSyncMessageBlockRoot mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetSyncMessageBlockRoot(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*eth.SyncMessageBlockRootResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetSyncMessageBlockRoot(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc.CallOption) (*eth.SyncMessageBlockRootResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetSyncMessageBlockRoot", varargs...)
|
||||
@@ -278,17 +257,17 @@ func (m *MockBeaconNodeValidatorClient) GetSyncMessageBlockRoot(ctx context.Cont
|
||||
}
|
||||
|
||||
// GetSyncMessageBlockRoot indicates an expected call of GetSyncMessageBlockRoot.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncMessageBlockRoot(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncMessageBlockRoot(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncMessageBlockRoot", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncMessageBlockRoot), varargs...)
|
||||
}
|
||||
|
||||
// GetSyncSubcommitteeIndex mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) GetSyncSubcommitteeIndex(ctx context.Context, in *eth.SyncSubcommitteeIndexRequest, opts ...grpc.CallOption) (*eth.SyncSubcommitteeIndexResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) GetSyncSubcommitteeIndex(arg0 context.Context, arg1 *eth.SyncSubcommitteeIndexRequest, arg2 ...grpc.CallOption) (*eth.SyncSubcommitteeIndexResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetSyncSubcommitteeIndex", varargs...)
|
||||
@@ -298,17 +277,17 @@ func (m *MockBeaconNodeValidatorClient) GetSyncSubcommitteeIndex(ctx context.Con
|
||||
}
|
||||
|
||||
// GetSyncSubcommitteeIndex indicates an expected call of GetSyncSubcommitteeIndex.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncSubcommitteeIndex(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) GetSyncSubcommitteeIndex(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSyncSubcommitteeIndex", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetSyncSubcommitteeIndex), varargs...)
|
||||
}
|
||||
|
||||
// MultipleValidatorStatus mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) MultipleValidatorStatus(ctx context.Context, in *eth.MultipleValidatorStatusRequest, opts ...grpc.CallOption) (*eth.MultipleValidatorStatusResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) MultipleValidatorStatus(arg0 context.Context, arg1 *eth.MultipleValidatorStatusRequest, arg2 ...grpc.CallOption) (*eth.MultipleValidatorStatusResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "MultipleValidatorStatus", varargs...)
|
||||
@@ -318,17 +297,17 @@ func (m *MockBeaconNodeValidatorClient) MultipleValidatorStatus(ctx context.Cont
|
||||
}
|
||||
|
||||
// MultipleValidatorStatus indicates an expected call of MultipleValidatorStatus.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) MultipleValidatorStatus(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) MultipleValidatorStatus(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MultipleValidatorStatus", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).MultipleValidatorStatus), varargs...)
|
||||
}
|
||||
|
||||
// PrepareBeaconProposer mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) PrepareBeaconProposer(ctx context.Context, in *eth.PrepareBeaconProposerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) PrepareBeaconProposer(arg0 context.Context, arg1 *eth.PrepareBeaconProposerRequest, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "PrepareBeaconProposer", varargs...)
|
||||
@@ -338,17 +317,17 @@ func (m *MockBeaconNodeValidatorClient) PrepareBeaconProposer(ctx context.Contex
|
||||
}
|
||||
|
||||
// PrepareBeaconProposer indicates an expected call of PrepareBeaconProposer.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) PrepareBeaconProposer(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) PrepareBeaconProposer(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareBeaconProposer", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).PrepareBeaconProposer), varargs...)
|
||||
}
|
||||
|
||||
// ProposeAttestation mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeAttestation(ctx context.Context, in *eth.Attestation, opts ...grpc.CallOption) (*eth.AttestResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeAttestation(arg0 context.Context, arg1 *eth.Attestation, arg2 ...grpc.CallOption) (*eth.AttestResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ProposeAttestation", varargs...)
|
||||
@@ -358,17 +337,17 @@ func (m *MockBeaconNodeValidatorClient) ProposeAttestation(ctx context.Context,
|
||||
}
|
||||
|
||||
// ProposeAttestation indicates an expected call of ProposeAttestation.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeAttestation(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeAttestation(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeAttestation", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ProposeAttestation), varargs...)
|
||||
}
|
||||
|
||||
// ProposeAttestationElectra mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeAttestationElectra(ctx context.Context, in *eth.SingleAttestation, opts ...grpc.CallOption) (*eth.AttestResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeAttestationElectra(arg0 context.Context, arg1 *eth.SingleAttestation, arg2 ...grpc.CallOption) (*eth.AttestResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ProposeAttestationElectra", varargs...)
|
||||
@@ -378,17 +357,17 @@ func (m *MockBeaconNodeValidatorClient) ProposeAttestationElectra(ctx context.Co
|
||||
}
|
||||
|
||||
// ProposeAttestationElectra indicates an expected call of ProposeAttestationElectra.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeAttestationElectra(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeAttestationElectra(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeAttestationElectra", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ProposeAttestationElectra), varargs...)
|
||||
}
|
||||
|
||||
// ProposeBeaconBlock mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeBeaconBlock(ctx context.Context, in *eth.GenericSignedBeaconBlock, opts ...grpc.CallOption) (*eth.ProposeResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeBeaconBlock(arg0 context.Context, arg1 *eth.GenericSignedBeaconBlock, arg2 ...grpc.CallOption) (*eth.ProposeResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ProposeBeaconBlock", varargs...)
|
||||
@@ -398,17 +377,17 @@ func (m *MockBeaconNodeValidatorClient) ProposeBeaconBlock(ctx context.Context,
|
||||
}
|
||||
|
||||
// ProposeBeaconBlock indicates an expected call of ProposeBeaconBlock.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeBeaconBlock(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeBeaconBlock(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeBeaconBlock", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ProposeBeaconBlock), varargs...)
|
||||
}
|
||||
|
||||
// ProposeExit mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeExit(ctx context.Context, in *eth.SignedVoluntaryExit, opts ...grpc.CallOption) (*eth.ProposeExitResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) ProposeExit(arg0 context.Context, arg1 *eth.SignedVoluntaryExit, arg2 ...grpc.CallOption) (*eth.ProposeExitResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ProposeExit", varargs...)
|
||||
@@ -418,37 +397,17 @@ func (m *MockBeaconNodeValidatorClient) ProposeExit(ctx context.Context, in *eth
|
||||
}
|
||||
|
||||
// ProposeExit indicates an expected call of ProposeExit.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeExit(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ProposeExit(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeExit", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ProposeExit), varargs...)
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) PublishExecutionPayloadEnvelope(ctx context.Context, in *eth.SignedExecutionPayloadEnvelope, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "PublishExecutionPayloadEnvelope", varargs...)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope indicates an expected call of PublishExecutionPayloadEnvelope.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) PublishExecutionPayloadEnvelope(ctx, in any, opts ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).PublishExecutionPayloadEnvelope), varargs...)
|
||||
}
|
||||
|
||||
// StreamBlocksAltair mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) StreamBlocksAltair(ctx context.Context, in *eth.StreamBlocksRequest, opts ...grpc.CallOption) (eth.BeaconNodeValidator_StreamBlocksAltairClient, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) StreamBlocksAltair(arg0 context.Context, arg1 *eth.StreamBlocksRequest, arg2 ...grpc.CallOption) (eth.BeaconNodeValidator_StreamBlocksAltairClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "StreamBlocksAltair", varargs...)
|
||||
@@ -458,17 +417,17 @@ func (m *MockBeaconNodeValidatorClient) StreamBlocksAltair(ctx context.Context,
|
||||
}
|
||||
|
||||
// StreamBlocksAltair indicates an expected call of StreamBlocksAltair.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) StreamBlocksAltair(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) StreamBlocksAltair(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamBlocksAltair", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).StreamBlocksAltair), varargs...)
|
||||
}
|
||||
|
||||
// StreamSlots mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) StreamSlots(ctx context.Context, in *eth.StreamSlotsRequest, opts ...grpc.CallOption) (eth.BeaconNodeValidator_StreamSlotsClient, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) StreamSlots(arg0 context.Context, arg1 *eth.StreamSlotsRequest, arg2 ...grpc.CallOption) (eth.BeaconNodeValidator_StreamSlotsClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "StreamSlots", varargs...)
|
||||
@@ -478,17 +437,17 @@ func (m *MockBeaconNodeValidatorClient) StreamSlots(ctx context.Context, in *eth
|
||||
}
|
||||
|
||||
// StreamSlots indicates an expected call of StreamSlots.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) StreamSlots(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) StreamSlots(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamSlots", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).StreamSlots), varargs...)
|
||||
}
|
||||
|
||||
// SubmitAggregateSelectionProof mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitAggregateSelectionProof(ctx context.Context, in *eth.AggregateSelectionRequest, opts ...grpc.CallOption) (*eth.AggregateSelectionResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitAggregateSelectionProof(arg0 context.Context, arg1 *eth.AggregateSelectionRequest, arg2 ...grpc.CallOption) (*eth.AggregateSelectionResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitAggregateSelectionProof", varargs...)
|
||||
@@ -498,17 +457,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitAggregateSelectionProof(ctx contex
|
||||
}
|
||||
|
||||
// SubmitAggregateSelectionProof indicates an expected call of SubmitAggregateSelectionProof.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitAggregateSelectionProof(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitAggregateSelectionProof(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitAggregateSelectionProof), varargs...)
|
||||
}
|
||||
|
||||
// SubmitAggregateSelectionProofElectra mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitAggregateSelectionProofElectra(ctx context.Context, in *eth.AggregateSelectionRequest, opts ...grpc.CallOption) (*eth.AggregateSelectionElectraResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitAggregateSelectionProofElectra(arg0 context.Context, arg1 *eth.AggregateSelectionRequest, arg2 ...grpc.CallOption) (*eth.AggregateSelectionElectraResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitAggregateSelectionProofElectra", varargs...)
|
||||
@@ -518,17 +477,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitAggregateSelectionProofElectra(ctx
|
||||
}
|
||||
|
||||
// SubmitAggregateSelectionProofElectra indicates an expected call of SubmitAggregateSelectionProofElectra.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitAggregateSelectionProofElectra(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitAggregateSelectionProofElectra(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitAggregateSelectionProofElectra), varargs...)
|
||||
}
|
||||
|
||||
// SubmitSignedAggregateSelectionProof mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProof(ctx context.Context, in *eth.SignedAggregateSubmitRequest, opts ...grpc.CallOption) (*eth.SignedAggregateSubmitResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProof(arg0 context.Context, arg1 *eth.SignedAggregateSubmitRequest, arg2 ...grpc.CallOption) (*eth.SignedAggregateSubmitResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitSignedAggregateSelectionProof", varargs...)
|
||||
@@ -538,17 +497,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProof(ctx
|
||||
}
|
||||
|
||||
// SubmitSignedAggregateSelectionProof indicates an expected call of SubmitSignedAggregateSelectionProof.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedAggregateSelectionProof(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedAggregateSelectionProof(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedAggregateSelectionProof), varargs...)
|
||||
}
|
||||
|
||||
// SubmitSignedAggregateSelectionProofElectra mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProofElectra(ctx context.Context, in *eth.SignedAggregateSubmitElectraRequest, opts ...grpc.CallOption) (*eth.SignedAggregateSubmitResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProofElectra(arg0 context.Context, arg1 *eth.SignedAggregateSubmitElectraRequest, arg2 ...grpc.CallOption) (*eth.SignedAggregateSubmitResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitSignedAggregateSelectionProofElectra", varargs...)
|
||||
@@ -558,17 +517,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProofElect
|
||||
}
|
||||
|
||||
// SubmitSignedAggregateSelectionProofElectra indicates an expected call of SubmitSignedAggregateSelectionProofElectra.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedAggregateSelectionProofElectra(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedAggregateSelectionProofElectra(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedAggregateSelectionProofElectra", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedAggregateSelectionProofElectra), varargs...)
|
||||
}
|
||||
|
||||
// SubmitSignedContributionAndProof mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSignedContributionAndProof(ctx context.Context, in *eth.SignedContributionAndProof, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSignedContributionAndProof(arg0 context.Context, arg1 *eth.SignedContributionAndProof, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitSignedContributionAndProof", varargs...)
|
||||
@@ -578,17 +537,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitSignedContributionAndProof(ctx con
|
||||
}
|
||||
|
||||
// SubmitSignedContributionAndProof indicates an expected call of SubmitSignedContributionAndProof.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedContributionAndProof(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedContributionAndProof(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedContributionAndProof), varargs...)
|
||||
}
|
||||
|
||||
// SubmitSyncMessage mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(ctx context.Context, in *eth.SyncCommitteeMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitSyncMessage", varargs...)
|
||||
@@ -598,17 +557,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(ctx context.Context, i
|
||||
}
|
||||
|
||||
// SubmitSyncMessage indicates an expected call of SubmitSyncMessage.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSyncMessage(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSyncMessage(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSyncMessage", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSyncMessage), varargs...)
|
||||
}
|
||||
|
||||
// SubmitValidatorRegistrations mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitValidatorRegistrations(ctx context.Context, in *eth.SignedValidatorRegistrationsV1, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubmitValidatorRegistrations(arg0 context.Context, arg1 *eth.SignedValidatorRegistrationsV1, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubmitValidatorRegistrations", varargs...)
|
||||
@@ -618,17 +577,17 @@ func (m *MockBeaconNodeValidatorClient) SubmitValidatorRegistrations(ctx context
|
||||
}
|
||||
|
||||
// SubmitValidatorRegistrations indicates an expected call of SubmitValidatorRegistrations.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitValidatorRegistrations(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitValidatorRegistrations(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitValidatorRegistrations", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitValidatorRegistrations), varargs...)
|
||||
}
|
||||
|
||||
// SubscribeCommitteeSubnets mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) SubscribeCommitteeSubnets(ctx context.Context, in *eth.CommitteeSubnetsSubscribeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) SubscribeCommitteeSubnets(arg0 context.Context, arg1 *eth.CommitteeSubnetsSubscribeRequest, arg2 ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SubscribeCommitteeSubnets", varargs...)
|
||||
@@ -638,17 +597,17 @@ func (m *MockBeaconNodeValidatorClient) SubscribeCommitteeSubnets(ctx context.Co
|
||||
}
|
||||
|
||||
// SubscribeCommitteeSubnets indicates an expected call of SubscribeCommitteeSubnets.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubscribeCommitteeSubnets(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) SubscribeCommitteeSubnets(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeCommitteeSubnets", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubscribeCommitteeSubnets), varargs...)
|
||||
}
|
||||
|
||||
// ValidatorIndex mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) ValidatorIndex(ctx context.Context, in *eth.ValidatorIndexRequest, opts ...grpc.CallOption) (*eth.ValidatorIndexResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) ValidatorIndex(arg0 context.Context, arg1 *eth.ValidatorIndexRequest, arg2 ...grpc.CallOption) (*eth.ValidatorIndexResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ValidatorIndex", varargs...)
|
||||
@@ -658,17 +617,17 @@ func (m *MockBeaconNodeValidatorClient) ValidatorIndex(ctx context.Context, in *
|
||||
}
|
||||
|
||||
// ValidatorIndex indicates an expected call of ValidatorIndex.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ValidatorIndex(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ValidatorIndex(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorIndex", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ValidatorIndex), varargs...)
|
||||
}
|
||||
|
||||
// ValidatorStatus mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) ValidatorStatus(ctx context.Context, in *eth.ValidatorStatusRequest, opts ...grpc.CallOption) (*eth.ValidatorStatusResponse, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) ValidatorStatus(arg0 context.Context, arg1 *eth.ValidatorStatusRequest, arg2 ...grpc.CallOption) (*eth.ValidatorStatusResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "ValidatorStatus", varargs...)
|
||||
@@ -678,17 +637,17 @@ func (m *MockBeaconNodeValidatorClient) ValidatorStatus(ctx context.Context, in
|
||||
}
|
||||
|
||||
// ValidatorStatus indicates an expected call of ValidatorStatus.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ValidatorStatus(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) ValidatorStatus(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorStatus", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).ValidatorStatus), varargs...)
|
||||
}
|
||||
|
||||
// WaitForActivation mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) WaitForActivation(ctx context.Context, in *eth.ValidatorActivationRequest, opts ...grpc.CallOption) (eth.BeaconNodeValidator_WaitForActivationClient, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) WaitForActivation(arg0 context.Context, arg1 *eth.ValidatorActivationRequest, arg2 ...grpc.CallOption) (eth.BeaconNodeValidator_WaitForActivationClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "WaitForActivation", varargs...)
|
||||
@@ -698,17 +657,17 @@ func (m *MockBeaconNodeValidatorClient) WaitForActivation(ctx context.Context, i
|
||||
}
|
||||
|
||||
// WaitForActivation indicates an expected call of WaitForActivation.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) WaitForActivation(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) WaitForActivation(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForActivation", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).WaitForActivation), varargs...)
|
||||
}
|
||||
|
||||
// WaitForChainStart mocks base method.
|
||||
func (m *MockBeaconNodeValidatorClient) WaitForChainStart(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (eth.BeaconNodeValidator_WaitForChainStartClient, error) {
|
||||
func (m *MockBeaconNodeValidatorClient) WaitForChainStart(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc.CallOption) (eth.BeaconNodeValidator_WaitForChainStartClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
varargs := []any{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "WaitForChainStart", varargs...)
|
||||
@@ -718,9 +677,9 @@ func (m *MockBeaconNodeValidatorClient) WaitForChainStart(ctx context.Context, i
|
||||
}
|
||||
|
||||
// WaitForChainStart indicates an expected call of WaitForChainStart.
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) WaitForChainStart(ctx, in any, opts ...any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidatorClientMockRecorder) WaitForChainStart(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]any{ctx, in}, opts...)
|
||||
varargs := append([]any{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForChainStart", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).WaitForChainStart), varargs...)
|
||||
}
|
||||
|
||||
@@ -728,7 +687,6 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) WaitForChainStart(ctx, in a
|
||||
type MockBeaconNodeValidator_WaitForChainStartClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidator_WaitForChainStartClientMockRecorder is the mock recorder for MockBeaconNodeValidator_WaitForChainStartClient.
|
||||
@@ -807,31 +765,31 @@ func (mr *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder) Recv() *g
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForChainStartClient) RecvMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForChainStartClient) RecvMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RecvMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder) RecvMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder) RecvMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartClient)(nil).RecvMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartClient)(nil).RecvMsg), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForChainStartClient) SendMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForChainStartClient) SendMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder) SendMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder) SendMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartClient)(nil).SendMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartClient)(nil).SendMsg), arg0)
|
||||
}
|
||||
|
||||
// Trailer mocks base method.
|
||||
@@ -852,7 +810,6 @@ func (mr *MockBeaconNodeValidator_WaitForChainStartClientMockRecorder) Trailer()
|
||||
type MockBeaconNodeValidator_WaitForActivationClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidator_WaitForActivationClientMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidator_WaitForActivationClientMockRecorder is the mock recorder for MockBeaconNodeValidator_WaitForActivationClient.
|
||||
@@ -931,31 +888,31 @@ func (mr *MockBeaconNodeValidator_WaitForActivationClientMockRecorder) Recv() *g
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForActivationClient) RecvMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForActivationClient) RecvMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RecvMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationClientMockRecorder) RecvMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationClientMockRecorder) RecvMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationClient)(nil).RecvMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationClient)(nil).RecvMsg), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForActivationClient) SendMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForActivationClient) SendMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationClientMockRecorder) SendMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationClientMockRecorder) SendMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationClient)(nil).SendMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationClient)(nil).SendMsg), arg0)
|
||||
}
|
||||
|
||||
// Trailer mocks base method.
|
||||
@@ -976,7 +933,6 @@ func (mr *MockBeaconNodeValidator_WaitForActivationClientMockRecorder) Trailer()
|
||||
type MockBeaconNodeValidator_StreamSlotsClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidator_StreamSlotsClientMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidator_StreamSlotsClientMockRecorder is the mock recorder for MockBeaconNodeValidator_StreamSlotsClient.
|
||||
@@ -1055,31 +1011,31 @@ func (mr *MockBeaconNodeValidator_StreamSlotsClientMockRecorder) Recv() *gomock.
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_StreamSlotsClient) RecvMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
func (m *MockBeaconNodeValidator_StreamSlotsClient) RecvMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RecvMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsClientMockRecorder) RecvMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsClientMockRecorder) RecvMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsClient)(nil).RecvMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsClient)(nil).RecvMsg), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_StreamSlotsClient) SendMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
func (m *MockBeaconNodeValidator_StreamSlotsClient) SendMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsClientMockRecorder) SendMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsClientMockRecorder) SendMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsClient)(nil).SendMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsClient)(nil).SendMsg), arg0)
|
||||
}
|
||||
|
||||
// Trailer mocks base method.
|
||||
|
||||
94
testing/mock/beacon_validator_server_mock.go
generated
94
testing/mock/beacon_validator_server_mock.go
generated
@@ -23,7 +23,6 @@ import (
|
||||
type MockBeaconNodeValidatorServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidatorServerMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidatorServerMockRecorder is the mock recorder for MockBeaconNodeValidatorServer.
|
||||
@@ -163,21 +162,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetDutiesV2(arg0, arg1 any)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDutiesV2", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetDutiesV2), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope mocks base method.
|
||||
func (m *MockBeaconNodeValidatorServer) GetExecutionPayloadEnvelope(arg0 context.Context, arg1 *eth.ExecutionPayloadEnvelopeRequest) (*eth.ExecutionPayloadEnvelopeResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetExecutionPayloadEnvelope", arg0, arg1)
|
||||
ret0, _ := ret[0].(*eth.ExecutionPayloadEnvelopeResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope.
|
||||
func (mr *MockBeaconNodeValidatorServerMockRecorder) GetExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetExecutionPayloadEnvelope), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetFeeRecipientByPubKey mocks base method.
|
||||
func (m *MockBeaconNodeValidatorServer) GetFeeRecipientByPubKey(arg0 context.Context, arg1 *eth.FeeRecipientByPubKeyRequest) (*eth.FeeRecipientByPubKeyResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -328,21 +312,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) ProposeExit(arg0, arg1 any)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeExit", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).ProposeExit), arg0, arg1)
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope mocks base method.
|
||||
func (m *MockBeaconNodeValidatorServer) PublishExecutionPayloadEnvelope(arg0 context.Context, arg1 *eth.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "PublishExecutionPayloadEnvelope", arg0, arg1)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope indicates an expected call of PublishExecutionPayloadEnvelope.
|
||||
func (mr *MockBeaconNodeValidatorServerMockRecorder) PublishExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).PublishExecutionPayloadEnvelope), arg0, arg1)
|
||||
}
|
||||
|
||||
// StreamBlocksAltair mocks base method.
|
||||
func (m *MockBeaconNodeValidatorServer) StreamBlocksAltair(arg0 *eth.StreamBlocksRequest, arg1 eth.BeaconNodeValidator_StreamBlocksAltairServer) error {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -553,7 +522,6 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) WaitForChainStart(arg0, arg
|
||||
type MockBeaconNodeValidator_WaitForActivationServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidator_WaitForActivationServerMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidator_WaitForActivationServerMockRecorder is the mock recorder for MockBeaconNodeValidator_WaitForActivationServer.
|
||||
@@ -588,17 +556,17 @@ func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) Context()
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForActivationServer) RecvMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForActivationServer) RecvMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RecvMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) RecvMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) RecvMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationServer)(nil).RecvMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationServer)(nil).RecvMsg), arg0)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
@@ -630,17 +598,17 @@ func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) SendHeade
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForActivationServer) SendMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForActivationServer) SendMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) SendMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) SendMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationServer)(nil).SendMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForActivationServer)(nil).SendMsg), arg0)
|
||||
}
|
||||
|
||||
// SetHeader mocks base method.
|
||||
@@ -673,7 +641,6 @@ func (mr *MockBeaconNodeValidator_WaitForActivationServerMockRecorder) SetTraile
|
||||
type MockBeaconNodeValidator_WaitForChainStartServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidator_WaitForChainStartServerMockRecorder is the mock recorder for MockBeaconNodeValidator_WaitForChainStartServer.
|
||||
@@ -708,17 +675,17 @@ func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) Context()
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForChainStartServer) RecvMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForChainStartServer) RecvMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RecvMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) RecvMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) RecvMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartServer)(nil).RecvMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartServer)(nil).RecvMsg), arg0)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
@@ -750,17 +717,17 @@ func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) SendHeade
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_WaitForChainStartServer) SendMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
func (m *MockBeaconNodeValidator_WaitForChainStartServer) SendMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) SendMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) SendMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartServer)(nil).SendMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_WaitForChainStartServer)(nil).SendMsg), arg0)
|
||||
}
|
||||
|
||||
// SetHeader mocks base method.
|
||||
@@ -793,7 +760,6 @@ func (mr *MockBeaconNodeValidator_WaitForChainStartServerMockRecorder) SetTraile
|
||||
type MockBeaconNodeValidator_StreamSlotsServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockBeaconNodeValidator_StreamSlotsServerMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockBeaconNodeValidator_StreamSlotsServerMockRecorder is the mock recorder for MockBeaconNodeValidator_StreamSlotsServer.
|
||||
@@ -828,17 +794,17 @@ func (mr *MockBeaconNodeValidator_StreamSlotsServerMockRecorder) Context() *gomo
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_StreamSlotsServer) RecvMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
func (m *MockBeaconNodeValidator_StreamSlotsServer) RecvMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "RecvMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsServerMockRecorder) RecvMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsServerMockRecorder) RecvMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsServer)(nil).RecvMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsServer)(nil).RecvMsg), arg0)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
@@ -870,17 +836,17 @@ func (mr *MockBeaconNodeValidator_StreamSlotsServerMockRecorder) SendHeader(arg0
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockBeaconNodeValidator_StreamSlotsServer) SendMsg(m any) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
func (m *MockBeaconNodeValidator_StreamSlotsServer) SendMsg(arg0 any) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendMsg", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsServerMockRecorder) SendMsg(m any) *gomock.Call {
|
||||
func (mr *MockBeaconNodeValidator_StreamSlotsServerMockRecorder) SendMsg(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsServer)(nil).SendMsg), m)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockBeaconNodeValidator_StreamSlotsServer)(nil).SendMsg), arg0)
|
||||
}
|
||||
|
||||
// SetHeader mocks base method.
|
||||
|
||||
@@ -206,6 +206,7 @@ go_test(
|
||||
"gloas__operations__execution_payload_test.go",
|
||||
"gloas__operations__payload_attestation_test.go",
|
||||
"gloas__operations__proposer_slashing_test.go",
|
||||
"gloas__operations__withdrawals_test.go",
|
||||
"gloas__sanity__slots_test.go",
|
||||
"gloas__ssz_static__ssz_static_test.go",
|
||||
"phase0__epoch_processing__effective_balance_updates_test.go",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package mainnet
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/testing/spectest/shared/gloas/operations"
|
||||
)
|
||||
|
||||
func TestMainnet_Gloas_Operations_Withdrawals(t *testing.T) {
|
||||
operations.RunWithdrawalsTest(t, "mainnet")
|
||||
}
|
||||
@@ -212,6 +212,7 @@ go_test(
|
||||
"gloas__operations__execution_payload_test.go",
|
||||
"gloas__operations__payload_attestation_test.go",
|
||||
"gloas__operations__proposer_slashing_test.go",
|
||||
"gloas__operations__withdrawals_test.go",
|
||||
"gloas__sanity__slots_test.go",
|
||||
"gloas__ssz_static__ssz_static_test.go",
|
||||
"phase0__epoch_processing__effective_balance_updates_test.go",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package minimal
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/testing/spectest/shared/gloas/operations"
|
||||
)
|
||||
|
||||
func TestMinimal_Gloas_Operations_Withdrawals(t *testing.T) {
|
||||
operations.RunWithdrawalsTest(t, "minimal")
|
||||
}
|
||||
@@ -10,6 +10,7 @@ go_library(
|
||||
"helpers.go",
|
||||
"payload_attestation.go",
|
||||
"proposer_slashing.go",
|
||||
"withdrawals.go",
|
||||
],
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/testing/spectest/shared/gloas/operations",
|
||||
visibility = ["//visibility:public"],
|
||||
|
||||
48
testing/spectest/shared/gloas/operations/withdrawals.go
Normal file
48
testing/spectest/shared/gloas/operations/withdrawals.go
Normal file
@@ -0,0 +1,48 @@
|
||||
package operations
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/gloas"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/blocks"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
common "github.com/OffchainLabs/prysm/v7/testing/spectest/shared/common/operations"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/spectest/utils"
|
||||
)
|
||||
|
||||
func emptyBlockGloas() (interfaces.SignedBeaconBlock, error) {
|
||||
b := ðpb.SignedBeaconBlockGloas{
|
||||
Block: ðpb.BeaconBlockGloas{
|
||||
Body: ðpb.BeaconBlockBodyGloas{},
|
||||
},
|
||||
}
|
||||
return blocks.NewSignedBeaconBlock(b)
|
||||
}
|
||||
|
||||
func RunWithdrawalsTest(t *testing.T, config string) {
|
||||
require.NoError(t, utils.SetConfig(t, config))
|
||||
testFolders, testsFolderPath := utils.TestFolders(t, config, version.String(version.Gloas), "operations/withdrawals/pyspec_tests")
|
||||
if len(testFolders) == 0 {
|
||||
t.Fatalf("No test folders found for %s/%s/%s", config, version.String(version.Gloas), "operations/withdrawals/pyspec_tests")
|
||||
}
|
||||
for _, folder := range testFolders {
|
||||
t.Run(folder.Name(), func(t *testing.T) {
|
||||
folderPath := path.Join(testsFolderPath, folder.Name())
|
||||
blk, err := emptyBlockGloas()
|
||||
require.NoError(t, err)
|
||||
|
||||
common.RunBlockOperationTest(t, folderPath, blk, sszToState, func(_ context.Context, s state.BeaconState, _ interfaces.ReadOnlySignedBeaconBlock) (state.BeaconState, error) {
|
||||
if err := gloas.ProcessWithdrawals(s); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s, nil
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ go_library(
|
||||
"//proto/prysm/v1alpha1:go_default_library",
|
||||
"//validator/client/iface:go_default_library",
|
||||
"//validator/keymanager:go_default_library",
|
||||
"@com_github_golang_protobuf//ptypes/empty",
|
||||
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
|
||||
"@org_uber_go_mock//gomock:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
6
testing/validator-mock/chain_client_mock.go
generated
6
testing/validator-mock/chain_client_mock.go
generated
@@ -14,8 +14,8 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
eth "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// MockChainClient is a mock of ChainClient interface.
|
||||
@@ -43,7 +43,7 @@ func (m *MockChainClient) EXPECT() *MockChainClientMockRecorder {
|
||||
}
|
||||
|
||||
// ChainHead mocks base method.
|
||||
func (m *MockChainClient) ChainHead(ctx context.Context, in *empty.Empty) (*eth.ChainHead, error) {
|
||||
func (m *MockChainClient) ChainHead(ctx context.Context, in *emptypb.Empty) (*eth.ChainHead, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ChainHead", ctx, in)
|
||||
ret0, _ := ret[0].(*eth.ChainHead)
|
||||
@@ -103,7 +103,7 @@ func (mr *MockChainClientMockRecorder) ValidatorPerformance(arg0, arg1 any) *gom
|
||||
}
|
||||
|
||||
// ValidatorQueue mocks base method.
|
||||
func (m *MockChainClient) ValidatorQueue(ctx context.Context, in *empty.Empty) (*eth.ValidatorQueue, error) {
|
||||
func (m *MockChainClient) ValidatorQueue(ctx context.Context, in *emptypb.Empty) (*eth.ValidatorQueue, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ValidatorQueue", ctx, in)
|
||||
ret0, _ := ret[0].(*eth.ValidatorQueue)
|
||||
|
||||
43
testing/validator-mock/node_client_mock.go
generated
43
testing/validator-mock/node_client_mock.go
generated
@@ -14,15 +14,14 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
eth "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// MockNodeClient is a mock of NodeClient interface.
|
||||
type MockNodeClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockNodeClientMockRecorder
|
||||
isgomock struct{}
|
||||
}
|
||||
|
||||
// MockNodeClientMockRecorder is the mock recorder for MockNodeClient.
|
||||
@@ -43,75 +42,75 @@ func (m *MockNodeClient) EXPECT() *MockNodeClientMockRecorder {
|
||||
}
|
||||
|
||||
// Genesis mocks base method.
|
||||
func (m *MockNodeClient) Genesis(ctx context.Context, in *empty.Empty) (*eth.Genesis, error) {
|
||||
func (m *MockNodeClient) Genesis(arg0 context.Context, arg1 *emptypb.Empty) (*eth.Genesis, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Genesis", ctx, in)
|
||||
ret := m.ctrl.Call(m, "Genesis", arg0, arg1)
|
||||
ret0, _ := ret[0].(*eth.Genesis)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Genesis indicates an expected call of Genesis.
|
||||
func (mr *MockNodeClientMockRecorder) Genesis(ctx, in any) *gomock.Call {
|
||||
func (mr *MockNodeClientMockRecorder) Genesis(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Genesis", reflect.TypeOf((*MockNodeClient)(nil).Genesis), ctx, in)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Genesis", reflect.TypeOf((*MockNodeClient)(nil).Genesis), arg0, arg1)
|
||||
}
|
||||
|
||||
// IsReady mocks base method.
|
||||
func (m *MockNodeClient) IsReady(ctx context.Context) bool {
|
||||
func (m *MockNodeClient) IsReady(arg0 context.Context) bool {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "IsReady", ctx)
|
||||
ret := m.ctrl.Call(m, "IsReady", arg0)
|
||||
ret0, _ := ret[0].(bool)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// IsReady indicates an expected call of IsReady.
|
||||
func (mr *MockNodeClientMockRecorder) IsReady(ctx any) *gomock.Call {
|
||||
func (mr *MockNodeClientMockRecorder) IsReady(arg0 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsReady", reflect.TypeOf((*MockNodeClient)(nil).IsReady), ctx)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsReady", reflect.TypeOf((*MockNodeClient)(nil).IsReady), arg0)
|
||||
}
|
||||
|
||||
// Peers mocks base method.
|
||||
func (m *MockNodeClient) Peers(ctx context.Context, in *empty.Empty) (*eth.Peers, error) {
|
||||
func (m *MockNodeClient) Peers(arg0 context.Context, arg1 *emptypb.Empty) (*eth.Peers, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Peers", ctx, in)
|
||||
ret := m.ctrl.Call(m, "Peers", arg0, arg1)
|
||||
ret0, _ := ret[0].(*eth.Peers)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Peers indicates an expected call of Peers.
|
||||
func (mr *MockNodeClientMockRecorder) Peers(ctx, in any) *gomock.Call {
|
||||
func (mr *MockNodeClientMockRecorder) Peers(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockNodeClient)(nil).Peers), ctx, in)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockNodeClient)(nil).Peers), arg0, arg1)
|
||||
}
|
||||
|
||||
// SyncStatus mocks base method.
|
||||
func (m *MockNodeClient) SyncStatus(ctx context.Context, in *empty.Empty) (*eth.SyncStatus, error) {
|
||||
func (m *MockNodeClient) SyncStatus(arg0 context.Context, arg1 *emptypb.Empty) (*eth.SyncStatus, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncStatus", ctx, in)
|
||||
ret := m.ctrl.Call(m, "SyncStatus", arg0, arg1)
|
||||
ret0, _ := ret[0].(*eth.SyncStatus)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// SyncStatus indicates an expected call of SyncStatus.
|
||||
func (mr *MockNodeClientMockRecorder) SyncStatus(ctx, in any) *gomock.Call {
|
||||
func (mr *MockNodeClientMockRecorder) SyncStatus(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncStatus", reflect.TypeOf((*MockNodeClient)(nil).SyncStatus), ctx, in)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncStatus", reflect.TypeOf((*MockNodeClient)(nil).SyncStatus), arg0, arg1)
|
||||
}
|
||||
|
||||
// Version mocks base method.
|
||||
func (m *MockNodeClient) Version(ctx context.Context, in *empty.Empty) (*eth.Version, error) {
|
||||
func (m *MockNodeClient) Version(arg0 context.Context, arg1 *emptypb.Empty) (*eth.Version, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Version", ctx, in)
|
||||
ret := m.ctrl.Call(m, "Version", arg0, arg1)
|
||||
ret0, _ := ret[0].(*eth.Version)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Version indicates an expected call of Version.
|
||||
func (mr *MockNodeClientMockRecorder) Version(ctx, in any) *gomock.Call {
|
||||
func (mr *MockNodeClientMockRecorder) Version(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockNodeClient)(nil).Version), ctx, in)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockNodeClient)(nil).Version), arg0, arg1)
|
||||
}
|
||||
|
||||
72
testing/validator-mock/validator_client_mock.go
generated
72
testing/validator-mock/validator_client_mock.go
generated
@@ -17,8 +17,8 @@ import (
|
||||
primitives "github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
eth "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
iface "github.com/OffchainLabs/prysm/v7/validator/client/iface"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// MockValidatorClient is a mock of ValidatorClient interface.
|
||||
@@ -150,20 +150,6 @@ func (mr *MockValidatorClientMockRecorder) Duties(ctx, in any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Duties", reflect.TypeOf((*MockValidatorClient)(nil).Duties), ctx, in)
|
||||
}
|
||||
|
||||
// EnsureReady mocks base method.
|
||||
func (m *MockValidatorClient) EnsureReady(ctx context.Context) bool {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "EnsureReady", ctx)
|
||||
ret0, _ := ret[0].(bool)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// EnsureReady indicates an expected call of EnsureReady.
|
||||
func (mr *MockValidatorClientMockRecorder) EnsureReady(ctx any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureReady", reflect.TypeOf((*MockValidatorClient)(nil).EnsureReady), ctx)
|
||||
}
|
||||
|
||||
// EventStreamIsRunning mocks base method.
|
||||
func (m *MockValidatorClient) EventStreamIsRunning() bool {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -193,21 +179,6 @@ func (mr *MockValidatorClientMockRecorder) FeeRecipientByPubKey(ctx, in any) *go
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FeeRecipientByPubKey", reflect.TypeOf((*MockValidatorClient)(nil).FeeRecipientByPubKey), ctx, in)
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope mocks base method.
|
||||
func (m *MockValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, slot primitives.Slot, builderIndex primitives.BuilderIndex) (*eth.ExecutionPayloadEnvelope, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetExecutionPayloadEnvelope", ctx, slot, builderIndex)
|
||||
ret0, _ := ret[0].(*eth.ExecutionPayloadEnvelope)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetExecutionPayloadEnvelope indicates an expected call of GetExecutionPayloadEnvelope.
|
||||
func (mr *MockValidatorClientMockRecorder) GetExecutionPayloadEnvelope(ctx, slot, builderIndex any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionPayloadEnvelope", reflect.TypeOf((*MockValidatorClient)(nil).GetExecutionPayloadEnvelope), ctx, slot, builderIndex)
|
||||
}
|
||||
|
||||
// Host mocks base method.
|
||||
func (m *MockValidatorClient) Host() string {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -238,10 +209,10 @@ func (mr *MockValidatorClientMockRecorder) MultipleValidatorStatus(ctx, in any)
|
||||
}
|
||||
|
||||
// PrepareBeaconProposer mocks base method.
|
||||
func (m *MockValidatorClient) PrepareBeaconProposer(ctx context.Context, in *eth.PrepareBeaconProposerRequest) (*empty.Empty, error) {
|
||||
func (m *MockValidatorClient) PrepareBeaconProposer(ctx context.Context, in *eth.PrepareBeaconProposerRequest) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "PrepareBeaconProposer", ctx, in)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -312,19 +283,18 @@ func (mr *MockValidatorClientMockRecorder) ProposeExit(ctx, in any) *gomock.Call
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProposeExit", reflect.TypeOf((*MockValidatorClient)(nil).ProposeExit), ctx, in)
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope mocks base method.
|
||||
func (m *MockValidatorClient) PublishExecutionPayloadEnvelope(ctx context.Context, in *eth.SignedExecutionPayloadEnvelope) (*empty.Empty, error) {
|
||||
// EnsureReady mocks base method.
|
||||
func (m *MockValidatorClient) EnsureReady(ctx context.Context) bool {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "PublishExecutionPayloadEnvelope", ctx, in)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
ret := m.ctrl.Call(m, "EnsureReady", ctx)
|
||||
ret0, _ := ret[0].(bool)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// PublishExecutionPayloadEnvelope indicates an expected call of PublishExecutionPayloadEnvelope.
|
||||
func (mr *MockValidatorClientMockRecorder) PublishExecutionPayloadEnvelope(ctx, in any) *gomock.Call {
|
||||
// EnsureReady indicates an expected call of EnsureReady.
|
||||
func (mr *MockValidatorClientMockRecorder) EnsureReady(ctx any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishExecutionPayloadEnvelope", reflect.TypeOf((*MockValidatorClient)(nil).PublishExecutionPayloadEnvelope), ctx, in)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureReady", reflect.TypeOf((*MockValidatorClient)(nil).EnsureReady), ctx)
|
||||
}
|
||||
|
||||
// StartEventStream mocks base method.
|
||||
@@ -400,10 +370,10 @@ func (mr *MockValidatorClientMockRecorder) SubmitSignedAggregateSelectionProofEl
|
||||
}
|
||||
|
||||
// SubmitSignedContributionAndProof mocks base method.
|
||||
func (m *MockValidatorClient) SubmitSignedContributionAndProof(ctx context.Context, in *eth.SignedContributionAndProof) (*empty.Empty, error) {
|
||||
func (m *MockValidatorClient) SubmitSignedContributionAndProof(ctx context.Context, in *eth.SignedContributionAndProof) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SubmitSignedContributionAndProof", ctx, in)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -415,10 +385,10 @@ func (mr *MockValidatorClientMockRecorder) SubmitSignedContributionAndProof(ctx,
|
||||
}
|
||||
|
||||
// SubmitSyncMessage mocks base method.
|
||||
func (m *MockValidatorClient) SubmitSyncMessage(ctx context.Context, in *eth.SyncCommitteeMessage) (*empty.Empty, error) {
|
||||
func (m *MockValidatorClient) SubmitSyncMessage(ctx context.Context, in *eth.SyncCommitteeMessage) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SubmitSyncMessage", ctx, in)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -430,10 +400,10 @@ func (mr *MockValidatorClientMockRecorder) SubmitSyncMessage(ctx, in any) *gomoc
|
||||
}
|
||||
|
||||
// SubmitValidatorRegistrations mocks base method.
|
||||
func (m *MockValidatorClient) SubmitValidatorRegistrations(ctx context.Context, in *eth.SignedValidatorRegistrationsV1) (*empty.Empty, error) {
|
||||
func (m *MockValidatorClient) SubmitValidatorRegistrations(ctx context.Context, in *eth.SignedValidatorRegistrationsV1) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SubmitValidatorRegistrations", ctx, in)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -445,10 +415,10 @@ func (mr *MockValidatorClientMockRecorder) SubmitValidatorRegistrations(ctx, in
|
||||
}
|
||||
|
||||
// SubscribeCommitteeSubnets mocks base method.
|
||||
func (m *MockValidatorClient) SubscribeCommitteeSubnets(ctx context.Context, in *eth.CommitteeSubnetsSubscribeRequest, duties []*eth.ValidatorDuty) (*empty.Empty, error) {
|
||||
func (m *MockValidatorClient) SubscribeCommitteeSubnets(ctx context.Context, in *eth.CommitteeSubnetsSubscribeRequest, duties []*eth.ValidatorDuty) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SubscribeCommitteeSubnets", ctx, in, duties)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -475,7 +445,7 @@ func (mr *MockValidatorClientMockRecorder) SyncCommitteeContribution(ctx, in any
|
||||
}
|
||||
|
||||
// SyncMessageBlockRoot mocks base method.
|
||||
func (m *MockValidatorClient) SyncMessageBlockRoot(ctx context.Context, in *empty.Empty) (*eth.SyncMessageBlockRootResponse, error) {
|
||||
func (m *MockValidatorClient) SyncMessageBlockRoot(ctx context.Context, in *emptypb.Empty) (*eth.SyncMessageBlockRootResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncMessageBlockRoot", ctx, in)
|
||||
ret0, _ := ret[0].(*eth.SyncMessageBlockRootResponse)
|
||||
@@ -535,7 +505,7 @@ func (mr *MockValidatorClientMockRecorder) ValidatorStatus(ctx, in any) *gomock.
|
||||
}
|
||||
|
||||
// WaitForChainStart mocks base method.
|
||||
func (m *MockValidatorClient) WaitForChainStart(ctx context.Context, in *empty.Empty) (*eth.ChainStartResponse, error) {
|
||||
func (m *MockValidatorClient) WaitForChainStart(ctx context.Context, in *emptypb.Empty) (*eth.ChainStartResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "WaitForChainStart", ctx, in)
|
||||
ret0, _ := ret[0].(*eth.ChainStartResponse)
|
||||
|
||||
@@ -11,7 +11,6 @@ go_library(
|
||||
"log_helpers.go",
|
||||
"metrics.go",
|
||||
"propose.go",
|
||||
"propose_gloas.go",
|
||||
"registration.go",
|
||||
"runner.go",
|
||||
"service.go",
|
||||
@@ -107,7 +106,6 @@ go_test(
|
||||
"key_reload_test.go",
|
||||
"log_test.go",
|
||||
"metrics_test.go",
|
||||
"propose_gloas_test.go",
|
||||
"propose_test.go",
|
||||
"registration_test.go",
|
||||
"runner_test.go",
|
||||
@@ -142,7 +140,6 @@ go_test(
|
||||
"//crypto/bls/common/mock:go_default_library",
|
||||
"//encoding/bytesutil:go_default_library",
|
||||
"//io/file:go_default_library",
|
||||
"//proto/engine/v1:go_default_library",
|
||||
"//proto/prysm/v1alpha1:go_default_library",
|
||||
"//proto/prysm/v1alpha1/validator-client:go_default_library",
|
||||
"//runtime:go_default_library",
|
||||
|
||||
@@ -15,7 +15,6 @@ go_library(
|
||||
"domain_data.go",
|
||||
"doppelganger.go",
|
||||
"duties.go",
|
||||
"execution_payload_envelope.go",
|
||||
"genesis.go",
|
||||
"get_beacon_block.go",
|
||||
"index.go",
|
||||
|
||||
@@ -342,23 +342,3 @@ func (c *beaconApiValidatorClient) Host() string {
|
||||
func (c *beaconApiValidatorClient) EnsureReady(ctx context.Context) bool {
|
||||
return fallback.EnsureReady(ctx, c.restProvider, c.nodeClient)
|
||||
}
|
||||
|
||||
// Gloas Fork Methods
|
||||
|
||||
func (c *beaconApiValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, slot primitives.Slot, builderIndex primitives.BuilderIndex) (*ethpb.ExecutionPayloadEnvelope, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "beacon-api.GetExecutionPayloadEnvelope")
|
||||
defer span.End()
|
||||
|
||||
return wrapInMetrics[*ethpb.ExecutionPayloadEnvelope]("GetExecutionPayloadEnvelope", func() (*ethpb.ExecutionPayloadEnvelope, error) {
|
||||
return c.getExecutionPayloadEnvelope(ctx, slot, builderIndex)
|
||||
})
|
||||
}
|
||||
|
||||
func (c *beaconApiValidatorClient) PublishExecutionPayloadEnvelope(ctx context.Context, in *ethpb.SignedExecutionPayloadEnvelope) (*empty.Empty, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "beacon-api.PublishExecutionPayloadEnvelope")
|
||||
defer span.End()
|
||||
|
||||
return wrapInMetrics[*empty.Empty]("PublishExecutionPayloadEnvelope", func() (*empty.Empty, error) {
|
||||
return c.publishExecutionPayloadEnvelope(ctx, in)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package beacon_api
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// TODO: Implement Gloas beacon API client methods.
|
||||
|
||||
// getExecutionPayloadEnvelope retrieves the execution payload envelope for the given slot and builder index.
|
||||
func (c *beaconApiValidatorClient) getExecutionPayloadEnvelope(
|
||||
ctx context.Context,
|
||||
slot primitives.Slot,
|
||||
builderIndex primitives.BuilderIndex,
|
||||
) (*ethpb.ExecutionPayloadEnvelope, error) {
|
||||
return nil, errors.New("getExecutionPayloadEnvelope not yet implemented")
|
||||
}
|
||||
|
||||
// publishExecutionPayloadEnvelope broadcasts a signed execution payload envelope.
|
||||
func (c *beaconApiValidatorClient) publishExecutionPayloadEnvelope(
|
||||
ctx context.Context,
|
||||
envelope *ethpb.SignedExecutionPayloadEnvelope,
|
||||
) (*empty.Empty, error) {
|
||||
return nil, errors.New("publishExecutionPayloadEnvelope not yet implemented")
|
||||
}
|
||||
@@ -391,23 +391,3 @@ func (c *grpcValidatorClient) EnsureReady(ctx context.Context) bool {
|
||||
provider := c.grpcClientManager.conn.GetGrpcConnectionProvider()
|
||||
return fallback.EnsureReady(ctx, provider, c.nodeClient)
|
||||
}
|
||||
|
||||
// Gloas Fork Methods
|
||||
func (c *grpcValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, slot primitives.Slot, builderIndex primitives.BuilderIndex) (*ethpb.ExecutionPayloadEnvelope, error) {
|
||||
req := ðpb.ExecutionPayloadEnvelopeRequest{
|
||||
Slot: slot,
|
||||
BuilderIndex: builderIndex,
|
||||
}
|
||||
resp, err := c.getClient().GetExecutionPayloadEnvelope(ctx, req)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(
|
||||
client.ErrConnectionIssue,
|
||||
errors.Wrap(err, "GetExecutionPayloadEnvelope").Error(),
|
||||
)
|
||||
}
|
||||
return resp.Envelope, nil
|
||||
}
|
||||
|
||||
func (c *grpcValidatorClient) PublishExecutionPayloadEnvelope(ctx context.Context, in *ethpb.SignedExecutionPayloadEnvelope) (*empty.Empty, error) {
|
||||
return c.getClient().PublishExecutionPayloadEnvelope(ctx, in)
|
||||
}
|
||||
|
||||
@@ -153,6 +153,4 @@ type ValidatorClient interface {
|
||||
AggregatedSyncSelections(ctx context.Context, selections []SyncCommitteeSelection) ([]SyncCommitteeSelection, error)
|
||||
Host() string
|
||||
EnsureReady(ctx context.Context) bool
|
||||
GetExecutionPayloadEnvelope(ctx context.Context, slot primitives.Slot, builderIndex primitives.BuilderIndex) (*ethpb.ExecutionPayloadEnvelope, error)
|
||||
PublishExecutionPayloadEnvelope(ctx context.Context, in *ethpb.SignedExecutionPayloadEnvelope) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
@@ -128,8 +128,7 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK
|
||||
|
||||
var genericSignedBlock *ethpb.GenericSignedBeaconBlock
|
||||
// Special handling for Deneb blocks and later version because of blob side cars.
|
||||
// Gloas blocks are handled differently - no blobs in block, execution payload is separate.
|
||||
if blk.Version() >= version.Deneb && blk.Version() < version.Gloas && !blk.IsBlinded() {
|
||||
if blk.Version() >= version.Deneb && !blk.IsBlinded() {
|
||||
pb, err := blk.Proto()
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to get deneb block")
|
||||
@@ -177,11 +176,6 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK
|
||||
return
|
||||
}
|
||||
|
||||
if err := v.proposeSelfBuildEnvelope(ctx, slot, pubKey, blk); err != nil {
|
||||
log.WithError(err).Error("Failed to propose self-build envelope")
|
||||
return
|
||||
}
|
||||
|
||||
span.SetAttributes(
|
||||
trace.StringAttribute("blockRoot", fmt.Sprintf("%#x", blkResp.BlockRoot)),
|
||||
trace.Int64Attribute("numDeposits", int64(len(blk.Block().Body().Deposits()))),
|
||||
@@ -198,7 +192,7 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK
|
||||
}
|
||||
|
||||
func logProposedBlock(log *logrus.Entry, blk interfaces.SignedBeaconBlock, blkRoot []byte) error {
|
||||
if blk.Version() >= version.Bellatrix && blk.Version() < version.Gloas {
|
||||
if blk.Version() >= version.Bellatrix {
|
||||
p, err := blk.Block().Body().Execution()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to get execution payload")
|
||||
@@ -234,30 +228,6 @@ func logProposedBlock(log *logrus.Entry, blk interfaces.SignedBeaconBlock, blkRo
|
||||
}
|
||||
}
|
||||
}
|
||||
if blk.Version() >= version.Gloas {
|
||||
bid, err := blk.Block().Body().SignedExecutionPayloadBid()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to get execution payload bid")
|
||||
}
|
||||
if bid != nil && bid.Message != nil {
|
||||
msg := bid.Message
|
||||
log = log.WithFields(logrus.Fields{
|
||||
"builderIndex": msg.BuilderIndex,
|
||||
"bidValue": msg.Value,
|
||||
"blockHash": fmt.Sprintf("%#x", bytesutil.Trunc(msg.BlockHash)),
|
||||
"parentHash": fmt.Sprintf("%#x", bytesutil.Trunc(msg.ParentBlockHash)),
|
||||
"gasLimit": msg.GasLimit,
|
||||
})
|
||||
if len(msg.BlobKzgCommitments) != 0 {
|
||||
log = log.WithField("kzgCommitmentCount", len(msg.BlobKzgCommitments))
|
||||
}
|
||||
}
|
||||
payloadAtts, err := blk.Block().Body().PayloadAttestations()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to get payload attestations")
|
||||
}
|
||||
log = log.WithField("payloadAttestationCount", len(payloadAtts))
|
||||
}
|
||||
|
||||
br := fmt.Sprintf("%#x", bytesutil.Trunc(blkRoot))
|
||||
graffiti := blk.Block().Body().Graffiti()
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/signing"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/OffchainLabs/prysm/v7/monitoring/tracing/trace"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
validatorpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1/validator-client"
|
||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||
"github.com/OffchainLabs/prysm/v7/time/slots"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// signExecutionPayloadEnvelope signs the execution payload envelope using the
|
||||
// proposer's key. The envelope is signed with DomainBeaconBuilder since it is
|
||||
// a builder artifact — even in the self-build case where the proposer acts as
|
||||
// their own builder.
|
||||
func (v *validator) signExecutionPayloadEnvelope(
|
||||
ctx context.Context,
|
||||
pubKey [fieldparams.BLSPubkeyLength]byte,
|
||||
slot primitives.Slot,
|
||||
envelope *ethpb.ExecutionPayloadEnvelope,
|
||||
) (*ethpb.SignedExecutionPayloadEnvelope, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "validator.signExecutionPayloadEnvelope")
|
||||
defer span.End()
|
||||
|
||||
epoch := slots.ToEpoch(slot)
|
||||
|
||||
domain, err := v.domainData(ctx, epoch, params.BeaconConfig().DomainBeaconBuilder[:])
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not get domain data")
|
||||
}
|
||||
if domain == nil {
|
||||
return nil, errors.New("nil domain data")
|
||||
}
|
||||
|
||||
signingRoot, err := signing.ComputeSigningRoot(envelope, domain.SignatureDomain)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not compute signing root")
|
||||
}
|
||||
|
||||
sig, err := v.km.Sign(ctx, &validatorpb.SignRequest{
|
||||
PublicKey: pubKey[:],
|
||||
SigningRoot: signingRoot[:],
|
||||
SignatureDomain: domain.SignatureDomain,
|
||||
Object: &validatorpb.SignRequest_ExecutionPayloadEnvelope{
|
||||
ExecutionPayloadEnvelope: envelope,
|
||||
},
|
||||
SigningSlot: slot,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not sign execution payload envelope")
|
||||
}
|
||||
|
||||
return ðpb.SignedExecutionPayloadEnvelope{
|
||||
Message: envelope,
|
||||
Signature: sig.Marshal(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (v *validator) proposeSelfBuildEnvelope(
|
||||
ctx context.Context,
|
||||
slot primitives.Slot,
|
||||
pubKey [fieldparams.BLSPubkeyLength]byte,
|
||||
blk interfaces.SignedBeaconBlock,
|
||||
) error {
|
||||
if blk.Version() < version.Gloas {
|
||||
return nil
|
||||
}
|
||||
|
||||
bid, err := blk.Block().Body().SignedExecutionPayloadBid()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if bid == nil || bid.Message == nil {
|
||||
return errors.New("no execution payload bid found in block body")
|
||||
}
|
||||
if bid.Message.BuilderIndex != params.BeaconConfig().BuilderIndexSelfBuild {
|
||||
return nil
|
||||
}
|
||||
|
||||
envelope, err := v.validatorClient.GetExecutionPayloadEnvelope(ctx, slot, params.BeaconConfig().BuilderIndexSelfBuild)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to get execution payload envelope for self-build")
|
||||
}
|
||||
|
||||
signedEnvelope, err := v.signExecutionPayloadEnvelope(ctx, pubKey, slot, envelope)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not sign execution payload envelope")
|
||||
}
|
||||
|
||||
if _, err := v.validatorClient.PublishExecutionPayloadEnvelope(ctx, signedEnvelope); err != nil {
|
||||
return errors.Wrap(err, "failed to publish execution payload envelope")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,300 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/signing"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/util"
|
||||
"github.com/pkg/errors"
|
||||
logTest "github.com/sirupsen/logrus/hooks/test"
|
||||
"go.uber.org/mock/gomock"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
func testExecutionPayloadEnvelope(slot primitives.Slot, builderIndex primitives.BuilderIndex) *ethpb.ExecutionPayloadEnvelope {
|
||||
return ðpb.ExecutionPayloadEnvelope{
|
||||
Payload: &enginev1.ExecutionPayloadDeneb{
|
||||
ParentHash: make([]byte, 32),
|
||||
FeeRecipient: make([]byte, 20),
|
||||
StateRoot: make([]byte, 32),
|
||||
ReceiptsRoot: make([]byte, 32),
|
||||
LogsBloom: make([]byte, 256),
|
||||
PrevRandao: make([]byte, 32),
|
||||
BaseFeePerGas: make([]byte, 32),
|
||||
BlockHash: make([]byte, 32),
|
||||
ExtraData: make([]byte, 0),
|
||||
},
|
||||
ExecutionRequests: &enginev1.ExecutionRequests{},
|
||||
Slot: slot,
|
||||
BuilderIndex: builderIndex,
|
||||
BeaconBlockRoot: make([]byte, 32),
|
||||
StateRoot: make([]byte, 32),
|
||||
}
|
||||
}
|
||||
|
||||
func TestExecutionPayloadEnvelope(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
slot := primitives.Slot(100)
|
||||
builderIndex := params.BeaconConfig().BuilderIndexSelfBuild
|
||||
|
||||
expectedEnvelope := testExecutionPayloadEnvelope(slot, builderIndex)
|
||||
|
||||
m.validatorClient.EXPECT().
|
||||
GetExecutionPayloadEnvelope(gomock.Any(), slot, builderIndex).
|
||||
Return(expectedEnvelope, nil)
|
||||
|
||||
b := ðpb.GenericBeaconBlock{
|
||||
Block: ðpb.GenericBeaconBlock_Gloas{
|
||||
Gloas: ðpb.BeaconBlockGloas{
|
||||
Slot: slot,
|
||||
Body: ðpb.BeaconBlockBodyGloas{
|
||||
SignedExecutionPayloadBid: ðpb.SignedExecutionPayloadBid{
|
||||
Message: ðpb.ExecutionPayloadBid{
|
||||
BuilderIndex: builderIndex,
|
||||
},
|
||||
Signature: make([]byte, 96),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
envelope, err := validator.getSelfBuildExecutionPayloadEnvelope(t.Context(), slot, b)
|
||||
require.NoError(t, err)
|
||||
require.DeepEqual(t, expectedEnvelope, envelope)
|
||||
}
|
||||
|
||||
func TestExecutionPayloadEnvelope_NilBlock(t *testing.T) {
|
||||
validator, _, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
b := ðpb.GenericBeaconBlock{
|
||||
Block: ðpb.GenericBeaconBlock_Gloas{},
|
||||
}
|
||||
|
||||
_, err := validator.getSelfBuildExecutionPayloadEnvelope(t.Context(), 1, b)
|
||||
require.ErrorContains(t, "expected Gloas block but got nil", err)
|
||||
}
|
||||
|
||||
func TestExecutionPayloadEnvelope_MissingBid(t *testing.T) {
|
||||
validator, _, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
b := ðpb.GenericBeaconBlock{
|
||||
Block: ðpb.GenericBeaconBlock_Gloas{
|
||||
Gloas: ðpb.BeaconBlockGloas{
|
||||
Slot: 1,
|
||||
Body: ðpb.BeaconBlockBodyGloas{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, err := validator.getSelfBuildExecutionPayloadEnvelope(t.Context(), 1, b)
|
||||
require.ErrorContains(t, "block missing signed execution payload bid", err)
|
||||
}
|
||||
|
||||
func TestExecutionPayloadEnvelope_ClientError(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
m.validatorClient.EXPECT().
|
||||
GetExecutionPayloadEnvelope(gomock.Any(), gomock.Any(), gomock.Any()).
|
||||
Return(nil, errors.New("connection refused"))
|
||||
|
||||
b := ðpb.GenericBeaconBlock{
|
||||
Block: ðpb.GenericBeaconBlock_Gloas{
|
||||
Gloas: ðpb.BeaconBlockGloas{
|
||||
Slot: 1,
|
||||
Body: ðpb.BeaconBlockBodyGloas{
|
||||
SignedExecutionPayloadBid: ðpb.SignedExecutionPayloadBid{
|
||||
Message: ðpb.ExecutionPayloadBid{BuilderIndex: 1},
|
||||
Signature: make([]byte, 96),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, err := validator.getSelfBuildExecutionPayloadEnvelope(t.Context(), 1, b)
|
||||
require.ErrorContains(t, "connection refused", err)
|
||||
}
|
||||
|
||||
func TestSignExecutionPayloadEnvelope(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
kp := testKeyFromBytes(t, []byte{1})
|
||||
validator.km = newMockKeymanager(t, kp)
|
||||
|
||||
builderDomain := make([]byte, 32)
|
||||
copy(builderDomain, params.BeaconConfig().DomainBeaconBuilder[:])
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(ðpb.DomainResponse{SignatureDomain: builderDomain}, nil)
|
||||
|
||||
envelope := testExecutionPayloadEnvelope(100, 42)
|
||||
|
||||
signed, err := validator.signExecutionPayloadEnvelope(t.Context(), kp.pub, 100, envelope)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, signed)
|
||||
require.DeepEqual(t, envelope, signed.Message)
|
||||
require.NotNil(t, signed.Signature)
|
||||
|
||||
// Verify the signature was computed with the builder domain.
|
||||
expectedRoot, err := signing.ComputeSigningRoot(envelope, builderDomain)
|
||||
require.NoError(t, err)
|
||||
require.NotEqual(t, [32]byte{}, expectedRoot)
|
||||
}
|
||||
|
||||
func TestSignExecutionPayloadEnvelope_VerifySignature(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
kp := testKeyFromBytes(t, []byte{1})
|
||||
validator.km = newMockKeymanager(t, kp)
|
||||
|
||||
builderDomain := make([]byte, 32)
|
||||
copy(builderDomain, params.BeaconConfig().DomainBeaconBuilder[:])
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(ðpb.DomainResponse{SignatureDomain: builderDomain}, nil)
|
||||
|
||||
envelope := testExecutionPayloadEnvelope(100, 42)
|
||||
|
||||
signed, err := validator.signExecutionPayloadEnvelope(t.Context(), kp.pub, 100, envelope)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Compute the expected signing root and verify the signature.
|
||||
signingRoot, err := signing.ComputeSigningRoot(envelope, builderDomain)
|
||||
require.NoError(t, err)
|
||||
|
||||
sig, err := bls.SignatureFromBytes(signed.Signature)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, true, sig.Verify(kp.pri.PublicKey(), signingRoot[:]))
|
||||
}
|
||||
|
||||
func TestSignExecutionPayloadEnvelope_DomainDataError(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
kp := testKeyFromBytes(t, []byte{1})
|
||||
validator.km = newMockKeymanager(t, kp)
|
||||
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(nil, errors.New("domain data unavailable"))
|
||||
|
||||
envelope := testExecutionPayloadEnvelope(100, 0)
|
||||
|
||||
_, err := validator.signExecutionPayloadEnvelope(t.Context(), kp.pub, 100, envelope)
|
||||
require.ErrorContains(t, "could not get domain data", err)
|
||||
}
|
||||
|
||||
func TestSignExecutionPayloadEnvelope_NilDomain(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
kp := testKeyFromBytes(t, []byte{1})
|
||||
validator.km = newMockKeymanager(t, kp)
|
||||
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(nil, nil)
|
||||
|
||||
envelope := testExecutionPayloadEnvelope(100, 0)
|
||||
|
||||
_, err := validator.signExecutionPayloadEnvelope(t.Context(), kp.pub, 100, envelope)
|
||||
require.ErrorContains(t, "nil domain data", err)
|
||||
}
|
||||
|
||||
func TestSignExecutionPayloadEnvelope_UsesDomainBeaconBuilder(t *testing.T) {
|
||||
validator, m, _, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
kp := testKeyFromBytes(t, []byte{1})
|
||||
validator.km = newMockKeymanager(t, kp)
|
||||
|
||||
// Verify the correct domain type is requested.
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
DoAndReturn(func(ctx any, req *ethpb.DomainRequest) (*ethpb.DomainResponse, error) {
|
||||
require.DeepEqual(t, params.BeaconConfig().DomainBeaconBuilder[:], req.Domain)
|
||||
return ðpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil
|
||||
})
|
||||
|
||||
envelope := testExecutionPayloadEnvelope(100, 0)
|
||||
|
||||
_, err := validator.signExecutionPayloadEnvelope(t.Context(), kp.pub, 100, envelope)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// TestProposeBlock_Gloas_EnvelopeAfterBlock verifies that the Gloas propose flow
|
||||
// submits the block first, then retrieves, signs, and publishes the envelope.
|
||||
// The envelope's state root is lazily computed by the beacon node from the
|
||||
// post-block state, so this ordering is critical.
|
||||
func TestProposeBlock_Gloas_EnvelopeAfterBlock(t *testing.T) {
|
||||
hook := logTest.NewGlobal()
|
||||
validator, m, validatorKey, finish := setup(t, false)
|
||||
defer finish()
|
||||
|
||||
var pubKey [fieldparams.BLSPubkeyLength]byte
|
||||
copy(pubKey[:], validatorKey.PublicKey().Marshal())
|
||||
|
||||
blk := util.NewBeaconBlockGloas()
|
||||
builderIndex := params.BeaconConfig().BuilderIndexSelfBuild
|
||||
|
||||
gloasBlock := ðpb.GenericBeaconBlock{
|
||||
Block: ðpb.GenericBeaconBlock_Gloas{
|
||||
Gloas: blk.Block,
|
||||
},
|
||||
}
|
||||
|
||||
envelope := testExecutionPayloadEnvelope(1, builderIndex)
|
||||
|
||||
// DomainData for randao signing.
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(ðpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil)
|
||||
|
||||
// BeaconBlock returns a Gloas block.
|
||||
m.validatorClient.EXPECT().
|
||||
BeaconBlock(gomock.Any(), gomock.AssignableToTypeOf(ðpb.BlockRequest{})).
|
||||
Return(gloasBlock, nil)
|
||||
|
||||
// DomainData for block signing.
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(ðpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil)
|
||||
|
||||
// Critical ordering: ProposeBeaconBlock must be called BEFORE ExecutionPayloadEnvelope.
|
||||
proposeCall := m.validatorClient.EXPECT().
|
||||
ProposeBeaconBlock(gomock.Any(), gomock.AssignableToTypeOf(ðpb.GenericSignedBeaconBlock{})).
|
||||
Return(ðpb.ProposeResponse{BlockRoot: make([]byte, 32)}, nil)
|
||||
|
||||
getEnvelopeCall := m.validatorClient.EXPECT().
|
||||
GetExecutionPayloadEnvelope(gomock.Any(), primitives.Slot(1), builderIndex).
|
||||
Return(envelope, nil).
|
||||
After(proposeCall)
|
||||
|
||||
// DomainData for envelope signing.
|
||||
m.validatorClient.EXPECT().
|
||||
DomainData(gomock.Any(), gomock.Any()).
|
||||
Return(ðpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil).
|
||||
After(getEnvelopeCall)
|
||||
|
||||
m.validatorClient.EXPECT().
|
||||
PublishExecutionPayloadEnvelope(gomock.Any(), gomock.AssignableToTypeOf(ðpb.SignedExecutionPayloadEnvelope{})).
|
||||
Return(&emptypb.Empty{}, nil)
|
||||
|
||||
validator.ProposeBlock(t.Context(), 1, pubKey)
|
||||
require.LogsContain(t, hook, "Submitted new block")
|
||||
}
|
||||
@@ -432,12 +432,6 @@ func getSignRequestJson(ctx context.Context, validator *validator.Validate, requ
|
||||
return handleBlockFulu(ctx, validator, request, genesisValidatorsRoot)
|
||||
case *validatorpb.SignRequest_BlindedBlockFulu:
|
||||
return handleBlindedBlockFulu(ctx, validator, request, genesisValidatorsRoot)
|
||||
case *validatorpb.SignRequest_BlockGloas:
|
||||
// TODO: Implement Gloas block signing for web3signer.
|
||||
return nil, fmt.Errorf("web3signer Gloas block signing not yet implemented")
|
||||
case *validatorpb.SignRequest_ExecutionPayloadEnvelope:
|
||||
// TODO: Implement execution payload envelope signing for web3signer.
|
||||
return nil, fmt.Errorf("web3signer execution payload envelope signing not yet implemented")
|
||||
|
||||
// We do not support "DEPOSIT" type.
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user