diff --git a/Gopkg.lock b/Gopkg.lock index 9e95fc51e3..696399c891 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -79,6 +79,14 @@ revision = "07c9b44f60d7ffdfb7d8efe1ad539965737836dc" version = "v0.4.0" +[[projects]] + digest = "1:fd53b471edb4c28c7d297f617f4da0d33402755f58d6301e7ca1197ef0a90937" + name = "github.com/gogo/protobuf" + packages = ["proto"] + pruneopts = "" + revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" + version = "v1.2.1" + [[projects]] branch = "master" digest = "1:9949f4a2c726614c4d38ca692705f9f0a894122406e78cb62dc69ff267705483" @@ -208,7 +216,10 @@ [[projects]] digest = "1:4142d94383572e74b42352273652c62afec5b23f325222ed09198f46009022d1" name = "github.com/prometheus/client_golang" - packages = ["prometheus"] + packages = [ + "prometheus", + "prometheus/promhttp", + ] pruneopts = "" revision = "c5b7fccd204277076155f10851dad72b76a49317" version = "v0.8.0" @@ -371,7 +382,7 @@ revision = "4eb30f4778eed4c258ba66527a0d4f9ec8a36c45" [[projects]] - digest = "1:e5e4d08a5e43727ae54ea371823ce14b2d5b454536cfa7e6b08cc309a51d9fe5" + digest = "1:5f31b45ee9da7a87f140bef3ed0a7ca34ea2a6d38eb888123b8e28170e8aa4f2" name = "google.golang.org/grpc" packages = [ ".", @@ -383,9 +394,11 @@ "credentials", "encoding", "encoding/proto", - "grpclb/grpc_lb_v1/messages", "grpclog", "internal", + "internal/backoff", + "internal/channelz", + "internal/grpcrand", "keepalive", "metadata", "naming", @@ -400,8 +413,8 @@ "transport", ] pruneopts = "" - revision = "d11072e7ca9811b1100b80ca0269ac831f06d024" - version = "v1.11.3" + revision = "168a6198bcb0ef175f7dacec0b8691fc141dc9b8" + version = "v1.13.0" [[projects]] branch = "v2" @@ -424,6 +437,7 @@ "github.com/go-kit/kit/metrics", "github.com/go-kit/kit/metrics/prometheus", "github.com/go-kit/kit/metrics/statsd", + "github.com/gogo/protobuf/proto", "github.com/golang/mock/gomock", "github.com/golang/protobuf/proto", "github.com/golang/protobuf/ptypes", @@ -433,6 +447,7 @@ "github.com/mitchellh/mapstructure", "github.com/pkg/errors", "github.com/prometheus/client_golang/prometheus", + "github.com/prometheus/client_golang/prometheus/promhttp", "github.com/spf13/cast", "github.com/spf13/viper", "github.com/stretchr/testify/assert", diff --git a/Makefile b/Makefile index 54e30a708f..db4e8fd9b8 100644 --- a/Makefile +++ b/Makefile @@ -69,9 +69,9 @@ FABRIC_DEV_REGISTRY_PRE_CMD ?= docker login -u docker -p docker nexus3.hyperledg # Upstream fabric patching (overridable) THIRDPARTY_FABRIC_CA_BRANCH ?= master -THIRDPARTY_FABRIC_CA_COMMIT ?= v1.4.0 +THIRDPARTY_FABRIC_CA_COMMIT ?= 4efeaca8226b1d0c29327daaccb629b8a05de2e9 THIRDPARTY_FABRIC_BRANCH ?= master -THIRDPARTY_FABRIC_COMMIT ?= v1.4.0 +THIRDPARTY_FABRIC_COMMIT ?= 55fc8015b9eb8889b5c4b0f36ed239795e0f2c07 # Force removal of images in cleanup (overridable) FIXTURE_DOCKER_REMOVE_FORCE ?= false diff --git a/go.mod b/go.mod index a73ca6c04b..4b8cadce04 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/hyperledger/fabric-sdk-go replace github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos => ./third_party/github.com/hyperledger/fabric/protos require ( - github.com/BurntSushi/toml v0.3.1 // indirect github.com/Knetic/govaluate v3.0.0+incompatible github.com/VividCortex/gohistogram v1.0.0 // indirect github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect @@ -12,7 +11,7 @@ require ( github.com/go-kit/kit v0.8.0 github.com/go-logfmt/logfmt v0.4.0 // indirect github.com/go-stack/stack v1.8.0 // indirect - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect + github.com/gogo/protobuf v1.1.1 github.com/golang/mock v1.2.0 github.com/golang/protobuf v1.2.0 github.com/google/certificate-transparency-go v0.0.0-20180222191210-5ab67e519c93 // indirect @@ -39,8 +38,7 @@ require ( github.com/spf13/viper v1.0.2 github.com/stretchr/testify v1.2.2 golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab - golang.org/x/net v0.0.0-20180906233101-161cd47e91fd - google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee // indirect - google.golang.org/grpc v1.11.3 + golang.org/x/net v0.0.0-20190213061140-3a22650c66bd + google.golang.org/grpc v1.19.0 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect ) diff --git a/go.sum b/go.sum index ea7334d9ca..5cefed3ca7 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Knetic/govaluate v3.0.0+incompatible h1:7o6+MAPhYTCF0+fdvoz1xDedhRb4f6s9Tn1Tt7/WTEg= @@ -6,6 +7,7 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e85keuznYcH5rqI438v41pKcBl4ZxQ= github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -18,8 +20,11 @@ github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80n github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= @@ -32,7 +37,6 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324= github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= -github.com/hyperledger/fabric-sdk-go v0.0.0-20190125204638-b490519efff/go.mod h1:kqYuM7jCDf1BbXWgbWaevpnlhDii5i4TkGXhfib2epU= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -80,18 +84,35 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab h1:w4c/LoOA2vE8SYwh8wEEQVRUwpph7TtcjH7AtZvOjy0= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee h1:z84t4XBifcyxT9HA96QiKwGaWYiO7vfoqu7vWoa6lQk= -google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v1.11.3 h1:yy64MFk0j8qZbdXVA0MaSE+s/+6nCUdiyf1uNSjAz0c= -google.golang.org/grpc v1.11.3/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d h1:XB2jc5XQ9uhizGTS2vWcN01bc4dI6z3C4KY5MQm8SS8= +google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -101,3 +122,4 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go b/internal/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go index d90aa42df8..c7e0fe24bf 100644 --- a/internal/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go +++ b/internal/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go @@ -233,7 +233,7 @@ func FindPKCS11Lib() (lib, pin, label string) { "/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so", //Ubuntu "/usr/lib/s390x-linux-gnu/softhsm/libsofthsm2.so", //Ubuntu "/usr/lib/powerpc64le-linux-gnu/softhsm/libsofthsm2.so", //Power - "/usr/local/Cellar/softhsm/2.1.0/lib/softhsm/libsofthsm2.so", //MacOS + "/usr/local/Cellar/softhsm/2.5.0/lib/softhsm/libsofthsm2.so", //MacOS } for _, path := range possibilities { if _, err := os.Stat(path); !os.IsNotExist(err) { diff --git a/internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go b/internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go index 9aa7cf47cf..9d6dc4d67f 100644 --- a/internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go +++ b/internal/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go @@ -106,21 +106,6 @@ func namedCurveFromOID(oid asn1.ObjectIdentifier) elliptic.Curve { return nil } -func oidFromNamedCurve(curve elliptic.Curve) (asn1.ObjectIdentifier, bool) { - switch curve { - case elliptic.P224(): - return oidNamedCurveP224, true - case elliptic.P256(): - return oidNamedCurveP256, true - case elliptic.P384(): - return oidNamedCurveP384, true - case elliptic.P521(): - return oidNamedCurveP521, true - } - - return nil, false -} - func (csp *impl) generateECKey(curve asn1.ObjectIdentifier, ephemeral bool) (ski []byte, pubKey *ecdsa.PublicKey, err error) { session := csp.pkcs11Ctx.GetSession() @@ -424,35 +409,6 @@ func listAttrs(p11lib *sdkp11.ContextHandle, session pkcs11.SessionHandle, obj p } } -func (csp *impl) getSecretValue(ski []byte) []byte { - - session := csp.pkcs11Ctx.GetSession() - defer csp.pkcs11Ctx.ReturnSession(session) - - keyHandle, err := csp.pkcs11Ctx.FindKeyPairFromSKI(session, ski, privateKeyFlag) - if err != nil { - logger.Warningf("P11: findKeyPairFromSKI [%s]\n", err) - } - var privKey []byte - template := []*pkcs11.Attribute{ - pkcs11.NewAttribute(pkcs11.CKA_VALUE, privKey), - } - - // certain errors are tolerated, if value is missing - attr, err := csp.pkcs11Ctx.GetAttributeValue(session, *keyHandle, template) - if err != nil { - logger.Warningf("P11: get(attrlist) [%s]\n", err) - } - - for _, a := range attr { - // Would be friendlier if the bindings provided a way convert Attribute hex to string - logger.Debugf("ListAttr: type %d/0x%x, length %d\n%s", a.Type, a.Type, len(a.Value), hex.Dump(a.Value)) - return a.Value - } - logger.Warningf("No Key Value found: %v", err) - return nil -} - var ( bigone = new(big.Int).SetInt64(1) idCtr = new(big.Int) diff --git a/internal/github.com/hyperledger/fabric/common/channelconfig/orderer.go b/internal/github.com/hyperledger/fabric/common/channelconfig/orderer.go index ab1cedd557..c3fdb0cd3b 100644 --- a/internal/github.com/hyperledger/fabric/common/channelconfig/orderer.go +++ b/internal/github.com/hyperledger/fabric/common/channelconfig/orderer.go @@ -11,23 +11,23 @@ Please review third_party pinning scripts and patches for more details. package channelconfig const ( - // OrdererGroupKey is the group name for the orderer config + // OrdererGroupKey is the group name for the orderer config. OrdererGroupKey = "Orderer" ) const ( - // ConsensusTypeKey is the cb.ConfigItem type key name for the ConsensusType message + // ConsensusTypeKey is the cb.ConfigItem type key name for the ConsensusType message. ConsensusTypeKey = "ConsensusType" - // BatchSizeKey is the cb.ConfigItem type key name for the BatchSize message + // BatchSizeKey is the cb.ConfigItem type key name for the BatchSize message. BatchSizeKey = "BatchSize" - // BatchTimeoutKey is the cb.ConfigItem type key name for the BatchTimeout message + // BatchTimeoutKey is the cb.ConfigItem type key name for the BatchTimeout message. BatchTimeoutKey = "BatchTimeout" - // ChannelRestrictionsKey is the key name for the ChannelRestrictions message + // ChannelRestrictionsKey is the key name for the ChannelRestrictions message. ChannelRestrictionsKey = "ChannelRestrictions" - // KafkaBrokersKey is the cb.ConfigItem type key name for the KafkaBrokers message + // KafkaBrokersKey is the cb.ConfigItem type key name for the KafkaBrokers message. KafkaBrokersKey = "KafkaBrokers" ) diff --git a/internal/github.com/hyperledger/fabric/common/crypto/signer.go b/internal/github.com/hyperledger/fabric/common/crypto/signer.go deleted file mode 100644 index f6267be8ee..0000000000 --- a/internal/github.com/hyperledger/fabric/common/crypto/signer.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright IBM Corp. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 -*/ -/* -Notice: This file has been modified for Hyperledger Fabric SDK Go usage. -Please review third_party pinning scripts and patches for more details. -*/ - -package crypto - -import ( - cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" -) - -// LocalSigner is a temporary stub interface which will be implemented by the local MSP -type LocalSigner interface { - SignatureHeaderMaker - Signer -} - -// Signer signs messages -type Signer interface { - // Sign a message and return the signature over the digest, or error on failure - Sign(message []byte) ([]byte, error) -} - -// IdentitySerializer serializes identities -type IdentitySerializer interface { - // Serialize converts an identity to bytes - Serialize() ([]byte, error) -} - -// SignatureHeaderMaker creates a new SignatureHeader -type SignatureHeaderMaker interface { - // NewSignatureHeader creates a SignatureHeader with the correct signing identity and a valid nonce - NewSignatureHeader() (*cb.SignatureHeader, error) -} - -// SignatureHeaderCreator creates signature headers -type SignatureHeaderCreator struct { - SignerSupport -} - -// SignerSupport implements the needed support for LocalSigner -type SignerSupport interface { - Signer - IdentitySerializer -} diff --git a/internal/github.com/hyperledger/fabric/core/common/privdata/collection.go b/internal/github.com/hyperledger/fabric/core/common/privdata/collection.go index 72b16b0368..3989806582 100644 --- a/internal/github.com/hyperledger/fabric/core/common/privdata/collection.go +++ b/internal/github.com/hyperledger/fabric/core/common/privdata/collection.go @@ -16,6 +16,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/ledger" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) // Collection defines a common interface for collections @@ -57,6 +58,10 @@ type CollectionAccessPolicy interface { // IsMemberOnlyRead returns a true if only collection members can read // the private data IsMemberOnlyRead() bool + + // IsMemberOnlyWrite returns a true if only collection members can write + // the private data + IsMemberOnlyWrite() bool } // CollectionPersistenceConfigs encapsulates configurations related to persistece of a collection @@ -73,7 +78,7 @@ type CollectionPersistenceConfigs interface { // Signature on that Data. // Returns: True, if the policy holds for the given signed data. // False otherwise -type Filter func(common.SignedData) bool +type Filter func(protoutil.SignedData) bool // CollectionStore provides various APIs to retrieves stored collections and perform // membership check & read permission check based on the collection's properties. @@ -88,14 +93,14 @@ type Filter func(common.SignedData) bool // (3) we would need a cache in collection store to avoid repeated crypto operation. // This would be simple to implement when we introduce IsAMemberOf() APIs. type CollectionStore interface { - // GetCollection retrieves the collection in the following way: + // RetrieveCollection retrieves the collection in the following way: // If the TxID exists in the ledger, the collection that is returned has the // latest configuration that was committed into the ledger before this txID // was committed. // Else - it's the latest configuration for the collection. RetrieveCollection(common.CollectionCriteria) (Collection, error) - // GetCollectionAccessPolicy retrieves a collection's access policy + // RetrieveCollectionAccessPolicy retrieves a collection's access policy RetrieveCollectionAccessPolicy(common.CollectionCriteria) (CollectionAccessPolicy, error) // RetrieveCollectionConfigPackage retrieves the whole configuration package @@ -105,9 +110,10 @@ type CollectionStore interface { // RetrieveCollectionPersistenceConfigs retrieves the collection's persistence related configurations RetrieveCollectionPersistenceConfigs(common.CollectionCriteria) (CollectionPersistenceConfigs, error) - // HasReadAccess checks whether the creator of the signedProposal has read permission on a - // given collection - HasReadAccess(common.CollectionCriteria, *pb.SignedProposal, ledger.QueryExecutor) (bool, error) + // RetrieveReadWritePermission retrieves the read-write persmission of the creator of the + // signedProposal for a given collection using collection access policy and flags such as + // memberOnlyRead & memberOnlyWrite + RetrieveReadWritePermission(common.CollectionCriteria, *pb.SignedProposal, ledger.QueryExecutor) (bool, bool, error) CollectionFilter } diff --git a/internal/github.com/hyperledger/fabric/core/ledger/ledger_interface.go b/internal/github.com/hyperledger/fabric/core/ledger/ledger_interface.go index 569d1de7f0..0671af009b 100644 --- a/internal/github.com/hyperledger/fabric/core/ledger/ledger_interface.go +++ b/internal/github.com/hyperledger/fabric/core/ledger/ledger_interface.go @@ -14,6 +14,7 @@ import ( "fmt" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric-lib-go/healthz" commonledger "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/ledger" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/metrics" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" @@ -28,6 +29,7 @@ type Initializer struct { DeployedChaincodeInfoProvider DeployedChaincodeInfoProvider MembershipInfoProvider MembershipInfoProvider MetricsProvider metrics.Provider + HealthCheckRegistry HealthCheckRegistry } // PeerLedgerProvider provides handle to ledger instances @@ -81,14 +83,6 @@ type PeerLedger interface { GetPvtDataByNum(blockNum uint64, filter PvtNsCollFilter) ([]*TxPvtData, error) // CommitWithPvtData commits the block and the corresponding pvt data in an atomic operation CommitWithPvtData(blockAndPvtdata *BlockAndPvtData) error - // Purge removes private read-writes set generated by endorsers at block height lesser than - // a given maxBlockNumToRetain. In other words, Purge only retains private read-write sets - // that were generated at block height of maxBlockNumToRetain or higher. - PurgePrivateData(maxBlockNumToRetain uint64) error - // PrivateDataMinBlockNum returns the lowest retained endorsement block height - PrivateDataMinBlockNum() (uint64, error) - //Prune prunes the blocks/transactions that satisfy the given policy - Prune(policy commonledger.PrunePolicy) error // GetConfigHistoryRetriever returns the ConfigHistoryRetriever GetConfigHistoryRetriever() (ConfigHistoryRetriever, error) // CommitPvtDataOfOldBlocks commits the private data corresponding to already committed block @@ -116,6 +110,11 @@ type SimpleQueryExecutor interface { // can be supplied as empty strings. However, a full scan should be used judiciously for performance reasons. // The returned ResultsIterator contains results of type *KV which is defined in protos/ledger/queryresult. GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error) + // GetPrivateDataHash gets the hash of the value of a private data item identified by a tuple + // Function `GetPrivateData` is only meaningful when it is invoked on a peer that is authorized to have the private data + // for the collection . However, the function `GetPrivateDataHash` can be invoked on any peer + // to get the hash of the current value + GetPrivateDataHash(namespace, collection, key string) ([]byte, error) } // QueryExecutor executes the queries @@ -336,8 +335,6 @@ func (txSim *TxSimulationResults) ContainsPvtWrites() bool { return txSim.PvtSimulationResults != nil } -//go:generate counterfeiter -o mock/state_listener.go -fake-name StateListener . StateListener - // StateListener allows a custom code for performing additional stuff upon state change // for a perticular namespace against which the listener is registered. // This helps to perform custom tasks other than the state updates. @@ -348,8 +345,10 @@ func (txSim *TxSimulationResults) ContainsPvtWrites() bool { // `github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset.KVWrite` // Function `HandleStateUpdates` is expected to be invoked before block is committed and if this // function returns an error, the ledger implementation is expected to halt block commit operation -// and result in a panic +// and result in a panic. +// The function Initialize is invoked only once at the time of opening the ledger. type StateListener interface { + Initialize(ledgerID string, qe SimpleQueryExecutor) error InterestedInNamespaces() []string HandleStateUpdates(trigger *StateUpdateTrigger) error StateCommitDone(channelID string) @@ -364,8 +363,14 @@ type StateUpdateTrigger struct { PostCommitQueryExecutor SimpleQueryExecutor } -// StateUpdates is the generic type to represent the state updates -type StateUpdates map[string]interface{} +// StateUpdates encapsulates the state updates +type StateUpdates map[string]*KVStateUpdates + +// KVStateUpdates captures the state updates for a namespace for KV datamodel +type KVStateUpdates struct { + PublicUpdates []*kvrwset.KVWrite + CollHashUpdates map[string][]*kvrwset.KVWriteHash +} // ConfigHistoryRetriever allow retrieving history of collection configs type ConfigHistoryRetriever interface { @@ -462,20 +467,48 @@ type PvtdataHashMismatch struct { } // DeployedChaincodeInfoProvider is a dependency that is used by ledger to build collection config history -// LSCC module is expected to provide an implementation fo this dependencys +// LSCC module is expected to provide an implementation for this dependencys type DeployedChaincodeInfoProvider interface { + // Namespaces returns the slice of the namespaces that are used for maintaining chaincode lifecycle data Namespaces() []string + // UpdatedChaincodes returns the chaincodes that are getting updated by the supplied 'stateUpdates' UpdatedChaincodes(stateUpdates map[string][]*kvrwset.KVWrite) ([]*ChaincodeLifecycleInfo, error) - ChaincodeInfo(chaincodeName string, qe SimpleQueryExecutor) (*DeployedChaincodeInfo, error) - CollectionInfo(chaincodeName, collectionName string, qe SimpleQueryExecutor) (*common.StaticCollectionConfig, error) + // ChaincodeInfo returns the info about a deployed chaincode + ChaincodeInfo(channelName, chaincodeName string, qe SimpleQueryExecutor) (*DeployedChaincodeInfo, error) + // CollectionInfo returns the proto msg that defines the named collection. This function can be called for both explicit and implicit collections + CollectionInfo(channelName, chaincodeName, collectionName string, qe SimpleQueryExecutor) (*common.StaticCollectionConfig, error) + // ImplicitCollections returns a slice that contains one proto msg for each of the implicit collections + ImplicitCollections(channelName, chaincodeName string, qe SimpleQueryExecutor) ([]*common.StaticCollectionConfig, error) } // DeployedChaincodeInfo encapsulates chaincode information from the deployed chaincodes type DeployedChaincodeInfo struct { - Name string - Hash []byte - Version string - CollectionConfigPkg *common.CollectionConfigPackage + Name string + Hash []byte + Version string + ExplicitCollectionConfigPkg *common.CollectionConfigPackage + ImplicitCollections []*common.StaticCollectionConfig +} + +// GetAllCollectionsConfigPkg returns a combined collection config pkg that contains both explicit and implicit collections +func (dci DeployedChaincodeInfo) AllCollectionsConfigPkg() *common.CollectionConfigPackage { + var combinedColls []*common.CollectionConfig + if dci.ExplicitCollectionConfigPkg != nil { + for _, explicitColl := range dci.ExplicitCollectionConfigPkg.Config { + combinedColls = append(combinedColls, explicitColl) + } + } + for _, implicitColl := range dci.ImplicitCollections { + c := &common.CollectionConfig{} + c.Payload = &common.CollectionConfig_StaticCollectionConfig{StaticCollectionConfig: implicitColl} + combinedColls = append(combinedColls, c) + } + if combinedColls == nil { + return nil + } + return &common.CollectionConfigPackage{ + Config: combinedColls, + } } // ChaincodeLifecycleInfo captures the update info of a chaincode @@ -490,8 +523,8 @@ type ChaincodeLifecycleDetails struct { Updated bool // true, if an existing chaincode is updated (false for newly deployed chaincodes). // Following attributes are meaningful only if 'Updated' is true HashChanged bool // true, if the chaincode code package is changed - CollectionsUpdated []string // names of the collections that are either added or updated - CollectionsRemoved []string // names of the collections that are removed + CollectionsUpdated []string // names of the explicit collections that are either added or updated + CollectionsRemoved []string // names of the explicit collections that are removed } // MembershipInfoProvider is a dependency that is used by ledger to determine whether the current peer is @@ -501,5 +534,12 @@ type MembershipInfoProvider interface { AmMemberOf(channelName string, collectionPolicyConfig *common.CollectionPolicyConfig) (bool, error) } +type HealthCheckRegistry interface { + RegisterChecker(string, healthz.HealthChecker) error +} + +//go:generate counterfeiter -o mock/state_listener.go -fake-name StateListener . StateListener +//go:generate counterfeiter -o mock/query_executor.go -fake-name QueryExecutor . QueryExecutor //go:generate counterfeiter -o mock/deployed_ccinfo_provider.go -fake-name DeployedChaincodeInfoProvider . DeployedChaincodeInfoProvider //go:generate counterfeiter -o mock/membership_info_provider.go -fake-name MembershipInfoProvider . MembershipInfoProvider +//go:generate counterfeiter -o mock/health_check_registry.go -fake-name HealthCheckRegistry . HealthCheckRegistry diff --git a/internal/github.com/hyperledger/fabric/core/operations/system.go b/internal/github.com/hyperledger/fabric/core/operations/system.go index 4d0328377f..b4625ca21c 100644 --- a/internal/github.com/hyperledger/fabric/core/operations/system.go +++ b/internal/github.com/hyperledger/fabric/core/operations/system.go @@ -30,7 +30,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/middleware" flogging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge/httpadmin" - prom "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" ) //go:generate counterfeiter -o fakes/logger.go -fake-name Logger . Logger @@ -182,7 +182,7 @@ func (s *System) initializeMetricsProvider() error { case "prometheus": s.Provider = &prometheus.Provider{} s.versionGauge = versionGauge(s.Provider) - s.mux.Handle("/metrics", s.handlerChain(prom.Handler(), s.options.TLS.Enabled)) + s.mux.Handle("/metrics", s.handlerChain(promhttp.Handler(), s.options.TLS.Enabled)) return nil default: diff --git a/internal/github.com/hyperledger/fabric/discovery/client/api.go b/internal/github.com/hyperledger/fabric/discovery/client/api.go index e8c42dd913..0fc99945ac 100644 --- a/internal/github.com/hyperledger/fabric/discovery/client/api.go +++ b/internal/github.com/hyperledger/fabric/discovery/client/api.go @@ -11,8 +11,8 @@ Please review third_party pinning scripts and patches for more details. package discovery import ( + "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip" "github.com/pkg/errors" "google.golang.org/grpc" ) @@ -71,7 +71,7 @@ type Endorsers []*Peer // of a certain peer. type Peer struct { MSPID string - AliveMessage *gossip.SignedGossipMessage - StateInfoMessage *gossip.SignedGossipMessage + AliveMessage *protoext.SignedGossipMessage + StateInfoMessage *protoext.SignedGossipMessage Identity []byte } diff --git a/internal/github.com/hyperledger/fabric/discovery/client/client.go b/internal/github.com/hyperledger/fabric/discovery/client/client.go index c80be378f2..6173920400 100644 --- a/internal/github.com/hyperledger/fabric/discovery/client/client.go +++ b/internal/github.com/hyperledger/fabric/discovery/client/client.go @@ -18,15 +18,19 @@ import ( "time" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/protoext" + gprotoext "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp" "github.com/pkg/errors" ) -var ( - configTypes = []discovery.QueryType{discovery.ConfigQueryType, discovery.PeerMembershipQueryType, discovery.ChaincodeQueryType, discovery.LocalMembershipQueryType} -) +var configTypes = []protoext.QueryType{ + protoext.ConfigQueryType, + protoext.PeerMembershipQueryType, + protoext.ChaincodeQueryType, + protoext.LocalMembershipQueryType, +} // Client interacts with the discovery server type Client struct { @@ -38,7 +42,7 @@ type Client struct { func NewRequest() *Request { r := &Request{ invocationChainMapping: make(map[int][]InvocationChain), - queryMapping: make(map[discovery.QueryType]map[string]int), + queryMapping: make(map[protoext.QueryType]map[string]int), Request: &discovery.Request{}, } // pre-populate types @@ -53,7 +57,7 @@ type Request struct { lastChannel string lastIndex int // map from query type to channel to expected index in response - queryMapping map[discovery.QueryType]map[string]int + queryMapping map[protoext.QueryType]map[string]int // map from expected index in response to invocation chains invocationChainMapping map[int][]InvocationChain *discovery.Request @@ -69,7 +73,7 @@ func (req *Request) AddConfigQuery() *Request { Channel: ch, Query: q, }) - req.addQueryMapping(discovery.ConfigQueryType, ch) + req.addQueryMapping(protoext.ConfigQueryType, ch) return req } @@ -95,7 +99,7 @@ func (req *Request) AddEndorsersQuery(interests ...*discovery.ChaincodeInterest) invocationChains = append(invocationChains, interest.Chaincodes) } req.addChaincodeQueryMapping(invocationChains) - req.addQueryMapping(discovery.ChaincodeQueryType, ch) + req.addQueryMapping(protoext.ChaincodeQueryType, ch) return req, nil } @@ -108,7 +112,7 @@ func (req *Request) AddLocalPeersQuery() *Request { Query: q, }) var ic InvocationChain - req.addQueryMapping(discovery.LocalMembershipQueryType, channnelAndInvocationChain("", ic)) + req.addQueryMapping(protoext.LocalMembershipQueryType, channnelAndInvocationChain("", ic)) return req } @@ -131,7 +135,7 @@ func (req *Request) AddPeersQuery(invocationChain ...*discovery.ChaincodeCall) * ic = InvocationChain(invocationChain) } req.addChaincodeQueryMapping([]InvocationChain{ic}) - req.addQueryMapping(discovery.PeerMembershipQueryType, channnelAndInvocationChain(ch, ic)) + req.addQueryMapping(protoext.PeerMembershipQueryType, channnelAndInvocationChain(ch, ic)) return req } @@ -149,7 +153,7 @@ func (req *Request) addChaincodeQueryMapping(invocationChains []InvocationChain) req.invocationChainMapping[req.lastIndex] = invocationChains } -func (req *Request) addQueryMapping(queryType discovery.QueryType, key string) { +func (req *Request) addQueryMapping(queryType protoext.QueryType, key string) { req.queryMapping[queryType][key] = req.lastIndex req.lastIndex++ } @@ -197,7 +201,7 @@ type localResponse struct { } func (cr *localResponse) Peers() ([]*Peer, error) { - return parsePeers(discovery.LocalMembershipQueryType, cr.response, "") + return parsePeers(protoext.LocalMembershipQueryType, cr.response, "") } type channelResponse struct { @@ -207,7 +211,7 @@ type channelResponse struct { func (cr *channelResponse) Config() (*discovery.ConfigResult, error) { res, exists := cr.response[key{ - queryType: discovery.ConfigQueryType, + queryType: protoext.ConfigQueryType, k: cr.channel, }] @@ -222,7 +226,7 @@ func (cr *channelResponse) Config() (*discovery.ConfigResult, error) { return nil, res.(error) } -func parsePeers(queryType discovery.QueryType, r response, channel string, invocationChain ...*discovery.ChaincodeCall) ([]*Peer, error) { +func parsePeers(queryType protoext.QueryType, r response, channel string, invocationChain ...*discovery.ChaincodeCall) ([]*Peer, error) { peerKeys := key{ queryType: queryType, k: fmt.Sprintf("%s %s", channel, InvocationChain(invocationChain).String()), @@ -241,14 +245,14 @@ func parsePeers(queryType discovery.QueryType, r response, channel string, invoc } func (cr *channelResponse) Peers(invocationChain ...*discovery.ChaincodeCall) ([]*Peer, error) { - return parsePeers(discovery.PeerMembershipQueryType, cr.response, cr.channel, invocationChain...) + return parsePeers(protoext.PeerMembershipQueryType, cr.response, cr.channel, invocationChain...) } func (cr *channelResponse) Endorsers(invocationChain InvocationChain, f Filter) (Endorsers, error) { // If we have a key that has no chaincode field, // it means it's an error returned from the service if err, exists := cr.response[key{ - queryType: discovery.ChaincodeQueryType, + queryType: protoext.ChaincodeQueryType, k: cr.channel, }]; exists { return nil, err.(error) @@ -256,7 +260,7 @@ func (cr *channelResponse) Endorsers(invocationChain InvocationChain, f Filter) // Else, the service returned a response that isn't an error res, exists := cr.response[key{ - queryType: discovery.ChaincodeQueryType, + queryType: protoext.ChaincodeQueryType, k: cr.channel, invocationChain: invocationChain.String(), }] @@ -332,7 +336,7 @@ func (resp response) ForChannel(ch string) ChannelResponse { } type key struct { - queryType discovery.QueryType + queryType protoext.QueryType k string invocationChain string } @@ -342,14 +346,14 @@ func (req *Request) computeResponse(r *discovery.Response) (response, error) { resp := make(response) for configType, channel2index := range req.queryMapping { switch configType { - case discovery.ConfigQueryType: + case protoext.ConfigQueryType: err = resp.mapConfig(channel2index, r) - case discovery.ChaincodeQueryType: + case protoext.ChaincodeQueryType: err = resp.mapEndorsers(channel2index, r, req.invocationChainMapping) - case discovery.PeerMembershipQueryType: - err = resp.mapPeerMembership(channel2index, r, discovery.PeerMembershipQueryType) - case discovery.LocalMembershipQueryType: - err = resp.mapPeerMembership(channel2index, r, discovery.LocalMembershipQueryType) + case protoext.PeerMembershipQueryType: + err = resp.mapPeerMembership(channel2index, r, protoext.PeerMembershipQueryType) + case protoext.LocalMembershipQueryType: + err = resp.mapPeerMembership(channel2index, r, protoext.LocalMembershipQueryType) } if err != nil { return nil, err @@ -361,12 +365,12 @@ func (req *Request) computeResponse(r *discovery.Response) (response, error) { func (resp response) mapConfig(channel2index map[string]int, r *discovery.Response) error { for ch, index := range channel2index { - config, err := r.ConfigAt(index) + config, err := protoext.ResponseConfigAt(r, index) if config == nil && err == nil { return errors.Errorf("expected QueryResult of either ConfigResult or Error but got %v instead", r.Results[index]) } key := key{ - queryType: discovery.ConfigQueryType, + queryType: protoext.ConfigQueryType, k: ch, } @@ -380,9 +384,9 @@ func (resp response) mapConfig(channel2index map[string]int, r *discovery.Respon return nil } -func (resp response) mapPeerMembership(key2Index map[string]int, r *discovery.Response, qt discovery.QueryType) error { +func (resp response) mapPeerMembership(key2Index map[string]int, r *discovery.Response, qt protoext.QueryType) error { for k, index := range key2Index { - membersRes, err := r.MembershipAt(index) + membersRes, err := protoext.ResponseMembershipAt(r, index) if membersRes == nil && err == nil { return errors.Errorf("expected QueryResult of either PeerMembershipResult or Error but got %v instead", r.Results[index]) } @@ -407,17 +411,17 @@ func (resp response) mapPeerMembership(key2Index map[string]int, r *discovery.Re return nil } -func peersForChannel(membersRes *discovery.PeerMembershipResult, qt discovery.QueryType) ([]*Peer, error) { +func peersForChannel(membersRes *discovery.PeerMembershipResult, qt protoext.QueryType) ([]*Peer, error) { var peers []*Peer for org, peersOfCurrentOrg := range membersRes.PeersByOrg { for _, peer := range peersOfCurrentOrg.Peers { - aliveMsg, err := peer.MembershipInfo.ToGossipMessage() + aliveMsg, err := gprotoext.EnvelopeToGossipMessage(peer.MembershipInfo) if err != nil { return nil, errors.Wrap(err, "failed unmarshaling alive message") } - var stateInfoMsg *gossip.SignedGossipMessage + var stateInfoMsg *gprotoext.SignedGossipMessage if isStateInfoExpected(qt) { - stateInfoMsg, err = peer.StateInfo.ToGossipMessage() + stateInfoMsg, err = gprotoext.EnvelopeToGossipMessage(peer.StateInfo) if err != nil { return nil, errors.Wrap(err, "failed unmarshaling stateInfo message") } @@ -439,8 +443,8 @@ func peersForChannel(membersRes *discovery.PeerMembershipResult, qt discovery.Qu return peers, nil } -func isStateInfoExpected(qt discovery.QueryType) bool { - return qt != discovery.LocalMembershipQueryType +func isStateInfoExpected(qt protoext.QueryType) bool { + return qt != protoext.LocalMembershipQueryType } func (resp response) mapEndorsers( @@ -448,14 +452,14 @@ func (resp response) mapEndorsers( r *discovery.Response, chaincodeQueryMapping map[int][]InvocationChain) error { for ch, index := range channel2index { - ccQueryRes, err := r.EndorsersAt(index) + ccQueryRes, err := protoext.ResponseEndorsersAt(r, index) if ccQueryRes == nil && err == nil { return errors.Errorf("expected QueryResult of either ChaincodeQueryResult or Error but got %v instead", r.Results[index]) } if err != nil { key := key{ - queryType: discovery.ChaincodeQueryType, + queryType: protoext.ChaincodeQueryType, k: ch, } resp[key] = errors.New(err.Content) @@ -479,7 +483,7 @@ func (resp response) mapEndorsersOfChannel(ccRs *discovery.ChaincodeQueryResult, return errors.Errorf("expected chaincode %s but got endorsement descriptor for %s", expectedCCName, desc.Chaincode) } key := key{ - queryType: discovery.ChaincodeQueryType, + queryType: protoext.ChaincodeQueryType, k: channel, invocationChain: invocationChain[i].String(), } @@ -529,11 +533,11 @@ func endorser(peer *discovery.Peer, chaincode, channel string) (*Peer, error) { if peer.MembershipInfo == nil || peer.StateInfo == nil { return nil, errors.Errorf("received empty envelope(s) for endorsers for chaincode %s, channel %s", chaincode, channel) } - aliveMsg, err := peer.MembershipInfo.ToGossipMessage() + aliveMsg, err := gprotoext.EnvelopeToGossipMessage(peer.MembershipInfo) if err != nil { return nil, errors.Wrap(err, "failed unmarshaling gossip envelope to alive message") } - stateInfMsg, err := peer.StateInfo.ToGossipMessage() + stateInfMsg, err := gprotoext.EnvelopeToGossipMessage(peer.StateInfo) if err != nil { return nil, errors.Wrap(err, "failed unmarshaling gossip envelope to state info message") } @@ -568,7 +572,7 @@ func NewClient(createConnection Dialer, s Signer, signerCacheSize uint) *Client } } -func validateAliveMessage(message *gossip.SignedGossipMessage) error { +func validateAliveMessage(message *gprotoext.SignedGossipMessage) error { am := message.GetAliveMsg() if am == nil { return errors.New("message isn't an alive message") @@ -583,7 +587,7 @@ func validateAliveMessage(message *gossip.SignedGossipMessage) error { return nil } -func validateStateInfoMessage(message *gossip.SignedGossipMessage) error { +func validateStateInfoMessage(message *gprotoext.SignedGossipMessage) error { si := message.GetStateInfo() if si == nil { return errors.New("message isn't a stateInfo message") diff --git a/internal/github.com/hyperledger/fabric/discovery/client/selection.go b/internal/github.com/hyperledger/fabric/discovery/client/selection.go index 6749704491..181c2eefe7 100644 --- a/internal/github.com/hyperledger/fabric/discovery/client/selection.go +++ b/internal/github.com/hyperledger/fabric/discovery/client/selection.go @@ -14,6 +14,8 @@ import ( "math/rand" "sort" "time" + + "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext" ) // Filter filters and sorts the given endorsers @@ -102,7 +104,7 @@ func ExcludeByHost(reject func(host string) bool) ExclusionFilter { var internalEndpoint string se := p.AliveMessage.GetSecretEnvelope() if se != nil { - internalEndpoint = se.InternalEndpoint() + internalEndpoint = protoext.InternalEndpoint(se) } return reject(endpoint) || reject(internalEndpoint) }) diff --git a/internal/github.com/hyperledger/fabric/discovery/protoext/querytype.go b/internal/github.com/hyperledger/fabric/discovery/protoext/querytype.go new file mode 100644 index 0000000000..2b996dcde2 --- /dev/null +++ b/internal/github.com/hyperledger/fabric/discovery/protoext/querytype.go @@ -0,0 +1,40 @@ +/* +Copyright IBM Corp. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ +/* +Notice: This file has been modified for Hyperledger Fabric SDK Go usage. +Please review third_party pinning scripts and patches for more details. +*/ + +package protoext + +import "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery" + +// QueryType defines the types of service discovery requests +type QueryType uint8 + +const ( + InvalidQueryType QueryType = iota + ConfigQueryType + PeerMembershipQueryType + ChaincodeQueryType + LocalMembershipQueryType +) + +// GetType returns the type of the request +func GetQueryType(q *discovery.Query) QueryType { + switch { + case q.GetCcQuery() != nil: + return ChaincodeQueryType + case q.GetConfigQuery() != nil: + return ConfigQueryType + case q.GetPeerQuery() != nil: + return PeerMembershipQueryType + case q.GetLocalPeers() != nil: + return LocalMembershipQueryType + default: + return InvalidQueryType + } +} diff --git a/internal/github.com/hyperledger/fabric/discovery/protoext/response.go b/internal/github.com/hyperledger/fabric/discovery/protoext/response.go new file mode 100644 index 0000000000..7d9ae0e09b --- /dev/null +++ b/internal/github.com/hyperledger/fabric/discovery/protoext/response.go @@ -0,0 +1,34 @@ +/* +Copyright IBM Corp. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ +/* +Notice: This file has been modified for Hyperledger Fabric SDK Go usage. +Please review third_party pinning scripts and patches for more details. +*/ + +package protoext + +import "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery" + +// ResponseConfigAt returns the ConfigResult at a given index in the Response, +// or an Error if present. +func ResponseConfigAt(m *discovery.Response, i int) (*discovery.ConfigResult, *discovery.Error) { + r := m.Results[i] + return r.GetConfigResult(), r.GetError() +} + +// ResponseMembershipAt returns the PeerMembershipResult at a given index in the Response, +// or an Error if present. +func ResponseMembershipAt(m *discovery.Response, i int) (*discovery.PeerMembershipResult, *discovery.Error) { + r := m.Results[i] + return r.GetMembers(), r.GetError() +} + +// ResponseEndorsersAt returns the PeerMembershipResult at a given index in the Response, +// or an Error if present. +func ResponseEndorsersAt(m *discovery.Response, i int) (*discovery.ChaincodeQueryResult, *discovery.Error) { + r := m.Results[i] + return r.GetCcQueryRes(), r.GetError() +} diff --git a/internal/github.com/hyperledger/fabric/gossip/protoext/message.go b/internal/github.com/hyperledger/fabric/gossip/protoext/message.go new file mode 100644 index 0000000000..ca5c3ed8a0 --- /dev/null +++ b/internal/github.com/hyperledger/fabric/gossip/protoext/message.go @@ -0,0 +1,190 @@ +/* +Copyright IBM Corp. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ +/* +Notice: This file has been modified for Hyperledger Fabric SDK Go usage. +Please review third_party pinning scripts and patches for more details. +*/ + +package protoext + +import ( + "fmt" + + "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip" +) + +// IsAliveMsg returns whether this GossipMessage is an AliveMessage +func IsAliveMsg(m *gossip.GossipMessage) bool { + return m.GetAliveMsg() != nil +} + +// IsDataMsg returns whether this GossipMessage is a data message +func IsDataMsg(m *gossip.GossipMessage) bool { + return m.GetDataMsg() != nil +} + +// IsStateInfoPullRequestMsg returns whether this GossipMessage is a stateInfoPullRequest +func IsStateInfoPullRequestMsg(m *gossip.GossipMessage) bool { + return m.GetStateInfoPullReq() != nil +} + +// IsStateInfoSnapshot returns whether this GossipMessage is a stateInfo snapshot +func IsStateInfoSnapshot(m *gossip.GossipMessage) bool { + return m.GetStateSnapshot() != nil +} + +// IsStateInfoMsg returns whether this GossipMessage is a stateInfo message +func IsStateInfoMsg(m *gossip.GossipMessage) bool { + return m.GetStateInfo() != nil +} + +// IsPullMsg returns whether this GossipMessage is a message that belongs +// to the pull mechanism +func IsPullMsg(m *gossip.GossipMessage) bool { + return m.GetDataReq() != nil || m.GetDataUpdate() != nil || + m.GetHello() != nil || m.GetDataDig() != nil +} + +// IsRemoteStateMessage returns whether this GossipMessage is related to state synchronization +func IsRemoteStateMessage(m *gossip.GossipMessage) bool { + return m.GetStateRequest() != nil || m.GetStateResponse() != nil +} + +// GetPullMsgType returns the phase of the pull mechanism this GossipMessage belongs to +// for example: Hello, Digest, etc. +// If this isn't a pull message, PullMsgType_UNDEFINED is returned. +func GetPullMsgType(m *gossip.GossipMessage) gossip.PullMsgType { + if helloMsg := m.GetHello(); helloMsg != nil { + return helloMsg.MsgType + } + + if digMsg := m.GetDataDig(); digMsg != nil { + return digMsg.MsgType + } + + if reqMsg := m.GetDataReq(); reqMsg != nil { + return reqMsg.MsgType + } + + if resMsg := m.GetDataUpdate(); resMsg != nil { + return resMsg.MsgType + } + + return gossip.PullMsgType_UNDEFINED +} + +// IsChannelRestricted returns whether this GossipMessage should be routed +// only in its channel +func IsChannelRestricted(m *gossip.GossipMessage) bool { + return m.Tag == gossip.GossipMessage_CHAN_AND_ORG || m.Tag == gossip.GossipMessage_CHAN_ONLY || m.Tag == gossip.GossipMessage_CHAN_OR_ORG +} + +// IsOrgRestricted returns whether this GossipMessage should be routed only +// inside the organization +func IsOrgRestricted(m *gossip.GossipMessage) bool { + return m.Tag == gossip.GossipMessage_CHAN_AND_ORG || m.Tag == gossip.GossipMessage_ORG_ONLY +} + +// IsIdentityMsg returns whether this GossipMessage is an identity message +func IsIdentityMsg(m *gossip.GossipMessage) bool { + return m.GetPeerIdentity() != nil +} + +// IsDataReq returns whether this GossipMessage is a data request message +func IsDataReq(m *gossip.GossipMessage) bool { + return m.GetDataReq() != nil +} + +// IsPrivateDataMsg returns whether this message is related to private data +func IsPrivateDataMsg(m *gossip.GossipMessage) bool { + return m.GetPrivateReq() != nil || m.GetPrivateRes() != nil || m.GetPrivateData() != nil +} + +// IsAck returns whether this GossipMessage is an acknowledgement +func IsAck(m *gossip.GossipMessage) bool { + return m.GetAck() != nil +} + +// IsDataUpdate returns whether this GossipMessage is a data update message +func IsDataUpdate(m *gossip.GossipMessage) bool { + return m.GetDataUpdate() != nil +} + +// IsHelloMsg returns whether this GossipMessage is a hello message +func IsHelloMsg(m *gossip.GossipMessage) bool { + return m.GetHello() != nil +} + +// IsDigestMsg returns whether this GossipMessage is a digest message +func IsDigestMsg(m *gossip.GossipMessage) bool { + return m.GetDataDig() != nil +} + +// IsLeadershipMsg returns whether this GossipMessage is a leadership (leader election) message +func IsLeadershipMsg(m *gossip.GossipMessage) bool { + return m.GetLeadershipMsg() != nil +} + +// IsTagLegal checks the GossipMessage tags and inner type +// and returns an error if the tag doesn't match the type. +func IsTagLegal(m *gossip.GossipMessage) error { + if m.Tag == gossip.GossipMessage_UNDEFINED { + return fmt.Errorf("Undefined tag") + } + if IsDataMsg(m) { + if m.Tag != gossip.GossipMessage_CHAN_AND_ORG { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_CHAN_AND_ORG)]) + } + return nil + } + + if IsAliveMsg(m) || m.GetMemReq() != nil || m.GetMemRes() != nil { + if m.Tag != gossip.GossipMessage_EMPTY { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_EMPTY)]) + } + return nil + } + + if IsIdentityMsg(m) { + if m.Tag != gossip.GossipMessage_ORG_ONLY { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_ORG_ONLY)]) + } + return nil + } + + if IsPullMsg(m) { + switch GetPullMsgType(m) { + case gossip.PullMsgType_BLOCK_MSG: + if m.Tag != gossip.GossipMessage_CHAN_AND_ORG { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_CHAN_AND_ORG)]) + } + return nil + case gossip.PullMsgType_IDENTITY_MSG: + if m.Tag != gossip.GossipMessage_EMPTY { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_EMPTY)]) + } + return nil + default: + return fmt.Errorf("Invalid PullMsgType: %s", gossip.PullMsgType_name[int32(GetPullMsgType(m))]) + } + } + + if IsStateInfoMsg(m) || IsStateInfoPullRequestMsg(m) || IsStateInfoSnapshot(m) || IsRemoteStateMessage(m) { + if m.Tag != gossip.GossipMessage_CHAN_OR_ORG { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_CHAN_OR_ORG)]) + } + return nil + } + + if IsLeadershipMsg(m) { + if m.Tag != gossip.GossipMessage_CHAN_AND_ORG { + return fmt.Errorf("Tag should be %s", gossip.GossipMessage_Tag_name[int32(gossip.GossipMessage_CHAN_AND_ORG)]) + } + return nil + } + + return fmt.Errorf("Unknown message type: %v", m) +} diff --git a/internal/github.com/hyperledger/fabric/gossip/protoext/signing.go b/internal/github.com/hyperledger/fabric/gossip/protoext/signing.go new file mode 100644 index 0000000000..6a7e5b81b8 --- /dev/null +++ b/internal/github.com/hyperledger/fabric/gossip/protoext/signing.go @@ -0,0 +1,210 @@ +/* +Copyright IBM Corp. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ +/* +Notice: This file has been modified for Hyperledger Fabric SDK Go usage. +Please review third_party pinning scripts and patches for more details. +*/ + +package protoext + +import ( + "errors" + "fmt" + + "github.com/gogo/protobuf/proto" + "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip" +) + +// Signer signs a message, and returns (signature, nil) +// on success, and nil and an error on failure. +type Signer func(msg []byte) ([]byte, error) + +// Verifier receives a peer identity, a signature and a message and returns nil +// if the signature on the message could be verified using the given identity. +type Verifier func(peerIdentity []byte, signature, message []byte) error + +// SignSecret signs the secret payload and creates a secret envelope out of it. +func SignSecret(e *gossip.Envelope, signer Signer, secret *gossip.Secret) error { + payload, err := proto.Marshal(secret) + if err != nil { + return err + } + sig, err := signer(payload) + if err != nil { + return err + } + e.SecretEnvelope = &gossip.SecretEnvelope{ + Payload: payload, + Signature: sig, + } + return nil +} + +// NoopSign creates a SignedGossipMessage with a nil signature +func NoopSign(m *gossip.GossipMessage) (*SignedGossipMessage, error) { + signer := func(msg []byte) ([]byte, error) { + return nil, nil + } + sMsg := &SignedGossipMessage{ + GossipMessage: m, + } + _, err := sMsg.Sign(signer) + return sMsg, err +} + +// EnvelopeToGossipMessage un-marshals a given envelope and creates a +// SignedGossipMessage out of it. +// Returns an error if un-marshaling fails. +func EnvelopeToGossipMessage(e *gossip.Envelope) (*SignedGossipMessage, error) { + if e == nil { + return nil, errors.New("nil envelope") + } + msg := &gossip.GossipMessage{} + err := proto.Unmarshal(e.Payload, msg) + if err != nil { + return nil, fmt.Errorf("Failed unmarshaling GossipMessage from envelope: %v", err) + } + return &SignedGossipMessage{ + GossipMessage: msg, + Envelope: e, + }, nil +} + +// InternalEndpoint returns the internal endpoint in the secret envelope, or an +// empty string if a failure occurs. +func InternalEndpoint(s *gossip.SecretEnvelope) string { + secret := &gossip.Secret{} + if err := proto.Unmarshal(s.Payload, secret); err != nil { + return "" + } + return secret.GetInternalEndpoint() +} + +// SignedGossipMessage contains a GossipMessage and the Envelope from which it +// came from +type SignedGossipMessage struct { + *gossip.Envelope + *gossip.GossipMessage +} + +// Sign signs a GossipMessage with given Signer. +// Returns an Envelope on success, panics on failure. +func (m *SignedGossipMessage) Sign(signer Signer) (*gossip.Envelope, error) { + // If we have a secretEnvelope, don't override it. + // Back it up, and restore it later + var secretEnvelope *gossip.SecretEnvelope + if m.Envelope != nil { + secretEnvelope = m.Envelope.SecretEnvelope + } + m.Envelope = nil + payload, err := proto.Marshal(m.GossipMessage) + if err != nil { + return nil, err + } + sig, err := signer(payload) + if err != nil { + return nil, err + } + + e := &gossip.Envelope{ + Payload: payload, + Signature: sig, + SecretEnvelope: secretEnvelope, + } + m.Envelope = e + return e, nil +} + +// Verify verifies a signed GossipMessage with a given Verifier. +// Returns nil on success, error on failure. +func (m *SignedGossipMessage) Verify(peerIdentity []byte, verify Verifier) error { + if m.Envelope == nil { + return errors.New("Missing envelope") + } + if len(m.Envelope.Payload) == 0 { + return errors.New("Empty payload") + } + if len(m.Envelope.Signature) == 0 { + return errors.New("Empty signature") + } + payloadSigVerificationErr := verify(peerIdentity, m.Envelope.Signature, m.Envelope.Payload) + if payloadSigVerificationErr != nil { + return payloadSigVerificationErr + } + if m.Envelope.SecretEnvelope != nil { + payload := m.Envelope.SecretEnvelope.Payload + sig := m.Envelope.SecretEnvelope.Signature + if len(payload) == 0 { + return errors.New("Empty payload") + } + if len(sig) == 0 { + return errors.New("Empty signature") + } + return verify(peerIdentity, sig, payload) + } + return nil +} + +// IsSigned returns whether the message +// has a signature in the envelope. +func (m *SignedGossipMessage) IsSigned() bool { + return m.Envelope != nil && m.Envelope.Payload != nil && m.Envelope.Signature != nil +} + +// String returns a string representation +// of a SignedGossipMessage +func (m *SignedGossipMessage) String() string { + env := "No envelope" + if m.Envelope != nil { + var secretEnv string + if m.SecretEnvelope != nil { + pl := len(m.SecretEnvelope.Payload) + sl := len(m.SecretEnvelope.Signature) + secretEnv = fmt.Sprintf(" Secret payload: %d bytes, Secret Signature: %d bytes", pl, sl) + } + env = fmt.Sprintf("%d bytes, Signature: %d bytes%s", len(m.Envelope.Payload), len(m.Envelope.Signature), secretEnv) + } + gMsg := "No gossipMessage" + if m.GossipMessage != nil { + var isSimpleMsg bool + if m.GetStateResponse() != nil { + gMsg = fmt.Sprintf("StateResponse with %d items", len(m.GetStateResponse().Payloads)) + } else if IsDataMsg(m.GossipMessage) && m.GetDataMsg().Payload != nil { + gMsg = PayloadToString(m.GetDataMsg().Payload) + } else if IsDataUpdate(m.GossipMessage) { + update := m.GetDataUpdate() + gMsg = fmt.Sprintf("DataUpdate: %s", DataUpdateToString(update)) + } else if m.GetMemRes() != nil { + gMsg = MembershipResponseToString(m.GetMemRes()) + } else if IsStateInfoSnapshot(m.GossipMessage) { + gMsg = StateInfoSnapshotToString(m.GetStateSnapshot()) + } else if m.GetPrivateRes() != nil { + gMsg = RemovePvtDataResponseToString(m.GetPrivateRes()) + } else if m.GetAliveMsg() != nil { + gMsg = AliveMessageToString(m.GetAliveMsg()) + } else if m.GetMemReq() != nil { + gMsg = MembershipRequestToString(m.GetMemReq()) + } else if m.GetStateInfoPullReq() != nil { + gMsg = StateInfoPullRequestToString(m.GetStateInfoPullReq()) + } else if m.GetStateInfo() != nil { + gMsg = StateInfoToString(m.GetStateInfo()) + } else if m.GetDataDig() != nil { + gMsg = DataDigestToString(m.GetDataDig()) + } else if m.GetDataReq() != nil { + gMsg = DataRequestToString(m.GetDataReq()) + } else if m.GetLeadershipMsg() != nil { + gMsg = LeadershipMessageToString(m.GetLeadershipMsg()) + } else { + gMsg = m.GossipMessage.String() + isSimpleMsg = true + } + if !isSimpleMsg { + desc := fmt.Sprintf("Channel: %s, nonce: %d, tag: %s", string(m.Channel), m.Nonce, gossip.GossipMessage_Tag_name[int32(m.Tag)]) + gMsg = fmt.Sprintf("%s %s", desc, gMsg) + } + } + return fmt.Sprintf("GossipMessage: %v, Envelope: %s", gMsg, env) +} diff --git a/internal/github.com/hyperledger/fabric/gossip/protoext/stringers.go b/internal/github.com/hyperledger/fabric/gossip/protoext/stringers.go new file mode 100644 index 0000000000..4c1e2c9f0b --- /dev/null +++ b/internal/github.com/hyperledger/fabric/gossip/protoext/stringers.go @@ -0,0 +1,128 @@ +/* +Copyright IBM Corp. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 +*/ +/* +Notice: This file has been modified for Hyperledger Fabric SDK Go usage. +Please review third_party pinning scripts and patches for more details. +*/ + +package protoext + +import ( + "encoding/hex" + "fmt" + + "github.com/gogo/protobuf/proto" + "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp" +) + +// MemberToString prints Endpoint and PKI-id +func MemberToString(m *gossip.Member) string { + return fmt.Sprint("Membership: Endpoint:", m.Endpoint, " PKI-id:", hex.EncodeToString(m.PkiId)) +} + +// MembershipResponseToString of MembershipResponse prints number of Alive and number of Dead +func MembershipResponseToString(mr *gossip.MembershipResponse) string { + return fmt.Sprintf("MembershipResponse with Alive: %d, Dead: %d", len(mr.Alive), len(mr.Dead)) +} + +// AliveMessageToString of AliveMessage prints Alive Message, Identity and Timestamp +func AliveMessageToString(am *gossip.AliveMessage) string { + if am.Membership == nil { + return "nil Membership" + } + var sI string + serializeIdentity := &msp.SerializedIdentity{} + if err := proto.Unmarshal(am.Identity, serializeIdentity); err == nil { + sI = serializeIdentity.Mspid + string(serializeIdentity.IdBytes) + } + return fmt.Sprint("Alive Message:", MemberToString(am.Membership), "Identity:", sI, "Timestamp:", am.Timestamp) +} + +// PayloadToString prints Block message: Data and seq +func PayloadToString(p *gossip.Payload) string { + return fmt.Sprintf("Block message: {Data: %d bytes, seq: %d}", len(p.Data), p.SeqNum) +} + +// DataUpdateToString prints Type, items and nonce +func DataUpdateToString(du *gossip.DataUpdate) string { + mType := gossip.PullMsgType_name[int32(du.MsgType)] + return fmt.Sprintf("Type: %s, items: %d, nonce: %d", mType, len(du.Data), du.Nonce) +} + +// StateInfoSnapshotToString prints items +func StateInfoSnapshotToString(sis *gossip.StateInfoSnapshot) string { + return fmt.Sprintf("StateInfoSnapshot with %d items", len(sis.Elements)) +} + +// MembershipRequestToString prints self information +func MembershipRequestToString(mr *gossip.MembershipRequest) string { + if mr.SelfInformation == nil { + return "" + } + signGM, err := EnvelopeToGossipMessage(mr.SelfInformation) + if err != nil { + return "" + } + return fmt.Sprintf("Membership Request with self information of %s ", signGM.String()) +} + +// StateInfoPullRequestToString prints Channel MAC +func StateInfoPullRequestToString(sipr *gossip.StateInfoPullRequest) string { + return fmt.Sprint("state_info_pull_req: Channel MAC:", hex.EncodeToString(sipr.Channel_MAC)) +} + +// StateInfoToString prints Timestamp and PKI-id +func StateInfoToString(si *gossip.StateInfo) string { + return fmt.Sprint("state_info_message: Timestamp:", si.Timestamp, "PKI-id:", hex.EncodeToString(si.PkiId), + " channel MAC:", hex.EncodeToString(si.Channel_MAC), " properties:", si.Properties) +} + +// formatDigests formats digest byte arrays into strings depending on the message type +func formatDigests(msgType gossip.PullMsgType, givenDigests [][]byte) []string { + var digests []string + switch msgType { + case gossip.PullMsgType_BLOCK_MSG: + for _, digest := range givenDigests { + digests = append(digests, string(digest)) + } + case gossip.PullMsgType_IDENTITY_MSG: + for _, digest := range givenDigests { + digests = append(digests, hex.EncodeToString(digest)) + } + + } + return digests +} + +// DataDigestToString prints nonce, msg_type and digests +func DataDigestToString(dig *gossip.DataDigest) string { + var digests []string + digests = formatDigests(dig.MsgType, dig.Digests) + return fmt.Sprintf("data_dig: nonce: %d , Msg_type: %s, digests: %v", dig.Nonce, dig.MsgType, digests) +} + +// DataRequestToString prints nonce, msg_type and digests +func DataRequestToString(dataReq *gossip.DataRequest) string { + var digests []string + digests = formatDigests(dataReq.MsgType, dataReq.Digests) + return fmt.Sprintf("data request: nonce: %d , Msg_type: %s, digests: %v", dataReq.Nonce, dataReq.MsgType, digests) +} + +// LeadershipMessageToString prints PKI-id, Timestamp and Is Declaration +func LeadershipMessageToString(lm *gossip.LeadershipMessage) string { + return fmt.Sprint("Leadership Message: PKI-id:", hex.EncodeToString(lm.PkiId), " Timestamp:", lm.Timestamp, + "Is Declaration ", lm.IsDeclaration) +} + +// RemovePvtDataResponseToString returns a string representation of this RemotePvtDataResponse +func RemovePvtDataResponseToString(res *gossip.RemotePvtDataResponse) string { + a := make([]string, len(res.Elements)) + for i, el := range res.Elements { + a[i] = fmt.Sprintf("%s with %d elements", el.Digest.String(), len(el.Payload)) + } + return fmt.Sprintf("%v", a) +} diff --git a/internal/github.com/hyperledger/fabric/msp/mspimpl.go b/internal/github.com/hyperledger/fabric/msp/mspimpl.go index 27b001269a..5120811d7a 100644 --- a/internal/github.com/hyperledger/fabric/msp/mspimpl.go +++ b/internal/github.com/hyperledger/fabric/msp/mspimpl.go @@ -189,6 +189,9 @@ func (msp *bccspmsp) getSigningIdentityFromConf(sidInfo *m.SigningIdentityInfo) } pemKey, _ := pem.Decode(sidInfo.PrivateSigner.KeyMaterial) + if pemKey == nil { + return nil, errors.Errorf("%s: wrong PEM encoding", sidInfo.PrivateSigner.KeyIdentifier) + } privKey, err = msp.bccsp.KeyImport(pemKey.Bytes, factory.GetECDSAPrivateKeyImportOpts(true)) if err != nil { return nil, errors.WithMessage(err, "getIdentityFromBytes error: Failed to import EC private key") diff --git a/internal/github.com/hyperledger/fabric/protos/discovery/extensions.go b/internal/github.com/hyperledger/fabric/protos/discovery/extensions.go deleted file mode 100644 index 26c30d3bd3..0000000000 --- a/internal/github.com/hyperledger/fabric/protos/discovery/extensions.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright IBM Corp. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 -*/ - -package discovery - -// QueryType defines the types of service discovery requests -type QueryType uint8 - -const ( - InvalidQueryType QueryType = iota - ConfigQueryType - PeerMembershipQueryType - ChaincodeQueryType - LocalMembershipQueryType -) - -// ConfigAt returns the ConfigResult at a given index in the Response, -// or an Error if present. -func (m *Response) ConfigAt(i int) (*ConfigResult, *Error) { - r := m.Results[i] - return r.GetConfigResult(), r.GetError() -} - -// MembershipAt returns the PeerMembershipResult at a given index in the Response, -// or an Error if present. -func (m *Response) MembershipAt(i int) (*PeerMembershipResult, *Error) { - r := m.Results[i] - return r.GetMembers(), r.GetError() -} - -// EndorsersAt returns the PeerMembershipResult at a given index in the Response, -// or an Error if present. -func (m *Response) EndorsersAt(i int) (*ChaincodeQueryResult, *Error) { - r := m.Results[i] - return r.GetCcQueryRes(), r.GetError() -} diff --git a/internal/github.com/hyperledger/fabric/protos/discovery/protocol.pb.go b/internal/github.com/hyperledger/fabric/protos/discovery/protocol.pb.go index 6e64b575a1..6646ae7118 100644 --- a/internal/github.com/hyperledger/fabric/protos/discovery/protocol.pb.go +++ b/internal/github.com/hyperledger/fabric/protos/discovery/protocol.pb.go @@ -46,7 +46,7 @@ func (m *SignedRequest) Reset() { *m = SignedRequest{} } func (m *SignedRequest) String() string { return proto.CompactTextString(m) } func (*SignedRequest) ProtoMessage() {} func (*SignedRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{0} + return fileDescriptor_protocol_169e1676d7f15f17, []int{0} } func (m *SignedRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedRequest.Unmarshal(m, b) @@ -97,7 +97,7 @@ func (m *Request) Reset() { *m = Request{} } func (m *Request) String() string { return proto.CompactTextString(m) } func (*Request) ProtoMessage() {} func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{1} + return fileDescriptor_protocol_169e1676d7f15f17, []int{1} } func (m *Request) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Request.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{2} + return fileDescriptor_protocol_169e1676d7f15f17, []int{2} } func (m *Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Response.Unmarshal(m, b) @@ -194,7 +194,7 @@ func (m *AuthInfo) Reset() { *m = AuthInfo{} } func (m *AuthInfo) String() string { return proto.CompactTextString(m) } func (*AuthInfo) ProtoMessage() {} func (*AuthInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{3} + return fileDescriptor_protocol_169e1676d7f15f17, []int{3} } func (m *AuthInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AuthInfo.Unmarshal(m, b) @@ -246,7 +246,7 @@ func (m *Query) Reset() { *m = Query{} } func (m *Query) String() string { return proto.CompactTextString(m) } func (*Query) ProtoMessage() {} func (*Query) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{4} + return fileDescriptor_protocol_169e1676d7f15f17, []int{4} } func (m *Query) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Query.Unmarshal(m, b) @@ -468,7 +468,7 @@ func (m *QueryResult) Reset() { *m = QueryResult{} } func (m *QueryResult) String() string { return proto.CompactTextString(m) } func (*QueryResult) ProtoMessage() {} func (*QueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{5} + return fileDescriptor_protocol_169e1676d7f15f17, []int{5} } func (m *QueryResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryResult.Unmarshal(m, b) @@ -674,7 +674,7 @@ func (m *ConfigQuery) Reset() { *m = ConfigQuery{} } func (m *ConfigQuery) String() string { return proto.CompactTextString(m) } func (*ConfigQuery) ProtoMessage() {} func (*ConfigQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{6} + return fileDescriptor_protocol_169e1676d7f15f17, []int{6} } func (m *ConfigQuery) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigQuery.Unmarshal(m, b) @@ -708,7 +708,7 @@ func (m *ConfigResult) Reset() { *m = ConfigResult{} } func (m *ConfigResult) String() string { return proto.CompactTextString(m) } func (*ConfigResult) ProtoMessage() {} func (*ConfigResult) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{7} + return fileDescriptor_protocol_169e1676d7f15f17, []int{7} } func (m *ConfigResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigResult.Unmarshal(m, b) @@ -758,7 +758,7 @@ func (m *PeerMembershipQuery) Reset() { *m = PeerMembershipQuery{} } func (m *PeerMembershipQuery) String() string { return proto.CompactTextString(m) } func (*PeerMembershipQuery) ProtoMessage() {} func (*PeerMembershipQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{8} + return fileDescriptor_protocol_169e1676d7f15f17, []int{8} } func (m *PeerMembershipQuery) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PeerMembershipQuery.Unmarshal(m, b) @@ -797,7 +797,7 @@ func (m *PeerMembershipResult) Reset() { *m = PeerMembershipResult{} } func (m *PeerMembershipResult) String() string { return proto.CompactTextString(m) } func (*PeerMembershipResult) ProtoMessage() {} func (*PeerMembershipResult) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{9} + return fileDescriptor_protocol_169e1676d7f15f17, []int{9} } func (m *PeerMembershipResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PeerMembershipResult.Unmarshal(m, b) @@ -839,7 +839,7 @@ func (m *ChaincodeQuery) Reset() { *m = ChaincodeQuery{} } func (m *ChaincodeQuery) String() string { return proto.CompactTextString(m) } func (*ChaincodeQuery) ProtoMessage() {} func (*ChaincodeQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{10} + return fileDescriptor_protocol_169e1676d7f15f17, []int{10} } func (m *ChaincodeQuery) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeQuery.Unmarshal(m, b) @@ -880,7 +880,7 @@ func (m *ChaincodeInterest) Reset() { *m = ChaincodeInterest{} } func (m *ChaincodeInterest) String() string { return proto.CompactTextString(m) } func (*ChaincodeInterest) ProtoMessage() {} func (*ChaincodeInterest) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{11} + return fileDescriptor_protocol_169e1676d7f15f17, []int{11} } func (m *ChaincodeInterest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeInterest.Unmarshal(m, b) @@ -921,7 +921,7 @@ func (m *ChaincodeCall) Reset() { *m = ChaincodeCall{} } func (m *ChaincodeCall) String() string { return proto.CompactTextString(m) } func (*ChaincodeCall) ProtoMessage() {} func (*ChaincodeCall) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{12} + return fileDescriptor_protocol_169e1676d7f15f17, []int{12} } func (m *ChaincodeCall) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeCall.Unmarshal(m, b) @@ -968,7 +968,7 @@ func (m *ChaincodeQueryResult) Reset() { *m = ChaincodeQueryResult{} } func (m *ChaincodeQueryResult) String() string { return proto.CompactTextString(m) } func (*ChaincodeQueryResult) ProtoMessage() {} func (*ChaincodeQueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{13} + return fileDescriptor_protocol_169e1676d7f15f17, []int{13} } func (m *ChaincodeQueryResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeQueryResult.Unmarshal(m, b) @@ -1006,7 +1006,7 @@ func (m *LocalPeerQuery) Reset() { *m = LocalPeerQuery{} } func (m *LocalPeerQuery) String() string { return proto.CompactTextString(m) } func (*LocalPeerQuery) ProtoMessage() {} func (*LocalPeerQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{14} + return fileDescriptor_protocol_169e1676d7f15f17, []int{14} } func (m *LocalPeerQuery) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LocalPeerQuery.Unmarshal(m, b) @@ -1055,7 +1055,7 @@ func (m *EndorsementDescriptor) Reset() { *m = EndorsementDescriptor{} } func (m *EndorsementDescriptor) String() string { return proto.CompactTextString(m) } func (*EndorsementDescriptor) ProtoMessage() {} func (*EndorsementDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{15} + return fileDescriptor_protocol_169e1676d7f15f17, []int{15} } func (m *EndorsementDescriptor) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EndorsementDescriptor.Unmarshal(m, b) @@ -1111,7 +1111,7 @@ func (m *Layout) Reset() { *m = Layout{} } func (m *Layout) String() string { return proto.CompactTextString(m) } func (*Layout) ProtoMessage() {} func (*Layout) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{16} + return fileDescriptor_protocol_169e1676d7f15f17, []int{16} } func (m *Layout) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Layout.Unmarshal(m, b) @@ -1150,7 +1150,7 @@ func (m *Peers) Reset() { *m = Peers{} } func (m *Peers) String() string { return proto.CompactTextString(m) } func (*Peers) ProtoMessage() {} func (*Peers) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{17} + return fileDescriptor_protocol_169e1676d7f15f17, []int{17} } func (m *Peers) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Peers.Unmarshal(m, b) @@ -1195,7 +1195,7 @@ func (m *Peer) Reset() { *m = Peer{} } func (m *Peer) String() string { return proto.CompactTextString(m) } func (*Peer) ProtoMessage() {} func (*Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{18} + return fileDescriptor_protocol_169e1676d7f15f17, []int{18} } func (m *Peer) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Peer.Unmarshal(m, b) @@ -1248,7 +1248,7 @@ func (m *Error) Reset() { *m = Error{} } func (m *Error) String() string { return proto.CompactTextString(m) } func (*Error) ProtoMessage() {} func (*Error) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{19} + return fileDescriptor_protocol_169e1676d7f15f17, []int{19} } func (m *Error) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Error.Unmarshal(m, b) @@ -1287,7 +1287,7 @@ func (m *Endpoints) Reset() { *m = Endpoints{} } func (m *Endpoints) String() string { return proto.CompactTextString(m) } func (*Endpoints) ProtoMessage() {} func (*Endpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{20} + return fileDescriptor_protocol_169e1676d7f15f17, []int{20} } func (m *Endpoints) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Endpoints.Unmarshal(m, b) @@ -1327,7 +1327,7 @@ func (m *Endpoint) Reset() { *m = Endpoint{} } func (m *Endpoint) String() string { return proto.CompactTextString(m) } func (*Endpoint) ProtoMessage() {} func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_protocol_b2f93a2b7b5bdad4, []int{21} + return fileDescriptor_protocol_169e1676d7f15f17, []int{21} } func (m *Endpoint) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Endpoint.Unmarshal(m, b) @@ -1465,9 +1465,9 @@ var _Discovery_serviceDesc = grpc.ServiceDesc{ Metadata: "discovery/protocol.proto", } -func init() { proto.RegisterFile("discovery/protocol.proto", fileDescriptor_protocol_b2f93a2b7b5bdad4) } +func init() { proto.RegisterFile("discovery/protocol.proto", fileDescriptor_protocol_169e1676d7f15f17) } -var fileDescriptor_protocol_b2f93a2b7b5bdad4 = []byte{ +var fileDescriptor_protocol_169e1676d7f15f17 = []byte{ // 1145 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5b, 0x6f, 0xe3, 0x44, 0x14, 0x6e, 0xd2, 0xa6, 0x49, 0x4e, 0x9a, 0x5e, 0xa6, 0x61, 0x09, 0xd1, 0x8a, 0xdd, 0xb5, 0xb4, diff --git a/internal/github.com/hyperledger/fabric/protos/gossip/extensions.go b/internal/github.com/hyperledger/fabric/protos/gossip/extensions.go deleted file mode 100644 index 4941e8a322..0000000000 --- a/internal/github.com/hyperledger/fabric/protos/gossip/extensions.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright IBM Corp. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 -*/ - -package gossip - -import ( - "errors" - "fmt" - - "github.com/golang/protobuf/proto" -) - -// ToGossipMessage un-marshals a given envelope and creates a -// SignedGossipMessage out of it. -// Returns an error if un-marshaling fails. -func (e *Envelope) ToGossipMessage() (*SignedGossipMessage, error) { - if e == nil { - return nil, errors.New("nil envelope") - } - msg := &GossipMessage{} - err := proto.Unmarshal(e.Payload, msg) - if err != nil { - return nil, fmt.Errorf("Failed unmarshaling GossipMessage from envelope: %v", err) - } - return &SignedGossipMessage{ - GossipMessage: msg, - Envelope: e, - }, nil -} - -// InternalEndpoint returns the internal endpoint -// in the secret envelope, or an empty string -// if a failure occurs. -func (s *SecretEnvelope) InternalEndpoint() string { - secret := &Secret{} - if err := proto.Unmarshal(s.Payload, secret); err != nil { - return "" - } - return secret.GetInternalEndpoint() -} - -// SignedGossipMessage contains a GossipMessage -// and the Envelope from which it came from -type SignedGossipMessage struct { - *Envelope - *GossipMessage -} diff --git a/internal/github.com/hyperledger/fabric/protos/gossip/message.pb.go b/internal/github.com/hyperledger/fabric/protos/gossip/message.pb.go index 545aef34e5..6e53d84487 100644 --- a/internal/github.com/hyperledger/fabric/protos/gossip/message.pb.go +++ b/internal/github.com/hyperledger/fabric/protos/gossip/message.pb.go @@ -51,7 +51,7 @@ func (x PullMsgType) String() string { return proto.EnumName(PullMsgType_name, int32(x)) } func (PullMsgType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{0} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{0} } type GossipMessage_Tag int32 @@ -86,7 +86,7 @@ func (x GossipMessage_Tag) String() string { return proto.EnumName(GossipMessage_Tag_name, int32(x)) } func (GossipMessage_Tag) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{3, 0} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{3, 0} } // Envelope contains a marshalled @@ -106,7 +106,7 @@ func (m *Envelope) Reset() { *m = Envelope{} } func (m *Envelope) String() string { return proto.CompactTextString(m) } func (*Envelope) ProtoMessage() {} func (*Envelope) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{0} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{0} } func (m *Envelope) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Envelope.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *SecretEnvelope) Reset() { *m = SecretEnvelope{} } func (m *SecretEnvelope) String() string { return proto.CompactTextString(m) } func (*SecretEnvelope) ProtoMessage() {} func (*SecretEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{1} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{1} } func (m *SecretEnvelope) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SecretEnvelope.Unmarshal(m, b) @@ -214,7 +214,7 @@ func (m *Secret) Reset() { *m = Secret{} } func (m *Secret) String() string { return proto.CompactTextString(m) } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{2} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{2} } func (m *Secret) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Secret.Unmarshal(m, b) @@ -353,7 +353,7 @@ func (m *GossipMessage) Reset() { *m = GossipMessage{} } func (m *GossipMessage) String() string { return proto.CompactTextString(m) } func (*GossipMessage) ProtoMessage() {} func (*GossipMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{3} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{3} } func (m *GossipMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GossipMessage.Unmarshal(m, b) @@ -1132,7 +1132,7 @@ func (m *StateInfo) Reset() { *m = StateInfo{} } func (m *StateInfo) String() string { return proto.CompactTextString(m) } func (*StateInfo) ProtoMessage() {} func (*StateInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{4} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{4} } func (m *StateInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StateInfo.Unmarshal(m, b) @@ -1193,7 +1193,7 @@ func (m *Properties) Reset() { *m = Properties{} } func (m *Properties) String() string { return proto.CompactTextString(m) } func (*Properties) ProtoMessage() {} func (*Properties) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{5} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{5} } func (m *Properties) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Properties.Unmarshal(m, b) @@ -1246,7 +1246,7 @@ func (m *StateInfoSnapshot) Reset() { *m = StateInfoSnapshot{} } func (m *StateInfoSnapshot) String() string { return proto.CompactTextString(m) } func (*StateInfoSnapshot) ProtoMessage() {} func (*StateInfoSnapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{6} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{6} } func (m *StateInfoSnapshot) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StateInfoSnapshot.Unmarshal(m, b) @@ -1289,7 +1289,7 @@ func (m *StateInfoPullRequest) Reset() { *m = StateInfoPullRequest{} } func (m *StateInfoPullRequest) String() string { return proto.CompactTextString(m) } func (*StateInfoPullRequest) ProtoMessage() {} func (*StateInfoPullRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{7} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{7} } func (m *StateInfoPullRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StateInfoPullRequest.Unmarshal(m, b) @@ -1332,7 +1332,7 @@ func (m *ConnEstablish) Reset() { *m = ConnEstablish{} } func (m *ConnEstablish) String() string { return proto.CompactTextString(m) } func (*ConnEstablish) ProtoMessage() {} func (*ConnEstablish) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{8} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{8} } func (m *ConnEstablish) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConnEstablish.Unmarshal(m, b) @@ -1389,7 +1389,7 @@ func (m *PeerIdentity) Reset() { *m = PeerIdentity{} } func (m *PeerIdentity) String() string { return proto.CompactTextString(m) } func (*PeerIdentity) ProtoMessage() {} func (*PeerIdentity) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{9} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{9} } func (m *PeerIdentity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PeerIdentity.Unmarshal(m, b) @@ -1445,7 +1445,7 @@ func (m *DataRequest) Reset() { *m = DataRequest{} } func (m *DataRequest) String() string { return proto.CompactTextString(m) } func (*DataRequest) ProtoMessage() {} func (*DataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{10} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{10} } func (m *DataRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DataRequest.Unmarshal(m, b) @@ -1501,7 +1501,7 @@ func (m *GossipHello) Reset() { *m = GossipHello{} } func (m *GossipHello) String() string { return proto.CompactTextString(m) } func (*GossipHello) ProtoMessage() {} func (*GossipHello) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{11} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{11} } func (m *GossipHello) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GossipHello.Unmarshal(m, b) @@ -1557,7 +1557,7 @@ func (m *DataUpdate) Reset() { *m = DataUpdate{} } func (m *DataUpdate) String() string { return proto.CompactTextString(m) } func (*DataUpdate) ProtoMessage() {} func (*DataUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{12} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{12} } func (m *DataUpdate) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DataUpdate.Unmarshal(m, b) @@ -1613,7 +1613,7 @@ func (m *DataDigest) Reset() { *m = DataDigest{} } func (m *DataDigest) String() string { return proto.CompactTextString(m) } func (*DataDigest) ProtoMessage() {} func (*DataDigest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{13} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{13} } func (m *DataDigest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DataDigest.Unmarshal(m, b) @@ -1666,7 +1666,7 @@ func (m *DataMessage) Reset() { *m = DataMessage{} } func (m *DataMessage) String() string { return proto.CompactTextString(m) } func (*DataMessage) ProtoMessage() {} func (*DataMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{14} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{14} } func (m *DataMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DataMessage.Unmarshal(m, b) @@ -1707,7 +1707,7 @@ func (m *PrivateDataMessage) Reset() { *m = PrivateDataMessage{} } func (m *PrivateDataMessage) String() string { return proto.CompactTextString(m) } func (*PrivateDataMessage) ProtoMessage() {} func (*PrivateDataMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{15} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{15} } func (m *PrivateDataMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PrivateDataMessage.Unmarshal(m, b) @@ -1748,7 +1748,7 @@ func (m *Payload) Reset() { *m = Payload{} } func (m *Payload) String() string { return proto.CompactTextString(m) } func (*Payload) ProtoMessage() {} func (*Payload) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{16} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{16} } func (m *Payload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Payload.Unmarshal(m, b) @@ -1808,7 +1808,7 @@ func (m *PrivatePayload) Reset() { *m = PrivatePayload{} } func (m *PrivatePayload) String() string { return proto.CompactTextString(m) } func (*PrivatePayload) ProtoMessage() {} func (*PrivatePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{17} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{17} } func (m *PrivatePayload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PrivatePayload.Unmarshal(m, b) @@ -1885,7 +1885,7 @@ func (m *AliveMessage) Reset() { *m = AliveMessage{} } func (m *AliveMessage) String() string { return proto.CompactTextString(m) } func (*AliveMessage) ProtoMessage() {} func (*AliveMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{18} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{18} } func (m *AliveMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AliveMessage.Unmarshal(m, b) @@ -1941,7 +1941,7 @@ func (m *LeadershipMessage) Reset() { *m = LeadershipMessage{} } func (m *LeadershipMessage) String() string { return proto.CompactTextString(m) } func (*LeadershipMessage) ProtoMessage() {} func (*LeadershipMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{19} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{19} } func (m *LeadershipMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LeadershipMessage.Unmarshal(m, b) @@ -1995,7 +1995,7 @@ func (m *PeerTime) Reset() { *m = PeerTime{} } func (m *PeerTime) String() string { return proto.CompactTextString(m) } func (*PeerTime) ProtoMessage() {} func (*PeerTime) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{20} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{20} } func (m *PeerTime) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PeerTime.Unmarshal(m, b) @@ -2043,7 +2043,7 @@ func (m *MembershipRequest) Reset() { *m = MembershipRequest{} } func (m *MembershipRequest) String() string { return proto.CompactTextString(m) } func (*MembershipRequest) ProtoMessage() {} func (*MembershipRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{21} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{21} } func (m *MembershipRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MembershipRequest.Unmarshal(m, b) @@ -2090,7 +2090,7 @@ func (m *MembershipResponse) Reset() { *m = MembershipResponse{} } func (m *MembershipResponse) String() string { return proto.CompactTextString(m) } func (*MembershipResponse) ProtoMessage() {} func (*MembershipResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{22} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{22} } func (m *MembershipResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MembershipResponse.Unmarshal(m, b) @@ -2139,7 +2139,7 @@ func (m *Member) Reset() { *m = Member{} } func (m *Member) String() string { return proto.CompactTextString(m) } func (*Member) ProtoMessage() {} func (*Member) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{23} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{23} } func (m *Member) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Member.Unmarshal(m, b) @@ -2191,7 +2191,7 @@ func (m *Empty) Reset() { *m = Empty{} } func (m *Empty) String() string { return proto.CompactTextString(m) } func (*Empty) ProtoMessage() {} func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{24} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{24} } func (m *Empty) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Empty.Unmarshal(m, b) @@ -2225,7 +2225,7 @@ func (m *RemoteStateRequest) Reset() { *m = RemoteStateRequest{} } func (m *RemoteStateRequest) String() string { return proto.CompactTextString(m) } func (*RemoteStateRequest) ProtoMessage() {} func (*RemoteStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{25} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{25} } func (m *RemoteStateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoteStateRequest.Unmarshal(m, b) @@ -2272,7 +2272,7 @@ func (m *RemoteStateResponse) Reset() { *m = RemoteStateResponse{} } func (m *RemoteStateResponse) String() string { return proto.CompactTextString(m) } func (*RemoteStateResponse) ProtoMessage() {} func (*RemoteStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{26} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{26} } func (m *RemoteStateResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoteStateResponse.Unmarshal(m, b) @@ -2312,7 +2312,7 @@ func (m *RemotePvtDataRequest) Reset() { *m = RemotePvtDataRequest{} } func (m *RemotePvtDataRequest) String() string { return proto.CompactTextString(m) } func (*RemotePvtDataRequest) ProtoMessage() {} func (*RemotePvtDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{27} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{27} } func (m *RemotePvtDataRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemotePvtDataRequest.Unmarshal(m, b) @@ -2355,7 +2355,7 @@ func (m *PvtDataDigest) Reset() { *m = PvtDataDigest{} } func (m *PvtDataDigest) String() string { return proto.CompactTextString(m) } func (*PvtDataDigest) ProtoMessage() {} func (*PvtDataDigest) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{28} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{28} } func (m *PvtDataDigest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PvtDataDigest.Unmarshal(m, b) @@ -2423,7 +2423,7 @@ func (m *RemotePvtDataResponse) Reset() { *m = RemotePvtDataResponse{} } func (m *RemotePvtDataResponse) String() string { return proto.CompactTextString(m) } func (*RemotePvtDataResponse) ProtoMessage() {} func (*RemotePvtDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{29} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{29} } func (m *RemotePvtDataResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemotePvtDataResponse.Unmarshal(m, b) @@ -2463,7 +2463,7 @@ func (m *PvtDataElement) Reset() { *m = PvtDataElement{} } func (m *PvtDataElement) String() string { return proto.CompactTextString(m) } func (*PvtDataElement) ProtoMessage() {} func (*PvtDataElement) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{30} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{30} } func (m *PvtDataElement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PvtDataElement.Unmarshal(m, b) @@ -2513,7 +2513,7 @@ func (m *PvtDataPayload) Reset() { *m = PvtDataPayload{} } func (m *PvtDataPayload) String() string { return proto.CompactTextString(m) } func (*PvtDataPayload) ProtoMessage() {} func (*PvtDataPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{31} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{31} } func (m *PvtDataPayload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PvtDataPayload.Unmarshal(m, b) @@ -2558,7 +2558,7 @@ func (m *Acknowledgement) Reset() { *m = Acknowledgement{} } func (m *Acknowledgement) String() string { return proto.CompactTextString(m) } func (*Acknowledgement) ProtoMessage() {} func (*Acknowledgement) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{32} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{32} } func (m *Acknowledgement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Acknowledgement.Unmarshal(m, b) @@ -2600,7 +2600,7 @@ func (m *Chaincode) Reset() { *m = Chaincode{} } func (m *Chaincode) String() string { return proto.CompactTextString(m) } func (*Chaincode) ProtoMessage() {} func (*Chaincode) Descriptor() ([]byte, []int) { - return fileDescriptor_message_7c42328ef5ef9997, []int{33} + return fileDescriptor_message_57c1f88f68ec6fc4, []int{33} } func (m *Chaincode) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Chaincode.Unmarshal(m, b) @@ -2822,9 +2822,9 @@ var _Gossip_serviceDesc = grpc.ServiceDesc{ Metadata: "gossip/message.proto", } -func init() { proto.RegisterFile("gossip/message.proto", fileDescriptor_message_7c42328ef5ef9997) } +func init() { proto.RegisterFile("gossip/message.proto", fileDescriptor_message_57c1f88f68ec6fc4) } -var fileDescriptor_message_7c42328ef5ef9997 = []byte{ +var fileDescriptor_message_57c1f88f68ec6fc4 = []byte{ // 1874 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x5b, 0x6f, 0xe3, 0xc6, 0x15, 0x16, 0x6d, 0x5d, 0x8f, 0x2e, 0x96, 0xc7, 0xde, 0x5d, 0xc6, 0x49, 0x13, 0x87, 0xed, 0x26, diff --git a/internal/github.com/hyperledger/fabric/protos/orderer/ab.pb.go b/internal/github.com/hyperledger/fabric/protos/orderer/ab.pb.go index 81a34c51b4..d848c49ae5 100644 --- a/internal/github.com/hyperledger/fabric/protos/orderer/ab.pb.go +++ b/internal/github.com/hyperledger/fabric/protos/orderer/ab.pb.go @@ -48,7 +48,7 @@ func (x SeekInfo_SeekBehavior) String() string { return proto.EnumName(SeekInfo_SeekBehavior_name, int32(x)) } func (SeekInfo_SeekBehavior) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{5, 0} + return fileDescriptor_ab_a649d6145bb7e649, []int{5, 0} } type BroadcastResponse struct { @@ -65,7 +65,7 @@ func (m *BroadcastResponse) Reset() { *m = BroadcastResponse{} } func (m *BroadcastResponse) String() string { return proto.CompactTextString(m) } func (*BroadcastResponse) ProtoMessage() {} func (*BroadcastResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{0} + return fileDescriptor_ab_a649d6145bb7e649, []int{0} } func (m *BroadcastResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BroadcastResponse.Unmarshal(m, b) @@ -109,7 +109,7 @@ func (m *SeekNewest) Reset() { *m = SeekNewest{} } func (m *SeekNewest) String() string { return proto.CompactTextString(m) } func (*SeekNewest) ProtoMessage() {} func (*SeekNewest) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{1} + return fileDescriptor_ab_a649d6145bb7e649, []int{1} } func (m *SeekNewest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SeekNewest.Unmarshal(m, b) @@ -139,7 +139,7 @@ func (m *SeekOldest) Reset() { *m = SeekOldest{} } func (m *SeekOldest) String() string { return proto.CompactTextString(m) } func (*SeekOldest) ProtoMessage() {} func (*SeekOldest) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{2} + return fileDescriptor_ab_a649d6145bb7e649, []int{2} } func (m *SeekOldest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SeekOldest.Unmarshal(m, b) @@ -170,7 +170,7 @@ func (m *SeekSpecified) Reset() { *m = SeekSpecified{} } func (m *SeekSpecified) String() string { return proto.CompactTextString(m) } func (*SeekSpecified) ProtoMessage() {} func (*SeekSpecified) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{3} + return fileDescriptor_ab_a649d6145bb7e649, []int{3} } func (m *SeekSpecified) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SeekSpecified.Unmarshal(m, b) @@ -212,7 +212,7 @@ func (m *SeekPosition) Reset() { *m = SeekPosition{} } func (m *SeekPosition) String() string { return proto.CompactTextString(m) } func (*SeekPosition) ProtoMessage() {} func (*SeekPosition) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{4} + return fileDescriptor_ab_a649d6145bb7e649, []int{4} } func (m *SeekPosition) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SeekPosition.Unmarshal(m, b) @@ -396,7 +396,7 @@ func (m *SeekInfo) Reset() { *m = SeekInfo{} } func (m *SeekInfo) String() string { return proto.CompactTextString(m) } func (*SeekInfo) ProtoMessage() {} func (*SeekInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{5} + return fileDescriptor_ab_a649d6145bb7e649, []int{5} } func (m *SeekInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SeekInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *DeliverResponse) Reset() { *m = DeliverResponse{} } func (m *DeliverResponse) String() string { return proto.CompactTextString(m) } func (*DeliverResponse) ProtoMessage() {} func (*DeliverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ab_86effae0ebc2388c, []int{6} + return fileDescriptor_ab_a649d6145bb7e649, []int{6} } func (m *DeliverResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeliverResponse.Unmarshal(m, b) @@ -761,9 +761,9 @@ var _AtomicBroadcast_serviceDesc = grpc.ServiceDesc{ Metadata: "orderer/ab.proto", } -func init() { proto.RegisterFile("orderer/ab.proto", fileDescriptor_ab_86effae0ebc2388c) } +func init() { proto.RegisterFile("orderer/ab.proto", fileDescriptor_ab_a649d6145bb7e649) } -var fileDescriptor_ab_86effae0ebc2388c = []byte{ +var fileDescriptor_ab_a649d6145bb7e649 = []byte{ // 505 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xdf, 0x6e, 0x12, 0x51, 0x10, 0xc6, 0x59, 0xa5, 0xb4, 0x8c, 0x2d, 0xa5, 0xa7, 0x69, 0x43, 0xb8, 0x30, 0xcd, 0x26, 0x55, diff --git a/pkg/client/common/mocks/mockdiscoveryclient.go b/pkg/client/common/mocks/mockdiscoveryclient.go index f4daaf6cb0..1353a1c655 100644 --- a/pkg/client/common/mocks/mockdiscoveryclient.go +++ b/pkg/client/common/mocks/mockdiscoveryclient.go @@ -11,6 +11,7 @@ import ( "sync" discclient "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client" + gprotoext "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/discovery" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/protos/gossip" "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab" @@ -145,8 +146,8 @@ func (b *MockDiscoverEndpointResponse) Build() fabdiscovery.Response { } } -func newAliveMessage(endpoint *discmocks.MockDiscoveryPeerEndpoint) *gossip.SignedGossipMessage { - return &gossip.SignedGossipMessage{ +func newAliveMessage(endpoint *discmocks.MockDiscoveryPeerEndpoint) *gprotoext.SignedGossipMessage { + return &gprotoext.SignedGossipMessage{ GossipMessage: &gossip.GossipMessage{ Content: &gossip.GossipMessage_AliveMsg{ AliveMsg: &gossip.AliveMessage{ @@ -159,8 +160,8 @@ func newAliveMessage(endpoint *discmocks.MockDiscoveryPeerEndpoint) *gossip.Sign } } -func newStateInfoMessage(endpoint *discmocks.MockDiscoveryPeerEndpoint) *gossip.SignedGossipMessage { - return &gossip.SignedGossipMessage{ +func newStateInfoMessage(endpoint *discmocks.MockDiscoveryPeerEndpoint) *gprotoext.SignedGossipMessage { + return &gprotoext.SignedGossipMessage{ GossipMessage: &gossip.GossipMessage{ Content: &gossip.GossipMessage_StateInfo{ StateInfo: &gossip.StateInfo{ diff --git a/pkg/client/resmgmt/lscc.go b/pkg/client/resmgmt/lscc.go index 90091ada10..078c6ec847 100644 --- a/pkg/client/resmgmt/lscc.go +++ b/pkg/client/resmgmt/lscc.go @@ -14,7 +14,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - protos_utils "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) const ( @@ -54,13 +54,13 @@ func createChaincodeDeployProposal(txh fab.TransactionHeader, deploy chaincodePr ccds := &pb.ChaincodeDeploymentSpec{ChaincodeSpec: &pb.ChaincodeSpec{ Type: pb.ChaincodeSpec_GOLANG, ChaincodeId: &pb.ChaincodeID{Name: chaincode.Name, Path: chaincode.Path, Version: chaincode.Version}, Input: &pb.ChaincodeInput{Args: chaincode.Args}}} - ccdsBytes, err := protos_utils.Marshal(ccds) + ccdsBytes, err := protoutil.Marshal(ccds) if err != nil { return nil, errors.WithMessage(err, "marshal of chaincode deployment spec failed") } args = append(args, ccdsBytes) - chaincodePolicyBytes, err := protos_utils.Marshal(chaincode.Policy) + chaincodePolicyBytes, err := protoutil.Marshal(chaincode.Policy) if err != nil { return nil, errors.WithMessage(err, "marshal of chaincode policy failed") } diff --git a/pkg/fab/events/deliverclient/connection/connection.go b/pkg/fab/events/deliverclient/connection/connection.go index 53f80802e8..ab20c587ac 100755 --- a/pkg/fab/events/deliverclient/connection/connection.go +++ b/pkg/fab/events/deliverclient/connection/connection.go @@ -22,7 +22,7 @@ import ( clientdisp "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/client/dispatcher" cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" "github.com/pkg/errors" "google.golang.org/grpc" ) @@ -143,7 +143,7 @@ func (c *DeliverConnection) createSignedEnvelope(msg proto.Message) (*cb.Envelop var msgVersion int32 var epoch uint64 - payloadChannelHeader := utils.MakeChannelHeader(cb.HeaderType_DELIVER_SEEK_INFO, msgVersion, c.ChannelConfig().ID(), epoch) + payloadChannelHeader := protoutil.MakeChannelHeader(cb.HeaderType_DELIVER_SEEK_INFO, msgVersion, c.ChannelConfig().ID(), epoch) payloadChannelHeader.TlsCertHash = c.TLSCertHash() data, err := proto.Marshal(msg) @@ -166,8 +166,8 @@ func (c *DeliverConnection) createSignedEnvelope(msg proto.Message) (*cb.Envelop Nonce: nonce, } - paylBytes := utils.MarshalOrPanic(&cb.Payload{ - Header: utils.MakePayloadHeader(payloadChannelHeader, payloadSignatureHeader), + paylBytes := protoutil.MarshalOrPanic(&cb.Payload{ + Header: protoutil.MakePayloadHeader(payloadChannelHeader, payloadSignatureHeader), Data: data, }) diff --git a/pkg/fab/events/service/blockfilter/headertypefilter/headertypefilter.go b/pkg/fab/events/service/blockfilter/headertypefilter/headertypefilter.go index f136703c9f..8551cc3b9f 100755 --- a/pkg/fab/events/service/blockfilter/headertypefilter/headertypefilter.go +++ b/pkg/fab/events/service/blockfilter/headertypefilter/headertypefilter.go @@ -10,7 +10,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/pkg/common/logging" "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab" cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" - "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) var logger = logging.NewLogger("eventservice/blockfilter") @@ -25,17 +25,17 @@ func New(headerTypes ...cb.HeaderType) fab.BlockFilter { func hasType(block *cb.Block, headerTypes ...cb.HeaderType) bool { for i := 0; i < len(block.Data.Data); i++ { - env, err := utils.ExtractEnvelope(block, i) + env, err := protoutil.ExtractEnvelope(block, i) if err != nil { logger.Errorf("error extracting envelope from block: %s", err) continue } - payload, err := utils.ExtractPayload(env) + payload, err := protoutil.ExtractPayload(env) if err != nil { logger.Errorf("error extracting payload from block: %s", err) continue } - chdr, err := utils.UnmarshalChannelHeader(payload.Header.ChannelHeader) + chdr, err := protoutil.UnmarshalChannelHeader(payload.Header.ChannelHeader) if err != nil { logger.Errorf("error extracting channel header: %s", err) continue diff --git a/pkg/fab/events/service/dispatcher/dispatcher.go b/pkg/fab/events/service/dispatcher/dispatcher.go index 5111d26200..09efa56da9 100755 --- a/pkg/fab/events/service/dispatcher/dispatcher.go +++ b/pkg/fab/events/service/dispatcher/dispatcher.go @@ -20,7 +20,7 @@ import ( ledgerutil "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/core/ledger/util" cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" "github.com/pkg/errors" ) @@ -683,7 +683,7 @@ func toFilteredBlock(block *cb.Block) *pb.FilteredBlock { } func getFilteredTx(data []byte, txValidationCode pb.TxValidationCode) (*pb.FilteredTransaction, string, error) { - env, err := utils.GetEnvelopeFromBlock(data) + env, err := protoutil.GetEnvelopeFromBlock(data) if err != nil { return nil, "", errors.Wrap(err, "error extracting Envelope from block") } @@ -691,7 +691,7 @@ func getFilteredTx(data []byte, txValidationCode pb.TxValidationCode) (*pb.Filte return nil, "", errors.New("nil envelope") } - payload, err := utils.GetPayload(env) + payload, err := protoutil.GetPayload(env) if err != nil { return nil, "", errors.Wrap(err, "error extracting Payload from envelope") } @@ -722,23 +722,23 @@ func getFilteredTransactionActions(data []byte) (*pb.FilteredTransaction_Transac actions := &pb.FilteredTransaction_TransactionActions{ TransactionActions: &pb.FilteredTransactionActions{}, } - tx, err := utils.GetTransaction(data) + tx, err := protoutil.GetTransaction(data) if err != nil { return nil, errors.Wrap(err, "error unmarshalling transaction payload") } - chaincodeActionPayload, err := utils.GetChaincodeActionPayload(tx.Actions[0].Payload) + chaincodeActionPayload, err := protoutil.GetChaincodeActionPayload(tx.Actions[0].Payload) if err != nil { return nil, errors.Wrap(err, "error unmarshalling chaincode action payload") } - propRespPayload, err := utils.GetProposalResponsePayload(chaincodeActionPayload.Action.ProposalResponsePayload) + propRespPayload, err := protoutil.GetProposalResponsePayload(chaincodeActionPayload.Action.ProposalResponsePayload) if err != nil { return nil, errors.Wrap(err, "error unmarshalling response payload") } - ccAction, err := utils.GetChaincodeAction(propRespPayload.Extension) + ccAction, err := protoutil.GetChaincodeAction(propRespPayload.Extension) if err != nil { return nil, errors.Wrap(err, "error unmarshalling chaincode action") } - ccEvent, err := utils.GetChaincodeEvents(ccAction.Events) + ccEvent, err := protoutil.GetChaincodeEvents(ccAction.Events) if err != nil { return nil, errors.Wrap(err, "error getting chaincode events") } diff --git a/pkg/fab/mocks/mockdata.go b/pkg/fab/mocks/mockdata.go index 44e1e5632c..c0dfa47e04 100644 --- a/pkg/fab/mocks/mockdata.go +++ b/pkg/fab/mocks/mockdata.go @@ -17,7 +17,7 @@ import ( mb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp" ab "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/orderer" pp "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" "time" @@ -513,7 +513,7 @@ func CreateBlockWithCCEventAndTxStatus(events *pp.ChaincodeEvent, txID string, }, ChannelId: channelID, TxId: txID} - hdr := &common.Header{ChannelHeader: utils.MarshalOrPanic(chdr)} + hdr := &common.Header{ChannelHeader: protoutil.MarshalOrPanic(chdr)} payload := &common.Payload{Header: hdr} cea := &pp.ChaincodeEndorsedAction{} ccaPayload := &pp.ChaincodeActionPayload{Action: cea} @@ -526,27 +526,27 @@ func CreateBlockWithCCEventAndTxStatus(events *pp.ChaincodeEvent, txID string, pHashBytes := []byte("proposal_hash") pResponse := &pp.Response{Status: 200} results := []byte("results") - eventBytes, err := utils.GetBytesChaincodeEvent(events) + eventBytes, err := protoutil.GetBytesChaincodeEvent(events) if err != nil { return nil, err } - ccaPayload.Action.ProposalResponsePayload, err = utils.GetBytesProposalResponsePayload(pHashBytes, pResponse, results, eventBytes, nil) + ccaPayload.Action.ProposalResponsePayload, err = protoutil.GetBytesProposalResponsePayload(pHashBytes, pResponse, results, eventBytes, nil) if err != nil { return nil, err } - tx.Actions[0].Payload, err = utils.GetBytesChaincodeActionPayload(ccaPayload) + tx.Actions[0].Payload, err = protoutil.GetBytesChaincodeActionPayload(ccaPayload) if err != nil { return nil, err } - payload.Data, err = utils.GetBytesTransaction(tx) + payload.Data, err = protoutil.GetBytesTransaction(tx) if err != nil { return nil, err } - env.Payload, err = utils.GetBytesPayload(payload) + env.Payload, err = protoutil.GetBytesPayload(payload) if err != nil { return nil, err } - ebytes, err := utils.GetBytesEnvelope(env) + ebytes, err := protoutil.GetBytesEnvelope(env) if err != nil { return nil, err } diff --git a/pkg/fab/peer/peerendorser.go b/pkg/fab/peer/peerendorser.go index 4dcf631054..97f6d972a0 100644 --- a/pkg/fab/peer/peerendorser.go +++ b/pkg/fab/peer/peerendorser.go @@ -28,7 +28,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/pkg/core/config/endpoint" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - protos_utils "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) const ( @@ -294,12 +294,12 @@ func extractChaincodeNameNotFoundError(grpcstat *grpcstatus.Status) (int32, stri // getChaincodeResponseStatus gets the actual response status from response.Payload.extension.Response.status, as fabric always returns actual 200 func getChaincodeResponseStatus(response *pb.ProposalResponse) (int32, error) { if response.Payload != nil { - payload, err := protos_utils.GetProposalResponsePayload(response.Payload) + payload, err := protoutil.GetProposalResponsePayload(response.Payload) if err != nil { return 0, errors.Wrap(err, "unmarshal of proposal response payload failed") } - extension, err := protos_utils.GetChaincodeAction(payload.Extension) + extension, err := protoutil.GetChaincodeAction(payload.Extension) if err != nil { return 0, errors.Wrap(err, "unmarshal of chaincode action failed") } diff --git a/pkg/fab/resource/config.go b/pkg/fab/resource/config.go index 064a98eae6..43ee690514 100644 --- a/pkg/fab/resource/config.go +++ b/pkg/fab/resource/config.go @@ -46,10 +46,15 @@ type ConfigSignatureData struct { SigningBytes []byte } +type identitySerializer interface { + // Serialize takes an identity object and converts it to the byte representation. + Serialize() ([]byte, error) +} + // GetConfigSignatureData will prepare a ConfigSignatureData comprising: // SignatureHeader, its marshaled []byte and the full signing []byte to be used for signing (by an external tool) a Channel Config -func GetConfigSignatureData(ctx crypto.IdentitySerializer, config []byte) (signatureHeaderData ConfigSignatureData, e error) { - creator, err := ctx.Serialize() +func GetConfigSignatureData(creator identitySerializer, config []byte) (signatureHeaderData ConfigSignatureData, e error) { + creatorBytes, err := creator.Serialize() if err != nil { e = errors.WithMessage(err, "failed to get user context's identity") return @@ -65,7 +70,7 @@ func GetConfigSignatureData(ctx crypto.IdentitySerializer, config []byte) (signa signatureHeaderData = ConfigSignatureData{} // signature is across a signature header and the config update signatureHeaderData.SignatureHeader = common.SignatureHeader{ - Creator: creator, + Creator: creatorBytes, Nonce: nonce, } diff --git a/pkg/fab/resource/lscc.go b/pkg/fab/resource/lscc.go index 63ebfaa230..bef92ea071 100644 --- a/pkg/fab/resource/lscc.go +++ b/pkg/fab/resource/lscc.go @@ -10,7 +10,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab" "github.com/hyperledger/fabric-sdk-go/pkg/fab/txn" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - protos_utils "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" "github.com/pkg/errors" ) @@ -52,7 +52,7 @@ func createInstallInvokeRequest(request ChaincodeInstallRequest) (fab.ChaincodeI Type: request.Package.Type, ChaincodeId: &pb.ChaincodeID{Name: request.Name, Path: request.Path, Version: request.Version}}, CodePackage: request.Package.Code} - ccdsBytes, err := protos_utils.Marshal(ccds) + ccdsBytes, err := protoutil.Marshal(ccds) if err != nil { return fab.ChaincodeInvokeRequest{}, errors.WithMessage(err, "marshal of chaincode deployment spec failed") } diff --git a/pkg/fab/txn/proposal.go b/pkg/fab/txn/proposal.go index c5dcc3f15c..6c6dc1086c 100644 --- a/pkg/fab/txn/proposal.go +++ b/pkg/fab/txn/proposal.go @@ -19,7 +19,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/pkg/context" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - protos_utils "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) // CreateChaincodeInvokeProposal creates a proposal for transaction. @@ -44,7 +44,7 @@ func CreateChaincodeInvokeProposal(txh fab.TransactionHeader, request fab.Chainc Type: pb.ChaincodeSpec_GOLANG, ChaincodeId: &pb.ChaincodeID{Name: request.ChaincodeID}, Input: &pb.ChaincodeInput{Args: argsArray}}} - proposal, _, err := protos_utils.CreateChaincodeProposalWithTxIDNonceAndTransient(string(txh.TransactionID()), common.HeaderType_ENDORSER_TRANSACTION, txh.ChannelID(), ccis, txh.Nonce(), txh.Creator(), request.TransientMap) + proposal, _, err := protoutil.CreateChaincodeProposalWithTxIDNonceAndTransient(string(txh.TransactionID()), common.HeaderType_ENDORSER_TRANSACTION, txh.ChannelID(), ccis, txh.Nonce(), txh.Creator(), request.TransientMap) if err != nil { return nil, errors.Wrap(err, "failed to create chaincode proposal") } diff --git a/pkg/fab/txn/txn.go b/pkg/fab/txn/txn.go index ca66615ba9..f173276ace 100644 --- a/pkg/fab/txn/txn.go +++ b/pkg/fab/txn/txn.go @@ -19,7 +19,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/pkg/context" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" - protos_utils "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) var logger = logging.NewLogger("fabsdk/fab") @@ -42,19 +42,19 @@ func New(request fab.TransactionRequest) (*fab.Transaction, error) { proposal := request.Proposal // the original header - hdr, err := protos_utils.GetHeader(proposal.Header) + hdr, err := protoutil.GetHeader(proposal.Header) if err != nil { return nil, errors.Wrap(err, "unmarshal proposal header failed") } // the original payload - pPayl, err := protos_utils.GetChaincodeProposalPayload(proposal.Payload) + pPayl, err := protoutil.GetChaincodeProposalPayload(proposal.Payload) if err != nil { return nil, errors.Wrap(err, "unmarshal proposal payload failed") } // get header extensions so we have the visibility field - hdrExt, err := protos_utils.GetChaincodeHeaderExtension(hdr) + hdrExt, err := protoutil.GetChaincodeHeaderExtension(hdr) if err != nil { return nil, err } @@ -74,14 +74,14 @@ func New(request fab.TransactionRequest) (*fab.Transaction, error) { cea := &pb.ChaincodeEndorsedAction{ProposalResponsePayload: responsePayload, Endorsements: endorsements} // obtain the bytes of the proposal payload that will go to the transaction - propPayloadBytes, err := protos_utils.GetBytesProposalPayloadForTx(pPayl, hdrExt.PayloadVisibility) + propPayloadBytes, err := protoutil.GetBytesProposalPayloadForTx(pPayl, hdrExt.PayloadVisibility) if err != nil { return nil, err } // serialize the chaincode action payload cap := &pb.ChaincodeActionPayload{ChaincodeProposalPayload: propPayloadBytes, Action: cea} - capBytes, err := protos_utils.GetBytesChaincodeActionPayload(cap) + capBytes, err := protoutil.GetBytesChaincodeActionPayload(cap) if err != nil { return nil, err } @@ -119,12 +119,12 @@ func Send(reqCtx reqContext.Context, tx *fab.Transaction, orderers []fab.Orderer } // the original header - hdr, err := protos_utils.GetHeader(tx.Proposal.Proposal.Header) + hdr, err := protoutil.GetHeader(tx.Proposal.Proposal.Header) if err != nil { return nil, errors.Wrap(err, "unmarshal proposal header failed") } // serialize the tx - txBytes, err := protos_utils.GetBytesTransaction(tx.Transaction) + txBytes, err := protoutil.GetBytesTransaction(tx.Transaction) if err != nil { return nil, err } diff --git a/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh b/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh index 77773bfd46..e19797afbe 100755 --- a/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh +++ b/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh @@ -56,7 +56,10 @@ declare -a PKGS=( "msp" "discovery/client" + "discovery/protoext" + "gossip/util" + "gossip/protoext" ) declare -a FILES=( @@ -109,7 +112,6 @@ declare -a FILES=( "core/comm/config.go" "common/crypto/random.go" - "common/crypto/signer.go" "common/attrmgr/attrmgr.go" @@ -162,7 +164,12 @@ declare -a FILES=( "discovery/client/client.go" "discovery/client/selection.go" "discovery/client/signer.go" + "discovery/protoext/response.go" + "discovery/protoext/querytype.go" + "gossip/protoext/signing.go" + "gossip/protoext/message.go" + "gossip/protoext/stringers.go" "gossip/util/misc.go" ) @@ -277,20 +284,12 @@ FILTER_FILENAME="common/crypto/random.go" FILTER_FN="GetRandomNonce,GetRandomBytes" gofilter -FILTER_FILENAME="common/crypto/signer.go" -FILTER_FN= -gofilter - FILTER_FILENAME="common/util/utils.go" FILTER_FN="CreateUtcTimestamp,ConcatenateBytes,GenerateBytesUUID,GenerateIntUUID,GenerateUUID,idBytesToStr" gofilter FILTER_FILENAME="core/comm/config.go" sed -i'' -e 's/flogging\.FabricLogger/flogging.Logger/g' "${TMP_PROJECT_PATH}/${FILTER_FILENAME}" -sed -i'' -e '/MetricsProvider metrics\.Provider/ a\ -\/\/ HealthCheckEnabled enables the gRPC Health Checking Protocol for the server\ - HealthCheckEnabled bool\ -' "${TMP_PROJECT_PATH}/${FILTER_FILENAME}" FILTER_FILENAME="common/channelconfig/applicationorg.go" FILTER_FN= diff --git a/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh b/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh index f1aaf061a7..ad048e638d 100755 --- a/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh +++ b/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh @@ -18,7 +18,7 @@ GOFILTER_CMD="go run scripts/_go/src/gofilter/cmd/gofilter/gofilter.go" declare -a PKGS=( "common/cauthdsl" - "protos/utils" + "protoutil" "core/common/ccprovider" "core/ledger/kvledger/txmgmt/rwsetutil" "core/ledger/util" @@ -27,9 +27,10 @@ declare -a PKGS=( declare -a FILES=( "common/cauthdsl/cauthdsl_builder.go" "common/cauthdsl/policyparser.go" - "protos/utils/commonutils.go" - "protos/utils/proputils.go" - "protos/utils/txutils.go" + "protoutil/commonutils.go" + "protoutil/proputils.go" + "protoutil/signeddata.go" + "protoutil/txutils.go" "core/common/ccprovider/ccprovider.go" "core/common/ccprovider/cdspackage.go" "core/ledger/kvledger/txmgmt/rwsetutil/rwset_proto_util.go" @@ -51,17 +52,19 @@ gofilter() { echo "Filtering: ${FILTER_FILENAME}" cp ${TMP_PROJECT_PATH}/${FILTER_FILENAME} ${TMP_PROJECT_PATH}/${FILTER_FILENAME}.bak $GOFILTER_CMD -filename "${TMP_PROJECT_PATH}/${FILTER_FILENAME}.bak" \ - -filters fn -fn "$FILTER_FN" \ + -filters "$FILTERS_ENABLED" -fn "$FILTER_FN" -gen "$FILTER_GEN" -type "$FILTER_TYPE" \ > "${TMP_PROJECT_PATH}/${FILTER_FILENAME}" } echo "Filtering Go sources for allowed functions ..." -FILTER_FILENAME="protos/utils/commonutils.go" +FILTERS_ENABLED="fn" + +FILTER_FILENAME="protoutil/commonutils.go" FILTER_FN="UnmarshalChannelHeader,MarshalOrPanic,UnmarshalChannelHeader,MakeChannelHeader,MakePayloadHeader,ExtractPayload" FILTER_FN+=",Marshal,ExtractEnvelope,ExtractEnvelopeOrPanic,ExtractPayloadOrPanic" gofilter -FILTER_FILENAME="protos/utils/proputils.go" +FILTER_FILENAME="protoutil/proputils.go" FILTER_FN="GetHeader,GetChaincodeProposalPayload,GetSignatureHeader,GetChaincodeHeaderExtension,GetBytesChaincodeActionPayload" FILTER_FN+=",GetBytesTransaction,GetBytesPayload,GetHeader,GetBytesProposalResponsePayload,GetBytesProposal" FILTER_FN+=",CreateChaincodeProposalWithTxIDNonceAndTransient" @@ -71,7 +74,7 @@ gofilter sed -i'' -e 's/"github.com\/hyperledger\/fabric\/bccsp\/factory"/factory "github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/sdkpatch\/cryptosuitebridge"/g' "${TMP_PROJECT_PATH}/${FILTER_FILENAME}" sed -i'' -e 's/&bccsp.SHA256Opts{}/factory.GetSHA256Opts()/g' "${TMP_PROJECT_PATH}/${FILTER_FILENAME}" -FILTER_FILENAME="protos/utils/txutils.go" +FILTER_FILENAME="protoutil/txutils.go" FILTER_FN="GetBytesProposalPayloadForTx,GetEnvelopeFromBlock,GetPayloads" gofilter @@ -94,6 +97,13 @@ FILTER_FILENAME="core/ledger/util/txvalidationflags.go" FILTER_FN="IsValid,IsInvalid,Flag,IsSetTo,NewTxValidationFlags,newTxValidationFlagsSetValue" gofilter +echo "Filtering Go sources for allowed declarations ..." +FILTER_FILENAME="core/common/ccprovider/ccprovider.go" +FILTERS_ENABLED="gen,type" +FILTER_TYPE="IMPORT,CONST" +FILTER_GEN="CCPackage,ChaincodeData" +gofilter + # Apply patching echo "Patching import paths on upstream project ..." WORKING_DIR=$TMP_PROJECT_PATH FILES="${FILES[@]}" IMPORT_SUBSTS="${IMPORT_SUBSTS[@]}" scripts/third_party_pins/common/apply_import_patching.sh diff --git a/scripts/third_party_pins/fabric/apply_fabric_protos.sh b/scripts/third_party_pins/fabric/apply_fabric_protos.sh index 25593976c8..25a5ae3aba 100755 --- a/scripts/third_party_pins/fabric/apply_fabric_protos.sh +++ b/scripts/third_party_pins/fabric/apply_fabric_protos.sh @@ -36,7 +36,6 @@ declare -a FILES=( "protos/common/ledger.pb.go" "protos/common/policies.pb.go" "protos/common/collection.pb.go" - "protos/common/signed_data.go" "protos/peer/chaincode.pb.go" "protos/peer/chaincode_event.pb.go" @@ -58,7 +57,7 @@ declare -a FILES=( "protos/orderer/configuration.pb.go" - "protos/token/expectations.pb.go" + "protos/token/operations.pb.go" "protos/token/prover.pb.go" "protos/token/transaction.pb.go" ) diff --git a/scripts/third_party_pins/fabric/apply_fabric_protos_internal.sh b/scripts/third_party_pins/fabric/apply_fabric_protos_internal.sh index e4219963ac..eb66e3dfe5 100755 --- a/scripts/third_party_pins/fabric/apply_fabric_protos_internal.sh +++ b/scripts/third_party_pins/fabric/apply_fabric_protos_internal.sh @@ -18,7 +18,6 @@ GOFILTER_CMD="go run scripts/_go/src/gofilter/cmd/gofilter/gofilter.go" NAMESPACE_PREFIX="sdk." declare -a PKGS=( - "protos/utils" "protos/orderer" "protos/discovery" "protos/gossip" @@ -26,12 +25,8 @@ declare -a PKGS=( declare -a FILES=( "protos/orderer/ab.pb.go" - "protos/discovery/protocol.pb.go" - "protos/discovery/extensions.go" - "protos/gossip/message.pb.go" - "protos/gossip/extensions.go" ) declare -a NPBFILES=( @@ -62,20 +57,8 @@ gofilter() { > "${TMP_PROJECT_PATH}/${FILTER_FILENAME}" } -FILTERS_ENABLED="fn,gen,type" - -FILTER_FILENAME="protos/gossip/extensions.go" -FILTER_FN="ToGossipMessage,InternalEndpoint" -FILTER_GEN="SignedGossipMessage" -FILTER_TYPE="IMPORT,CONST" -gofilter - FILTERS_ENABLED="fn" -FILTER_FILENAME="protos/discovery/extensions.go" -FILTER_FN="ConfigAt,MembershipAt,EndorsersAt" -gofilter - # Apply patching echo "Patching import paths on upstream project ..." WORKING_DIR=$TMP_PROJECT_PATH FILES="${FILES[@]}" IMPORT_SUBSTS="${IMPORT_SUBSTS[@]}" scripts/third_party_pins/common/apply_import_patching.sh diff --git a/scripts/third_party_pins/fabric/apply_upstream.sh b/scripts/third_party_pins/fabric/apply_upstream.sh index b9c465882c..c7f2339244 100755 --- a/scripts/third_party_pins/fabric/apply_upstream.sh +++ b/scripts/third_party_pins/fabric/apply_upstream.sh @@ -44,8 +44,15 @@ git am ${CWD}/${PATCHES_PATH}/* cd $CWD echo 'Removing current upstream project from working directory ...' -rm -Rf "${THIRDPARTY_FABRIC_PATH}/protos" -mkdir -p "${THIRDPARTY_FABRIC_PATH}/protos" +rm -Rf "${THIRDPARTY_FABRIC_PATH}" "${THIRDPARTY_INTERNAL_FABRIC_PATH}" +mkdir -p "${THIRDPARTY_FABRIC_PATH}" "${THIRDPARTY_INTERNAL_FABRIC_PATH}" + +# restore module definitions +git checkout "${THIRDPARTY_FABRIC_PATH}/protos/go.mod" "${THIRDPARTY_FABRIC_PATH}/protos/go.sum" + +# copy required files that are under internal into non-internal structure. +mkdir -p ${TMP_PROJECT_PATH}/sdkinternal +cp -R ${TMP_PROJECT_PATH}/internal/* ${TMP_PROJECT_PATH}/sdkinternal/ # fabric client utils echo "Pinning and patching fabric client utils..." @@ -61,7 +68,7 @@ declare -a CLIENT_UTILS_IMPORT_SUBSTS=( 's/\"github.com\/hyperledger\/fabric\/protos\/msp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/msp/g' 's/\"github.com\/hyperledger\/fabric\/protos\/orderer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/orderer/g' 's/\"github.com\/hyperledger\/fabric\/protos\/ledger/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/ledger/g' - 's/\"github.com\/hyperledger\/fabric\/protos\/utils/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/utils/g' + 's/\"github.com\/hyperledger\/fabric\/protoutil/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protoutil/g' 's/\"github.com\/hyperledger\/fabric\/protos\/discovery/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos\/discovery/g' 's/\"github.com\/hyperledger\/fabric\/protos\/gossip/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos\/gossip/g' 's/\"github.com\/hyperledger\/fabric\/protos/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos/g' @@ -79,7 +86,8 @@ declare -a EXTERNAL_UTILS_IMPORT_SUBSTS=( 's/\"github.com\/hyperledger\/fabric\/protos\/msp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/msp/g' 's/\"github.com\/hyperledger\/fabric\/protos\/peer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/peer/g' 's/\"github.com\/hyperledger\/fabric\/protos\/ledger/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/ledger/g' - 's/\"github.com\/hyperledger\/fabric\/protos\/utils/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/utils/g' + 's/\"github.com\/hyperledger\/fabric\/protoutil/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protoutil/g' + 's/\"github.com\/hyperledger\/fabric\/core\/chaincode\/persistence\/intf/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/core\/chaincode\/persistence\/intf/g' 's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\//g' ) eval "INTERNAL_PATH=$THIRDPARTY_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS=\"${EXTERNAL_UTILS_IMPORT_SUBSTS[*]}\" $SCRIPTS_PATH/apply_fabric_external_utils.sh" @@ -92,7 +100,7 @@ declare -a PROTOS_IMPORT_SUBSTS=( 's/\"github.com\/hyperledger\/fabric\/common\/cauthdsl/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/common\/cauthdsl/g' 's/\"github.com\/hyperledger\/fabric\/protos\/peer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/peer/g' 's/\"github.com\/hyperledger\/fabric\/protos\/ledger/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/ledger/g' - 's/\"github.com\/hyperledger\/fabric\/protos\/utils/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/utils/g' + 's/\"github.com\/hyperledger\/fabric\/protoutil/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protoutil/g' 's/\"github.com\/hyperledger\/fabric\/protos\//\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\//g' 's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\//g' ) @@ -110,7 +118,7 @@ declare -a PROTOS_INTERNAL_IMPORT_SUBSTS=( '/package[[:space:]]orderer/s/\"github.com\/hyperledger\/fabric\/protos\/orderer/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos\/orderer/' 's/\"github.com\/hyperledger\/fabric\/protos\/orderer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/orderer/g' 's/\"github.com\/hyperledger\/fabric\/protos\/ledger/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/ledger/g' - 's/\"github.com\/hyperledger\/fabric\/protos\/utils/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/utils/g' + 's/\"github.com\/hyperledger\/fabric\/protoutil/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protoutil/g' 's/\"github.com\/hyperledger\/fabric\/protos/\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/protos/g' 's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\//g' ) diff --git a/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go b/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go index 81dd36cf90..defc56f11a 100644 --- a/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go +++ b/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go @@ -1,17 +1,7 @@ /* Copyright IBM Corp. 2016 All Rights Reserved. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +SPDX-License-Identifier: Apache-2.0 */ /* Notice: This file has been modified for Hyperledger Fabric SDK Go usage. @@ -26,7 +16,7 @@ import ( "github.com/golang/protobuf/proto" cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp" - "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) // AcceptAllPolicy always evaluates to true @@ -104,7 +94,7 @@ func signedByFabricEntity(mspId string, role msp.MSPRole_MSPRoleType) *cb.Signat // specify the principal: it's a member of the msp we just found principal := &msp.MSPPrincipal{ PrincipalClassification: msp.MSPPrincipal_ROLE, - Principal: utils.MarshalOrPanic(&msp.MSPRole{Role: role, MspIdentifier: mspId})} + Principal: protoutil.MarshalOrPanic(&msp.MSPRole{Role: role, MspIdentifier: mspId})} // create the policy: it requires exactly 1 signature from the first (and only) principal p := &cb.SignaturePolicyEnvelope{ @@ -122,7 +112,7 @@ func SignedByMspAdmin(mspId string) *cb.SignaturePolicyEnvelope { // specify the principal: it's a member of the msp we just found principal := &msp.MSPPrincipal{ PrincipalClassification: msp.MSPPrincipal_ROLE, - Principal: utils.MarshalOrPanic(&msp.MSPRole{Role: msp.MSPRole_ADMIN, MspIdentifier: mspId})} + Principal: protoutil.MarshalOrPanic(&msp.MSPRole{Role: msp.MSPRole_ADMIN, MspIdentifier: mspId})} // create the policy: it requires exactly 1 signature from the first (and only) principal p := &cb.SignaturePolicyEnvelope{ @@ -136,6 +126,10 @@ func SignedByMspAdmin(mspId string) *cb.SignaturePolicyEnvelope { //wrapper for generating "any of a given role" type policies func signedByAnyOfGivenRole(role msp.MSPRole_MSPRoleType, ids []string) *cb.SignaturePolicyEnvelope { + return SignedByNOutOfGivenRole(1, role, ids) +} + +func SignedByNOutOfGivenRole(n int32, role msp.MSPRole_MSPRoleType, ids []string) *cb.SignaturePolicyEnvelope { // we create an array of principals, one principal // per application MSP defined on this chain sort.Strings(ids) @@ -144,14 +138,14 @@ func signedByAnyOfGivenRole(role msp.MSPRole_MSPRoleType, ids []string) *cb.Sign for i, id := range ids { principals[i] = &msp.MSPPrincipal{ PrincipalClassification: msp.MSPPrincipal_ROLE, - Principal: utils.MarshalOrPanic(&msp.MSPRole{Role: role, MspIdentifier: id})} + Principal: protoutil.MarshalOrPanic(&msp.MSPRole{Role: role, MspIdentifier: id})} sigspolicy[i] = SignedBy(int32(i)) } // create the policy: it requires exactly 1 signature from any of the principals p := &cb.SignaturePolicyEnvelope{ Version: 0, - Rule: NOutOf(1, sigspolicy), + Rule: NOutOf(n, sigspolicy), Identities: principals, } diff --git a/third_party/github.com/hyperledger/fabric/common/cauthdsl/policyparser.go b/third_party/github.com/hyperledger/fabric/common/cauthdsl/policyparser.go index ab1dac9b5b..b302775b48 100644 --- a/third_party/github.com/hyperledger/fabric/common/cauthdsl/policyparser.go +++ b/third_party/github.com/hyperledger/fabric/common/cauthdsl/policyparser.go @@ -1,17 +1,7 @@ /* Copyright IBM Corp. 2017 All Rights Reserved. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +SPDX-License-Identifier: Apache-2.0 */ /* Notice: This file has been modified for Hyperledger Fabric SDK Go usage. @@ -30,7 +20,7 @@ import ( "github.com/Knetic/govaluate" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp" - "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/utils" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protoutil" ) // Gate values @@ -191,7 +181,7 @@ func secondPass(args ...interface{}) (interface{}, error) { /* build the principal we've been told */ p := &msp.MSPPrincipal{ PrincipalClassification: msp.MSPPrincipal_ROLE, - Principal: utils.MarshalOrPanic(&msp.MSPRole{MspIdentifier: subm[0][1], Role: r})} + Principal: protoutil.MarshalOrPanic(&msp.MSPRole{MspIdentifier: subm[0][1], Role: r})} ctx.principals = append(ctx.principals, p) /* create a SignaturePolicy that requires a signature from diff --git a/third_party/github.com/hyperledger/fabric/core/common/ccprovider/ccprovider.go b/third_party/github.com/hyperledger/fabric/core/common/ccprovider/ccprovider.go index 248fc4b771..1c09dfc871 100644 --- a/third_party/github.com/hyperledger/fabric/core/common/ccprovider/ccprovider.go +++ b/third_party/github.com/hyperledger/fabric/core/common/ccprovider/ccprovider.go @@ -11,19 +11,10 @@ Please review third_party pinning scripts and patches for more details. package ccprovider import ( - "os" - "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/common/privdata" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/ledger" - flogging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" ) -var ccproviderLogger = flogging.MustGetLogger("ccprovider") - -var chaincodeInstallPath string - // CCPackage encapsulates a chaincode package which can be // raw ChaincodeDeploymentSpec // SignedChaincodeDeploymentSpec @@ -33,9 +24,6 @@ type CCPackage interface { //InitFromBuffer initialize the package from bytes InitFromBuffer(buf []byte) (*ChaincodeData, error) - // InitFromFS gets the chaincode from the filesystem (includes the raw bytes too) - InitFromFS(ccname string, ccversion string) ([]byte, *pb.ChaincodeDeploymentSpec, error) - // PutChaincodeToFS writes the chaincode to the filesystem PutChaincodeToFS() error @@ -60,60 +48,9 @@ type CCPackage interface { GetId() []byte } -type CCCacheSupport interface { - // GetChaincode is needed by the cache to get chaincode data - GetChaincode(ccname string, ccversion string) (CCPackage, error) -} - -// CCInfoFSImpl provides the implementation for CC on the FS and the access to it -// It implements CCCacheSupport -type CCInfoFSImpl struct{} - -// DirEnumerator enumerates directories -type DirEnumerator func(string) ([]os.FileInfo, error) - // ChaincodeExtractor extracts chaincode from a given path type ChaincodeExtractor func(ccname string, ccversion string, path string) (CCPackage, error) -// ccInfoFSStorageMgr is the storage manager used either by the cache or if the -// cache is bypassed -var ccInfoFSProvider = &CCInfoFSImpl{} - -// ccInfoCache is the cache instance itself - -// CCContext pass this around instead of string of args -type CCContext struct { - // Name chaincode name - Name string - - // Version used to construct the chaincode image and register - Version string -} - -//-------- ChaincodeDefinition - interface for ChaincodeData ------ -// ChaincodeDefinition describes all of the necessary information for a peer to decide whether to endorse -// a proposal and whether to validate a transaction, for a particular chaincode. -type ChaincodeDefinition interface { - // CCName returns the name of this chaincode (the name it was put in the ChaincodeRegistry with). - CCName() string - - // Hash returns the hash of the chaincode. - Hash() []byte - - // CCVersion returns the version of the chaincode. - CCVersion() string - - // Validation returns how to validate transactions for this chaincode. - // The string returned is the name of the validation method (usually 'vscc') - // and the bytes returned are the argument to the validation (in the case of - // 'vscc', this is a marshaled pb.VSCCArgs message). - Validation() (string, []byte) - - // Endorsement returns how to endorse proposals for this chaincode. - // The string returns is the name of the endorsement method (usually 'escc'). - Endorsement() string -} - //-------- ChaincodeData is stored on the LSCC ------- // ChaincodeData defines the datastructure for chaincodes to be serialized by proto @@ -156,45 +93,3 @@ func (cd *ChaincodeData) String() string { return proto.CompactTextString(cd) } // ProtoMessage just exists to make proto happy func (*ChaincodeData) ProtoMessage() {} - -// ChaincodeContainerInfo is yet another synonym for the data required to start/stop a chaincode. -type ChaincodeContainerInfo struct { - Name string - Version string - Path string - Type string - CodePackage []byte - - // ContainerType is not a great name, but 'DOCKER' and 'SYSTEM' are the valid types - ContainerType string -} - -// TransactionParams are parameters which are tied to a particular transaction -// and which are required for invoking chaincode. -type TransactionParams struct { - TxID string - ChannelID string - SignedProp *pb.SignedProposal - Proposal *pb.Proposal - TXSimulator ledger.TxSimulator - HistoryQueryExecutor ledger.HistoryQueryExecutor - CollectionStore privdata.CollectionStore - IsInitTransaction bool - - // this is additional data passed to the chaincode - ProposalDecorations map[string][]byte -} - -// ChaincodeProvider provides an abstraction layer that is -// used for different packages to interact with code in the -// chaincode package without importing it; more methods -// should be added below if necessary -type ChaincodeProvider interface { - // Execute executes a standard chaincode invocation for a chaincode and an input - Execute(txParams *TransactionParams, cccid *CCContext, input *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error) - // ExecuteLegacyInit is a special case for executing chaincode deployment specs, - // which are not already in the LSCC, needed for old lifecycle - ExecuteLegacyInit(txParams *TransactionParams, cccid *CCContext, spec *pb.ChaincodeDeploymentSpec) (*pb.Response, *pb.ChaincodeEvent, error) - // Stop stops the chaincode give - Stop(ccci *ChaincodeContainerInfo) error -} diff --git a/third_party/github.com/hyperledger/fabric/protos/common/collection.pb.go b/third_party/github.com/hyperledger/fabric/protos/common/collection.pb.go index 5af3048387..e4f90f245a 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/collection.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/common/collection.pb.go @@ -36,7 +36,7 @@ func (m *CollectionConfigPackage) Reset() { *m = CollectionConfigPackage func (m *CollectionConfigPackage) String() string { return proto.CompactTextString(m) } func (*CollectionConfigPackage) ProtoMessage() {} func (*CollectionConfigPackage) Descriptor() ([]byte, []int) { - return fileDescriptor_collection_12a2cf6632dc7d83, []int{0} + return fileDescriptor_collection_c912aa7b45171da9, []int{0} } func (m *CollectionConfigPackage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CollectionConfigPackage.Unmarshal(m, b) @@ -79,7 +79,7 @@ func (m *CollectionConfig) Reset() { *m = CollectionConfig{} } func (m *CollectionConfig) String() string { return proto.CompactTextString(m) } func (*CollectionConfig) ProtoMessage() {} func (*CollectionConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_collection_12a2cf6632dc7d83, []int{1} + return fileDescriptor_collection_c912aa7b45171da9, []int{1} } func (m *CollectionConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CollectionConfig.Unmarshal(m, b) @@ -203,7 +203,12 @@ type StaticCollectionConfig struct { // can read the private data (if set to true), or even non members can // read the data (if set to false, for example if you want to implement more granular // access logic in the chaincode) - MemberOnlyRead bool `protobuf:"varint,6,opt,name=member_only_read,json=memberOnlyRead,proto3" json:"member_only_read,omitempty"` + MemberOnlyRead bool `protobuf:"varint,6,opt,name=member_only_read,json=memberOnlyRead,proto3" json:"member_only_read,omitempty"` + // The member only write access denotes whether only collection member clients + // can write the private data (if set to true), or even non members can + // write the data (if set to false, for example if you want to implement more granular + // access logic in the chaincode) + MemberOnlyWrite bool `protobuf:"varint,7,opt,name=member_only_write,json=memberOnlyWrite,proto3" json:"member_only_write,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -213,7 +218,7 @@ func (m *StaticCollectionConfig) Reset() { *m = StaticCollectionConfig{} func (m *StaticCollectionConfig) String() string { return proto.CompactTextString(m) } func (*StaticCollectionConfig) ProtoMessage() {} func (*StaticCollectionConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_collection_12a2cf6632dc7d83, []int{2} + return fileDescriptor_collection_c912aa7b45171da9, []int{2} } func (m *StaticCollectionConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StaticCollectionConfig.Unmarshal(m, b) @@ -275,6 +280,13 @@ func (m *StaticCollectionConfig) GetMemberOnlyRead() bool { return false } +func (m *StaticCollectionConfig) GetMemberOnlyWrite() bool { + if m != nil { + return m.MemberOnlyWrite + } + return false +} + // Collection policy configuration. Initially, the configuration can only // contain a SignaturePolicy. In the future, the SignaturePolicy may be a // more general Policy. Instead of containing the actual policy, the @@ -292,7 +304,7 @@ func (m *CollectionPolicyConfig) Reset() { *m = CollectionPolicyConfig{} func (m *CollectionPolicyConfig) String() string { return proto.CompactTextString(m) } func (*CollectionPolicyConfig) ProtoMessage() {} func (*CollectionPolicyConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_collection_12a2cf6632dc7d83, []int{3} + return fileDescriptor_collection_c912aa7b45171da9, []int{3} } func (m *CollectionPolicyConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CollectionPolicyConfig.Unmarshal(m, b) @@ -407,7 +419,7 @@ func (m *CollectionCriteria) Reset() { *m = CollectionCriteria{} } func (m *CollectionCriteria) String() string { return proto.CompactTextString(m) } func (*CollectionCriteria) ProtoMessage() {} func (*CollectionCriteria) Descriptor() ([]byte, []int) { - return fileDescriptor_collection_12a2cf6632dc7d83, []int{4} + return fileDescriptor_collection_c912aa7b45171da9, []int{4} } func (m *CollectionCriteria) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CollectionCriteria.Unmarshal(m, b) @@ -463,38 +475,40 @@ func init() { proto.RegisterType((*CollectionCriteria)(nil), "sdk.common.CollectionCriteria") } -func init() { proto.RegisterFile("common/collection.proto", fileDescriptor_collection_12a2cf6632dc7d83) } - -var fileDescriptor_collection_12a2cf6632dc7d83 = []byte{ - // 480 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x51, 0x6b, 0xdb, 0x30, - 0x10, 0xc7, 0xeb, 0x36, 0x4d, 0xe7, 0x0b, 0xdb, 0x32, 0x95, 0xa5, 0x66, 0x8c, 0x2e, 0x84, 0x3d, - 0x18, 0x36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, - 0x0b, 0x72, 0xb7, 0x0d, 0xe9, 0x5e, 0x86, 0x7c, 0x84, 0x70, 0x63, 0x6d, 0x55, 0x32, 0x8e, 0xee, - 0x96, 0x21, 0xdd, 0x25, 0x6e, 0xef, 0xe1, 0xb3, 0x36, 0x79, 0xb2, 0xa8, 0x4b, 0x34, 0x12, 0xb3, - 0x1c, 0x4d, 0xf2, 0xc8, 0xe6, 0x46, 0x70, 0xff, 0x1f, 0x54, 0xcd, 0x86, 0x0f, 0x5f, 0x72, 0x61, - 0x17, 0xcb, 0xf9, 0x26, 0x1c, 0xef, 0xc1, 0x63, 0x0f, 0x8f, 0x3d, 0x3c, 0xf6, 0xf0, 0xbc, 0xeb, - 0xc2, 0xef, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x3b, 0x7c, 0x15, 0x7d, 0x03, 0x00, 0x00, +func init() { proto.RegisterFile("common/collection.proto", fileDescriptor_collection_c912aa7b45171da9) } + +var fileDescriptor_collection_c912aa7b45171da9 = []byte{ + // 500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x5f, 0x6b, 0xdb, 0x3c, + 0x14, 0xc6, 0xeb, 0x36, 0x7f, 0x5e, 0x9f, 0xf0, 0xae, 0xa9, 0xca, 0x52, 0x33, 0x46, 0x17, 0xc2, + 0x2e, 0xcc, 0x36, 0x9c, 0xd1, 0x7d, 0x83, 0x86, 0x41, 0xc7, 0x02, 0x0b, 0xee, 0x60, 0xd0, 0x1b, + 0xa3, 0xc8, 0xa7, 0x8e, 0xa8, 0x2d, 0xb9, 0xb2, 0x92, 0xc5, 0x97, 0xfb, 0x8a, 0xfb, 0x44, 0x23, + 0x92, 0x1d, 0xbb, 0x21, 0x77, 0xd1, 0xf3, 0xfc, 0xce, 0xc9, 0xd1, 0x79, 0x64, 0xb8, 0x62, 0x32, + 0xcb, 0xa4, 0x98, 0x32, 0x99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a3, 0x4a, 0x31, 0x4e, 0x50, 0x05, 0x8f, 0x74, 0xa9, 0x38, 0xb3, 0xdf, 0x4c, 0x51, 0xdd, 0xf0, + 0xe1, 0x63, 0xc2, 0xf5, 0x6a, 0xbd, 0xdc, 0x1d, 0xa7, 0x2d, 0x78, 0x6a, 0xe1, 0xa9, 0x85, 0xa7, + 0x16, 0x5e, 0xf6, 0xcc, 0xf1, 0xcb, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x4b, 0x91, 0x18, + 0xa9, 0x03, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/common/common.pb.go b/third_party/github.com/hyperledger/fabric/protos/common/common.pb.go index 51ab5d2f9a..b9fe847917 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/common.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/common/common.pb.go @@ -65,7 +65,7 @@ func (x Status) String() string { return proto.EnumName(Status_name, int32(x)) } func (Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{0} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{0} } type HeaderType int32 @@ -109,7 +109,7 @@ func (x HeaderType) String() string { return proto.EnumName(HeaderType_name, int32(x)) } func (HeaderType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{1} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{1} } // This enum enlists indexes of the block metadata array @@ -139,7 +139,7 @@ func (x BlockMetadataIndex) String() string { return proto.EnumName(BlockMetadataIndex_name, int32(x)) } func (BlockMetadataIndex) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{2} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{2} } // LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index @@ -154,7 +154,7 @@ func (m *LastConfig) Reset() { *m = LastConfig{} } func (m *LastConfig) String() string { return proto.CompactTextString(m) } func (*LastConfig) ProtoMessage() {} func (*LastConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{0} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{0} } func (m *LastConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LastConfig.Unmarshal(m, b) @@ -194,7 +194,7 @@ func (m *Metadata) Reset() { *m = Metadata{} } func (m *Metadata) String() string { return proto.CompactTextString(m) } func (*Metadata) ProtoMessage() {} func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{1} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{1} } func (m *Metadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Metadata.Unmarshal(m, b) @@ -240,7 +240,7 @@ func (m *MetadataSignature) Reset() { *m = MetadataSignature{} } func (m *MetadataSignature) String() string { return proto.CompactTextString(m) } func (*MetadataSignature) ProtoMessage() {} func (*MetadataSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{2} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{2} } func (m *MetadataSignature) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MetadataSignature.Unmarshal(m, b) @@ -286,7 +286,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{3} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{3} } func (m *Header) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Header.Unmarshal(m, b) @@ -359,7 +359,7 @@ func (m *ChannelHeader) Reset() { *m = ChannelHeader{} } func (m *ChannelHeader) String() string { return proto.CompactTextString(m) } func (*ChannelHeader) ProtoMessage() {} func (*ChannelHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{4} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{4} } func (m *ChannelHeader) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChannelHeader.Unmarshal(m, b) @@ -449,7 +449,7 @@ func (m *SignatureHeader) Reset() { *m = SignatureHeader{} } func (m *SignatureHeader) String() string { return proto.CompactTextString(m) } func (*SignatureHeader) ProtoMessage() {} func (*SignatureHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{5} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{5} } func (m *SignatureHeader) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignatureHeader.Unmarshal(m, b) @@ -498,7 +498,7 @@ func (m *Payload) Reset() { *m = Payload{} } func (m *Payload) String() string { return proto.CompactTextString(m) } func (*Payload) ProtoMessage() {} func (*Payload) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{6} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{6} } func (m *Payload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Payload.Unmarshal(m, b) @@ -547,7 +547,7 @@ func (m *Envelope) Reset() { *m = Envelope{} } func (m *Envelope) String() string { return proto.CompactTextString(m) } func (*Envelope) ProtoMessage() {} func (*Envelope) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{7} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{7} } func (m *Envelope) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Envelope.Unmarshal(m, b) @@ -598,7 +598,7 @@ func (m *Block) Reset() { *m = Block{} } func (m *Block) String() string { return proto.CompactTextString(m) } func (*Block) ProtoMessage() {} func (*Block) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{8} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{8} } func (m *Block) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Block.Unmarshal(m, b) @@ -655,7 +655,7 @@ func (m *BlockHeader) Reset() { *m = BlockHeader{} } func (m *BlockHeader) String() string { return proto.CompactTextString(m) } func (*BlockHeader) ProtoMessage() {} func (*BlockHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{9} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{9} } func (m *BlockHeader) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlockHeader.Unmarshal(m, b) @@ -707,7 +707,7 @@ func (m *BlockData) Reset() { *m = BlockData{} } func (m *BlockData) String() string { return proto.CompactTextString(m) } func (*BlockData) ProtoMessage() {} func (*BlockData) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{10} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{10} } func (m *BlockData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlockData.Unmarshal(m, b) @@ -745,7 +745,7 @@ func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } func (*BlockMetadata) ProtoMessage() {} func (*BlockMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_common_b374fafc5e1c956e, []int{11} + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{11} } func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlockMetadata.Unmarshal(m, b) @@ -772,6 +772,53 @@ func (m *BlockMetadata) GetMetadata() [][]byte { return nil } +// OrdererBlockMetadata defines metadata that is set by the ordering service. +type OrdererBlockMetadata struct { + LastConfig *LastConfig `protobuf:"bytes,1,opt,name=last_config,json=lastConfig,proto3" json:"last_config,omitempty"` + ConsenterMetadata []byte `protobuf:"bytes,2,opt,name=consenter_metadata,json=consenterMetadata,proto3" json:"consenter_metadata,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrdererBlockMetadata) Reset() { *m = OrdererBlockMetadata{} } +func (m *OrdererBlockMetadata) String() string { return proto.CompactTextString(m) } +func (*OrdererBlockMetadata) ProtoMessage() {} +func (*OrdererBlockMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_common_0c3f7ee76b4b0e52, []int{12} +} +func (m *OrdererBlockMetadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrdererBlockMetadata.Unmarshal(m, b) +} +func (m *OrdererBlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrdererBlockMetadata.Marshal(b, m, deterministic) +} +func (dst *OrdererBlockMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrdererBlockMetadata.Merge(dst, src) +} +func (m *OrdererBlockMetadata) XXX_Size() int { + return xxx_messageInfo_OrdererBlockMetadata.Size(m) +} +func (m *OrdererBlockMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_OrdererBlockMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_OrdererBlockMetadata proto.InternalMessageInfo + +func (m *OrdererBlockMetadata) GetLastConfig() *LastConfig { + if m != nil { + return m.LastConfig + } + return nil +} + +func (m *OrdererBlockMetadata) GetConsenterMetadata() []byte { + if m != nil { + return m.ConsenterMetadata + } + return nil +} + func init() { proto.RegisterType((*LastConfig)(nil), "sdk.common.LastConfig") proto.RegisterType((*Metadata)(nil), "sdk.common.Metadata") @@ -785,73 +832,78 @@ func init() { proto.RegisterType((*BlockHeader)(nil), "sdk.common.BlockHeader") proto.RegisterType((*BlockData)(nil), "sdk.common.BlockData") proto.RegisterType((*BlockMetadata)(nil), "sdk.common.BlockMetadata") + proto.RegisterType((*OrdererBlockMetadata)(nil), "sdk.common.OrdererBlockMetadata") proto.RegisterEnum("sdk.common.Status", Status_name, Status_value) proto.RegisterEnum("sdk.common.HeaderType", HeaderType_name, HeaderType_value) proto.RegisterEnum("sdk.common.BlockMetadataIndex", BlockMetadataIndex_name, BlockMetadataIndex_value) } -func init() { proto.RegisterFile("common/common.proto", fileDescriptor_common_b374fafc5e1c956e) } - -var fileDescriptor_common_b374fafc5e1c956e = []byte{ - // 959 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xcf, 0x6f, 0xe3, 0x44, - 0x18, 0xdd, 0xc4, 0xf9, 0xf9, 0xa5, 0x69, 0xdd, 0x49, 0xcb, 0x9a, 0xc2, 0x6a, 0x2b, 0xc3, 0xa2, - 0xd2, 0x4a, 0xa9, 0x28, 0x17, 0x38, 0x3a, 0xf6, 0xb4, 0xb5, 0x9a, 0x8e, 0xc3, 0xd8, 0x59, 0xc4, - 0x2e, 0x92, 0xe5, 0x24, 0xd3, 0x24, 0x22, 0xb1, 0x23, 0x7b, 0x52, 0xb5, 0x67, 0xee, 0x08, 0x09, - 0xae, 0xfc, 0x2f, 0x1c, 0x11, 0x7f, 0x0f, 0x88, 0x2b, 0x1a, 0x8f, 0xed, 0x4d, 0xca, 0x4a, 0x9c, - 0xe2, 0xf7, 0xe6, 0xcd, 0xf7, 0xbd, 0xf9, 0xde, 0xc4, 0x86, 0xce, 0x38, 0x5a, 0x2e, 0xa3, 0xf0, - 0x5c, 0xfe, 0x74, 0x57, 0x71, 0xc4, 0x23, 0x54, 0x93, 0xe8, 0xe8, 0xe5, 0x34, 0x8a, 0xa6, 0x0b, - 0x76, 0x9e, 0xb2, 0xa3, 0xf5, 0xdd, 0x39, 0x9f, 0x2f, 0x59, 0xc2, 0x83, 0xe5, 0x4a, 0x0a, 0x75, - 0x1d, 0xa0, 0x1f, 0x24, 0xdc, 0x8c, 0xc2, 0xbb, 0xf9, 0x14, 0x1d, 0x40, 0x75, 0x1e, 0x4e, 0xd8, - 0x83, 0x56, 0x3a, 0x2e, 0x9d, 0x54, 0xa8, 0x04, 0xfa, 0x5b, 0x68, 0xdc, 0x32, 0x1e, 0x4c, 0x02, - 0x1e, 0x08, 0xc5, 0x7d, 0xb0, 0x58, 0xb3, 0x54, 0xb1, 0x43, 0x25, 0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0x34, 0x8a, 0xa7, 0xdd, 0xd9, 0xe3, 0x8a, 0xc5, 0x0b, 0x36, 0x99, 0xb2, 0xb8, 0x7b, 0x17, - 0x8c, 0xe2, 0xf9, 0x58, 0xbe, 0xc6, 0x92, 0xec, 0x8e, 0xbf, 0x39, 0x9b, 0xce, 0xf9, 0x6c, 0x3d, - 0x12, 0xf0, 0x7c, 0x43, 0x7c, 0x2e, 0xc5, 0xf2, 0x1b, 0x95, 0x64, 0xdf, 0xb1, 0x51, 0x2d, 0x85, - 0x5f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x63, 0x9b, 0x9f, 0x8b, 0xdf, 0x06, 0x00, 0x00, +func init() { proto.RegisterFile("common/common.proto", fileDescriptor_common_0c3f7ee76b4b0e52) } + +var fileDescriptor_common_0c3f7ee76b4b0e52 = []byte{ + // 1013 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0x5f, 0x6f, 0xe3, 0xc4, + 0x17, 0xdd, 0xc4, 0xf9, 0x7b, 0xdd, 0xb4, 0xee, 0xa4, 0xfd, 0xad, 0x7f, 0x85, 0xd5, 0x56, 0x86, + 0x45, 0xa5, 0x15, 0xa9, 0xe8, 0xbe, 0xc0, 0xa3, 0x63, 0x4f, 0x5b, 0xab, 0xa9, 0x1d, 0xc6, 0xce, + 0x22, 0x76, 0x91, 0x2c, 0x37, 0x99, 0x26, 0x11, 0x8e, 0x1d, 0xd9, 0x93, 0xaa, 0xe5, 0x95, 0x77, + 0x84, 0x04, 0xaf, 0x7c, 0x17, 0x1e, 0x11, 0x9f, 0x07, 0xc4, 0x2b, 0x1a, 0x8f, 0xed, 0x26, 0x65, + 0x25, 0x9e, 0xe2, 0x73, 0xe7, 0xcc, 0xbd, 0x67, 0xee, 0xb9, 0x99, 0x81, 0xee, 0x38, 0x5e, 0x2c, + 0xe2, 0xe8, 0x54, 0xfc, 0xf4, 0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0xad, 0x48, 0xe8, 0x39, 0x74, 0x1d, 0x62, 0x62, 0xf2, 0x64, 0xa1, 0x86, 0xf6, 0x61, 0xd7, 0xc4, + 0x03, 0x8b, 0x2b, 0x76, 0x31, 0xbe, 0xf2, 0x2d, 0xfb, 0xdc, 0x51, 0xea, 0x3c, 0x6c, 0x5c, 0xea, + 0x96, 0x6d, 0x38, 0x26, 0xf6, 0x87, 0xba, 0x71, 0xc5, 0xeb, 0x37, 0x78, 0x81, 0x21, 0xc6, 0xc4, + 0xd7, 0xcd, 0x6b, 0xcb, 0xf6, 0x9d, 0x21, 0x26, 0x7a, 0x96, 0xa7, 0xc5, 0x37, 0x78, 0xce, 0x15, + 0xb6, 0x37, 0xd2, 0xb7, 0x8f, 0xdf, 0x01, 0xda, 0x18, 0x02, 0x8b, 0x3f, 0x2a, 0x68, 0x1b, 0xc0, + 0xb5, 0x2e, 0x6c, 0xdd, 0x1b, 0x11, 0xec, 0x2a, 0xcf, 0xd0, 0x0e, 0xc8, 0x03, 0xdd, 0xf5, 0xfc, + 0xf2, 0x6c, 0xcf, 0xa1, 0xbb, 0x96, 0xc7, 0xf5, 0xcf, 0xad, 0x81, 0x87, 0x89, 0x52, 0xe5, 0xdd, + 0xc8, 0xcf, 0xa1, 0x48, 0x7d, 0x17, 0x3e, 0x8e, 0x93, 0x69, 0x6f, 0xf6, 0xb0, 0xa4, 0x49, 0x48, + 0x27, 0x53, 0x9a, 0xf4, 0x6e, 0x83, 0x9b, 0x64, 0x3e, 0x16, 0x57, 0x68, 0x9a, 0x8f, 0xd6, 0xdb, + 0x93, 0xe9, 0x9c, 0xcd, 0x56, 0x37, 0x1c, 0x9e, 0xae, 0x91, 0x4f, 0x05, 0x59, 0xbc, 0x8f, 0x69, + 0xfe, 0x86, 0xde, 0x34, 0x32, 0xf8, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xcc, 0xf9, + 0x76, 0x5b, 0x07, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/common/configtx.pb.go b/third_party/github.com/hyperledger/fabric/protos/common/configtx.pb.go index 48ef16ed1a..5c4084f18a 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/configtx.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/common/configtx.pb.go @@ -55,7 +55,7 @@ func (m *ConfigEnvelope) Reset() { *m = ConfigEnvelope{} } func (m *ConfigEnvelope) String() string { return proto.CompactTextString(m) } func (*ConfigEnvelope) ProtoMessage() {} func (*ConfigEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{0} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{0} } func (m *ConfigEnvelope) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigEnvelope.Unmarshal(m, b) @@ -102,7 +102,7 @@ func (m *ConfigGroupSchema) Reset() { *m = ConfigGroupSchema{} } func (m *ConfigGroupSchema) String() string { return proto.CompactTextString(m) } func (*ConfigGroupSchema) ProtoMessage() {} func (*ConfigGroupSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{1} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{1} } func (m *ConfigGroupSchema) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigGroupSchema.Unmarshal(m, b) @@ -153,7 +153,7 @@ func (m *ConfigValueSchema) Reset() { *m = ConfigValueSchema{} } func (m *ConfigValueSchema) String() string { return proto.CompactTextString(m) } func (*ConfigValueSchema) ProtoMessage() {} func (*ConfigValueSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{2} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{2} } func (m *ConfigValueSchema) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigValueSchema.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *ConfigPolicySchema) Reset() { *m = ConfigPolicySchema{} } func (m *ConfigPolicySchema) String() string { return proto.CompactTextString(m) } func (*ConfigPolicySchema) ProtoMessage() {} func (*ConfigPolicySchema) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{3} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{3} } func (m *ConfigPolicySchema) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigPolicySchema.Unmarshal(m, b) @@ -216,7 +216,7 @@ func (m *Config) Reset() { *m = Config{} } func (m *Config) String() string { return proto.CompactTextString(m) } func (*Config) ProtoMessage() {} func (*Config) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{4} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{4} } func (m *Config) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Config.Unmarshal(m, b) @@ -262,7 +262,7 @@ func (m *ConfigUpdateEnvelope) Reset() { *m = ConfigUpdateEnvelope{} } func (m *ConfigUpdateEnvelope) String() string { return proto.CompactTextString(m) } func (*ConfigUpdateEnvelope) ProtoMessage() {} func (*ConfigUpdateEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{5} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{5} } func (m *ConfigUpdateEnvelope) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigUpdateEnvelope.Unmarshal(m, b) @@ -319,7 +319,7 @@ func (m *ConfigUpdate) Reset() { *m = ConfigUpdate{} } func (m *ConfigUpdate) String() string { return proto.CompactTextString(m) } func (*ConfigUpdate) ProtoMessage() {} func (*ConfigUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{6} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{6} } func (m *ConfigUpdate) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigUpdate.Unmarshal(m, b) @@ -383,7 +383,7 @@ func (m *ConfigGroup) Reset() { *m = ConfigGroup{} } func (m *ConfigGroup) String() string { return proto.CompactTextString(m) } func (*ConfigGroup) ProtoMessage() {} func (*ConfigGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{7} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{7} } func (m *ConfigGroup) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigGroup.Unmarshal(m, b) @@ -452,7 +452,7 @@ func (m *ConfigValue) Reset() { *m = ConfigValue{} } func (m *ConfigValue) String() string { return proto.CompactTextString(m) } func (*ConfigValue) ProtoMessage() {} func (*ConfigValue) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{8} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{8} } func (m *ConfigValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigValue.Unmarshal(m, b) @@ -506,7 +506,7 @@ func (m *ConfigPolicy) Reset() { *m = ConfigPolicy{} } func (m *ConfigPolicy) String() string { return proto.CompactTextString(m) } func (*ConfigPolicy) ProtoMessage() {} func (*ConfigPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{9} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{9} } func (m *ConfigPolicy) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigPolicy.Unmarshal(m, b) @@ -559,7 +559,7 @@ func (m *ConfigSignature) Reset() { *m = ConfigSignature{} } func (m *ConfigSignature) String() string { return proto.CompactTextString(m) } func (*ConfigSignature) ProtoMessage() {} func (*ConfigSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_configtx_f1e09584bdb3a224, []int{10} + return fileDescriptor_configtx_7292a02b1ff5bc0d, []int{10} } func (m *ConfigSignature) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigSignature.Unmarshal(m, b) @@ -614,9 +614,9 @@ func init() { proto.RegisterType((*ConfigSignature)(nil), "sdk.common.ConfigSignature") } -func init() { proto.RegisterFile("common/configtx.proto", fileDescriptor_configtx_f1e09584bdb3a224) } +func init() { proto.RegisterFile("common/configtx.proto", fileDescriptor_configtx_7292a02b1ff5bc0d) } -var fileDescriptor_configtx_f1e09584bdb3a224 = []byte{ +var fileDescriptor_configtx_7292a02b1ff5bc0d = []byte{ // 742 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x6f, 0x6f, 0xd3, 0x3e, 0x10, 0x56, 0x9b, 0xb6, 0x6b, 0xaf, 0xed, 0xd6, 0x79, 0xfd, 0xe9, 0x17, 0x22, 0x10, 0x23, 0xc0, diff --git a/third_party/github.com/hyperledger/fabric/protos/common/configuration.pb.go b/third_party/github.com/hyperledger/fabric/protos/common/configuration.pb.go index afa9cf2c61..36be26ab15 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/configuration.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/common/configuration.pb.go @@ -36,7 +36,7 @@ func (m *HashingAlgorithm) Reset() { *m = HashingAlgorithm{} } func (m *HashingAlgorithm) String() string { return proto.CompactTextString(m) } func (*HashingAlgorithm) ProtoMessage() {} func (*HashingAlgorithm) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_c60fbe5ebb3de531, []int{0} + return fileDescriptor_configuration_4b1e5f1bb60acd8c, []int{0} } func (m *HashingAlgorithm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HashingAlgorithm.Unmarshal(m, b) @@ -78,7 +78,7 @@ func (m *BlockDataHashingStructure) Reset() { *m = BlockDataHashingStruc func (m *BlockDataHashingStructure) String() string { return proto.CompactTextString(m) } func (*BlockDataHashingStructure) ProtoMessage() {} func (*BlockDataHashingStructure) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_c60fbe5ebb3de531, []int{1} + return fileDescriptor_configuration_4b1e5f1bb60acd8c, []int{1} } func (m *BlockDataHashingStructure) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlockDataHashingStructure.Unmarshal(m, b) @@ -118,7 +118,7 @@ func (m *OrdererAddresses) Reset() { *m = OrdererAddresses{} } func (m *OrdererAddresses) String() string { return proto.CompactTextString(m) } func (*OrdererAddresses) ProtoMessage() {} func (*OrdererAddresses) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_c60fbe5ebb3de531, []int{2} + return fileDescriptor_configuration_4b1e5f1bb60acd8c, []int{2} } func (m *OrdererAddresses) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OrdererAddresses.Unmarshal(m, b) @@ -157,7 +157,7 @@ func (m *Consortium) Reset() { *m = Consortium{} } func (m *Consortium) String() string { return proto.CompactTextString(m) } func (*Consortium) ProtoMessage() {} func (*Consortium) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_c60fbe5ebb3de531, []int{3} + return fileDescriptor_configuration_4b1e5f1bb60acd8c, []int{3} } func (m *Consortium) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Consortium.Unmarshal(m, b) @@ -225,7 +225,7 @@ func (m *Capabilities) Reset() { *m = Capabilities{} } func (m *Capabilities) String() string { return proto.CompactTextString(m) } func (*Capabilities) ProtoMessage() {} func (*Capabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_c60fbe5ebb3de531, []int{4} + return fileDescriptor_configuration_4b1e5f1bb60acd8c, []int{4} } func (m *Capabilities) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Capabilities.Unmarshal(m, b) @@ -266,7 +266,7 @@ func (m *Capability) Reset() { *m = Capability{} } func (m *Capability) String() string { return proto.CompactTextString(m) } func (*Capability) ProtoMessage() {} func (*Capability) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_c60fbe5ebb3de531, []int{5} + return fileDescriptor_configuration_4b1e5f1bb60acd8c, []int{5} } func (m *Capability) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Capability.Unmarshal(m, b) @@ -297,10 +297,10 @@ func init() { } func init() { - proto.RegisterFile("common/configuration.proto", fileDescriptor_configuration_c60fbe5ebb3de531) + proto.RegisterFile("common/configuration.proto", fileDescriptor_configuration_4b1e5f1bb60acd8c) } -var fileDescriptor_configuration_c60fbe5ebb3de531 = []byte{ +var fileDescriptor_configuration_4b1e5f1bb60acd8c = []byte{ // 314 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x6b, 0xf2, 0x40, 0x10, 0x86, 0x89, 0x7e, 0x0a, 0x8e, 0x7e, 0x60, 0x97, 0x1e, 0xac, 0xf4, 0x10, 0x42, 0x91, 0x40, diff --git a/third_party/github.com/hyperledger/fabric/protos/common/ledger.pb.go b/third_party/github.com/hyperledger/fabric/protos/common/ledger.pb.go index 1ad50c71b7..097243bddc 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/ledger.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/common/ledger.pb.go @@ -37,7 +37,7 @@ func (m *BlockchainInfo) Reset() { *m = BlockchainInfo{} } func (m *BlockchainInfo) String() string { return proto.CompactTextString(m) } func (*BlockchainInfo) ProtoMessage() {} func (*BlockchainInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ledger_109361caaf4d9d5c, []int{0} + return fileDescriptor_ledger_2eb5a49d77a3d612, []int{0} } func (m *BlockchainInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlockchainInfo.Unmarshal(m, b) @@ -82,9 +82,9 @@ func init() { proto.RegisterType((*BlockchainInfo)(nil), "sdk.common.BlockchainInfo") } -func init() { proto.RegisterFile("common/ledger.proto", fileDescriptor_ledger_109361caaf4d9d5c) } +func init() { proto.RegisterFile("common/ledger.proto", fileDescriptor_ledger_2eb5a49d77a3d612) } -var fileDescriptor_ledger_109361caaf4d9d5c = []byte{ +var fileDescriptor_ledger_2eb5a49d77a3d612 = []byte{ // 186 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0xcf, 0x49, 0x4d, 0x49, 0x4f, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, diff --git a/third_party/github.com/hyperledger/fabric/protos/common/policies.pb.go b/third_party/github.com/hyperledger/fabric/protos/common/policies.pb.go index 520b1ccdb6..d814b8e3c6 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/policies.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/common/policies.pb.go @@ -49,7 +49,7 @@ func (x Policy_PolicyType) String() string { return proto.EnumName(Policy_PolicyType_name, int32(x)) } func (Policy_PolicyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{0, 0} + return fileDescriptor_policies_29919ad21e0f314e, []int{0, 0} } type ImplicitMetaPolicy_Rule int32 @@ -75,7 +75,7 @@ func (x ImplicitMetaPolicy_Rule) String() string { return proto.EnumName(ImplicitMetaPolicy_Rule_name, int32(x)) } func (ImplicitMetaPolicy_Rule) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{3, 0} + return fileDescriptor_policies_29919ad21e0f314e, []int{3, 0} } // Policy expresses a policy which the orderer can evaluate, because there has been some desire expressed to support @@ -92,7 +92,7 @@ func (m *Policy) Reset() { *m = Policy{} } func (m *Policy) String() string { return proto.CompactTextString(m) } func (*Policy) ProtoMessage() {} func (*Policy) Descriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{0} + return fileDescriptor_policies_29919ad21e0f314e, []int{0} } func (m *Policy) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Policy.Unmarshal(m, b) @@ -140,7 +140,7 @@ func (m *SignaturePolicyEnvelope) Reset() { *m = SignaturePolicyEnvelope func (m *SignaturePolicyEnvelope) String() string { return proto.CompactTextString(m) } func (*SignaturePolicyEnvelope) ProtoMessage() {} func (*SignaturePolicyEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{1} + return fileDescriptor_policies_29919ad21e0f314e, []int{1} } func (m *SignaturePolicyEnvelope) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignaturePolicyEnvelope.Unmarshal(m, b) @@ -201,7 +201,7 @@ func (m *SignaturePolicy) Reset() { *m = SignaturePolicy{} } func (m *SignaturePolicy) String() string { return proto.CompactTextString(m) } func (*SignaturePolicy) ProtoMessage() {} func (*SignaturePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{2} + return fileDescriptor_policies_29919ad21e0f314e, []int{2} } func (m *SignaturePolicy) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignaturePolicy.Unmarshal(m, b) @@ -339,7 +339,7 @@ func (m *SignaturePolicy_NOutOf) Reset() { *m = SignaturePolicy_NOutOf{} func (m *SignaturePolicy_NOutOf) String() string { return proto.CompactTextString(m) } func (*SignaturePolicy_NOutOf) ProtoMessage() {} func (*SignaturePolicy_NOutOf) Descriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{2, 0} + return fileDescriptor_policies_29919ad21e0f314e, []int{2, 0} } func (m *SignaturePolicy_NOutOf) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignaturePolicy_NOutOf.Unmarshal(m, b) @@ -393,7 +393,7 @@ func (m *ImplicitMetaPolicy) Reset() { *m = ImplicitMetaPolicy{} } func (m *ImplicitMetaPolicy) String() string { return proto.CompactTextString(m) } func (*ImplicitMetaPolicy) ProtoMessage() {} func (*ImplicitMetaPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_policies_0e89ed70e7bf49a8, []int{3} + return fileDescriptor_policies_29919ad21e0f314e, []int{3} } func (m *ImplicitMetaPolicy) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImplicitMetaPolicy.Unmarshal(m, b) @@ -437,9 +437,9 @@ func init() { proto.RegisterEnum("sdk.common.ImplicitMetaPolicy_Rule", ImplicitMetaPolicy_Rule_name, ImplicitMetaPolicy_Rule_value) } -func init() { proto.RegisterFile("common/policies.proto", fileDescriptor_policies_0e89ed70e7bf49a8) } +func init() { proto.RegisterFile("common/policies.proto", fileDescriptor_policies_29919ad21e0f314e) } -var fileDescriptor_policies_0e89ed70e7bf49a8 = []byte{ +var fileDescriptor_policies_29919ad21e0f314e = []byte{ // 480 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xdf, 0x8b, 0xda, 0x40, 0x10, 0x76, 0xfd, 0x11, 0x75, 0xf4, 0xda, 0x74, 0xb9, 0xa2, 0x1c, 0xb4, 0x95, 0x50, 0x8a, 0x70, diff --git a/third_party/github.com/hyperledger/fabric/protos/go.mod b/third_party/github.com/hyperledger/fabric/protos/go.mod index a94c7e4feb..3cef2c7424 100644 --- a/third_party/github.com/hyperledger/fabric/protos/go.mod +++ b/third_party/github.com/hyperledger/fabric/protos/go.mod @@ -6,5 +6,8 @@ replace github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/ require ( github.com/golang/protobuf v1.2.0 - github.com/hyperledger/fabric-sdk-go v0.0.0-20190125204638-b490519efff + golang.org/x/net v0.0.0-20190213061140-3a22650c66bd + golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e // indirect + google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d // indirect + google.golang.org/grpc v1.19.0 ) diff --git a/third_party/github.com/hyperledger/fabric/protos/go.sum b/third_party/github.com/hyperledger/fabric/protos/go.sum index 1a3b5f8691..b1ec479086 100644 --- a/third_party/github.com/hyperledger/fabric/protos/go.sum +++ b/third_party/github.com/hyperledger/fabric/protos/go.sum @@ -1,143 +1,36 @@ -github.com/AlekSi/gocov-xml v0.0.0-20190121064608-3a14fb1c4737/go.mod h1:w1KSuh2JgIL3nyRiZijboSUwbbxOrTzWwyWVFUHtXBQ= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/axw/gocov v0.0.0-20170322000131-3a69a0d2a4ef/go.mod h1:pc6XrbIn8RLeVSNzXCZKXNst+RTE5Ju/nySYl1Wc0B4= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-critic/go-critic v0.0.0-20181204210945-ee9bf5809ead/go.mod h1:3MzXZKJdeXqdU9cj+rvZdNiN7SZ8V9OjybF8loZDmHU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-toolsmith/astcast v0.0.0-20181028201508-b7a89ed70af1/go.mod h1:TEo3Ghaj7PsZawQHxT/oBvo4HK/sl1RcuUHDKTTju+o= -github.com/go-toolsmith/astcopy v0.0.0-20180903214859-79b422d080c4/go.mod h1:c9CPdq2AzM8oPomdlPniEfPAC6g1s7NqZzODt8y6ib8= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/strparse v0.0.0-20180903215201-830b6daa1241/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v0.0.0-20181030061450-d63dc7650676/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/mock v0.0.0-20190116182947-c20582278a82/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181003203344-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/go-tools v0.0.0-20180109140146-35a9f45a5db0/go.mod h1:unzUULGw35sjyOYjUt0jMTXqHlZPpPc6e+xfO4cd6mM= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20181105071733-0b8337e80d98/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.15.0/go.mod h1:iEsyA2h6yMxPzFAlb/Q9UuXBrXIDtXkbUoukuqUAX/8= -github.com/golangci/gosec v0.0.0-20180901114220-66fb7fc33547/go.mod h1:0qUabqiIQgfmlAmulqxyiGkkyF6/tOGSnY2cnPVwrzU= -github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190/go.mod h1:pPwb+AK755h3/r73avHz5bEN6sa51/2HEZlLaV53hCo= -github.com/golangci/ineffassign v0.0.0-20180808204949-2ee8f2867dde/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= -github.com/golangci/lint-1 v0.0.0-20180610141402-4bf9709227d1/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -github.com/google/certificate-transparency-go v0.0.0-20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/hashicorp/hcl v0.0.0-20171017181929-23c074d0eceb/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= -github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/kisielk/gotool v0.0.0-20161130080628-0de1eaf82fa3/go.mod h1:jxZFDH7ILpTPQTk+E2s+z4CUas9lVNjIuKR4c5/zKgM= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/magiconair/properties v1.7.4/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/pkcs11 v0.0.0-20180208123754-88ac7c418f89/go.mod h1:WCBAbTOdfhHhz7YXujeZMF7owC4tPb1naKFsgfUISjo= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= -github.com/mitchellh/mapstructure v0.0.0-20180111000720-b4575eea38cc/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180705121852-ae68e2d4c00f/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/spf13/afero v1.0.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.1.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v0.0.0-20171227194143-aafc9e6bc7b7/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/crypto v0.0.0-20180123095555-3d37316aaa6b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180124060956-0ed95abb35c4/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180125145336-03467258950d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.0.0-20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20170915040203-e531a2a1c15f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205014116-22934f0fdb62/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190121143147-24cd39ecf745/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-379209517ffe/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -google.golang.org/genproto v0.0.0-20180125080656-4eb30f4778ee/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v1.11.3/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.0.0/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20190124213536-fbb59629db34/go.mod h1:H6SUd1XjIs+qQCyskXg5OFSrilMRUkD8ePJpHKDPaeY= -sourcegraph.com/sourcegraph/go-diff v0.5.1-0.20190210232911-dee78e514455/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d h1:XB2jc5XQ9uhizGTS2vWcN01bc4dI6z3C4KY5MQm8SS8= +google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset/kv_rwset.pb.go b/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset/kv_rwset.pb.go index 6f4066bb74..a223f36218 100644 --- a/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset/kv_rwset.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset/kv_rwset.pb.go @@ -38,7 +38,7 @@ func (m *KVRWSet) Reset() { *m = KVRWSet{} } func (m *KVRWSet) String() string { return proto.CompactTextString(m) } func (*KVRWSet) ProtoMessage() {} func (*KVRWSet) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{0} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{0} } func (m *KVRWSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVRWSet.Unmarshal(m, b) @@ -100,7 +100,7 @@ func (m *HashedRWSet) Reset() { *m = HashedRWSet{} } func (m *HashedRWSet) String() string { return proto.CompactTextString(m) } func (*HashedRWSet) ProtoMessage() {} func (*HashedRWSet) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{1} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{1} } func (m *HashedRWSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HashedRWSet.Unmarshal(m, b) @@ -155,7 +155,7 @@ func (m *KVRead) Reset() { *m = KVRead{} } func (m *KVRead) String() string { return proto.CompactTextString(m) } func (*KVRead) ProtoMessage() {} func (*KVRead) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{2} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{2} } func (m *KVRead) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVRead.Unmarshal(m, b) @@ -203,7 +203,7 @@ func (m *KVWrite) Reset() { *m = KVWrite{} } func (m *KVWrite) String() string { return proto.CompactTextString(m) } func (*KVWrite) ProtoMessage() {} func (*KVWrite) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{3} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{3} } func (m *KVWrite) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVWrite.Unmarshal(m, b) @@ -257,7 +257,7 @@ func (m *KVMetadataWrite) Reset() { *m = KVMetadataWrite{} } func (m *KVMetadataWrite) String() string { return proto.CompactTextString(m) } func (*KVMetadataWrite) ProtoMessage() {} func (*KVMetadataWrite) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{4} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{4} } func (m *KVMetadataWrite) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVMetadataWrite.Unmarshal(m, b) @@ -306,7 +306,7 @@ func (m *KVReadHash) Reset() { *m = KVReadHash{} } func (m *KVReadHash) String() string { return proto.CompactTextString(m) } func (*KVReadHash) ProtoMessage() {} func (*KVReadHash) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{5} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{5} } func (m *KVReadHash) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVReadHash.Unmarshal(m, b) @@ -354,7 +354,7 @@ func (m *KVWriteHash) Reset() { *m = KVWriteHash{} } func (m *KVWriteHash) String() string { return proto.CompactTextString(m) } func (*KVWriteHash) ProtoMessage() {} func (*KVWriteHash) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{6} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{6} } func (m *KVWriteHash) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVWriteHash.Unmarshal(m, b) @@ -408,7 +408,7 @@ func (m *KVMetadataWriteHash) Reset() { *m = KVMetadataWriteHash{} } func (m *KVMetadataWriteHash) String() string { return proto.CompactTextString(m) } func (*KVMetadataWriteHash) ProtoMessage() {} func (*KVMetadataWriteHash) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{7} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{7} } func (m *KVMetadataWriteHash) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVMetadataWriteHash.Unmarshal(m, b) @@ -455,7 +455,7 @@ func (m *KVMetadataEntry) Reset() { *m = KVMetadataEntry{} } func (m *KVMetadataEntry) String() string { return proto.CompactTextString(m) } func (*KVMetadataEntry) ProtoMessage() {} func (*KVMetadataEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{8} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{8} } func (m *KVMetadataEntry) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KVMetadataEntry.Unmarshal(m, b) @@ -505,7 +505,7 @@ func (m *Version) Reset() { *m = Version{} } func (m *Version) String() string { return proto.CompactTextString(m) } func (*Version) ProtoMessage() {} func (*Version) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{9} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{9} } func (m *Version) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Version.Unmarshal(m, b) @@ -562,7 +562,7 @@ func (m *RangeQueryInfo) Reset() { *m = RangeQueryInfo{} } func (m *RangeQueryInfo) String() string { return proto.CompactTextString(m) } func (*RangeQueryInfo) ProtoMessage() {} func (*RangeQueryInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{10} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{10} } func (m *RangeQueryInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RangeQueryInfo.Unmarshal(m, b) @@ -726,7 +726,7 @@ func (m *QueryReads) Reset() { *m = QueryReads{} } func (m *QueryReads) String() string { return proto.CompactTextString(m) } func (*QueryReads) ProtoMessage() {} func (*QueryReads) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{11} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{11} } func (m *QueryReads) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryReads.Unmarshal(m, b) @@ -771,7 +771,7 @@ func (m *QueryReadsMerkleSummary) Reset() { *m = QueryReadsMerkleSummary func (m *QueryReadsMerkleSummary) String() string { return proto.CompactTextString(m) } func (*QueryReadsMerkleSummary) ProtoMessage() {} func (*QueryReadsMerkleSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_kv_rwset_b744a14a894993b5, []int{12} + return fileDescriptor_kv_rwset_9b844dafd85b8ad8, []int{12} } func (m *QueryReadsMerkleSummary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryReadsMerkleSummary.Unmarshal(m, b) @@ -829,10 +829,10 @@ func init() { } func init() { - proto.RegisterFile("ledger/rwset/kvrwset/kv_rwset.proto", fileDescriptor_kv_rwset_b744a14a894993b5) + proto.RegisterFile("ledger/rwset/kvrwset/kv_rwset.proto", fileDescriptor_kv_rwset_9b844dafd85b8ad8) } -var fileDescriptor_kv_rwset_b744a14a894993b5 = []byte{ +var fileDescriptor_kv_rwset_9b844dafd85b8ad8 = []byte{ // 740 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdf, 0x6b, 0xdb, 0x48, 0x10, 0x8e, 0x7f, 0xcb, 0x63, 0x3b, 0xf1, 0x6d, 0x72, 0x44, 0xc7, 0xdd, 0x81, 0x51, 0x38, 0x30, diff --git a/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/rwset.pb.go b/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/rwset.pb.go index 80fda1b21c..e20c6b734b 100644 --- a/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/rwset.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/ledger/rwset/rwset.pb.go @@ -39,7 +39,7 @@ func (x TxReadWriteSet_DataModel) String() string { return proto.EnumName(TxReadWriteSet_DataModel_name, int32(x)) } func (TxReadWriteSet_DataModel) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{0, 0} + return fileDescriptor_rwset_5943c220cfc3749d, []int{0, 0} } // TxReadWriteSet encapsulates a read-write set for a transaction @@ -57,7 +57,7 @@ func (m *TxReadWriteSet) Reset() { *m = TxReadWriteSet{} } func (m *TxReadWriteSet) String() string { return proto.CompactTextString(m) } func (*TxReadWriteSet) ProtoMessage() {} func (*TxReadWriteSet) Descriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{0} + return fileDescriptor_rwset_5943c220cfc3749d, []int{0} } func (m *TxReadWriteSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TxReadWriteSet.Unmarshal(m, b) @@ -105,7 +105,7 @@ func (m *NsReadWriteSet) Reset() { *m = NsReadWriteSet{} } func (m *NsReadWriteSet) String() string { return proto.CompactTextString(m) } func (*NsReadWriteSet) ProtoMessage() {} func (*NsReadWriteSet) Descriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{1} + return fileDescriptor_rwset_5943c220cfc3749d, []int{1} } func (m *NsReadWriteSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NsReadWriteSet.Unmarshal(m, b) @@ -160,7 +160,7 @@ func (m *CollectionHashedReadWriteSet) Reset() { *m = CollectionHashedRe func (m *CollectionHashedReadWriteSet) String() string { return proto.CompactTextString(m) } func (*CollectionHashedReadWriteSet) ProtoMessage() {} func (*CollectionHashedReadWriteSet) Descriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{2} + return fileDescriptor_rwset_5943c220cfc3749d, []int{2} } func (m *CollectionHashedReadWriteSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CollectionHashedReadWriteSet.Unmarshal(m, b) @@ -214,7 +214,7 @@ func (m *TxPvtReadWriteSet) Reset() { *m = TxPvtReadWriteSet{} } func (m *TxPvtReadWriteSet) String() string { return proto.CompactTextString(m) } func (*TxPvtReadWriteSet) ProtoMessage() {} func (*TxPvtReadWriteSet) Descriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{3} + return fileDescriptor_rwset_5943c220cfc3749d, []int{3} } func (m *TxPvtReadWriteSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TxPvtReadWriteSet.Unmarshal(m, b) @@ -261,7 +261,7 @@ func (m *NsPvtReadWriteSet) Reset() { *m = NsPvtReadWriteSet{} } func (m *NsPvtReadWriteSet) String() string { return proto.CompactTextString(m) } func (*NsPvtReadWriteSet) ProtoMessage() {} func (*NsPvtReadWriteSet) Descriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{4} + return fileDescriptor_rwset_5943c220cfc3749d, []int{4} } func (m *NsPvtReadWriteSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NsPvtReadWriteSet.Unmarshal(m, b) @@ -308,7 +308,7 @@ func (m *CollectionPvtReadWriteSet) Reset() { *m = CollectionPvtReadWrit func (m *CollectionPvtReadWriteSet) String() string { return proto.CompactTextString(m) } func (*CollectionPvtReadWriteSet) ProtoMessage() {} func (*CollectionPvtReadWriteSet) Descriptor() ([]byte, []int) { - return fileDescriptor_rwset_28a2ad70bffb57df, []int{5} + return fileDescriptor_rwset_5943c220cfc3749d, []int{5} } func (m *CollectionPvtReadWriteSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CollectionPvtReadWriteSet.Unmarshal(m, b) @@ -352,9 +352,9 @@ func init() { proto.RegisterEnum("sdk.rwset.TxReadWriteSet_DataModel", TxReadWriteSet_DataModel_name, TxReadWriteSet_DataModel_value) } -func init() { proto.RegisterFile("ledger/rwset/rwset.proto", fileDescriptor_rwset_28a2ad70bffb57df) } +func init() { proto.RegisterFile("ledger/rwset/rwset.proto", fileDescriptor_rwset_5943c220cfc3749d) } -var fileDescriptor_rwset_28a2ad70bffb57df = []byte{ +var fileDescriptor_rwset_5943c220cfc3749d = []byte{ // 421 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x4f, 0x6f, 0xd3, 0x30, 0x18, 0xc6, 0x71, 0xab, 0x16, 0xf2, 0x36, 0x0a, 0xd4, 0xb4, 0x22, 0x48, 0x95, 0x28, 0x05, 0x89, diff --git a/third_party/github.com/hyperledger/fabric/protos/msp/identities.pb.go b/third_party/github.com/hyperledger/fabric/protos/msp/identities.pb.go index d8d03aff7f..8fda13143e 100644 --- a/third_party/github.com/hyperledger/fabric/protos/msp/identities.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/msp/identities.pb.go @@ -39,7 +39,7 @@ func (m *SerializedIdentity) Reset() { *m = SerializedIdentity{} } func (m *SerializedIdentity) String() string { return proto.CompactTextString(m) } func (*SerializedIdentity) ProtoMessage() {} func (*SerializedIdentity) Descriptor() ([]byte, []int) { - return fileDescriptor_identities_8fa8af3e5bf2070a, []int{0} + return fileDescriptor_identities_8a64c0f25eb30ee4, []int{0} } func (m *SerializedIdentity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SerializedIdentity.Unmarshal(m, b) @@ -101,7 +101,7 @@ func (m *SerializedIdemixIdentity) Reset() { *m = SerializedIdemixIdenti func (m *SerializedIdemixIdentity) String() string { return proto.CompactTextString(m) } func (*SerializedIdemixIdentity) ProtoMessage() {} func (*SerializedIdemixIdentity) Descriptor() ([]byte, []int) { - return fileDescriptor_identities_8fa8af3e5bf2070a, []int{1} + return fileDescriptor_identities_8a64c0f25eb30ee4, []int{1} } func (m *SerializedIdemixIdentity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SerializedIdemixIdentity.Unmarshal(m, b) @@ -161,9 +161,9 @@ func init() { proto.RegisterType((*SerializedIdemixIdentity)(nil), "sdk.msp.SerializedIdemixIdentity") } -func init() { proto.RegisterFile("msp/identities.proto", fileDescriptor_identities_8fa8af3e5bf2070a) } +func init() { proto.RegisterFile("msp/identities.proto", fileDescriptor_identities_8a64c0f25eb30ee4) } -var fileDescriptor_identities_8fa8af3e5bf2070a = []byte{ +var fileDescriptor_identities_8a64c0f25eb30ee4 = []byte{ // 238 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0x3f, 0x4f, 0xc3, 0x30, 0x10, 0x47, 0x95, 0x34, 0xe1, 0x8f, 0x55, 0x31, 0x98, 0x0e, 0x66, 0x2b, 0x9d, 0x32, 0xc5, 0x03, diff --git a/third_party/github.com/hyperledger/fabric/protos/msp/msp_config.pb.go b/third_party/github.com/hyperledger/fabric/protos/msp/msp_config.pb.go index c77e05a5ec..20a6d0ce8b 100644 --- a/third_party/github.com/hyperledger/fabric/protos/msp/msp_config.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/msp/msp_config.pb.go @@ -40,7 +40,7 @@ func (m *MSPConfig) Reset() { *m = MSPConfig{} } func (m *MSPConfig) String() string { return proto.CompactTextString(m) } func (*MSPConfig) ProtoMessage() {} func (*MSPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{0} + return fileDescriptor_msp_config_c60f850a0e089029, []int{0} } func (m *MSPConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MSPConfig.Unmarshal(m, b) @@ -135,7 +135,7 @@ func (m *FabricMSPConfig) Reset() { *m = FabricMSPConfig{} } func (m *FabricMSPConfig) String() string { return proto.CompactTextString(m) } func (*FabricMSPConfig) ProtoMessage() {} func (*FabricMSPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{1} + return fileDescriptor_msp_config_c60f850a0e089029, []int{1} } func (m *FabricMSPConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FabricMSPConfig.Unmarshal(m, b) @@ -253,7 +253,7 @@ func (m *FabricCryptoConfig) Reset() { *m = FabricCryptoConfig{} } func (m *FabricCryptoConfig) String() string { return proto.CompactTextString(m) } func (*FabricCryptoConfig) ProtoMessage() {} func (*FabricCryptoConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{2} + return fileDescriptor_msp_config_c60f850a0e089029, []int{2} } func (m *FabricCryptoConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FabricCryptoConfig.Unmarshal(m, b) @@ -309,7 +309,7 @@ func (m *IdemixMSPConfig) Reset() { *m = IdemixMSPConfig{} } func (m *IdemixMSPConfig) String() string { return proto.CompactTextString(m) } func (*IdemixMSPConfig) ProtoMessage() {} func (*IdemixMSPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{3} + return fileDescriptor_msp_config_c60f850a0e089029, []int{3} } func (m *IdemixMSPConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IdemixMSPConfig.Unmarshal(m, b) @@ -387,7 +387,7 @@ func (m *IdemixMSPSignerConfig) Reset() { *m = IdemixMSPSignerConfig{} } func (m *IdemixMSPSignerConfig) String() string { return proto.CompactTextString(m) } func (*IdemixMSPSignerConfig) ProtoMessage() {} func (*IdemixMSPSignerConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{4} + return fileDescriptor_msp_config_c60f850a0e089029, []int{4} } func (m *IdemixMSPSignerConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IdemixMSPSignerConfig.Unmarshal(m, b) @@ -469,7 +469,7 @@ func (m *SigningIdentityInfo) Reset() { *m = SigningIdentityInfo{} } func (m *SigningIdentityInfo) String() string { return proto.CompactTextString(m) } func (*SigningIdentityInfo) ProtoMessage() {} func (*SigningIdentityInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{5} + return fileDescriptor_msp_config_c60f850a0e089029, []int{5} } func (m *SigningIdentityInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SigningIdentityInfo.Unmarshal(m, b) @@ -524,7 +524,7 @@ func (m *KeyInfo) Reset() { *m = KeyInfo{} } func (m *KeyInfo) String() string { return proto.CompactTextString(m) } func (*KeyInfo) ProtoMessage() {} func (*KeyInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{6} + return fileDescriptor_msp_config_c60f850a0e089029, []int{6} } func (m *KeyInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KeyInfo.Unmarshal(m, b) @@ -581,7 +581,7 @@ func (m *FabricOUIdentifier) Reset() { *m = FabricOUIdentifier{} } func (m *FabricOUIdentifier) String() string { return proto.CompactTextString(m) } func (*FabricOUIdentifier) ProtoMessage() {} func (*FabricOUIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{7} + return fileDescriptor_msp_config_c60f850a0e089029, []int{7} } func (m *FabricOUIdentifier) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FabricOUIdentifier.Unmarshal(m, b) @@ -634,7 +634,7 @@ func (m *FabricNodeOUs) Reset() { *m = FabricNodeOUs{} } func (m *FabricNodeOUs) String() string { return proto.CompactTextString(m) } func (*FabricNodeOUs) ProtoMessage() {} func (*FabricNodeOUs) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_config_e749e5bd1d6d997b, []int{8} + return fileDescriptor_msp_config_c60f850a0e089029, []int{8} } func (m *FabricNodeOUs) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FabricNodeOUs.Unmarshal(m, b) @@ -687,9 +687,9 @@ func init() { proto.RegisterType((*FabricNodeOUs)(nil), "sdk.msp.FabricNodeOUs") } -func init() { proto.RegisterFile("msp/msp_config.proto", fileDescriptor_msp_config_e749e5bd1d6d997b) } +func init() { proto.RegisterFile("msp/msp_config.proto", fileDescriptor_msp_config_c60f850a0e089029) } -var fileDescriptor_msp_config_e749e5bd1d6d997b = []byte{ +var fileDescriptor_msp_config_c60f850a0e089029 = []byte{ // 847 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x5f, 0x6f, 0xe3, 0x44, 0x10, 0x57, 0x92, 0x26, 0x77, 0x99, 0x38, 0x49, 0xd9, 0xeb, 0x15, 0x0b, 0x71, 0x77, 0xa9, 0x01, diff --git a/third_party/github.com/hyperledger/fabric/protos/msp/msp_principal.pb.go b/third_party/github.com/hyperledger/fabric/protos/msp/msp_principal.pb.go index 36e97222e0..5ca95542cc 100644 --- a/third_party/github.com/hyperledger/fabric/protos/msp/msp_principal.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/msp/msp_principal.pb.go @@ -58,7 +58,7 @@ func (x MSPPrincipal_Classification) String() string { return proto.EnumName(MSPPrincipal_Classification_name, int32(x)) } func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{0, 0} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{0, 0} } type MSPRole_MSPRoleType int32 @@ -87,7 +87,7 @@ func (x MSPRole_MSPRoleType) String() string { return proto.EnumName(MSPRole_MSPRoleType_name, int32(x)) } func (MSPRole_MSPRoleType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{2, 0} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{2, 0} } type MSPIdentityAnonymity_MSPIdentityAnonymityType int32 @@ -110,7 +110,7 @@ func (x MSPIdentityAnonymity_MSPIdentityAnonymityType) String() string { return proto.EnumName(MSPIdentityAnonymity_MSPIdentityAnonymityType_name, int32(x)) } func (MSPIdentityAnonymity_MSPIdentityAnonymityType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{3, 0} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{3, 0} } // MSPPrincipal aims to represent an MSP-centric set of identities. @@ -157,7 +157,7 @@ func (m *MSPPrincipal) Reset() { *m = MSPPrincipal{} } func (m *MSPPrincipal) String() string { return proto.CompactTextString(m) } func (*MSPPrincipal) ProtoMessage() {} func (*MSPPrincipal) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{0} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{0} } func (m *MSPPrincipal) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MSPPrincipal.Unmarshal(m, b) @@ -213,7 +213,7 @@ func (m *OrganizationUnit) Reset() { *m = OrganizationUnit{} } func (m *OrganizationUnit) String() string { return proto.CompactTextString(m) } func (*OrganizationUnit) ProtoMessage() {} func (*OrganizationUnit) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{1} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{1} } func (m *OrganizationUnit) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OrganizationUnit.Unmarshal(m, b) @@ -273,7 +273,7 @@ func (m *MSPRole) Reset() { *m = MSPRole{} } func (m *MSPRole) String() string { return proto.CompactTextString(m) } func (*MSPRole) ProtoMessage() {} func (*MSPRole) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{2} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{2} } func (m *MSPRole) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MSPRole.Unmarshal(m, b) @@ -319,7 +319,7 @@ func (m *MSPIdentityAnonymity) Reset() { *m = MSPIdentityAnonymity{} } func (m *MSPIdentityAnonymity) String() string { return proto.CompactTextString(m) } func (*MSPIdentityAnonymity) ProtoMessage() {} func (*MSPIdentityAnonymity) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{3} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{3} } func (m *MSPIdentityAnonymity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MSPIdentityAnonymity.Unmarshal(m, b) @@ -361,7 +361,7 @@ func (m *CombinedPrincipal) Reset() { *m = CombinedPrincipal{} } func (m *CombinedPrincipal) String() string { return proto.CompactTextString(m) } func (*CombinedPrincipal) ProtoMessage() {} func (*CombinedPrincipal) Descriptor() ([]byte, []int) { - return fileDescriptor_msp_principal_9016cf1a8a7156cd, []int{4} + return fileDescriptor_msp_principal_b2839a61efb913f5, []int{4} } func (m *CombinedPrincipal) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CombinedPrincipal.Unmarshal(m, b) @@ -400,10 +400,10 @@ func init() { } func init() { - proto.RegisterFile("msp/msp_principal.proto", fileDescriptor_msp_principal_9016cf1a8a7156cd) + proto.RegisterFile("msp/msp_principal.proto", fileDescriptor_msp_principal_b2839a61efb913f5) } -var fileDescriptor_msp_principal_9016cf1a8a7156cd = []byte{ +var fileDescriptor_msp_principal_b2839a61efb913f5 = []byte{ // 519 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xdf, 0x6a, 0xdb, 0x30, 0x14, 0xc6, 0xeb, 0xa4, 0x6b, 0x9b, 0x93, 0x3f, 0xa8, 0x22, 0xa5, 0x81, 0x95, 0x11, 0xbc, 0x0d, diff --git a/third_party/github.com/hyperledger/fabric/protos/orderer/configuration.pb.go b/third_party/github.com/hyperledger/fabric/protos/orderer/configuration.pb.go index 5c3afc1bfe..ec5de05d9c 100644 --- a/third_party/github.com/hyperledger/fabric/protos/orderer/configuration.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/orderer/configuration.pb.go @@ -22,10 +22,55 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +// MigrationState defines the possible states of a consensus-type migration. +// NONE represents that migration is not taking place. +type ConsensusType_MigrationState int32 + +const ( + ConsensusType_MIG_STATE_NONE ConsensusType_MigrationState = 0 + ConsensusType_MIG_STATE_START ConsensusType_MigrationState = 1 + ConsensusType_MIG_STATE_COMMIT ConsensusType_MigrationState = 2 + ConsensusType_MIG_STATE_ABORT ConsensusType_MigrationState = 3 + ConsensusType_MIG_STATE_CONTEXT ConsensusType_MigrationState = 4 +) + +var ConsensusType_MigrationState_name = map[int32]string{ + 0: "MIG_STATE_NONE", + 1: "MIG_STATE_START", + 2: "MIG_STATE_COMMIT", + 3: "MIG_STATE_ABORT", + 4: "MIG_STATE_CONTEXT", +} +var ConsensusType_MigrationState_value = map[string]int32{ + "MIG_STATE_NONE": 0, + "MIG_STATE_START": 1, + "MIG_STATE_COMMIT": 2, + "MIG_STATE_ABORT": 3, + "MIG_STATE_CONTEXT": 4, +} + +func (x ConsensusType_MigrationState) String() string { + return proto.EnumName(ConsensusType_MigrationState_name, int32(x)) +} +func (ConsensusType_MigrationState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_configuration_9ce28addc6cd8ab7, []int{0, 0} +} + type ConsensusType struct { + // The consensus type: "solo", "kafka" or "etcdraft". Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Opaque metadata, dependent on the consensus type. - Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // The state of a consensus-type migration. + // On the system channel this could be NONE | START | COMMIT | ABORT. + // On a standard channel this could be NONE | CONTEXT. + // When migration is not taking place it is set to NONE. + MigrationState ConsensusType_MigrationState `protobuf:"varint,3,opt,name=migration_state,json=migrationState,proto3,enum=orderer.ConsensusType_MigrationState" json:"migration_state,omitempty"` + // The context of a consensus-type migration. + // The migration context is the system channel block height of the config-update-tx that START migration. + // The context must be present in COMMIT, CONTEXT, and ABORT config-updates, and match the START block height. + // On NONE and START it is set =0. + MigrationContext uint64 `protobuf:"varint,4,opt,name=migration_context,json=migrationContext,proto3" json:"migration_context,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -35,7 +80,7 @@ func (m *ConsensusType) Reset() { *m = ConsensusType{} } func (m *ConsensusType) String() string { return proto.CompactTextString(m) } func (*ConsensusType) ProtoMessage() {} func (*ConsensusType) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_3289caae61166f4d, []int{0} + return fileDescriptor_configuration_9ce28addc6cd8ab7, []int{0} } func (m *ConsensusType) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConsensusType.Unmarshal(m, b) @@ -69,6 +114,20 @@ func (m *ConsensusType) GetMetadata() []byte { return nil } +func (m *ConsensusType) GetMigrationState() ConsensusType_MigrationState { + if m != nil { + return m.MigrationState + } + return ConsensusType_MIG_STATE_NONE +} + +func (m *ConsensusType) GetMigrationContext() uint64 { + if m != nil { + return m.MigrationContext + } + return 0 +} + type BatchSize struct { // Simply specified as number of messages for now, in the future // we may want to allow this to be specified by size in bytes @@ -88,7 +147,7 @@ func (m *BatchSize) Reset() { *m = BatchSize{} } func (m *BatchSize) String() string { return proto.CompactTextString(m) } func (*BatchSize) ProtoMessage() {} func (*BatchSize) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_3289caae61166f4d, []int{1} + return fileDescriptor_configuration_9ce28addc6cd8ab7, []int{1} } func (m *BatchSize) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BatchSize.Unmarshal(m, b) @@ -142,7 +201,7 @@ func (m *BatchTimeout) Reset() { *m = BatchTimeout{} } func (m *BatchTimeout) String() string { return proto.CompactTextString(m) } func (*BatchTimeout) ProtoMessage() {} func (*BatchTimeout) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_3289caae61166f4d, []int{2} + return fileDescriptor_configuration_9ce28addc6cd8ab7, []int{2} } func (m *BatchTimeout) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BatchTimeout.Unmarshal(m, b) @@ -184,7 +243,7 @@ func (m *KafkaBrokers) Reset() { *m = KafkaBrokers{} } func (m *KafkaBrokers) String() string { return proto.CompactTextString(m) } func (*KafkaBrokers) ProtoMessage() {} func (*KafkaBrokers) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_3289caae61166f4d, []int{3} + return fileDescriptor_configuration_9ce28addc6cd8ab7, []int{3} } func (m *KafkaBrokers) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KafkaBrokers.Unmarshal(m, b) @@ -223,7 +282,7 @@ func (m *ChannelRestrictions) Reset() { *m = ChannelRestrictions{} } func (m *ChannelRestrictions) String() string { return proto.CompactTextString(m) } func (*ChannelRestrictions) ProtoMessage() {} func (*ChannelRestrictions) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_3289caae61166f4d, []int{4} + return fileDescriptor_configuration_9ce28addc6cd8ab7, []int{4} } func (m *ChannelRestrictions) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChannelRestrictions.Unmarshal(m, b) @@ -256,33 +315,42 @@ func init() { proto.RegisterType((*BatchTimeout)(nil), "sdk.orderer.BatchTimeout") proto.RegisterType((*KafkaBrokers)(nil), "sdk.orderer.KafkaBrokers") proto.RegisterType((*ChannelRestrictions)(nil), "sdk.orderer.ChannelRestrictions") + proto.RegisterEnum("sdk.orderer.ConsensusType_MigrationState", ConsensusType_MigrationState_name, ConsensusType_MigrationState_value) } func init() { - proto.RegisterFile("orderer/configuration.proto", fileDescriptor_configuration_3289caae61166f4d) -} - -var fileDescriptor_configuration_3289caae61166f4d = []byte{ - // 333 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x4f, 0x6b, 0xf2, 0x40, - 0x10, 0xc6, 0xc9, 0xab, 0xbc, 0xea, 0xa2, 0xbc, 0xaf, 0xeb, 0x25, 0xd4, 0x8b, 0x04, 0x0a, 0x52, - 0x24, 0x81, 0xf6, 0x03, 0x14, 0xe2, 0xb1, 0x78, 0x49, 0xed, 0xa5, 0x17, 0x99, 0x24, 0x93, 0x3f, - 0x68, 0x76, 0xc3, 0xec, 0x06, 0x92, 0x7e, 0x8f, 0x7e, 0xdf, 0xb2, 0x9b, 0x68, 0xbd, 0xcd, 0x33, - 0xcf, 0x6f, 0x87, 0x79, 0x76, 0xd8, 0x5a, 0x52, 0x8a, 0x84, 0x14, 0x24, 0x52, 0x64, 0x65, 0xde, - 0x10, 0xe8, 0x52, 0x0a, 0xbf, 0x26, 0xa9, 0x25, 0x9f, 0x0c, 0xa6, 0xf7, 0xca, 0x16, 0x7b, 0x29, - 0x14, 0x0a, 0xd5, 0xa8, 0x63, 0x57, 0x23, 0xe7, 0x6c, 0xac, 0xbb, 0x1a, 0x5d, 0x67, 0xe3, 0x6c, - 0x67, 0x91, 0xad, 0xf9, 0x03, 0x9b, 0x56, 0xa8, 0x21, 0x05, 0x0d, 0xee, 0x9f, 0x8d, 0xb3, 0x9d, - 0x47, 0x37, 0xed, 0x7d, 0x3b, 0x6c, 0x16, 0x82, 0x4e, 0x8a, 0xf7, 0xf2, 0x0b, 0xf9, 0x13, 0x5b, - 0x56, 0xd0, 0x9e, 0x2a, 0x54, 0x0a, 0x72, 0x3c, 0x25, 0xb2, 0x11, 0xda, 0x8e, 0x5a, 0x44, 0xff, - 0x2a, 0x68, 0x0f, 0x7d, 0x7f, 0x6f, 0xda, 0x7c, 0xc7, 0x38, 0xc4, 0x4a, 0x5e, 0x1a, 0x8d, 0x27, - 0xf3, 0x28, 0xee, 0x34, 0x2a, 0x3b, 0x7f, 0x11, 0xfd, 0xbf, 0x3a, 0x07, 0x68, 0x43, 0xd3, 0xe7, - 0x3e, 0x5b, 0xd5, 0x84, 0x19, 0x12, 0x61, 0x7a, 0x87, 0x8f, 0x2c, 0xbe, 0xbc, 0x59, 0x57, 0xde, - 0xdb, 0xb2, 0xb9, 0x5d, 0xeb, 0x58, 0x56, 0x28, 0x1b, 0xcd, 0x5d, 0x36, 0xd1, 0x7d, 0x39, 0x44, - 0xbb, 0x4a, 0x43, 0xbe, 0x41, 0x76, 0x86, 0x90, 0xe4, 0x19, 0x49, 0x19, 0x32, 0xee, 0x4b, 0xd7, - 0xd9, 0x8c, 0x0c, 0x39, 0x48, 0xef, 0x99, 0xad, 0xf6, 0x05, 0x08, 0x81, 0x97, 0x08, 0x95, 0xa6, - 0x32, 0x31, 0x3f, 0xaa, 0xf8, 0x9a, 0xcd, 0xcc, 0x42, 0xbf, 0x61, 0xc7, 0xd1, 0xb4, 0x82, 0xd6, - 0xa6, 0x0c, 0x3f, 0xd8, 0xa3, 0xa4, 0xdc, 0x2f, 0xba, 0x1a, 0xe9, 0x82, 0x69, 0x8e, 0xe4, 0x67, - 0x10, 0x53, 0x99, 0xf4, 0x97, 0x50, 0xfe, 0x70, 0x89, 0xcf, 0x5d, 0x5e, 0xea, 0xa2, 0x89, 0xfd, - 0x44, 0x56, 0xc1, 0x1d, 0x1d, 0xf4, 0x74, 0xd0, 0xd3, 0xc1, 0x40, 0xc7, 0x7f, 0xad, 0x7e, 0xf9, - 0x09, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x9c, 0xb6, 0xa5, 0xe6, 0x01, 0x00, 0x00, + proto.RegisterFile("orderer/configuration.proto", fileDescriptor_configuration_9ce28addc6cd8ab7) +} + +var fileDescriptor_configuration_9ce28addc6cd8ab7 = []byte{ + // 460 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xdf, 0x8a, 0xda, 0x40, + 0x14, 0xc6, 0x1b, 0x95, 0xee, 0x7a, 0x58, 0x35, 0x8e, 0x2d, 0x84, 0xee, 0x8d, 0x08, 0x0b, 0xd2, + 0x2e, 0x11, 0xb6, 0x4f, 0x60, 0x82, 0x94, 0xa5, 0x44, 0x61, 0x9c, 0x42, 0xe9, 0x4d, 0x98, 0xc4, + 0x63, 0x0c, 0x6b, 0x32, 0x61, 0x66, 0x02, 0xb1, 0x7d, 0x8e, 0x3e, 0x4c, 0xdf, 0xae, 0xe4, 0x9f, + 0x7f, 0xee, 0xce, 0xf7, 0x7d, 0xbf, 0x9c, 0x99, 0x39, 0x39, 0xf0, 0x28, 0xe4, 0x0e, 0x25, 0xca, + 0x45, 0x28, 0xd2, 0x7d, 0x1c, 0xe5, 0x92, 0xeb, 0x58, 0xa4, 0x76, 0x26, 0x85, 0x16, 0xe4, 0xae, + 0x09, 0x67, 0xff, 0x3a, 0x30, 0x70, 0x45, 0xaa, 0x30, 0x55, 0xb9, 0x62, 0xa7, 0x0c, 0x09, 0x81, + 0x9e, 0x3e, 0x65, 0x68, 0x19, 0x53, 0x63, 0xde, 0xa7, 0x55, 0x4d, 0x3e, 0xc1, 0x7d, 0x82, 0x9a, + 0xef, 0xb8, 0xe6, 0x56, 0x67, 0x6a, 0xcc, 0x1f, 0xe8, 0x59, 0x93, 0x35, 0x8c, 0x92, 0x38, 0xaa, + 0xbb, 0xfb, 0x4a, 0x73, 0x8d, 0x56, 0x77, 0x6a, 0xcc, 0x87, 0x2f, 0x4f, 0x76, 0x73, 0x88, 0x7d, + 0x73, 0x80, 0xed, 0xb5, 0xf4, 0xb6, 0x84, 0xe9, 0x30, 0xb9, 0xd1, 0xe4, 0x0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6f, 0xdc, 0x91, 0xe2, 0x0d, 0xa5, 0x2a, 0xc9, 0xa0, 0x2e, 0x2d, 0x63, 0xda, 0x2d, 0xc9, 0x46, + 0xce, 0x5e, 0x60, 0xe2, 0x1e, 0x78, 0x9a, 0xe2, 0x91, 0xa2, 0xd2, 0x32, 0x0e, 0xcb, 0x89, 0x2b, + 0xf2, 0x08, 0xfd, 0xf2, 0x42, 0x97, 0xc7, 0xf6, 0xe8, 0x7d, 0xc2, 0x8b, 0xea, 0x95, 0xce, 0x0f, + 0x78, 0x12, 0x32, 0xb2, 0x0f, 0xa7, 0x0c, 0xe5, 0x11, 0x77, 0x11, 0x4a, 0x7b, 0xcf, 0x03, 0x19, + 0x87, 0xf5, 0x12, 0xaa, 0x76, 0x3f, 0x7e, 0x3d, 0x47, 0xb1, 0x3e, 0xe4, 0x81, 0x1d, 0x8a, 0x64, + 0x71, 0x45, 0x2f, 0x6a, 0x7a, 0x51, 0xd3, 0x8b, 0x86, 0x0e, 0xde, 0x57, 0xfa, 0xeb, 0xff, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x9f, 0x9f, 0xe4, 0x13, 0xe1, 0x02, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/chaincode.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/chaincode.pb.go index 32e242f01a..22d4ae62e9 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/chaincode.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/chaincode.pb.go @@ -22,30 +22,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -// Confidentiality Levels -type ConfidentialityLevel int32 - -const ( - ConfidentialityLevel_PUBLIC ConfidentialityLevel = 0 - ConfidentialityLevel_CONFIDENTIAL ConfidentialityLevel = 1 -) - -var ConfidentialityLevel_name = map[int32]string{ - 0: "PUBLIC", - 1: "CONFIDENTIAL", -} -var ConfidentialityLevel_value = map[string]int32{ - "PUBLIC": 0, - "CONFIDENTIAL": 1, -} - -func (x ConfidentialityLevel) String() string { - return proto.EnumName(ConfidentialityLevel_name, int32(x)) -} -func (ConfidentialityLevel) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{0} -} - type ChaincodeSpec_Type int32 const ( @@ -75,7 +51,7 @@ func (x ChaincodeSpec_Type) String() string { return proto.EnumName(ChaincodeSpec_Type_name, int32(x)) } func (ChaincodeSpec_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{2, 0} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{2, 0} } type ChaincodeDeploymentSpec_ExecutionEnvironment int32 @@ -98,7 +74,7 @@ func (x ChaincodeDeploymentSpec_ExecutionEnvironment) String() string { return proto.EnumName(ChaincodeDeploymentSpec_ExecutionEnvironment_name, int32(x)) } func (ChaincodeDeploymentSpec_ExecutionEnvironment) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{3, 0} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{3, 0} } // ChaincodeID contains the path as specified by the deploy transaction @@ -125,7 +101,7 @@ func (m *ChaincodeID) Reset() { *m = ChaincodeID{} } func (m *ChaincodeID) String() string { return proto.CompactTextString(m) } func (*ChaincodeID) ProtoMessage() {} func (*ChaincodeID) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{0} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{0} } func (m *ChaincodeID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeID.Unmarshal(m, b) @@ -170,18 +146,23 @@ func (m *ChaincodeID) GetVersion() string { // UnmarshalJSON in transaction.go converts the string-based REST/JSON input to // the []byte-based current ChaincodeInput structure. type ChaincodeInput struct { - Args [][]byte `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` - Decorations map[string][]byte `protobuf:"bytes,2,rep,name=decorations,proto3" json:"decorations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Args [][]byte `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` + Decorations map[string][]byte `protobuf:"bytes,2,rep,name=decorations,proto3" json:"decorations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // is_init is used for the application to signal that an invocation is to be routed + // to the legacy 'Init' function for compatibility with chaincodes which handled + // Init in the old way. New applications should manage their initialized state + // themselves. + IsInit bool `protobuf:"varint,3,opt,name=is_init,json=isInit,proto3" json:"is_init,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ChaincodeInput) Reset() { *m = ChaincodeInput{} } func (m *ChaincodeInput) String() string { return proto.CompactTextString(m) } func (*ChaincodeInput) ProtoMessage() {} func (*ChaincodeInput) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{1} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{1} } func (m *ChaincodeInput) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeInput.Unmarshal(m, b) @@ -215,6 +196,13 @@ func (m *ChaincodeInput) GetDecorations() map[string][]byte { return nil } +func (m *ChaincodeInput) GetIsInit() bool { + if m != nil { + return m.IsInit + } + return false +} + // Carries the chaincode specification. This is the actual metadata required for // defining a chaincode. type ChaincodeSpec struct { @@ -231,7 +219,7 @@ func (m *ChaincodeSpec) Reset() { *m = ChaincodeSpec{} } func (m *ChaincodeSpec) String() string { return proto.CompactTextString(m) } func (*ChaincodeSpec) ProtoMessage() {} func (*ChaincodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{2} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{2} } func (m *ChaincodeSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeSpec.Unmarshal(m, b) @@ -294,7 +282,7 @@ func (m *ChaincodeDeploymentSpec) Reset() { *m = ChaincodeDeploymentSpec func (m *ChaincodeDeploymentSpec) String() string { return proto.CompactTextString(m) } func (*ChaincodeDeploymentSpec) ProtoMessage() {} func (*ChaincodeDeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{3} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{3} } func (m *ChaincodeDeploymentSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeDeploymentSpec.Unmarshal(m, b) @@ -347,7 +335,7 @@ func (m *ChaincodeInvocationSpec) Reset() { *m = ChaincodeInvocationSpec func (m *ChaincodeInvocationSpec) String() string { return proto.CompactTextString(m) } func (*ChaincodeInvocationSpec) ProtoMessage() {} func (*ChaincodeInvocationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{4} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{4} } func (m *ChaincodeInvocationSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeInvocationSpec.Unmarshal(m, b) @@ -386,7 +374,7 @@ func (m *LifecycleEvent) Reset() { *m = LifecycleEvent{} } func (m *LifecycleEvent) String() string { return proto.CompactTextString(m) } func (*LifecycleEvent) ProtoMessage() {} func (*LifecycleEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_d56d9efe15650cad, []int{5} + return fileDescriptor_chaincode_f10dd7a7cd7af370, []int{5} } func (m *LifecycleEvent) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LifecycleEvent.Unmarshal(m, b) @@ -421,53 +409,50 @@ func init() { proto.RegisterType((*ChaincodeDeploymentSpec)(nil), "sdk.protos.ChaincodeDeploymentSpec") proto.RegisterType((*ChaincodeInvocationSpec)(nil), "sdk.protos.ChaincodeInvocationSpec") proto.RegisterType((*LifecycleEvent)(nil), "sdk.protos.LifecycleEvent") - proto.RegisterEnum("sdk.protos.ConfidentialityLevel", ConfidentialityLevel_name, ConfidentialityLevel_value) proto.RegisterEnum("sdk.protos.ChaincodeSpec_Type", ChaincodeSpec_Type_name, ChaincodeSpec_Type_value) proto.RegisterEnum("sdk.protos.ChaincodeDeploymentSpec_ExecutionEnvironment", ChaincodeDeploymentSpec_ExecutionEnvironment_name, ChaincodeDeploymentSpec_ExecutionEnvironment_value) } -func init() { proto.RegisterFile("peer/chaincode.proto", fileDescriptor_chaincode_d56d9efe15650cad) } - -var fileDescriptor_chaincode_d56d9efe15650cad = []byte{ - // 632 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x6d, 0x6f, 0xda, 0x3c, - 0x14, 0x6d, 0x80, 0xbe, 0xdd, 0x50, 0x94, 0xc7, 0x0f, 0xcf, 0x33, 0xd4, 0x4f, 0x2c, 0xd2, 0x34, - 0x36, 0x4d, 0x41, 0x62, 0xd5, 0x36, 0x4d, 0x53, 0x25, 0x4a, 0xd2, 0x2a, 0x1d, 0x83, 0xca, 0x6d, - 0x27, 0x6d, 0x5f, 0x50, 0xea, 0x5c, 0xc0, 0x6a, 0x70, 0xa2, 0x60, 0xa2, 0xe6, 0x67, 0xec, 0x97, - 0xec, 0x27, 0x6e, 0xb2, 0x53, 0x5e, 0xba, 0xf6, 0xdb, 0x3e, 0x71, 0x7d, 0x7c, 0x7c, 0xee, 0x3d, - 0x07, 0xc7, 0x50, 0x4f, 0x10, 0xd3, 0x36, 0x9b, 0x06, 0x5c, 0xb0, 0x38, 0x44, 0x27, 0x49, 0x63, - 0x19, 0x93, 0x1d, 0xfd, 0x33, 0xb7, 0x87, 0x60, 0xf6, 0x96, 0x5b, 0xbe, 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x1c, 0x85, 0x81, 0x44, 0x3b, 0xd9, 0x88, - 0xc4, 0x17, 0x59, 0xcc, 0xf4, 0xf5, 0xfa, 0xfb, 0x48, 0xee, 0xdb, 0xfd, 0xc3, 0xc3, 0xd1, 0x04, - 0x05, 0x16, 0xb7, 0x76, 0x14, 0x44, 0x13, 0xfb, 0x3d, 0xd4, 0xfa, 0x7c, 0x8c, 0x2c, 0x67, 0x11, - 0x7a, 0x99, 0x9a, 0xf8, 0xc5, 0x66, 0x23, 0xfd, 0x0d, 0x16, 0x17, 0x7a, 0xad, 0x38, 0x08, 0x66, - 0xf8, 0xfa, 0x08, 0xea, 0xbd, 0x58, 0x8c, 0x79, 0x88, 0x42, 0xf2, 0x20, 0xe2, 0x32, 0xef, 0x63, - 0x86, 0x91, 0x32, 0x79, 0x71, 0x7d, 0xd2, 0xf7, 0x7b, 0xd6, 0x16, 0xb1, 0xa0, 0xda, 0x1b, 0x0e, - 0x4e, 0x7d, 0xd7, 0x1b, 0x5c, 0xf9, 0xdd, 0xbe, 0x65, 0x9c, 0x0c, 0xc1, 0x8e, 0xd3, 0x89, 0x33, - 0xcd, 0x13, 0x4c, 0x23, 0x0c, 0x27, 0x98, 0x3a, 0xe3, 0xe0, 0x26, 0xe5, 0x6c, 0xe9, 0x42, 0xbd, - 0x1b, 0xdf, 0x5f, 0x4d, 0xb8, 0x9c, 0x2e, 0x6e, 0x1c, 0x16, 0xcf, 0xda, 0x1b, 0xd4, 0x76, 0x41, - 0x6d, 0x17, 0xd4, 0xb6, 0xa2, 0xde, 0x14, 0x4f, 0xca, 0xdb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xea, 0x1f, 0x3b, 0xe4, 0x71, 0x04, 0x00, 0x00, +func init() { proto.RegisterFile("peer/chaincode.proto", fileDescriptor_chaincode_f10dd7a7cd7af370) } + +var fileDescriptor_chaincode_f10dd7a7cd7af370 = []byte{ + // 607 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x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37, 0x2b, 0x53, 0xcc, 0xe6, 0x18, 0xc5, 0x98, 0x79, 0xd3, + 0xf0, 0x2a, 0xe3, 0x6c, 0xc5, 0x47, 0x3d, 0x0d, 0xdf, 0x9f, 0xc5, 0x5c, 0xce, 0x96, 0x57, 0x1e, + 0x4b, 0x16, 0xbd, 0x2d, 0x68, 0xaf, 0x82, 0xf6, 0x2a, 0x68, 0x4f, 0x41, 0xaf, 0xaa, 0x57, 0xe3, + 0xc5, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x85, 0x3e, 0x7a, 0x54, 0x04, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/chaincode_event.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/chaincode_event.pb.go index 1410ef3513..950578ee8a 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/chaincode_event.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/chaincode_event.pb.go @@ -38,7 +38,7 @@ func (m *ChaincodeEvent) Reset() { *m = ChaincodeEvent{} } func (m *ChaincodeEvent) String() string { return proto.CompactTextString(m) } func (*ChaincodeEvent) ProtoMessage() {} func (*ChaincodeEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_chaincode_event_b240c71081bd7c2d, []int{0} + return fileDescriptor_chaincode_event_8b41fbbca4a6aed1, []int{0} } func (m *ChaincodeEvent) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeEvent.Unmarshal(m, b) @@ -91,10 +91,10 @@ func init() { } func init() { - proto.RegisterFile("peer/chaincode_event.proto", fileDescriptor_chaincode_event_b240c71081bd7c2d) + proto.RegisterFile("peer/chaincode_event.proto", fileDescriptor_chaincode_event_8b41fbbca4a6aed1) } -var fileDescriptor_chaincode_event_b240c71081bd7c2d = []byte{ +var fileDescriptor_chaincode_event_8b41fbbca4a6aed1 = []byte{ // 218 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x48, 0x4d, 0x2d, 0xd2, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0x4b, 0xce, 0x4f, 0x49, 0x8d, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/configuration.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/configuration.pb.go index 3c98f1eec7..c24802e080 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/configuration.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/configuration.pb.go @@ -34,7 +34,7 @@ func (m *AnchorPeers) Reset() { *m = AnchorPeers{} } func (m *AnchorPeers) String() string { return proto.CompactTextString(m) } func (*AnchorPeers) ProtoMessage() {} func (*AnchorPeers) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_d9ec63ae33c182ef, []int{0} + return fileDescriptor_configuration_b4b920cf60a7bfc1, []int{0} } func (m *AnchorPeers) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AnchorPeers.Unmarshal(m, b) @@ -77,7 +77,7 @@ func (m *AnchorPeer) Reset() { *m = AnchorPeer{} } func (m *AnchorPeer) String() string { return proto.CompactTextString(m) } func (*AnchorPeer) ProtoMessage() {} func (*AnchorPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_d9ec63ae33c182ef, []int{1} + return fileDescriptor_configuration_b4b920cf60a7bfc1, []int{1} } func (m *AnchorPeer) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AnchorPeer.Unmarshal(m, b) @@ -124,7 +124,7 @@ func (m *APIResource) Reset() { *m = APIResource{} } func (m *APIResource) String() string { return proto.CompactTextString(m) } func (*APIResource) ProtoMessage() {} func (*APIResource) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_d9ec63ae33c182ef, []int{2} + return fileDescriptor_configuration_b4b920cf60a7bfc1, []int{2} } func (m *APIResource) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_APIResource.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *ACLs) Reset() { *m = ACLs{} } func (m *ACLs) String() string { return proto.CompactTextString(m) } func (*ACLs) ProtoMessage() {} func (*ACLs) Descriptor() ([]byte, []int) { - return fileDescriptor_configuration_d9ec63ae33c182ef, []int{3} + return fileDescriptor_configuration_b4b920cf60a7bfc1, []int{3} } func (m *ACLs) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ACLs.Unmarshal(m, b) @@ -200,10 +200,10 @@ func init() { } func init() { - proto.RegisterFile("peer/configuration.proto", fileDescriptor_configuration_d9ec63ae33c182ef) + proto.RegisterFile("peer/configuration.proto", fileDescriptor_configuration_b4b920cf60a7bfc1) } -var fileDescriptor_configuration_d9ec63ae33c182ef = []byte{ +var fileDescriptor_configuration_b4b920cf60a7bfc1 = []byte{ // 295 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xdf, 0x4b, 0xfb, 0x30, 0x14, 0xc5, 0xe9, 0x7e, 0x7c, 0x61, 0xb7, 0xdf, 0x07, 0x89, 0x20, 0x45, 0x10, 0x46, 0x9f, 0x36, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/events.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/events.pb.go index 9293ba49b9..00256547d4 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/events.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/events.pb.go @@ -43,7 +43,7 @@ func (m *FilteredBlock) Reset() { *m = FilteredBlock{} } func (m *FilteredBlock) String() string { return proto.CompactTextString(m) } func (*FilteredBlock) ProtoMessage() {} func (*FilteredBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_events_8af932975aef5a3c, []int{0} + return fileDescriptor_events_d6436062713089fb, []int{0} } func (m *FilteredBlock) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FilteredBlock.Unmarshal(m, b) @@ -102,7 +102,7 @@ func (m *FilteredTransaction) Reset() { *m = FilteredTransaction{} } func (m *FilteredTransaction) String() string { return proto.CompactTextString(m) } func (*FilteredTransaction) ProtoMessage() {} func (*FilteredTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_events_8af932975aef5a3c, []int{1} + return fileDescriptor_events_d6436062713089fb, []int{1} } func (m *FilteredTransaction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FilteredTransaction.Unmarshal(m, b) @@ -235,7 +235,7 @@ func (m *FilteredTransactionActions) Reset() { *m = FilteredTransactionA func (m *FilteredTransactionActions) String() string { return proto.CompactTextString(m) } func (*FilteredTransactionActions) ProtoMessage() {} func (*FilteredTransactionActions) Descriptor() ([]byte, []int) { - return fileDescriptor_events_8af932975aef5a3c, []int{2} + return fileDescriptor_events_d6436062713089fb, []int{2} } func (m *FilteredTransactionActions) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FilteredTransactionActions.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *FilteredChaincodeAction) Reset() { *m = FilteredChaincodeAction func (m *FilteredChaincodeAction) String() string { return proto.CompactTextString(m) } func (*FilteredChaincodeAction) ProtoMessage() {} func (*FilteredChaincodeAction) Descriptor() ([]byte, []int) { - return fileDescriptor_events_8af932975aef5a3c, []int{3} + return fileDescriptor_events_d6436062713089fb, []int{3} } func (m *FilteredChaincodeAction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FilteredChaincodeAction.Unmarshal(m, b) @@ -318,7 +318,7 @@ func (m *DeliverResponse) Reset() { *m = DeliverResponse{} } func (m *DeliverResponse) String() string { return proto.CompactTextString(m) } func (*DeliverResponse) ProtoMessage() {} func (*DeliverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_events_8af932975aef5a3c, []int{4} + return fileDescriptor_events_d6436062713089fb, []int{4} } func (m *DeliverResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeliverResponse.Unmarshal(m, b) @@ -665,9 +665,9 @@ var _Deliver_serviceDesc = grpc.ServiceDesc{ Metadata: "peer/events.proto", } -func init() { proto.RegisterFile("peer/events.proto", fileDescriptor_events_8af932975aef5a3c) } +func init() { proto.RegisterFile("peer/events.proto", fileDescriptor_events_d6436062713089fb) } -var fileDescriptor_events_8af932975aef5a3c = []byte{ +var fileDescriptor_events_d6436062713089fb = []byte{ // 560 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, 0x10, 0x8e, 0x69, 0x08, 0xea, 0x44, 0x49, 0xdb, 0x2d, 0x4d, 0xa3, 0x20, 0xd4, 0xc8, 0x12, 0xc8, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/peer.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/peer.pb.go index 457e7ff8f3..61564097e6 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/peer.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/peer.pb.go @@ -38,7 +38,7 @@ func (m *PeerID) Reset() { *m = PeerID{} } func (m *PeerID) String() string { return proto.CompactTextString(m) } func (*PeerID) ProtoMessage() {} func (*PeerID) Descriptor() ([]byte, []int) { - return fileDescriptor_peer_f225b6e437338532, []int{0} + return fileDescriptor_peer_f8c3d1cdb122d768, []int{0} } func (m *PeerID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PeerID.Unmarshal(m, b) @@ -77,7 +77,7 @@ func (m *PeerEndpoint) Reset() { *m = PeerEndpoint{} } func (m *PeerEndpoint) String() string { return proto.CompactTextString(m) } func (*PeerEndpoint) ProtoMessage() {} func (*PeerEndpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_peer_f225b6e437338532, []int{1} + return fileDescriptor_peer_f8c3d1cdb122d768, []int{1} } func (m *PeerEndpoint) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PeerEndpoint.Unmarshal(m, b) @@ -188,9 +188,9 @@ var _Endorser_serviceDesc = grpc.ServiceDesc{ Metadata: "peer/peer.proto", } -func init() { proto.RegisterFile("peer/peer.proto", fileDescriptor_peer_f225b6e437338532) } +func init() { proto.RegisterFile("peer/peer.proto", fileDescriptor_peer_f8c3d1cdb122d768) } -var fileDescriptor_peer_f225b6e437338532 = []byte{ +var fileDescriptor_peer_f8c3d1cdb122d768 = []byte{ // 246 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x4f, 0x4b, 0xc4, 0x30, 0x10, 0xc5, 0xdd, 0x22, 0xab, 0x8e, 0xe2, 0x42, 0x04, 0x29, 0x65, 0x11, 0xe9, 0x49, 0x2f, 0x29, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/proposal.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/proposal.pb.go index 856f93f151..ca9321bf70 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/proposal.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/proposal.pb.go @@ -63,7 +63,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_2be65988745cf952, []int{0} + return fileDescriptor_proposal_1d9e92dd580783c0, []int{0} } func (m *SignedProposal) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedProposal.Unmarshal(m, b) @@ -135,7 +135,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_2be65988745cf952, []int{1} + return fileDescriptor_proposal_1d9e92dd580783c0, []int{1} } func (m *Proposal) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Proposal.Unmarshal(m, b) @@ -203,7 +203,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_2be65988745cf952, []int{2} + return fileDescriptor_proposal_1d9e92dd580783c0, []int{2} } func (m *ChaincodeHeaderExtension) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeHeaderExtension.Unmarshal(m, b) @@ -259,7 +259,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_2be65988745cf952, []int{3} + return fileDescriptor_proposal_1d9e92dd580783c0, []int{3} } func (m *ChaincodeProposalPayload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeProposalPayload.Unmarshal(m, b) @@ -310,9 +310,9 @@ type ChaincodeAction struct { // 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"` - // This field contains the token expectation generated by the chaincode + // This field contains the token operations requests generated by the chaincode // executing this invocation - TokenExpectation *token.TokenExpectation `protobuf:"bytes,5,opt,name=token_expectation,json=tokenExpectation,proto3" json:"token_expectation,omitempty"` + TokenOperations []*token.TokenOperation `protobuf:"bytes,5,rep,name=token_operations,json=tokenOperations,proto3" json:"token_operations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -322,7 +322,7 @@ 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_2be65988745cf952, []int{4} + return fileDescriptor_proposal_1d9e92dd580783c0, []int{4} } func (m *ChaincodeAction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeAction.Unmarshal(m, b) @@ -370,9 +370,9 @@ func (m *ChaincodeAction) GetChaincodeId() *ChaincodeID { return nil } -func (m *ChaincodeAction) GetTokenExpectation() *token.TokenExpectation { +func (m *ChaincodeAction) GetTokenOperations() []*token.TokenOperation { if m != nil { - return m.TokenExpectation + return m.TokenOperations } return nil } @@ -386,39 +386,39 @@ func init() { proto.RegisterType((*ChaincodeAction)(nil), "sdk.protos.ChaincodeAction") } -func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor_proposal_2be65988745cf952) } +func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor_proposal_1d9e92dd580783c0) } -var fileDescriptor_proposal_2be65988745cf952 = []byte{ - // 487 bytes of a gzipped FileDescriptorProto +var fileDescriptor_proposal_1d9e92dd580783c0 = []byte{ + // 489 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, 0x91, 0x5a, 0x0d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0x74, 0xc5, 0xb4, 0x6c, 0xd2, 0x2d, 0x9d, 0xc9, 0x1b, 0x74, + 0xbc, 0x13, 0x82, 0xc7, 0xa8, 0xbf, 0x04, 0xdb, 0xf7, 0x61, 0x6a, 0x3e, 0x4d, 0x51, 0x2b, 0x52, + 0xd5, 0x7e, 0x57, 0xd6, 0x78, 0xdd, 0x7b, 0x15, 0x44, 0x7f, 0x02, 0x34, 0xea, 0xb2, 0xbf, 0xcb, + 0xcd, 0x75, 0x98, 0xdd, 0x48, 0x50, 0x75, 0xa5, 0xfd, 0xf6, 0xbd, 0x69, 0xb6, 0x09, 0x2b, 0x60, + 0x5a, 0x39, 0x21, 0x67, 0xe1, 0x67, 0xe8, 0xc0, 0x9f, 0x5c, 0xbb, 0xb2, 0xc1, 0x74, 0xec, 0x5b, + 0x4b, 0x9d, 0x3f, 0xed, 0x22, 0x76, 0xe6, 0xfe, 0xe0, 0xff, 0xe6, 0x8e, 0xdf, 0xa2, 0x71, 0x7b, + 0xc8, 0xf3, 0xf5, 0x21, 0x87, 0x7b, 0xed, 0x20, 0x1f, 0xc7, 0x2d, 0x10, 0xdf, 0x9a, 0xdf, 0xcf, + 0x1e, 0x4d, 0x47, 0x7a, 0xcb, 0x56, 0xb3, 0x6f, 0x28, 0xe2, 0xb2, 0x8c, 0x17, 0x8d, 0x00, 0x59, + 0x41, 0x51, 0x82, 0x8c, 0xbf, 0x93, 0x4c, 0xd2, 0xdc, 0xe7, 0x36, 0xcf, 0x68, 0x36, 0x5a, 0x6f, + 0x21, 0x5f, 0x92, 0x12, 0xee, 0x9f, 0x96, 0x54, 0x2f, 0xea, 0x2c, 0xce, 0xf9, 0x8f, 0x64, 0x83, + 0x9b, 0x58, 0x6e, 0x62, 0xb9, 0x89, 0xe1, 0x66, 0xf6, 0x99, 0xbe, 0xf8, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0x1d, 0x46, 0xaa, 0xf8, 0xc4, 0x03, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/proposal_response.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/proposal_response.pb.go index 50da9752e2..a51d614418 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/proposal_response.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/proposal_response.pb.go @@ -54,7 +54,7 @@ func (m *ProposalResponse) Reset() { *m = ProposalResponse{} } func (m *ProposalResponse) String() string { return proto.CompactTextString(m) } func (*ProposalResponse) ProtoMessage() {} func (*ProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_proposal_response_22a755721b685f40, []int{0} + return fileDescriptor_proposal_response_a1336d02d5a9ee8c, []int{0} } func (m *ProposalResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ProposalResponse.Unmarshal(m, b) @@ -127,7 +127,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_proposal_response_22a755721b685f40, []int{1} + return fileDescriptor_proposal_response_a1336d02d5a9ee8c, []int{1} } func (m *Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Response.Unmarshal(m, b) @@ -205,7 +205,7 @@ func (m *ProposalResponsePayload) Reset() { *m = ProposalResponsePayload func (m *ProposalResponsePayload) String() string { return proto.CompactTextString(m) } func (*ProposalResponsePayload) ProtoMessage() {} func (*ProposalResponsePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_proposal_response_22a755721b685f40, []int{2} + return fileDescriptor_proposal_response_a1336d02d5a9ee8c, []int{2} } func (m *ProposalResponsePayload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ProposalResponsePayload.Unmarshal(m, b) @@ -263,7 +263,7 @@ func (m *Endorsement) Reset() { *m = Endorsement{} } func (m *Endorsement) String() string { return proto.CompactTextString(m) } func (*Endorsement) ProtoMessage() {} func (*Endorsement) Descriptor() ([]byte, []int) { - return fileDescriptor_proposal_response_22a755721b685f40, []int{3} + return fileDescriptor_proposal_response_a1336d02d5a9ee8c, []int{3} } func (m *Endorsement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Endorsement.Unmarshal(m, b) @@ -305,10 +305,10 @@ func init() { } func init() { - proto.RegisterFile("peer/proposal_response.proto", fileDescriptor_proposal_response_22a755721b685f40) + proto.RegisterFile("peer/proposal_response.proto", fileDescriptor_proposal_response_a1336d02d5a9ee8c) } -var fileDescriptor_proposal_response_22a755721b685f40 = []byte{ +var fileDescriptor_proposal_response_a1336d02d5a9ee8c = []byte{ // 367 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x51, 0x4b, 0xfb, 0x30, 0x14, 0xc5, 0xe9, 0xfe, 0xff, 0xcd, 0x2d, 0x9b, 0x30, 0x2a, 0x68, 0x19, 0x03, 0x47, 0x7d, 0x99, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/query.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/query.pb.go index f69101f5f0..aabfbf4e0d 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/query.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/query.pb.go @@ -37,7 +37,7 @@ func (m *ChaincodeQueryResponse) Reset() { *m = ChaincodeQueryResponse{} func (m *ChaincodeQueryResponse) String() string { return proto.CompactTextString(m) } func (*ChaincodeQueryResponse) ProtoMessage() {} func (*ChaincodeQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_query_37e5d407118e73f5, []int{0} + return fileDescriptor_query_5977fd5a5e763a67, []int{0} } func (m *ChaincodeQueryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeQueryResponse.Unmarshal(m, b) @@ -95,7 +95,7 @@ func (m *ChaincodeInfo) Reset() { *m = ChaincodeInfo{} } func (m *ChaincodeInfo) String() string { return proto.CompactTextString(m) } func (*ChaincodeInfo) ProtoMessage() {} func (*ChaincodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_query_37e5d407118e73f5, []int{1} + return fileDescriptor_query_5977fd5a5e763a67, []int{1} } func (m *ChaincodeInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeInfo.Unmarshal(m, b) @@ -178,7 +178,7 @@ func (m *ChannelQueryResponse) Reset() { *m = ChannelQueryResponse{} } func (m *ChannelQueryResponse) String() string { return proto.CompactTextString(m) } func (*ChannelQueryResponse) ProtoMessage() {} func (*ChannelQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_query_37e5d407118e73f5, []int{2} + return fileDescriptor_query_5977fd5a5e763a67, []int{2} } func (m *ChannelQueryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChannelQueryResponse.Unmarshal(m, b) @@ -217,7 +217,7 @@ func (m *ChannelInfo) Reset() { *m = ChannelInfo{} } func (m *ChannelInfo) String() string { return proto.CompactTextString(m) } func (*ChannelInfo) ProtoMessage() {} func (*ChannelInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_query_37e5d407118e73f5, []int{3} + return fileDescriptor_query_5977fd5a5e763a67, []int{3} } func (m *ChannelInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChannelInfo.Unmarshal(m, b) @@ -251,9 +251,9 @@ func init() { proto.RegisterType((*ChannelInfo)(nil), "sdk.protos.ChannelInfo") } -func init() { proto.RegisterFile("peer/query.proto", fileDescriptor_query_37e5d407118e73f5) } +func init() { proto.RegisterFile("peer/query.proto", fileDescriptor_query_5977fd5a5e763a67) } -var fileDescriptor_query_37e5d407118e73f5 = []byte{ +var fileDescriptor_query_5977fd5a5e763a67 = []byte{ // 296 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xdf, 0x4a, 0xc3, 0x30, 0x14, 0xc6, 0xe9, 0xfe, 0xba, 0x33, 0x15, 0x89, 0x53, 0x72, 0x23, 0x8c, 0x5e, 0x4d, 0x90, 0x16, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/signed_cc_dep_spec.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/signed_cc_dep_spec.pb.go index 716fb707d7..e54a49e86d 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/signed_cc_dep_spec.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/signed_cc_dep_spec.pb.go @@ -44,7 +44,7 @@ func (m *SignedChaincodeDeploymentSpec) Reset() { *m = SignedChaincodeDe func (m *SignedChaincodeDeploymentSpec) String() string { return proto.CompactTextString(m) } func (*SignedChaincodeDeploymentSpec) ProtoMessage() {} func (*SignedChaincodeDeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_signed_cc_dep_spec_80ee01f5d5123140, []int{0} + return fileDescriptor_signed_cc_dep_spec_ac9383ae12091d27, []int{0} } func (m *SignedChaincodeDeploymentSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedChaincodeDeploymentSpec.Unmarshal(m, b) @@ -90,10 +90,10 @@ func init() { } func init() { - proto.RegisterFile("peer/signed_cc_dep_spec.proto", fileDescriptor_signed_cc_dep_spec_80ee01f5d5123140) + proto.RegisterFile("peer/signed_cc_dep_spec.proto", fileDescriptor_signed_cc_dep_spec_ac9383ae12091d27) } -var fileDescriptor_signed_cc_dep_spec_80ee01f5d5123140 = []byte{ +var fileDescriptor_signed_cc_dep_spec_ac9383ae12091d27 = []byte{ // 255 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc3, 0x40, 0x10, 0x86, 0xa9, 0x05, 0x0f, 0xab, 0x17, 0x53, 0xc1, 0x28, 0x16, 0x4a, 0x4f, 0xf5, 0x92, 0xa0, diff --git a/third_party/github.com/hyperledger/fabric/protos/peer/transaction.pb.go b/third_party/github.com/hyperledger/fabric/protos/peer/transaction.pb.go index f8dd87801b..783da2a842 100644 --- a/third_party/github.com/hyperledger/fabric/protos/peer/transaction.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/peer/transaction.pb.go @@ -10,7 +10,6 @@ package peer // import "github.com/hyperledger/fabric-sdk-go/third_party/github. import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import _ "github.com/golang/protobuf/ptypes/timestamp" import common "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" // Reference imports to suppress errors if they are not otherwise used. @@ -52,6 +51,7 @@ const ( TxValidationCode_BAD_RWSET TxValidationCode = 22 TxValidationCode_ILLEGAL_WRITESET TxValidationCode = 23 TxValidationCode_INVALID_WRITESET TxValidationCode = 24 + TxValidationCode_INVALID_CHAINCODE TxValidationCode = 25 TxValidationCode_NOT_VALIDATED TxValidationCode = 254 TxValidationCode_INVALID_OTHER_REASON TxValidationCode = 255 ) @@ -82,6 +82,7 @@ var TxValidationCode_name = map[int32]string{ 22: "BAD_RWSET", 23: "ILLEGAL_WRITESET", 24: "INVALID_WRITESET", + 25: "INVALID_CHAINCODE", 254: "NOT_VALIDATED", 255: "INVALID_OTHER_REASON", } @@ -111,6 +112,7 @@ var TxValidationCode_value = map[string]int32{ "BAD_RWSET": 22, "ILLEGAL_WRITESET": 23, "INVALID_WRITESET": 24, + "INVALID_CHAINCODE": 25, "NOT_VALIDATED": 254, "INVALID_OTHER_REASON": 255, } @@ -119,28 +121,31 @@ func (x TxValidationCode) String() string { return proto.EnumName(TxValidationCode_name, int32(x)) } func (TxValidationCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{0} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{0} } // Reserved entries in the key-level metadata map type MetaDataKeys int32 const ( - MetaDataKeys_VALIDATION_PARAMETER MetaDataKeys = 0 + MetaDataKeys_VALIDATION_PARAMETER MetaDataKeys = 0 + MetaDataKeys_VALIDATION_PARAMETER_V2 MetaDataKeys = 1 ) var MetaDataKeys_name = map[int32]string{ 0: "VALIDATION_PARAMETER", + 1: "VALIDATION_PARAMETER_V2", } var MetaDataKeys_value = map[string]int32{ - "VALIDATION_PARAMETER": 0, + "VALIDATION_PARAMETER": 0, + "VALIDATION_PARAMETER_V2": 1, } func (x MetaDataKeys) String() string { return proto.EnumName(MetaDataKeys_name, int32(x)) } func (MetaDataKeys) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{1} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{1} } // This message is necessary to facilitate the verification of the signature @@ -163,7 +168,7 @@ func (m *SignedTransaction) Reset() { *m = SignedTransaction{} } func (m *SignedTransaction) String() string { return proto.CompactTextString(m) } func (*SignedTransaction) ProtoMessage() {} func (*SignedTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{0} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{0} } func (m *SignedTransaction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedTransaction.Unmarshal(m, b) @@ -217,7 +222,7 @@ func (m *ProcessedTransaction) Reset() { *m = ProcessedTransaction{} } func (m *ProcessedTransaction) String() string { return proto.CompactTextString(m) } func (*ProcessedTransaction) ProtoMessage() {} func (*ProcessedTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{1} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{1} } func (m *ProcessedTransaction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ProcessedTransaction.Unmarshal(m, b) @@ -276,7 +281,7 @@ func (m *Transaction) Reset() { *m = Transaction{} } func (m *Transaction) String() string { return proto.CompactTextString(m) } func (*Transaction) ProtoMessage() {} func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{2} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{2} } func (m *Transaction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Transaction.Unmarshal(m, b) @@ -320,7 +325,7 @@ func (m *TransactionAction) Reset() { *m = TransactionAction{} } func (m *TransactionAction) String() string { return proto.CompactTextString(m) } func (*TransactionAction) ProtoMessage() {} func (*TransactionAction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{3} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{3} } func (m *TransactionAction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransactionAction.Unmarshal(m, b) @@ -379,7 +384,7 @@ func (m *ChaincodeActionPayload) Reset() { *m = ChaincodeActionPayload{} func (m *ChaincodeActionPayload) String() string { return proto.CompactTextString(m) } func (*ChaincodeActionPayload) ProtoMessage() {} func (*ChaincodeActionPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{4} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{4} } func (m *ChaincodeActionPayload) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeActionPayload.Unmarshal(m, b) @@ -432,7 +437,7 @@ func (m *ChaincodeEndorsedAction) Reset() { *m = ChaincodeEndorsedAction func (m *ChaincodeEndorsedAction) String() string { return proto.CompactTextString(m) } func (*ChaincodeEndorsedAction) ProtoMessage() {} func (*ChaincodeEndorsedAction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_4fbd1a0e1a50cfab, []int{5} + return fileDescriptor_transaction_6a3cf269faade5fe, []int{5} } func (m *ChaincodeEndorsedAction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ChaincodeEndorsedAction.Unmarshal(m, b) @@ -477,63 +482,63 @@ func init() { proto.RegisterEnum("sdk.protos.MetaDataKeys", MetaDataKeys_name, MetaDataKeys_value) } -func init() { proto.RegisterFile("peer/transaction.proto", fileDescriptor_transaction_4fbd1a0e1a50cfab) } - -var fileDescriptor_transaction_4fbd1a0e1a50cfab = []byte{ - // 877 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0x41, 0x6f, 0xe2, 0x46, - 0x14, 0x5e, 0xb2, 0x4d, 0xd2, 0x0c, 0x24, 0x19, 0x06, 0x42, 0x08, 0x8a, 0xba, 0x2b, 0x0e, 0x55, - 0xba, 0x95, 0x40, 0xca, 0x1e, 0x2a, 0x55, 0xbd, 0x0c, 0xf6, 0x24, 0x58, 0x6b, 0x66, 0xac, 0xf1, - 0x40, 0x48, 0x0f, 0x1d, 0x19, 0x98, 0x25, 0xa8, 0x60, 0x23, 0xdb, 0x59, 0x35, 0xd7, 0xfe, 0x80, - 0xf6, 0xd2, 0xdf, 0xdb, 0x56, 0xe3, 0xb1, 0x81, 0x24, 0xed, 0x05, 0x33, 0xdf, 0xfb, 0xde, 0x7b, - 0xdf, 0xf7, 0x9e, 0x35, 0x06, 0x8d, 0xb5, 0x52, 0x71, 0x37, 0x8d, 0x83, 0x30, 0x09, 0xa6, 0xe9, - 0x22, 0x0a, 0x3b, 0xeb, 0x38, 0x4a, 0x23, 0x74, 0x90, 0x3d, 0x92, 0xd6, 0xbb, 0x79, 0x14, 0xcd, - 0x97, 0xaa, 0x9b, 0x1d, 0x27, 0x8f, 0x9f, 0xbb, 0xe9, 0x62, 0xa5, 0x92, 0x34, 0x58, 0xad, 0x0d, - 0xb1, 0x75, 0x99, 0x15, 0x58, 0xc7, 0xd1, 0x3a, 0x4a, 0x82, 0xa5, 0x8c, 0x55, 0xb2, 0x8e, 0xc2, - 0x44, 0xe5, 0xd1, 0xda, 0x34, 0x5a, 0xad, 0xa2, 0xb0, 0x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98, 0x52, - 0xe2, 0x16, 0x8b, 0xab, 0x17, 0x19, 0x9c, 0xf8, 0x1e, 0xa3, 0x3e, 0xd9, 0x4c, 0xf6, 0x0c, 0x1d, - 0x83, 0xa3, 0x2c, 0x72, 0xe7, 0x13, 0x01, 0x1b, 0x5a, 0xb9, 0xe3, 0xba, 0xe4, 0x16, 0xbb, 0xf2, - 0x8e, 0x3b, 0x82, 0x68, 0xf4, 0x3c, 0x43, 0xf3, 0xd5, 0x6d, 0xd0, 0x26, 0x42, 0xe0, 0x58, 0x9b, - 0xce, 0x70, 0x2c, 0x88, 0x0d, 0xff, 0x2e, 0xa1, 0x0b, 0x50, 0x2f, 0x98, 0x4c, 0xf4, 0x09, 0xd7, - 0xb3, 0xf4, 0x19, 0x85, 0xff, 0x94, 0x3e, 0x5c, 0x81, 0xca, 0x40, 0xa5, 0x81, 0x1d, 0xa4, 0xc1, - 0x27, 0xf5, 0x94, 0x68, 0x4d, 0x79, 0xaa, 0xb6, 0xe7, 0x61, 0x8e, 0x07, 0x44, 0x10, 0x0e, 0xdf, - 0xf4, 0xa6, 0xa0, 0x1d, 0xc5, 0xf3, 0xce, 0xc3, 0xd3, 0x5a, 0xc5, 0x4b, 0x35, 0x9b, 0xab, 0xb8, - 0xf3, 0x39, 0x98, 0xc4, 0x8b, 0x69, 0xf1, 0xee, 0xeb, 0x6b, 0xba, 0x87, 0x76, 0xae, 0x13, 0x2f, - 0x98, 0xfe, 0x1a, 0xcc, 0xd5, 0xcf, 0xdf, 0xcd, 0x17, 0xe9, 0xc3, 0xe3, 0x44, 0xdf, 0x7e, 0xdd, - 0x9d, 0xf4, 0xae, 0x49, 0x37, 0x17, 0x7f, 0xd2, 0xd5, 0xe9, 0x13, 0xf3, 0x51, 0xf8, 0xf8, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xba, 0xd3, 0xb2, 0x32, 0x35, 0x06, 0x00, 0x00, +func init() { proto.RegisterFile("peer/transaction.proto", fileDescriptor_transaction_6a3cf269faade5fe) } + +var fileDescriptor_transaction_6a3cf269faade5fe = []byte{ + // 872 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0x5d, 0x6f, 0xe2, 0x46, + 0x14, 0x5d, 0xb2, 0x4d, 0xd2, 0x5c, 0x48, 0x32, 0x0c, 0x84, 0x00, 0x8d, 0xda, 0x15, 0x0f, 0xd5, + 0x76, 0x2b, 0x81, 0x94, 0x7d, 0xa8, 0x54, 0xf5, 0x65, 0xb0, 0x27, 0xc1, 0x5a, 0x33, 0x63, 0x8d, + 0x07, 0x42, 0xfa, 0xd0, 0x91, 0x03, 0x53, 0x82, 0x4a, 0x6c, 0x64, 0xb3, 0xab, 0xe6, 0xb5, 0x3f, + 0xa0, 0xfd, 0x21, 0xfd, 0x8f, 0x6d, 0x35, 0xfe, 0x00, 0x92, 0x4d, 0x5f, 0x30, 0x73, 0xce, 0xb9, + 0xf7, 0x9e, 0x7b, 0x2f, 0x8c, 0xa1, 0xb1, 0xd2, 0x3a, 0xee, 0xad, 0xe3, 0x20, 0x4c, 0x82, 0xe9, + 0x7a, 0x11, 0x85, 0xdd, 0x55, 0x1c, 0xad, 0x23, 0x7c, 0x90, 0x3e, 0x92, 0xf6, 0x45, 0xca, 0xaf, + 0xe2, 0x68, 0x15, 0x25, 0xc1, 0x52, 0xc5, 0x3a, 0x59, 0x45, 0x61, 0xa2, 0x33, 0x55, 0xbb, 0x36, + 0x8d, 0x1e, 0x1e, 0xa2, 0xb0, 0x97, 0x3d, 0x32, 0xb0, 0xf3, 0x0b, 0x54, 0xfd, 0xc5, 0x3c, 0xd4, + 0x33, 0xb9, 0xcd, 0x8a, 0xbf, 0x87, 0xea, 0x4e, 0x11, 0x75, 0xf7, 0xb8, 0xd6, 0x49, 0xb3, 0xf4, + 0xa6, 0xf4, 0xb6, 0x22, 0xd0, 0x0e, 0xd1, 0x37, 0x38, 0xbe, 0x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xc7, 0x22, 0x92, 0x66, 0xd8, 0x91, 0x29, 0x93, + 0x1b, 0x18, 0x52, 0x26, 0x95, 0xc7, 0x5d, 0xc7, 0xba, 0x55, 0x57, 0xc4, 0x71, 0x8d, 0x51, 0xc0, + 0x0d, 0xc0, 0xc3, 0xb1, 0x65, 0x29, 0x41, 0x49, 0x66, 0xc4, 0x75, 0x2c, 0x89, 0xca, 0xa6, 0x37, + 0x6f, 0x40, 0x98, 0xe4, 0xc3, 0x67, 0x54, 0x05, 0xd7, 0xe0, 0x74, 0xc4, 0x3e, 0x30, 0x7e, 0xc3, + 0x8c, 0x2b, 0x79, 0xeb, 0x51, 0x74, 0x6c, 0xec, 0x4a, 0x22, 0xae, 0xa9, 0x54, 0xd6, 0x80, 0x38, + 0x4c, 0x31, 0x2e, 0xd5, 0x15, 0x1f, 0x31, 0x1b, 0x9d, 0xe0, 0x3a, 0xa0, 0x21, 0x11, 0xfe, 0x20, + 0x75, 0xaa, 0xa8, 0x10, 0x5c, 0xa0, 0xd3, 0x62, 0xee, 0x72, 0x92, 0xb7, 0x8c, 0x4c, 0x5b, 0x74, + 0xe2, 0x39, 0x82, 0xda, 0x59, 0x12, 0x8b, 0xdb, 0x14, 0x55, 0x4d, 0x0b, 0x9b, 0xa3, 0x1a, 0x53, + 0xe1, 0x3b, 0x9c, 0x6d, 0xfd, 0x60, 0xdc, 0x84, 0xba, 0x99, 0x46, 0xb6, 0x16, 0x45, 0x27, 0x92, + 0x32, 0x23, 0x41, 0x35, 0xd3, 0x5c, 0xba, 0xa0, 0x01, 0x61, 0x8c, 0xba, 0xc5, 0xe2, 0xea, 0x45, + 0x84, 0xa0, 0xbe, 0xc7, 0x99, 0x4f, 0x37, 0x93, 0x3d, 0xc3, 0xc7, 0x70, 0x94, 0x32, 0x37, 0x3e, + 0x95, 0xa8, 0x61, 0x9c, 0x3b, 0xae, 0x4b, 0xaf, 0x89, 0xab, 0x6e, 0x84, 0x23, 0xa9, 0x41, 0xcf, + 0x53, 0x34, 0x5f, 0xdd, 0x06, 0x6d, 0x1a, 0xf7, 0x9b, 0x85, 0x6e, 0xdc, 0xb7, 0x30, 0x86, 0x63, + 0x33, 0x8b, 0x94, 0x20, 0x92, 0xda, 0xe8, 0x9f, 0x12, 0x6e, 0x41, 0xbd, 0x90, 0x72, 0x39, 0xa0, + 0xc2, 0x8c, 0xd8, 0xe7, 0x0c, 0xfd, 0x5b, 0x7a, 0x47, 0xa1, 0x32, 0xd4, 0xeb, 0xc0, 0x0e, 0xd6, + 0xc1, 0x07, 0xfd, 0x98, 0x18, 0xab, 0x79, 0xa8, 0xe9, 0xda, 0x23, 0x82, 0x0c, 0xa9, 0xa4, 0x02, + 0xbd, 0xc2, 0x5f, 0xc1, 0xf9, 0x4b, 0x8c, 0x1a, 0x5f, 0xa2, 0x52, 0x7f, 0x0a, 0x9d, 0x28, 0x9e, + 0x77, 0xef, 0x1f, 0x57, 0x3a, 0x5e, 0xea, 0xd9, 0x5c, 0xc7, 0xdd, 0x5f, 0x83, 0xbb, 0x78, 0x31, + 0x2d, 0xfe, 0x2f, 0xe6, 0x6a, 0xef, 0xe3, 0x9d, 0x2b, 0xc8, 0x0b, 0xa6, 0xbf, 0x05, 0x73, 0xfd, + 0xf3, 0x77, 0xf3, 0xc5, 0xfa, 0xfe, 0xe3, 0x9d, 0xb9, 0x31, 0x7b, 0x3b, 0xe1, 0xbd, 0x2c, 0xbc, + 0x97, 0x85, 0xf7, 0x4c, 0xf8, 0x5d, 0xf6, 0x9e, 0x78, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x87, 0xb2, 0x02, 0x42, 0x48, 0x06, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/token/expectations.pb.go b/third_party/github.com/hyperledger/fabric/protos/token/expectations.pb.go deleted file mode 100644 index cf005905fb..0000000000 --- a/third_party/github.com/hyperledger/fabric/protos/token/expectations.pb.go +++ /dev/null @@ -1,357 +0,0 @@ -/* -Notice: This file has been modified for Hyperledger Fabric SDK Go usage. -Please review third_party pinning scripts and patches for more details. -*/ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: token/expectations.proto - -package token // import "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/token" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/golang/protobuf/ptypes/timestamp" - -// 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.ProtoPackageIsVersion2 // please upgrade the proto package - -// TokenExpectation represent the belief that someone should achieve in terms of a token action -type TokenExpectation struct { - // Types that are valid to be assigned to Expectation: - // *TokenExpectation_PlainExpectation - Expectation isTokenExpectation_Expectation `protobuf_oneof:"Expectation"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenExpectation) Reset() { *m = TokenExpectation{} } -func (m *TokenExpectation) String() string { return proto.CompactTextString(m) } -func (*TokenExpectation) ProtoMessage() {} -func (*TokenExpectation) Descriptor() ([]byte, []int) { - return fileDescriptor_expectations_8d8d9622f86de889, []int{0} -} -func (m *TokenExpectation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenExpectation.Unmarshal(m, b) -} -func (m *TokenExpectation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenExpectation.Marshal(b, m, deterministic) -} -func (dst *TokenExpectation) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenExpectation.Merge(dst, src) -} -func (m *TokenExpectation) XXX_Size() int { - return xxx_messageInfo_TokenExpectation.Size(m) -} -func (m *TokenExpectation) XXX_DiscardUnknown() { - xxx_messageInfo_TokenExpectation.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenExpectation proto.InternalMessageInfo - -type isTokenExpectation_Expectation interface { - isTokenExpectation_Expectation() -} - -type TokenExpectation_PlainExpectation struct { - PlainExpectation *PlainExpectation `protobuf:"bytes,1,opt,name=plain_expectation,json=plainExpectation,proto3,oneof"` -} - -func (*TokenExpectation_PlainExpectation) isTokenExpectation_Expectation() {} - -func (m *TokenExpectation) GetExpectation() isTokenExpectation_Expectation { - if m != nil { - return m.Expectation - } - return nil -} - -func (m *TokenExpectation) GetPlainExpectation() *PlainExpectation { - if x, ok := m.GetExpectation().(*TokenExpectation_PlainExpectation); ok { - return x.PlainExpectation - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TokenExpectation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _TokenExpectation_OneofMarshaler, _TokenExpectation_OneofUnmarshaler, _TokenExpectation_OneofSizer, []interface{}{ - (*TokenExpectation_PlainExpectation)(nil), - } -} - -func _TokenExpectation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TokenExpectation) - // Expectation - switch x := m.Expectation.(type) { - case *TokenExpectation_PlainExpectation: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainExpectation); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TokenExpectation.Expectation has unexpected type %T", x) - } - return nil -} - -func _TokenExpectation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TokenExpectation) - switch tag { - case 1: // Expectation.plain_expectation - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(PlainExpectation) - err := b.DecodeMessage(msg) - m.Expectation = &TokenExpectation_PlainExpectation{msg} - return true, err - default: - return false, nil - } -} - -func _TokenExpectation_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TokenExpectation) - // Expectation - switch x := m.Expectation.(type) { - case *TokenExpectation_PlainExpectation: - s := proto.Size(x.PlainExpectation) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// PlainExpectation represent the plain expectation where no confidentiality is provided. -type PlainExpectation struct { - // Types that are valid to be assigned to Payload: - // *PlainExpectation_ImportExpectation - // *PlainExpectation_TransferExpectation - Payload isPlainExpectation_Payload `protobuf_oneof:"payload"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PlainExpectation) Reset() { *m = PlainExpectation{} } -func (m *PlainExpectation) String() string { return proto.CompactTextString(m) } -func (*PlainExpectation) ProtoMessage() {} -func (*PlainExpectation) Descriptor() ([]byte, []int) { - return fileDescriptor_expectations_8d8d9622f86de889, []int{1} -} -func (m *PlainExpectation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainExpectation.Unmarshal(m, b) -} -func (m *PlainExpectation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainExpectation.Marshal(b, m, deterministic) -} -func (dst *PlainExpectation) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainExpectation.Merge(dst, src) -} -func (m *PlainExpectation) XXX_Size() int { - return xxx_messageInfo_PlainExpectation.Size(m) -} -func (m *PlainExpectation) XXX_DiscardUnknown() { - xxx_messageInfo_PlainExpectation.DiscardUnknown(m) -} - -var xxx_messageInfo_PlainExpectation proto.InternalMessageInfo - -type isPlainExpectation_Payload interface { - isPlainExpectation_Payload() -} - -type PlainExpectation_ImportExpectation struct { - ImportExpectation *PlainTokenExpectation `protobuf:"bytes,1,opt,name=import_expectation,json=importExpectation,proto3,oneof"` -} - -type PlainExpectation_TransferExpectation struct { - TransferExpectation *PlainTokenExpectation `protobuf:"bytes,2,opt,name=transfer_expectation,json=transferExpectation,proto3,oneof"` -} - -func (*PlainExpectation_ImportExpectation) isPlainExpectation_Payload() {} - -func (*PlainExpectation_TransferExpectation) isPlainExpectation_Payload() {} - -func (m *PlainExpectation) GetPayload() isPlainExpectation_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *PlainExpectation) GetImportExpectation() *PlainTokenExpectation { - if x, ok := m.GetPayload().(*PlainExpectation_ImportExpectation); ok { - return x.ImportExpectation - } - return nil -} - -func (m *PlainExpectation) GetTransferExpectation() *PlainTokenExpectation { - if x, ok := m.GetPayload().(*PlainExpectation_TransferExpectation); ok { - return x.TransferExpectation - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*PlainExpectation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _PlainExpectation_OneofMarshaler, _PlainExpectation_OneofUnmarshaler, _PlainExpectation_OneofSizer, []interface{}{ - (*PlainExpectation_ImportExpectation)(nil), - (*PlainExpectation_TransferExpectation)(nil), - } -} - -func _PlainExpectation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*PlainExpectation) - // payload - switch x := m.Payload.(type) { - case *PlainExpectation_ImportExpectation: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ImportExpectation); err != nil { - return err - } - case *PlainExpectation_TransferExpectation: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TransferExpectation); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("PlainExpectation.Payload has unexpected type %T", x) - } - return nil -} - -func _PlainExpectation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*PlainExpectation) - switch tag { - case 1: // payload.import_expectation - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(PlainTokenExpectation) - err := b.DecodeMessage(msg) - m.Payload = &PlainExpectation_ImportExpectation{msg} - return true, err - case 2: // payload.transfer_expectation - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(PlainTokenExpectation) - err := b.DecodeMessage(msg) - m.Payload = &PlainExpectation_TransferExpectation{msg} - return true, err - default: - return false, nil - } -} - -func _PlainExpectation_OneofSizer(msg proto.Message) (n int) { - m := msg.(*PlainExpectation) - // payload - switch x := m.Payload.(type) { - case *PlainExpectation_ImportExpectation: - s := proto.Size(x.ImportExpectation) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *PlainExpectation_TransferExpectation: - s := proto.Size(x.TransferExpectation) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// PlainTokenExpectation represents the expecation that -// certain outputs will be matched -type PlainTokenExpectation struct { - // Outputs contains the expected outputs - Outputs []*PlainOutput `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PlainTokenExpectation) Reset() { *m = PlainTokenExpectation{} } -func (m *PlainTokenExpectation) String() string { return proto.CompactTextString(m) } -func (*PlainTokenExpectation) ProtoMessage() {} -func (*PlainTokenExpectation) Descriptor() ([]byte, []int) { - return fileDescriptor_expectations_8d8d9622f86de889, []int{2} -} -func (m *PlainTokenExpectation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainTokenExpectation.Unmarshal(m, b) -} -func (m *PlainTokenExpectation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainTokenExpectation.Marshal(b, m, deterministic) -} -func (dst *PlainTokenExpectation) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTokenExpectation.Merge(dst, src) -} -func (m *PlainTokenExpectation) XXX_Size() int { - return xxx_messageInfo_PlainTokenExpectation.Size(m) -} -func (m *PlainTokenExpectation) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTokenExpectation.DiscardUnknown(m) -} - -var xxx_messageInfo_PlainTokenExpectation proto.InternalMessageInfo - -func (m *PlainTokenExpectation) GetOutputs() []*PlainOutput { - if m != nil { - return m.Outputs - } - return nil -} - -func init() { - proto.RegisterType((*TokenExpectation)(nil), "sdk.protos.TokenExpectation") - proto.RegisterType((*PlainExpectation)(nil), "sdk.protos.PlainExpectation") - proto.RegisterType((*PlainTokenExpectation)(nil), "sdk.protos.PlainTokenExpectation") -} - -func init() { - proto.RegisterFile("token/expectations.proto", fileDescriptor_expectations_8d8d9622f86de889) -} - -var fileDescriptor_expectations_8d8d9622f86de889 = []byte{ - // 296 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xdd, 0x4a, 0xfb, 0x30, - 0x14, 0x5f, 0xff, 0x7f, 0x70, 0x98, 0x2a, 0x74, 0x55, 0xb1, 0x0c, 0xc4, 0x51, 0x41, 0x86, 0x17, - 0x0d, 0xcc, 0x07, 0x10, 0x06, 0xe2, 0xae, 0xfc, 0x28, 0x5e, 0x79, 0x23, 0x69, 0x97, 0x76, 0xd1, - 0xb6, 0x27, 0x24, 0xa7, 0xe0, 0x1e, 0xcf, 0x37, 0x93, 0x26, 0x14, 0xb3, 0xb2, 0x0b, 0xaf, 0xc2, - 0x39, 0xbf, 0xaf, 0x73, 0x38, 0x21, 0x11, 0xc2, 0x27, 0x6f, 0x28, 0xff, 0x92, 0x3c, 0x47, 0x86, - 0x02, 0x1a, 0x9d, 0x48, 0x05, 0x08, 0xe1, 0x81, 0x79, 0xf4, 0xf4, 0xb2, 0x04, 0x28, 0x2b, 0x4e, - 0x4d, 0x99, 0xb5, 0x05, 0x45, 0x51, 0x73, 0x8d, 0xac, 0x96, 0x96, 0x38, 0x3d, 0xb7, 0x16, 0xa8, - 0x58, 0xa3, 0x59, 0xde, 0x59, 0x58, 0x20, 0xfe, 0x20, 0xc1, 0x6b, 0x07, 0xdd, 0xff, 0x9a, 0x87, - 0x0f, 0x64, 0x22, 0x2b, 0x26, 0x9a, 0x77, 0x27, 0x31, 0xf2, 0x66, 0xde, 0xdc, 0x5f, 0x44, 0x56, - 0xa6, 0x93, 0xe7, 0x8e, 0xe0, 0x88, 0x56, 0xa3, 0x34, 0x90, 0x83, 0xde, 0xf2, 0x98, 0xf8, 0x4e, - 0x19, 0x7f, 0x7b, 0x24, 0x18, 0xea, 0xc2, 0x47, 0x12, 0x8a, 0x5a, 0x82, 0xc2, 0x3d, 0x69, 0x17, - 0x3b, 0x69, 0xc3, 0x39, 0x57, 0xa3, 0x74, 0x62, 0xa5, 0xae, 0x5f, 0x4a, 0x4e, 0xcd, 0x96, 0x05, - 0x57, 0x3b, 0x8e, 0xff, 0xfe, 0xe6, 0x78, 0xd2, 0x8b, 0xdd, 0x3d, 0x0e, 0xc9, 0x58, 0xb2, 0x6d, - 0x05, 0x6c, 0x1d, 0xdf, 0x91, 0xb3, 0xbd, 0xd2, 0xf0, 0x9a, 0x8c, 0xa1, 0x45, 0xd9, 0xa2, 0x8e, - 0xbc, 0xd9, 0xff, 0xb9, 0xbf, 0x38, 0xb2, 0x19, 0x4f, 0xa6, 0x99, 0xf6, 0xe0, 0xf2, 0x85, 0x5c, - 0x81, 0x2a, 0x93, 0xcd, 0x56, 0x72, 0x55, 0xf1, 0x75, 0xc9, 0x55, 0x52, 0xb0, 0x4c, 0x89, 0xbc, - 0x9f, 0xcc, 0x5c, 0xea, 0xed, 0xa6, 0x14, 0xb8, 0x69, 0xb3, 0x24, 0x87, 0x9a, 0x3a, 0x5c, 0x6a, - 0xb9, 0xf6, 0xd0, 0x9a, 0x1a, 0x6e, 0x66, 0x7f, 0xc1, 0xed, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xfa, 0xd2, 0xe0, 0xe0, 0x28, 0x02, 0x00, 0x00, -} diff --git a/third_party/github.com/hyperledger/fabric/protos/token/operations.pb.go b/third_party/github.com/hyperledger/fabric/protos/token/operations.pb.go new file mode 100644 index 0000000000..c530b62b15 --- /dev/null +++ b/third_party/github.com/hyperledger/fabric/protos/token/operations.pb.go @@ -0,0 +1,361 @@ +/* +Notice: This file has been modified for Hyperledger Fabric SDK Go usage. +Please review third_party pinning scripts and patches for more details. +*/ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: token/operations.proto + +package token // import "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/token" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// 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.ProtoPackageIsVersion2 // please upgrade the proto package + +// TokenOperation describes a token operation +type TokenOperation struct { + // Types that are valid to be assigned to Operation: + // *TokenOperation_Action + Operation isTokenOperation_Operation `protobuf_oneof:"Operation"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TokenOperation) Reset() { *m = TokenOperation{} } +func (m *TokenOperation) String() string { return proto.CompactTextString(m) } +func (*TokenOperation) ProtoMessage() {} +func (*TokenOperation) Descriptor() ([]byte, []int) { + return fileDescriptor_operations_019bb882640dd787, []int{0} +} +func (m *TokenOperation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenOperation.Unmarshal(m, b) +} +func (m *TokenOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenOperation.Marshal(b, m, deterministic) +} +func (dst *TokenOperation) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenOperation.Merge(dst, src) +} +func (m *TokenOperation) XXX_Size() int { + return xxx_messageInfo_TokenOperation.Size(m) +} +func (m *TokenOperation) XXX_DiscardUnknown() { + xxx_messageInfo_TokenOperation.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenOperation proto.InternalMessageInfo + +type isTokenOperation_Operation interface { + isTokenOperation_Operation() +} + +type TokenOperation_Action struct { + Action *TokenOperationAction `protobuf:"bytes,1,opt,name=Action,proto3,oneof"` +} + +func (*TokenOperation_Action) isTokenOperation_Operation() {} + +func (m *TokenOperation) GetOperation() isTokenOperation_Operation { + if m != nil { + return m.Operation + } + return nil +} + +func (m *TokenOperation) GetAction() *TokenOperationAction { + if x, ok := m.GetOperation().(*TokenOperation_Action); ok { + return x.Action + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TokenOperation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TokenOperation_OneofMarshaler, _TokenOperation_OneofUnmarshaler, _TokenOperation_OneofSizer, []interface{}{ + (*TokenOperation_Action)(nil), + } +} + +func _TokenOperation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TokenOperation) + // Operation + switch x := m.Operation.(type) { + case *TokenOperation_Action: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Action); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TokenOperation.Operation has unexpected type %T", x) + } + return nil +} + +func _TokenOperation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TokenOperation) + switch tag { + case 1: // Operation.Action + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TokenOperationAction) + err := b.DecodeMessage(msg) + m.Operation = &TokenOperation_Action{msg} + return true, err + default: + return false, nil + } +} + +func _TokenOperation_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TokenOperation) + // Operation + switch x := m.Operation.(type) { + case *TokenOperation_Action: + s := proto.Size(x.Action) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// TokenOperationAction lists the available operations +type TokenOperationAction struct { + // Types that are valid to be assigned to Payload: + // *TokenOperationAction_Issue + // *TokenOperationAction_Transfer + Payload isTokenOperationAction_Payload `protobuf_oneof:"Payload"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TokenOperationAction) Reset() { *m = TokenOperationAction{} } +func (m *TokenOperationAction) String() string { return proto.CompactTextString(m) } +func (*TokenOperationAction) ProtoMessage() {} +func (*TokenOperationAction) Descriptor() ([]byte, []int) { + return fileDescriptor_operations_019bb882640dd787, []int{1} +} +func (m *TokenOperationAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenOperationAction.Unmarshal(m, b) +} +func (m *TokenOperationAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenOperationAction.Marshal(b, m, deterministic) +} +func (dst *TokenOperationAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenOperationAction.Merge(dst, src) +} +func (m *TokenOperationAction) XXX_Size() int { + return xxx_messageInfo_TokenOperationAction.Size(m) +} +func (m *TokenOperationAction) XXX_DiscardUnknown() { + xxx_messageInfo_TokenOperationAction.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenOperationAction proto.InternalMessageInfo + +type isTokenOperationAction_Payload interface { + isTokenOperationAction_Payload() +} + +type TokenOperationAction_Issue struct { + Issue *TokenActionTerms `protobuf:"bytes,1,opt,name=Issue,proto3,oneof"` +} + +type TokenOperationAction_Transfer struct { + Transfer *TokenActionTerms `protobuf:"bytes,2,opt,name=Transfer,proto3,oneof"` +} + +func (*TokenOperationAction_Issue) isTokenOperationAction_Payload() {} + +func (*TokenOperationAction_Transfer) isTokenOperationAction_Payload() {} + +func (m *TokenOperationAction) GetPayload() isTokenOperationAction_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *TokenOperationAction) GetIssue() *TokenActionTerms { + if x, ok := m.GetPayload().(*TokenOperationAction_Issue); ok { + return x.Issue + } + return nil +} + +func (m *TokenOperationAction) GetTransfer() *TokenActionTerms { + if x, ok := m.GetPayload().(*TokenOperationAction_Transfer); ok { + return x.Transfer + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TokenOperationAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TokenOperationAction_OneofMarshaler, _TokenOperationAction_OneofUnmarshaler, _TokenOperationAction_OneofSizer, []interface{}{ + (*TokenOperationAction_Issue)(nil), + (*TokenOperationAction_Transfer)(nil), + } +} + +func _TokenOperationAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TokenOperationAction) + // Payload + switch x := m.Payload.(type) { + case *TokenOperationAction_Issue: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Issue); err != nil { + return err + } + case *TokenOperationAction_Transfer: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Transfer); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TokenOperationAction.Payload has unexpected type %T", x) + } + return nil +} + +func _TokenOperationAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TokenOperationAction) + switch tag { + case 1: // Payload.Issue + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TokenActionTerms) + err := b.DecodeMessage(msg) + m.Payload = &TokenOperationAction_Issue{msg} + return true, err + case 2: // Payload.Transfer + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TokenActionTerms) + err := b.DecodeMessage(msg) + m.Payload = &TokenOperationAction_Transfer{msg} + return true, err + default: + return false, nil + } +} + +func _TokenOperationAction_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TokenOperationAction) + // Payload + switch x := m.Payload.(type) { + case *TokenOperationAction_Issue: + s := proto.Size(x.Issue) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *TokenOperationAction_Transfer: + s := proto.Size(x.Transfer) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// TokenActionTerms describes the expected sender and outputs of a token operation +type TokenActionTerms struct { + // Sender is the party who should perform the operation + Sender *TokenOwner `protobuf:"bytes,1,opt,name=Sender,proto3" json:"Sender,omitempty"` + // Outputs contains the expected outputs + Outputs []*Token `protobuf:"bytes,2,rep,name=Outputs,proto3" json:"Outputs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TokenActionTerms) Reset() { *m = TokenActionTerms{} } +func (m *TokenActionTerms) String() string { return proto.CompactTextString(m) } +func (*TokenActionTerms) ProtoMessage() {} +func (*TokenActionTerms) Descriptor() ([]byte, []int) { + return fileDescriptor_operations_019bb882640dd787, []int{2} +} +func (m *TokenActionTerms) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenActionTerms.Unmarshal(m, b) +} +func (m *TokenActionTerms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenActionTerms.Marshal(b, m, deterministic) +} +func (dst *TokenActionTerms) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenActionTerms.Merge(dst, src) +} +func (m *TokenActionTerms) XXX_Size() int { + return xxx_messageInfo_TokenActionTerms.Size(m) +} +func (m *TokenActionTerms) XXX_DiscardUnknown() { + xxx_messageInfo_TokenActionTerms.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenActionTerms proto.InternalMessageInfo + +func (m *TokenActionTerms) GetSender() *TokenOwner { + if m != nil { + return m.Sender + } + return nil +} + +func (m *TokenActionTerms) GetOutputs() []*Token { + if m != nil { + return m.Outputs + } + return nil +} + +func init() { + proto.RegisterType((*TokenOperation)(nil), "token.TokenOperation") + proto.RegisterType((*TokenOperationAction)(nil), "token.TokenOperationAction") + proto.RegisterType((*TokenActionTerms)(nil), "token.TokenActionTerms") +} + +func init() { proto.RegisterFile("token/operations.proto", fileDescriptor_operations_019bb882640dd787) } + +var fileDescriptor_operations_019bb882640dd787 = []byte{ + // 276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd0, 0x41, 0x4b, 0xc3, 0x30, + 0x14, 0x07, 0xf0, 0x6d, 0xb2, 0xcd, 0xbd, 0x8a, 0x68, 0x10, 0x57, 0xf4, 0x32, 0x2a, 0xc8, 0xf4, + 0x90, 0xc0, 0x64, 0x1f, 0xc0, 0x9e, 0xe6, 0x69, 0x5a, 0x7b, 0xf2, 0x96, 0xb6, 0x6f, 0x5d, 0x71, + 0x6b, 0xca, 0x4b, 0x8a, 0xec, 0x23, 0xf8, 0xad, 0xa5, 0x4d, 0x37, 0x3a, 0x11, 0x3c, 0x26, 0xff, + 0xdf, 0xff, 0xf1, 0x12, 0xb8, 0x36, 0xea, 0x13, 0x73, 0xa1, 0x0a, 0x24, 0x69, 0x32, 0x95, 0x6b, + 0x5e, 0x90, 0x32, 0x8a, 0xf5, 0xeb, 0xfb, 0x9b, 0xb1, 0x8d, 0x0d, 0xc9, 0x5c, 0xcb, 0xb8, 0x02, + 0x36, 0xf7, 0x42, 0x38, 0x0f, 0xab, 0x68, 0xb9, 0x2f, 0xb2, 0x39, 0x0c, 0x9e, 0x6b, 0xe1, 0x76, + 0x27, 0xdd, 0xa9, 0x33, 0xbb, 0xe5, 0x75, 0x97, 0x1f, 0x33, 0x4b, 0x16, 0x9d, 0xa0, 0xc1, 0xbe, + 0x03, 0xa3, 0x43, 0xe8, 0x7d, 0x77, 0xe1, 0xea, 0x2f, 0xcf, 0x04, 0xf4, 0x5f, 0xb4, 0x2e, 0xb1, + 0x99, 0x3d, 0x6e, 0xcf, 0xb6, 0x24, 0x44, 0xda, 0xea, 0x45, 0x27, 0xb0, 0x8e, 0xcd, 0xe1, 0x34, + 0xac, 0x96, 0x5e, 0x21, 0xb9, 0xbd, 0xff, 0x3a, 0x07, 0xea, 0x8f, 0x60, 0xf8, 0x2a, 0x77, 0x1b, + 0x25, 0x13, 0x0f, 0xe1, 0xe2, 0x37, 0x65, 0x0f, 0x30, 0x78, 0xc7, 0x3c, 0x41, 0x6a, 0xf6, 0xb8, + 0x3c, 0x7a, 0xe3, 0x57, 0x8e, 0x14, 0x34, 0x80, 0xdd, 0xc3, 0x70, 0x59, 0x9a, 0xa2, 0x34, 0xda, + 0xed, 0x4d, 0x4e, 0xa6, 0xce, 0xec, 0xac, 0x6d, 0x83, 0x7d, 0xe8, 0xbf, 0xc1, 0x9d, 0xa2, 0x94, + 0xaf, 0x77, 0x05, 0xd2, 0x06, 0x93, 0x14, 0x89, 0xaf, 0x64, 0x44, 0x59, 0x6c, 0x3f, 0x5a, 0xdb, + 0xd6, 0xc7, 0x63, 0x9a, 0x99, 0x75, 0x19, 0xf1, 0x58, 0x6d, 0x45, 0xcb, 0x0a, 0x6b, 0x85, 0xb5, + 0xa2, 0xb6, 0xd1, 0xa0, 0x3e, 0x3d, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xfc, 0xf1, 0x11, + 0xdc, 0x01, 0x00, 0x00, +} diff --git a/third_party/github.com/hyperledger/fabric/protos/token/prover.pb.go b/third_party/github.com/hyperledger/fabric/protos/token/prover.pb.go index 0171964617..0e24cd23ac 100644 --- a/third_party/github.com/hyperledger/fabric/protos/token/prover.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/token/prover.pb.go @@ -28,314 +28,166 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -// TokenToIssue describes a token to be issued in the system -type TokenToIssue struct { - // Recipient refers to the owner of the token to be issued - Recipient []byte `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` - // Type refers to the token type - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Quantity refers to the number of token units to be issued - Quantity uint64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` +// IssueRequest is used to request token issuance +type IssueRequest struct { + // Credential contains information about the party who is requesting the operation + // the content of this field depends on the charateristic of the token manager system used. + Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + // TokensToIssue contains the information about the tokens to be issued + TokensToIssue []*Token `protobuf:"bytes,2,rep,name=tokens_to_issue,json=tokensToIssue,proto3" json:"tokens_to_issue,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *TokenToIssue) Reset() { *m = TokenToIssue{} } -func (m *TokenToIssue) String() string { return proto.CompactTextString(m) } -func (*TokenToIssue) ProtoMessage() {} -func (*TokenToIssue) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{0} +func (m *IssueRequest) Reset() { *m = IssueRequest{} } +func (m *IssueRequest) String() string { return proto.CompactTextString(m) } +func (*IssueRequest) ProtoMessage() {} +func (*IssueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{0} } -func (m *TokenToIssue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenToIssue.Unmarshal(m, b) +func (m *IssueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IssueRequest.Unmarshal(m, b) } -func (m *TokenToIssue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenToIssue.Marshal(b, m, deterministic) +func (m *IssueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IssueRequest.Marshal(b, m, deterministic) } -func (dst *TokenToIssue) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenToIssue.Merge(dst, src) +func (dst *IssueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IssueRequest.Merge(dst, src) } -func (m *TokenToIssue) XXX_Size() int { - return xxx_messageInfo_TokenToIssue.Size(m) +func (m *IssueRequest) XXX_Size() int { + return xxx_messageInfo_IssueRequest.Size(m) } -func (m *TokenToIssue) XXX_DiscardUnknown() { - xxx_messageInfo_TokenToIssue.DiscardUnknown(m) +func (m *IssueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IssueRequest.DiscardUnknown(m) } -var xxx_messageInfo_TokenToIssue proto.InternalMessageInfo +var xxx_messageInfo_IssueRequest proto.InternalMessageInfo -func (m *TokenToIssue) GetRecipient() []byte { +func (m *IssueRequest) GetCredential() []byte { if m != nil { - return m.Recipient + return m.Credential } return nil } -func (m *TokenToIssue) GetType() string { +func (m *IssueRequest) GetTokensToIssue() []*Token { if m != nil { - return m.Type - } - return "" -} - -func (m *TokenToIssue) GetQuantity() uint64 { - if m != nil { - return m.Quantity + return m.TokensToIssue } - return 0 + return nil } -// RecipientTransferShare describes how much a recipient will receive in a token transfer -type RecipientTransferShare struct { +// RecipientShare describes how much a recipient will receive in a token transfer +type RecipientShare struct { // Recipient refers to the prospective owner of a transferred token - Recipient []byte `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` - // Quantity refers to the number of token units to be transferred to the recipient - Quantity uint64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` + Recipient *TokenOwner `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Quantity refers to the number of token units to be transferred to the recipient. + // It is encoded as a string whose prefix determines the actual conversion base. A prefix of + // ``0x'' or ``0X'' selects base 16; the ``0'' prefix selects base 8, and a + // ``0b'' or ``0B'' prefix selects base 2. Otherwise the selected base is 10. + Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *RecipientTransferShare) Reset() { *m = RecipientTransferShare{} } -func (m *RecipientTransferShare) String() string { return proto.CompactTextString(m) } -func (*RecipientTransferShare) ProtoMessage() {} -func (*RecipientTransferShare) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{1} +func (m *RecipientShare) Reset() { *m = RecipientShare{} } +func (m *RecipientShare) String() string { return proto.CompactTextString(m) } +func (*RecipientShare) ProtoMessage() {} +func (*RecipientShare) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{1} } -func (m *RecipientTransferShare) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RecipientTransferShare.Unmarshal(m, b) +func (m *RecipientShare) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RecipientShare.Unmarshal(m, b) } -func (m *RecipientTransferShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RecipientTransferShare.Marshal(b, m, deterministic) +func (m *RecipientShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RecipientShare.Marshal(b, m, deterministic) } -func (dst *RecipientTransferShare) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecipientTransferShare.Merge(dst, src) +func (dst *RecipientShare) XXX_Merge(src proto.Message) { + xxx_messageInfo_RecipientShare.Merge(dst, src) } -func (m *RecipientTransferShare) XXX_Size() int { - return xxx_messageInfo_RecipientTransferShare.Size(m) +func (m *RecipientShare) XXX_Size() int { + return xxx_messageInfo_RecipientShare.Size(m) } -func (m *RecipientTransferShare) XXX_DiscardUnknown() { - xxx_messageInfo_RecipientTransferShare.DiscardUnknown(m) +func (m *RecipientShare) XXX_DiscardUnknown() { + xxx_messageInfo_RecipientShare.DiscardUnknown(m) } -var xxx_messageInfo_RecipientTransferShare proto.InternalMessageInfo +var xxx_messageInfo_RecipientShare proto.InternalMessageInfo -func (m *RecipientTransferShare) GetRecipient() []byte { +func (m *RecipientShare) GetRecipient() *TokenOwner { if m != nil { return m.Recipient } return nil } -func (m *RecipientTransferShare) GetQuantity() uint64 { +func (m *RecipientShare) GetQuantity() string { if m != nil { return m.Quantity } - return 0 -} - -// TokenOutput is used to specify a token returned by ListRequest -type TokenOutput struct { - // ID is used to uniquely identify the token - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Type is the type of the token - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Quantity represents the number for this type of token - Quantity uint64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenOutput) Reset() { *m = TokenOutput{} } -func (m *TokenOutput) String() string { return proto.CompactTextString(m) } -func (*TokenOutput) ProtoMessage() {} -func (*TokenOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{2} -} -func (m *TokenOutput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenOutput.Unmarshal(m, b) -} -func (m *TokenOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenOutput.Marshal(b, m, deterministic) -} -func (dst *TokenOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenOutput.Merge(dst, src) -} -func (m *TokenOutput) XXX_Size() int { - return xxx_messageInfo_TokenOutput.Size(m) -} -func (m *TokenOutput) XXX_DiscardUnknown() { - xxx_messageInfo_TokenOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenOutput proto.InternalMessageInfo - -func (m *TokenOutput) GetId() []byte { - if m != nil { - return m.Id - } - return nil -} - -func (m *TokenOutput) GetType() string { - if m != nil { - return m.Type - } return "" } -func (m *TokenOutput) GetQuantity() uint64 { - if m != nil { - return m.Quantity - } - return 0 -} - -// UnspentTokens is used to hold the output of listRequest -type UnspentTokens struct { - Tokens []*TokenOutput `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// TokenTransactions is a container for token transactions +type TokenTransactions struct { + Txs []*TokenTransaction `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UnspentTokens) Reset() { *m = UnspentTokens{} } -func (m *UnspentTokens) String() string { return proto.CompactTextString(m) } -func (*UnspentTokens) ProtoMessage() {} -func (*UnspentTokens) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{3} +func (m *TokenTransactions) Reset() { *m = TokenTransactions{} } +func (m *TokenTransactions) String() string { return proto.CompactTextString(m) } +func (*TokenTransactions) ProtoMessage() {} +func (*TokenTransactions) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{2} } -func (m *UnspentTokens) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UnspentTokens.Unmarshal(m, b) +func (m *TokenTransactions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenTransactions.Unmarshal(m, b) } -func (m *UnspentTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UnspentTokens.Marshal(b, m, deterministic) +func (m *TokenTransactions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenTransactions.Marshal(b, m, deterministic) } -func (dst *UnspentTokens) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnspentTokens.Merge(dst, src) +func (dst *TokenTransactions) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenTransactions.Merge(dst, src) } -func (m *UnspentTokens) XXX_Size() int { - return xxx_messageInfo_UnspentTokens.Size(m) +func (m *TokenTransactions) XXX_Size() int { + return xxx_messageInfo_TokenTransactions.Size(m) } -func (m *UnspentTokens) XXX_DiscardUnknown() { - xxx_messageInfo_UnspentTokens.DiscardUnknown(m) +func (m *TokenTransactions) XXX_DiscardUnknown() { + xxx_messageInfo_TokenTransactions.DiscardUnknown(m) } -var xxx_messageInfo_UnspentTokens proto.InternalMessageInfo +var xxx_messageInfo_TokenTransactions proto.InternalMessageInfo -func (m *UnspentTokens) GetTokens() []*TokenOutput { +func (m *TokenTransactions) GetTxs() []*TokenTransaction { if m != nil { - return m.Tokens + return m.Txs } return nil } -// ListRequest is used to request a list of unspent tokens -type ListRequest struct { - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListRequest) Reset() { *m = ListRequest{} } -func (m *ListRequest) String() string { return proto.CompactTextString(m) } -func (*ListRequest) ProtoMessage() {} -func (*ListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{4} -} -func (m *ListRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListRequest.Unmarshal(m, b) -} -func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) -} -func (dst *ListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListRequest.Merge(dst, src) -} -func (m *ListRequest) XXX_Size() int { - return xxx_messageInfo_ListRequest.Size(m) -} -func (m *ListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListRequest proto.InternalMessageInfo - -func (m *ListRequest) GetCredential() []byte { - if m != nil { - return m.Credential - } - return nil -} - -// ImportRequest is used to request creation of imports -type ImportRequest struct { - // Credential contains information about the party who is requesting the operation - // the content of this field depends on the charateristic of the token manager system used. - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - // TokenToIssue contains the information about the tokens to be issued - TokensToIssue []*TokenToIssue `protobuf:"bytes,2,rep,name=tokens_to_issue,json=tokensToIssue,proto3" json:"tokens_to_issue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ImportRequest) Reset() { *m = ImportRequest{} } -func (m *ImportRequest) String() string { return proto.CompactTextString(m) } -func (*ImportRequest) ProtoMessage() {} -func (*ImportRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{5} -} -func (m *ImportRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ImportRequest.Unmarshal(m, b) -} -func (m *ImportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ImportRequest.Marshal(b, m, deterministic) -} -func (dst *ImportRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportRequest.Merge(dst, src) -} -func (m *ImportRequest) XXX_Size() int { - return xxx_messageInfo_ImportRequest.Size(m) -} -func (m *ImportRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ImportRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportRequest proto.InternalMessageInfo - -func (m *ImportRequest) GetCredential() []byte { - if m != nil { - return m.Credential - } - return nil -} - -func (m *ImportRequest) GetTokensToIssue() []*TokenToIssue { - if m != nil { - return m.TokensToIssue - } - return nil -} - -// RequestTransfer is used to request creation of transfers +// TransferRequest is used to request token transfers type TransferRequest struct { - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - TokenIds [][]byte `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` - Shares []*RecipientTransferShare `protobuf:"bytes,3,rep,name=shares,proto3" json:"shares,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Credential is the public credential of the requestor of the transfer + // The content of this field depends on the characteristic of token manager system + Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + // TokenIds identifies the tokens to be transferred + TokenIds []*TokenId `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` + // Shares identify the prospective recipients and the quantity of tokens that each would receive + Shares []*RecipientShare `protobuf:"bytes,3,rep,name=shares,proto3" json:"shares,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TransferRequest) Reset() { *m = TransferRequest{} } func (m *TransferRequest) String() string { return proto.CompactTextString(m) } func (*TransferRequest) ProtoMessage() {} func (*TransferRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{6} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{3} } func (m *TransferRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferRequest.Unmarshal(m, b) @@ -362,14 +214,14 @@ func (m *TransferRequest) GetCredential() []byte { return nil } -func (m *TransferRequest) GetTokenIds() [][]byte { +func (m *TransferRequest) GetTokenIds() []*TokenId { if m != nil { return m.TokenIds } return nil } -func (m *TransferRequest) GetShares() []*RecipientTransferShare { +func (m *TransferRequest) GetShares() []*RecipientShare { if m != nil { return m.Shares } @@ -378,13 +230,16 @@ func (m *TransferRequest) GetShares() []*RecipientTransferShare { // RedeemRequest is used to request token redemption type RedeemRequest struct { - // Credential contains information for the party who is requesting the operation + // Credential is the public credential of the requestor of the redemption // The content of this field depends on the characteristic of token manager system Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - // token_ids specifies the ids for the tokens that will be redeemed - TokenIds [][]byte `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` - // quantity refers to the number of units of a given token needs to be redeemed. - QuantityToRedeem uint64 `protobuf:"varint,3,opt,name=quantity_to_redeem,json=quantityToRedeem,proto3" json:"quantity_to_redeem,omitempty"` + // TokenIds identifies the tokens to be redeemed + TokenIds []*TokenId `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` + // Quantity refers to the number of units of a given token needs to be redeemed. + // It is encoded as a string whose prefix determines the actual conversion base. A prefix of + // ``0x'' or ``0X'' selects base 16; the ``0'' prefix selects base 8, and a + // ``0b'' or ``0B'' prefix selects base 2. Otherwise the selected base is 10. + Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -394,7 +249,7 @@ func (m *RedeemRequest) Reset() { *m = RedeemRequest{} } func (m *RedeemRequest) String() string { return proto.CompactTextString(m) } func (*RedeemRequest) ProtoMessage() {} func (*RedeemRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{7} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{4} } func (m *RedeemRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RedeemRequest.Unmarshal(m, b) @@ -421,180 +276,215 @@ func (m *RedeemRequest) GetCredential() []byte { return nil } -func (m *RedeemRequest) GetTokenIds() [][]byte { +func (m *RedeemRequest) GetTokenIds() []*TokenId { if m != nil { return m.TokenIds } return nil } -func (m *RedeemRequest) GetQuantityToRedeem() uint64 { +func (m *RedeemRequest) GetQuantity() string { if m != nil { - return m.QuantityToRedeem + return m.Quantity } - return 0 + return "" } -// ALlowance defines how many and what tokens a recipient can transfer on behalf of their actual owner -type AllowanceRecipientShare struct { - // Recipient refers to the entity allowed to spend the specified quantity from the tokens identified by token IDs - Recipient []byte `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` - // Quantity is how many tokens are delegated to the recipient - Quantity uint64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` +// UnspentToken is used to specify a token returned by ListRequest +type UnspentToken struct { + // Id is used to uniquely identify the token in the ledger + Id *TokenId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Type is the type of the token + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // Quantity represents the number of units of Type that this unspent token holds. + // It is formatted in decimal representation + Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *AllowanceRecipientShare) Reset() { *m = AllowanceRecipientShare{} } -func (m *AllowanceRecipientShare) String() string { return proto.CompactTextString(m) } -func (*AllowanceRecipientShare) ProtoMessage() {} -func (*AllowanceRecipientShare) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{8} +func (m *UnspentToken) Reset() { *m = UnspentToken{} } +func (m *UnspentToken) String() string { return proto.CompactTextString(m) } +func (*UnspentToken) ProtoMessage() {} +func (*UnspentToken) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{5} } -func (m *AllowanceRecipientShare) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AllowanceRecipientShare.Unmarshal(m, b) +func (m *UnspentToken) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnspentToken.Unmarshal(m, b) } -func (m *AllowanceRecipientShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AllowanceRecipientShare.Marshal(b, m, deterministic) +func (m *UnspentToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnspentToken.Marshal(b, m, deterministic) } -func (dst *AllowanceRecipientShare) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllowanceRecipientShare.Merge(dst, src) +func (dst *UnspentToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnspentToken.Merge(dst, src) } -func (m *AllowanceRecipientShare) XXX_Size() int { - return xxx_messageInfo_AllowanceRecipientShare.Size(m) +func (m *UnspentToken) XXX_Size() int { + return xxx_messageInfo_UnspentToken.Size(m) } -func (m *AllowanceRecipientShare) XXX_DiscardUnknown() { - xxx_messageInfo_AllowanceRecipientShare.DiscardUnknown(m) +func (m *UnspentToken) XXX_DiscardUnknown() { + xxx_messageInfo_UnspentToken.DiscardUnknown(m) } -var xxx_messageInfo_AllowanceRecipientShare proto.InternalMessageInfo +var xxx_messageInfo_UnspentToken proto.InternalMessageInfo -func (m *AllowanceRecipientShare) GetRecipient() []byte { +func (m *UnspentToken) GetId() *TokenId { if m != nil { - return m.Recipient + return m.Id } return nil } -func (m *AllowanceRecipientShare) GetQuantity() uint64 { +func (m *UnspentToken) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *UnspentToken) GetQuantity() string { if m != nil { return m.Quantity } - return 0 + return "" } -// ApproveRequest is used to request the creation of allowance from one owner to another -type ApproveRequest struct { - // Credential refers to the public credential of the request creator - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - // Allowance describes the tokens the creator of the request is willing to delegate - AllowanceShares []*AllowanceRecipientShare `protobuf:"bytes,2,rep,name=allowance_shares,json=allowanceShares,proto3" json:"allowance_shares,omitempty"` - // TokenIds are the token identifiers used to create the allowance - TokenIds [][]byte `protobuf:"bytes,3,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// UnspentTokens is used to hold the output of ListRequest +type UnspentTokens struct { + // Tokens is an array of UnspentToken + Tokens []*UnspentToken `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ApproveRequest) Reset() { *m = ApproveRequest{} } -func (m *ApproveRequest) String() string { return proto.CompactTextString(m) } -func (*ApproveRequest) ProtoMessage() {} -func (*ApproveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{9} +func (m *UnspentTokens) Reset() { *m = UnspentTokens{} } +func (m *UnspentTokens) String() string { return proto.CompactTextString(m) } +func (*UnspentTokens) ProtoMessage() {} +func (*UnspentTokens) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{6} } -func (m *ApproveRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApproveRequest.Unmarshal(m, b) +func (m *UnspentTokens) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnspentTokens.Unmarshal(m, b) } -func (m *ApproveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApproveRequest.Marshal(b, m, deterministic) +func (m *UnspentTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnspentTokens.Marshal(b, m, deterministic) } -func (dst *ApproveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApproveRequest.Merge(dst, src) +func (dst *UnspentTokens) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnspentTokens.Merge(dst, src) } -func (m *ApproveRequest) XXX_Size() int { - return xxx_messageInfo_ApproveRequest.Size(m) +func (m *UnspentTokens) XXX_Size() int { + return xxx_messageInfo_UnspentTokens.Size(m) } -func (m *ApproveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ApproveRequest.DiscardUnknown(m) +func (m *UnspentTokens) XXX_DiscardUnknown() { + xxx_messageInfo_UnspentTokens.DiscardUnknown(m) } -var xxx_messageInfo_ApproveRequest proto.InternalMessageInfo +var xxx_messageInfo_UnspentTokens proto.InternalMessageInfo -func (m *ApproveRequest) GetCredential() []byte { +func (m *UnspentTokens) GetTokens() []*UnspentToken { if m != nil { - return m.Credential + return m.Tokens } return nil } -func (m *ApproveRequest) GetAllowanceShares() []*AllowanceRecipientShare { - if m != nil { - return m.AllowanceShares - } - return nil +// ListRequest is used to retrieve the unspent tokens belonging to the party holding Credential +type ListRequest struct { + // Credential refers to the public credential of the party whose unspent tokens is to be listed + Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListRequest) Reset() { *m = ListRequest{} } +func (m *ListRequest) String() string { return proto.CompactTextString(m) } +func (*ListRequest) ProtoMessage() {} +func (*ListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{7} +} +func (m *ListRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListRequest.Unmarshal(m, b) +} +func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) +} +func (dst *ListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListRequest.Merge(dst, src) +} +func (m *ListRequest) XXX_Size() int { + return xxx_messageInfo_ListRequest.Size(m) +} +func (m *ListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListRequest.DiscardUnknown(m) } -func (m *ApproveRequest) GetTokenIds() [][]byte { +var xxx_messageInfo_ListRequest proto.InternalMessageInfo + +func (m *ListRequest) GetCredential() []byte { if m != nil { - return m.TokenIds + return m.Credential } return nil } -// ExpectationRequest is used to request indirect token import or transfer based on the token expectation -type ExpectationRequest struct { +// TokenOperationRequest is used to ask the prover peer to perform a specific +// token operation using given token ids. In this way, the prover peer can assemble +// token transactions as requested by a chaincode. +type TokenOperationRequest struct { // credential contains information for the party who is requesting the operation // The content of this field depends on the characteristic of token manager system Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - // expectation contains the expected outputs for token import or transfer - Expectation *TokenExpectation `protobuf:"bytes,2,opt,name=expectation,proto3" json:"expectation,omitempty"` - // TokenIds are the token identifiers used to fulfill the expectation - TokenIds [][]byte `protobuf:"bytes,3,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // operations contains the token operations to be performed + Operations []*TokenOperation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + // TokenIds are the token identifiers used for the operation. It is empty, + // in the case of an issue. It must not be empty for operations like transfer or redeem. + TokenIds []*TokenId `protobuf:"bytes,3,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ExpectationRequest) Reset() { *m = ExpectationRequest{} } -func (m *ExpectationRequest) String() string { return proto.CompactTextString(m) } -func (*ExpectationRequest) ProtoMessage() {} -func (*ExpectationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{10} +func (m *TokenOperationRequest) Reset() { *m = TokenOperationRequest{} } +func (m *TokenOperationRequest) String() string { return proto.CompactTextString(m) } +func (*TokenOperationRequest) ProtoMessage() {} +func (*TokenOperationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{8} } -func (m *ExpectationRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ExpectationRequest.Unmarshal(m, b) +func (m *TokenOperationRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenOperationRequest.Unmarshal(m, b) } -func (m *ExpectationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ExpectationRequest.Marshal(b, m, deterministic) +func (m *TokenOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenOperationRequest.Marshal(b, m, deterministic) } -func (dst *ExpectationRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExpectationRequest.Merge(dst, src) +func (dst *TokenOperationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenOperationRequest.Merge(dst, src) } -func (m *ExpectationRequest) XXX_Size() int { - return xxx_messageInfo_ExpectationRequest.Size(m) +func (m *TokenOperationRequest) XXX_Size() int { + return xxx_messageInfo_TokenOperationRequest.Size(m) } -func (m *ExpectationRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExpectationRequest.DiscardUnknown(m) +func (m *TokenOperationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TokenOperationRequest.DiscardUnknown(m) } -var xxx_messageInfo_ExpectationRequest proto.InternalMessageInfo +var xxx_messageInfo_TokenOperationRequest proto.InternalMessageInfo -func (m *ExpectationRequest) GetCredential() []byte { +func (m *TokenOperationRequest) GetCredential() []byte { if m != nil { return m.Credential } return nil } -func (m *ExpectationRequest) GetExpectation() *TokenExpectation { +func (m *TokenOperationRequest) GetOperations() []*TokenOperation { if m != nil { - return m.Expectation + return m.Operations } return nil } -func (m *ExpectationRequest) GetTokenIds() [][]byte { +func (m *TokenOperationRequest) GetTokenIds() []*TokenId { if m != nil { return m.TokenIds } @@ -606,14 +496,17 @@ type Header struct { // Timestamp is the local time when the message was created // by the sender Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // ChannelId identifies the channel this message is bound for + // ChannelId identifies the channel this message is meant for ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Nonce is a sufficientley long random value // used to ensure the request has enough entropy. Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` // Creator of the message. // Typically, a marshaled msp.SerializedIdentity - Creator []byte `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` + Creator []byte `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` + // TlsCertHash represents the hash of the client's TLS certificate + // when mutual TLS is enabled + TlsCertHash []byte `protobuf:"bytes,5,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -623,7 +516,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{11} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{9} } func (m *Header) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Header.Unmarshal(m, b) @@ -671,6 +564,13 @@ func (m *Header) GetCreator() []byte { return nil } +func (m *Header) GetTlsCertHash() []byte { + if m != nil { + return m.TlsCertHash + } + return nil +} + // Command describes the type of operation that a client is requesting. type Command struct { // Header is the header of this command @@ -678,13 +578,11 @@ type Command struct { // Payload is the payload of this command. It can assume one of the following value // // Types that are valid to be assigned to Payload: - // *Command_ImportRequest + // *Command_IssueRequest // *Command_TransferRequest // *Command_ListRequest // *Command_RedeemRequest - // *Command_ApproveRequest - // *Command_TransferFromRequest - // *Command_ExpectationRequest + // *Command_TokenOperationRequest Payload isCommand_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -695,7 +593,7 @@ func (m *Command) Reset() { *m = Command{} } func (m *Command) String() string { return proto.CompactTextString(m) } func (*Command) ProtoMessage() {} func (*Command) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{12} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{10} } func (m *Command) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Command.Unmarshal(m, b) @@ -726,8 +624,8 @@ type isCommand_Payload interface { isCommand_Payload() } -type Command_ImportRequest struct { - ImportRequest *ImportRequest `protobuf:"bytes,2,opt,name=import_request,json=importRequest,proto3,oneof"` +type Command_IssueRequest struct { + IssueRequest *IssueRequest `protobuf:"bytes,2,opt,name=issue_request,json=issueRequest,proto3,oneof"` } type Command_TransferRequest struct { @@ -742,19 +640,11 @@ type Command_RedeemRequest struct { RedeemRequest *RedeemRequest `protobuf:"bytes,5,opt,name=redeem_request,json=redeemRequest,proto3,oneof"` } -type Command_ApproveRequest struct { - ApproveRequest *ApproveRequest `protobuf:"bytes,6,opt,name=approve_request,json=approveRequest,proto3,oneof"` -} - -type Command_TransferFromRequest struct { - TransferFromRequest *TransferRequest `protobuf:"bytes,7,opt,name=transfer_from_request,json=transferFromRequest,proto3,oneof"` -} - -type Command_ExpectationRequest struct { - ExpectationRequest *ExpectationRequest `protobuf:"bytes,8,opt,name=expectation_request,json=expectationRequest,proto3,oneof"` +type Command_TokenOperationRequest struct { + TokenOperationRequest *TokenOperationRequest `protobuf:"bytes,6,opt,name=token_operation_request,json=tokenOperationRequest,proto3,oneof"` } -func (*Command_ImportRequest) isCommand_Payload() {} +func (*Command_IssueRequest) isCommand_Payload() {} func (*Command_TransferRequest) isCommand_Payload() {} @@ -762,11 +652,7 @@ func (*Command_ListRequest) isCommand_Payload() {} func (*Command_RedeemRequest) isCommand_Payload() {} -func (*Command_ApproveRequest) isCommand_Payload() {} - -func (*Command_TransferFromRequest) isCommand_Payload() {} - -func (*Command_ExpectationRequest) isCommand_Payload() {} +func (*Command_TokenOperationRequest) isCommand_Payload() {} func (m *Command) GetPayload() isCommand_Payload { if m != nil { @@ -775,9 +661,9 @@ func (m *Command) GetPayload() isCommand_Payload { return nil } -func (m *Command) GetImportRequest() *ImportRequest { - if x, ok := m.GetPayload().(*Command_ImportRequest); ok { - return x.ImportRequest +func (m *Command) GetIssueRequest() *IssueRequest { + if x, ok := m.GetPayload().(*Command_IssueRequest); ok { + return x.IssueRequest } return nil } @@ -803,23 +689,9 @@ func (m *Command) GetRedeemRequest() *RedeemRequest { return nil } -func (m *Command) GetApproveRequest() *ApproveRequest { - if x, ok := m.GetPayload().(*Command_ApproveRequest); ok { - return x.ApproveRequest - } - return nil -} - -func (m *Command) GetTransferFromRequest() *TransferRequest { - if x, ok := m.GetPayload().(*Command_TransferFromRequest); ok { - return x.TransferFromRequest - } - return nil -} - -func (m *Command) GetExpectationRequest() *ExpectationRequest { - if x, ok := m.GetPayload().(*Command_ExpectationRequest); ok { - return x.ExpectationRequest +func (m *Command) GetTokenOperationRequest() *TokenOperationRequest { + if x, ok := m.GetPayload().(*Command_TokenOperationRequest); ok { + return x.TokenOperationRequest } return nil } @@ -827,13 +699,11 @@ func (m *Command) GetExpectationRequest() *ExpectationRequest { // XXX_OneofFuncs is for the internal use of the proto package. func (*Command) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _Command_OneofMarshaler, _Command_OneofUnmarshaler, _Command_OneofSizer, []interface{}{ - (*Command_ImportRequest)(nil), + (*Command_IssueRequest)(nil), (*Command_TransferRequest)(nil), (*Command_ListRequest)(nil), (*Command_RedeemRequest)(nil), - (*Command_ApproveRequest)(nil), - (*Command_TransferFromRequest)(nil), - (*Command_ExpectationRequest)(nil), + (*Command_TokenOperationRequest)(nil), } } @@ -841,9 +711,9 @@ func _Command_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*Command) // payload switch x := m.Payload.(type) { - case *Command_ImportRequest: + case *Command_IssueRequest: b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ImportRequest); err != nil { + if err := b.EncodeMessage(x.IssueRequest); err != nil { return err } case *Command_TransferRequest: @@ -861,19 +731,9 @@ func _Command_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.RedeemRequest); err != nil { return err } - case *Command_ApproveRequest: + case *Command_TokenOperationRequest: b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ApproveRequest); err != nil { - return err - } - case *Command_TransferFromRequest: - b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TransferFromRequest); err != nil { - return err - } - case *Command_ExpectationRequest: - b.EncodeVarint(8<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ExpectationRequest); err != nil { + if err := b.EncodeMessage(x.TokenOperationRequest); err != nil { return err } case nil: @@ -886,13 +746,13 @@ func _Command_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { func _Command_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*Command) switch tag { - case 2: // payload.import_request + case 2: // payload.issue_request if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(ImportRequest) + msg := new(IssueRequest) err := b.DecodeMessage(msg) - m.Payload = &Command_ImportRequest{msg} + m.Payload = &Command_IssueRequest{msg} return true, err case 3: // payload.transfer_request if wire != proto.WireBytes { @@ -918,29 +778,13 @@ func _Command_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer err := b.DecodeMessage(msg) m.Payload = &Command_RedeemRequest{msg} return true, err - case 6: // payload.approve_request + case 6: // payload.token_operation_request if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(ApproveRequest) + msg := new(TokenOperationRequest) err := b.DecodeMessage(msg) - m.Payload = &Command_ApproveRequest{msg} - return true, err - case 7: // payload.transfer_from_request - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TransferRequest) - err := b.DecodeMessage(msg) - m.Payload = &Command_TransferFromRequest{msg} - return true, err - case 8: // payload.expectation_request - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ExpectationRequest) - err := b.DecodeMessage(msg) - m.Payload = &Command_ExpectationRequest{msg} + m.Payload = &Command_TokenOperationRequest{msg} return true, err default: return false, nil @@ -951,8 +795,8 @@ func _Command_OneofSizer(msg proto.Message) (n int) { m := msg.(*Command) // payload switch x := m.Payload.(type) { - case *Command_ImportRequest: - s := proto.Size(x.ImportRequest) + case *Command_IssueRequest: + s := proto.Size(x.IssueRequest) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s @@ -971,18 +815,8 @@ func _Command_OneofSizer(msg proto.Message) (n int) { n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s - case *Command_ApproveRequest: - s := proto.Size(x.ApproveRequest) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Command_TransferFromRequest: - s := proto.Size(x.TransferFromRequest) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Command_ExpectationRequest: - s := proto.Size(x.ExpectationRequest) + case *Command_TokenOperationRequest: + s := proto.Size(x.TokenOperationRequest) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s @@ -1008,7 +842,7 @@ func (m *SignedCommand) Reset() { *m = SignedCommand{} } func (m *SignedCommand) String() string { return proto.CompactTextString(m) } func (*SignedCommand) ProtoMessage() {} func (*SignedCommand) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{13} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{11} } func (m *SignedCommand) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedCommand.Unmarshal(m, b) @@ -1062,7 +896,7 @@ func (m *CommandResponseHeader) Reset() { *m = CommandResponseHeader{} } func (m *CommandResponseHeader) String() string { return proto.CompactTextString(m) } func (*CommandResponseHeader) ProtoMessage() {} func (*CommandResponseHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{14} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{12} } func (m *CommandResponseHeader) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommandResponseHeader.Unmarshal(m, b) @@ -1118,7 +952,7 @@ func (m *Error) Reset() { *m = Error{} } func (m *Error) String() string { return proto.CompactTextString(m) } func (*Error) ProtoMessage() {} func (*Error) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{15} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{13} } func (m *Error) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Error.Unmarshal(m, b) @@ -1162,6 +996,7 @@ type CommandResponse struct { // *CommandResponse_Err // *CommandResponse_TokenTransaction // *CommandResponse_UnspentTokens + // *CommandResponse_TokenTransactions Payload isCommandResponse_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1172,7 +1007,7 @@ func (m *CommandResponse) Reset() { *m = CommandResponse{} } func (m *CommandResponse) String() string { return proto.CompactTextString(m) } func (*CommandResponse) ProtoMessage() {} func (*CommandResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{16} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{14} } func (m *CommandResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommandResponse.Unmarshal(m, b) @@ -1215,12 +1050,18 @@ type CommandResponse_UnspentTokens struct { UnspentTokens *UnspentTokens `protobuf:"bytes,4,opt,name=unspent_tokens,json=unspentTokens,proto3,oneof"` } +type CommandResponse_TokenTransactions struct { + TokenTransactions *TokenTransactions `protobuf:"bytes,5,opt,name=token_transactions,json=tokenTransactions,proto3,oneof"` +} + func (*CommandResponse_Err) isCommandResponse_Payload() {} func (*CommandResponse_TokenTransaction) isCommandResponse_Payload() {} func (*CommandResponse_UnspentTokens) isCommandResponse_Payload() {} +func (*CommandResponse_TokenTransactions) isCommandResponse_Payload() {} + func (m *CommandResponse) GetPayload() isCommandResponse_Payload { if m != nil { return m.Payload @@ -1249,12 +1090,20 @@ func (m *CommandResponse) GetUnspentTokens() *UnspentTokens { return nil } +func (m *CommandResponse) GetTokenTransactions() *TokenTransactions { + if x, ok := m.GetPayload().(*CommandResponse_TokenTransactions); ok { + return x.TokenTransactions + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*CommandResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _CommandResponse_OneofMarshaler, _CommandResponse_OneofUnmarshaler, _CommandResponse_OneofSizer, []interface{}{ (*CommandResponse_Err)(nil), (*CommandResponse_TokenTransaction)(nil), (*CommandResponse_UnspentTokens)(nil), + (*CommandResponse_TokenTransactions)(nil), } } @@ -1277,6 +1126,11 @@ func _CommandResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.UnspentTokens); err != nil { return err } + case *CommandResponse_TokenTransactions: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.TokenTransactions); err != nil { + return err + } case nil: default: return fmt.Errorf("CommandResponse.Payload has unexpected type %T", x) @@ -1311,6 +1165,14 @@ func _CommandResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *prot err := b.DecodeMessage(msg) m.Payload = &CommandResponse_UnspentTokens{msg} return true, err + case 5: // payload.token_transactions + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TokenTransactions) + err := b.DecodeMessage(msg) + m.Payload = &CommandResponse_TokenTransactions{msg} + return true, err default: return false, nil } @@ -1335,6 +1197,11 @@ func _CommandResponse_OneofSizer(msg proto.Message) (n int) { n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s + case *CommandResponse_TokenTransactions: + s := proto.Size(x.TokenTransactions) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -1357,7 +1224,7 @@ func (m *SignedCommandResponse) Reset() { *m = SignedCommandResponse{} } func (m *SignedCommandResponse) String() string { return proto.CompactTextString(m) } func (*SignedCommandResponse) ProtoMessage() {} func (*SignedCommandResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_prover_aacdf31643d38144, []int{17} + return fileDescriptor_prover_2a2fc6c2f642aa49, []int{15} } func (m *SignedCommandResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SignedCommandResponse.Unmarshal(m, b) @@ -1392,24 +1259,22 @@ func (m *SignedCommandResponse) GetSignature() []byte { } func init() { - proto.RegisterType((*TokenToIssue)(nil), "sdk.protos.TokenToIssue") - proto.RegisterType((*RecipientTransferShare)(nil), "sdk.protos.RecipientTransferShare") - proto.RegisterType((*TokenOutput)(nil), "sdk.protos.TokenOutput") - proto.RegisterType((*UnspentTokens)(nil), "sdk.protos.UnspentTokens") - proto.RegisterType((*ListRequest)(nil), "sdk.protos.ListRequest") - proto.RegisterType((*ImportRequest)(nil), "sdk.protos.ImportRequest") - proto.RegisterType((*TransferRequest)(nil), "sdk.protos.TransferRequest") - proto.RegisterType((*RedeemRequest)(nil), "sdk.protos.RedeemRequest") - proto.RegisterType((*AllowanceRecipientShare)(nil), "sdk.protos.AllowanceRecipientShare") - proto.RegisterType((*ApproveRequest)(nil), "sdk.protos.ApproveRequest") - proto.RegisterType((*ExpectationRequest)(nil), "sdk.protos.ExpectationRequest") - proto.RegisterType((*Header)(nil), "sdk.protos.Header") - proto.RegisterType((*Command)(nil), "sdk.protos.Command") - proto.RegisterType((*SignedCommand)(nil), "sdk.protos.SignedCommand") - proto.RegisterType((*CommandResponseHeader)(nil), "sdk.protos.CommandResponseHeader") - proto.RegisterType((*Error)(nil), "sdk.protos.Error") - proto.RegisterType((*CommandResponse)(nil), "sdk.protos.CommandResponse") - proto.RegisterType((*SignedCommandResponse)(nil), "sdk.protos.SignedCommandResponse") + proto.RegisterType((*IssueRequest)(nil), "token.IssueRequest") + proto.RegisterType((*RecipientShare)(nil), "token.RecipientShare") + proto.RegisterType((*TokenTransactions)(nil), "token.TokenTransactions") + proto.RegisterType((*TransferRequest)(nil), "token.TransferRequest") + proto.RegisterType((*RedeemRequest)(nil), "token.RedeemRequest") + proto.RegisterType((*UnspentToken)(nil), "token.UnspentToken") + proto.RegisterType((*UnspentTokens)(nil), "token.UnspentTokens") + proto.RegisterType((*ListRequest)(nil), "token.ListRequest") + proto.RegisterType((*TokenOperationRequest)(nil), "token.TokenOperationRequest") + proto.RegisterType((*Header)(nil), "token.Header") + proto.RegisterType((*Command)(nil), "token.Command") + proto.RegisterType((*SignedCommand)(nil), "token.SignedCommand") + proto.RegisterType((*CommandResponseHeader)(nil), "token.CommandResponseHeader") + proto.RegisterType((*Error)(nil), "token.Error") + proto.RegisterType((*CommandResponse)(nil), "token.CommandResponse") + proto.RegisterType((*SignedCommandResponse)(nil), "token.SignedCommandResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -1441,7 +1306,7 @@ func NewProverClient(cc *grpc.ClientConn) ProverClient { func (c *proverClient) ProcessCommand(ctx context.Context, in *SignedCommand, opts ...grpc.CallOption) (*SignedCommandResponse, error) { out := new(SignedCommandResponse) - err := c.cc.Invoke(ctx, "/protos.Prover/ProcessCommand", in, out, opts...) + err := c.cc.Invoke(ctx, "/token.Prover/ProcessCommand", in, out, opts...) if err != nil { return nil, err } @@ -1471,7 +1336,7 @@ func _Prover_ProcessCommand_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/protos.Prover/ProcessCommand", + FullMethod: "/token.Prover/ProcessCommand", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProverServer).ProcessCommand(ctx, req.(*SignedCommand)) @@ -1480,7 +1345,7 @@ func _Prover_ProcessCommand_Handler(srv interface{}, ctx context.Context, dec fu } var _Prover_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protos.Prover", + ServiceName: "token.Prover", HandlerType: (*ProverServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1492,72 +1357,68 @@ var _Prover_serviceDesc = grpc.ServiceDesc{ Metadata: "token/prover.proto", } -func init() { proto.RegisterFile("token/prover.proto", fileDescriptor_prover_aacdf31643d38144) } - -var fileDescriptor_prover_aacdf31643d38144 = []byte{ - // 1010 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x6f, 0x1b, 0x45, - 0x10, 0xf7, 0xd9, 0xae, 0x13, 0x8f, 0xbf, 0xd2, 0x4d, 0xd3, 0x9c, 0x0c, 0x69, 0xd3, 0x43, 0x42, - 0x11, 0x1f, 0xb6, 0x14, 0x04, 0xaa, 0xa0, 0xaa, 0x48, 0xa1, 0x70, 0x41, 0x54, 0xb4, 0x1b, 0xf3, - 0x82, 0x90, 0xac, 0xcd, 0xdd, 0xc6, 0x5e, 0xe1, 0xbb, 0xbd, 0xee, 0xee, 0x01, 0xe1, 0x0f, 0xe0, - 0x0d, 0x24, 0x1e, 0x79, 0xe0, 0xff, 0xe4, 0x11, 0xdd, 0x7e, 0x9c, 0xef, 0xdc, 0xd0, 0x06, 0x95, - 0x27, 0x7b, 0x67, 0x66, 0x67, 0x7e, 0x3b, 0xfb, 0xfb, 0xcd, 0x1e, 0x20, 0xc5, 0x7f, 0xa0, 0xe9, - 0x34, 0x13, 0xfc, 0x47, 0x2a, 0x26, 0x99, 0xe0, 0x8a, 0xa3, 0x8e, 0xfe, 0x91, 0xe3, 0xbb, 0x0b, - 0xce, 0x17, 0x2b, 0x3a, 0xd5, 0xcb, 0xf3, 0xfc, 0x62, 0xaa, 0x58, 0x42, 0xa5, 0x22, 0x49, 0x66, - 0x02, 0xc7, 0xbe, 0xd9, 0x4c, 0x7f, 0xce, 0x68, 0xa4, 0x88, 0x62, 0x3c, 0x95, 0xd6, 0xb3, 0x6f, - 0x3c, 0x4a, 0x90, 0x54, 0x92, 0xa8, 0xf0, 0x18, 0x47, 0xf0, 0x3d, 0xf4, 0x67, 0x85, 0x6b, 0xc6, - 0x4f, 0xa5, 0xcc, 0x29, 0x7a, 0x13, 0xba, 0x82, 0x46, 0x2c, 0x63, 0x34, 0x55, 0xbe, 0x77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0x8c, 0x78, 0x06, 0x7b, 0x35, 0x46, 0x94, 0xe7, 0x1f, 0xc3, 0xb6, 0xb0, 0xff, 0x2d, - 0x35, 0xca, 0xf5, 0xcb, 0xb9, 0x71, 0x8c, 0xa1, 0xf3, 0x54, 0x7f, 0xe7, 0xa1, 0x10, 0x86, 0x4f, - 0x05, 0x8f, 0xa8, 0x94, 0x8e, 0x6f, 0x25, 0xc2, 0x5a, 0xd1, 0xf1, 0xc1, 0x95, 0x66, 0x87, 0x25, - 0x68, 0x3c, 0x7a, 0x06, 0x6f, 0x71, 0xb1, 0x98, 0x2c, 0x2f, 0x33, 0x2a, 0x56, 0x34, 0x5e, 0x50, - 0x31, 0xb9, 0x20, 0xe7, 0x82, 0x45, 0x6e, 0xa3, 0xee, 0xc3, 0x77, 0xef, 0x2c, 0x98, 0x5a, 0xe6, - 0xe7, 0x93, 0x88, 0x27, 0xd3, 0x4a, 0xec, 0xd4, 0xc4, 0x9a, 0x2f, 0x4c, 0x39, 0xd5, 0xb1, 0xe7, - 0xe6, 0xf3, 0xf3, 0x83, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x10, 0x78, 0x90, 0x5b, 0x9b, 0x0a, - 0x00, 0x00, +func init() { proto.RegisterFile("token/prover.proto", fileDescriptor_prover_2a2fc6c2f642aa49) } + +var fileDescriptor_prover_2a2fc6c2f642aa49 = []byte{ + // 953 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xef, 0x6e, 0x23, 0x35, + 0x10, 0x4f, 0x9a, 0x26, 0x6d, 0x26, 0x49, 0x7b, 0x35, 0x97, 0xbb, 0x55, 0x54, 0x8e, 0xb2, 0x08, + 0xa9, 0x70, 0xba, 0x8d, 0x54, 0x0e, 0x81, 0xf8, 0xf7, 0xe1, 0x2a, 0x8e, 0x54, 0x42, 0xa2, 0xe7, + 0x2b, 0x7c, 0x40, 0x82, 0x95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04, 0x36, 0x6b, 0xd1, 0xf2, + 0x88, 0x3c, 0x87, 0x03, 0x5b, 0x65, 0xef, 0xef, 0xd5, 0x69, 0xf4, 0x4d, 0xff, 0x3b, 0xb3, 0x16, + 0xbd, 0xa7, 0x37, 0x6c, 0xa5, 0xd8, 0x56, 0x76, 0xec, 0xc5, 0x6e, 0x26, 0x6e, 0x37, 0xc4, 0xd6, + 0x98, 0x9c, 0xa5, 0xd8, 0x56, 0x8d, 0x51, 0x7a, 0xe6, 0xbe, 0x1c, 0xfc, 0x30, 0x94, 0xd3, 0x6b, + 0xf0, 0x86, 0x38, 0x4a, 0x9a, 0x83, 0xcd, 0x40, 0x94, 0xaf, 0xaf, 0x17, 0x30, 0x6e, 0xe8, 0xab, + 0xce, 0xe6, 0x04, 0x76, 0xa5, 0x5b, 0x3b, 0xa1, 0xd5, 0xfb, 0xdb, 0x95, 0x76, 0x72, 0x0e, 0xbd, + 0x73, 0xf3, 0x71, 0x43, 0x9e, 0xc3, 0xde, 0xb9, 0x14, 0x09, 0x2a, 0x55, 0xa9, 0xb7, 0x7a, 0x6b, + 0xe3, 0xce, 0xc9, 0xe1, 0x4d, 0xd6, 0x2a, 0x92, 0xb0, 0xf5, 0xec, 0x05, 0xbc, 0x27, 0xe4, 0x3c, + 0x5a, 0x5c, 0x17, 0x28, 0x33, 0x4c, 0xe7, 0x28, 0xa3, 0x2b, 0x76, 0x29, 0x79, 0x62, 0xf5, 0xa9, + 0xac, 0xfb, 0x8f, 0x1f, 0xce, 0xb9, 0x5e, 0xac, 0x2e, 0xa3, 0x44, 0x2c, 0xa7, 0x1e, 0x76, 0x6a, + 0xb1, 0xf6, 0xab, 0x4a, 0x4d, 0x0d, 0xf6, 0xb2, 0x67, 0x76, 0x1f, 0xfd, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0x93, 0x22, 0x54, 0x97, 0x8e, 0x09, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/token/transaction.pb.go b/third_party/github.com/hyperledger/fabric/protos/token/transaction.pb.go index 8c01800d1c..31c6306d93 100644 --- a/third_party/github.com/hyperledger/fabric/protos/token/transaction.pb.go +++ b/third_party/github.com/hyperledger/fabric/protos/token/transaction.pb.go @@ -22,14 +22,34 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +type TokenOwner_Type int32 + +const ( + TokenOwner_MSP_IDENTIFIER TokenOwner_Type = 0 +) + +var TokenOwner_Type_name = map[int32]string{ + 0: "MSP_IDENTIFIER", +} +var TokenOwner_Type_value = map[string]int32{ + "MSP_IDENTIFIER": 0, +} + +func (x TokenOwner_Type) String() string { + return proto.EnumName(TokenOwner_Type_name, int32(x)) +} +func (TokenOwner_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{2, 0} +} + // TokenTransaction governs the structure of Payload.data, when // the transaction's envelope header indicates a transaction of type // "Token" type TokenTransaction struct { - // action carries the content of this transaction. + // TokenAction carries the content of this transaction. // // Types that are valid to be assigned to Action: - // *TokenTransaction_PlainAction + // *TokenTransaction_TokenAction Action isTokenTransaction_Action `protobuf_oneof:"action"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -40,7 +60,7 @@ func (m *TokenTransaction) Reset() { *m = TokenTransaction{} } func (m *TokenTransaction) String() string { return proto.CompactTextString(m) } func (*TokenTransaction) ProtoMessage() {} func (*TokenTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{0} + return fileDescriptor_transaction_f976d1453a3f05a8, []int{0} } func (m *TokenTransaction) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TokenTransaction.Unmarshal(m, b) @@ -64,11 +84,11 @@ type isTokenTransaction_Action interface { isTokenTransaction_Action() } -type TokenTransaction_PlainAction struct { - PlainAction *PlainTokenAction `protobuf:"bytes,1,opt,name=plain_action,json=plainAction,proto3,oneof"` +type TokenTransaction_TokenAction struct { + TokenAction *TokenAction `protobuf:"bytes,1,opt,name=token_action,json=tokenAction,proto3,oneof"` } -func (*TokenTransaction_PlainAction) isTokenTransaction_Action() {} +func (*TokenTransaction_TokenAction) isTokenTransaction_Action() {} func (m *TokenTransaction) GetAction() isTokenTransaction_Action { if m != nil { @@ -77,9 +97,9 @@ func (m *TokenTransaction) GetAction() isTokenTransaction_Action { return nil } -func (m *TokenTransaction) GetPlainAction() *PlainTokenAction { - if x, ok := m.GetAction().(*TokenTransaction_PlainAction); ok { - return x.PlainAction +func (m *TokenTransaction) GetTokenAction() *TokenAction { + if x, ok := m.GetAction().(*TokenTransaction_TokenAction); ok { + return x.TokenAction } return nil } @@ -87,7 +107,7 @@ func (m *TokenTransaction) GetPlainAction() *PlainTokenAction { // XXX_OneofFuncs is for the internal use of the proto package. func (*TokenTransaction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _TokenTransaction_OneofMarshaler, _TokenTransaction_OneofUnmarshaler, _TokenTransaction_OneofSizer, []interface{}{ - (*TokenTransaction_PlainAction)(nil), + (*TokenTransaction_TokenAction)(nil), } } @@ -95,9 +115,9 @@ func _TokenTransaction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error m := msg.(*TokenTransaction) // action switch x := m.Action.(type) { - case *TokenTransaction_PlainAction: + case *TokenTransaction_TokenAction: b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainAction); err != nil { + if err := b.EncodeMessage(x.TokenAction); err != nil { return err } case nil: @@ -110,13 +130,13 @@ func _TokenTransaction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error func _TokenTransaction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*TokenTransaction) switch tag { - case 1: // action.plain_action + case 1: // action.token_action if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(PlainTokenAction) + msg := new(TokenAction) err := b.DecodeMessage(msg) - m.Action = &TokenTransaction_PlainAction{msg} + m.Action = &TokenTransaction_TokenAction{msg} return true, err default: return false, nil @@ -127,8 +147,8 @@ func _TokenTransaction_OneofSizer(msg proto.Message) (n int) { m := msg.(*TokenTransaction) // action switch x := m.Action.(type) { - case *TokenTransaction_PlainAction: - s := proto.Size(x.PlainAction) + case *TokenTransaction_TokenAction: + s := proto.Size(x.TokenAction) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s @@ -139,242 +159,177 @@ func _TokenTransaction_OneofSizer(msg proto.Message) (n int) { return n } -// PlainTokenAction governs the structure of a token action that is -// subjected to no privacy restrictions -type PlainTokenAction struct { +// TokenAction specifies the structure of the action that a token undertakes +type TokenAction struct { + // Data carries the action to be executed + // // Types that are valid to be assigned to Data: - // *PlainTokenAction_PlainImport - // *PlainTokenAction_PlainTransfer - // *PlainTokenAction_PlainRedeem - // *PlainTokenAction_PlainApprove - // *PlainTokenAction_PlainTransfer_From - Data isPlainTokenAction_Data `protobuf_oneof:"data"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // *TokenAction_Issue + // *TokenAction_Transfer + // *TokenAction_Redeem + Data isTokenAction_Data `protobuf_oneof:"data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PlainTokenAction) Reset() { *m = PlainTokenAction{} } -func (m *PlainTokenAction) String() string { return proto.CompactTextString(m) } -func (*PlainTokenAction) ProtoMessage() {} -func (*PlainTokenAction) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{1} -} -func (m *PlainTokenAction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainTokenAction.Unmarshal(m, b) +func (m *TokenAction) Reset() { *m = TokenAction{} } +func (m *TokenAction) String() string { return proto.CompactTextString(m) } +func (*TokenAction) ProtoMessage() {} +func (*TokenAction) Descriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{1} } -func (m *PlainTokenAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainTokenAction.Marshal(b, m, deterministic) +func (m *TokenAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenAction.Unmarshal(m, b) } -func (dst *PlainTokenAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTokenAction.Merge(dst, src) +func (m *TokenAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenAction.Marshal(b, m, deterministic) } -func (m *PlainTokenAction) XXX_Size() int { - return xxx_messageInfo_PlainTokenAction.Size(m) +func (dst *TokenAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenAction.Merge(dst, src) } -func (m *PlainTokenAction) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTokenAction.DiscardUnknown(m) +func (m *TokenAction) XXX_Size() int { + return xxx_messageInfo_TokenAction.Size(m) } - -var xxx_messageInfo_PlainTokenAction proto.InternalMessageInfo - -type isPlainTokenAction_Data interface { - isPlainTokenAction_Data() +func (m *TokenAction) XXX_DiscardUnknown() { + xxx_messageInfo_TokenAction.DiscardUnknown(m) } -type PlainTokenAction_PlainImport struct { - PlainImport *PlainImport `protobuf:"bytes,1,opt,name=plain_import,json=plainImport,proto3,oneof"` -} +var xxx_messageInfo_TokenAction proto.InternalMessageInfo -type PlainTokenAction_PlainTransfer struct { - PlainTransfer *PlainTransfer `protobuf:"bytes,2,opt,name=plain_transfer,json=plainTransfer,proto3,oneof"` +type isTokenAction_Data interface { + isTokenAction_Data() } -type PlainTokenAction_PlainRedeem struct { - PlainRedeem *PlainTransfer `protobuf:"bytes,3,opt,name=plain_redeem,json=plainRedeem,proto3,oneof"` +type TokenAction_Issue struct { + Issue *Issue `protobuf:"bytes,1,opt,name=issue,proto3,oneof"` } -type PlainTokenAction_PlainApprove struct { - PlainApprove *PlainApprove `protobuf:"bytes,4,opt,name=plain_approve,json=plainApprove,proto3,oneof"` +type TokenAction_Transfer struct { + Transfer *Transfer `protobuf:"bytes,2,opt,name=transfer,proto3,oneof"` } -type PlainTokenAction_PlainTransfer_From struct { - PlainTransfer_From *PlainTransferFrom `protobuf:"bytes,5,opt,name=plain_transfer_From,json=plainTransferFrom,proto3,oneof"` +type TokenAction_Redeem struct { + Redeem *Transfer `protobuf:"bytes,3,opt,name=redeem,proto3,oneof"` } -func (*PlainTokenAction_PlainImport) isPlainTokenAction_Data() {} - -func (*PlainTokenAction_PlainTransfer) isPlainTokenAction_Data() {} +func (*TokenAction_Issue) isTokenAction_Data() {} -func (*PlainTokenAction_PlainRedeem) isPlainTokenAction_Data() {} +func (*TokenAction_Transfer) isTokenAction_Data() {} -func (*PlainTokenAction_PlainApprove) isPlainTokenAction_Data() {} +func (*TokenAction_Redeem) isTokenAction_Data() {} -func (*PlainTokenAction_PlainTransfer_From) isPlainTokenAction_Data() {} - -func (m *PlainTokenAction) GetData() isPlainTokenAction_Data { +func (m *TokenAction) GetData() isTokenAction_Data { if m != nil { return m.Data } return nil } -func (m *PlainTokenAction) GetPlainImport() *PlainImport { - if x, ok := m.GetData().(*PlainTokenAction_PlainImport); ok { - return x.PlainImport - } - return nil -} - -func (m *PlainTokenAction) GetPlainTransfer() *PlainTransfer { - if x, ok := m.GetData().(*PlainTokenAction_PlainTransfer); ok { - return x.PlainTransfer - } - return nil -} - -func (m *PlainTokenAction) GetPlainRedeem() *PlainTransfer { - if x, ok := m.GetData().(*PlainTokenAction_PlainRedeem); ok { - return x.PlainRedeem +func (m *TokenAction) GetIssue() *Issue { + if x, ok := m.GetData().(*TokenAction_Issue); ok { + return x.Issue } return nil } -func (m *PlainTokenAction) GetPlainApprove() *PlainApprove { - if x, ok := m.GetData().(*PlainTokenAction_PlainApprove); ok { - return x.PlainApprove +func (m *TokenAction) GetTransfer() *Transfer { + if x, ok := m.GetData().(*TokenAction_Transfer); ok { + return x.Transfer } return nil } -func (m *PlainTokenAction) GetPlainTransfer_From() *PlainTransferFrom { - if x, ok := m.GetData().(*PlainTokenAction_PlainTransfer_From); ok { - return x.PlainTransfer_From +func (m *TokenAction) GetRedeem() *Transfer { + if x, ok := m.GetData().(*TokenAction_Redeem); ok { + return x.Redeem } return nil } // XXX_OneofFuncs is for the internal use of the proto package. -func (*PlainTokenAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _PlainTokenAction_OneofMarshaler, _PlainTokenAction_OneofUnmarshaler, _PlainTokenAction_OneofSizer, []interface{}{ - (*PlainTokenAction_PlainImport)(nil), - (*PlainTokenAction_PlainTransfer)(nil), - (*PlainTokenAction_PlainRedeem)(nil), - (*PlainTokenAction_PlainApprove)(nil), - (*PlainTokenAction_PlainTransfer_From)(nil), +func (*TokenAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TokenAction_OneofMarshaler, _TokenAction_OneofUnmarshaler, _TokenAction_OneofSizer, []interface{}{ + (*TokenAction_Issue)(nil), + (*TokenAction_Transfer)(nil), + (*TokenAction_Redeem)(nil), } } -func _PlainTokenAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*PlainTokenAction) +func _TokenAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TokenAction) // data switch x := m.Data.(type) { - case *PlainTokenAction_PlainImport: + case *TokenAction_Issue: b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainImport); err != nil { + if err := b.EncodeMessage(x.Issue); err != nil { return err } - case *PlainTokenAction_PlainTransfer: + case *TokenAction_Transfer: b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainTransfer); err != nil { + if err := b.EncodeMessage(x.Transfer); err != nil { return err } - case *PlainTokenAction_PlainRedeem: + case *TokenAction_Redeem: b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainRedeem); err != nil { - return err - } - case *PlainTokenAction_PlainApprove: - b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainApprove); err != nil { - return err - } - case *PlainTokenAction_PlainTransfer_From: - b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.PlainTransfer_From); err != nil { + if err := b.EncodeMessage(x.Redeem); err != nil { return err } case nil: default: - return fmt.Errorf("PlainTokenAction.Data has unexpected type %T", x) + return fmt.Errorf("TokenAction.Data has unexpected type %T", x) } return nil } -func _PlainTokenAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*PlainTokenAction) +func _TokenAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TokenAction) switch tag { - case 1: // data.plain_import - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(PlainImport) - err := b.DecodeMessage(msg) - m.Data = &PlainTokenAction_PlainImport{msg} - return true, err - case 2: // data.plain_transfer + case 1: // data.issue if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(PlainTransfer) + msg := new(Issue) err := b.DecodeMessage(msg) - m.Data = &PlainTokenAction_PlainTransfer{msg} + m.Data = &TokenAction_Issue{msg} return true, err - case 3: // data.plain_redeem + case 2: // data.transfer if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(PlainTransfer) + msg := new(Transfer) err := b.DecodeMessage(msg) - m.Data = &PlainTokenAction_PlainRedeem{msg} + m.Data = &TokenAction_Transfer{msg} return true, err - case 4: // data.plain_approve + case 3: // data.redeem if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(PlainApprove) + msg := new(Transfer) err := b.DecodeMessage(msg) - m.Data = &PlainTokenAction_PlainApprove{msg} - return true, err - case 5: // data.plain_transfer_From - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(PlainTransferFrom) - err := b.DecodeMessage(msg) - m.Data = &PlainTokenAction_PlainTransfer_From{msg} + m.Data = &TokenAction_Redeem{msg} return true, err default: return false, nil } } -func _PlainTokenAction_OneofSizer(msg proto.Message) (n int) { - m := msg.(*PlainTokenAction) +func _TokenAction_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TokenAction) // data switch x := m.Data.(type) { - case *PlainTokenAction_PlainImport: - s := proto.Size(x.PlainImport) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *PlainTokenAction_PlainTransfer: - s := proto.Size(x.PlainTransfer) + case *TokenAction_Issue: + s := proto.Size(x.Issue) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s - case *PlainTokenAction_PlainRedeem: - s := proto.Size(x.PlainRedeem) + case *TokenAction_Transfer: + s := proto.Size(x.Transfer) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s - case *PlainTokenAction_PlainApprove: - s := proto.Size(x.PlainApprove) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *PlainTokenAction_PlainTransfer_From: - s := proto.Size(x.PlainTransfer_From) + case *TokenAction_Redeem: + s := proto.Size(x.Redeem) n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s @@ -385,435 +340,294 @@ func _PlainTokenAction_OneofSizer(msg proto.Message) (n int) { return n } -// PlainImport specifies an import of one or more tokens in plaintext format -type PlainImport struct { - // An import transaction may contain one or more outputs - Outputs []*PlainOutput `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// TokenOwner holds the identity of a token owner +type TokenOwner struct { + // Type is the type of the identity of the token owner + Type TokenOwner_Type `protobuf:"varint,1,opt,name=type,proto3,enum=token.TokenOwner_Type" json:"type,omitempty"` + // Raw is the serialization of the identity + Raw []byte `protobuf:"bytes,2,opt,name=raw,proto3" json:"raw,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PlainImport) Reset() { *m = PlainImport{} } -func (m *PlainImport) String() string { return proto.CompactTextString(m) } -func (*PlainImport) ProtoMessage() {} -func (*PlainImport) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{2} +func (m *TokenOwner) Reset() { *m = TokenOwner{} } +func (m *TokenOwner) String() string { return proto.CompactTextString(m) } +func (*TokenOwner) ProtoMessage() {} +func (*TokenOwner) Descriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{2} } -func (m *PlainImport) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainImport.Unmarshal(m, b) +func (m *TokenOwner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenOwner.Unmarshal(m, b) } -func (m *PlainImport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainImport.Marshal(b, m, deterministic) +func (m *TokenOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenOwner.Marshal(b, m, deterministic) } -func (dst *PlainImport) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainImport.Merge(dst, src) +func (dst *TokenOwner) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenOwner.Merge(dst, src) } -func (m *PlainImport) XXX_Size() int { - return xxx_messageInfo_PlainImport.Size(m) +func (m *TokenOwner) XXX_Size() int { + return xxx_messageInfo_TokenOwner.Size(m) } -func (m *PlainImport) XXX_DiscardUnknown() { - xxx_messageInfo_PlainImport.DiscardUnknown(m) +func (m *TokenOwner) XXX_DiscardUnknown() { + xxx_messageInfo_TokenOwner.DiscardUnknown(m) } -var xxx_messageInfo_PlainImport proto.InternalMessageInfo +var xxx_messageInfo_TokenOwner proto.InternalMessageInfo -func (m *PlainImport) GetOutputs() []*PlainOutput { +func (m *TokenOwner) GetType() TokenOwner_Type { if m != nil { - return m.Outputs + return m.Type } - return nil -} - -// PlainTransfer specifies a transfer of one or more plaintext tokens to one or more outputs -type PlainTransfer struct { - // The inputs to the transfer transaction are specified by their ID - Inputs []*InputId `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - // A transfer transaction may contain one or more outputs - Outputs []*PlainOutput `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PlainTransfer) Reset() { *m = PlainTransfer{} } -func (m *PlainTransfer) String() string { return proto.CompactTextString(m) } -func (*PlainTransfer) ProtoMessage() {} -func (*PlainTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{3} -} -func (m *PlainTransfer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainTransfer.Unmarshal(m, b) -} -func (m *PlainTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainTransfer.Marshal(b, m, deterministic) -} -func (dst *PlainTransfer) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTransfer.Merge(dst, src) -} -func (m *PlainTransfer) XXX_Size() int { - return xxx_messageInfo_PlainTransfer.Size(m) -} -func (m *PlainTransfer) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTransfer.DiscardUnknown(m) + return TokenOwner_MSP_IDENTIFIER } -var xxx_messageInfo_PlainTransfer proto.InternalMessageInfo - -func (m *PlainTransfer) GetInputs() []*InputId { +func (m *TokenOwner) GetRaw() []byte { if m != nil { - return m.Inputs + return m.Raw } return nil } -func (m *PlainTransfer) GetOutputs() []*PlainOutput { - if m != nil { - return m.Outputs - } - return nil -} - -// PlainApprove specifies an approve of one or more tokens in plaintext format -type PlainApprove struct { - // The inputs to the transfer transaction are specified by their ID - Inputs []*InputId `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - // An approve transaction contains one or more plain delegated outputs - DelegatedOutputs []*PlainDelegatedOutput `protobuf:"bytes,2,rep,name=delegated_outputs,json=delegatedOutputs,proto3" json:"delegated_outputs,omitempty"` - // An approve transaction contains one plain output - Output *PlainOutput `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// Issue specifies an issue of one or more tokens +type Issue struct { + // Outputs are the newly issued tokens + Outputs []*Token `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PlainApprove) Reset() { *m = PlainApprove{} } -func (m *PlainApprove) String() string { return proto.CompactTextString(m) } -func (*PlainApprove) ProtoMessage() {} -func (*PlainApprove) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{4} -} -func (m *PlainApprove) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainApprove.Unmarshal(m, b) +func (m *Issue) Reset() { *m = Issue{} } +func (m *Issue) String() string { return proto.CompactTextString(m) } +func (*Issue) ProtoMessage() {} +func (*Issue) Descriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{3} } -func (m *PlainApprove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainApprove.Marshal(b, m, deterministic) +func (m *Issue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Issue.Unmarshal(m, b) } -func (dst *PlainApprove) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainApprove.Merge(dst, src) +func (m *Issue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Issue.Marshal(b, m, deterministic) } -func (m *PlainApprove) XXX_Size() int { - return xxx_messageInfo_PlainApprove.Size(m) +func (dst *Issue) XXX_Merge(src proto.Message) { + xxx_messageInfo_Issue.Merge(dst, src) } -func (m *PlainApprove) XXX_DiscardUnknown() { - xxx_messageInfo_PlainApprove.DiscardUnknown(m) +func (m *Issue) XXX_Size() int { + return xxx_messageInfo_Issue.Size(m) } - -var xxx_messageInfo_PlainApprove proto.InternalMessageInfo - -func (m *PlainApprove) GetInputs() []*InputId { - if m != nil { - return m.Inputs - } - return nil +func (m *Issue) XXX_DiscardUnknown() { + xxx_messageInfo_Issue.DiscardUnknown(m) } -func (m *PlainApprove) GetDelegatedOutputs() []*PlainDelegatedOutput { - if m != nil { - return m.DelegatedOutputs - } - return nil -} +var xxx_messageInfo_Issue proto.InternalMessageInfo -func (m *PlainApprove) GetOutput() *PlainOutput { +func (m *Issue) GetOutputs() []*Token { if m != nil { - return m.Output + return m.Outputs } return nil } -// PlainTransferFrom specifies a transfer of one or more plaintext delegated tokens to one or more outputs -// an to a delegated output -type PlainTransferFrom struct { - // The inputs to the transfer transaction are specified by their ID - Inputs []*InputId `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - // A transferFrom transaction contains multiple outputs - Outputs []*PlainOutput `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` - // A transferFrom transaction may contain one delegatable output - DelegatedOutput *PlainDelegatedOutput `protobuf:"bytes,3,opt,name=delegated_output,json=delegatedOutput,proto3" json:"delegated_output,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// Transfer specifies a transfer of one or more tokens +type Transfer struct { + // Inputs specify the identifiers in the ledger of the tokens to be transferred + Inputs []*TokenId `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` + // Outputs are the new tokens resulting from the transfer + Outputs []*Token `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PlainTransferFrom) Reset() { *m = PlainTransferFrom{} } -func (m *PlainTransferFrom) String() string { return proto.CompactTextString(m) } -func (*PlainTransferFrom) ProtoMessage() {} -func (*PlainTransferFrom) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{5} +func (m *Transfer) Reset() { *m = Transfer{} } +func (m *Transfer) String() string { return proto.CompactTextString(m) } +func (*Transfer) ProtoMessage() {} +func (*Transfer) Descriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{4} } -func (m *PlainTransferFrom) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainTransferFrom.Unmarshal(m, b) +func (m *Transfer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Transfer.Unmarshal(m, b) } -func (m *PlainTransferFrom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainTransferFrom.Marshal(b, m, deterministic) +func (m *Transfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Transfer.Marshal(b, m, deterministic) } -func (dst *PlainTransferFrom) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainTransferFrom.Merge(dst, src) +func (dst *Transfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Transfer.Merge(dst, src) } -func (m *PlainTransferFrom) XXX_Size() int { - return xxx_messageInfo_PlainTransferFrom.Size(m) +func (m *Transfer) XXX_Size() int { + return xxx_messageInfo_Transfer.Size(m) } -func (m *PlainTransferFrom) XXX_DiscardUnknown() { - xxx_messageInfo_PlainTransferFrom.DiscardUnknown(m) +func (m *Transfer) XXX_DiscardUnknown() { + xxx_messageInfo_Transfer.DiscardUnknown(m) } -var xxx_messageInfo_PlainTransferFrom proto.InternalMessageInfo +var xxx_messageInfo_Transfer proto.InternalMessageInfo -func (m *PlainTransferFrom) GetInputs() []*InputId { +func (m *Transfer) GetInputs() []*TokenId { if m != nil { return m.Inputs } return nil } -func (m *PlainTransferFrom) GetOutputs() []*PlainOutput { +func (m *Transfer) GetOutputs() []*Token { if m != nil { return m.Outputs } return nil } -func (m *PlainTransferFrom) GetDelegatedOutput() *PlainDelegatedOutput { - if m != nil { - return m.DelegatedOutput - } - return nil -} - -// A PlainOutput is the result of import and transfer transactions using plaintext tokens -type PlainOutput struct { - // The owner is the serialization of a SerializedIdentity struct - Owner []byte `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // The token type +// Token is the result of issue and transfer transactions +type Token struct { + // Owner is the token owner + Owner *TokenOwner `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // Type is the type of the token Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // The quantity of tokens - Quantity uint64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` + // Quantity is the number of units of Type carried in the token. + // It is encoded as a string containing a number in base 16. The string has prefix ``0x''. + Quantity string `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PlainOutput) Reset() { *m = PlainOutput{} } -func (m *PlainOutput) String() string { return proto.CompactTextString(m) } -func (*PlainOutput) ProtoMessage() {} -func (*PlainOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{6} +func (m *Token) Reset() { *m = Token{} } +func (m *Token) String() string { return proto.CompactTextString(m) } +func (*Token) ProtoMessage() {} +func (*Token) Descriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{5} } -func (m *PlainOutput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainOutput.Unmarshal(m, b) +func (m *Token) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Token.Unmarshal(m, b) } -func (m *PlainOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainOutput.Marshal(b, m, deterministic) +func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Token.Marshal(b, m, deterministic) } -func (dst *PlainOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainOutput.Merge(dst, src) +func (dst *Token) XXX_Merge(src proto.Message) { + xxx_messageInfo_Token.Merge(dst, src) } -func (m *PlainOutput) XXX_Size() int { - return xxx_messageInfo_PlainOutput.Size(m) +func (m *Token) XXX_Size() int { + return xxx_messageInfo_Token.Size(m) } -func (m *PlainOutput) XXX_DiscardUnknown() { - xxx_messageInfo_PlainOutput.DiscardUnknown(m) +func (m *Token) XXX_DiscardUnknown() { + xxx_messageInfo_Token.DiscardUnknown(m) } -var xxx_messageInfo_PlainOutput proto.InternalMessageInfo +var xxx_messageInfo_Token proto.InternalMessageInfo -func (m *PlainOutput) GetOwner() []byte { +func (m *Token) GetOwner() *TokenOwner { if m != nil { return m.Owner } return nil } -func (m *PlainOutput) GetType() string { +func (m *Token) GetType() string { if m != nil { return m.Type } return "" } -func (m *PlainOutput) GetQuantity() uint64 { +func (m *Token) GetQuantity() string { if m != nil { return m.Quantity } - return 0 + return "" } -// An InputId specifies an output using the transaction ID and the index of the output in the transaction -type InputId struct { - // The transaction ID +// A TokenId identifies a token as a function of the identifier of the transaction (issue, transfer) +// that created it and its index in that transaction +type TokenId struct { + // TxId is the transaction ID of the transaction that created the token TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` - // The index of the output in the transaction + // Index is the index of the token in the transaction that created it Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *InputId) Reset() { *m = InputId{} } -func (m *InputId) String() string { return proto.CompactTextString(m) } -func (*InputId) ProtoMessage() {} -func (*InputId) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{7} +func (m *TokenId) Reset() { *m = TokenId{} } +func (m *TokenId) String() string { return proto.CompactTextString(m) } +func (*TokenId) ProtoMessage() {} +func (*TokenId) Descriptor() ([]byte, []int) { + return fileDescriptor_transaction_f976d1453a3f05a8, []int{6} } -func (m *InputId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InputId.Unmarshal(m, b) +func (m *TokenId) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenId.Unmarshal(m, b) } -func (m *InputId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InputId.Marshal(b, m, deterministic) +func (m *TokenId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenId.Marshal(b, m, deterministic) } -func (dst *InputId) XXX_Merge(src proto.Message) { - xxx_messageInfo_InputId.Merge(dst, src) +func (dst *TokenId) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenId.Merge(dst, src) } -func (m *InputId) XXX_Size() int { - return xxx_messageInfo_InputId.Size(m) +func (m *TokenId) XXX_Size() int { + return xxx_messageInfo_TokenId.Size(m) } -func (m *InputId) XXX_DiscardUnknown() { - xxx_messageInfo_InputId.DiscardUnknown(m) +func (m *TokenId) XXX_DiscardUnknown() { + xxx_messageInfo_TokenId.DiscardUnknown(m) } -var xxx_messageInfo_InputId proto.InternalMessageInfo +var xxx_messageInfo_TokenId proto.InternalMessageInfo -func (m *InputId) GetTxId() string { +func (m *TokenId) GetTxId() string { if m != nil { return m.TxId } return "" } -func (m *InputId) GetIndex() uint32 { +func (m *TokenId) GetIndex() uint32 { if m != nil { return m.Index } return 0 } -// A PlainDelegatedOutput is the result of approve transactions using plaintext tokens -type PlainDelegatedOutput struct { - // The owner is the serialization of a SerializedIdentity struct - Owner []byte `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // The delegatees is an arrary of the serialized identities that can spend the output on behalf - // the owner - Delegatees [][]byte `protobuf:"bytes,2,rep,name=delegatees,proto3" json:"delegatees,omitempty"` - // The token type - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - // The quantity of tokens - Quantity uint64 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PlainDelegatedOutput) Reset() { *m = PlainDelegatedOutput{} } -func (m *PlainDelegatedOutput) String() string { return proto.CompactTextString(m) } -func (*PlainDelegatedOutput) ProtoMessage() {} -func (*PlainDelegatedOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_transaction_a359b0c8d648a383, []int{8} -} -func (m *PlainDelegatedOutput) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PlainDelegatedOutput.Unmarshal(m, b) -} -func (m *PlainDelegatedOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PlainDelegatedOutput.Marshal(b, m, deterministic) -} -func (dst *PlainDelegatedOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainDelegatedOutput.Merge(dst, src) -} -func (m *PlainDelegatedOutput) XXX_Size() int { - return xxx_messageInfo_PlainDelegatedOutput.Size(m) -} -func (m *PlainDelegatedOutput) XXX_DiscardUnknown() { - xxx_messageInfo_PlainDelegatedOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_PlainDelegatedOutput proto.InternalMessageInfo - -func (m *PlainDelegatedOutput) GetOwner() []byte { - if m != nil { - return m.Owner - } - return nil -} - -func (m *PlainDelegatedOutput) GetDelegatees() [][]byte { - if m != nil { - return m.Delegatees - } - return nil -} - -func (m *PlainDelegatedOutput) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *PlainDelegatedOutput) GetQuantity() uint64 { - if m != nil { - return m.Quantity - } - return 0 -} - func init() { - proto.RegisterType((*TokenTransaction)(nil), "sdk.TokenTransaction") - proto.RegisterType((*PlainTokenAction)(nil), "sdk.PlainTokenAction") - proto.RegisterType((*PlainImport)(nil), "sdk.PlainImport") - proto.RegisterType((*PlainTransfer)(nil), "sdk.PlainTransfer") - proto.RegisterType((*PlainApprove)(nil), "sdk.PlainApprove") - proto.RegisterType((*PlainTransferFrom)(nil), "sdk.PlainTransferFrom") - proto.RegisterType((*PlainOutput)(nil), "sdk.PlainOutput") - proto.RegisterType((*InputId)(nil), "sdk.InputId") - proto.RegisterType((*PlainDelegatedOutput)(nil), "sdk.PlainDelegatedOutput") + proto.RegisterType((*TokenTransaction)(nil), "token.sdk.TokenTransaction") + proto.RegisterType((*TokenAction)(nil), "token.TokenAction") + proto.RegisterType((*TokenOwner)(nil), "token.TokenOwner") + proto.RegisterType((*Issue)(nil), "token.Issue") + proto.RegisterType((*Transfer)(nil), "token.Transfer") + proto.RegisterType((*Token)(nil), "token.Token") + proto.RegisterType((*TokenId)(nil), "token.TokenId") + proto.RegisterEnum("token.TokenOwner_Type", TokenOwner_Type_name, TokenOwner_Type_value) } func init() { - proto.RegisterFile("token/transaction.proto", fileDescriptor_transaction_a359b0c8d648a383) -} - -var fileDescriptor_transaction_a359b0c8d648a383 = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x8f, 0xd2, 0x40, - 0x14, 0xa7, 0x50, 0xba, 0xf8, 0x68, 0x57, 0x98, 0x5d, 0x63, 0xe3, 0xc1, 0x90, 0xc6, 0x18, 0x63, - 0x0c, 0x8d, 0xee, 0xaa, 0x57, 0x97, 0x6c, 0x0c, 0x9c, 0x34, 0x23, 0x17, 0xbd, 0x90, 0xc2, 0xcc, - 0xb2, 0x8d, 0xd0, 0x19, 0x87, 0x41, 0x21, 0xf1,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1b, 0x34, 0x0c, 0xa8, 0x01, 0xd1, 0x77, 0x38, 0xfd, 0x5b, - 0xe7, 0x03, 0x9d, 0x1e, 0x02, 0x14, 0xbb, 0x70, 0x73, 0x4b, 0x3e, 0x2d, 0x31, 0xbb, 0xce, 0x8d, - 0x03, 0x9d, 0xdd, 0x6a, 0xe7, 0xc1, 0xb3, 0x4f, 0x4f, 0xe7, 0xa9, 0xbe, 0x5e, 0x4f, 0xfb, 0x33, - 0xb1, 0x8c, 0xaf, 0xb7, 0x92, 0xab, 0x05, 0x67, 0x73, 0xae, 0xe2, 0xab, 0x64, 0xaa, 0xd2, 0x59, - 0x8c, 0x3f, 0xa4, 0x55, 0x8c, 0x7f, 0xaa, 0xa9, 0x87, 0xe8, 0xec, 0x77, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x10, 0xe3, 0xb3, 0x61, 0xb9, 0x04, 0x00, 0x00, + proto.RegisterFile("token/transaction.proto", fileDescriptor_transaction_f976d1453a3f05a8) +} + +var fileDescriptor_transaction_f976d1453a3f05a8 = []byte{ + // 409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x5d, 0xaf, 0xd2, 0x40, + 0x10, 0x6d, 0x2f, 0xb4, 0xb7, 0x77, 0x40, 0xc4, 0xd1, 0x68, 0x73, 0x9f, 0x6e, 0x1a, 0x83, 0x4a, + 0xb4, 0x4d, 0xd0, 0xc4, 0x67, 0x89, 0x18, 0xfa, 0xe0, 0x47, 0xd6, 0xfa, 0xc2, 0x0b, 0x16, 0xba, + 0xc0, 0x46, 0x69, 0xeb, 0x76, 0x1b, 0xe8, 0x0f, 0xf1, 0xff, 0x9a, 0x4e, 0x17, 0x68, 0x62, 0xf4, + 0x6d, 0x67, 0xce, 0x99, 0x33, 0xe7, 0x4c, 0x0b, 0x4f, 0x54, 0xf6, 0x83, 0xa7, 0x81, 0x92, 0x71, + 0x5a, 0xc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, 0xb4, 0xa2, 0xd3, 0x16, 0x76, 0x02, 0xbd, 0x05, 0x38, + 0x27, 0xdb, 0x38, 0x02, 0x5b, 0xa4, 0xad, 0x91, 0x41, 0x7b, 0x24, 0x4c, 0x98, 0x46, 0xdb, 0xda, + 0x57, 0xff, 0xd3, 0xfe, 0x0e, 0x16, 0x75, 0xf0, 0x19, 0x58, 0x59, 0x9d, 0x4b, 0x7f, 0x85, 0x07, + 0x7f, 0x05, 0x66, 0x0d, 0x8e, 0xa8, 0x0f, 0x53, 0xa7, 0xbd, 0xd1, 0x07, 0xb8, 0x05, 0xe7, 0x57, + 0x19, 0xa7, 0x4a, 0xa8, 0x8a, 0xee, 0x7d, 0xc3, 0xce, 0xb5, 0xf7, 0x06, 0xae, 0xb5, 0x39, 0x7c, + 0x08, 0x96, 0x3a, 0x2e, 0x45, 0x42, 0x3b, 0xea, 0xd9, 0x63, 0x98, 0xe0, 0x23, 0xb0, 0x44, 0x9a, + 0xf0, 0x23, 0x09, 0xde, 0x63, 0x4d, 0x31, 0x7d, 0xb9, 0x18, 0x6f, 0x85, 0xda, 0x95, 0x2b, 0x7f, + 0x9d, 0xed, 0x83, 0x5d, 0x95, 0x73, 0xf9, 0x93, 0x27, 0x5b, 0x2e, 0x83, 0x4d, 0xbc, 0x92, 0x62, + 0x1d, 0xd0, 0x9f, 0x5a, 0x04, 0xe4, 0x72, 0x65, 0x53, 0xf5, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x5a, 0xf7, 0x90, 0xb8, 0xd2, 0x02, 0x00, 0x00, } diff --git a/third_party/github.com/hyperledger/fabric/protos/utils/commonutils.go b/third_party/github.com/hyperledger/fabric/protoutil/commonutils.go similarity index 99% rename from third_party/github.com/hyperledger/fabric/protos/utils/commonutils.go rename to third_party/github.com/hyperledger/fabric/protoutil/commonutils.go index 39a2da0e21..9d7d1f03c2 100644 --- a/third_party/github.com/hyperledger/fabric/protos/utils/commonutils.go +++ b/third_party/github.com/hyperledger/fabric/protoutil/commonutils.go @@ -8,7 +8,7 @@ Notice: This file has been modified for Hyperledger Fabric SDK Go usage. Please review third_party pinning scripts and patches for more details. */ -package utils +package protoutil import ( "fmt" diff --git a/third_party/github.com/hyperledger/fabric/protos/utils/proputils.go b/third_party/github.com/hyperledger/fabric/protoutil/proputils.go similarity index 99% rename from third_party/github.com/hyperledger/fabric/protos/utils/proputils.go rename to third_party/github.com/hyperledger/fabric/protoutil/proputils.go index 35ef973e28..092b07de00 100644 --- a/third_party/github.com/hyperledger/fabric/protos/utils/proputils.go +++ b/third_party/github.com/hyperledger/fabric/protoutil/proputils.go @@ -8,7 +8,7 @@ Notice: This file has been modified for Hyperledger Fabric SDK Go usage. Please review third_party pinning scripts and patches for more details. */ -package utils +package protoutil import ( "github.com/golang/protobuf/proto" diff --git a/third_party/github.com/hyperledger/fabric/protos/common/signed_data.go b/third_party/github.com/hyperledger/fabric/protoutil/signeddata.go similarity index 54% rename from third_party/github.com/hyperledger/fabric/protos/common/signed_data.go rename to third_party/github.com/hyperledger/fabric/protoutil/signeddata.go index 4fddc8c072..f782ddbc74 100644 --- a/third_party/github.com/hyperledger/fabric/protos/common/signed_data.go +++ b/third_party/github.com/hyperledger/fabric/protoutil/signeddata.go @@ -1,57 +1,44 @@ /* -Copyright IBM Corp. 2016 All Rights Reserved. +Copyright IBM Corp. All Rights Reserved. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +SPDX-License-Identifier: Apache-2.0 */ /* Notice: This file has been modified for Hyperledger Fabric SDK Go usage. Please review third_party pinning scripts and patches for more details. */ -package common +package protoutil import ( "fmt" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/util" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" ) // SignedData is used to represent the general triplet required to verify a signature // This is intended to be generic across crypto schemes, while most crypto schemes will // include the signing identity and a nonce within the Data, this is left to the crypto -// implementation +// implementation. type SignedData struct { Data []byte Identity []byte Signature []byte } -// Signable types are those which can map their contents to a set of SignedData -type Signable interface { - // AsSignedData returns the set of signatures for a structure as SignedData or an error indicating why this was not possible - AsSignedData() ([]*SignedData, error) -} - -// AsSignedData returns the set of signatures for the ConfigUpdateEnvelope as SignedData or an error indicating why this was not possible -func (ce *ConfigUpdateEnvelope) AsSignedData() ([]*SignedData, error) { +// ConfigUpdateEnvelopeAsSignedData returns the set of signatures for the +// ConfigUpdateEnvelope as SignedData or an error indicating why this was not +// possible. +func ConfigUpdateEnvelopeAsSignedData(ce *common.ConfigUpdateEnvelope) ([]*SignedData, error) { if ce == nil { return nil, fmt.Errorf("No signatures for nil SignedConfigItem") } result := make([]*SignedData, len(ce.Signatures)) for i, configSig := range ce.Signatures { - sigHeader := &SignatureHeader{} + sigHeader := &common.SignatureHeader{} err := proto.Unmarshal(configSig.SignatureHeader, sigHeader) if err != nil { return nil, err @@ -68,13 +55,14 @@ func (ce *ConfigUpdateEnvelope) AsSignedData() ([]*SignedData, error) { return result, nil } -// AsSignedData returns the signatures for the Envelope as SignedData slice of length 1 or an error indicating why this was not possible -func (env *Envelope) AsSignedData() ([]*SignedData, error) { +// EnvelopeAsSignedData returns the signatures for the Envelope as SignedData +// slice of length 1 or an error indicating why this was not possible. +func EnvelopeAsSignedData(env *common.Envelope) ([]*SignedData, error) { if env == nil { return nil, fmt.Errorf("No signatures for nil Envelope") } - payload := &Payload{} + payload := &common.Payload{} err := proto.Unmarshal(env.Payload, payload) if err != nil { return nil, err @@ -84,7 +72,7 @@ func (env *Envelope) AsSignedData() ([]*SignedData, error) { return nil, fmt.Errorf("Missing Header") } - shdr := &SignatureHeader{} + shdr := &common.SignatureHeader{} err = proto.Unmarshal(payload.Header.SignatureHeader, shdr) if err != nil { return nil, fmt.Errorf("GetSignatureHeaderFromBytes failed, err %s", err) diff --git a/third_party/github.com/hyperledger/fabric/protos/utils/txutils.go b/third_party/github.com/hyperledger/fabric/protoutil/txutils.go similarity index 95% rename from third_party/github.com/hyperledger/fabric/protos/utils/txutils.go rename to third_party/github.com/hyperledger/fabric/protoutil/txutils.go index b4343d2f39..09f4db9213 100644 --- a/third_party/github.com/hyperledger/fabric/protos/utils/txutils.go +++ b/third_party/github.com/hyperledger/fabric/protoutil/txutils.go @@ -8,7 +8,7 @@ Notice: This file has been modified for Hyperledger Fabric SDK Go usage. Please review third_party pinning scripts and patches for more details. */ -package utils +package protoutil import ( "github.com/golang/protobuf/proto" @@ -59,7 +59,10 @@ func GetEnvelopeFromBlock(data []byte) (*common.Envelope, error) { // GetBytesProposalPayloadForTx takes a ChaincodeProposalPayload and returns // its serialized version according to the visibility field -func GetBytesProposalPayloadForTx(payload *peer.ChaincodeProposalPayload, visibility []byte) ([]byte, error) { +func GetBytesProposalPayloadForTx( + payload *peer.ChaincodeProposalPayload, + visibility []byte, +) ([]byte, error) { // check for nil argument if payload == nil { return nil, errors.New("nil arguments")