我开始学习锯齿。最初,我计划在锯齿网络上安装以太坊智能合约。为了在执行此命令后执行this tutorial,docker-compose up --build我收到以下错误,
../github.com/hyperledger/sawtooth-sdk-go/processor/context.go:24:2: cannot find package "protobuf/events_pb2" in any of:
/usr/lib/go-1.11/src/protobuf/events_pb2 (from $GOROOT)
/project/sawtooth-seth/processor/src/protobuf/events_pb2 (from $GOPATH)
/project/sawtooth-seth/burrow/src/protobuf/events_pb2
/project/sawtooth-seth/common/src/protobuf/events_pb2
../github.com/hyperledger/sawtooth-sdk-go/processor/processor.go:28:2: cannot find package "protobuf/network_pb2" in any of:
/usr/lib/go-1.11/src/protobuf/network_pb2 (from $GOROOT)
/project/sawtooth-seth/processor/src/protobuf/network_pb2 (from $GOPATH)
/project/sawtooth-seth/burrow/src/protobuf/network_pb2
/project/sawtooth-seth/common/src/protobuf/network_pb2
../github.com/hyperledger/sawtooth-sdk-go/processor/handler.go:30:2: cannot find package "protobuf/processor_pb2" in any of:
/usr/lib/go-1.11/src/protobuf/processor_pb2 (from $GOROOT)
/project/sawtooth-seth/processor/src/protobuf/processor_pb2 (from $GOPATH)
/project/sawtooth-seth/burrow/src/protobuf/processor_pb2
/project/sawtooth-seth/common/src/protobuf/processor_pb2
../github.com/hyperledger/sawtooth-sdk-go/processor/context.go:25:2: cannot find package "protobuf/state_context_pb2" in any of:
/usr/lib/go-1.11/src/protobuf/state_context_pb2 (from $GOROOT)
/project/sawtooth-seth/processor/src/protobuf/state_context_pb2 (from $GOPATH)
/project/sawtooth-seth/burrow/src/protobuf/state_context_pb2
/project/sawtooth-seth/common/src/protobuf/state_context_pb2
../github.com/hyperledger/sawtooth-sdk-go/processor/worker.go:27:2: cannot find package "protobuf/transaction_pb2" in any of:
/usr/lib/go-1.11/src/protobuf/transaction_pb2 (from $GOROOT)
/project/sawtooth-seth/processor/src/protobuf/transaction_pb2 (from $GOPATH)
/project/sawtooth-seth/burrow/src/protobuf/transaction_pb2
/project/sawtooth-seth/common/src/protobuf/transaction_pb2
../github.com/hyperledger/sawtooth-sdk-go/messaging/connection.go:28:2: cannot find package
"protobuf/validator_pb2" in any of:
/usr/lib/go-1.11/src/protobuf/validator_pb2 (from $GOROOT)
/project/sawtooth-seth/processor/src/protobuf/validator_pb2 (from $GOPATH)
/project/sawtooth-seth/burrow/src/protobuf/validator_pb2
/project/sawtooth-seth/common/src/protobuf/validator_pb2
ERROR: Service 'seth-tp' failed to build: The command '/bin/sh -c go build -o /project/sawtooth-seth/processor/bin/seth-tp' returned a non-zero code: 1发布于 2020-01-13 13:40:07
新答案
此错误现在已修复。PR https://github.com/hyperledger/sawtooth-seth/pull/116已合并。
__
老答案
您看到的错误是由于最近在处理protobuf文件的方式上更新了sawtooth sdk-go。此PR https://github.com/hyperledger/sawtooth-sdk-go/pull/38中的详细信息。
为了提供更多信息-SDK的src/protobuf应该设置在GOPATH中。此外,应更新代码以开始使用打包的protobuf文件,而不是在每次构建时重新生成它们。
PR https://github.com/hyperledger/sawtooth-seth/pull/116解决了这个问题。请使用它,直到代码合并到主线。
您也可以访问RocketChat频道#sawtooth seth和#sawtooth sdk-dev获取更多信息。
https://stackoverflow.com/questions/59696490
复制相似问题