From 60930abb43458e1f8b321d1eb9e5d6b174975e35 Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Thu, 18 Aug 2022 09:39:33 -0500 Subject: [PATCH] feat: add share index to malleated (wrapped) txs (#819) * feat: add share index to malleated (wrapped) txs pass the share index when wrapping * chore: refactor unrwap function to return the entire malleated tx * fix compile issue --- mempool/v0/clist_mempool.go | 4 +- mempool/v1/mempool.go | 4 +- mempool/v1/mempool_test.go | 2 +- proto/tendermint/types/types.pb.go | 260 ++++++++++++++++------------- proto/tendermint/types/types.proto | 1 + state/execution.go | 6 +- types/tx.go | 12 +- types/tx_test.go | 12 +- 8 files changed, 169 insertions(+), 132 deletions(-) diff --git a/mempool/v0/clist_mempool.go b/mempool/v0/clist_mempool.go index 2d866e5013..05d06946b7 100644 --- a/mempool/v0/clist_mempool.go +++ b/mempool/v0/clist_mempool.go @@ -616,9 +616,9 @@ func (mem *CListMempool) Update( mem.removeTx(tx, e.(*clist.CElement), false) // see if the transaction is a malleated transaction of a some parent // transaction that exists in the mempool - } else if parentHash, _, isMalleated := types.UnwrapMalleatedTx(tx); isMalleated { + } else if malleatedTx, isMalleated := types.UnwrapMalleatedTx(tx); isMalleated { var parentKey [types.TxKeySize]byte - copy(parentKey[:], parentHash) + copy(parentKey[:], malleatedTx.OriginalTxHash) err := mem.RemoveTxByKey(parentKey) if err != nil { return err diff --git a/mempool/v1/mempool.go b/mempool/v1/mempool.go index ee752d78ca..fdb56d6858 100644 --- a/mempool/v1/mempool.go +++ b/mempool/v1/mempool.go @@ -406,8 +406,8 @@ func (txmp *TxMempool) Update( // Regardless of outcome, remove the transaction from the mempool. if err := txmp.removeTxByKey(originalKey); err != nil { - if originalHash, _, isMalleated := types.UnwrapMalleatedTx(tx); isMalleated { - copy(originalKey[:], originalHash) + if malleatedTx, isMalleated := types.UnwrapMalleatedTx(tx); isMalleated { + copy(originalKey[:], malleatedTx.OriginalTxHash) _ = txmp.removeTxByKey(originalKey) } } diff --git a/mempool/v1/mempool_test.go b/mempool/v1/mempool_test.go index f7b840f4cb..3d23d540c2 100644 --- a/mempool/v1/mempool_test.go +++ b/mempool/v1/mempool_test.go @@ -661,7 +661,7 @@ func TestMalleatedTxRemoval(t *testing.T) { originalHash := sha256.Sum256(originalTx) // create the wrapped child transaction - wTx, err := types.WrapMalleatedTx(originalHash[:], malleatedTx) + wTx, err := types.WrapMalleatedTx(originalHash[:], 0, malleatedTx) require.NoError(t, err) // add the parent transaction to the mempool diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index c2dee0e75f..d569e81f69 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -1511,6 +1511,7 @@ func (m *TxProof) GetProofs() []*NMTProof { 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"` + ShareIndex uint32 `protobuf:"varint,3,opt,name=share_index,json=shareIndex,proto3" json:"share_index,omitempty"` } func (m *MalleatedTx) Reset() { *m = MalleatedTx{} } @@ -1560,6 +1561,13 @@ func (m *MalleatedTx) GetTx() []byte { return nil } +func (m *MalleatedTx) GetShareIndex() uint32 { + if m != nil { + return m.ShareIndex + } + return 0 +} + // Proof represents proof of a namespace.ID in an NMT. // In case this proof proves the absence of a namespace.ID // in a tree it also contains the leaf hashes of the range @@ -1673,123 +1681,124 @@ func init() { func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } var fileDescriptor_d3a6e55e2345de56 = []byte{ - // 1842 bytes of a gzipped FileDescriptorProto + // 1859 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x73, 0x1b, 0x49, - 0x15, 0xf7, 0x48, 0xb2, 0x3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, 0x51, 0xb2, 0xea, 0x87, 0xae, 0x13, 0x50, 0x27, 0x98, 0x04, 0x72, 0xbf, 0x50, 0x46, 0xfd, - 0x16, 0x64, 0x87, 0x17, 0xc4, 0x72, 0x0c, 0xcb, 0x44, 0x8d, 0x72, 0xcd, 0xfc, 0xab, 0x97, 0xbb, - 0x99, 0x43, 0x4e, 0x6b, 0x1d, 0xe9, 0x19, 0x64, 0xb6, 0x4c, 0xf5, 0x2e, 0xa4, 0x2f, 0xa8, 0x35, - 0xba, 0x60, 0x68, 0x96, 0xa4, 0x2e, 0x57, 0xea, 0x0f, 0x20, 0xc5, 0x03, 0xa2, 0x9c, 0xc2, 0xb3, - 0x2b, 0x75, 0x11, 0x2d, 0xf5, 0x30, 0x5a, 0xea, 0xfd, 0x30, 0x5a, 0x9a, 0x59, 0x7e, 0xf0, 0x8b, - 0x7f, 0xec, 0x2a, 0x3a, 0x4a, 0xa8, 0x87, 0x50, 0xb4, 0x49, 0xc0, 0x8c, 0x01, 0x37, 0x1b, 0x3f, - 0x7e, 0x1d, 0xb7, 0xd8, 0x59, 0x34, 0x88, 0x34, 0xac, 0x54, 0x3d, 0xcf, 0xa5, 0x04, 0xc9, 0x54, - 0xf7, 0xa0, 0x84, 0x9b, 0x0c, 0xdd, 0xf1, 0xd8, 0x62, 0x06, 0xda, 0x3d, 0x8d, 0x76, 0xdf, 0xe0, - 0xf4, 0x43, 0x24, 0x9f, 0x70, 0x0f, 0xdc, 0x87, 0x9c, 0x49, 0x18, 0x11, 0x90, 0x0c, 0x42, 0xb2, - 0x9c, 0x80, 0xcc, 0xf7, 0x60, 0x33, 0x8a, 0xba, 0x40, 0x40, 0xb2, 0x62, 0x97, 0x19, 0x19, 0x81, - 0x8f, 0x60, 0xdb, 0xa1, 0x53, 0x66, 0xdc, 0x46, 0xe7, 0x10, 0xad, 0x72, 0xde, 0x93, 0x79, 0x89, - 0x6f, 0xc2, 0xc6, 0x30, 0x34, 0xbe, 0xc0, 0x02, 0x62, 0x8b, 0x11, 0x15, 0x61, 0x3b, 0x90, 0x25, - 0x9e, 0x27, 0x00, 0x79, 0x04, 0x64, 0x88, 0xe7, 0x21, 0xeb, 0x03, 0xd8, 0xc2, 0x3b, 0xfa, 0x34, - 0x98, 0xd8, 0x4c, 0x6e, 0x52, 0x40, 0xcc, 0x26, 0x67, 0xe8, 0x82, 0x8e, 0xd8, 0x6f, 0x40, 0x91, - 0x5e, 0x5a, 0x26, 0x75, 0x86, 0x54, 0xe0, 0x8a, 0x88, 0x2b, 0x84, 0x44, 0x04, 0xbd, 0x0f, 0x25, - 0xcf, 0x77, 0x3d, 0x37, 0xa0, 0xbe, 0x41, 0x4c, 0xd3, 0xa7, 0x41, 0x50, 0xde, 0x10, 0xfb, 0x85, - 0xf4, 0x86, 0x20, 0x6b, 0x2f, 0x15, 0x48, 0x1d, 0x11, 0x46, 0xd4, 0x12, 0x24, 0xd9, 0x34, 0x28, - 0x2b, 0xb5, 0xe4, 0x5e, 0x41, 0xe7, 0x9f, 0xea, 0x27, 0x90, 0x0d, 0x77, 0x95, 0xa9, 0x52, 0x5d, - 0x74, 0xdd, 0xb1, 0x44, 0x9c, 0x5a, 0x01, 0x93, 0xfe, 0x8b, 0xa4, 0xd4, 0x1f, 0x41, 0x76, 0x4c, - 0x83, 0x80, 0x8c, 0x68, 0x10, 0xc5, 0xcf, 0xc2, 0x0e, 0x6d, 0x89, 0x08, 0xa5, 0x43, 0x09, 0xee, - 0x0a, 0xd7, 0xb7, 0x46, 0x96, 0x43, 0x6c, 0x23, 0xf8, 0xf5, 0x84, 0xf8, 0xd4, 0x08, 0xac, 0xe7, - 0x14, 0xc3, 0x28, 0xa5, 0xab, 0x21, 0xaf, 0x87, 0xac, 0x9e, 0xf5, 0x9c, 0x46, 0x89, 0x99, 0x8e, - 0x55, 0x88, 0x17, 0x09, 0xb8, 0x73, 0x34, 0xf1, 0x6c, 0x6b, 0x48, 0x18, 0x7d, 0xe2, 0x32, 0x1a, - 0x6a, 0xac, 0x7e, 0x1b, 0xd2, 0x97, 0x2e, 0xa3, 0x06, 0x91, 0x79, 0x75, 0x77, 0x51, 0x37, 0x8e, - 0xd7, 0xd7, 0x39, 0xaa, 0x11, 0xc1, 0x07, 0x32, 0xb1, 0xdf, 0x08, 0x6f, 0xaa, 0x1f, 0x81, 0x8a, - 0x65, 0xcb, 0xb8, 0x74, 0x99, 0xe5, 0x8c, 0x0c, 0xcf, 0x7d, 0x46, 0x7d, 0x99, 0x5b, 0x25, 0xe4, - 0x3c, 0x41, 0x46, 0x97, 0xd3, 0xe7, 0xe2, 0x53, 0x42, 0x53, 0x08, 0x9d, 0xc5, 0xa7, 0x00, 0x36, - 0x21, 0x17, 0xd5, 0x67, 0x99, 0x50, 0xff, 0x5f, 0x4e, 0xce, 0xc4, 0xb4, 0xbf, 0x24, 0x60, 0xe7, - 0x94, 0x27, 0xf7, 0xa1, 0x6d, 0x51, 0x87, 0x35, 0x18, 0x23, 0xc3, 0xa7, 0x91, 0x59, 0x5a, 0xb0, - 0x35, 0x74, 0x9d, 0x73, 0xdb, 0x1a, 0xa2, 0xde, 0x98, 0xbd, 0xd2, 0x42, 0x0f, 0x16, 0xaf, 0x8c, - 0xfb, 0x60, 0xb2, 0xea, 0xa5, 0x98, 0x18, 0x52, 0x78, 0xb0, 0xf2, 0xbc, 0x75, 0x1d, 0x43, 0x96, - 0x96, 0x04, 0xde, 0xa9, 0x20, 0x88, 0x27, 0xa2, 0xc0, 0x74, 0x60, 0x7b, 0x70, 0xf5, 0x9c, 0x38, - 0xcc, 0x72, 0x68, 0x2c, 0xed, 0xca, 0xc9, 0x5a, 0x72, 0x2f, 0x7f, 0x70, 0x7f, 0x89, 0x95, 0x43, - 0x8c, 0xfe, 0xb5, 0x48, 0x70, 0x96, 0x93, 0x2b, 0x0c, 0x9f, 0x5a, 0x61, 0xf8, 0x77, 0x61, 0xcf, - 0x7f, 0x29, 0x90, 0x8d, 0xcc, 0x47, 0xe0, 0x9e, 0x19, 0x86, 0x9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, 0x1b, 0x34, 0xfb, 0x14, 0xff, 0x4a, 0xdd, 0xfe, 0xa7, 0x68, - 0x90, 0x46, 0xfa, 0xc7, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x27, 0x3f, 0x53, 0x38, 0xea, 0x12, - 0x00, 0x00, + 0xd4, 0x31, 0xa9, 0x3f, 0xb6, 0x1c, 0x76, 0xc0, 0xae, 0x3c, 0x1a, 0x88, 0xdf, 0x9a, 0xe7, 0xbb, + 0xcc, 0x55, 0x4b, 0x33, 0x6e, 0x0d, 0xe9, 0xbb, 0xdb, 0x43, 0x77, 0xe8, 0x22, 0xf3, 0x80, 0x7f, + 0x09, 0xdc, 0xee, 0xde, 0xd0, 0x75, 0x87, 0x36, 0x3d, 0xc0, 0x55, 0x7f, 0x72, 0x71, 0xc0, 0xac, + 0x31, 0x0d, 0x18, 0x19, 0x7b, 0x12, 0xf0, 0x30, 0x76, 0xcc, 0xc0, 0xbf, 0xf2, 0x98, 0xcb, 0xb1, + 0xee, 0x85, 0x64, 0x57, 0x62, 0xec, 0x4b, 0xea, 0x07, 0x96, 0xeb, 0xc4, 0xf5, 0xd8, 0xad, 0x2e, + 0x68, 0x79, 0x49, 0x6c, 0xcb, 0x24, 0xcc, 0xf5, 0x05, 0x42, 0xfb, 0x21, 0x14, 0x3b, 0xc4, 0x67, + 0x5d, 0xca, 0x4e, 0x29, 0x31, 0xa9, 0xaf, 0x6e, 0xc3, 0x3a, 0x73, 0x19, 0xb1, 0xcb, 0x4a, 0x55, + 0xd9, 0x2f, 0xea, 0x62, 0xa1, 0xaa, 0x90, 0x1a, 0x91, 0x60, 0x54, 0x4e, 0x54, 0x95, 0xfd, 0x82, + 0x8e, 0xdf, 0xda, 0x08, 0x52, 0x5c, 0x94, 0x4b, 0x58, 0x8e, 0x49, 0xa7, 0xa1, 0x04, 0x2e, 0x38, + 0xb5, 0x7f, 0xc5, 0x68, 0x20, 0x45, 0xc4, 0x42, 0xfd, 0x2e, 0xac, 0xa3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0x16, 0x3b, 0x8b, 0x06, 0x91, 0x86, 0x95, 0xaa, 0xe7, 0xb9, 0x94, 0x20, 0x99, 0xea, + 0x3e, 0x94, 0x70, 0x93, 0x81, 0x3b, 0x1e, 0x5b, 0xcc, 0x40, 0xbb, 0xa7, 0xd1, 0xee, 0x1b, 0x9c, + 0x7e, 0x84, 0xe4, 0x53, 0xee, 0x81, 0xfb, 0x90, 0x33, 0x09, 0x23, 0x02, 0x92, 0x41, 0x48, 0x96, + 0x13, 0x90, 0xf9, 0x1e, 0x6c, 0x46, 0x51, 0x17, 0x08, 0x48, 0x56, 0xec, 0x32, 0x23, 0x23, 0xf0, + 0x11, 0x6c, 0x3b, 0x74, 0xca, 0x8c, 0xdb, 0xe8, 0x1c, 0xa2, 0x55, 0xce, 0x7b, 0x32, 0x2f, 0xf1, + 0x4d, 0xd8, 0x18, 0x84, 0xc6, 0x17, 0x58, 0x40, 0x6c, 0x31, 0xa2, 0x22, 0x6c, 0x07, 0xb2, 0xc4, + 0xf3, 0x04, 0x20, 0x8f, 0x80, 0x0c, 0xf1, 0x3c, 0x64, 0x7d, 0x00, 0x5b, 0x78, 0x47, 0x9f, 0x06, + 0x13, 0x9b, 0xc9, 0x4d, 0x0a, 0x88, 0xd9, 0xe4, 0x0c, 0x5d, 0xd0, 0x11, 0xfb, 0x0d, 0x28, 0xd2, + 0x4b, 0xcb, 0xa4, 0xce, 0x80, 0x0a, 0x5c, 0x11, 0x71, 0x85, 0x90, 0x88, 0xa0, 0xf7, 0xa1, 0xe4, + 0xf9, 0xae, 0xe7, 0x06, 0xd4, 0x37, 0x88, 0x69, 0xfa, 0x34, 0x08, 0xca, 0x1b, 0x62, 0xbf, 0x90, + 0x5e, 0x17, 0x64, 0xed, 0xa5, 0x02, 0xa9, 0x63, 0xc2, 0x88, 0x5a, 0x82, 0x24, 0x9b, 0x06, 0x65, + 0xa5, 0x9a, 0xdc, 0x2f, 0xe8, 0xfc, 0x53, 0xfd, 0x04, 0xb2, 0xe1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9a, 0x97, 0x57, 0x5a, 0x85, 0xee, 0xe8, 0x27, 0x4f, 0xce, 0x7b, 0x27, 0x25, 0x45, 0xa0, 0x3b, + 0x3e, 0xe5, 0x83, 0x29, 0xa2, 0x1f, 0xc1, 0xce, 0x12, 0x74, 0x74, 0xb1, 0xad, 0xeb, 0x9b, 0x6a, + 0xb1, 0xe3, 0x53, 0x51, 0x14, 0x50, 0xa2, 0x06, 0xe5, 0x45, 0x89, 0xf3, 0xce, 0x79, 0xb7, 0x7e, + 0x56, 0xaa, 0xee, 0x96, 0xae, 0x6f, 0xaa, 0x85, 0xb0, 0xc2, 0x73, 0xfc, 0xec, 0x66, 0x8d, 0x9f, + 0x7d, 0xf1, 0xaa, 0xa2, 0x7c, 0xf9, 0xaa, 0xa2, 0xfc, 0xf3, 0x55, 0x45, 0x79, 0xf1, 0xba, 0xb2, + 0xf6, 0xe5, 0xeb, 0xca, 0xda, 0xdf, 0x5e, 0x57, 0xd6, 0x7e, 0xf5, 0xfd, 0xa1, 0xc5, 0x46, 0x93, + 0x7e, 0x6d, 0xe0, 0x8e, 0x0f, 0xe2, 0x7f, 0x17, 0xcd, 0x3e, 0xc5, 0xdf, 0x56, 0xb7, 0xff, 0x4a, + 0xea, 0xa7, 0x91, 0xfe, 0xf1, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbf, 0xff, 0x3d, 0xd2, 0x0b, + 0x13, 0x00, 0x00, } func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { @@ -2932,6 +2941,11 @@ func (m *MalleatedTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ShareIndex != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ShareIndex)) + i-- + dAtA[i] = 0x18 + } if len(m.Tx) > 0 { i -= len(m.Tx) copy(dAtA[i:], m.Tx) @@ -3499,6 +3513,9 @@ func (m *MalleatedTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.ShareIndex != 0 { + n += 1 + sovTypes(uint64(m.ShareIndex)) + } return n } @@ -6954,6 +6971,25 @@ func (m *MalleatedTx) Unmarshal(dAtA []byte) error { m.Tx = []byte{} } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareIndex", wireType) + } + m.ShareIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ShareIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 256e584f41..60fde2774e 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -224,6 +224,7 @@ message TxProof { message MalleatedTx { bytes original_tx_hash = 1; bytes tx = 2; + uint32 share_index = 3; } // Proof represents proof of a namespace.ID in an NMT. diff --git a/state/execution.go b/state/execution.go index c384aa0bde..35f73a75ff 100644 --- a/state/execution.go +++ b/state/execution.go @@ -584,9 +584,9 @@ func fireEvents( for i, tx := range block.Data.Txs { var txHash []byte var rawTx []byte - if originalHash, malleatedTx, ismalleated := types.UnwrapMalleatedTx(tx); ismalleated { - txHash = originalHash - rawTx = malleatedTx + if malleatedTx, ismalleated := types.UnwrapMalleatedTx(tx); ismalleated { + txHash = malleatedTx.OriginalTxHash + rawTx = malleatedTx.Tx } else { txHash = tx.Hash() rawTx = tx diff --git a/types/tx.go b/types/tx.go index 22fc5048e3..25e7b35d5f 100644 --- a/types/tx.go +++ b/types/tx.go @@ -220,30 +220,30 @@ func ComputeProtoSizeForTxs(txs []Tx) int64 { // 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) { +func UnwrapMalleatedTx(tx Tx) (malleatedTx tmproto.MalleatedTx, 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 + return malleatedTx, 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 originalTxHash. TODO(evan): either fix this, or better yet use a different // mechanism if len(malleatedTx.OriginalTxHash) != tmhash.Size { - return nil, nil, false + return malleatedTx, false } - return malleatedTx.OriginalTxHash, malleatedTx.Tx, true + return malleatedTx, true } // 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 WrapMalleatedTx(originalHash []byte, malleated Tx) (Tx, error) { +func WrapMalleatedTx(originalHash []byte, shareIndex uint32, malleated Tx) (Tx, error) { wTx := tmproto.MalleatedTx{ OriginalTxHash: originalHash, Tx: malleated, + ShareIndex: shareIndex, } return proto.Marshal(&wTx) } diff --git a/types/tx_test.go b/types/tx_test.go index 254b62e603..ec50892fa4 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -48,7 +48,7 @@ func TestUnwrapMalleatedTx(t *testing.T) { // perform a simple test for being unable to decode a non // malleated transaction tx := Tx{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0} - _, _, ok := UnwrapMalleatedTx(tx) + _, ok := UnwrapMalleatedTx(tx) require.False(t, ok) data := Data{ @@ -81,16 +81,16 @@ func TestUnwrapMalleatedTx(t *testing.T) { // due to protobuf not actually requiring type compatibility // we need to make sure that there is some check - _, _, ok = UnwrapMalleatedTx(rawBlock) + _, ok = UnwrapMalleatedTx(rawBlock) require.False(t, ok) pHash := sha256.Sum256(rawBlock) - MalleatedTx, err := WrapMalleatedTx(pHash[:], rawBlock) + MalleatedTx, err := WrapMalleatedTx(pHash[:], 0, rawBlock) require.NoError(t, err) // finally, ensure that the unwrapped bytes are identical to the input - unwrappedHash, unwrapped, ok := UnwrapMalleatedTx(MalleatedTx) + malleated, ok := UnwrapMalleatedTx(MalleatedTx) require.True(t, ok) - assert.Equal(t, 32, len(unwrappedHash)) - require.Equal(t, rawBlock, []byte(unwrapped)) + assert.Equal(t, 32, len(malleated.OriginalTxHash)) + require.Equal(t, rawBlock, malleated.Tx) }