github.com/defanghe/fabric@v2.1.1+incompatible/docs/source/whatsnew.rst (about)

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