v2.0.0 Release Notes - RELEASE DATE TBD
---------------------------------------

What's New in Hyperledger Fabric v2.0
-------------------------------------

The following major features are included in the v2.0.0 Alpha release:

FAB-11237 - Improved chaincode lifecycle
Fabric 2.0 introduces decentralized governance for chaincode, with a
new process for installing a chaincode on your peers and starting it on a
channel. The new Fabric chaincode lifecycle allows multiple organizations to
come to agreement on the parameters of a chaincode, such as the chaincode
endorsement policy, before it can be used to interact with the ledger.

FAB-6135 - Raft Consensus
Introduced in v1.4.1 and v2.0.0, the ordering service now provides
an option to use the Raft Consensus algorithm. Raft is a crash fault tolerant
(CFT) ordering service based on an implementation of Raft protocol in etcd.

FAB-11096 - Docker images with Alpine Linux
Hyperledger Fabric Docker images will now use Alpine Linux,
a security-oriented, lightweight Linux distribution.

New operational metrics and health checks
FAB-13088 Endorser metrics
FAB-14077 Orderer communication metrics
FAB-11937 Raft metrics
FAB-13237 Metrics for log records
FAB-12727 Gossip metrics
FAB-13341 Kafka health check
FAB-12908 CouchDB health check

Changes, Known Issues, and Workarounds
--------------------------------------

FAB-5177 - The ccenv build image no longer includes the shim
The shim package and dependencies for go chaincode are no longer included in
the chaincode build environment. Chaincode packages that do not include their
own dependencies will no longer successfully build on the peer.  We strongly
recommend that existing go chaincode be updated to vendor the
github.com/hyperledger/fabric-chaincode-go/shim package and its dependencies.
While there are many tools for managing vendored dependencies, we recommend
moving directly to go modules and vendoring with `go mod vendor`.

FAB-11096 - Docker images with Alpine Linux
Bash is no longer available in Fabric images. Utilize Alpine's built-in
sh or ash instead.

FAB-12075 - Duplicate Go Client identity library removed
If vendoring the Client identity library (CID) in chaincode, import
github.com/hyperledger/fabric/core/chaincode/shim/ext/cid
rather than
github.com/hyperledger/fabriccore/chaincode/lib/cid/cid.go

FAB-12088 - Java chaincode support on s390x architecture
Java chaincode support is not yet available on s390x architecture.

FAB-12134 - Same chaincode source receiving fingerprint mismatch error
Chaincode installed in different ways may result in "chaincode fingerprint
mismatch data mismatch" error upon instantiation.  This may happen when
installing chaincode by using different SDKs. To workaround the problem,
package the chaincode prior to installation and instantiation, by using
the "peer chaincode package" command.

FAB-15366 - Logger removed from chaincode shim
Chaincode that used the shim's NewLogger() will need to shift to a new
logging mechanism. Chaincode logging is intended to be the responsibility
of the application developer. As such it should be handled using tools and
libraries that make the most sense to the chaincode developer and the
application in general. Chaincode developers can forward STDOUT and STDERR
from the chaincode container to the peer container by setting
`CORE_VM_DOCKER_ATTACHSTDOUT=true`. While not recommended for production,
once enabled, each chaincode will receive its own logging channel and
STDOUT and STDERR will be integrated in the peers log on a per-line basis.
A production grade approach would be to run a log aggregation service and
forward your logs to the aggregation service.

FAB-16213 - The go chaincode entities extension has been removed
Chaincode implementations that used the entities extension package from an
earlier version of Fabric will need to vendor a 1.x version of the package
for as part of their chaincode package.

FAB-16303 - GetHistoryForKey returns results from newest to oldest
In prior releases, the GetHistoryForKey chaincode API had no
guarantees on the order of returned results.
Starting in Fabric v2.0, the GetHistoryForKey chaincode API
will return results from newest to oldest in terms of ordered transaction
height (block height and transaction height within block).
This will allow applications to iterate through the top results
to understand recent changes to a key.

FAB-16722 - The 'provisional' genesis method of generating the system channel
for orderers has been removed. Existing users of the provisional genesis method
should instead set BootstrapMethod to 'file', and generate a genesis block file
using configtxgen. Orderer nodes will then use the generated file for the
orderer system channel.

FAB-15343 - System Chaincode Plugins have been removed.  As part of a general
move away from go plugins as an extension mechanism for Fabric, the ability to
add system chaincodes via go plugins has been removed.  Users wishing to extend
Fabric with custom system chaincodes may rebuild the peer binary with the
system chaincode built into the binary.  This system chaincode should then be
defined and initialized like any other user chaincode would be.  This new model
is very similar to the plugin model (which required that the plugin to be built
at the same exact commit of Fabric), and addresses the significant shortcomings
around the lifecycle and validation of system chaincode transactions.

FAB-15754 - The 'Solo' consensus type is officially deprecated.  The 'Solo'
consensus type has always been marked non-production and should be in use only
in test environments, however for compatibility it is still available, but may
be removed entirely in a future release.

FAB-16408 - The 'Kafka' consensus type is officially deprecated.  The 'Raft'
consensus type was introduced in v1.4.1 and has become the preferred production
consensus type.  There is a documented and tested migration path from Kafka to
Raft, and existing users should migrate to the newer Raft consensus type.  For
compatibility with existing deployments, Kafka is still supported, but may be
removed entirely in a future release.

FAB-16477 and FAB-17116 The orderer config `general.genesismethod` and
`general.genesisfile` will be replaced by the new `general.bootstrapmethod` and
`general.bootstrapfile`.

FAB-17428 - The configtxgen flag `--outputAnchorPeersUpdate` is officially deprecated.
This flag was originally used for creating channel config updates to update an anchor peer
and only worked for the first update of the default channel creation. The flag will be
officially removed in FAB-17427 in favor of using the `configtx.yaml` for the default
channel configuration.

Known Vulnerabilities
---------------------
FAB-8664 - Peer should detect and react when its org has been removed
This is a relatively low severity problem, because it requires a significant
conspiracy of network admins, but it will be addressed in a future release.

Resolved Vulnerabilities
------------------------
None.

Other improvements and fixes
----------------------------
FAB-13471 - Fix for multiple chaincode upgrades in a single block
FAB-14687 - Fix memory leak in gossip message store
Updated to Go version 1.12.5

For the full list of improvements and fixes, refer to the release change log:
https://github.com/hyperledger/fabric/blob/master/CHANGELOG.md#v200
