Skip to content
  • Srinivasan Muralidharan's avatar
    FAB-1318 - complete upgrade from endorser side · 269379a0
    Srinivasan Muralidharan authored
    https://jira.hyperledger.org/browse/FAB-1318
    
    This completes the work begun with https://gerrit.hyperledger.org/r/#/c/2973
    https://gerrit.hyperledger.org/r/#/c/2945/
    
    .
    
    The command
        peer chaincode upgrade -n mycc -p <upgrade chaincode path> -c '{"Args":[<args to upgrade chaincode>]}'
    
    will upgrade exisisting chaincode "mycc" if one exists.
    
    There is still work left on the committer side to comb block
    for transactions colliding with an upgrade. Upgrade will override those
    colliding transactions for that <chain, chaincode>. This will be in
    a future CR when ledger and committer support for this work
    is available.
    
    A chaincode is uniquely identified by (chain name, chaincode name).
    When upgrading a chaincode, many versions of the chaincode may be
    running (typically 2, the "current" and the "upgrade" but one can
    imagine multiple upgrades of the same chaincode in progress. Even
    if only one will succeed...).
    
    When upgrading, LCCC bumps up the version number for that chaincode.
    This version is used to dissambiguate different versions of the
    chaincode in a chain, just as chain id dissambiguated the chaincode among
    different chains.
    
    Chaincode framework will panic if version is not specified or not found.
    
    Change-Id: Ie0e11cf4ed1263f91c8399021ea65a3e877e08ba
    Signed-off-by: default avatarSrinivasan Muralidharan <muralisr@us.ibm.com>
    269379a0