From 56d653aa28decdcbb94dae290936669e2b782775 Mon Sep 17 00:00:00 2001 From: lucas-dydx <76970939+lucas-dydx@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:21:28 -0500 Subject: [PATCH] enable sending BpMevMatches and ProposalReceiveTime to MEV indexer (#840) --- .../src/codegen/dydxprotocol/clob/mev.ts | 26 ++- proto/dydxprotocol/clob/mev.proto | 2 + protocol/x/clob/keeper/mev.go | 2 + protocol/x/clob/types/mev.pb.go | 182 ++++++++++++++---- 4 files changed, 169 insertions(+), 43 deletions(-) diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/mev.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/mev.ts index c40aad41ee..979d68caed 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/mev.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/mev.ts @@ -94,6 +94,8 @@ export interface ValidatorMevMatchesSDKType { export interface MevNodeToNodeMetrics { validatorMevMatches?: ValidatorMevMatches; clobMidPrices: ClobMidPrice[]; + bpMevMatches?: ValidatorMevMatches; + proposalReceiveTime: Long; } /** * MevNodeToNodeMetrics is a data structure for encapsulating all MEV node <> @@ -103,6 +105,8 @@ export interface MevNodeToNodeMetrics { export interface MevNodeToNodeMetricsSDKType { validator_mev_matches?: ValidatorMevMatchesSDKType; clob_mid_prices: ClobMidPriceSDKType[]; + bp_mev_matches?: ValidatorMevMatchesSDKType; + proposal_receive_time: Long; } function createBaseMEVMatch(): MEVMatch { @@ -448,7 +452,9 @@ export const ValidatorMevMatches = { function createBaseMevNodeToNodeMetrics(): MevNodeToNodeMetrics { return { validatorMevMatches: undefined, - clobMidPrices: [] + clobMidPrices: [], + bpMevMatches: undefined, + proposalReceiveTime: Long.UZERO }; } @@ -462,6 +468,14 @@ export const MevNodeToNodeMetrics = { ClobMidPrice.encode(v!, writer.uint32(18).fork()).ldelim(); } + if (message.bpMevMatches !== undefined) { + ValidatorMevMatches.encode(message.bpMevMatches, writer.uint32(26).fork()).ldelim(); + } + + if (!message.proposalReceiveTime.isZero()) { + writer.uint32(32).uint64(message.proposalReceiveTime); + } + return writer; }, @@ -482,6 +496,14 @@ export const MevNodeToNodeMetrics = { message.clobMidPrices.push(ClobMidPrice.decode(reader, reader.uint32())); break; + case 3: + message.bpMevMatches = ValidatorMevMatches.decode(reader, reader.uint32()); + break; + + case 4: + message.proposalReceiveTime = (reader.uint64() as Long); + break; + default: reader.skipType(tag & 7); break; @@ -495,6 +517,8 @@ export const MevNodeToNodeMetrics = { const message = createBaseMevNodeToNodeMetrics(); message.validatorMevMatches = object.validatorMevMatches !== undefined && object.validatorMevMatches !== null ? ValidatorMevMatches.fromPartial(object.validatorMevMatches) : undefined; message.clobMidPrices = object.clobMidPrices?.map(e => ClobMidPrice.fromPartial(e)) || []; + message.bpMevMatches = object.bpMevMatches !== undefined && object.bpMevMatches !== null ? ValidatorMevMatches.fromPartial(object.bpMevMatches) : undefined; + message.proposalReceiveTime = object.proposalReceiveTime !== undefined && object.proposalReceiveTime !== null ? Long.fromValue(object.proposalReceiveTime) : Long.UZERO; return message; } diff --git a/proto/dydxprotocol/clob/mev.proto b/proto/dydxprotocol/clob/mev.proto index 7671fd2792..dfd4024d1e 100644 --- a/proto/dydxprotocol/clob/mev.proto +++ b/proto/dydxprotocol/clob/mev.proto @@ -57,4 +57,6 @@ message ValidatorMevMatches { message MevNodeToNodeMetrics { ValidatorMevMatches validator_mev_matches = 1; repeated ClobMidPrice clob_mid_prices = 2 [ (gogoproto.nullable) = false ]; + ValidatorMevMatches bp_mev_matches = 3; + uint64 proposal_receive_time = 4; } diff --git a/protocol/x/clob/keeper/mev.go b/protocol/x/clob/keeper/mev.go index 870dc0e0f1..4e401aed5d 100644 --- a/protocol/x/clob/keeper/mev.go +++ b/protocol/x/clob/keeper/mev.go @@ -345,6 +345,8 @@ func (k Keeper) RecordMevMetrics( MevNodeToNode: types.MevNodeToNodeMetrics{ ValidatorMevMatches: validatorMevMatches, ClobMidPrices: mevClobMidPrices, + BpMevMatches: blockProposerMevMatches, + ProposalReceiveTime: uint64(time.Now().Second()), }, }, ) diff --git a/protocol/x/clob/types/mev.pb.go b/protocol/x/clob/types/mev.pb.go index b5aed6c386..7b3fc3001b 100644 --- a/protocol/x/clob/types/mev.pb.go +++ b/protocol/x/clob/types/mev.pb.go @@ -339,6 +339,8 @@ func (m *ValidatorMevMatches) GetLiquidationMatches() []MEVLiquidationMatch { type MevNodeToNodeMetrics struct { ValidatorMevMatches *ValidatorMevMatches `protobuf:"bytes,1,opt,name=validator_mev_matches,json=validatorMevMatches,proto3" json:"validator_mev_matches,omitempty"` ClobMidPrices []ClobMidPrice `protobuf:"bytes,2,rep,name=clob_mid_prices,json=clobMidPrices,proto3" json:"clob_mid_prices"` + BpMevMatches *ValidatorMevMatches `protobuf:"bytes,3,opt,name=bp_mev_matches,json=bpMevMatches,proto3" json:"bp_mev_matches,omitempty"` + ProposalReceiveTime uint64 `protobuf:"varint,4,opt,name=proposal_receive_time,json=proposalReceiveTime,proto3" json:"proposal_receive_time,omitempty"` } func (m *MevNodeToNodeMetrics) Reset() { *m = MevNodeToNodeMetrics{} } @@ -388,6 +390,20 @@ func (m *MevNodeToNodeMetrics) GetClobMidPrices() []ClobMidPrice { return nil } +func (m *MevNodeToNodeMetrics) GetBpMevMatches() *ValidatorMevMatches { + if m != nil { + return m.BpMevMatches + } + return nil +} + +func (m *MevNodeToNodeMetrics) GetProposalReceiveTime() uint64 { + if m != nil { + return m.ProposalReceiveTime + } + return 0 +} + func init() { proto.RegisterType((*MEVMatch)(nil), "dydxprotocol.clob.MEVMatch") proto.RegisterType((*MEVLiquidationMatch)(nil), "dydxprotocol.clob.MEVLiquidationMatch") @@ -399,48 +415,51 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/mev.proto", fileDescriptor_01e0eddc304623e6) } var fileDescriptor_01e0eddc304623e6 = []byte{ - // 651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0x4d, 0x6b, 0x13, 0x4f, - 0x1c, 0xce, 0x36, 0x7d, 0xc9, 0x7f, 0xda, 0x52, 0xfe, 0x93, 0x5a, 0xd6, 0x16, 0x92, 0x35, 0x42, - 0x89, 0x88, 0x1b, 0x51, 0xf1, 0x22, 0x08, 0xb6, 0xb6, 0x50, 0xe8, 0x6a, 0xba, 0x4a, 0x0f, 0x05, - 0x19, 0x26, 0x3b, 0x93, 0x74, 0xec, 0xce, 0xce, 0x76, 0xdf, 0x68, 0xbe, 0x85, 0x5f, 0xc5, 0xab, - 0x37, 0x6f, 0x3d, 0xf6, 0xe8, 0x49, 0xa4, 0xfd, 0x16, 0x9e, 0x64, 0x66, 0x5f, 0xb2, 0x49, 0x93, - 0x83, 0xe8, 0xc9, 0xcb, 0x32, 0xfb, 0xcc, 0x6f, 0x9e, 0xe7, 0xf7, 0xcc, 0x33, 0xfc, 0xc0, 0x16, - 0x19, 0x92, 0x0b, 0x3f, 0x10, 0x91, 0x70, 0x84, 0xdb, 0x71, 0x5c, 0xd1, 0xeb, 0x70, 0x9a, 0x98, - 0x0a, 0x81, 0xff, 0x97, 0x37, 0x4d, 0xb9, 0xb9, 0xb9, 0x3e, 0x10, 0x03, 0xa1, 0xa0, 0x8e, 0x5c, - 0xa5, 0x85, 0x9b, 0x0f, 0xc6, 0x58, 0xc2, 0xb8, 0x87, 0x1d, 0x47, 0xc4, 0x5e, 0x14, 0x96, 0xd6, - 0x59, 0xe9, 0xbd, 0xdb, 0x82, 0xf2, 0x83, 0x7c, 0xcc, 0x82, 0xb4, 0xa4, 0xf5, 0xa5, 0x0a, 0x6a, - 0xd6, 0xde, 0xb1, 0x85, 0x23, 0xe7, 0x14, 0x62, 0x70, 0x37, 0xc2, 0x67, 0x34, 0x40, 0x22, 0x20, - 0x34, 0x40, 0x23, 0x3e, 0xc4, 0x88, 0xae, 0x19, 0x5a, 0x7b, 0x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5d, 0x4f, 0xa6, 0x5c, 0x88, 0x05, 0xd6, 0x54, - 0x08, 0x9c, 0x11, 0xe4, 0xcb, 0x58, 0x72, 0x3f, 0xcd, 0x19, 0x51, 0xe4, 0xf1, 0x65, 0x46, 0x56, - 0x9d, 0x12, 0x16, 0xee, 0x74, 0x2f, 0xaf, 0x1b, 0xda, 0xd5, 0x75, 0x43, 0xfb, 0x71, 0xdd, 0xd0, - 0x3e, 0xdd, 0x34, 0x2a, 0x57, 0x37, 0x8d, 0xca, 0xb7, 0x9b, 0x46, 0xe5, 0xe4, 0xf9, 0x80, 0x45, - 0xa7, 0x71, 0xcf, 0x74, 0x04, 0xef, 0x8c, 0x4d, 0xf9, 0xe4, 0xd9, 0x23, 0xe7, 0x14, 0x33, 0xaf, - 0x53, 0x20, 0x17, 0xe9, 0xe4, 0x8f, 0x86, 0x3e, 0x0d, 0x7b, 0x8b, 0x0a, 0x7e, 0xfa, 0x2b, 0x00, - 0x00, 0xff, 0xff, 0x29, 0x71, 0x09, 0x34, 0x8c, 0x06, 0x00, 0x00, + // 696 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, + 0x18, 0x8d, 0x13, 0x7e, 0x72, 0x07, 0xb8, 0xe8, 0x4e, 0x00, 0xe5, 0x82, 0x94, 0xb8, 0xa9, 0x84, + 0x52, 0x55, 0x75, 0x2a, 0x5a, 0x75, 0x53, 0xa9, 0x52, 0xa1, 0x20, 0x21, 0xe1, 0x36, 0xb8, 0x88, + 0x05, 0x52, 0x35, 0x1a, 0x7b, 0x26, 0x61, 0x8a, 0xc7, 0x63, 0xfc, 0x27, 0xf2, 0x16, 0x7d, 0x95, + 0x6e, 0xbb, 0xed, 0x86, 0x25, 0xcb, 0xae, 0xaa, 0x0a, 0xde, 0xa2, 0xab, 0x6a, 0xfc, 0x17, 0x1b, + 0x92, 0x05,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0x5b, 0xca, 0xd5, 0x75, 0x4b, 0xf9, 0x71, 0xdd, 0x52, 0x3e, 0xdd, 0xb4, 0x2a, + 0x57, 0x37, 0xad, 0xca, 0xb7, 0x9b, 0x56, 0xe5, 0xe4, 0xc5, 0x90, 0x05, 0xa7, 0xa1, 0xa9, 0x59, + 0x82, 0xf7, 0x4a, 0xff, 0x99, 0xe8, 0xf9, 0x13, 0xeb, 0x14, 0x33, 0xa7, 0x97, 0x23, 0x17, 0xc9, + 0xbf, 0x27, 0x18, 0xb9, 0xd4, 0x37, 0xe7, 0x62, 0xf8, 0xd9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x4b, 0x24, 0x41, 0x3b, 0x0e, 0x07, 0x00, 0x00, } func (m *MEVMatch) Marshal() (dAtA []byte, err error) { @@ -712,6 +731,23 @@ func (m *MevNodeToNodeMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ProposalReceiveTime != 0 { + i = encodeVarintMev(dAtA, i, uint64(m.ProposalReceiveTime)) + i-- + dAtA[i] = 0x20 + } + if m.BpMevMatches != nil { + { + size, err := m.BpMevMatches.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMev(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if len(m.ClobMidPrices) > 0 { for iNdEx := len(m.ClobMidPrices) - 1; iNdEx >= 0; iNdEx-- { { @@ -869,6 +905,13 @@ func (m *MevNodeToNodeMetrics) Size() (n int) { n += 1 + l + sovMev(uint64(l)) } } + if m.BpMevMatches != nil { + l = m.BpMevMatches.Size() + n += 1 + l + sovMev(uint64(l)) + } + if m.ProposalReceiveTime != 0 { + n += 1 + sovMev(uint64(m.ProposalReceiveTime)) + } return n } @@ -1665,6 +1708,61 @@ func (m *MevNodeToNodeMetrics) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BpMevMatches", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMev + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BpMevMatches == nil { + m.BpMevMatches = &ValidatorMevMatches{} + } + if err := m.BpMevMatches.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalReceiveTime", wireType) + } + m.ProposalReceiveTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalReceiveTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipMev(dAtA[iNdEx:])