diff --git a/consensus/misc/eip7002.go b/consensus/misc/eip7002.go index 8072f3c5273..b00da32c3fc 100644 --- a/consensus/misc/eip7002.go +++ b/consensus/misc/eip7002.go @@ -17,9 +17,6 @@ package misc import ( - "encoding/binary" - - "github.com/erigontech/erigon-lib/common" "github.com/erigontech/erigon-lib/log/v3" "github.com/erigontech/erigon/consensus" "github.com/erigontech/erigon/core/types" @@ -30,93 +27,23 @@ import ( // (May have to move it to config json later for cross-chain compatibility) // TODO @somnathb1 Probably not needed outside of EVM const ( - ExcessWithdrawalReqsSlot = 0 - WithdrawalReqCountSlot = 1 - WithdrawalReqQueueHeadSlot = 2 - WithdrawalReqQueueTailSlot = 3 - WithdrawalReqQueueStorageOffset = 4 - MaxWithdrawalReqsPerBlock = 16 - TargetWithdrawalReqsPerBlock = 2 - MinWithdrawalReqFee = 1 - WithdrawalReqFeeUpdFraction = 17 + WithdrawalRequestDataLen = 76 // addr + pubkey + amt ) -// const abiStr = `[ -// { -// "inputs": [], -// "name": "read_withdrawal_requests", -// "outputs": [ -// { -// "components": [ -// { -// "internalType": "bytes20", -// "name": "sourceAddress", -// "type": "bytes20" -// }, -// { -// "internalType": "bytes32", -// "name": "validatorPubKey1", -// "type": "bytes32" -// }, -// { -// "internalType": "bytes16", -// "name": "validatorPubKey2", -// "type": "bytes16" -// }, -// { -// "internalType": "uint64", -// "name": "amount", -// "type": "uint64" -// } -// ], -// "internalType": "struct WithdrawalContract.ValidatorWithdrawalRequest[]", -// "name": "", -// "type": "tuple[]" -// } -// ], -// "stateMutability": "nonpayable", -// "type": "function" -// } -// ]` - func DequeueWithdrawalRequests7002(syscall consensus.SystemCall) types.Requests { res, err := syscall(params.WithdrawalRequestAddress, nil) if err != nil { log.Warn("Err with syscall to WithdrawalRequestAddress", "err", err) return nil } - // Parse out the exits - using the bytes array returned + // Just append the contract outputs var reqs types.Requests - lenPerReq := 20 + 48 + 8 // addr + pubkey + amt - for i := 0; i <= len(res)-lenPerReq; i += lenPerReq { - var pubkey [48]byte - copy(pubkey[:], res[i+20:i+68]) + for i := 0; i <= len(res)-WithdrawalRequestDataLen; i += WithdrawalRequestDataLen { + wr := &types.WithdrawalRequest{ - SourceAddress: common.BytesToAddress(res[i : i+20]), - ValidatorPubkey: pubkey, - Amount: binary.BigEndian.Uint64(res[i+68:]), + RequestData: [WithdrawalRequestDataLen]byte(res[i : i+WithdrawalRequestDataLen]), } reqs = append(reqs, wr) } return reqs - - // Alternatively unpack using the abi methods - // wAbi, _ := abi.JSON(strings.NewReader(abiStr)) - // wAbi.Unpack("read_withdrawal_requests", wrs) - - // type R struct { - // sourceAddress [20]byte - // validatorPubKey1 [32] byte - // validatorPubKey2 [16] byte - // amount uint64 - // } - // Ret := make([]R, 0) - // wAbi.UnpackIntoInterface(Ret, "read_withdrawal_requests", wrs) - - // reqs := make(types.Requests, 0) - - // for r := range(Ret) { - // req := types.NewRequest(Ret) - // reqs = append(reqs, types.NewRequest()) - // } } diff --git a/core/types/encdec_test.go b/core/types/encdec_test.go index 90ab110e6d6..289d5758459 100644 --- a/core/types/encdec_test.go +++ b/core/types/encdec_test.go @@ -28,6 +28,7 @@ import ( "github.com/holiman/uint256" libcommon "github.com/erigontech/erigon-lib/common" + "github.com/erigontech/erigon-lib/common/hexutility" types2 "github.com/erigontech/erigon-lib/types" "github.com/erigontech/erigon/rlp" ) @@ -88,9 +89,7 @@ func (tr *TRand) RandWithdrawal() *Withdrawal { func (tr *TRand) RandWithdrawalRequest() *WithdrawalRequest { return &WithdrawalRequest{ - SourceAddress: [20]byte(tr.RandBytes(20)), - ValidatorPubkey: [48]byte(tr.RandBytes(48)), - Amount: *tr.RandUint64(), + RequestData: [WithdrawalRequestDataLen]byte(tr.RandBytes(WithdrawalRequestDataLen)), } } @@ -413,9 +412,7 @@ func compareDeposits(t *testing.T, a, b *DepositRequest) { } func compareWithdrawalRequests(t *testing.T, a, b *WithdrawalRequest) { - check(t, "WithdrawalRequest.SourceAddress", a.SourceAddress, b.SourceAddress) - check(t, "WithdrawalRequest.ValidatorPubkey", a.ValidatorPubkey, b.ValidatorPubkey) - check(t, "WithdrawalRequest.Amount", a.Amount, b.Amount) + check(t, "WithdrawalRequest.Amount", a.RequestData, b.RequestData) } func compareConsolidationRequests(t *testing.T, a, b *ConsolidationRequest) { @@ -616,57 +613,21 @@ func TestConsolidationReqsEncodeDecode(t *testing.T) { func TestWithdrawalReqsEncodeDecode(t *testing.T) { wx1 := WithdrawalRequest{ - SourceAddress: libcommon.HexToAddress("0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"), - ValidatorPubkey: [48]byte{}, - Amount: 0, + RequestData: [WithdrawalRequestDataLen]byte(hexutility.MustDecodeHex("0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fefefefefefefefe")), } - wx1.ValidatorPubkey[47] = 0x01 wx2 := WithdrawalRequest{ - SourceAddress: libcommon.HexToAddress("0x8a0a19589531694250d570040a0c4b74576919b8"), - ValidatorPubkey: [48]byte{}, - Amount: 0xfffffffffffffffe, - } - wx2.ValidatorPubkey[47] = 0x02 - wxs := append(Requests{}, &wx1, &wx2) - - root := DeriveSha(wxs) - if root.String() != "0x143e24a803c0dc2ae5381184ad5fe9e45ac2c82c671bc3eafdc090642fc16501" { - t.Errorf("Root mismatch %s", root.String()) + RequestData: [WithdrawalRequestDataLen]byte(hexutility.MustDecodeHex("0x8a0a19589531694250d570040a0c4b74576919b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fefefefefefefefe")), } var wx3, wx4 WithdrawalRequest var buf1, buf2 bytes.Buffer wx1.EncodeRLP(&buf1) wx2.EncodeRLP(&buf2) + wx3.DecodeRLP(buf1.Bytes()) wx4.DecodeRLP(buf2.Bytes()) - wxs = Requests{} - wxs = append(wxs, &wx3, &wx4) - root = DeriveSha(wxs) - if root.String() != "0x143e24a803c0dc2ae5381184ad5fe9e45ac2c82c671bc3eafdc090642fc16501" { - t.Errorf("Root mismatch %s", root.String()) - } - - /* - // Breakdown of block encoding with withdrawal requests - expected - c0c0f8a0 - - b84a - 01 - f84794 - a94f5374fce5edbc8e2a8697c15331677e6ebf0b - b0 - 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 - 80 - - b852 - 01 - f84f94 - 8a0a19589531694250d570040a0c4b74576919b8 - b0 - 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 - 88 - fffffffffffffffe - */ + if wx1.RequestData != wx3.RequestData || wx2.RequestData != wx4.RequestData { + t.Errorf("error: incorrect encode/decode for WithdrawalRequest") + } } diff --git a/core/types/request.go b/core/types/request.go index c8d7cfa6c22..bef9321945e 100644 --- a/core/types/request.go +++ b/core/types/request.go @@ -31,6 +31,7 @@ import ( const WithdrawalRequestType byte = 0x01 const DepositRequestType byte = 0x00 const ConsolidationRequestType byte = 0x02 +const WithdrawalRequestDataLen = 76 // addr + pubkey + amt type Request interface { EncodeRLP(io.Writer) error diff --git a/core/types/withdrawal_request.go b/core/types/withdrawal_request.go index 5113f4450d7..c161a6bba24 100644 --- a/core/types/withdrawal_request.go +++ b/core/types/withdrawal_request.go @@ -22,24 +22,16 @@ import ( "errors" "io" - libcommon "github.com/erigontech/erigon-lib/common" - "github.com/erigontech/erigon-lib/common/hexutil" "github.com/erigontech/erigon-lib/common/hexutility" - rlp2 "github.com/erigontech/erigon-lib/rlp" - "github.com/erigontech/erigon/rlp" ) // EIP-7002 Withdrawal Request see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7002.md type WithdrawalRequest struct { - SourceAddress libcommon.Address - ValidatorPubkey [BLSPubKeyLen]byte // bls - Amount uint64 + RequestData [WithdrawalRequestDataLen]byte } type WithdrawalRequestJson struct { - SourceAddress libcommon.Address `json:"sourceAddress"` - ValidatorPubkey string `json:"validatorPubkey"` - Amount hexutil.Uint64 `json:"amount"` + RequestData string } func (w *WithdrawalRequest) RequestType() byte { @@ -48,53 +40,42 @@ func (w *WithdrawalRequest) RequestType() byte { // encodingSize implements RequestData. func (w *WithdrawalRequest) EncodingSize() (encodingSize int) { - encodingSize += 70 // 1 + 20 + 1 + 48 (0x80 + addrSize, 0x80 + BLSPubKeyLen) - encodingSize++ - encodingSize += rlp.IntLenExcludingHead(w.Amount) - encodingSize += rlp2.ListPrefixLen(encodingSize) - encodingSize += 1 // RequestType - return + return WithdrawalRequestDataLen + 1 } func (w *WithdrawalRequest) EncodeRLP(b io.Writer) (err error) { - var buf bytes.Buffer - bb := make([]byte, 10) - if err = rlp.Encode(&buf, w.SourceAddress); err != nil { - return err - } - if err = rlp.Encode(&buf, w.ValidatorPubkey); err != nil { + if _, err = b.Write([]byte{WithdrawalRequestType}); err != nil { return err } - if err = rlp.EncodeInt(w.Amount, &buf, bb); err != nil { + if _, err = b.Write(w.RequestData[:]); err != nil { return err } - rlp2.EncodeListPrefix(buf.Len(), bb) + return +} - if _, err = b.Write([]byte{WithdrawalRequestType}); err != nil { - return err - } - if _, err = b.Write(bb[0:2]); err != nil { - return err +func (w *WithdrawalRequest) Encode() []byte { + if w == nil { + return nil } - if _, err = b.Write(buf.Bytes()); err != nil { - return err + return append([]byte{WithdrawalRequestType}, w.RequestData[:]...) +} + +func (w *WithdrawalRequest) DecodeRLP(input []byte) error { + if len(input) != WithdrawalRequestDataLen+1 { + return errors.New("Incorrect size for decoding WithdrawalRequest RLP") } - return + w.RequestData = [76]byte(input[1:]) + return nil } -func (w *WithdrawalRequest) DecodeRLP(input []byte) error { return rlp.DecodeBytes(input[1:], w) } func (w *WithdrawalRequest) copy() Request { return &WithdrawalRequest{ - SourceAddress: w.SourceAddress, - ValidatorPubkey: w.ValidatorPubkey, - Amount: w.Amount, + RequestData: [WithdrawalRequestDataLen]byte(bytes.Clone(w.RequestData[:])), } } func (w *WithdrawalRequest) MarshalJSON() ([]byte, error) { tt := WithdrawalRequestJson{ - SourceAddress: w.SourceAddress, - ValidatorPubkey: hexutility.Encode(w.ValidatorPubkey[:]), - Amount: hexutil.Uint64(w.Amount), + RequestData: hexutility.Encode(w.RequestData[:]), } return json.Marshal(tt) } @@ -105,18 +86,11 @@ func (w *WithdrawalRequest) UnmarshalJSON(input []byte) error { if err != nil { return err } - - validatorKey, err := hexutil.Decode(tt.ValidatorPubkey) - if err != nil { - return err - } - if len(validatorKey) != BLSPubKeyLen { - return errors.New("WithdrawalRequest ValidatorPubkey len after UnmarshalJSON doesn't match BLSKeyLen") + if len(tt.RequestData) != WithdrawalRequestDataLen { + return errors.New("Cannot unmarshal request data, length mismatch") } - w.ValidatorPubkey = [BLSPubKeyLen]byte(validatorKey) - w.Amount = tt.Amount.Uint64() - w.SourceAddress = tt.SourceAddress + w.RequestData = [WithdrawalRequestDataLen]byte(hexutility.MustDecodeString(tt.RequestData)) return nil } diff --git a/erigon-lib/go.mod b/erigon-lib/go.mod index e6aaa52f951..4e7e1d4ea0c 100644 --- a/erigon-lib/go.mod +++ b/erigon-lib/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978 - github.com/erigontech/interfaces v0.0.0-20240912071218-97d86b41623a + github.com/erigontech/interfaces v0.0.0-20240930141537-21d2f6889ec4 github.com/erigontech/mdbx-go v0.38.4 github.com/erigontech/secp256k1 v1.1.0 github.com/rs/dnscache v0.0.0-20211102005908-e0241e321417 diff --git a/erigon-lib/go.sum b/erigon-lib/go.sum index 473bef2824d..0aca473b9d4 100644 --- a/erigon-lib/go.sum +++ b/erigon-lib/go.sum @@ -148,8 +148,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978 h1:7ECOf7Us3+/706WGZXIX84qQc6zmxQby8fGbFLiqFlU= github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978/go.mod h1:ooHlCl+eEYzebiPu+FP6Q6SpPUeMADn8Jxabv3IKb9M= -github.com/erigontech/interfaces v0.0.0-20240912071218-97d86b41623a h1:8SkMr0APaj4LiviMVfXHRqNgWmsl8mVnNb/ioMzRedE= -github.com/erigontech/interfaces v0.0.0-20240912071218-97d86b41623a/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE= +github.com/erigontech/interfaces v0.0.0-20240930141537-21d2f6889ec4 h1:MFWfaE+BwmFXfNfwwuyeNImS16HIsDGB0q3u7nCpIhY= +github.com/erigontech/interfaces v0.0.0-20240930141537-21d2f6889ec4/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE= github.com/erigontech/mdbx-go v0.38.4 h1:S9T7mTe9KPcFe4dOoOtVdI6gPzht9y7wMnYfUBgrQLo= github.com/erigontech/mdbx-go v0.38.4/go.mod h1:IcOLQDPw3VM/asP6T5JVPPN4FHHgJtY16XfYjzWKVNI= github.com/erigontech/secp256k1 v1.1.0 h1:mO3YJMUSoASE15Ya//SoHiisptUhdXExuMUN1M0X9qY= diff --git a/erigon-lib/gointerfaces/typesproto/types.pb.go b/erigon-lib/gointerfaces/typesproto/types.pb.go index 581584c5b4a..b5f623c96e3 100644 --- a/erigon-lib/gointerfaces/typesproto/types.pb.go +++ b/erigon-lib/gointerfaces/typesproto/types.pb.go @@ -709,9 +709,7 @@ type WithdrawalRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SourceAddress *H160 `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` - ValidatorPubkey []byte `protobuf:"bytes,2,opt,name=validator_pubkey,json=validatorPubkey,proto3" json:"validator_pubkey,omitempty"` - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + RequestData []byte `protobuf:"bytes,1,opt,name=request_data,json=requestData,proto3" json:"request_data,omitempty"` } func (x *WithdrawalRequest) Reset() { @@ -746,27 +744,13 @@ func (*WithdrawalRequest) Descriptor() ([]byte, []int) { return file_types_types_proto_rawDescGZIP(), []int{9} } -func (x *WithdrawalRequest) GetSourceAddress() *H160 { +func (x *WithdrawalRequest) GetRequestData() []byte { if x != nil { - return x.SourceAddress + return x.RequestData } return nil } -func (x *WithdrawalRequest) GetValidatorPubkey() []byte { - if x != nil { - return x.ValidatorPubkey - } - return nil -} - -func (x *WithdrawalRequest) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - type ConsolidationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1436,101 +1420,96 @@ var file_types_types_proto_rawDesc = []byte{ 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, - 0x8a, 0x01, 0x0a, 0x11, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x31, 0x36, 0x30, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, - 0x14, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x31, 0x36, 0x30, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, - 0x0a, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x22, 0x8a, 0x01, 0x0a, 0x0a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x25, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x31, 0x36, 0x30, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x5f, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, - 0x31, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x73, 0x22, 0x49, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x6f, 0x72, - 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x22, 0xca, 0x01, 0x0a, - 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x70, 0x6f, - 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x52, - 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x08, 0x50, 0x65, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, - 0x6e, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x61, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x61, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x28, - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x52, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, - 0x5f, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x49, 0x73, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x69, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x73, - 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x49, - 0x73, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, - 0x5f, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x49, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x22, 0x71, - 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x42, 0x6f, 0x64, 0x79, 0x56, 0x31, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x0b, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x61, 0x6c, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x73, 0x3a, 0x52, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6a, - 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd1, 0x86, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x52, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x69, 0x6e, - 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x52, 0x0a, 0x15, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xd3, 0x86, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x61, 0x74, 0x63, 0x68, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x5a, - 0x12, 0x2e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x36, 0x0a, 0x11, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x94, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x32, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x48, 0x31, 0x36, 0x30, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x8a, + 0x01, 0x0a, 0x0a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x31, 0x36, 0x30, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x42, + 0x6c, 0x6f, 0x62, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, 0x31, 0x12, 0x20, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x22, 0x49, 0x0a, 0x0d, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x22, 0xca, 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, + 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x65, 0x6e, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, + 0x6e, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x61, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x63, 0x61, 0x70, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x6f, 0x6e, + 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x69, 0x73, 0x5f, 0x69, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x6f, + 0x6e, 0x6e, 0x49, 0x73, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x63, + 0x6f, 0x6e, 0x6e, 0x5f, 0x69, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x49, 0x73, 0x54, 0x72, 0x75, 0x73, + 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x69, 0x73, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x6e, 0x49, 0x73, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x22, 0x71, 0x0a, 0x16, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x64, + 0x79, 0x56, 0x31, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, + 0x0b, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x3a, 0x52, 0x0a, 0x15, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0xd1, 0x86, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x3a, 0x52, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, + 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd2, 0x86, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x52, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd3, 0x86, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x63, + 0x68, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x5a, 0x12, 0x2e, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1546,7 +1525,7 @@ func file_types_types_proto_rawDescGZIP() []byte { } var file_types_types_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_types_types_proto_goTypes = []any{ +var file_types_types_proto_goTypes = []interface{}{ (*H128)(nil), // 0: types.H128 (*H160)(nil), // 1: types.H160 (*H256)(nil), // 2: types.H256 @@ -1589,19 +1568,18 @@ var file_types_types_proto_depIdxs = []int32{ 9, // 19: types.ExecutionPayload.withdrawal_requests:type_name -> types.WithdrawalRequest 10, // 20: types.ExecutionPayload.consolidation_requests:type_name -> types.ConsolidationRequest 2, // 21: types.DepositRequest.withdrawal_credentials:type_name -> types.H256 - 1, // 22: types.WithdrawalRequest.source_address:type_name -> types.H160 - 1, // 23: types.ConsolidationRequest.source_address:type_name -> types.H160 - 1, // 24: types.Withdrawal.address:type_name -> types.H160 - 13, // 25: types.NodeInfoReply.ports:type_name -> types.NodeInfoPorts - 11, // 26: types.ExecutionPayloadBodyV1.withdrawals:type_name -> types.Withdrawal - 17, // 27: types.service_major_version:extendee -> google.protobuf.FileOptions - 17, // 28: types.service_minor_version:extendee -> google.protobuf.FileOptions - 17, // 29: types.service_patch_version:extendee -> google.protobuf.FileOptions - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 27, // [27:30] is the sub-list for extension extendee - 0, // [0:27] is the sub-list for field type_name + 1, // 22: types.ConsolidationRequest.source_address:type_name -> types.H160 + 1, // 23: types.Withdrawal.address:type_name -> types.H160 + 13, // 24: types.NodeInfoReply.ports:type_name -> types.NodeInfoPorts + 11, // 25: types.ExecutionPayloadBodyV1.withdrawals:type_name -> types.Withdrawal + 17, // 26: types.service_major_version:extendee -> google.protobuf.FileOptions + 17, // 27: types.service_minor_version:extendee -> google.protobuf.FileOptions + 17, // 28: types.service_patch_version:extendee -> google.protobuf.FileOptions + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 26, // [26:29] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_types_types_proto_init() } @@ -1610,7 +1588,7 @@ func file_types_types_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_types_types_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*H128); i { case 0: return &v.state @@ -1622,7 +1600,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*H160); i { case 0: return &v.state @@ -1634,7 +1612,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*H256); i { case 0: return &v.state @@ -1646,7 +1624,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*H512); i { case 0: return &v.state @@ -1658,7 +1636,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*H1024); i { case 0: return &v.state @@ -1670,7 +1648,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*H2048); i { case 0: return &v.state @@ -1682,7 +1660,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VersionReply); i { case 0: return &v.state @@ -1694,7 +1672,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionPayload); i { case 0: return &v.state @@ -1706,7 +1684,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DepositRequest); i { case 0: return &v.state @@ -1718,7 +1696,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WithdrawalRequest); i { case 0: return &v.state @@ -1730,7 +1708,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConsolidationRequest); i { case 0: return &v.state @@ -1742,7 +1720,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Withdrawal); i { case 0: return &v.state @@ -1754,7 +1732,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlobsBundleV1); i { case 0: return &v.state @@ -1766,7 +1744,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeInfoPorts); i { case 0: return &v.state @@ -1778,7 +1756,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeInfoReply); i { case 0: return &v.state @@ -1790,7 +1768,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PeerInfo); i { case 0: return &v.state @@ -1802,7 +1780,7 @@ func file_types_types_proto_init() { return nil } } - file_types_types_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_types_types_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionPayloadBodyV1); i { case 0: return &v.state @@ -1815,7 +1793,7 @@ func file_types_types_proto_init() { } } } - file_types_types_proto_msgTypes[7].OneofWrappers = []any{} + file_types_types_proto_msgTypes[7].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/params/protocol_params.go b/params/protocol_params.go index 4c82c4156b4..eb2997d773e 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -193,7 +193,7 @@ var BeaconRootsAddress = common.HexToAddress("0x000F3df6D732807Ef1319fB7B8bB8522 var HistoryStorageAddress = common.HexToAddress("0x0aae40965e6800cd9b1f4b05ff21581047e3f91e") // EIP-7002: Execution layer triggerable withdrawals -var WithdrawalRequestAddress = common.HexToAddress("0x00A3ca265EBcb825B45F985A16CEFB49958cE017") +var WithdrawalRequestAddress = common.HexToAddress("0x09Fc772D0857550724b07B850a4323f39112aAaA") // EIP-7251 var ConsolidationRequestAddress = common.HexToAddress("0x00706203067988Ab3E2A2ab626EdCD6f28bDBbbb") diff --git a/tests/exec_spec_test.go b/tests/exec_spec_test.go index dd5aad899f3..974f3106c99 100644 --- a/tests/exec_spec_test.go +++ b/tests/exec_spec_test.go @@ -37,6 +37,7 @@ func TestExecutionSpec(t *testing.T) { bt.skipLoad(`^prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history.json`) bt.skipLoad(`^prague/eip7251_consolidations/`) bt.skipLoad(`^prague/eip7685_general_purpose_el_requests/`) + bt.skipLoad(`^prague/eip7002_el_triggerable_withdrawals/`) checkStateRoot := true bt.walk(t, dir, func(t *testing.T, name string, test *BlockTest) { diff --git a/turbo/engineapi/engine_types/jsonrpc.go b/turbo/engineapi/engine_types/jsonrpc.go index dde2ec5aadf..b2fa35d65a9 100644 --- a/turbo/engineapi/engine_types/jsonrpc.go +++ b/turbo/engineapi/engine_types/jsonrpc.go @@ -317,9 +317,7 @@ func ConvertWithdrawalRequestsToRpc(in []*types.WithdrawalRequest) []*types2.Wit out := make([]*types2.WithdrawalRequest, 0, len(in)) for _, w := range in { out = append(out, &types2.WithdrawalRequest{ - SourceAddress: gointerfaces.ConvertAddressToH160(w.SourceAddress), - ValidatorPubkey: w.ValidatorPubkey[:], - Amount: w.Amount, + RequestData: w.RequestData[:], }) } return out @@ -332,9 +330,7 @@ func ConvertWithdrawalRequestsFromRpc(in []*types2.WithdrawalRequest) []*types.W out := make([]*types.WithdrawalRequest, 0, len(in)) for _, w := range in { out = append(out, &types.WithdrawalRequest{ - SourceAddress: gointerfaces.ConvertH160toAddress(w.SourceAddress), - ValidatorPubkey: [48]byte(w.ValidatorPubkey), - Amount: w.Amount, + RequestData: [types.WithdrawalRequestDataLen]byte(w.RequestData), }) } return out