Skip to content

Commit

Permalink
FAB-10606 JSDK v1.2 readme release notes
Browse files Browse the repository at this point in the history
PS
08 Updated pom with latest dependencies.
15 Update pom.xml, .env and changelog

Change-Id: I15169b383640fe6efab07718501e0a69b56a7ad7
Signed-off-by: rickr <cr22rc@gmail.com>
  • Loading branch information
cr22rc committed Jul 26, 2018
1 parent 3181254 commit 3376018
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 53 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## v1.2.0
Thu Jul 26 12:22:31 EDT 2018

* [e9dba4e](https://github.com/hyperledger/fabric-sdk-java/commit/e9dba4e) FAB-10606 JSDK v1.2 readme release notes
* [3181254](https://github.com/hyperledger/fabric-sdk-java/commit/3181254) FAB-11326 SDchaincode to chaincode specify
* [015c142](https://github.com/hyperledger/fabric-sdk-java/commit/015c142) FAB-11283 Minor logging issues.
* [6607f60](https://github.com/hyperledger/fabric-sdk-java/commit/6607f60) FAB-11227 Update blocks trigger certificate loading
* [4cf7f82](https://github.com/hyperledger/fabric-sdk-java/commit/4cf7f82) FAB-11177 Multithreaded test.
* [c5c31b8](https://github.com/hyperledger/fabric-sdk-java/commit/c5c31b8) FAB-8805 JSDK Service Discovery
* [a21df07](https://github.com/hyperledger/fabric-sdk-java/commit/a21df07) FAB-10966 upgrade dependencies
* [f80259c](https://github.com/hyperledger/fabric-sdk-java/commit/f80259c) [FAB-9373](https://jira.hyperledger.org/browse/FAB-9373) Add SDK support for Certificate API
* [edd54f8](https://github.com/hyperledger/fabric-sdk-java/commit/edd54f8) FAB-10075 Missing chaincodeID info in BlockInfo
* [cb741fb](https://github.com/hyperledger/fabric-sdk-java/commit/cb741fb) FAB-9680 private_collection
* [413a242](https://github.com/hyperledger/fabric-sdk-java/commit/413a242) FAB-10322 HFCAClient needs timeout settings
* [8f6944a](https://github.com/hyperledger/fabric-sdk-java/commit/8f6944a) FAB-10254 Add Support for OWASP DependencyCheck
* [2e8b029](https://github.com/hyperledger/fabric-sdk-java/commit/2e8b029) FAB-10254 Add Support for OWASP DependencyCheck
* [cf57b40](https://github.com/hyperledger/fabric-sdk-java/commit/cf57b40) [FAB-10230](https://jira.hyperledger.org/browse/FAB-10230) Add self-signed TLS cert generation
* [aca9559](https://github.com/hyperledger/fabric-sdk-java/commit/aca9559) [FAB-6584](https://jira.hyperledger.org/browse/FAB-6584) Add amcl crypto library
* [2294b0a](https://github.com/hyperledger/fabric-sdk-java/commit/2294b0a) FAB-9986 JSDK v1.2 commencement

## v1.1.0
Wed May 9 20:48:37 EDT 2018

Expand Down
55 changes: 16 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Java SDK for Hyperledger Fabric 1.2
k# Java SDK for Hyperledger Fabric 1.2
Welcome to Java SDK for Hyperledger project. The SDK helps facilitate Java applications to manage the lifecycle of
Hyperledger channels and user chaincode. The SDK also provides a means to execute
user chaincode, query blocks
Expand All @@ -11,7 +11,7 @@ Note, the SDK does ***not*** provide a means of persistence
for the application defined channels and user artifacts on the client. This is left for the embedding application to best manage.
Channels may be serialized via Java serialization in the context of a client.
Channels deserialized are not in an initialized state.
Applications need to handle migration of serialzed files between versions.
Applications need to handle migration of serialized files between versions.

The SDK also provides a client for Hyperledger's certificate authority. The SDK is however not dependent on this
particular implementation of a certificate authority. Other Certificate authority's maybe used by implementing the
Expand All @@ -22,23 +22,30 @@ SDK's `Enrollment` interface.
only help you familiarize to get started with the SDK if you are new in this domain.


## IMPORTANT: Version 1.2 IS WORK IN PROGRESS!
If you don't require features of Fabric or Fabric CA version 1.2 you probably should consider the v1.1.x version of the SDK.
To get the actual v1.1.0 SDK:
## Release notes

|Release | Notes |
|--------|:-----:|
|1.2 | [v1.2 release notes](./docs/release_v1.2.0_notes.md)|
|1.1 | [v1.1 release notes](./docs/release_v1.1.0_notes.md)|



## Checkout SDK from Github
```
git clone https://github.com/hyperledger/fabric-sdk-java.git
cd fabric-sdk-java/
git checkout -b release-1.1
git checkout -b release-1.2
```

For Java applications use the latest published v1.1.x releases:
## Java applications
For Java applications use the latest published v1.2.x releases:
```
<!-- https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java -->
<dependency>
<groupId>org.hyperledger.fabric-sdk-java</groupId>
<artifactId>fabric-sdk-java</artifactId>
<version>1.1.0</version>
<version>1.2.0/version>
</dependency>
```
Expand All @@ -54,38 +61,8 @@ For Java applications use the latest published v1.1.x releases:

`*************************************************`

## 1.2.0-SNAPSHOT builds
Work in progress 1.2.0 SNAPSHOT builds can be used by adding the following to your application's
pom.xml
```
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java -->
<dependency>
<groupId>org.hyperledger.fabric-sdk-java</groupId>
<artifactId>fabric-sdk-java</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
```



You can clone these projects by going to the [Hyperledger repository](https://gerrit.hyperledger.org/r/#/admin/projects/).

## Latest Fabric Builds.
Latest Fabric builds are seldom needed except for those working on the very latest Fabric features.
Expand Down Expand Up @@ -242,7 +219,7 @@ For v1.2 integration the commands use the v12 profiles in configtx.yaml.

**Note:** The above describes how this was done. If you redo this there are private key files
which are produced with unique names which won't match what's expected in the integration tests.
One examle of this is the docker-compose.yaml (search for **_sk**)
One example of this is the docker-compose.yaml (search for **_sk**)


### GO Lang chaincode
Expand Down
16 changes: 8 additions & 8 deletions docs/release_v1.1.0_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The default is for Peers to have all roles.


The new peer eventing services will by default just return the last block on the blockchain. Note this is *not* the **next** block that gets
added to the chain. The application can now specifiy both the starting and ending block number to be sent. Applications set these
added to the chain. The application can now specify both the starting and ending block number to be sent. Applications set these
options when adding or joining peers to the channel with the PeerOption methods *startEvents*, *stopEvents* and *startEventsNewest* which
is the default. [End2endAndBackAgainIT.java#L234-L257](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L234-L257)
calls the method [`testPeerServiceEventingReplay`](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L719-L881) which restarts the channel with different start and stop values.
Expand All @@ -35,7 +35,7 @@ calls the method [`testPeerServiceEventingReplay`](https://github.com/hyperledge

### [FAB-7652 JSDK filterblock enablement](https://jira.hyperledger.org/browse/FAB-7652)

Fabric supports on the new peer eventing service limits to what the events return thourgh ACLs. The block event may contain the full Block or a FilteredBlock.
Fabric supports on the new peer eventing service limits to what the events return though ACLs. The block event may contain the full Block or a FilteredBlock.
Applications requesting for a full Block without authority will get a permission failure. Application by default will get the full block. To request
request a FiltedBlock when adding or joining peers applications can add via PeerOptions.registerEventsForFilteredBlocks. An example of this is seen in
[End2endAndBackAgainIT.java#L592-595](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L592-L595)
Expand All @@ -61,15 +61,15 @@ FilteredBlocks

TransactionEnvelopeInfo all the methods on EnvelopeInfo
- getTransactionActionInfoCount number transactions
- getTransactionActionInfos an integrater over all the TransactionAction
- getTransactionActionInfos an iterator over all the TransactionAction

TransactionActionInfo
- getEvent chaincode events


### [FAB-6603 Java SDK CryptoPrimitives should perform Signature operations using standard JCA/JCE](https://jira.hyperledger.org/browse/FAB-6603)
Changes made to make the Java SDK crypto primitives to use more JCA/JCE compliant methods. These changes are internal and not
directly apparant to the application. This allows specifying other JCA/JCE provider.
directly apparent to the application. This allows specifying other JCA/JCE provider.

### [FAB-5632 Implement "Connection Profile" for java-sdk](https://jira.hyperledger.org/browse/FAB-5632)
Allow creating channels from a yaml or json specified document. Examples of this can be found in [NetworkConfigIT.java#L65](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L65)
Expand All @@ -91,8 +91,8 @@ Channels can be Java serialized and deserialized. Examples of this can be found
in [End2endIT.java#L257](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L257)
where the sample store stores channel bar. Later in [End2endAndBackAgainIT.java#L562](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L562-L565)
it's restored.
*Applications using this serialziation means will be tasked with any migrating future changes. The SDK will not do this.*
It's advised to use a different persistene means for saving and restoring channels
*Applications using this serialization means will be tasked with any migrating future changes. The SDK will not do this.*
It's advised to use a different persistence means for saving and restoring channels

### [FAB-7324 JSDK Node CC example](https://jira.hyperledger.org/browse/FAB-7324)
The JSDK added support for installing deploying Node chaincode.
Expand Down Expand Up @@ -121,9 +121,9 @@ Example of this which mostly shows the defaults is in [End2endIT.java#L517](http
## v1.1 Fabric/CA features

### [FAB-7383 Implement the Fabric-CA identities and affiliations API](https://jira.hyperledger.org/browse/FAB-7383)
Fabric CA API added APIs for managing identies and affiliations. Examples how this can be done with Java SDK on how to
Fabric CA API added APIs for managing identities and affiliations. Examples how this can be done with Java SDK on how to
create, modify, read and delete are in [HFCAClientIT.java#L514-L658](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L514-L658)
for identies and [HFCAClientIT#L704](https://github.com/hyperledger/fabric-sdk-java/blob/09f386c340e157e2a4f3f5cdde85e340f4586923/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L704-L1015)
for identities and [HFCAClientIT#L704](https://github.com/hyperledger/fabric-sdk-java/blob/09f386c340e157e2a4f3f5cdde85e340f4586923/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L704-L1015)
for affiliations.

### [FAB-6411 Add Java SDK support for gencrl endpoint](https://jira.hyperledger.org/browse/FAB-6411)
Expand Down
80 changes: 80 additions & 0 deletions docs/release_v1.2.0_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Java SDK for Hyperledger Fabric 1.2 release notes.

The JSDK 1.2 has features added since the 1.2 based release to match those added to the Fabric 1.2 release.

## Fabric v1.0 and v1.1 considerations
The SDK is mostly backward compatible with the v1.x based Fabric with the following considerations
- The new Peer eventing service is the default for the SDK however, in v1.0 Fabric peer eventing service is not supported. To address in applications that are
connecting to Fabric 1.0 you must when adding or joining a peer to a channel provide a PeerRole option.
A role with `PeerRole.NO_EVENT_SOURCE` has been defined that has the equivalent functionality of a v1.0 peer.
You can see an example of this
in [End2endIT.java#L732](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L732)
and in [End2endAndBackAgainIT.java#L597](https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L597)


## v1.2 Fabric features

### [FAB-9680 private data collection support](https://jira.hyperledger.org/browse/FAB-9680)

Private data collection example is in [src/test/java/org/hyperledger/fabric/sdkintegration/PrivateDataIT.java
](https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric/sdkintegration/PrivateDataIT.java)
From the SDK perspective there is very little change from installing, instantiating and invoking chaincode. The only notable change is in
instantiation. In instantiation there is a requirement to pass in the Instantiation proposal a chaincode collection configuration with the method `setChaincodeCollectionConfiguration` as seen on
this [line](https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric/sdkintegration/PrivateDataIT.java#L246).
The [ChaincodeCollectionConfiguration](https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java)
class allows collection configuration to be loaded from YAML or a json file or object. Sample collection configuration files
exist in [src/test/fixture/collectionProperties](https://github.com/hyperledger/fabric-sdk-java/tree/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/fixture/collectionProperties).
[PrivateDataIT.yaml](https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/fixture/collectionProperties/PrivateDataIT.yaml)
has comments that help explain some of the aspects of configuring private collections.

More details on the concepts of Private Data feature can be found in the Fabric documentation [Private Data](https://hyperledger-fabric.readthedocs.io/en/release-1.2/private-data/private-data.html)

### [FAB-8805 JSDK Service Discovery](https://jira.hyperledger.org/browse/FAB-8805)
Service discovery allows through a collection of peers with a role of `SERVICE_DISCOVERY` to discover :

- Other peers in the network.
- Orderers in the network.
- Discovered names of chaincode that has been discovered in the network.
- Peers needed to endorse invoking a specific chaincode.

An example of this is shown in [src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java](badurl).
Here only a single peer is added to the channel that has a role of `SERVICE_DISCOVERY`. The chaincode names discovered is reported by the method `getDiscoveredChaincodeNames`
on the channel. It's shows potentially getting to different endorsements set by setting the discoveryOptions on the method `sendTransactionProposalToEndorsers` The first
set is not used and is only there for illustrate different options. The [DiscoveryOptions](badurl) allows some control on discovering the needed endorsements


DiscoveryOptions
- `ignoreEndpoints`: Specify endorser endpoints that should not be used.
- `inspectResults`: If service discovery does not find the the needed endorsers for a specific chaincode it will by default throw a ServiceDiscoveryException. Setting
this to true will have the method return the all the endorsements it did obtained.
- `forceDiscovery`: By default endorsers are found by already cached results. Setting this to true will force ignoring this cache and doing a full discovery before
finding the endorsements needed.
- `endorsementSelector` The Fabric provided discovery does not find just one possible set of endorsers needed for a specific chaincode, but potentially multiple. The `endorsementSelector` is code that determines
which endorser should be selected. There are two implemented with the SDK `ENDORSEMENT_SELECTION_RANDOM` and the default `ENDORSEMENT_SELECTION_LEAST_REQUIRED_BLOCKHEIGHT`.
Applications can use their own by implementing the interface `EndorsementSelector` and using the two SDK provided as a reference.

The endorsements are then sent to orderer that was also discovered.

Discovered endpoints for Peers and Orderers does not have all the information to construct the Peer or Orderers. Applications can take control of specifically what
properties and roles by setting on the channel `setSDPeerAddition` for Peers and `setSDOrdererAddition` for orderers. The `SDOPeerrDefaultAddition`
that implements `SDPeerAddition` is an example of code that creates a Peer from the discovery information. Similarly for
the orderer there is `SDOrdererDefaultAddition` that implements `SDOrdererAddition`

More details on service discovery can be found in the Hyperledger Fabric documentation: [Service Discovery](https://hyperledger-fabric.readthedocs.io/en/latest/discovery-overview.html#service-discovery)




## v1.1 Fabric/CA features

### [FAB-10322 HFCAClient needs timeout settings](https://jira.hyperledger.org/browse/FAB-10322)

Configuration timeout properties for HTTP requests to the Fabric CA have been added. The properties
`org.hyperledger.fabric_ca.sdk.connection.connection_request_timeout`, `org.hyperledger.fabric_ca.sdk.connection.connect_timeout` and `org.hyperledger.fabric_ca.sdk.connection.socket_timeout`
can be set and correspond to the HTTP client's equivalent values.
For more information see [Apache's HTTP RequestConfig.Builder](https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/config/RequestConfig.Builder.html)

### [FAB-9373 Add support for Certificates API on Java SDK](https://jira.hyperledger.org/browse/FAB-9373)

Adds support for managing certificates including deletions. Provides an API to also query for expired certificates and those that are about to expire.
Examples of this API can be seen [HFCAClientIT testGetCerticates](https://github.com/hyperledger/fabric-sdk-java/blob/f80259c0c285a65ee1c5bdeeafaa47d8a9a9d72f/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L1102-L1227)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.hyperledger.fabric-sdk-java</groupId>
<artifactId>fabric-sdk-java</artifactId>
<packaging>jar</packaging>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<name>fabric-java-sdk</name>
<description>Java SDK for Hyperledger fabric project</description>
<url>https://www.hyperledger.org/community/projects</url>
Expand Down
8 changes: 4 additions & 4 deletions src/test/fixture/sdkintegration/.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS=
ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CLIENT_AUTH_REQUIRED=false
#
#Image tags:
#IMAGE_TAG_FABRIC=:x86_64-1.1.0
#IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0
IMAGE_TAG_FABRIC=
IMAGE_TAG_FABRIC_CA=
IMAGE_TAG_FABRIC=:1.2.0
IMAGE_TAG_FABRIC_CA=:1.2.0
#IMAGE_TAG_FABRIC=
#IMAGE_TAG_FABRIC_CA=
#FAB_CONFIG_GEN_VERS=v1.0
FAB_CONFIG_GEN_VERS=v1.2
V11_IDENTITIES_ALLOWREMOVE=--cfg.identities.allowremove
Expand Down
1 change: 1 addition & 0 deletions src/test/fixture/sdkintegration/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
image: hyperledger/fabric-orderer${IMAGE_TAG_FABRIC}
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
# - ORDERER_GENERAL_LOGLEVEL=error
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/orderer.block
Expand Down
Loading

0 comments on commit 3376018

Please # to comment.