github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/docs/source/whatsnew.rst (about)

     1  What's new in Hechain v2.x
     2  =====================================
     3  
     4  What's New in Hechain v2.4
     5  -------------------------------------
     6  
     7  Fabric Gateway
     8  ^^^^^^^^^^^^^^
     9  
    10  Fabric Gateway is a new service running on peer nodes that manages transaction submission and processing for client applications, with the following benefits:
    11  
    12  * Simplifies client applications and SDKs - Your client application can simply delegate transaction submission to a trusted peer. There is no need for your application to open connections to peer nodes and ordering service nodes from other organizations.
    13  * Fabric Gateway manages the collection of transaction endorsements from other organizations and submission to the ordering service on behalf of client applications.
    14  * Fabric Gateway has intelligence to determine what endorsements are required for a given transaction, even if your solution utilizes a combination of chaincode-level endorsement policies, private data collection endorsement policies, and state-based endorsement policies.
    15  
    16  New lightweight Gateway SDKs (v1.0.0) are available for Node, Java, and Go. The SDKs support flexible application patterns:
    17  
    18  * You can utilize the high-level programming model similar to prior SDK versions, allowing your application to simply call a single SubmitTransaction() function.
    19  * More advanced applications can leverage the gateway's individual Endorse, Submit, and CommitStatus services for transaction submission, and the Evaluate service for queries.
    20  * You can delegate transaction endorsement entirely to the gateway, or if needed, specify the endorsing organizations and the gateway will utilize a peer from each organization.
    21  
    22  For more information, see the :doc:`gateway` topic.
    23  
    24  Peer node unjoin
    25  ^^^^^^^^^^^^^^^^
    26  
    27  You can now unjoin a peer from a channel when the channel is no longer needed. All channel resources will be removed from the peer and the peer will no longer process blocks from the channel.
    28  
    29  For more details, see the `peer node unjoin` :doc:`command reference topic<commands/peernode>`.
    30  
    31  Calculate package ID of a packaged chaincode
    32  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    33  
    34  You can calculate the package ID from a packaged chaincode without installing the chaincode on peers using the new `peer lifecycle chaincode calculatepackageid` command.
    35  This command will be useful, for example, in the following scenarios:
    36  
    37  * When multiple chaincode packages with the same label name are installed, it is possible to identify which ID corresponds to which package later.
    38  * To check whether a particular chaincode package is installed or not without installing that package.
    39  
    40  For more information, see the `peer lifecycle chaincode calculatepackageid` :doc:`command reference topic<commands/peerlifecycle>`.
    41  
    42  'Chaincode as a service' builder delivered with fabric-peer image
    43  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    44  
    45  Starting in v2.0 chaincode can be run as a service by utilizing the external builder pattern for chaincodes.
    46  Running 'chaincode as a service' has advantages in Kubernetes and other deployment environments since the chaincode can be managed independently rather than requiring the peer to build chaincode images and start chaincode containers at runtime.
    47  The external builder pattern required you to deliver a builder script or program alongside the peer.
    48  
    49  Starting in v2.4.1 an external builder for 'chaincode as a service' is available in the Fabric release artifacts, and the 'ccaas_builder' is pre-configured with the fabric-peer docker image,
    50  removing the need to build your own external builder and repackage and configure the peer.
    51  
    52  For more information, see the :doc:`cc_service` topic.
    53  
    54  .. note::
    55  
    56     While Fabric v2.4.0 introduces new features, Fabric v2.2.x remains the current long-term support release until the next LTS release is announced.
    57  
    58  What's New in Hechain v2.3
    59  -------------------------------------
    60  
    61  Hechain v2.3 introduces two new features for improved orderer and peer operations.
    62  
    63  Orderer channel management without a system channel
    64  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    65  
    66  To simplify the channel creation process and enhance the privacy and scalability of channels,
    67  it is now possible to create application channels without first creating a “system channel” managed by the ordering service.
    68  This process allows ordering nodes to join (or leave) any number of channels as needed, similar to how peers can participate in multiple channels.
    69  
    70  Benefits of the new process:
    71  
    72  * **Increased privacy:** Because all ordering nodes used to be joined to the system channel,
    73    every ordering node in a network knew about the existence of every channel on that ordering service.
    74    Now, an ordering node only knows about the channels it is joined to.
    75  * **Scalability:** When there is a large number of ordering nodes and channels defined on the system channel,
    76    it can take a long time for ordering nodes to reach consensus on the membership of all the channels.
    77    Now, an ordering service can scale horizontally in a decentralized fashion by independently joining ordering nodes to specific channels.
    78  * **Operational benefits**
    79     * Simple process to join an ordering node to a channel.
    80     * Ability to list the channels that the ordering node is a consenter on.
    81     * Simple process to remove a channel from an ordering node, which automatically cleans up the blocks associated with that channel.
    82     * Peer organizations do not need to coordinate with an admin of the system channel to create or update its MSP.
    83  
    84  For more information, see the :doc:`create_channel/create_channel_participation` topic.
    85  
    86  Ledger snapshot
    87  ^^^^^^^^^^^^^^^
    88  
    89  It is now possible to take a snapshot of a peer's channel information, including its state database,
    90  and join new peers (in the same organization or different organizations) to the channel based on the snapshot.
    91  
    92  Using ledger snapshots has the following advantages:
    93  
    94  * **Peers don't need to process all blocks since genesis block:** Peers can join a channel without processing all
    95    previous blocks since the genesis block, greatly reducing the time it takes to join a peer to an existing channel.
    96  * **Peers can join channels using latest channel configuration:** Because snapshots include the latest channel configuration,
    97    peers can now join a channel using the latest channel configuration.
    98    This is especially important if critical channel configuration such as orderer endpoints or TLS CA certificates have been updated since the genesis block.
    99  * **Reduced storage costs:** Peers that join by snapshot do not incur the storage cost of maintaining all blocks since the genesis block.
   100  * **State checkpoints:** Peer administrators can snapshot current channel state and compare with other peers,
   101    in the same organization or different organizations, to verify the consistency and integrity of the ledger on each peer.
   102    Agreed upon snapshots can be used as a checkpoint and basis for newly joining peers.
   103  
   104  For more information, see the :doc:`peer_ledger_snapshot` topic.
   105  
   106  .. note::
   107  
   108     While Fabric v2.3.0 introduces new features, Fabric v2.2.x remains the current long-term support release until the next LTS release is announced.
   109  
   110  What's New in Hechain v2.0, v2.1, v2.2
   111  -------------------------------------------------
   112  
   113  The first Hechain major release since v1.0, Fabric v2.0
   114  delivers important new features and changes for users and operators alike,
   115  including support for new application and privacy patterns, enhanced
   116  governance around smart contracts, and new options for operating nodes.
   117  
   118  v2.1 and v2.2 build on the v2.0 release with minor features,
   119  improvements, and bug fixes, with v2.2 being the first long-term support (LTS) release of Fabric v2.x.
   120  Fixes will be provided on the v2.2.x release stream until after the next LTS release is announced.
   121  
   122  Let's take a look at some of the highlights of the Fabric v2.0 release...
   123  
   124  Decentralized governance for smart contracts
   125  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   126  
   127  Fabric v2.0 introduces decentralized governance for smart contracts, with a new
   128  process for installing a chaincode on your peers and starting it on a channel.
   129  The new Fabric chaincode lifecycle allows multiple organizations to come to
   130  agreement on the parameters of a chaincode, such as the chaincode endorsement
   131  policy, before it can be used to interact with the ledger. The new model
   132  offers several improvements over the previous lifecycle:
   133  
   134  * **Multiple organizations must agree to the parameters of a chaincode:**
   135    In the release 1.x versions of Fabric, one organization had the ability to
   136    set parameters of a chaincode (for instance the endorsement policy) for all
   137    other channel members, who only had the power to refuse to install the chaincode
   138    and therefore not take part in transactions invoking it. The new Fabric
   139    chaincode lifecycle is more flexible since it supports both centralized
   140    trust models (such as that of the previous lifecycle model) as well as
   141    decentralized models requiring a sufficient number of organizations to
   142    agree on an endorsement policy and other details before the chaincode
   143    becomes active on a channel.
   144  
   145  * **More deliberate chaincode upgrade process:** In the previous chaincode
   146    lifecycle, the upgrade transaction could be issued by a single organization,
   147    creating a risk for a channel member that had not yet installed the new
   148    chaincode. The new model allows for a chaincode to be upgraded only after
   149    a sufficient number of organizations have approved the upgrade.
   150  
   151  * **Simpler endorsement policy and private data collection updates:**
   152    Fabric lifecycle allows you to change an endorsement policy or private
   153    data collection configuration without having to repackage or reinstall
   154    the chaincode. Users can also take advantage of a new default endorsement
   155    policy that requires endorsement from a majority of organizations on the
   156    channel. This policy is updated automatically when organizations are
   157    added or removed from the channel.
   158  
   159  * **Inspectable chaincode packages:** The Fabric lifecycle packages chaincode
   160    in easily readable tar files. This makes it easier to inspect the chaincode
   161    package and coordinate installation across multiple organizations.
   162  
   163  * **Start multiple chaincodes on a channel using one package:** The previous
   164    lifecycle defined each chaincode on the channel using a name and version
   165    that was specified when the chaincode package was installed. You can now
   166    use a single chaincode package and deploy it multiple times with different
   167    names on the same channel or on different channels. For example, if you’d
   168    like to track different types of assets in their own ‘copy’ of the chaincode.
   169  
   170  * **Chaincode packages do not need to be identical across channel members:**
   171    Organizations can extend a chaincode for their own use case, for example
   172    to perform different validations in the interest of their organization.
   173    As long as the required number of organizations endorse chaincode transactions
   174    with matching results, the transaction will be validated and committed to the
   175    ledger.  This also allows organizations to individually roll out minor fixes
   176    on their own schedules without requiring the entire network to proceed in lock-step.
   177  
   178  For existing Fabric deployments, you can continue to use the prior chaincode
   179  lifecycle with Fabric v2.x. The new chaincode lifecycle will become effective
   180  only when the channel application capability is updated to v2.0.
   181  See the :doc:`chaincode_lifecycle` concept topic for an overview of the new
   182  chaincode lifecycle.
   183  
   184  New chaincode application patterns for collaboration and consensus
   185  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   186  
   187  The same decentralized methods of coming to agreement that underpin the
   188  new chaincode lifecycle management can also be used in your own chaincode
   189  applications to ensure organizations consent to data transactions before
   190  they are committed to the ledger.
   191  
   192  * **Automated checks:** As mentioned above, organizations can add automated
   193    checks to chaincode functions to validate additional information before
   194    endorsing a transaction proposal.
   195  
   196  * **Decentralized agreement:** Human decisions can be modeled into a chaincode process
   197    that spans multiple transactions. The chaincode may require actors from
   198    various organizations to indicate their terms and conditions of agreement
   199    in a ledger transaction. Then, a final chaincode proposal can
   200    verify that the conditions from all the individual transactors are met,
   201    and "settle" the business transaction with finality across all channel
   202    members. For a concrete example of indicating terms and conditions in private,
   203    see the asset transfer scenario in the :doc:`private-data/private-data` documentation.
   204  
   205  Private data enhancements
   206  ^^^^^^^^^^^^^^^^^^^^^^^^^
   207  
   208  Fabric v2.0 also enables new patterns for working with and sharing private data,
   209  without the requirement of creating private data collections for all
   210  combinations of channel members that may want to transact. Specifically,
   211  instead of sharing private data within a collection of multiple members,
   212  you may want to share private data across collections, where each collection
   213  may include a single organization, or perhaps a single organization along
   214  with a regulator or auditor.
   215  
   216  Several enhancements in Fabric v2.x make these new private data patterns possible:
   217  
   218  * **Sharing and verifying private data:** When private data is shared with a
   219    channel member who is not a member of a collection, or shared with another
   220    private data collection that contains one or more channel members (by writing
   221    a key to that collection), the receiving parties can utilize the
   222    GetPrivateDataHash() chaincode API to verify that the private data matches the
   223    on-chain hashes that were created from private data in previous transactions.
   224  
   225  * **Collection-level endorsement policies:** Private data collections can now
   226    optionally be defined with an endorsement policy that overrides the
   227    chaincode-level endorsement policy for keys within the collection. This
   228    feature can be used to restrict which organizations can write data to a
   229    collection, and is what enables the new chaincode lifecycle and chaincode
   230    application patterns mentioned earlier. For example, you may have a chaincode
   231    endorsement policy that requires a majority of organizations to endorse,
   232    but for any given transaction, you may need two transacting organizations
   233    to individually endorse their agreement in their own private data collections.
   234  
   235  * **Implicit per-organization collections:** If you’d like to utilize
   236    per-organization private data patterns, you don’t even need to define the
   237    collections when deploying chaincode in Fabric v2.x.  Implicit
   238    organization-specific collections can be used without any upfront definition.
   239  
   240  To learn more about the new private data patterns, see the :doc:`private-data/private-data` (conceptual
   241  documentation). For details about private data collection configuration and
   242  implicit collections, see the :doc:`private-data-arch` (reference documentation).
   243  
   244  External chaincode launcher
   245  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   246  
   247  The external chaincode launcher feature empowers operators to build and launch
   248  chaincode with the technology of their choice. Use of external builders and launchers
   249  is not required as the default behavior builds and runs chaincode in the same manner
   250  as prior releases using the Docker API.
   251  
   252  * **Eliminate Docker daemon dependency:** Prior releases of Fabric required
   253    peers to have access to a Docker daemon in order to build and launch
   254    chaincode - something that may not be desirable in production environments
   255    due to the privileges required by the peer process.
   256  
   257  * **Alternatives to containers:** Chaincode is no longer required to be run
   258    in Docker containers, and may be executed in the operator’s choice of
   259    environment (including containers).
   260  
   261  * **External builder executables:** An operator can provide a set of external
   262    builder executables to override how the peer builds and launches chaincode.
   263  
   264  * **Chaincode as an external service:** Traditionally, chaincodes are launched
   265    by the peer, and then connect back to the peer. It is now possible to run chaincode as
   266    an external service, for example in a Kubernetes pod, which a peer can
   267    connect to and utilize for chaincode execution. See :doc:`cc_service` for more
   268    information.
   269  
   270  See :doc:`cc_launcher` to learn more about the external chaincode launcher feature.
   271  
   272  State database cache for improved performance on CouchDB
   273  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   274  
   275  * When using external CouchDB state database, read delays during endorsement
   276    and validation phases have historically been a performance bottleneck.
   277  
   278  * With Fabric v2.0, a new peer cache replaces many of these expensive lookups
   279    with fast local cache reads. The cache size can be configured by using the
   280    core.yaml property ``cacheSize``.
   281  
   282  Alpine-based docker images
   283  ^^^^^^^^^^^^^^^^^^^^^^^^^^
   284  
   285  Starting with v2.0, Hechain Docker images will use Alpine Linux,
   286  a security-oriented, lightweight Linux distribution. This means that Docker
   287  images are now much smaller, providing faster download and startup times,
   288  as well as taking up less disk space on host systems. Alpine Linux is designed
   289  from the ground up with security in mind, and the minimalist nature of the Alpine
   290  distribution greatly reduces the risk of security vulnerabilities.
   291  
   292  Sample test network
   293  ^^^^^^^^^^^^^^^^^^^
   294  
   295  The fabric-samples repository now includes a new Fabric test network. The test
   296  network is built to be a modular and user friendly sample Fabric network that
   297  makes it easy to test your applications and smart contracts. The network also
   298  supports the ability to deploy your network using Certificate Authorities,
   299  in addition to cryptogen.
   300  
   301  For more information about this network, check out :doc:`test_network`.
   302  
   303  Upgrading to Fabric v2.x
   304  ^^^^^^^^^^^^^^^^^^^^^^^^
   305  
   306  A major new release brings some additional upgrade considerations. Rest assured
   307  though, that rolling upgrades from v1.4.x to v2.0 are supported, so that network
   308  components can be upgraded one at a time with no downtime. You can also upgrade
   309  directly from the v1.4.x LTS release to the v2.2.x LTS release.
   310  
   311  The upgrade docs have been significantly expanded and reworked, and now have a
   312  standalone home in the documentation: :doc:`upgrade`. Here you'll find documentation on
   313  :doc:`upgrading_your_components` and :doc:`updating_capabilities`, as well as a
   314  specific look  at the considerations for upgrading to v2.x, :doc:`upgrade_to_newest_version`.
   315  
   316  Release notes
   317  =============
   318  
   319  The release notes provide more details for users moving to the new release.
   320  Specifically, take a look at the changes and deprecations
   321  announced in each of the v2.x releases.
   322  
   323  * `Fabric v2.0.0 release notes <https://github.com/hechain20/hechain/releases/tag/v2.0.0>`_.
   324  * `Fabric v2.0.1 release notes <https://github.com/hechain20/hechain/releases/tag/v2.0.1>`_.
   325  * `Fabric v2.1.0 release notes <https://github.com/hechain20/hechain/releases/tag/v2.1.0>`_.
   326  * `Fabric v2.1.1 release notes <https://github.com/hechain20/hechain/releases/tag/v2.1.1>`_.
   327  * `Fabric v2.2.0 release notes <https://github.com/hechain20/hechain/releases/tag/v2.2.0>`_.
   328  * `Fabric v2.2.1 release notes <https://github.com/hechain20/hechain/releases/tag/v2.2.1>`_.
   329  * `Fabric v2.2.2 release notes <https://github.com/hechain20/hechain/releases/tag/v2.2.2>`_.
   330  * `Fabric v2.2.3 release notes <https://github.com/hechain20/hechain/releases/tag/v2.2.3>`_.
   331  * `Fabric v2.2.4 release notes <https://github.com/hechain20/hechain/releases/tag/v2.2.4>`_.
   332  * `Fabric v2.3.0 release notes <https://github.com/hechain20/hechain/releases/tag/v2.3.0>`_.
   333  * `Fabric v2.3.1 release notes <https://github.com/hechain20/hechain/releases/tag/v2.3.1>`_.
   334  * `Fabric v2.3.2 release notes <https://github.com/hechain20/hechain/releases/tag/v2.3.2>`_.
   335  * `Fabric v2.3.3 release notes <https://github.com/hechain20/hechain/releases/tag/v2.3.3>`_.
   336  * `Fabric v2.4.0 release notes <https://github.com/hechain20/hechain/releases/tag/v2.4.0>`_.
   337  * `Fabric v2.4.1 release notes <https://github.com/hechain20/hechain/releases/tag/v2.4.1>`_.
   338  * `Fabric v2.4.2 release notes <https://github.com/hechain20/hechain/releases/tag/v2.4.2>`_.
   339  * `Fabric v2.4.3 release notes <https://github.com/hechain20/hechain/releases/tag/v2.4.3>`_.
   340  
   341  .. Licensed under Creative Commons Attribution 4.0 International License
   342     https://creativecommons.org/licenses/by/4.0/