diff --git a/consensus/misc/eip7002.go b/consensus/misc/eip7002.go index 1d6d9a4c6bd..3f66cbd3a31 100644 --- a/consensus/misc/eip7002.go +++ b/consensus/misc/eip7002.go @@ -1,12 +1,8 @@ package misc import ( - "encoding/binary" - "github.com/ledgerwatch/log/v3" - "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon/consensus" "github.com/ledgerwatch/erigon/core/types" "github.com/ledgerwatch/erigon/params" @@ -16,93 +12,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 12e8b86d0a5..b7a54e9b935 100644 --- a/core/types/encdec_test.go +++ b/core/types/encdec_test.go @@ -11,6 +11,7 @@ import ( "github.com/holiman/uint256" libcommon "github.com/ledgerwatch/erigon-lib/common" + "github.com/ledgerwatch/erigon-lib/common/hexutility" types2 "github.com/ledgerwatch/erigon-lib/types" "github.com/ledgerwatch/erigon/rlp" ) @@ -71,9 +72,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)), } } @@ -396,9 +395,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) { @@ -599,57 +596,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 8fd00157363..6ce42c40ddb 100644 --- a/core/types/request.go +++ b/core/types/request.go @@ -15,6 +15,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 107d5afb537..6ab2f557742 100644 --- a/core/types/withdrawal_request.go +++ b/core/types/withdrawal_request.go @@ -8,24 +8,16 @@ import ( // "fmt" "io" - libcommon "github.com/ledgerwatch/erigon-lib/common" - "github.com/ledgerwatch/erigon-lib/common/hexutil" "github.com/ledgerwatch/erigon-lib/common/hexutility" - rlp2 "github.com/ledgerwatch/erigon-lib/rlp" - "github.com/ledgerwatch/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 { @@ -34,53 +26,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) } @@ -91,18 +72,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 6119dffff4f..2989efc1ed3 100644 --- a/erigon-lib/go.mod +++ b/erigon-lib/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/erigontech/mdbx-go v0.27.24 github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240805114253-42da880260bb - github.com/ledgerwatch/interfaces v0.0.0-20241002205050-75df22664246 + github.com/ledgerwatch/interfaces v0.0.0-20241024115450-4e9be51e57e7 github.com/ledgerwatch/log/v3 v3.9.0 github.com/ledgerwatch/secp256k1 v1.0.0 github.com/rs/dnscache v0.0.0-20211102005908-e0241e321417 diff --git a/erigon-lib/go.sum b/erigon-lib/go.sum index 6ab32b31dcf..572cdb10ca2 100644 --- a/erigon-lib/go.sum +++ b/erigon-lib/go.sum @@ -270,8 +270,8 @@ github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7 github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240805114253-42da880260bb h1:bsoVxjnQGxhOODRmkdrbkRTB9+sIduguoNMSZPRRoTI= github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240805114253-42da880260bb/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo= -github.com/ledgerwatch/interfaces v0.0.0-20241002205050-75df22664246 h1:EdO/Ovw2FGIaf/RSzlhL4naHAid541WQ4q2yQ+bDHOM= -github.com/ledgerwatch/interfaces v0.0.0-20241002205050-75df22664246/go.mod h1:ugQv1QllJzBny3cKZKxUrSnykkjkBgm27eQM6dnGAcc= +github.com/ledgerwatch/interfaces v0.0.0-20241024115450-4e9be51e57e7 h1:q6nNkackUuI9xbwcDdhh0ft2QJsoIVNRZe9KR08tkxU= +github.com/ledgerwatch/interfaces v0.0.0-20241024115450-4e9be51e57e7/go.mod h1:ugQv1QllJzBny3cKZKxUrSnykkjkBgm27eQM6dnGAcc= github.com/ledgerwatch/log/v3 v3.9.0 h1:iDwrXe0PVwBC68Dd94YSsHbMgQ3ufsgjzXtFNFVZFRk= github.com/ledgerwatch/log/v3 v3.9.0/go.mod h1:EiAY6upmI/6LkNhOVxb4eVsmsP11HZCnZ3PlJMjYiqE= github.com/ledgerwatch/secp256k1 v1.0.0 h1:Usvz87YoTG0uePIV8woOof5cQnLXGYa162rFf3YnwaQ= diff --git a/erigon-lib/gointerfaces/types/types.pb.go b/erigon-lib/gointerfaces/types/types.pb.go index c5ca7b4f8e3..818d8340ca3 100644 --- a/erigon-lib/gointerfaces/types/types.pb.go +++ b/erigon-lib/gointerfaces/types/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, 0x0f, 0x5a, - 0x0d, 0x2e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 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, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -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() } diff --git a/params/protocol_params.go b/params/protocol_params.go index 59704b51ec8..45ef1f62945 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -190,7 +190,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 5e1e774a9de..b567babbed8 100644 --- a/tests/exec_spec_test.go +++ b/tests/exec_spec_test.go @@ -26,6 +26,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 8a2b99df609..87d1f33235a 100644 --- a/turbo/engineapi/engine_types/jsonrpc.go +++ b/turbo/engineapi/engine_types/jsonrpc.go @@ -301,9 +301,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 @@ -316,9 +314,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