From e3ea311a8912e64a52e765bd419c63c65b5fb3ef Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 23 Apr 2024 11:25:32 +0200 Subject: [PATCH] Add `ListenToBlockMetadata` and `ListenToDroppedBlocks` --- go/inx.pb.go | 266 ++++++++++++++++++++++++---------------------- go/inx_grpc.pb.go | 140 ++++++++++++++++++++++-- go/utils.go | 12 +-- proto/inx.proto | 2 + 4 files changed, 281 insertions(+), 139 deletions(-) diff --git a/go/inx.pb.go b/go/inx.pb.go index bc6e73b..d124c9d 100644 --- a/go/inx.pb.go +++ b/go/inx.pb.go @@ -3572,8 +3572,8 @@ var file_inx_proto_rawDesc = []byte{ 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xf2, - 0x0c, 0x0a, 0x03, 0x49, 0x4e, 0x58, 0x12, 0x30, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x4e, 0x6f, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xee, + 0x0d, 0x0a, 0x03, 0x49, 0x4e, 0x58, 0x12, 0x30, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, @@ -3602,83 +3602,91 @@ var file_inx_proto_rawDesc = []byte{ 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x0a, 0x2e, 0x69, 0x6e, - 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x16, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x2a, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, - 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x1a, - 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x35, - 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x64, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x10, 0x2e, 0x69, 0x6e, - 0x78, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x4a, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, - 0x75, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, 0x75, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0f, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x39, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x55, 0x6e, 0x73, 0x70, - 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x15, 0x52, - 0x65, 0x61, 0x64, 0x49, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, - 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3d, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, - 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x44, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x54, - 0x6f, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x15, - 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4c, 0x65, 0x64, 0x67, - 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x1c, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, - 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x30, 0x01, 0x12, 0x30, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x49, 0x64, 0x1a, 0x13, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, - 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x39, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x50, - 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x69, - 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x11, 0x50, - 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0f, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x10, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x69, 0x6f, 0x74, 0x61, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x78, - 0x2f, 0x67, 0x6f, 0x3b, 0x69, 0x6e, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x54, 0x6f, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, + 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x12, + 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x30, 0x01, 0x12, 0x2a, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x1a, 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, + 0x12, 0x28, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0c, 0x2e, + 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x1a, 0x0d, 0x2e, 0x69, 0x6e, + 0x78, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x35, 0x0a, 0x11, 0x52, 0x65, + 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x0c, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x1a, 0x12, 0x2e, + 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x10, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x53, 0x6c, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x69, 0x6e, 0x78, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, + 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x11, + 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, + 0x75, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, + 0x6e, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x0f, 0x2e, 0x69, 0x6e, + 0x78, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x1e, 0x2e, 0x69, + 0x6e, 0x78, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x12, + 0x52, 0x65, 0x61, 0x64, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x12, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, 0x49, + 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, + 0x52, 0x65, 0x61, 0x64, 0x49, 0x73, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x16, 0x52, + 0x65, 0x61, 0x64, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, + 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x43, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x54, 0x6f, 0x4c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x69, 0x6e, 0x78, + 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x11, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x54, 0x6f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x18, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x30, + 0x01, 0x12, 0x30, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x64, 0x1a, 0x13, + 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, + 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, + 0x49, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, + 0x69, 0x6e, 0x78, 0x2e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x39, 0x0a, 0x12, + 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x12, 0x14, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x69, 0x6e, 0x78, 0x2e, 0x4e, + 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x6d, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0f, 0x2e, 0x69, + 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, + 0x69, 0x6e, 0x78, 0x2e, 0x41, 0x50, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6f, + 0x74, 0x61, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x78, 0x2f, 0x67, 0x6f, 0x3b, + 0x69, 0x6e, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3801,54 +3809,58 @@ var file_inx_proto_depIdxs = []int32{ 12, // 53: inx.INX.ReadCommitment:input_type -> inx.CommitmentRequest 13, // 54: inx.INX.ForceCommitUntil:input_type -> inx.SlotRequest 4, // 55: inx.INX.ListenToBlocks:input_type -> inx.NoParams - 4, // 56: inx.INX.ListenToAcceptedBlocks:input_type -> inx.NoParams - 4, // 57: inx.INX.ListenToConfirmedBlocks:input_type -> inx.NoParams - 17, // 58: inx.INX.SubmitBlock:input_type -> inx.RawBlock - 18, // 59: inx.INX.ReadBlock:input_type -> inx.BlockId - 18, // 60: inx.INX.ReadBlockMetadata:input_type -> inx.BlockId - 13, // 61: inx.INX.ReadAcceptedBlocks:input_type -> inx.SlotRequest - 29, // 62: inx.INX.ReadTransactionMetadata:input_type -> inx.TransactionId - 23, // 63: inx.INX.ReadBlockIssuance:input_type -> inx.BlockIssuanceRequest - 25, // 64: inx.INX.ValidatePayload:input_type -> inx.RawPayload - 4, // 65: inx.INX.ReadUnspentOutputs:input_type -> inx.NoParams - 39, // 66: inx.INX.ReadIsCommitteeMember:input_type -> inx.AccountInfoRequest - 39, // 67: inx.INX.ReadIsCandidate:input_type -> inx.AccountInfoRequest - 39, // 68: inx.INX.ReadIsValidatorAccount:input_type -> inx.AccountInfoRequest - 14, // 69: inx.INX.ListenToLedgerUpdates:input_type -> inx.SlotRangeRequest - 4, // 70: inx.INX.ListenToAcceptedTransactions:input_type -> inx.NoParams - 30, // 71: inx.INX.ReadOutput:input_type -> inx.OutputId - 41, // 72: inx.INX.RegisterAPIRoute:input_type -> inx.APIRouteRequest - 41, // 73: inx.INX.UnregisterAPIRoute:input_type -> inx.APIRouteRequest - 42, // 74: inx.INX.PerformAPIRequest:input_type -> inx.APIRequest - 7, // 75: inx.INX.ReadNodeStatus:output_type -> inx.NodeStatus - 7, // 76: inx.INX.ListenToNodeStatus:output_type -> inx.NodeStatus - 5, // 77: inx.INX.ReadNodeConfiguration:output_type -> inx.NodeConfiguration - 27, // 78: inx.INX.ReadActiveRootBlocks:output_type -> inx.RootBlocksResponse - 15, // 79: inx.INX.ListenToCommitments:output_type -> inx.Commitment - 15, // 80: inx.INX.ReadCommitment:output_type -> inx.Commitment - 4, // 81: inx.INX.ForceCommitUntil:output_type -> inx.NoParams - 19, // 82: inx.INX.ListenToBlocks:output_type -> inx.Block - 21, // 83: inx.INX.ListenToAcceptedBlocks:output_type -> inx.BlockMetadata - 21, // 84: inx.INX.ListenToConfirmedBlocks:output_type -> inx.BlockMetadata - 18, // 85: inx.INX.SubmitBlock:output_type -> inx.BlockId - 17, // 86: inx.INX.ReadBlock:output_type -> inx.RawBlock - 21, // 87: inx.INX.ReadBlockMetadata:output_type -> inx.BlockMetadata - 20, // 88: inx.INX.ReadAcceptedBlocks:output_type -> inx.BlockWithMetadata - 22, // 89: inx.INX.ReadTransactionMetadata:output_type -> inx.TransactionMetadata - 24, // 90: inx.INX.ReadBlockIssuance:output_type -> inx.BlockIssuanceResponse - 26, // 91: inx.INX.ValidatePayload:output_type -> inx.PayloadValidationResponse - 32, // 92: inx.INX.ReadUnspentOutputs:output_type -> inx.UnspentOutput - 40, // 93: inx.INX.ReadIsCommitteeMember:output_type -> inx.BoolResponse - 40, // 94: inx.INX.ReadIsCandidate:output_type -> inx.BoolResponse - 40, // 95: inx.INX.ReadIsValidatorAccount:output_type -> inx.BoolResponse - 37, // 96: inx.INX.ListenToLedgerUpdates:output_type -> inx.LedgerUpdate - 38, // 97: inx.INX.ListenToAcceptedTransactions:output_type -> inx.AcceptedTransaction - 31, // 98: inx.INX.ReadOutput:output_type -> inx.OutputResponse - 4, // 99: inx.INX.RegisterAPIRoute:output_type -> inx.NoParams - 4, // 100: inx.INX.UnregisterAPIRoute:output_type -> inx.NoParams - 43, // 101: inx.INX.PerformAPIRequest:output_type -> inx.APIResponse - 75, // [75:102] is the sub-list for method output_type - 48, // [48:75] is the sub-list for method input_type + 4, // 56: inx.INX.ListenToBlockMetadata:input_type -> inx.NoParams + 4, // 57: inx.INX.ListenToAcceptedBlocks:input_type -> inx.NoParams + 4, // 58: inx.INX.ListenToConfirmedBlocks:input_type -> inx.NoParams + 4, // 59: inx.INX.ListenToDroppedBlocks:input_type -> inx.NoParams + 17, // 60: inx.INX.SubmitBlock:input_type -> inx.RawBlock + 18, // 61: inx.INX.ReadBlock:input_type -> inx.BlockId + 18, // 62: inx.INX.ReadBlockMetadata:input_type -> inx.BlockId + 13, // 63: inx.INX.ReadAcceptedBlocks:input_type -> inx.SlotRequest + 29, // 64: inx.INX.ReadTransactionMetadata:input_type -> inx.TransactionId + 23, // 65: inx.INX.ReadBlockIssuance:input_type -> inx.BlockIssuanceRequest + 25, // 66: inx.INX.ValidatePayload:input_type -> inx.RawPayload + 4, // 67: inx.INX.ReadUnspentOutputs:input_type -> inx.NoParams + 39, // 68: inx.INX.ReadIsCommitteeMember:input_type -> inx.AccountInfoRequest + 39, // 69: inx.INX.ReadIsCandidate:input_type -> inx.AccountInfoRequest + 39, // 70: inx.INX.ReadIsValidatorAccount:input_type -> inx.AccountInfoRequest + 14, // 71: inx.INX.ListenToLedgerUpdates:input_type -> inx.SlotRangeRequest + 4, // 72: inx.INX.ListenToAcceptedTransactions:input_type -> inx.NoParams + 30, // 73: inx.INX.ReadOutput:input_type -> inx.OutputId + 41, // 74: inx.INX.RegisterAPIRoute:input_type -> inx.APIRouteRequest + 41, // 75: inx.INX.UnregisterAPIRoute:input_type -> inx.APIRouteRequest + 42, // 76: inx.INX.PerformAPIRequest:input_type -> inx.APIRequest + 7, // 77: inx.INX.ReadNodeStatus:output_type -> inx.NodeStatus + 7, // 78: inx.INX.ListenToNodeStatus:output_type -> inx.NodeStatus + 5, // 79: inx.INX.ReadNodeConfiguration:output_type -> inx.NodeConfiguration + 27, // 80: inx.INX.ReadActiveRootBlocks:output_type -> inx.RootBlocksResponse + 15, // 81: inx.INX.ListenToCommitments:output_type -> inx.Commitment + 15, // 82: inx.INX.ReadCommitment:output_type -> inx.Commitment + 4, // 83: inx.INX.ForceCommitUntil:output_type -> inx.NoParams + 19, // 84: inx.INX.ListenToBlocks:output_type -> inx.Block + 21, // 85: inx.INX.ListenToBlockMetadata:output_type -> inx.BlockMetadata + 21, // 86: inx.INX.ListenToAcceptedBlocks:output_type -> inx.BlockMetadata + 21, // 87: inx.INX.ListenToConfirmedBlocks:output_type -> inx.BlockMetadata + 21, // 88: inx.INX.ListenToDroppedBlocks:output_type -> inx.BlockMetadata + 18, // 89: inx.INX.SubmitBlock:output_type -> inx.BlockId + 17, // 90: inx.INX.ReadBlock:output_type -> inx.RawBlock + 21, // 91: inx.INX.ReadBlockMetadata:output_type -> inx.BlockMetadata + 20, // 92: inx.INX.ReadAcceptedBlocks:output_type -> inx.BlockWithMetadata + 22, // 93: inx.INX.ReadTransactionMetadata:output_type -> inx.TransactionMetadata + 24, // 94: inx.INX.ReadBlockIssuance:output_type -> inx.BlockIssuanceResponse + 26, // 95: inx.INX.ValidatePayload:output_type -> inx.PayloadValidationResponse + 32, // 96: inx.INX.ReadUnspentOutputs:output_type -> inx.UnspentOutput + 40, // 97: inx.INX.ReadIsCommitteeMember:output_type -> inx.BoolResponse + 40, // 98: inx.INX.ReadIsCandidate:output_type -> inx.BoolResponse + 40, // 99: inx.INX.ReadIsValidatorAccount:output_type -> inx.BoolResponse + 37, // 100: inx.INX.ListenToLedgerUpdates:output_type -> inx.LedgerUpdate + 38, // 101: inx.INX.ListenToAcceptedTransactions:output_type -> inx.AcceptedTransaction + 31, // 102: inx.INX.ReadOutput:output_type -> inx.OutputResponse + 4, // 103: inx.INX.RegisterAPIRoute:output_type -> inx.NoParams + 4, // 104: inx.INX.UnregisterAPIRoute:output_type -> inx.NoParams + 43, // 105: inx.INX.PerformAPIRequest:output_type -> inx.APIResponse + 77, // [77:106] is the sub-list for method output_type + 48, // [48:77] is the sub-list for method input_type 48, // [48:48] is the sub-list for extension type_name 48, // [48:48] is the sub-list for extension extendee 0, // [0:48] is the sub-list for field type_name diff --git a/go/inx_grpc.pb.go b/go/inx_grpc.pb.go index 50df19d..1cb6ebc 100644 --- a/go/inx_grpc.pb.go +++ b/go/inx_grpc.pb.go @@ -27,8 +27,10 @@ const ( INX_ReadCommitment_FullMethodName = "/inx.INX/ReadCommitment" INX_ForceCommitUntil_FullMethodName = "/inx.INX/ForceCommitUntil" INX_ListenToBlocks_FullMethodName = "/inx.INX/ListenToBlocks" + INX_ListenToBlockMetadata_FullMethodName = "/inx.INX/ListenToBlockMetadata" INX_ListenToAcceptedBlocks_FullMethodName = "/inx.INX/ListenToAcceptedBlocks" INX_ListenToConfirmedBlocks_FullMethodName = "/inx.INX/ListenToConfirmedBlocks" + INX_ListenToDroppedBlocks_FullMethodName = "/inx.INX/ListenToDroppedBlocks" INX_SubmitBlock_FullMethodName = "/inx.INX/SubmitBlock" INX_ReadBlock_FullMethodName = "/inx.INX/ReadBlock" INX_ReadBlockMetadata_FullMethodName = "/inx.INX/ReadBlockMetadata" @@ -63,8 +65,10 @@ type INXClient interface { ForceCommitUntil(ctx context.Context, in *SlotRequest, opts ...grpc.CallOption) (*NoParams, error) // Blocks ListenToBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToBlocksClient, error) + ListenToBlockMetadata(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToBlockMetadataClient, error) ListenToAcceptedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToAcceptedBlocksClient, error) ListenToConfirmedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToConfirmedBlocksClient, error) + ListenToDroppedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToDroppedBlocksClient, error) SubmitBlock(ctx context.Context, in *RawBlock, opts ...grpc.CallOption) (*BlockId, error) ReadBlock(ctx context.Context, in *BlockId, opts ...grpc.CallOption) (*RawBlock, error) ReadBlockMetadata(ctx context.Context, in *BlockId, opts ...grpc.CallOption) (*BlockMetadata, error) @@ -242,8 +246,40 @@ func (x *iNXListenToBlocksClient) Recv() (*Block, error) { return m, nil } +func (c *iNXClient) ListenToBlockMetadata(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToBlockMetadataClient, error) { + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[3], INX_ListenToBlockMetadata_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &iNXListenToBlockMetadataClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type INX_ListenToBlockMetadataClient interface { + Recv() (*BlockMetadata, error) + grpc.ClientStream +} + +type iNXListenToBlockMetadataClient struct { + grpc.ClientStream +} + +func (x *iNXListenToBlockMetadataClient) Recv() (*BlockMetadata, error) { + m := new(BlockMetadata) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *iNXClient) ListenToAcceptedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToAcceptedBlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[3], INX_ListenToAcceptedBlocks_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[4], INX_ListenToAcceptedBlocks_FullMethodName, opts...) if err != nil { return nil, err } @@ -275,7 +311,7 @@ func (x *iNXListenToAcceptedBlocksClient) Recv() (*BlockMetadata, error) { } func (c *iNXClient) ListenToConfirmedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToConfirmedBlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[4], INX_ListenToConfirmedBlocks_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[5], INX_ListenToConfirmedBlocks_FullMethodName, opts...) if err != nil { return nil, err } @@ -306,6 +342,38 @@ func (x *iNXListenToConfirmedBlocksClient) Recv() (*BlockMetadata, error) { return m, nil } +func (c *iNXClient) ListenToDroppedBlocks(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToDroppedBlocksClient, error) { + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[6], INX_ListenToDroppedBlocks_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &iNXListenToDroppedBlocksClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type INX_ListenToDroppedBlocksClient interface { + Recv() (*BlockMetadata, error) + grpc.ClientStream +} + +type iNXListenToDroppedBlocksClient struct { + grpc.ClientStream +} + +func (x *iNXListenToDroppedBlocksClient) Recv() (*BlockMetadata, error) { + m := new(BlockMetadata) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *iNXClient) SubmitBlock(ctx context.Context, in *RawBlock, opts ...grpc.CallOption) (*BlockId, error) { out := new(BlockId) err := c.cc.Invoke(ctx, INX_SubmitBlock_FullMethodName, in, out, opts...) @@ -334,7 +402,7 @@ func (c *iNXClient) ReadBlockMetadata(ctx context.Context, in *BlockId, opts ... } func (c *iNXClient) ReadAcceptedBlocks(ctx context.Context, in *SlotRequest, opts ...grpc.CallOption) (INX_ReadAcceptedBlocksClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[5], INX_ReadAcceptedBlocks_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[7], INX_ReadAcceptedBlocks_FullMethodName, opts...) if err != nil { return nil, err } @@ -393,7 +461,7 @@ func (c *iNXClient) ValidatePayload(ctx context.Context, in *RawPayload, opts .. } func (c *iNXClient) ReadUnspentOutputs(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ReadUnspentOutputsClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[6], INX_ReadUnspentOutputs_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[8], INX_ReadUnspentOutputs_FullMethodName, opts...) if err != nil { return nil, err } @@ -452,7 +520,7 @@ func (c *iNXClient) ReadIsValidatorAccount(ctx context.Context, in *AccountInfoR } func (c *iNXClient) ListenToLedgerUpdates(ctx context.Context, in *SlotRangeRequest, opts ...grpc.CallOption) (INX_ListenToLedgerUpdatesClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[7], INX_ListenToLedgerUpdates_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[9], INX_ListenToLedgerUpdates_FullMethodName, opts...) if err != nil { return nil, err } @@ -484,7 +552,7 @@ func (x *iNXListenToLedgerUpdatesClient) Recv() (*LedgerUpdate, error) { } func (c *iNXClient) ListenToAcceptedTransactions(ctx context.Context, in *NoParams, opts ...grpc.CallOption) (INX_ListenToAcceptedTransactionsClient, error) { - stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[8], INX_ListenToAcceptedTransactions_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &INX_ServiceDesc.Streams[10], INX_ListenToAcceptedTransactions_FullMethodName, opts...) if err != nil { return nil, err } @@ -566,8 +634,10 @@ type INXServer interface { ForceCommitUntil(context.Context, *SlotRequest) (*NoParams, error) // Blocks ListenToBlocks(*NoParams, INX_ListenToBlocksServer) error + ListenToBlockMetadata(*NoParams, INX_ListenToBlockMetadataServer) error ListenToAcceptedBlocks(*NoParams, INX_ListenToAcceptedBlocksServer) error ListenToConfirmedBlocks(*NoParams, INX_ListenToConfirmedBlocksServer) error + ListenToDroppedBlocks(*NoParams, INX_ListenToDroppedBlocksServer) error SubmitBlock(context.Context, *RawBlock) (*BlockId, error) ReadBlock(context.Context, *BlockId) (*RawBlock, error) ReadBlockMetadata(context.Context, *BlockId) (*BlockMetadata, error) @@ -625,12 +695,18 @@ func (UnimplementedINXServer) ForceCommitUntil(context.Context, *SlotRequest) (* func (UnimplementedINXServer) ListenToBlocks(*NoParams, INX_ListenToBlocksServer) error { return status.Errorf(codes.Unimplemented, "method ListenToBlocks not implemented") } +func (UnimplementedINXServer) ListenToBlockMetadata(*NoParams, INX_ListenToBlockMetadataServer) error { + return status.Errorf(codes.Unimplemented, "method ListenToBlockMetadata not implemented") +} func (UnimplementedINXServer) ListenToAcceptedBlocks(*NoParams, INX_ListenToAcceptedBlocksServer) error { return status.Errorf(codes.Unimplemented, "method ListenToAcceptedBlocks not implemented") } func (UnimplementedINXServer) ListenToConfirmedBlocks(*NoParams, INX_ListenToConfirmedBlocksServer) error { return status.Errorf(codes.Unimplemented, "method ListenToConfirmedBlocks not implemented") } +func (UnimplementedINXServer) ListenToDroppedBlocks(*NoParams, INX_ListenToDroppedBlocksServer) error { + return status.Errorf(codes.Unimplemented, "method ListenToDroppedBlocks not implemented") +} func (UnimplementedINXServer) SubmitBlock(context.Context, *RawBlock) (*BlockId, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitBlock not implemented") } @@ -848,6 +924,27 @@ func (x *iNXListenToBlocksServer) Send(m *Block) error { return x.ServerStream.SendMsg(m) } +func _INX_ListenToBlockMetadata_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(NoParams) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(INXServer).ListenToBlockMetadata(m, &iNXListenToBlockMetadataServer{stream}) +} + +type INX_ListenToBlockMetadataServer interface { + Send(*BlockMetadata) error + grpc.ServerStream +} + +type iNXListenToBlockMetadataServer struct { + grpc.ServerStream +} + +func (x *iNXListenToBlockMetadataServer) Send(m *BlockMetadata) error { + return x.ServerStream.SendMsg(m) +} + func _INX_ListenToAcceptedBlocks_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(NoParams) if err := stream.RecvMsg(m); err != nil { @@ -890,6 +987,27 @@ func (x *iNXListenToConfirmedBlocksServer) Send(m *BlockMetadata) error { return x.ServerStream.SendMsg(m) } +func _INX_ListenToDroppedBlocks_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(NoParams) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(INXServer).ListenToDroppedBlocks(m, &iNXListenToDroppedBlocksServer{stream}) +} + +type INX_ListenToDroppedBlocksServer interface { + Send(*BlockMetadata) error + grpc.ServerStream +} + +type iNXListenToDroppedBlocksServer struct { + grpc.ServerStream +} + +func (x *iNXListenToDroppedBlocksServer) Send(m *BlockMetadata) error { + return x.ServerStream.SendMsg(m) +} + func _INX_SubmitBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RawBlock) if err := dec(in); err != nil { @@ -1304,6 +1422,11 @@ var INX_ServiceDesc = grpc.ServiceDesc{ Handler: _INX_ListenToBlocks_Handler, ServerStreams: true, }, + { + StreamName: "ListenToBlockMetadata", + Handler: _INX_ListenToBlockMetadata_Handler, + ServerStreams: true, + }, { StreamName: "ListenToAcceptedBlocks", Handler: _INX_ListenToAcceptedBlocks_Handler, @@ -1314,6 +1437,11 @@ var INX_ServiceDesc = grpc.ServiceDesc{ Handler: _INX_ListenToConfirmedBlocks_Handler, ServerStreams: true, }, + { + StreamName: "ListenToDroppedBlocks", + Handler: _INX_ListenToDroppedBlocks_Handler, + ServerStreams: true, + }, { StreamName: "ReadAcceptedBlocks", Handler: _INX_ReadAcceptedBlocks_Handler, diff --git a/go/utils.go b/go/utils.go index a657260..4ac3237 100644 --- a/go/utils.go +++ b/go/utils.go @@ -75,14 +75,14 @@ func WrapRootBlocks(rootBlocks map[iotago.BlockID]iotago.CommitmentID) *RootBloc } } -func (x *RootBlocksResponse) Unwrap() (map[iotago.BlockID]iotago.CommitmentID, error) { +func (x *RootBlocksResponse) Unwrap() map[iotago.BlockID]iotago.CommitmentID { rootBlockUnwrapped := make(map[iotago.BlockID]iotago.CommitmentID) for _, rootBlock := range x.GetRootBlocks() { rootBlockUnwrapped[rootBlock.GetBlockId().Unwrap()] = rootBlock.GetCommitmentId().Unwrap() } - return rootBlockUnwrapped, nil + return rootBlockUnwrapped } func WrapSlotRequest(slot iotago.SlotIndex) *SlotRequest { @@ -105,18 +105,18 @@ func (x BlockMetadata_BlockState) Unwrap() api.BlockState { return api.BlockState(x) } -func WrapBlockMetadata(blockMetadata *api.BlockMetadataResponse) (*BlockMetadata, error) { +func WrapBlockMetadata(blockMetadata *api.BlockMetadataResponse) *BlockMetadata { return &BlockMetadata{ BlockId: NewBlockId(blockMetadata.BlockID), BlockState: WrapBlockState(blockMetadata.BlockState), - }, nil + } } -func (x *BlockMetadata) Unwrap() (*api.BlockMetadataResponse, error) { +func (x *BlockMetadata) Unwrap() *api.BlockMetadataResponse { return &api.BlockMetadataResponse{ BlockID: x.GetBlockId().Unwrap(), BlockState: x.GetBlockState().Unwrap(), - }, nil + } } // TransactionMetadata diff --git a/proto/inx.proto b/proto/inx.proto index e7f0830..02ea578 100644 --- a/proto/inx.proto +++ b/proto/inx.proto @@ -17,8 +17,10 @@ service INX { // Blocks rpc ListenToBlocks(NoParams) returns (stream Block); + rpc ListenToBlockMetadata(NoParams) returns (stream BlockMetadata); rpc ListenToAcceptedBlocks(NoParams) returns (stream BlockMetadata); rpc ListenToConfirmedBlocks(NoParams) returns (stream BlockMetadata); + rpc ListenToDroppedBlocks(NoParams) returns (stream BlockMetadata); rpc SubmitBlock(RawBlock) returns (BlockId); rpc ReadBlock(BlockId) returns (RawBlock); rpc ReadBlockMetadata(BlockId) returns (BlockMetadata);