github.com/sykesm/fabric@v1.1.0-preview.0.20200129034918-2aa12b1a0181/docs/source/whatsnew.rst (about)

     1  What's new in the v2.0 Beta release
     2  ===================================
     3  
     4  The Beta release of Hyperledger Fabric v2.0 allows users to try out upcoming
     5  features of Fabric v2.0. While the v2.0 release is not yet production ready,
     6  the Beta is feature complete, meaning it includes all the features that are
     7  expected to be delivered in the final v2.0 release.
     8  
     9  Let’s take a peek at some of the highlights of Fabric v2.0....
    10  
    11  Decentralized chaincode lifecycle
    12  ---------------------------------
    13  
    14  Fabric v2.0 introduces decentralized governance for chaincode, with a new
    15  process for installing a chaincode on your peers and starting it on a channel.
    16  The new Fabric chaincode lifecycle allows multiple organizations to come to
    17  agreement on the parameters of a chaincode, such as the chaincode endorsement
    18  policy, before it can be used to interact with the ledger. The new model
    19  offers several improvements over the previous lifecycle:
    20  
    21  * **Multiple organizations must agree to the parameters of a chaincode**
    22    In the release 1.x versions of Fabric, one organization had the ability to
    23    set parameters of a chaincode (for instance the endorsement policy) for all
    24    other channel members, who only had the power to refuse to install the chaincode
    25    and therefore not take part in transactions invoking it. The new Fabric
    26    chaincode lifecycle is more flexible since it supports both centralized
    27    trust models (such as that of the previous lifecycle model) as well as
    28    decentralized models requiring a sufficient number of organizations to
    29    agree on an endorsement policy and other details before the chaincode
    30    ecomes active on a channel.
    31  
    32  * **More deliberate chaincode upgrade process** In the previous chaincode
    33    lifecycle, the upgrade transaction could be issued by a single organization,
    34    creating a risk for a channel member that had not yet installed the new
    35    chaincode. The new model allows for a chaincode to be upgraded only after
    36    a sufficient number of organizations have approved the upgrade.
    37  
    38  * **Simpler endorsement policy and private data collection updates**
    39    Fabric lifecycle allows you to change an endorsement policy or private
    40    data collection configuration without having to repackage or reinstall
    41    the chaincode. Users can also take advantage of a new default endorsement
    42    policy that requires endorsement from a majority of organizations on the
    43    channel. This policy is updated automatically when organizations are
    44    added or removed from the channel.
    45  
    46  * **Inspectable chaincode packages** The Fabric lifecycle packages chaincode
    47    in easily readable tar files. This makes it easier to inspect the chaincode
    48    package and coordinate installation across multiple organizations.
    49  
    50  * **Start multiple chaincodes on a channel using one package** The previous
    51    lifecycle defined each chaincode on the channel using a name and version
    52    that was specified when the chaincode package was installed. You can now
    53    use a single chaincode package and deploy it multiple times with different
    54    names on the same channel or on different channels. For example, if you’d
    55    like to track different types of assets in their own ‘copy’ of the chaincode.
    56  
    57  * **Chaincode packages do not need to be identical across channel members**
    58    Organizations can customize a chaincode for their own use case, for example
    59    to perform different validations in the interest of their organization.
    60    As long as the required number of organizations endorse chaincode transactions
    61    with matching results, the transaction will be validated and committed to the
    62    ledger.  This also allows organizations to individually roll out minor fixes
    63    on their own schedules without requiring the entire network to proceed in lock-step.
    64  
    65  Using the new chaincode lifecycle
    66  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    67  
    68  For existing Fabric deployments, you can continue to use the prior chaincode
    69  lifecycle with Fabric v2.0. The new chaincode lifecycle will become effective
    70  only when the channel application capability is updated to v2.0.
    71  See the :doc:`chaincode4noah` tutorial for complete details of the new
    72  chaincode lifecycle.
    73  
    74  External chaincode launcher
    75  ---------------------------
    76  
    77  While chaincode is still run in a docker container by default in Fabric v2.0,
    78  the external chaincode launcher feature empowers operators to build and launch
    79  chaincode with the technology of their choice.
    80  
    81  * **Eliminate Docker daemon dependency** Prior releases of Fabric required
    82    peers to have access to a Docker daemon in order to build and launch
    83    chaincode - something that may not be desirable in production environments
    84    due to the privileges required by the peer process.
    85  
    86  * **Alternatives to containers** Chaincode is no longer required to be run
    87    in Docker containers, and may be executed in the operator’s choice of
    88    environment (including containers).
    89  
    90  * **External builder executables** An operator can provide a set of external
    91    builder executables to override how the peer builds and launches chaincode.
    92  
    93  * **Chaincode as an external service** Traditionally, chaincodes are launched
    94    by and then connect to the peer. It is now possible to run chaincode as
    95    an external service, for example in a Kubernetes pod, which a peer can
    96    connect to and utilize for chaincode execution. See :doc:`cc_service` for more
    97    information.
    98  
    99  See :doc:`cc_launcher` to learn more about the external chaincode launcher feature.
   100  
   101  Private data enhancements
   102  -------------------------
   103  
   104  Fabric v2.0 enables new patterns for working with and sharing private data,
   105  without the requirement of creating private data collections for all
   106  combinations of channel members that may want to transact. Specifically,
   107  instead of sharing private data within a collection of multiple members,
   108  you may want to share private data across collections at a transaction or
   109  state key level with selected channel members. Each private data collection
   110  may contain a single organization, or perhaps a single organization along
   111  with a regulator or auditor.
   112  
   113  Several enhancements in Fabric v2.0 make these new private data patterns possible:
   114  
   115  * **Sharing and verifying private data** When private data is shared with a
   116    channel member who is not a member of a collection, or shared with another
   117    private data collection that contains one or more channel members (by writing
   118    a key to that collection), the receiving parties can utilize the
   119    GetPrivateDataHash() chaincode API to verify that the private data matches the
   120    on-chain hashes that were created from private data in previous transactions.
   121  
   122  * **Collection-level endorsement policies** Private data collections can now
   123    optionally be defined with an endorsement policy that overrides the
   124    chaincode-level endorsement policy for keys within the collection. This
   125    feature can be used to restrict which organizations can write data to a
   126    collection. For example, you could utilize organization-specific private
   127    data collections to allow each organization to individually consent to state
   128    updates. This pattern is useful for implementing workflows that span individual
   129    transactions, for example to support voting or approval scenarios with data
   130    privacy and nonrepudiation.
   131  
   132  * **Implicit per-organization collections** If you’d like to utilize
   133    per-organization private data patterns, you don’t even need to define the
   134    collections when deploying chaincode in Fabric v2.0.  Implicit
   135    organization-specific collections can be used without any upfront definition.
   136  
   137  To learn more about the new private data patterns, see :doc:`private-data/private-data` (conceptual information)
   138  for information about private data sharing and :doc:`private-data-arch` (reference information)
   139  for documentation about private data collection configuration and implicit collections.
   140  
   141  State database cache for improved performance on CouchDB
   142  --------------------------------------------------------
   143  
   144  * When using external CouchDB state database, read delays during endorsement
   145    and validation phases have historically been a performance bottleneck.
   146  
   147  * With Fabric v2.0, a new peer cache replaces many of these expensive lookups
   148    with fast local cache reads. The cache size can be configured by using the
   149    core.yaml property ``cacheSize``.
   150  
   151  Alpine-based docker images
   152  --------------------------
   153  
   154  Starting with v2.0, Hyperledger Fabric Docker images will use Alpine Linux,
   155  a security-oriented, lightweight Linux distribution. This means that Docker
   156  images are now much smaller, providing faster download and startup times,
   157  as well as taking up less disk space on host systems. Alpine Linux is designed
   158  from the ground up with security in mind, and the minimalist nature of the Alpine
   159  distribution greatly reduces the risk of security vulnerabilities.
   160  
   161  Sample test network
   162  -------------------
   163  
   164  The fabric-samples repository now includes a new Fabric test network. The test
   165  network is built to be a modular and user friendly sample Fabric network that
   166  makes it easy to test your applications and smart contracts. The network also
   167  supports the ability to deploy your network using Certificate Authorities,
   168  in addition to cryptogen.
   169  
   170  For more information about this network, check out :doc:`test_network`.
   171  
   172  Upgrading to Fabric v2.0
   173  ------------------------
   174  
   175  While a Beta release is not an intended upgrade target for existing Fabric
   176  deployments, there is nothing preventing you from testing an upgrade scenario
   177  to get familiar with the process.
   178  
   179  The upgrade docs have been significantly expanded and reworked, and now have a
   180  standalone home in the documentation: :doc:`upgrade`. Here you'll find documentation on
   181  :doc:`upgrading_your_components` and :doc:`updating_capabilities`, as well as a
   182  specific look  at the considerations for upgrading to v2.0, :doc:`upgrade_to_newest_version`.
   183  
   184  Release notes
   185  =============
   186  
   187  The release notes provide more details for users moving to the new release.
   188  Specifically, take a look at the changes and deprecations that are being
   189  announced with the new Fabric v2.0 release.
   190  
   191  * `Fabric v2.0.0-beta release notes <https://github.com/hyperledger/fabric/releases/tag/v2.0.0-beta>`_.
   192  
   193  .. Licensed under Creative Commons Attribution 4.0 International License
   194     https://creativecommons.org/licenses/by/4.0/