From 97483ee6ec60d6e51146c2e97ea6dfc5fc7dee17 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Mon, 21 Nov 2022 16:21:18 +0900 Subject: [PATCH 01/15] Update abci type.proto --- proto/ostracon/abci/types.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proto/ostracon/abci/types.proto b/proto/ostracon/abci/types.proto index b8075d0b9..b996bfef0 100644 --- a/proto/ostracon/abci/types.proto +++ b/proto/ostracon/abci/types.proto @@ -224,6 +224,9 @@ message ResponseCheckTx { repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8; + string sender = 9; // MEMO: not used, just reservation for mempool_error + int64 priority = 10; // MEMO: not used, just reservation for mempool_error + string mempool_error = 11; } message ResponseDeliverTx { From 0e6e909a6ba064acc66793d8bd38f5c77ca149c0 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Mon, 21 Nov 2022 16:29:07 +0900 Subject: [PATCH 02/15] Generate stub files --- abci/types/types.pb.go | 520 ++++++++++++++++++++++++++--------------- 1 file changed, 330 insertions(+), 190 deletions(-) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 4a0c642e6..cc6635a2f 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -2099,14 +2099,17 @@ func (m *ResponseBeginBlock) GetEvents() []Event { } type ResponseCheckTx struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` - Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` + Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` + Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` + Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` + Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` + MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"` } func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } @@ -2198,6 +2201,27 @@ func (m *ResponseCheckTx) GetCodespace() string { return "" } +func (m *ResponseCheckTx) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *ResponseCheckTx) GetPriority() int64 { + if m != nil { + return m.Priority + } + return 0 +} + +func (m *ResponseCheckTx) GetMempoolError() string { + if m != nil { + return m.MempoolError + } + return "" +} + type ResponseDeliverTx struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -3440,188 +3464,191 @@ func init() { func init() { proto.RegisterFile("ostracon/abci/types.proto", fileDescriptor_addf585b2317eb36) } var fileDescriptor_addf585b2317eb36 = []byte{ - // 2892 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4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d, 0x62, - 0x4c, 0xb0, 0x43, 0xb4, 0x89, 0x2d, 0x18, 0xd6, 0x86, 0xd6, 0xd0, 0x62, 0x8f, 0x5b, 0xf4, 0x89, - 0x53, 0xe5, 0x5f, 0x57, 0xa1, 0xac, 0xe0, 0x8f, 0x67, 0xd8, 0x21, 0xe8, 0x05, 0x28, 0x60, 0x7d, - 0x64, 0x35, 0xb3, 0x57, 0xb3, 0xcf, 0x2c, 0xdd, 0x90, 0x36, 0x43, 0x5b, 0xda, 0x14, 0x5c, 0x1d, - 0x7d, 0x64, 0x75, 0x33, 0x0a, 0xe3, 0x44, 0x37, 0xa1, 0x78, 0x3c, 0x9e, 0x39, 0xa3, 0x66, 0x8e, - 0x89, 0x5c, 0x89, 0x17, 0x79, 0x8b, 0xb2, 0x74, 0x33, 0x0a, 0xe7, 0xa5, 0xaf, 0x31, 0xcc, 0x63, - 0xab, 0x99, 0x4f, 0x7b, 0xcd, 0x8e, 0x79, 0xcc, 0x5e, 0x43, 0x39, 0xd1, 0x9b, 0x00, 0x0e, 0x26, - 0xaa, 0x65, 0x13, 0xc3, 0x32, 0x9b, 0x05, 0x26, 0xb7, 0x11, 0x2f, 0x77, 0x84, 0xc9, 0x01, 0x63, - 0xeb, 0x66, 0x94, 0xaa, 0xe3, 0x0e, 0xa8, 0x06, 0xc3, 0x34, 0x88, 0xaa, 0x8f, 0x34, 0xc3, 0x6c, - 0x16, 0xd3, 0x34, 0xec, 0x98, 0x06, 0x69, 0x53, 0x36, 0xaa, 0xc1, 0x70, 0x07, 0x74, 0xab, 0x1f, - 0xcf, 0xf0, 0xf4, 0xac, 0x59, 0x4a, 0xdb, 0xea, 0x1d, 0xca, 0x42, 0xb7, 0xca, 0x78, 0x51, 0x1b, - 0x96, 0xfa, 0x78, 0x68, 0x98, 0x6a, 0x7f, 0x6c, 0xe9, 0xf7, 0x9b, 0x65, 0x26, 0x7a, 0x35, 0x5e, - 0x74, 0x9b, 0x32, 0x6e, 0x53, 0xbe, 0x6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, 0x74, 0x83, 0xfa, 0x66, 0xcf, 0x0d, 0xea, 0xdb, 0x95, 0xcf, 0xbf, - 0xdc, 0xc8, 0x7c, 0xfa, 0xa7, 0x8d, 0xac, 0xc2, 0x24, 0xd0, 0x65, 0x1a, 0x25, 0x34, 0xc3, 0x54, - 0x8d, 0x81, 0x78, 0x4f, 0x99, 0x8d, 0x77, 0x06, 0x68, 0x07, 0x1a, 0xba, 0x65, 0x3a, 0xd8, 0x74, - 0x66, 0x8e, 0xca, 0x93, 0x86, 0x08, 0xbe, 0xd1, 0x9b, 0xdc, 0x76, 0xd9, 0x0e, 0x19, 0x97, 0xb2, - 0xa2, 0x87, 0x09, 0xe8, 0x16, 0xc0, 0x89, 0x36, 0x36, 0x06, 0x1a, 0xb1, 0xa6, 0x4e, 0xb3, 0x70, - 0x35, 0x1f, 0xa3, 0xe4, 0xae, 0xcb, 0xf0, 0x8e, 0x3d, 0xd0, 0x08, 0xde, 0x2e, 0xd0, 0x95, 0x2a, - 0x01, 0x39, 0xf4, 0x6d, 0x58, 0xd1, 0x6c, 0x5b, 0x75, 0x88, 0x46, 0xb0, 0xda, 0x3f, 0x23, 0xd8, - 0x61, 0x21, 0x79, 0x59, 0xa9, 0x69, 0xb6, 0x7d, 0x44, 0xa9, 0xdb, 0x94, 0x88, 0x9e, 0x82, 0x3a, - 0x0d, 0xc0, 0x86, 0x36, 0x56, 0x47, 0xd8, 0x18, 0x8e, 0x08, 0x0b, 0xbe, 0x79, 0xa5, 0x26, 0xa8, - 0x5d, 0x46, 0x94, 0x07, 0x9e, 0x13, 0xb0, 0xf0, 0x8b, 0x10, 0x14, 0x06, 0x1a, 0xd1, 0x98, 0x11, - 0x97, 0x15, 0xf6, 0x4c, 0x69, 0xb6, 0x46, 0x46, 0xc2, 0x34, 0xec, 0x19, 0x5d, 0x84, 0x92, 0x50, - 0x9b, 0x67, 0x6a, 0xc5, 0x88, 0x9e, 0x97, 0x3d, 0xb5, 0x4e, 0x30, 0xcb, 0x34,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c5, 0xa3, 0xce, 0xcc, 0xbc, 0x20, 0xc7, 0x96, 0x5d, 0xd6, 0x6c, 0xbb, 0xab, - 0x39, 0x23, 0xf9, 0x23, 0x68, 0x26, 0x85, 0xff, 0xc8, 0x26, 0x0a, 0x9e, 0xf3, 0x5d, 0x84, 0xd2, - 0xb1, 0x35, 0x9d, 0x68, 0x84, 0x29, 0xab, 0x29, 0x62, 0x44, 0x9d, 0x92, 0xa7, 0x82, 0x3c, 0x23, - 0xf3, 0x81, 0xac, 0xc2, 0xe5, 0xc4, 0x24, 0x40, 0x45, 0x0c, 0x73, 0x80, 0xb9, 0x35, 0x6b, 0x0a, - 0x1f, 0xf8, 0x8a, 0xf8, 0x62, 0xf9, 0x80, 0xbe, 0xd6, 0xc1, 0x26, 0xf5, 0xd9, 0x3c, 0xbb, 0x21, - 0x62, 0x24, 0xdf, 0x86, 0xc7, 0x62, 0x53, 0x41, 0xc0, 0xc9, 0xb3, 0x8b, 0x3b, 0xb9, 0xfc, 0x3c, - 0x5c, 0x88, 0x49, 0x04, 0x89, 0x27, 0xfa, 0x97, 0x2a, 0x54, 0x14, 0xec, 0xd8, 0x34, 0x0a, 0xa1, - 0x37, 0xa1, 0x8a, 0x4f, 0x75, 0xcc, 0x41, 0x60, 0x36, 0x01, 0x4a, 0x71, 0xde, 0x8e, 0xcb, 0x47, - 0xb1, 0x8c, 0x27, 0x84, 0x5e, 0x14, 0x00, 0x37, 0x09, 0xad, 0x0a, 0xe1, 0x20, 0xc2, 0x7d, 0xc9, - 0x45, 0xb8, 0xf9, 0x04, 0xf8, 0xc2, 0x65, 0x22, 0x10, 0xf7, 0x45, 0x01, 0x71, 0x0b, 0xa9, 0x2f, - 0x0a, 0x61, 0xdc, 0x56, 0x08, 0xe3, 0x16, 0x53, 0xb7, 0x97, 0x00, 0x72, 0x5b, 0x21, 0x90, 0x5b, - 0x4a, 0x55, 0x91, 0x80, 0x72, 0x5f, 0x72, 0x51, 0x6e, 0x39, 0x75, 0xbb, 0x11, 0x98, 0x7b, 0x2b, - 0x0c, 0x73, 0x39, 0x48, 0xfd, 0x56, 0x82, 0x6c, 0x22, 0xce, 0xfd, 0x7e, 0x00, 0xe7, 0x56, 0x13, - 0x80, 0x26, 0x57, 0x11, 0x03, 0x74, 0x5b, 0x21, 0xa0, 0x0b, 0xa9, 0x7b, 0x4f, 0x40, 0xba, 0x6f, - 0x04, 0x91, 0xee, 0x52, 0x02, 0x54, 0x16, 0x2e, 0x12, 0x07, 0x75, 0x5f, 0xf1, 0xa0, 0xee, 0x72, - 0x02, 0x4a, 0x17, 0xab, 0x8f, 0x62, 0xdd, 0xdb, 0xe7, 0xb0, 0x6e, 0x2d, 0x01, 0x93, 0x71, 0x05, - 0x73, 0xc0, 0xee, 0xed, 0x73, 0x60, 0xb7, 0x9e, 0xaa, 0x6e, 0x0e, 0xda, 0x7d, 0x2f, 0x1e, 0xed, - 0x26, 0x21, 0x52, 0xb1, 0xc4, 0xc5, 0xe0, 0xee, 0x87, 0x09, 0x70, 0xb7, 0xc1, 0x94, 0x3f, 0x9b, - 0xa0, 0x7c, 0x61, 0xbc, 0xab, 0x24, 0xe3, 0xdd, 0xa7, 0xd2, 0xbc, 0x33, 0x0d, 0xf0, 0xee, 0x25, - 0x01, 0xde, 0x6b, 0xc9, 0xbe, 0xb2, 0x00, 0xe2, 0x7d, 0x96, 0x82, 0x8b, 0x48, 0xf0, 0xa2, 0xa1, - 0x1a, 0x4f, 0xa7, 0xd6, 0x54, 0x80, 0x49, 0x3e, 0x90, 0x9f, 0xa1, 0x70, 0xc7, 0x0f, 0x55, 0x29, - 0xe8, 0x98, 0x25, 0xc4, 0x40, 0x80, 0x92, 0x7f, 0x9b, 0xf5, 0x65, 0x19, 0x4a, 0x08, 0x42, 0xa5, - 0xaa, 0x80, 0x4a, 0x01, 0xd0, 0x9c, 0x0b, 0x83, 0xe6, 0x0d, 0x58, 0xa2, 0xa9, 0x2e, 0x82, 0x87, - 0x35, 0xdb, 0xc5, 0xc3,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0x85, 0xeb, 0x83, 0x45, 0xbe, 0xfa, 0x4b, 0x0b, 0xb5, 0x4b, 0xa9, 0xee, 0x70, 0xa9, 0xb0, 0xc8, - 0x3f, 0x00, 0xd2, 0x42, 0xbd, 0x53, 0x74, 0x0c, 0xab, 0xe7, 0x81, 0xfc, 0xa2, 0x3f, 0x04, 0x48, - 0x0b, 0xf7, 0x52, 0x91, 0x01, 0x28, 0x06, 0xfc, 0x2f, 0xfc, 0x77, 0x80, 0xb4, 0x78, 0x63, 0x15, - 0x7d, 0x08, 0xf5, 0x08, 0x9e, 0x5e, 0xe8, 0x4f, 0x01, 0x69, 0xb1, 0xfe, 0x2a, 0xba, 0x07, 0xcb, - 0x21, 0x00, 0xbe, 0xc0, 0x5f, 0x03, 0xd2, 0x22, 0x8d, 0xd6, 0xed, 0xd7, 0x3f, 0xff, 0x6a, 0x3d, - 0xfb, 0xc5, 0x57, 0xeb, 0xd9, 0x3f, 0x7f, 0xb5, 0x9e, 0xfd, 0xf4, 0xe1, 0x7a, 0xe6, 0x8b, 0x87, - 0xeb, 0x99, 0x3f, 0x3e, 0x5c, 0xcf, 0xbc, 0x77, 0x6d, 0x68, 0x90, 0xd1, 0xac, 0xbf, 0xa9, 0x5b, - 0x93, 0xad, 0xb1, 0x61, 0xe2, 0xad, 0x98, 0x9f, 0xba, 0xfa, 0x25, 0x96, 0x1c, 0x6f, 0xfe, 0x37, - 0x00, 0x00, 0xff, 0xff, 0x07, 0x62, 0x97, 0xcc, 0xf2, 0x25, 0x00, 0x00, + // 2931 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0xdb, 0xd6, + 0x15, 0xe6, 0x9b, 0xc4, 0x11, 0x49, 0x51, 0xd7, 0x8a, 0x4d, 0xc3, 0x89, 0xe4, 0xc2, 0x49, 0x93, + 0xb8, 0x89, 0x94, 0xd8, 0x69, 0xd2, 0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, 0xc3, 0xe2, 0x45, 0x7f, 0x81, 0x58, 0xa8, 0xef, 0xd2, 0x5e, + 0xbe, 0x30, 0x5c, 0x17, 0xdd, 0x86, 0xc6, 0x44, 0xb5, 0x1d, 0x85, 0x01, 0xa0, 0x12, 0x08, 0x91, + 0x51, 0xb8, 0xdf, 0x57, 0x5d, 0xc0, 0x24, 0x87, 0x9c, 0xbb, 0xa9, 0x4f, 0x42, 0x52, 0x74, 0x04, + 0xeb, 0xfd, 0xf9, 0x4f, 0x55, 0xdd, 0xd1, 0x74, 0xac, 0x9c, 0xdb, 0xb3, 0x4b, 0x11, 0x97, 0x9d, + 0x53, 0x6d, 0x88, 0xf5, 0x81, 0xbb, 0x59, 0x17, 0x3c, 0x53, 0x6f, 0x33, 0x6d, 0xe9, 0x08, 0xea, + 0xe1, 0x40, 0x83, 0xea, 0x90, 0x73, 0xce, 0xf8, 0xd4, 0x73, 0xce, 0x19, 0xda, 0x82, 0x02, 0x99, + 0x20, 0x9d, 0x76, 0xfd, 0x5c, 0x64, 0xe7, 0x56, 0xbd, 0xb9, 0x89, 0x65, 0xaa, 0x27, 0x49, 0xde, + 0x0d, 0xf0, 0x82, 0x4f, 0xd4, 0xa7, 0xf4, 0x2c, 0xac, 0x46, 0xe2, 0x4b, 0x60, 0xdf, 0xb2, 0xc1, + 0x7d, 0x93, 0x56, 0xa1, 0x16, 0x0a, 0x27, 0xd2, 0x45, 0x58, 0x8f, 0x8b, 0x0f, 0xd2, 0x89, 0x27, + 0x0f, 0x21, 0x3d, 0xba, 0x09, 0x15, 0x2f, 0x40, 0xb0, 0x1b, 0x18, 0x5d, 0x27, 0x57, 0x55, 0xf6, + 0x14, 0xc9, 0xc5, 0x23, 0x87, 0x99, 0x9e, 0x82, 0x1c, 0x1d, 0x76, 0x59, 0x35, 0xcd, 0xae, 0x6a, + 0x8f, 0xa5, 0x8f, 0xa0, 0x99, 0x04, 0xff, 0x91, 0x49, 0x14, 0xbc, 0xc3, 0x77, 0x11, 0x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0x15, 0x22, 0xba, 0x90, 0x3a, 0xf7, 0x04, 0xa6, 0xfb, 0x46, + 0x90, 0xe9, 0xae, 0x24, 0x50, 0x65, 0x7e, 0x44, 0xe2, 0xa8, 0xee, 0x2b, 0x1e, 0xd5, 0xad, 0x26, + 0xb0, 0x74, 0x3e, 0xfa, 0x28, 0xd7, 0xbd, 0x7d, 0x8e, 0xeb, 0xd6, 0x12, 0x38, 0x19, 0x73, 0xb0, + 0x80, 0xec, 0xde, 0x3e, 0x47, 0x76, 0xeb, 0xa9, 0xee, 0x16, 0xb0, 0xdd, 0xf7, 0xe2, 0xd9, 0x6e, + 0x12, 0x23, 0xe5, 0x43, 0x5c, 0x8e, 0xee, 0x7e, 0x98, 0x40, 0x77, 0x1b, 0xd4, 0xf9, 0xb3, 0x09, + 0xce, 0x97, 0xe6, 0xbb, 0x72, 0x32, 0xdf, 0x7d, 0x2a, 0xed, 0x74, 0xa6, 0x11, 0xde, 0xfd, 0x24, + 0xc2, 0x7b, 0x2d, 0xf9, 0xac, 0x2c, 0xc1, 0x78, 0x9f, 0x25, 0xe4, 0x22, 0x02, 0x5e, 0x04, 0xaa, + 0xb1, 0x65, 0x19, 0x16, 0x27, 0x93, 0xac, 0x21, 0x3d, 0x43, 0xe8, 0x8e, 0x0f, 0x55, 0x29, 0xec, + 0x98, 0x06, 0xc4, 0x00, 0x40, 0x49, 0xbf, 0xc9, 0xfa, 0xb6, 0x94, 0x25, 0x04, 0xa9, 0x92, 0xc0, + 0xa9, 0x52, 0x80, 0x34, 0xe7, 0xc2, 0xa4, 0x79, 0x13, 0x56, 0x48, 0xa8, 0x8b, 0xf0, 0x61, 0xd5, + 0x74, 0xf9, 0x30, 0xba, 0x0e, 0x6b, 0x94, 0xc3, 0x30, 0x6a, 0xcd, 0x21, 0xbd, 0x40, 0x21, 0x7d, + 0x95, 0x74, 0xb0, 0x4b, 0xc3, 0x02, 0xdd, 0xf3, 0x70, 0x21, 0xa0, 0xeb, 0x85, 0x50, 0x46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2, 0x1f, 0x73, 0x84, 0x6f, 0x86, 0xc2, 0x4c, 0xec, 0xba, 0xba, 0x17, + 0x27, 0x17, 0xc8, 0x31, 0x96, 0x5b, 0xeb, 0x0d, 0x80, 0x91, 0x6a, 0x2b, 0x0f, 0x54, 0xdd, 0xc1, + 0x43, 0xbe, 0xe0, 0x01, 0x09, 0x12, 0xa1, 0x42, 0x5a, 0x33, 0x1b, 0x0f, 0x79, 0xba, 0xe3, 0xb5, + 0x03, 0xb3, 0x2c, 0x7f, 0x93, 0x59, 0x86, 0x57, 0xb8, 0x12, 0x59, 0xe1, 0x00, 0x17, 0x14, 0x82, + 0x5c, 0x90, 0x8c, 0xcc, 0xb4, 0x34, 0xc3, 0xd2, 0x9c, 0x39, 0xdd, 0x96, 0xbc, 0xec, 0xb5, 0x49, + 0x3e, 0x3d, 0xc5, 0x53, 0xd3, 0x30, 0x26, 0x0a, 0x83, 0xac, 0x15, 0x6a, 0x5a, 0xe5, 0xc2, 0x0e, + 0x45, 0xae, 0x9f, 0xe7, 0xfc, 0x4b, 0xe7, 0x33, 0xfe, 0xff, 0xb3, 0xe5, 0x95, 0x7e, 0x41, 0x13, + 0xff, 0x30, 0x91, 0x40, 0x77, 0x60, 0xcd, 0xbb, 0xf6, 0xca, 0x8c, 0xc2, 0x81, 0x7b, 0x94, 0x97, + 0x43, 0x8d, 0xc6, 0x69, 0x58, 0x6c, 0xa3, 0xbb, 0x70, 0x29, 0x02, 0x66, 0x9e, 0xe3, 0xdc, 0x52, + 0x98, 0xf6, 0x58, 0x18, 0xd3, 0x5c, 0xbf, 0xfe, 0x2a, 0xe5, 0xbf, 0xd1, 0x55, 0xdb, 0x25, 0xf9, + 0x64, 0x90, 0x12, 0xc5, 0xee, 0xfa, 0x35, 0xa8, 0x59, 0xd8, 0x51, 0x35, 0x5d, 0x09, 0xe5, 0xea, + 0x55, 0x26, 0xe4, 0x15, 0x80, 0x03, 0x92, 0xa5, 0xc4, 0x90, 0x23, 0xf4, 0x5d,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, 0x49, 0xd2, 0x82, 0x1f, 0x0f, 0xc4, + 0x45, 0xe5, 0x5a, 0xf4, 0x1e, 0xd4, 0xc2, 0xf9, 0xc1, 0x32, 0xbf, 0x13, 0x88, 0x4b, 0xd5, 0x61, + 0x89, 0xef, 0x70, 0xaa, 0xb0, 0xcc, 0xcf, 0x05, 0xe2, 0x52, 0x45, 0x59, 0x74, 0x02, 0x6b, 0xe7, + 0x89, 0xfc, 0xb2, 0x7f, 0x1a, 0x88, 0x4b, 0x17, 0x69, 0x91, 0x06, 0x28, 0x86, 0xfc, 0x2f, 0xfd, + 0xdb, 0x81, 0xb8, 0x7c, 0xc5, 0x16, 0x7d, 0x08, 0xf5, 0x08, 0x9f, 0x5e, 0xea, 0x17, 0x04, 0x71, + 0xb9, 0xc2, 0x2d, 0xba, 0x07, 0xd5, 0x10, 0x01, 0x5f, 0xe2, 0x77, 0x04, 0x71, 0x99, 0x0a, 0xee, + 0xce, 0xeb, 0x9f, 0x7f, 0xb5, 0x91, 0xfd, 0xe2, 0xab, 0x8d, 0xec, 0x9f, 0xbf, 0xda, 0xc8, 0x7e, + 0xfa, 0x70, 0x23, 0xf3, 0xc5, 0xc3, 0x8d, 0xcc, 0x1f, 0x1e, 0x6e, 0x64, 0xde, 0xbb, 0x36, 0xd2, + 0x9c, 0xf1, 0xac, 0xbf, 0x35, 0x30, 0xa6, 0xdb, 0x13, 0x4d, 0xc7, 0xdb, 0x31, 0x7f, 0x8b, 0xf5, + 0x4b, 0x34, 0x38, 0xde, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0xd7, 0x9b, 0xe7, 0x4b, + 0x26, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -6110,6 +6137,25 @@ func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MempoolError) > 0 { + i -= len(m.MempoolError) + copy(dAtA[i:], m.MempoolError) + i = encodeVarintTypes(dAtA, i, uint64(len(m.MempoolError))) + i-- + dAtA[i] = 0x5a + } + if m.Priority != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Priority)) + i-- + dAtA[i] = 0x50 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x4a + } if len(m.Codespace) > 0 { i -= len(m.Codespace) copy(dAtA[i:], m.Codespace) @@ -7999,6 +8045,17 @@ func (m *ResponseCheckTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Priority != 0 { + n += 1 + sovTypes(uint64(m.Priority)) + } + l = len(m.MempoolError) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -12857,6 +12914,89 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { } m.Codespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MempoolError", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MempoolError = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) From f41f0e55bc664f9c06ea316b6a9a87843c3ec57a Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Tue, 22 Nov 2022 18:41:52 +0900 Subject: [PATCH 03/15] Revive `postCheck` in only `resCbRecheck` --- consensus/replay_stubs.go | 1 + mempool/cache_test.go | 2 +- mempool/clist_mempool.go | 33 ++++++++++++++++++++++++- mempool/clist_mempool_system_test.go | 2 +- mempool/clist_mempool_test.go | 20 +++++++-------- mempool/mempool.go | 25 +++++++++++++++++++ mempool/mock/mempool.go | 1 + mempool/reactor_test.go | 4 +-- node/node.go | 1 + node/node_test.go | 2 ++ rpc/core/mempool.go | 11 +++++---- rpc/core/types/responses.go | 9 ++++--- state/execution.go | 1 + state/tx_filter.go | 6 +++++ test/maverick/consensus/replay_stubs.go | 1 + test/maverick/node/node.go | 1 + 16 files changed, 96 insertions(+), 24 deletions(-) diff --git a/consensus/replay_stubs.go b/consensus/replay_stubs.go index d1f31a4b3..50f700fec 100644 --- a/consensus/replay_stubs.go +++ b/consensus/replay_stubs.go @@ -30,6 +30,7 @@ func (emptyMempool) Update( _ *types.Block, _ []*abci.ResponseDeliverTx, _ mempl.PreCheckFunc, + _ mempl.PostCheckFunc, ) error { return nil } diff --git a/mempool/cache_test.go b/mempool/cache_test.go index 072c3f03a..65aa0178c 100644 --- a/mempool/cache_test.go +++ b/mempool/cache_test.go @@ -69,7 +69,7 @@ func TestCacheAfterUpdate(t *testing.T) { updateTxs = append(updateTxs, tx) } err := mempool.Update(newTestBlock(int64(tcIndex), updateTxs), - abciResponses(len(updateTxs), abci.CodeTypeOK), nil) + abciResponses(len(updateTxs), abci.CodeTypeOK), nil, nil) require.NoError(t, err) for _, v := range tc.reAddIndices { diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 50eb0645b..cfce663b9 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -56,6 +56,8 @@ type CListMempool struct { chReqCheckTx chan *requestCheckTxAsync + postCheck PostCheckFunc + wal *auto.AutoFile // a log of mempool txs txs *clist.CList // concurrent linked-list of good txs proxyAppConn proxy.AppConnMempool @@ -131,6 +133,13 @@ func WithPreCheck(f PreCheckFunc) CListMempoolOption { return func(mem *CListMempool) { mem.preCheck = f } } +// WithPostCheck sets a filter for the mempool to reject a tx if f(tx) returns +// false. This is ran after CheckTx. Only applies to the first created block. +// After that, Update overwrites the existing value. +func WithPostCheck(f PostCheckFunc) CListMempoolOption { + return func(mem *CListMempool) { mem.postCheck = f } +} + // WithMetrics sets the metrics. func WithMetrics(metrics *Metrics) CListMempoolOption { return func(mem *CListMempool) { mem.metrics = metrics } @@ -543,7 +552,25 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { switch r := res.Value.(type) { case *abci.Response_CheckTx: if r.CheckTx.Code == abci.CodeTypeOK { - // Good, nothing to do. + tx := req.GetCheckTx().Tx + txHash := TxKey(tx) + e, ok := mem.txsMap.Load(txHash) + if !ok { + panic(fmt.Sprintf("Unexpected tx response from proxy during recheck\ntxHash=%s, tx=%X", txHash, tx)) + } + celem := e.(*clist.CElement) + var postCheckErr error + if mem.postCheck != nil { + postCheckErr = mem.postCheck(tx, r.CheckTx) + } + if (r.CheckTx.Code == abci.CodeTypeOK) && postCheckErr == nil { + // Good, nothing to do. + } else { + // Tx became invalidated due to newly committed block. + mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r, "err", postCheckErr) + // NOTE: we remove tx from the cache because it might be good later + mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) + } } else { tx := req.GetCheckTx().Tx txHash := TxKey(tx) @@ -678,6 +705,7 @@ func (mem *CListMempool) Update( block *types.Block, deliverTxResponses []*abci.ResponseDeliverTx, preCheck PreCheckFunc, + postCheck PostCheckFunc, ) (err error) { // Set height mem.height = block.Height @@ -686,6 +714,9 @@ func (mem *CListMempool) Update( if preCheck != nil { mem.preCheck = preCheck } + if postCheck != nil { + mem.postCheck = postCheck + } for i, tx := range block.Txs { if deliverTxResponses[i].Code == abci.CodeTypeOK { diff --git a/mempool/clist_mempool_system_test.go b/mempool/clist_mempool_system_test.go index 98a15d506..d3062c568 100644 --- a/mempool/clist_mempool_system_test.go +++ b/mempool/clist_mempool_system_test.go @@ -108,7 +108,7 @@ func commitBlock(ctx context.Context, t *testing.T, mem *CListMempool, block *types.Block, deliverTxResponses []*abci.ResponseDeliverTx) { mem.Lock() defer mem.Unlock() - err := mem.Update(block, deliverTxResponses, nil) + err := mem.Update(block, deliverTxResponses, nil, nil) require.NoError(t, err) } diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index 2e42e0297..fdfe7e28d 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -173,7 +173,7 @@ func TestMempoolFilters(t *testing.T) { } for tcIndex, tt := range tests { err := mempool.Update(newTestBlock(1, emptyTxArr), - abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter) + abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, nil) require.NoError(t, err) checkTxs(t, mempool, tt.numTxsToCreate, UnknownPeerID) require.Equal(t, tt.expectedNumTxs, mempool.Size(), "mempool had the incorrect size, on test case %d", tcIndex) @@ -190,7 +190,7 @@ func TestMempoolUpdate(t *testing.T) { // 1. Adds valid txs to the cache { err := mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x01}}), - abciResponses(1, abci.CodeTypeOK), nil) + abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) _, err = mempool.CheckTxSync([]byte{0x01}, TxInfo{}) if assert.Error(t, err) { @@ -202,7 +202,7 @@ func TestMempoolUpdate(t *testing.T) { { _, err := mempool.CheckTxSync([]byte{0x02}, TxInfo{}) require.NoError(t, err) - err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x02}}), abciResponses(1, abci.CodeTypeOK), nil) + err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x02}}), abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.Zero(t, mempool.Size()) } @@ -211,7 +211,7 @@ func TestMempoolUpdate(t *testing.T) { { _, err := mempool.CheckTxSync([]byte{0x03}, TxInfo{}) require.NoError(t, err) - err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x03}}), abciResponses(1, 1), nil) + err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x03}}), abciResponses(1, 1), nil, nil) require.NoError(t, err) assert.Zero(t, mempool.Size()) @@ -243,7 +243,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { _ = app.DeliverTx(abci.RequestDeliverTx{Tx: a}) _ = app.DeliverTx(abci.RequestDeliverTx{Tx: b}) err = mempool.Update(newTestBlock(1, []types.Tx{a, b}), - []*abci.ResponseDeliverTx{{Code: abci.CodeTypeOK}, {Code: 2}}, nil) + []*abci.ResponseDeliverTx{{Code: abci.CodeTypeOK}, {Code: 2}}, nil, nil) require.NoError(t, err) // a must be added to the cache @@ -299,7 +299,7 @@ func TestTxsAvailable(t *testing.T) { // since there are still txs left committedTxs, txs := txs[:50], txs[50:] if err := mempool.Update(newTestBlock(1, committedTxs), - abciResponses(len(committedTxs), abci.CodeTypeOK), nil); err != nil { + abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } ensureFire(t, mempool.TxsAvailable(), timeoutMS) @@ -312,7 +312,7 @@ func TestTxsAvailable(t *testing.T) { // now call update with all the txs. it should not fire as there are no txs left committedTxs = append(txs, moreTxs...) // nolint: gocritic if err := mempool.Update(newTestBlock(2, committedTxs), - abciResponses(len(committedTxs), abci.CodeTypeOK), nil); err != nil { + abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } ensureNoFire(t, mempool.TxsAvailable(), timeoutMS) @@ -372,7 +372,7 @@ func TestSerialReap(t *testing.T) { txs = append(txs, txBytes) } if err := mempool.Update(newTestBlock(0, txs), - abciResponses(len(txs), abci.CodeTypeOK), nil); err != nil { + abciResponses(len(txs), abci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } } @@ -544,7 +544,7 @@ func TestMempoolTxsBytes(t *testing.T) { // 3. zero again after tx is removed by Update err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x01}}), - abciResponses(1, abci.CodeTypeOK), nil) + abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.EqualValues(t, 0, mempool.TxsBytes()) @@ -594,7 +594,7 @@ func TestMempoolTxsBytes(t *testing.T) { require.NotEmpty(t, res2.Data) // Pretend like we committed nothing so txBytes gets rechecked and removed. - err = mempool.Update(newTestBlock(1, []types.Tx{}), abciResponses(0, abci.CodeTypeOK), nil) + err = mempool.Update(newTestBlock(1, []types.Tx{}), abciResponses(0, abci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.EqualValues(t, 0, mempool.TxsBytes()) diff --git a/mempool/mempool.go b/mempool/mempool.go index bf789e531..a13add17d 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -46,6 +46,7 @@ type Mempool interface { block *types.Block, deliverTxResponses []*abci.ResponseDeliverTx, newPreFn PreCheckFunc, + newPostFn PostCheckFunc, ) error // FlushAppConn flushes the mempool connection to ensure async reqResCb calls are @@ -87,6 +88,11 @@ type Mempool interface { // transaction doesn't exceeded the block size. type PreCheckFunc func(types.Tx) error +// PostCheckFunc is an optional filter executed after CheckTx and rejects +// transaction if false is returned. An example would be to ensure a +// transaction doesn't require more gas than available for the block. +type PostCheckFunc func(types.Tx, *abci.ResponseCheckTx) error + // TxInfo are parameters that get passed when attempting to add a tx to the // mempool. type TxInfo struct { @@ -111,3 +117,22 @@ func PreCheckMaxBytes(maxBytes int64) PreCheckFunc { return nil } } + +// PostCheckMaxGas checks that the wanted gas is smaller or equal to the passed +// maxGas. Returns nil if maxGas is -1. +func PostCheckMaxGas(maxGas int64) PostCheckFunc { + return func(tx types.Tx, res *abci.ResponseCheckTx) error { + if maxGas == -1 { + return nil + } + if res.GasWanted < 0 { + return fmt.Errorf("gas wanted %d is negative", + res.GasWanted) + } + if res.GasWanted > maxGas { + return fmt.Errorf("gas wanted %d is greater than max gas %d", + res.GasWanted, maxGas) + } + return nil + } +} diff --git a/mempool/mock/mempool.go b/mempool/mock/mempool.go index 3f1f5b54c..3d817854a 100644 --- a/mempool/mock/mempool.go +++ b/mempool/mock/mempool.go @@ -27,6 +27,7 @@ func (Mempool) Update( _ *types.Block, _ []*abci.ResponseDeliverTx, _ mempl.PreCheckFunc, + _ mempl.PostCheckFunc, ) error { return nil } diff --git a/mempool/reactor_test.go b/mempool/reactor_test.go index 6e015f0ca..277a6e749 100644 --- a/mempool/reactor_test.go +++ b/mempool/reactor_test.go @@ -107,7 +107,7 @@ func TestReactorConcurrency(t *testing.T) { for i := range txs { deliverTxResponses[i] = &abci.ResponseDeliverTx{Code: 0} } - err := reactors[0].mempool.Update(newTestBlock(1, txs), deliverTxResponses, nil) + err := reactors[0].mempool.Update(newTestBlock(1, txs), deliverTxResponses, nil, nil) assert.NoError(t, err) }() @@ -120,7 +120,7 @@ func TestReactorConcurrency(t *testing.T) { reactors[1].mempool.Lock() defer reactors[1].mempool.Unlock() err := reactors[1].mempool.Update(newTestBlock(1, []types.Tx{}), - make([]*abci.ResponseDeliverTx, 0), nil) + make([]*abci.ResponseDeliverTx, 0), nil, nil) assert.NoError(t, err) }() diff --git a/node/node.go b/node/node.go index dcb1736cd..3ee181ba3 100644 --- a/node/node.go +++ b/node/node.go @@ -404,6 +404,7 @@ func createMempoolAndMempoolReactor(config *cfg.Config, proxyApp proxy.AppConns, state.LastBlockHeight, mempl.WithMetrics(memplMetrics), mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state)), ) mempoolLogger := logger.With("module", "mempool") mempoolReactor := mempl.NewReactor(config.Mempool, config.P2P.RecvAsync, config.P2P.MempoolRecvBufSize, mempool) diff --git a/node/node_test.go b/node/node_test.go index 8c619347e..3d1625890 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -271,6 +271,7 @@ func TestCreateProposalBlock(t *testing.T) { state.LastBlockHeight, mempl.WithMetrics(memplMetrics), mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state)), ) mempool.SetLogger(logger) @@ -367,6 +368,7 @@ func TestMaxProposalBlockSize(t *testing.T) { state.LastBlockHeight, mempl.WithMetrics(memplMetrics), mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state)), ) mempool.SetLogger(logger) diff --git a/rpc/core/mempool.go b/rpc/core/mempool.go index 1c280ccd8..361633834 100644 --- a/rpc/core/mempool.go +++ b/rpc/core/mempool.go @@ -42,11 +42,12 @@ func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcas } r := res.GetCheckTx() return &ctypes.ResultBroadcastTx{ - Code: r.Code, - Data: r.Data, - Log: r.Log, - Codespace: r.Codespace, - Hash: tx.Hash(), + Code: r.Code, + Data: r.Data, + Log: r.Log, + Codespace: r.Codespace, + MempoolError: r.MempoolError, + Hash: tx.Hash(), }, nil } diff --git a/rpc/core/types/responses.go b/rpc/core/types/responses.go index d2a6620e1..3a873268d 100644 --- a/rpc/core/types/responses.go +++ b/rpc/core/types/responses.go @@ -179,10 +179,11 @@ type ResultConsensusState struct { // CheckTx result type ResultBroadcastTx struct { - Code uint32 `json:"code"` - Data bytes.HexBytes `json:"data"` - Log string `json:"log"` - Codespace string `json:"codespace"` + Code uint32 `json:"code"` + Data bytes.HexBytes `json:"data"` + Log string `json:"log"` + Codespace string `json:"codespace"` + MempoolError string `json:"mempool_error"` Hash bytes.HexBytes `json:"hash"` } diff --git a/state/execution.go b/state/execution.go index a1027cea3..de68518c7 100644 --- a/state/execution.go +++ b/state/execution.go @@ -308,6 +308,7 @@ func (blockExec *BlockExecutor) Commit( block, deliverTxResponses, TxPreCheck(state), + TxPostCheck(state), ) updateMempoolEndTime := time.Now().UnixNano() diff --git a/state/tx_filter.go b/state/tx_filter.go index aa940badd..66bb14943 100644 --- a/state/tx_filter.go +++ b/state/tx_filter.go @@ -14,3 +14,9 @@ func TxPreCheck(state State) mempl.PreCheckFunc { ) return mempl.PreCheckMaxBytes(maxDataBytes) } + +// TxPostCheck returns a function to filter transactions after processing. +// The function limits the gas wanted by a transaction to the block's maximum total gas. +func TxPostCheck(state State) mempl.PostCheckFunc { + return mempl.PostCheckMaxGas(state.ConsensusParams.Block.MaxGas) +} diff --git a/test/maverick/consensus/replay_stubs.go b/test/maverick/consensus/replay_stubs.go index d1f31a4b3..50f700fec 100644 --- a/test/maverick/consensus/replay_stubs.go +++ b/test/maverick/consensus/replay_stubs.go @@ -30,6 +30,7 @@ func (emptyMempool) Update( _ *types.Block, _ []*abci.ResponseDeliverTx, _ mempl.PreCheckFunc, + _ mempl.PostCheckFunc, ) error { return nil } diff --git a/test/maverick/node/node.go b/test/maverick/node/node.go index 90ededa2b..a82565b4a 100644 --- a/test/maverick/node/node.go +++ b/test/maverick/node/node.go @@ -394,6 +394,7 @@ func createMempoolAndMempoolReactor(config *cfg.Config, proxyApp proxy.AppConns, state.LastBlockHeight, mempl.WithMetrics(memplMetrics), mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state)), ) mempoolLogger := logger.With("module", "mempool") mempoolReactor := mempl.NewReactor(config.Mempool, config.P2P.RecvAsync, config.P2P.MempoolRecvBufSize, mempool) From d7d7f51b35fd00fb67ff613882f9b53b6818f88f Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Tue, 22 Nov 2022 18:42:07 +0900 Subject: [PATCH 04/15] Add postCheck error to response --- mempool/clist_mempool.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index cfce663b9..32dd8cc68 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -570,6 +570,10 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r, "err", postCheckErr) // NOTE: we remove tx from the cache because it might be good later mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) + + if postCheckErr != nil { + r.CheckTx.MempoolError = postCheckErr.Error() + } } } else { tx := req.GetCheckTx().Tx From 24c97c81f75ac89f4eb3f75c7e55ba1f7d04415e Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 17:00:44 +0900 Subject: [PATCH 05/15] Add tests --- mempool/clist_mempool_test.go | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index fdfe7e28d..eaf769e08 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -4,11 +4,13 @@ import ( "crypto/rand" "crypto/sha256" "encoding/binary" + "errors" "fmt" "io/ioutil" mrand "math/rand" "os" "path/filepath" + "sync" "testing" "time" @@ -699,3 +701,59 @@ func abciResponses(n int, code uint32) []*abci.ResponseDeliverTx { } return responses } + +func TestTxMempoolPostCheckError(t *testing.T) { + cases := []struct { + name string + err error + }{ + { + name: "error", + err: errors.New("test error"), + }, + { + name: "no error", + err: nil, + }, + } + for _, tc := range cases { + testCase := tc + t.Run(testCase.name, func(t *testing.T) { + app := kvstore.NewApplication() + cc := proxy.NewLocalClientCreator(app) + mempool, cleanup := newMempoolWithApp(cc) + defer cleanup() + + postCheckFn := func(_ types.Tx, _ *abci.ResponseCheckTx) error { + return testCase.err + } + mempool.postCheck = postCheckFn + + tx := types.Tx{1} + _, err := mempool.CheckTxSync(tx, TxInfo{}) + require.NoError(t, err) + + req := abci.RequestCheckTx{ + Tx: tx, + Type: abci.CheckTxType_Recheck, + } + res := &abci.Response{} + + m := sync.Mutex{} + m.Lock() + mempool.proxyAppConn.CheckTxAsync(req, func(r *abci.Response) { + res = r + m.Unlock() + }) + + checkTxRes, ok := res.Value.(*abci.Response_CheckTx) + require.True(t, ok) + expectedErrString := "" + if testCase.err != nil { + expectedErrString = testCase.err.Error() + } + require.Equal(t, expectedErrString, checkTxRes.CheckTx.MempoolError) + require.NoError(t, err) + }) + } +} From 39aabacb42f55613c56282605d4a6ff42f362ce6 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 17:32:00 +0900 Subject: [PATCH 06/15] fix test --- mempool/clist_mempool_test.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index eaf769e08..3440cd8ff 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -159,23 +159,31 @@ func TestMempoolFilters(t *testing.T) { emptyTxArr := []types.Tx{[]byte{}} nopPreFilter := func(tx types.Tx) error { return nil } + nopPostFilter := func(tx types.Tx, res *abci.ResponseCheckTx) error { return nil } // each table driven test creates numTxsToCreate txs with checkTx, and at the end clears all remaining txs. // each tx has 20 bytes tests := []struct { numTxsToCreate int preFilter PreCheckFunc + postFilter PostCheckFunc expectedNumTxs int }{ - {10, nopPreFilter, 10}, - {10, PreCheckMaxBytes(10), 0}, - {10, PreCheckMaxBytes(20), 0}, - {10, PreCheckMaxBytes(22), 10}, - {10, PreCheckMaxBytes(30), 10}, + {10, nopPreFilter, nopPostFilter, 10}, + {10, PreCheckMaxBytes(10), nopPostFilter, 0}, + {10, PreCheckMaxBytes(22), nopPostFilter, 10}, + {10, nopPreFilter, PostCheckMaxGas(-1), 10}, + {10, nopPreFilter, PostCheckMaxGas(0), 10}, + {10, nopPreFilter, PostCheckMaxGas(1), 10}, + {10, nopPreFilter, PostCheckMaxGas(3000), 10}, + {10, PreCheckMaxBytes(10), PostCheckMaxGas(20), 0}, + {10, PreCheckMaxBytes(30), PostCheckMaxGas(20), 10}, + {10, PreCheckMaxBytes(22), PostCheckMaxGas(1), 10}, + {10, PreCheckMaxBytes(22), PostCheckMaxGas(0), 10}, } for tcIndex, tt := range tests { err := mempool.Update(newTestBlock(1, emptyTxArr), - abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, nil) + abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, tt.postFilter) require.NoError(t, err) checkTxs(t, mempool, tt.numTxsToCreate, UnknownPeerID) require.Equal(t, tt.expectedNumTxs, mempool.Size(), "mempool had the incorrect size, on test case %d", tcIndex) From 343c17213760915a15d0d72e70337ae0e85df302 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 17:47:07 +0900 Subject: [PATCH 07/15] Revert "fix test" This reverts commit 39aabacb42f55613c56282605d4a6ff42f362ce6. --- mempool/clist_mempool_test.go | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index 3440cd8ff..eaf769e08 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -159,31 +159,23 @@ func TestMempoolFilters(t *testing.T) { emptyTxArr := []types.Tx{[]byte{}} nopPreFilter := func(tx types.Tx) error { return nil } - nopPostFilter := func(tx types.Tx, res *abci.ResponseCheckTx) error { return nil } // each table driven test creates numTxsToCreate txs with checkTx, and at the end clears all remaining txs. // each tx has 20 bytes tests := []struct { numTxsToCreate int preFilter PreCheckFunc - postFilter PostCheckFunc expectedNumTxs int }{ - {10, nopPreFilter, nopPostFilter, 10}, - {10, PreCheckMaxBytes(10), nopPostFilter, 0}, - {10, PreCheckMaxBytes(22), nopPostFilter, 10}, - {10, nopPreFilter, PostCheckMaxGas(-1), 10}, - {10, nopPreFilter, PostCheckMaxGas(0), 10}, - {10, nopPreFilter, PostCheckMaxGas(1), 10}, - {10, nopPreFilter, PostCheckMaxGas(3000), 10}, - {10, PreCheckMaxBytes(10), PostCheckMaxGas(20), 0}, - {10, PreCheckMaxBytes(30), PostCheckMaxGas(20), 10}, - {10, PreCheckMaxBytes(22), PostCheckMaxGas(1), 10}, - {10, PreCheckMaxBytes(22), PostCheckMaxGas(0), 10}, + {10, nopPreFilter, 10}, + {10, PreCheckMaxBytes(10), 0}, + {10, PreCheckMaxBytes(20), 0}, + {10, PreCheckMaxBytes(22), 10}, + {10, PreCheckMaxBytes(30), 10}, } for tcIndex, tt := range tests { err := mempool.Update(newTestBlock(1, emptyTxArr), - abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, tt.postFilter) + abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, nil) require.NoError(t, err) checkTxs(t, mempool, tt.numTxsToCreate, UnknownPeerID) require.Equal(t, tt.expectedNumTxs, mempool.Size(), "mempool had the incorrect size, on test case %d", tcIndex) From 6913c01f1d949945f273d138a1ab90217706ad20 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 18:11:51 +0900 Subject: [PATCH 08/15] Add PostCheckMaxGas tests --- mempool/mempool_test.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mempool/mempool_test.go diff --git a/mempool/mempool_test.go b/mempool/mempool_test.go new file mode 100644 index 000000000..31a50ffff --- /dev/null +++ b/mempool/mempool_test.go @@ -0,0 +1,29 @@ +package mempool + +import ( + "testing" + + abci "github.com/line/ostracon/abci/types" + "github.com/stretchr/testify/require" +) + +func TestPostCheckMaxGas(t *testing.T) { + tests := []struct { + res *abci.ResponseCheckTx + postCheck PostCheckFunc + ok bool + }{ + {&abci.ResponseCheckTx{GasWanted: 10}, PostCheckMaxGas(10), true}, + {&abci.ResponseCheckTx{GasWanted: 10}, PostCheckMaxGas(-1), true}, + {&abci.ResponseCheckTx{GasWanted: -1}, PostCheckMaxGas(10), false}, + {&abci.ResponseCheckTx{GasWanted: 11}, PostCheckMaxGas(10), false}, + } + for tcIndex, tt := range tests { + err := tt.postCheck(nil, tt.res) + if tt.ok { + require.NoError(t, err, "postCheck should not return error, on test case %d", tcIndex) + } else { + require.Error(t, err, "postCheck should return error, on test case %d", tcIndex) + } + } +} From 5ea342a1227c46ee4c0f60267a2bf30e0b9daea9 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 18:56:54 +0900 Subject: [PATCH 09/15] Remove meaningless checking --- mempool/clist_mempool_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index eaf769e08..0d3cab409 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -724,10 +724,9 @@ func TestTxMempoolPostCheckError(t *testing.T) { mempool, cleanup := newMempoolWithApp(cc) defer cleanup() - postCheckFn := func(_ types.Tx, _ *abci.ResponseCheckTx) error { + mempool.postCheck = func(_ types.Tx, _ *abci.ResponseCheckTx) error { return testCase.err } - mempool.postCheck = postCheckFn tx := types.Tx{1} _, err := mempool.CheckTxSync(tx, TxInfo{}) @@ -753,7 +752,6 @@ func TestTxMempoolPostCheckError(t *testing.T) { expectedErrString = testCase.err.Error() } require.Equal(t, expectedErrString, checkTxRes.CheckTx.MempoolError) - require.NoError(t, err) }) } } From ba1748ab5c9c4ec30fcd06103720daf139ea1dbe Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 20:12:49 +0900 Subject: [PATCH 10/15] Fix comments --- proto/ostracon/abci/types.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/ostracon/abci/types.proto b/proto/ostracon/abci/types.proto index b996bfef0..b7e6bb444 100644 --- a/proto/ostracon/abci/types.proto +++ b/proto/ostracon/abci/types.proto @@ -224,8 +224,8 @@ message ResponseCheckTx { repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8; - string sender = 9; // MEMO: not used, just reservation for mempool_error - int64 priority = 10; // MEMO: not used, just reservation for mempool_error + string sender = 9; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first + int64 priority = 10; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first string mempool_error = 11; } From ae299510ad507e34650175ba29988d54a528a4f5 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 21:57:38 +0900 Subject: [PATCH 11/15] Refactoring --- mempool/clist_mempool.go | 49 ++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 32dd8cc68..1bf61955a 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -551,45 +551,40 @@ func (mem *CListMempool) resCbFirstTime( func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { switch r := res.Value.(type) { case *abci.Response_CheckTx: + tx := req.GetCheckTx().Tx + txHash := TxKey(tx) + e, ok := mem.txsMap.Load(txHash) + if r.CheckTx.Code == abci.CodeTypeOK { - tx := req.GetCheckTx().Tx - txHash := TxKey(tx) - e, ok := mem.txsMap.Load(txHash) if !ok { panic(fmt.Sprintf("Unexpected tx response from proxy during recheck\ntxHash=%s, tx=%X", txHash, tx)) } - celem := e.(*clist.CElement) - var postCheckErr error - if mem.postCheck != nil { - postCheckErr = mem.postCheck(tx, r.CheckTx) + if mem.postCheck == nil { + return } - if (r.CheckTx.Code == abci.CodeTypeOK) && postCheckErr == nil { - // Good, nothing to do. - } else { - // Tx became invalidated due to newly committed block. - mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r, "err", postCheckErr) - // NOTE: we remove tx from the cache because it might be good later - mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) - - if postCheckErr != nil { - r.CheckTx.MempoolError = postCheckErr.Error() - } + postCheckErr := mem.postCheck(tx, r.CheckTx) + if postCheckErr == nil { + return } + celem := e.(*clist.CElement) + // Tx became invalidated due to newly committed block. + mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r, "err", postCheckErr) + // NOTE: we remove tx from the cache because it might be good later + mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) + r.CheckTx.MempoolError = postCheckErr.Error() } else { - tx := req.GetCheckTx().Tx - txHash := TxKey(tx) - if e, ok := mem.txsMap.Load(txHash); ok { - celem := e.(*clist.CElement) - // Tx became invalidated due to newly committed block. - mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r) - // NOTE: we remove tx from the cache because it might be good later - mem.removeTx(tx, celem, true) - } else { + if !ok { mem.logger.Debug( "re-CheckTx transaction does not exist", "expected", types.Tx(tx), ) + return } + celem := e.(*clist.CElement) + // Tx became invalidated due to newly committed block. + mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r) + // NOTE: we remove tx from the cache because it might be good later + mem.removeTx(tx, celem, true) } default: // ignore other messages From eabac2612a65daabf259aab050fd54ee8e985d1c Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 24 Nov 2022 22:03:25 +0900 Subject: [PATCH 12/15] Add comments --- proto/ostracon/abci/types.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proto/ostracon/abci/types.proto b/proto/ostracon/abci/types.proto index b7e6bb444..6bcb87869 100644 --- a/proto/ostracon/abci/types.proto +++ b/proto/ostracon/abci/types.proto @@ -226,6 +226,9 @@ message ResponseCheckTx { string codespace = 8; string sender = 9; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first int64 priority = 10; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first + + // mempool_error is set by Ostracon. + // ABCI applictions creating a ResponseCheckTX should not set mempool_error. string mempool_error = 11; } From 75bdb341fd572b962c52288b905794c6fd83d0b3 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Fri, 25 Nov 2022 13:09:19 +0900 Subject: [PATCH 13/15] Remove panic --- mempool/clist_mempool.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 1bf61955a..607e01c00 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -554,11 +554,15 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { tx := req.GetCheckTx().Tx txHash := TxKey(tx) e, ok := mem.txsMap.Load(txHash) + if !ok { + mem.logger.Debug( + "re-CheckTx transaction does not exist", + "expected", types.Tx(tx), + ) + return + } if r.CheckTx.Code == abci.CodeTypeOK { - if !ok { - panic(fmt.Sprintf("Unexpected tx response from proxy during recheck\ntxHash=%s, tx=%X", txHash, tx)) - } if mem.postCheck == nil { return } @@ -573,13 +577,6 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) r.CheckTx.MempoolError = postCheckErr.Error() } else { - if !ok { - mem.logger.Debug( - "re-CheckTx transaction does not exist", - "expected", types.Tx(tx), - ) - return - } celem := e.(*clist.CElement) // Tx became invalidated due to newly committed block. mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r) From af6a5082fde5133440db2a761b0712e1a610a292 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Fri, 25 Nov 2022 14:48:19 +0900 Subject: [PATCH 14/15] Fix redundant code --- mempool/clist_mempool.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 607e01c00..1c08dd93d 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -561,28 +561,22 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { ) return } - + var postCheckErr error if r.CheckTx.Code == abci.CodeTypeOK { if mem.postCheck == nil { return } - postCheckErr := mem.postCheck(tx, r.CheckTx) + postCheckErr = mem.postCheck(tx, r.CheckTx) if postCheckErr == nil { return } - celem := e.(*clist.CElement) - // Tx became invalidated due to newly committed block. - mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r, "err", postCheckErr) - // NOTE: we remove tx from the cache because it might be good later - mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) r.CheckTx.MempoolError = postCheckErr.Error() - } else { - celem := e.(*clist.CElement) - // Tx became invalidated due to newly committed block. - mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r) - // NOTE: we remove tx from the cache because it might be good later - mem.removeTx(tx, celem, true) } + celem := e.(*clist.CElement) + // Tx became invalidated due to newly committed block. + mem.logger.Debug("tx is no longer valid", "tx", txID(tx), "res", r, "err", postCheckErr) + // NOTE: we remove tx from the cache because it might be good later + mem.removeTx(tx, celem, !mem.config.KeepInvalidTxsInCache) default: // ignore other messages } From 953c00c1781eced1fd2e5a56cb279a3ea5985299 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Fri, 25 Nov 2022 15:22:06 +0900 Subject: [PATCH 15/15] Fix --- mempool/clist_mempool.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 1c08dd93d..05bf20adb 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -555,10 +555,7 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { txHash := TxKey(tx) e, ok := mem.txsMap.Load(txHash) if !ok { - mem.logger.Debug( - "re-CheckTx transaction does not exist", - "expected", types.Tx(tx), - ) + mem.logger.Debug("re-CheckTx transaction does not exist", "expected", types.Tx(tx)) return } var postCheckErr error