diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 4b05a167c58..fd858751bf9 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -4,6 +4,9 @@ ## Table of Contents +- [ibc/applications/fee/v1/ack.proto](#ibc/applications/fee/v1/ack.proto) + - [IncentivizedAcknowledgement](#ibc.applications.fee.v1.IncentivizedAcknowledgement) + - [ibc/core/client/v1/client.proto](#ibc/core/client/v1/client.proto) - [ClientConsensusStates](#ibc.core.client.v1.ClientConsensusStates) - [ClientUpdateProposal](#ibc.core.client.v1.ClientUpdateProposal) @@ -274,6 +277,39 @@ + +

Top

+ +## ibc/applications/fee/v1/ack.proto + + + + + +### IncentivizedAcknowledgement +IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +It contains the raw acknowledgement bytes, as well as the forward relayer address + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `result` | [bytes](#bytes) | | | +| `forward_relayer_address` | [string](#string) | | | + + + + + + + + + + + + + + +

Top

diff --git a/modules/apps/29-fee/types/ack.pb.go b/modules/apps/29-fee/types/ack.pb.go new file mode 100644 index 00000000000..0b970a8f918 --- /dev/null +++ b/modules/apps/29-fee/types/ack.pb.go @@ -0,0 +1,378 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/fee/v1/ack.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +// It contains the raw acknowledgement bytes, as well as the forward relayer address +type IncentivizedAcknowledgement struct { + Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + ForwardRelayerAddress string `protobuf:"bytes,2,opt,name=forward_relayer_address,json=forwardRelayerAddress,proto3" json:"forward_relayer_address,omitempty" yaml:"forward_relayer_address"` +} + +func (m *IncentivizedAcknowledgement) Reset() { *m = IncentivizedAcknowledgement{} } +func (m *IncentivizedAcknowledgement) String() string { return proto.CompactTextString(m) } +func (*IncentivizedAcknowledgement) ProtoMessage() {} +func (*IncentivizedAcknowledgement) Descriptor() ([]byte, []int) { + return fileDescriptor_ab2834946fb65ea4, []int{0} +} +func (m *IncentivizedAcknowledgement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IncentivizedAcknowledgement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IncentivizedAcknowledgement.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *IncentivizedAcknowledgement) XXX_Merge(src proto.Message) { + xxx_messageInfo_IncentivizedAcknowledgement.Merge(m, src) +} +func (m *IncentivizedAcknowledgement) XXX_Size() int { + return m.Size() +} +func (m *IncentivizedAcknowledgement) XXX_DiscardUnknown() { + xxx_messageInfo_IncentivizedAcknowledgement.DiscardUnknown(m) +} + +var xxx_messageInfo_IncentivizedAcknowledgement proto.InternalMessageInfo + +func (m *IncentivizedAcknowledgement) GetResult() []byte { + if m != nil { + return m.Result + } + return nil +} + +func (m *IncentivizedAcknowledgement) GetForwardRelayerAddress() string { + if m != nil { + return m.ForwardRelayerAddress + } + return "" +} + +func init() { + proto.RegisterType((*IncentivizedAcknowledgement)(nil), "ibc.applications.fee.v1.IncentivizedAcknowledgement") +} + +func init() { proto.RegisterFile("ibc/applications/fee/v1/ack.proto", fileDescriptor_ab2834946fb65ea4) } + +var fileDescriptor_ab2834946fb65ea4 = []byte{ + // 273 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0xb1, 0x4e, 0xf3, 0x30, + 0x10, 0x07, 0xf0, 0xf8, 0x1b, 0x2a, 0x7d, 0x11, 0x53, 0x04, 0xb4, 0x02, 0xc9, 0x94, 0x4c, 0x5d, + 0x1a, 0xab, 0x65, 0x82, 0xad, 0xdd, 0x90, 0x98, 0x32, 0x76, 0xa9, 0x1c, 0xfb, 0x12, 0xac, 0x3a, + 0xb9, 0xc8, 0x76, 0x52, 0x85, 0xa7, 0x80, 0xb7, 0x62, 0xec, 0xc8, 0x84, 0x50, 0xf2, 0x06, 0x3c, + 0x01, 0x4a, 0xd3, 0x81, 0x85, 0xed, 0xee, 0xfe, 0xbf, 0xe5, 0xfe, 0xfe, 0xad, 0x4a, 0x04, 0xe3, + 0x65, 0xa9, 0x95, 0xe0, 0x4e, 0x61, 0x61, 0x59, 0x0a, 0xc0, 0xea, 0x05, 0xe3, 0x62, 0x17, 0x95, + 0x06, 0x1d, 0x06, 0x63, 0x95, 0x88, 0xe8, 0x37, 0x89, 0x52, 0x80, 0xa8, 0x5e, 0x5c, 0x9d, 0x67, + 0x98, 0xe1, 0xd1, 0xb0, 0x7e, 0x1a, 0x78, 0xf8, 0x46, 0xfc, 0xeb, 0xc7, 0x42, 0x40, 0xe1, 0x54, + 0xad, 0x5e, 0x40, 0xae, 0xc4, 0xae, 0xc0, 0xbd, 0x06, 0x99, 0x41, 0x0e, 0x85, 0x0b, 0x2e, 0xfd, + 0x91, 0x01, 0x5b, 0x69, 0x37, 0x21, 0x53, 0x32, 0x3b, 0x8b, 0x4f, 0x5b, 0xb0, 0xf1, 0xc7, 0x29, + 0x9a, 0x3d, 0x37, 0x72, 0x6b, 0x40, 0xf3, 0x06, 0xcc, 0x96, 0x4b, 0x69, 0xc0, 0xda, 0xc9, 0xbf, + 0x29, 0x99, 0xfd, 0x5f, 0x87, 0xdf, 0x9f, 0x37, 0xb4, 0xe1, 0xb9, 0x7e, 0x08, 0xff, 0x80, 0x61, + 0x7c, 0x71, 0x4a, 0xe2, 0x21, 0x58, 0x0d, 0xf7, 0xf5, 0xd3, 0x7b, 0x4b, 0xc9, 0xa1, 0xa5, 0xe4, + 0xab, 0xa5, 0xe4, 0xb5, 0xa3, 0xde, 0xa1, 0xa3, 0xde, 0x47, 0x47, 0xbd, 0xcd, 0x32, 0x53, 0xee, + 0xb9, 0x4a, 0x22, 0x81, 0x39, 0x13, 0x68, 0x73, 0xb4, 0x4c, 0x25, 0x62, 0x9e, 0x21, 0xcb, 0x51, + 0x56, 0x1a, 0x6c, 0x5f, 0x8e, 0x65, 0xcb, 0xfb, 0x79, 0xdf, 0x8b, 0x6b, 0x4a, 0xb0, 0xc9, 0xe8, + 0xf8, 0xe8, 0xdd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0x06, 0x77, 0x12, 0x3c, 0x01, 0x00, + 0x00, +} + +func (m *IncentivizedAcknowledgement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IncentivizedAcknowledgement) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IncentivizedAcknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ForwardRelayerAddress) > 0 { + i -= len(m.ForwardRelayerAddress) + copy(dAtA[i:], m.ForwardRelayerAddress) + i = encodeVarintAck(dAtA, i, uint64(len(m.ForwardRelayerAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Result) > 0 { + i -= len(m.Result) + copy(dAtA[i:], m.Result) + i = encodeVarintAck(dAtA, i, uint64(len(m.Result))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAck(dAtA []byte, offset int, v uint64) int { + offset -= sovAck(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *IncentivizedAcknowledgement) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Result) + if l > 0 { + n += 1 + l + sovAck(uint64(l)) + } + l = len(m.ForwardRelayerAddress) + if l > 0 { + n += 1 + l + sovAck(uint64(l)) + } + return n +} + +func sovAck(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAck(x uint64) (n int) { + return sovAck(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IncentivizedAcknowledgement) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAck + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IncentivizedAcknowledgement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IncentivizedAcknowledgement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAck + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAck + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAck + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Result = append(m.Result[:0], dAtA[iNdEx:postIndex]...) + if m.Result == nil { + m.Result = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwardRelayerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAck + } + 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 ErrInvalidLengthAck + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAck + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwardRelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAck(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAck + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAck(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAck + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAck + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAck + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAck + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAck + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAck + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAck = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAck = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAck = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/ibc/applications/fee/v1/ack.proto b/proto/ibc/applications/fee/v1/ack.proto new file mode 100644 index 00000000000..bfc76e38385 --- /dev/null +++ b/proto/ibc/applications/fee/v1/ack.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; +import "gogoproto/gogo.proto"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; + +// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +// It contains the raw acknowledgement bytes, as well as the forward relayer address +message IncentivizedAcknowledgement { + bytes result = 1; + string forward_relayer_address = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer_address\""]; +} \ No newline at end of file