Commit 32cb8102 authored by Alessandro Sorniotti's avatar Alessandro Sorniotti Committed by Gerrit Code Review
Browse files

Merge "[FAB-12789] Token Expectation in Proposal Response"

parents 32ead688 3430e832
......@@ -6,6 +6,7 @@ package peer // import "github.com/hyperledger/fabric/protos/peer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import token "github.com/hyperledger/fabric/protos/token"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
......@@ -58,7 +59,7 @@ func (m *SignedProposal) Reset() { *m = SignedProposal{} }
func (m *SignedProposal) String() string { return proto.CompactTextString(m) }
func (*SignedProposal) ProtoMessage() {}
func (*SignedProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_8e93dae9c9555ac0, []int{0}
return fileDescriptor_proposal_33e23f5bd2671745, []int{0}
}
func (m *SignedProposal) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignedProposal.Unmarshal(m, b)
......@@ -130,7 +131,7 @@ func (m *Proposal) Reset() { *m = Proposal{} }
func (m *Proposal) String() string { return proto.CompactTextString(m) }
func (*Proposal) ProtoMessage() {}
func (*Proposal) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_8e93dae9c9555ac0, []int{1}
return fileDescriptor_proposal_33e23f5bd2671745, []int{1}
}
func (m *Proposal) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Proposal.Unmarshal(m, b)
......@@ -188,7 +189,7 @@ type ChaincodeHeaderExtension struct {
// this field impacts the content of ProposalResponsePayload.proposalHash.
PayloadVisibility []byte `protobuf:"bytes,1,opt,name=payload_visibility,json=payloadVisibility,proto3" json:"payload_visibility,omitempty"`
// The ID of the chaincode to target.
ChaincodeId *ChaincodeID `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"`
ChaincodeId *ChaincodeID `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId" json:"chaincode_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -198,7 +199,7 @@ func (m *ChaincodeHeaderExtension) Reset() { *m = ChaincodeHeaderExtensi
func (m *ChaincodeHeaderExtension) String() string { return proto.CompactTextString(m) }
func (*ChaincodeHeaderExtension) ProtoMessage() {}
func (*ChaincodeHeaderExtension) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_8e93dae9c9555ac0, []int{2}
return fileDescriptor_proposal_33e23f5bd2671745, []int{2}
}
func (m *ChaincodeHeaderExtension) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChaincodeHeaderExtension.Unmarshal(m, b)
......@@ -244,7 +245,7 @@ type ChaincodeProposalPayload struct {
// to implement some form of application-level confidentiality. The contents
// of this field are supposed to always be omitted from the transaction and
// excluded from the ledger.
TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap,proto3" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -254,7 +255,7 @@ func (m *ChaincodeProposalPayload) Reset() { *m = ChaincodeProposalPaylo
func (m *ChaincodeProposalPayload) String() string { return proto.CompactTextString(m) }
func (*ChaincodeProposalPayload) ProtoMessage() {}
func (*ChaincodeProposalPayload) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_8e93dae9c9555ac0, []int{3}
return fileDescriptor_proposal_33e23f5bd2671745, []int{3}
}
func (m *ChaincodeProposalPayload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChaincodeProposalPayload.Unmarshal(m, b)
......@@ -298,23 +299,26 @@ type ChaincodeAction struct {
// invocation.
Events []byte `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty"`
// This field contains the result of executing this invocation.
Response *Response `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
Response *Response `protobuf:"bytes,3,opt,name=response" json:"response,omitempty"`
// This field contains the ChaincodeID of executing this invocation. Endorser
// will set it with the ChaincodeID called by endorser while simulating proposal.
// Committer will validate the version matching with latest chaincode version.
// Adding ChaincodeID to keep version opens up the possibility of multiple
// ChaincodeAction per transaction.
ChaincodeId *ChaincodeID `protobuf:"bytes,4,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
ChaincodeId *ChaincodeID `protobuf:"bytes,4,opt,name=chaincode_id,json=chaincodeId" json:"chaincode_id,omitempty"`
// This field contains the token expectation generated by the chaincode
// executing this invocation
TokenExpectation *token.TokenExpectation `protobuf:"bytes,5,opt,name=token_expectation,json=tokenExpectation" json:"token_expectation,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChaincodeAction) Reset() { *m = ChaincodeAction{} }
func (m *ChaincodeAction) String() string { return proto.CompactTextString(m) }
func (*ChaincodeAction) ProtoMessage() {}
func (*ChaincodeAction) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_8e93dae9c9555ac0, []int{4}
return fileDescriptor_proposal_33e23f5bd2671745, []int{4}
}
func (m *ChaincodeAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChaincodeAction.Unmarshal(m, b)
......@@ -362,6 +366,13 @@ func (m *ChaincodeAction) GetChaincodeId() *ChaincodeID {
return nil
}
func (m *ChaincodeAction) GetTokenExpectation() *token.TokenExpectation {
if m != nil {
return m.TokenExpectation
}
return nil
}
func init() {
proto.RegisterType((*SignedProposal)(nil), "protos.SignedProposal")
proto.RegisterType((*Proposal)(nil), "protos.Proposal")
......@@ -371,37 +382,39 @@ func init() {
proto.RegisterType((*ChaincodeAction)(nil), "protos.ChaincodeAction")
}
func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor_proposal_8e93dae9c9555ac0) }
var fileDescriptor_proposal_8e93dae9c9555ac0 = []byte{
// 452 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4d, 0x6f, 0xd3, 0x4c,
0x10, 0x96, 0x93, 0xf7, 0xed, 0xc7, 0x24, 0xf4, 0x63, 0x5b, 0x21, 0x2b, 0xea, 0xa1, 0xb2, 0x84,
0x54, 0x24, 0xb0, 0xa5, 0x20, 0x21, 0xc4, 0x05, 0x11, 0xa8, 0x44, 0x0f, 0x48, 0x95, 0x81, 0x1e,
0x7a, 0x09, 0x6b, 0x7b, 0x70, 0x56, 0x35, 0xbb, 0xab, 0xdd, 0x75, 0x84, 0x8f, 0xfc, 0x1c, 0x7e,
0x0a, 0xff, 0x0a, 0xd9, 0xfb, 0xd1, 0x94, 0x5c, 0x38, 0x25, 0x33, 0xf3, 0x3c, 0xcf, 0xcc, 0x3c,
0xb3, 0x86, 0x13, 0x89, 0xa8, 0x32, 0xa9, 0x84, 0x14, 0x9a, 0x36, 0xa9, 0x54, 0xc2, 0x08, 0xb2,
0x33, 0xfc, 0xe8, 0xd9, 0xe9, 0x50, 0x2c, 0x57, 0x94, 0xf1, 0x52, 0x54, 0x68, 0xab, 0xb3, 0xb3,
0x07, 0x94, 0xa5, 0x42, 0x2d, 0x05, 0xd7, 0xae, 0x9a, 0x7c, 0x81, 0x83, 0x4f, 0xac, 0xe6, 0x58,
0x5d, 0x3b, 0x00, 0x79, 0x02, 0x07, 0x01, 0x5c, 0x74, 0x06, 0x75, 0x1c, 0x9d, 0x47, 0x17, 0xd3,
0xfc, 0x91, 0xcf, 0x2e, 0xfa, 0x24, 0x39, 0x83, 0x7d, 0xcd, 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0x0e, 0x43, 0xf7, 0xb7, 0xa5, 0xe9, 0x6d, 0x8c, 0x61, 0x57, 0xa1, 0x6e, 0x1b, 0xe3, 0xaf, 0xef,
0xc3, 0xfe, 0x9a, 0xb8, 0x46, 0x6e, 0xb4, 0x13, 0x72, 0x11, 0x79, 0x06, 0x7b, 0xfe, 0x69, 0x0d,
0x27, 0x9b, 0xcc, 0x8f, 0xfc, 0x6a, 0xb9, 0xcb, 0xe7, 0x01, 0xb1, 0xe5, 0xfb, 0x7f, 0xff, 0xe6,
0xfb, 0xe2, 0x2b, 0x24, 0x42, 0xd5, 0xe9, 0xaa, 0x93, 0xa8, 0x1a, 0xac, 0x6a, 0x54, 0xe9, 0x37,
0x5a, 0x28, 0x56, 0x7a, 0x66, 0xff, 0xd8, 0x17, 0x87, 0xf7, 0x1e, 0x96, 0x77, 0xb4, 0xc6, 0xdb,
0xa7, 0x35, 0x33, 0xab, 0xb6, 0x48, 0x4b, 0xf1, 0x3d, 0xdb, 0xe0, 0x66, 0x96, 0x9b, 0x59, 0x6e,
0xd6, 0x73, 0x0b, 0xfb, 0x31, 0xbd, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x12, 0x75, 0xb6, 0xaf,
0x6a, 0x03, 0x00, 0x00,
func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor_proposal_33e23f5bd2671745) }
var fileDescriptor_proposal_33e23f5bd2671745 = []byte{
// 487 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x6f, 0xd3, 0x30,
0x14, 0x57, 0x5a, 0x36, 0x36, 0xb7, 0x6c, 0xad, 0x37, 0xa1, 0xa8, 0xda, 0x61, 0x8a, 0x84, 0x34,
0x24, 0x48, 0xa4, 0x22, 0x21, 0xc4, 0x05, 0x51, 0xa8, 0xc4, 0x0e, 0x48, 0x53, 0x18, 0x3b, 0xec,
0x52, 0x9c, 0xe4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b, 0x9e, 0xd9, 0x0f, 0x14, 0x71, 0x59, 0xc6, 0xcb, 0x46, 0x80, 0xac, 0xa0, 0x28,
0x41, 0xc6, 0x3f, 0x49, 0x26, 0x69, 0xee, 0x35, 0xcc, 0x6b, 0x9a, 0x9d, 0x6e, 0x56, 0x91, 0xaf,
0x48, 0x09, 0xf7, 0x2f, 0x4b, 0xaa, 0x97, 0x75, 0x16, 0xe7, 0xfc, 0x57, 0xb2, 0xc5, 0x4d, 0x2c,
0x37, 0xb1, 0xdc, 0xc4, 0x70, 0x33, 0xfb, 0x5a, 0xdf, 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xaa,
0xf2, 0x0a, 0xf6, 0xcb, 0x03, 0x00, 0x00,
}
......@@ -24,6 +24,7 @@ package protos;
import "peer/chaincode.proto";
import "peer/proposal_response.proto";
import "token/expectations.proto";
/*
The flow to get a generic transaction approved goes as follows:
......@@ -271,4 +272,8 @@ message ChaincodeAction {
// Adding ChaincodeID to keep version opens up the possibility of multiple
// ChaincodeAction per transaction.
ChaincodeID chaincode_id = 4;
}
// This field contains the token expectation generated by the chaincode
// executing this invocation
TokenExpectation token_expectation = 5;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment