1. 24 Mar, 2019 2 commits
    • Gari Singh's avatar
      Update version to 1.2.1 · 2707edec
      Gari Singh authored
      
      
      The common tools have the version
      hard-coded in the source code.
      Need to bump to current release
      which is 1.2.1.
      
      Change-Id: Ib36490a0eb858a5bd9044e4df169ab3ebe531544
      Signed-off-by: default avatarGari Singh <gari.r.singh@gmail.com>
      2707edec
    • Gari Singh's avatar
      Pin counterfeiter version · 9ad497bd
      Gari Singh authored
      
      
      counterfeiter has now been updated to
      support Go v2+ modules.  This means it
      requires Go 1.10.3 or higher for
      compatibility.  Fabric v1.2 is pinned to
      Go 1.10.  This change adds a specific
      target for counterfeiter which pins it
      to the commit prior to v2+ module support.
      
      FAB-14783 #done
      
      Change-Id: I2613addcd536178bdb6c9d6041dda5ea234c29a5
      Signed-off-by: default avatarGari Singh <gari.r.singh@gmail.com>
      9ad497bd
  2. 21 Mar, 2019 1 commit
  3. 19 Mar, 2019 2 commits
    • yacovm's avatar
      [FAB-14691] Add to msgStore and puller atomically · bfe2907b
      yacovm authored
      
      
      When adding a block to the message store, if it is added and
      not rejected - it is then added to the block puller.
      
      When the block is removed from the message store, a callback
      is triggered to remove the block from the block puller.
      
      However, these 2 operations are not atomic.
      
      Since we can add a block to the message store from both AddToMsgStore
      (which is invoked by Gossip() ) and from HandleMessage,
      we can have the following schedule:
      
        1) A block with sequence of 100 is gossiped by the upper
          layer of the peer, and AddToMsgStore is called, which
          adds the block to the message store, and the CPU is preempted.
        2) A block message 210 is received via HandleMessage and it causes
           the block 100 to be evicted from the message store, and the
          callback to remove the message from the block puller is called,
          but it is not removed because it is not there yet.
        3) The block 210 is added to the block puller, since it was added
           to the message store.
        4) The CPU is back to perform AddToMsgStore, and adds block 100
           to the block puller.
      
      Now the block puller has block 100, and the message store doesn't
      have block 100 anymore - which means it will never be evicted from
      the block puller.
      
      To prevent this we need to make these 2 operations be atomic.
      
      Change-Id: I3b7d0d013ce8da5d9a0e40f8b0cdbc3edaed22c9
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      bfe2907b
    • Yacov Manevich's avatar
  4. 18 Mar, 2019 1 commit
    • David Enyeart's avatar
      [FAB-13196] Make Fabric compatible with CouchDB 2.3 · a7eee0af
      David Enyeart authored
      
      
      CouchDB 2.3 changed format of fields update_seq and purge_seq.
      This causes a problem when Fabric maps the CouchDB
      JSON resposnes to structs.
      
      Since Fabric doesn't use these fields anyways, they can be removed
      from the Fabric CouchDB structs. This will make Fabric
      compatible with CouchDB 2.3.
      
      Change-Id: I89f789ef79ea485aa74b99ef047af417a8be044e
      Signed-off-by: default avatarDavid Enyeart <enyeart@us.ibm.com>
      a7eee0af
  5. 17 Mar, 2019 2 commits
    • yacovm's avatar
      [FAB-14690] Debug logs in gossip pull · 52a4a95b
      yacovm authored
      
      
      This change set adds some more debug logs in the gossip pull
      for blocks.
      
      Change-Id: I9f2d3609c2ba5aba3e06d3741c061ce6e7bc90f0
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      (cherry picked from commit ceef61fb)
      52a4a95b
    • yacovm's avatar
      [FAB-14688] Check inner, not outer block msg · d3977059
      yacovm authored
      
      
      The gossip code that handles pull block data updates
      has an optimization that first performs a simulation
      of adding an inner block message to the message store,
      and only if the simulation is successful  -
      it then verifies the message.
      
      The problem is that the simulation is done against the outer
      message, and thus the optimization does not occur.
      
      This change set fixes this.
      
      Change-Id: I71c94e9b1cad2bfa6e9cfce700d8bd3209e9b5e7
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      d3977059
  6. 16 Mar, 2019 1 commit
    • yacovm's avatar
      [FAB-14687] Only add to puller if needed · 66f41b43
      yacovm authored
      
      
      The gossip channel's method AddToMsgStore adds a block message
      to both the block store and to the block puller.
      
      However, it can be that the message isn't added to the block store
      due to it being too old.
      
      In such a case we must not add it to the block puller, because it is evicted
      by the invalidation trigger of the block store which is programmed to
      remove it from the block puller.
      
      Change-Id: I64e7f4e64a337df5593a58a5d52a821b376b2bfb
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      66f41b43
  7. 15 Mar, 2019 1 commit
  8. 14 Mar, 2019 2 commits
  9. 07 Mar, 2019 2 commits
    • Manish Sethi's avatar
    • Yoav Tock's avatar
      FAB-14327 Race in BlockWriter corrupts config sequence · a3f35b2c
      Yoav Tock authored
      
      
      There is a race between the go-routine that submits a config-update
      block to the internal thread that writes the (previous) block
      asynchronously to the ledger.
      
      The race may cause to back-to-back config-update transactions to have bad
      block metadata - in the first the LAST_CONFIG will be ok, but in the
      second the LAST_CONFIG will point to the first, rather then the second.
      This may happen independently in different ledgers, creating a fork.
      
      This fix avoid Bundle update before the go-routine in WriteBlock()
      finished writing the previous block. We do this (in particular) to
      prevent bw.support.Sequence() from advancing before the go-routine
      in WriteBlock() reads it. In general, this prevents the StableBundle
      from changing before the go-routine in WriteBlock() finishes.
      
      The unit test replicates the condtions that cause the bug and verifies
      it is fixed (without the fix it fails).
      
      See respective JIRA for more details.
      
      Change-Id: If26654e006b4fe6d48d2d8fc73894eaff2426dcd
      Signed-off-by: default avatarYoav Tock <tock@il.ibm.com>
      a3f35b2c
  10. 05 Mar, 2019 2 commits
  11. 04 Mar, 2019 2 commits
  12. 12 Feb, 2019 1 commit
  13. 08 Feb, 2019 1 commit
  14. 28 Jan, 2019 1 commit
  15. 21 Jan, 2019 2 commits
    • yacovm's avatar
      [FAB-13471] lifecycle to handle multiple updates · 27862905
      yacovm authored
      
      
      The ledger calls several HandleChaincodeDeploy for each update
      but only a single ChaincodeDeployDone after all invocations
      to HandleChaincodeDeploy were made.
      
      The current implementation only supported a single update,
      and as a result - a second ChaincodeDeployDone will get stuck
      writing to a channel.
      
      This change set makes the Lifecycle in core/cclifecycle
      to be able to handle any number of updates in a single block.
      
      Change-Id: I1d85018af398bd5cb968e42031986a999f6be444
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      27862905
    • ChanderG's avatar
      [FAB-13089] fetch attachments in CouchDB range queries · 49cce57b
      ChanderG authored
      
      
      Using, attachments=true, fetch all attachments in a CouchDB range
      queries instead of first obtaining metadata and fetching each attachment
      in a separate call.
      
      Change-Id: Ibe51e621d9c49116ebd9fbd866f939eecff326a4
      Signed-off-by: default avatarChanderG <mail@chandergovind.org>
      49cce57b
  16. 14 Jan, 2019 1 commit
  17. 10 Jan, 2019 1 commit
    • pama-ibm's avatar
      [FABCI-258] fixed doc link · 339feaea
      pama-ibm authored
      
      
      Fixed the docs badge link to point to
      the release branch of the doc.
      Also added a link to the Hyperledger
      Fabric rocket chat
      
      Change-Id: I98104e92cb9e782e77579d29ed2e4947d38c6c73
      Signed-off-by: default avatarpama-ibm <pama@ibm.com>
      339feaea
  18. 09 Jan, 2019 1 commit
    • yacovm's avatar
      [FAB-13602] Fix time.Timer leak in gossip handshake · acbd4111
      yacovm authored
      
      
      When authenticating a remote peer, a connection message
      is expected to be received from it.
      
      There is a time.Timer used, which isn't closed, and therefore
      there is a resource leak of a time.Timer.
      
      This change set changes this to a time.After.
      
      Change-Id: I4b4dce2af2854ccd1e061296daa16b0c5f42c525
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      acbd4111
  19. 14 Dec, 2018 1 commit
    • yacovm's avatar
      [FAB-11608] Gossip: Optimize alive message verification · 97cc9d0e
      yacovm authored
      
      
      Alive messages are currently verified in 2 places:
      1) Gossip routing layer, before forwarded to the gossip membership layer
      2) Gossip membership layer
      
      This causes redundant message verification which induces CPU overhead due
      to un-needed ECDSA signature verification.
      
      This change set:
      
      1) Removes alive message verification in the routing layer
      2) Solidifies the logic of the verification in the membership layer
      3) Adds a unit test that ensures that:
         - Alive messages are verified "once"
         - Alive messages from membership responses are verified
           if they are fresher than the messages received directly
           by gossip so far.
         - Alive messages from membership requests are always verified
           since they trigger sending membership responses based on
           the membership request's alive message.
      
      Change-Id: I70f8c0f1acfdf52e2107fd71ad55a3d002a392ec
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      (cherry picked from commit f4067cb7)
      97cc9d0e
  20. 13 Dec, 2018 2 commits
    • yacovm's avatar
      [FAB-13251] Add nil check in ToGossipMessage · 85f05996
      yacovm authored
      
      
      Change-Id: I4b7dac64775107d88b0807a4e5f058222e6b8d2f
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      85f05996
    • David Enyeart's avatar
      [FAB-12443] Tolerate CouchDB 2.2 Changes · 094e9562
      David Enyeart authored
      
      
      CouchDB 2.2 does not throw an exception anymore
      if a specified index does not exist.
      This is a change and unit tests will need to not check
      for exceptions if a named index in the query does not exist.
      
      Example:
      {"selector":\{"owner":"tom"} ,
      "use_index":["indexOwnerDoc","indexOwner"]}
      
      If the document indexOwnerDoc or the index indexOwner does not exist,
      an exception will not be thrown.
      
      CouchDB unit tests are changed to reflect the changes.
      
      Change-Id: I8b5259ffb0d55d5e4ae85a49dbf06e58673a0e89
      Signed-off-by: default avatarDavid Enyeart <enyeart@us.ibm.com>
      094e9562
  21. 26 Nov, 2018 1 commit
  22. 15 Nov, 2018 2 commits
  23. 26 Oct, 2018 1 commit
  24. 16 Oct, 2018 1 commit
  25. 11 Oct, 2018 5 commits
  26. 10 Oct, 2018 1 commit