Skip to content

Commit 1897a19

Browse files
committed
Merged in v1.0.1-branch (pull request hyperledger#1)
2 parents 12aa3c8 + e43b68f commit 1897a19

File tree

579 files changed

+18150
-9468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

579 files changed

+18150
-9468
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
#
2+
# Copyright IBM Corp. All Rights Reserved.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
16
obc-peer
27
.git

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ tags
1010
.tags
1111
.vagrant/
1212
/build
13+
/release/darwin-amd64
14+
/release/linux-amd64
15+
/release/linux-s390x
16+
/release/linux-ppc64le
17+
/release/windows-amd64
1318
# Emacs backup files
1419
*~
1520
*#

CHANGELOG.md

Lines changed: 269 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# - checks - runs all tests/checks
1111
# - desk-check - runs linters and verify to test changed packages
1212
# - configtxgen - builds a native configtxgen binary
13+
# - configtxlator - builds a native configtxlator binary
1314
# - cryptogen - builds a native cryptogen binary
1415
# - peer - builds a native fabric peer binary
1516
# - orderer - builds a native fabric orderer binary
@@ -30,12 +31,14 @@
3031
# - tools-docker[-clean] - ensures the tools container is available[/cleaned]
3132
# - protos - generate all protobuf artifacts based on .proto files
3233
# - clean - cleans the build area
33-
# - dist-clean - superset of 'clean' that also removes persistent state
34+
# - clean-all - superset of 'clean' that also removes persistent state
35+
# - dist-clean - clean release packages for all target platforms
3436
# - unit-test-clean - cleans unit test state (particularly from docker)
3537

3638
PROJECT_NAME = hyperledger/fabric
37-
BASE_VERSION = 1.0.0-beta-javacc
38-
PREV_VERSION = 1.0.0-alpha2
39+
<<<<<<< HEAD
40+
BASE_VERSION = 1.0.1-javacc
41+
PREV_VERSION = 1.0.0
3942
IS_RELEASE = true
4043

4144
ifneq ($(IS_RELEASE),true)
@@ -48,7 +51,8 @@ endif
4851
PKGNAME = github.com/$(PROJECT_NAME)
4952
CGO_FLAGS = CGO_CFLAGS=" "
5053
ARCH=$(shell uname -m)
51-
CHAINTOOL_RELEASE=v0.10.3
54+
MARCH=$(shell go env GOOS)-$(shell go env GOARCH)
55+
CHAINTOOL_RELEASE=1.0.0
5256
BASEIMAGE_RELEASE=$(shell cat ./.baseimage-release)
5357

5458
# defined in common/metadata/metadata.go
@@ -62,7 +66,7 @@ GO_LDFLAGS = $(patsubst %,-X $(PKGNAME)/common/metadata.%,$(METADATA_VAR))
6266

6367
GO_TAGS ?=
6468

65-
CHAINTOOL_URL ?= https://github.com/hyperledger/fabric-chaintool/releases/download/$(CHAINTOOL_RELEASE)/chaintool
69+
CHAINTOOL_URL ?= https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/chaintool-$(CHAINTOOL_RELEASE)/hyperledger-fabric-chaintool-$(CHAINTOOL_RELEASE).jar
6670

6771
export GO_LDFLAGS
6872

@@ -78,9 +82,10 @@ PROJECT_FILES = $(shell git ls-files | grep -v ^test | grep -v ^unit-test | \
7882
grep -v ^bddtests | grep -v ^docs | grep -v _test.go$ | grep -v .md$ | \
7983
grep -v ^.git | grep -v ^examples | grep -v ^devenv | grep -v .png$ | \
8084
grep -v ^LICENSE )
85+
RELEASE_TEMPLATES = $(shell git ls-files | grep "release/templates")
8186
IMAGES = peer orderer ccenv javaenv buildenv testenv zookeeper kafka couchdb tools
8287
RELEASE_PLATFORMS = windows-amd64 darwin-amd64 linux-amd64 linux-ppc64le linux-s390x
83-
RELEASE_PKGS = configtxgen cryptogen configtxlator
88+
RELEASE_PKGS = configtxgen cryptogen configtxlator peer orderer
8489

8590
pkgmap.cryptogen := $(PKGNAME)/common/tools/cryptogen
8691
pkgmap.configtxgen := $(PKGNAME)/common/configtx/tool/configtxgen
@@ -183,7 +188,7 @@ linter: buildenv
183188
%/chaintool: Makefile
184189
@echo "Installing chaintool"
185190
@mkdir -p $(@D)
186-
curl -L $(CHAINTOOL_URL) > $@
191+
curl -fL $(CHAINTOOL_URL) > $@
187192
chmod +x $@
188193

189194
# We (re)build a package within a docker context but persist the $GOPATH/pkg
@@ -251,6 +256,7 @@ build/image/couchdb/payload: images/couchdb/docker-entrypoint.sh \
251256
images/couchdb/vm.args
252257
build/image/tools/payload: build/docker/bin/cryptogen \
253258
build/docker/bin/configtxgen \
259+
build/docker/bin/configtxlator \
254260
build/docker/bin/peer \
255261
build/sampleconfig.tar.bz2
256262

@@ -284,7 +290,7 @@ build/goshim.tar.bz2: $(GOSHIM_DEPS)
284290
@echo "Creating $@"
285291
@tar -jhc -C $(GOPATH)/src $(patsubst $(GOPATH)/src/%,%,$(GOSHIM_DEPS)) > $@
286292

287-
build/sampleconfig.tar.bz2:
293+
build/sampleconfig.tar.bz2: $(shell find sampleconfig -type f)
288294
(cd sampleconfig && tar -jc *) > $@
289295

290296
build/javashim.tar.bz2: $(JAVASHIM_DEPS)
@@ -295,7 +301,7 @@ build/%.tar.bz2:
295301
@tar -jc $^ > $@
296302

297303
# builds release packages for the host platform
298-
release: $(patsubst %,release/%, $(shell go env GOOS)-$(shell go env GOARCH))
304+
release: $(patsubst %,release/%, $(MARCH))
299305

300306
# builds release packages for all target platforms
301307
release-all: $(patsubst %,release/%, $(RELEASE_PLATFORMS))
@@ -343,14 +349,52 @@ release/%/bin/cryptogen: $(PROJECT_FILES)
343349
mkdir -p $(@D)
344350
$(CGO_FLAGS) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(abspath $@) -tags "$(GO_TAGS)" -ldflags "$(GO_LDFLAGS)" $(pkgmap.$(@F))
345351

352+
release/%/bin/orderer: $(PROJECT_FILES)
353+
@echo "Building $@ for $(GOOS)-$(GOARCH)"
354+
mkdir -p $(@D)
355+
$(CGO_FLAGS) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(abspath $@) -tags "$(GO_TAGS)" -ldflags "$(GO_LDFLAGS)" $(pkgmap.$(@F))
356+
357+
release/%/bin/peer: GO_LDFLAGS = $(patsubst %,-X $(PKGNAME)/common/metadata.%,$(METADATA_VAR))
358+
359+
release/%/bin/peer: $(PROJECT_FILES)
360+
@echo "Building $@ for $(GOOS)-$(GOARCH)"
361+
mkdir -p $(@D)
362+
$(CGO_FLAGS) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(abspath $@) -tags "$(GO_TAGS)" -ldflags "$(GO_LDFLAGS)" $(pkgmap.$(@F))
363+
346364
release/%/install: $(PROJECT_FILES)
347-
mkdir -p $@
348-
@cat $@/../../templates/get-docker-images.in \
365+
mkdir -p $(@D)/bin
366+
@cat $(@D)/../templates/get-docker-images.in \
349367
| sed -e 's/_NS_/$(DOCKER_NS)/g' \
350368
| sed -e 's/_ARCH_/$(DOCKER_ARCH)/g' \
351369
| sed -e 's/_VERSION_/$(PROJECT_VERSION)/g' \
352-
> $@/get-docker-images.sh
353-
@chmod +x $@/get-docker-images.sh
370+
| sed -e 's/_BASE_DOCKER_TAG_/$(BASE_DOCKER_TAG)/g' \
371+
> $(@D)/bin/get-docker-images.sh
372+
@chmod +x $(@D)/bin/get-docker-images.sh
373+
@cat $(@D)/../templates/get-byfn.in \
374+
| sed -e 's/_VERSION_/$(PROJECT_VERSION)/g' \
375+
> $(@D)/bin/get-byfn.sh
376+
@chmod +x $(@D)/bin/get-byfn.sh
377+
378+
.PHONY: dist
379+
dist: dist-clean release
380+
cd release/$(MARCH) && tar -czvf hyperledger-fabric-$(MARCH).$(PROJECT_VERSION).tar.gz *
381+
382+
dist-all: dist-clean release-all $(patsubst %,dist/%, $(RELEASE_PLATFORMS))
383+
384+
dist/windows-amd64:
385+
cd release/windows-amd64 && tar -czvf hyperledger-fabric-windows-amd64.$(PROJECT_VERSION).tar.gz *
386+
387+
dist/darwin-amd64:
388+
cd release/darwin-amd64 && tar -czvf hyperledger-fabric-darwin-amd64.$(PROJECT_VERSION).tar.gz *
389+
390+
dist/linux-amd64:
391+
cd release/linux-amd64 && tar -czvf hyperledger-fabric-linux-amd64.$(PROJECT_VERSION).tar.gz *
392+
393+
dist/linux-ppc64le:
394+
cd release/linux-ppc64le && tar -czvf hyperledger-fabric-linux-ppc64le.$(PROJECT_VERSION).tar.gz *
395+
396+
dist/linux-s390x:
397+
cd release/linux-s390x && tar -czvf hyperledger-fabric-linux-s390x.$(PROJECT_VERSION).tar.gz *
354398

355399
.PHONY: protos
356400
protos: buildenv
@@ -367,10 +411,18 @@ docker-clean: $(patsubst %,%-docker-clean, $(IMAGES))
367411
clean: docker-clean unit-test-clean release-clean
368412
-@rm -rf build ||:
369413

370-
.PHONY: dist-clean
371-
dist-clean: clean gotools-clean
414+
.PHONY: clean-all
415+
clean-all: clean gotools-clean dist-clean release-clean unit-test-clean
372416
-@rm -rf /var/hyperledger/* ||:
373417

418+
.PHONY: dist-clean
419+
dist-clean:
420+
-@rm -rf release/windows-amd64/hyperledger-fabric-windows-amd64.$(PROJECT_VERSION).tar.gz ||:
421+
-@rm -rf release/darwin-amd64/hyperledger-fabric-darwin-amd64.$(PROJECT_VERSION).tar.gz ||:
422+
-@rm -rf release/linux-amd64/hyperledger-fabric-linux-amd64.$(PROJECT_VERSION).tar.gz ||:
423+
-@rm -rf release/linux-ppc64le/hyperledger-fabric-linux-ppc64le.$(PROJECT_VERSION).tar.gz ||:
424+
-@rm -rf release/linux-s390x/hyperledger-fabric-linux-s390x.$(PROJECT_VERSION).tar.gz ||:
425+
374426
%-release-clean:
375427
$(eval TARGET = ${patsubst %-release-clean,%,${@}})
376428
-@rm -rf release/$(TARGET)

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,35 @@ the [Hyperledger Project Lifecycle document](https://wiki.hyperledger.org/commun
1313
[![GoDoc](https://godoc.org/github.com/hyperledger/fabric?status.svg)](https://godoc.org/github.com/hyperledger/fabric)
1414
[![Documentation Status](https://readthedocs.org/projects/hyperledger-fabric/badge/?version=latest)](http://hyperledger-fabric.readthedocs.io/en/latest/?badge=latest)
1515

16-
## Hyperledger fabric
16+
## Hyperledger Fabric
1717

18-
The fabric is an implementation of blockchain technology, leveraging familiar
19-
and proven technologies. It is a modular architecture allowing pluggable
20-
implementations of various function. It features powerful container technology
21-
to host any mainstream language for smart contracts development.
18+
Hyperledger Fabric is a platform for distributed ledger solutions, underpinned
19+
by a modular architecture delivering high degrees of confidentiality,
20+
resiliency, flexibility and scalability. It is designed to support pluggable
21+
implementations of different components, and accommodate the complexity and
22+
intricacies that exist across the economic ecosystem.
23+
24+
Hyperledger Fabric delivers a uniquely elastic and extensible architecture,
25+
distinguishing it from alternative blockchain solutions. Planning for the
26+
future of enterprise blockchain requires building on top of a fully-vetted,
27+
open source architecture; Hyperledger Fabric is your starting point.
2228

2329
## Documentation, Getting Started and Developer Guides
2430

25-
This is a **read-only mirror** of the formal Gerrit repository, please visit our
31+
Please visit our
2632
[online documentation](http://hyperledger-fabric.readthedocs.io/en/latest/) for
2733
information on getting started using and developing with the fabric, SDK and chaincode.
2834

35+
It's recommended for first-time users to begin by going through the
36+
[Getting Started](http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html)
37+
section of the documentation in order to gain familiarity with the Hyperledger
38+
Fabric components and the basic transaction flow.
39+
2940
## Contributing
3041

31-
We welcome contributions to the Hyperledger Project in many forms. There’s always plenty to do!
32-
Check [the documentation on how to contribute to this project](http://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html) for the full details.
42+
We welcome contributions to the Hyperledger Fabric Project in many forms.
43+
There’s always plenty to do! Check [the documentation on how to contribute to this project](http://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html)
44+
for the full details.
3345

3446
## Community
3547

@@ -50,4 +62,3 @@ Check [the documentation on how to contribute to this project](http://hyperledge
5062
## License <a name="license"></a>
5163

5264
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
53-
s

bccsp/factory/opts_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package factory
1818
import (
1919
"testing"
2020

21-
"github.com/docker/docker/pkg/testutil/assert"
21+
"github.com/stretchr/testify/assert"
2222
)
2323

2424
func TestFactoryOptsFactoryName(t *testing.T) {

bccsp/pkcs11/pkcs11.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func (csp *impl) generateECKey(curve asn1.ObjectIdentifier, ephemeral bool) (ski
239239
pkcs11.NewAttribute(pkcs11.CKA_TOKEN, !ephemeral),
240240
pkcs11.NewAttribute(pkcs11.CKA_VERIFY, true),
241241
pkcs11.NewAttribute(pkcs11.CKA_EC_PARAMS, marshaledOID),
242-
pkcs11.NewAttribute(pkcs11.CKA_PRIVATE, true),
242+
pkcs11.NewAttribute(pkcs11.CKA_PRIVATE, false),
243243

244244
pkcs11.NewAttribute(pkcs11.CKA_ID, publabel),
245245
pkcs11.NewAttribute(pkcs11.CKA_LABEL, publabel),

bddtests/.behaverc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#
2+
# Copyright IBM Corp. All Rights Reserved.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
16
[behave]
27
tags=~@orderer
38
~@endorser

bddtests/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ make clean
6262
make peer
6363
```
6464

65+
The peer executable will be located in the build/bin folder. Make sure that your PATH enviroment variable contains the location.
66+
Execute the following command if necessary.
67+
```
68+
export PATH=$PATH:$GOPATH/src/github.com/hyperledger/fabric/build/bin
69+
```
70+
6571
The behave system also uses several docker containers. Execute the following commands to create the required docker containers.
6672

6773
```

bddtests/common/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Copyright IBM Corp. All Rights Reserved.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#

0 commit comments

Comments
 (0)