diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000000..335e25241c --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,14 @@ +# The version of the generation template (required). +# The only currently-valid value is v1beta1. +version: v1beta1 + +# The plugins to run. +plugins: + # The name of the plugin. + - name: gogofaster + # The directory where the generated proto output will be written. + # The directory is relative to where the generation tool was run. + out: proto + # Set options to assign import paths to the well-known types + # and to enable service generation. + opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,plugins=grpc,paths=source_relative diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 047e6d179f..9f8b46ffab 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -605,9 +605,9 @@ func (mem *CListMempool) Update( // https://github.com/tendermint/tendermint/issues/3322. if e, ok := mem.txsMap.Load(TxKey(tx)); ok { mem.removeTx(tx, e.(*clist.CElement), false) - // see if the transaction is a child transaction of a some parent + // see if the transaction is a malleated transaction of a some parent // transaction that exists in the mempool - } else if parentHash, _, isChild := types.DecodeChildTx(tx); isChild { + } else if parentHash, _, isMalleated := types.UnwrapMalleatedTx(tx); isMalleated { var parentKey [TxKeySize]byte copy(parentKey[:], parentHash) mem.RemoveTxByKey(parentKey, false) diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index a37c40d37c..29152c64d3 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -215,22 +215,22 @@ func TestMempoolUpdate(t *testing.T) { require.NoError(t, err) } - // 4. Removes a parent transaction after receiving a child transaction in the update + // 4. Removes a original transaction after receiving a malleated transaction in the update { mempool.Flush() - parentTx := []byte{1, 2, 3, 4} - childTx := []byte{1, 2} - parentHash := sha256.Sum256(parentTx) + originalTx := []byte{1, 2, 3, 4} + malleated := []byte{1, 2} + originalHash := sha256.Sum256(originalTx) - // create the wrapped child transaction - wTx, err := types.WrapChildTx(parentHash[:], childTx) + // create the wrapped malleated transaction + wTx, err := types.WrapMalleatedTx(originalHash[:], malleated) require.NoError(t, err) - // add the parent transaction to the mempool - err = mempool.CheckTx(parentTx, nil, TxInfo{}) + // add the original transaction to the mempool + err = mempool.CheckTx(originalTx, nil, TxInfo{}) require.NoError(t, err) - // remove the parent from the mempool using the wrapped child tx + // remove the original from the mempool using the wrapped malleated tx err = mempool.Update(1, []types.Tx{wTx}, abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index 7f12c7bf96..1e27451526 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -1540,25 +1540,26 @@ func (m *TxProof) GetProof() *crypto.Proof { return nil } -// ChildTx wraps a transaction that was derived from a parent transaction. This -// allows for removal of the parent transaction from the mempool. -type ChildTx struct { - ParentTxHash []byte `protobuf:"bytes,1,opt,name=parent_tx_hash,json=parentTxHash,proto3" json:"parent_tx_hash,omitempty"` - Tx []byte `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (m *ChildTx) Reset() { *m = ChildTx{} } -func (m *ChildTx) String() string { return proto.CompactTextString(m) } -func (*ChildTx) ProtoMessage() {} -func (*ChildTx) Descriptor() ([]byte, []int) { +// MalleatedTx wraps a transaction that was derived from a different original +// transaction. This allows for tendermint to track malleated and original +// transactions +type MalleatedTx struct { + OriginalTxHash []byte `protobuf:"bytes,1,opt,name=original_tx_hash,json=originalTxHash,proto3" json:"original_tx_hash,omitempty"` + Tx []byte `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"` +} + +func (m *MalleatedTx) Reset() { *m = MalleatedTx{} } +func (m *MalleatedTx) String() string { return proto.CompactTextString(m) } +func (*MalleatedTx) ProtoMessage() {} +func (*MalleatedTx) Descriptor() ([]byte, []int) { return fileDescriptor_d3a6e55e2345de56, []int{21} } -func (m *ChildTx) XXX_Unmarshal(b []byte) error { +func (m *MalleatedTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ChildTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MalleatedTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ChildTx.Marshal(b, m, deterministic) + return xxx_messageInfo_MalleatedTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1568,26 +1569,26 @@ func (m *ChildTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *ChildTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChildTx.Merge(m, src) +func (m *MalleatedTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MalleatedTx.Merge(m, src) } -func (m *ChildTx) XXX_Size() int { +func (m *MalleatedTx) XXX_Size() int { return m.Size() } -func (m *ChildTx) XXX_DiscardUnknown() { - xxx_messageInfo_ChildTx.DiscardUnknown(m) +func (m *MalleatedTx) XXX_DiscardUnknown() { + xxx_messageInfo_MalleatedTx.DiscardUnknown(m) } -var xxx_messageInfo_ChildTx proto.InternalMessageInfo +var xxx_messageInfo_MalleatedTx proto.InternalMessageInfo -func (m *ChildTx) GetParentTxHash() []byte { +func (m *MalleatedTx) GetOriginalTxHash() []byte { if m != nil { - return m.ParentTxHash + return m.OriginalTxHash } return nil } -func (m *ChildTx) GetTx() []byte { +func (m *MalleatedTx) GetTx() []byte { if m != nil { return m.Tx } @@ -1618,127 +1619,127 @@ func init() { proto.RegisterType((*LightBlock)(nil), "tendermint.types.LightBlock") proto.RegisterType((*BlockMeta)(nil), "tendermint.types.BlockMeta") proto.RegisterType((*TxProof)(nil), "tendermint.types.TxProof") - proto.RegisterType((*ChildTx)(nil), "tendermint.types.ChildTx") + proto.RegisterType((*MalleatedTx)(nil), "tendermint.types.MalleatedTx") } func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } var fileDescriptor_d3a6e55e2345de56 = []byte{ - // 1816 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x73, 0x1a, 0xd9, - 0x15, 0x56, 0x03, 0x12, 0x70, 0x00, 0x09, 0x75, 0x64, 0x19, 0x61, 0x1b, 0x91, 0xce, 0x63, 0x34, - 0x8f, 0x20, 0xc7, 0x93, 0xca, 0xa3, 0x2a, 0x99, 0x0c, 0x20, 0x8d, 0x45, 0x46, 0x42, 0xa4, 0x61, - 0x9c, 0xc7, 0xa6, 0xeb, 0x42, 0x5f, 0x43, 0xc7, 0x4d, 0xdf, 0xae, 0xbe, 0x17, 0x19, 0x79, 0x99, - 0x55, 0x4a, 0x2b, 0xaf, 0xb2, 0xd3, 0x2a, 0x59, 0x64, 0x9f, 0x3f, 0x90, 0xca, 0x6a, 0x36, 0xa9, - 0x9a, 0x5d, 0xb2, 0xc9, 0x24, 0x65, 0xa7, 0x52, 0xf9, 0x19, 0xa9, 0xfb, 0xe8, 0xa6, 0x11, 0xe0, - 0xb8, 0x5c, 0xae, 0x6c, 0xa8, 0xee, 0x73, 0xbe, 0x73, 0xef, 0x79, 0x9f, 0xd3, 0xc0, 0x5d, 0x86, - 0x3d, 0x1b, 0x07, 0x63, 0xc7, 0x63, 0x87, 0xec, 0xd2, 0xc7, 0x54, 0xfe, 0xd6, 0xfc, 0x80, 0x30, - 0xa2, 0x17, 0x67, 0xdc, 0x9a, 0xa0, 0x97, 0x77, 0x86, 0x64, 0x48, 0x04, 0xf3, 0x90, 0x3f, 0x49, - 0x5c, 0x79, 0x7f, 0x48, 0xc8, 0xd0, 0xc5, 0x87, 0xe2, 0xad, 0x3f, 0x79, 0x7c, 0xc8, 0x9c, 0x31, - 0xa6, 0x0c, 0x8d, 0x7d, 0x05, 0xb8, 0x17, 0xbb, 0x66, 0x10, 0x5c, 0xfa, 0x8c, 0x70, 0x2c, 0x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 0x32, 0xc8, - 0xf7, 0x25, 0x20, 0x27, 0x00, 0x69, 0xe4, 0xfb, 0x82, 0xf5, 0x1e, 0x6c, 0x0b, 0x1b, 0x03, 0x4c, - 0x27, 0x2e, 0x53, 0x87, 0xe4, 0x05, 0x66, 0x8b, 0x33, 0x4c, 0x49, 0x17, 0xd8, 0xaf, 0x41, 0x01, - 0x5f, 0x38, 0x36, 0xf6, 0x06, 0x58, 0xe2, 0x0a, 0x02, 0x97, 0x0f, 0x89, 0x02, 0xf4, 0x2e, 0x14, - 0xfd, 0x80, 0xf8, 0x84, 0xe2, 0xc0, 0x42, 0xb6, 0x1d, 0x60, 0x4a, 0x4b, 0x9b, 0xf2, 0xbc, 0x90, - 0x5e, 0x97, 0x64, 0xe3, 0xd7, 0x09, 0x48, 0x1d, 0x21, 0x86, 0xf4, 0x22, 0x24, 0xd9, 0x94, 0x96, - 0xb4, 0x6a, 0xf2, 0x20, 0x6f, 0xf2, 0x47, 0x7d, 0x04, 0x25, 0xc7, 0x63, 0x38, 0x18, 0x63, 0xdb, - 0x41, 0x0c, 0x5b, 0x94, 0xf1, 0xdf, 0x80, 0x10, 0x46, 0x55, 0x6e, 0x1f, 0x2c, 0x86, 0xb2, 0x15, - 0x93, 0xe8, 0x72, 0x01, 0x93, 0xe3, 0x55, 0x64, 0x77, 0x9d, 0xa5, 0x5c, 0xfd, 0x63, 0xc8, 0x84, - 0xfa, 0xab, 0xa2, 0xac, 0x2c, 0x9e, 0x7c, 0xac, 0x10, 0xa7, 0x0e, 0x65, 0xea, 0xbc, 0x48, 0x4a, - 0xff, 0x21, 0x64, 0xc6, 0x98, 0x52, 0x34, 0xc4, 0x34, 0xca, 0xd4, 0x85, 0x13, 0xce, 0x14, 0x22, - 0x94, 0x0e, 0x25, 0x8c, 0xe7, 0x09, 0xb8, 0x75, 0x34, 0xf1, 0x5d, 0x67, 0x80, 0x18, 0x7e, 0x44, - 0x18, 0x0e, 0xef, 0xd2, 0xbf, 0x05, 0x1b, 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0x00, 0x00, + // 1821 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x73, 0x1a, 0xc9, + 0x19, 0xd7, 0x00, 0x12, 0xf0, 0x01, 0x12, 0xea, 0xc8, 0x32, 0xc2, 0x36, 0x22, 0xe4, 0xb1, 0xda, + 0x47, 0x90, 0xe3, 0x4d, 0xe5, 0x51, 0x95, 0x6c, 0x2d, 0x48, 0x5a, 0x8b, 0xac, 0x1e, 0x64, 0x60, + 0x9d, 0xc7, 0x65, 0xaa, 0x61, 0xda, 0x30, 0xf1, 0x30, 0x3d, 0x35, 0xdd, 0xc8, 0xc8, 0xc7, 0x9c, + 0x52, 0x3a, 0xf9, 0x94, 0x9b, 0x4e, 0xc9, 0x21, 0xf7, 0xfc, 0x03, 0xa9, 0x9c, 0xf6, 0x92, 0xaa, + 0xbd, 0x25, 0x97, 0x6c, 0x52, 0x76, 0x2a, 0x95, 0x3f, 0x23, 0xd5, 0x8f, 0x19, 0x06, 0x01, 0x8e, + 0xcb, 0xe5, 0xda, 0x0b, 0x35, 0xfd, 0x7d, 0xbf, 0xaf, 0xfb, 0x7b, 0xf7, 0xd7, 0xc0, 0x5d, 0x4e, + 0x3c, 0x9b, 0x04, 0x23, 0xc7, 0xe3, 0xfb, 0xfc, 0xd2, 0x27, 0x4c, 0xfd, 0xd6, 0xfd, 0x80, 0x72, + 0x8a, 0x8a, 0x53, 0x6e, 0x5d, 0xd2, 0xcb, 0x5b, 0x03, 0x3a, 0xa0, 0x92, 0xb9, 0x2f, 0xbe, 0x14, + 0xae, 0xbc, 0x3b, 0xa0, 0x74, 0xe0, 0x92, 0x7d, 0xb9, 0xea, 0x8d, 0x1f, 0xef, 0x73, 0x67, 0x44, + 0x18, 0xc7, 0x23, 0x5f, 0x03, 0xee, 0xc5, 0x8e, 0xe9, 0x07, 0x97, 0x3e, 0xa7, 0x02, 0x4b, 0x1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ec, 0xfb, + 0x0a, 0x90, 0x93, 0x80, 0x34, 0xf6, 0x7d, 0xc9, 0x7a, 0x0f, 0x36, 0xa5, 0x8d, 0x01, 0x61, 0x63, + 0x97, 0xeb, 0x4d, 0xf2, 0x12, 0xb3, 0x21, 0x18, 0xa6, 0xa2, 0x4b, 0xec, 0x37, 0xa0, 0x40, 0x2e, + 0x1c, 0x9b, 0x78, 0x7d, 0xa2, 0x70, 0x05, 0x89, 0xcb, 0x87, 0x44, 0x09, 0x7a, 0x17, 0x8a, 0x7e, + 0x40, 0x7d, 0xca, 0x48, 0x60, 0x61, 0xdb, 0x0e, 0x08, 0x63, 0xa5, 0x75, 0xb5, 0x5f, 0x48, 0x6f, + 0x28, 0x72, 0xed, 0x37, 0x09, 0x48, 0x1d, 0x62, 0x8e, 0x51, 0x11, 0x92, 0x7c, 0xc2, 0x4a, 0x46, + 0x35, 0xb9, 0x97, 0x37, 0xc5, 0x27, 0x1a, 0x42, 0xc9, 0xf1, 0x38, 0x09, 0x46, 0xc4, 0x76, 0x30, + 0x27, 0x16, 0xe3, 0xe2, 0x37, 0xa0, 0x94, 0x33, 0x9d, 0xdb, 0x7b, 0xf3, 0xa1, 0x6c, 0xc5, 0x24, + 0x3a, 0x42, 0xc0, 0x14, 0x78, 0x1d, 0xd9, 0x6d, 0x67, 0x21, 0x17, 0x7d, 0x0c, 0x99, 0x50, 0x7f, + 0x5d, 0x94, 0x95, 0xf9, 0x9d, 0x8f, 0x34, 0xe2, 0xc4, 0x61, 0x5c, 0xef, 0x17, 0x49, 0xa1, 0x1f, + 0x43, 0x66, 0x44, 0x18, 0xc3, 0x03, 0xc2, 0xa2, 0x4c, 0x9d, 0xdb, 0xe1, 0x54, 0x23, 0x42, 0xe9, + 0x50, 0xa2, 0xf6, 0x3c, 0x01, 0xb7, 0x0e, 0xc7, 0xbe, 0xeb, 0xf4, 0x31, 0x27, 0x8f, 0x28, 0x27, + 0xe1, 0x59, 0xe8, 0x3b, 0xb0, 0x76, 0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0xe3, 0x12, 0x00, 0x00, } func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { @@ -2885,7 +2886,7 @@ func (m *TxProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ChildTx) Marshal() (dAtA []byte, err error) { +func (m *MalleatedTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2895,12 +2896,12 @@ func (m *ChildTx) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ChildTx) MarshalTo(dAtA []byte) (int, error) { +func (m *MalleatedTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ChildTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MalleatedTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2912,10 +2913,10 @@ func (m *ChildTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.ParentTxHash) > 0 { - i -= len(m.ParentTxHash) - copy(dAtA[i:], m.ParentTxHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ParentTxHash))) + if len(m.OriginalTxHash) > 0 { + i -= len(m.OriginalTxHash) + copy(dAtA[i:], m.OriginalTxHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginalTxHash))) i-- dAtA[i] = 0xa } @@ -3413,13 +3414,13 @@ func (m *TxProof) Size() (n int) { return n } -func (m *ChildTx) Size() (n int) { +func (m *MalleatedTx) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.ParentTxHash) + l = len(m.OriginalTxHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } @@ -6828,7 +6829,7 @@ func (m *TxProof) Unmarshal(dAtA []byte) error { } return nil } -func (m *ChildTx) Unmarshal(dAtA []byte) error { +func (m *MalleatedTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6851,15 +6852,15 @@ func (m *ChildTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ChildTx: wiretype end group for non-group") + return fmt.Errorf("proto: MalleatedTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ChildTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MalleatedTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentTxHash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OriginalTxHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -6886,9 +6887,9 @@ func (m *ChildTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ParentTxHash = append(m.ParentTxHash[:0], dAtA[iNdEx:postIndex]...) - if m.ParentTxHash == nil { - m.ParentTxHash = []byte{} + m.OriginalTxHash = append(m.OriginalTxHash[:0], dAtA[iNdEx:postIndex]...) + if m.OriginalTxHash == nil { + m.OriginalTxHash = []byte{} } iNdEx = postIndex case 2: diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 635641af7f..332389a192 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -220,9 +220,10 @@ message TxProof { tendermint.crypto.Proof proof = 3; } -// ChildTx wraps a transaction that was derived from a parent transaction. This -// allows for removal of the parent transaction from the mempool. -message ChildTx { - bytes parent_tx_hash = 1; +// MalleatedTx wraps a transaction that was derived from a different original +// transaction. This allows for tendermint to track malleated and original +// transactions +message MalleatedTx { + bytes original_tx_hash = 1; bytes tx = 2; } diff --git a/types/event_bus.go b/types/event_bus.go index 72ba5e3d67..31a9332111 100644 --- a/types/event_bus.go +++ b/types/event_bus.go @@ -177,11 +177,19 @@ func (b *EventBus) PublishEventTx(data EventDataTx) error { // no explicit deadline for publishing events ctx := context.Background() + var txHash []byte + if originalHash, malleated, ismalleated := UnwrapMalleatedTx(data.Tx); ismalleated { + txHash = originalHash + data.Tx = malleated + } else { + txHash = Tx(data.Tx).Hash() + } + events := b.validateAndStringifyEvents(data.Result.Events, b.Logger.With("tx", data.Tx)) // add predefined compositeKeys events[EventTypeKey] = append(events[EventTypeKey], EventTx) - events[TxHashKey] = append(events[TxHashKey], fmt.Sprintf("%X", Tx(data.Tx).Hash())) + events[TxHashKey] = append(events[TxHashKey], fmt.Sprintf("%X", txHash)) events[TxHeightKey] = append(events[TxHeightKey], fmt.Sprintf("%d", data.Height)) return b.pubsub.PublishWithEvents(ctx, data, events) diff --git a/types/event_bus_test.go b/types/event_bus_test.go index 51229beed4..14feb471c8 100644 --- a/types/event_bus_test.go +++ b/types/event_bus_test.go @@ -65,6 +65,59 @@ func TestEventBusPublishEventTx(t *testing.T) { } } +func TestEventBusPublishEventMalleatedTx(t *testing.T) { + eventBus := NewEventBus() + err := eventBus.Start() + require.NoError(t, err) + t.Cleanup(func() { + if err := eventBus.Stop(); err != nil { + t.Error(err) + } + }) + + tx := Tx("foo") + malleatedTx := Tx("foo-malleated") + wrappedMalleatedTx, err := WrapMalleatedTx(tx.Hash(), malleatedTx) + require.NoError(t, err) + + result := abci.ResponseDeliverTx{ + Data: []byte("bar"), + Events: []abci.Event{ + {Type: "testType", Attributes: []abci.EventAttribute{{Key: []byte("baz"), Value: []byte("1")}}}, + }, + } + + // PublishEventTx adds 3 composite keys, so the query below should work + query := fmt.Sprintf("tm.event='Tx' AND tx.height=1 AND tx.hash='%X' AND testType.baz=1", tx.Hash()) + txsSub, err := eventBus.Subscribe(context.Background(), "test", tmquery.MustParse(query)) + require.NoError(t, err) + + done := make(chan struct{}) + go func() { + msg := <-txsSub.Out() + edt := msg.Data().(EventDataTx) + assert.Equal(t, int64(1), edt.Height) + assert.Equal(t, uint32(0), edt.Index) + assert.EqualValues(t, malleatedTx, edt.Tx) + assert.Equal(t, result, edt.Result) + close(done) + }() + + err = eventBus.PublishEventTx(EventDataTx{abci.TxResult{ + Height: 1, + Index: 0, + Tx: wrappedMalleatedTx, + Result: result, + }}) + assert.NoError(t, err) + + select { + case <-done: + case <-time.After(1 * time.Second): + t.Fatal("did not receive a transaction after 1 sec.") + } +} + func TestEventBusPublishEventNewBlock(t *testing.T) { eventBus := NewEventBus() err := eventBus.Start() @@ -93,28 +146,21 @@ func TestEventBusPublishEventNewBlock(t *testing.T) { blocksSub, err := eventBus.Subscribe(context.Background(), "test", tmquery.MustParse(query)) require.NoError(t, err) - done := make(chan struct{}) - go func() { - msg := <-blocksSub.Out() - edt := msg.Data().(EventDataNewBlock) - assert.Equal(t, block, edt.Block) - assert.Equal(t, resultBeginBlock, edt.ResultBeginBlock) - assert.Equal(t, resultEndBlock, edt.ResultEndBlock) - close(done) - }() - err = eventBus.PublishEventNewBlock(EventDataNewBlock{ Block: block, ResultBeginBlock: resultBeginBlock, ResultEndBlock: resultEndBlock, }) - assert.NoError(t, err) - select { - case <-done: - case <-time.After(1 * time.Second): - t.Fatal("did not receive a block after 1 sec.") - } + done := make(chan struct{}) + // go func() { + msg := <-blocksSub.Out() + edt := msg.Data().(EventDataNewBlock) + assert.Equal(t, block, edt.Block) + assert.Equal(t, resultBeginBlock, edt.ResultBeginBlock) + assert.Equal(t, resultEndBlock, edt.ResultEndBlock) + close(done) + assert.NoError(t, err) } func TestEventBusPublishEventTxDuplicateKeys(t *testing.T) { diff --git a/types/tx.go b/types/tx.go index 98cd17bdbf..2bbfb5e5ad 100644 --- a/types/tx.go +++ b/types/tx.go @@ -161,38 +161,39 @@ func ComputeProtoSizeForTxs(txs []Tx) int64 { return int64(pdData.Size()) } -// DecodeChildTx attempts to unmarshal the provided transaction into a child -// transaction wrapper, if this an be done, then it returns true. A child -// transaction is a normal transaction that has been derived from a different -// parent transaction. The returned hash is that of the parent transaction, -// which allows us to remove the parent transaction from the mempool. NOTE: -// protobuf sometimes does not throw an error if the transaction passed is not -// a tmproto.ChildTx, since the schema for PayForMessage is kept in the app, we -// cannot perform further checks without creating an import cycle. -func DecodeChildTx(tx Tx) (hash []byte, unwrapped Tx, has bool) { - // attempt to unmarshal into a a child transaction - var childTx tmproto.ChildTx - err := proto.Unmarshal(tx, &childTx) +// UnwrapMalleatedTx attempts to unmarshal the provided transaction into a malleated +// transaction wrapper, if this an be done, then it returns true. A malleated +// transaction is a normal transaction that has been derived (malleated) from a +// different original transaction. The returned hash is that of the original +// transaction, which allows us to remove the original transaction from the +// mempool. NOTE: protobuf sometimes does not throw an error if the transaction +// passed is not a tmproto.MalleatedTx, since the schema for PayForMessage is kept +// in the app, we cannot perform further checks without creating an import +// cycle. +func UnwrapMalleatedTx(tx Tx) (originalHash []byte, unwrapped Tx, isMalleated bool) { + // attempt to unmarshal into a a malleated transaction + var malleatedTx tmproto.MalleatedTx + err := proto.Unmarshal(tx, &malleatedTx) if err != nil { return nil, nil, false } // this check will fail to catch unwanted types should those unmarshalled // types happen to have a hash sized slice of bytes in the same field number - // as ParentTxHash. TODO(evan): either fix this, or better yet use a different + // as originalTxHash. TODO(evan): either fix this, or better yet use a different // mechanism - if len(childTx.ParentTxHash) != tmhash.Size { + if len(malleatedTx.OriginalTxHash) != tmhash.Size { return nil, nil, false } - return childTx.ParentTxHash, childTx.Tx, true + return malleatedTx.OriginalTxHash, malleatedTx.Tx, true } -// WrapChildTx creates a wrapped Tx that includes the parent transaction's hash +// WrapMalleatedTx creates a wrapped Tx that includes the original transaction's hash // so that it can be easily removed from the mempool. note: must be unwrapped to // be a viable sdk.Tx -func WrapChildTx(parentHash []byte, child Tx) (Tx, error) { - wTx := tmproto.ChildTx{ - ParentTxHash: parentHash, - Tx: child, +func WrapMalleatedTx(originalHash []byte, malleated Tx) (Tx, error) { + wTx := tmproto.MalleatedTx{ + OriginalTxHash: originalHash, + Tx: malleated, } return proto.Marshal(&wTx) } diff --git a/types/tx_test.go b/types/tx_test.go index dde2eee2d4..21e10eddea 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -151,11 +151,11 @@ func assertBadProof(t *testing.T, root []byte, bad []byte, good TxProof) { } } -func TestDecodeChildTx(t *testing.T) { +func TestUnwrapMalleatedTx(t *testing.T) { // perform a simple test for being unable to decode a non - // child transaction + // malleated transaction tx := Tx{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0} - _, _, ok := DecodeChildTx(tx) + _, _, ok := UnwrapMalleatedTx(tx) require.False(t, ok) // create a proto message that used to be decoded when it shouldn't have @@ -181,15 +181,15 @@ func TestDecodeChildTx(t *testing.T) { // due to protobuf not actually requiring type compatibility // we need to make sure that there is some check - _, _, ok = DecodeChildTx(rawBlock) + _, _, ok = UnwrapMalleatedTx(rawBlock) require.False(t, ok) pHash := sha256.Sum256(rawBlock) - childTx, err := WrapChildTx(pHash[:], rawBlock) + MalleatedTx, err := WrapMalleatedTx(pHash[:], rawBlock) require.NoError(t, err) // finally, ensure that the unwrapped bytes are identical to the input - unwrappedHash, unwrapped, ok := DecodeChildTx(childTx) + unwrappedHash, unwrapped, ok := UnwrapMalleatedTx(MalleatedTx) require.True(t, ok) assert.Equal(t, 32, len(unwrappedHash)) require.Equal(t, rawBlock, []byte(unwrapped))