1. 03 Mar, 2019 8 commits
    • Jay Guo's avatar
      [FAB-14179] Perform checks of instantiation in test · 4e612182
      Jay Guo authored
      `checkPeers` should be supplied to `nwo.InstantiateChaincode`
      if called separately, so that checks are performed to ensure
      the instantiation. Otherwise, an immediate query/invoke following
      this would fail, because that deploy tx may not be committed yet.
      Change-Id: I8e870b183c279aca53961745031fdee7085efe18
      Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    • Jay Guo's avatar
      [FAB-13656] Size-based snapshotting · 566562e7
      Jay Guo authored
      Instead of taking snapshot every N blocks, this CR
      changes it to taking snapshot every N bytes.
      This also sets default SnapshotInterval to 100MB, if
      it's unset. Otherwise data in memory is never compacted
      till OOM.
      Meanwhile, DefaultSnapshotCatchUpEntries is shrunk so
      it does not take too much space to preserve extra entries
      every time a snapshot is taken. Slow nodes are catching up
      using blockpuller, which is also efficient.
      Change-Id: I79cfeb8652fcbafdeb5793bf4f06267b95a858d6
      Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    • Jay Guo's avatar
      [FAB-13934] Add GinkgoRecover to integration tests. · 9e9000a2
      Jay Guo authored
      This makes assertion failure more debuggable.
      Change-Id: I66f8ac8c9b755eaab37f89a10a39c3bfa44ef39a
      Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    • yacovm's avatar
      [FAB-13618] Fix test flake in OSN eviction test · 06671310
      yacovm authored
      The integration test that checks that an orderer is evicted from a channel
      and stops its service for the channel has broken due to:
      1) A removed log message that it used as an indicator was removed
         in a parallel CR.
      2) In another parallel CR, the communication layer now puts message into
         the log asynchronously and doesn't block - and as a result -
         a node might be evicted from the channel but the other nodes will
         close the connection to it before it has a chance of obtaining the block
         that evicts it from the channel.
      For (1) - the message that no longer exists was removed from the test.
      For (2) - the node that is removed is now always the leader, and this way
                it always gets the block update (because it sends it in the first
      Change-Id: Ib67d1a448447ef44d9b41f52c8ee8bddb6b064ce
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-14010] Integration test- remove OSN from cluster · e1b2171d
      yacovm authored
      This change set adds an integration test that removes an OSN
      from an application channel and system channel and ensures
      that the OSN gracefully shuts down for these channels.
      Change-Id: Idcdad8083f5881c6194185ad5f623c9c64323a02
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • Jay Guo's avatar
      [FAB-12709] Add integration test for CheckQuorum · bd6bd0ec
      Jay Guo authored
      Change-Id: Ie80ff2f11de59a216a94fc61330f9d625ed16e59
      Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    • Jay Guo's avatar
      [FAB-13848] Fix flaky integration test in raft cft · 20dc27fc
      Jay Guo authored
      Test may query chaincode too fast after invocation, before block
      is actually committed.
      Change-Id: I4159fb2dfb31310eccfd64fcb9a9a99ceef54db0
      Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    • yacovm's avatar
      [FAB-13363] Block verification for onboarding · b6dc844a
      yacovm authored
      This change set connects the block verification infrastructure
      for onboarding to the production code.
      Now, whenever an orderer onboards a channel - it also verifies the blocks
      of the application channels, by:
      1) Creating a bundle from the genesis block, which is derived from
         the system channel (which is verified using backward hash chain validation).
      2) Verifying blocks using the bundle.
      3) Replacing the bundle with a new bundle whenever a config block is pulled.
      It also adds a check in the integration test, that ensures that no errors
      are reported in the log of the onboarded OSN.
      Change-Id: I3c5714f9d4491cdfd78e4e47407925136906d413
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
  2. 28 Feb, 2019 1 commit
    • Saad Karim's avatar
      [FAB-14331] - Fix flaky Couch DB health check test · 67b42faf
      Saad Karim authored
      There is a delay between the call to stop container,
      and the container getting removed from the docker network.
      Modified the test to poll the health check endpoint until
      the docker container is completely removed and the health
      check returns back the expected result.
      Enables the Couch DB health check test [FAB-14333]
      Change-Id: If6da40793e63378e6fd79e1d446b66ffeb72af72
      Signed-off-by: default avatarSaad Karim <skarim@us.ibm.com>
  3. 27 Feb, 2019 12 commits
    • yacovm's avatar
      [FAB-13331] Refactor metadata updates in nwo · 4f802d51
      yacovm authored
      This change set refactors metadata updates by making them
      use a function that dictates how to handle consensus metadata.
      Change-Id: I3aa68e4b268a24887e4cba891e02ebce1a2ec65d
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • Artem Barger's avatar
      [FAB-14332] disable flaky CouchDB healthcheck test · c0450096
      Artem Barger authored
      Change-Id: Ic17894d5eff66a195f93fcccacf2e3115587d7a5
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
    • yacovm's avatar
      [FAB-13180] Orderer: auto-join existing inactive chains · 4bc13c8e
      yacovm authored
      This change set makes cluster type OSNs autonomously detect channels
      that exist and that they should be part of (the channel configuration
      has their public credentials as a consenter for the channel),
      but that they do not run chains for, or have the blocks in their ledger.
      This can happen from several reasons:
      - The OSN is added to an existing chain, and since it didn't participate
        in the chain so far, it didn't get the blocks that tell it is now
        part of the channel.
      - The OSN tried to detect whether it is part of a channel, but it
        wasn't able, because all OSNs of the system channel returned
        service-unavailable. This can happen if:
        - a leader election takes place
        - the network is acting up so the leadership was lost
        - a channel has been deserted (all OSNs left it).
      To take care of such use cases, all OSNs now:
      - Track inactive chains that they know of, but they do not participate in
      - Periodically(*) probe the system channel OSNs to see if they are now
        part of these chains or not.
      - If so, then they replicate the chains, and create instances of them,
        and replace the instances of the inactive chains in the registrar
        with the new instances of type etcdraft.
      (*) - 10 seconds after boot, then after 20 seconds,
            then after 40 seconds, etc. etc. eventually- every 5 minutes.
      Change-Id: I3c2a84e6f4f402e011e7a895345b3d3982247083
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
    • yacovm's avatar
      [FAB-13330] Rename GetConfigBlock to GetConfig in nwo · 4ba5d615
      yacovm authored
      This change sets renames the GetConfigBlock to GetConfig, to fit
      what it actually returns.
      Change-Id: Ica00d5e6dab91852767c1c4fd1d8af0454bd1bd5
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-13362] Pulling not servicing chains in onboarding · 12948f81
      yacovm authored
      An orderer might not have permission to try and probe whether it belongs
      to a certain application channel.
      In addition, since the OSNs of an application channel might be a subset
      of the system channel OSNs, they may be unreachable at the time of
      onboarding, so all we will get from other OSNs is "service unavailable".
      This change set addresses this by making that if we try to pull blocks
      in order to see whether we belong to the channel (by pulling the latest block)
      and we only bad responses from all OSNs that say: un-authorized, not available,
      we don't panic. Instead we just skip pulling the chain.
      If some orderer returns unauthorized, and the rest either not return
      anything, or return a bad request, unavailable, etc. - we return
      that we are unauthorized.
      If some orderer returns service unavailable, and the rest return
      anything that is not unauthorized, then we classify it as service
      If no orderer returns unauthorized/unavailable,
      and all orderers return something bad or not return anything at all -
      we now panic as before, because it means we probably misconfigured the
      node, or we are in a network partition so we don't want to
      skip pulling blocks.
      This change set also enchances the reconfiguration integration test
      to include a third channel for which the onboarded OSN is not authorized.
      Change-Id: I6f9b0cfe3671794ef1c036b432e77e2ac55b1efd
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-13441] Properly capture OSN output · c73870ff
      yacovm authored
      The reconfiguration and onboarding integration tests ensures
      that the OSNs stop logging errors at the end of the test,
      in order to ensure there aren't any not noticed faults
      that occurred due to reconfiguration/onboarding.
      The function used the wrong method to obtain a buffer
      that is used to read the process's output.
      Change-Id: Ieadae1bb083454b195cbfe52b41582dc9dbbf80a
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-13643] Leader crash and failover integration test · 5c3e122f
      yacovm authored
      This change set adds a test case that:
      1) Spawns 3 etcdraft OSNs
      2) Finds out who is the leader
      3) Kills it
      4) Makes sure one of the remaining 2 OSNs takes over.
      Change-Id: I6f42003ddd987b7927a0f06018682829844f3994
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-13415] DRY up UpdateConsensusMetadata in nwo · 86cb2d8c
      yacovm authored
      This change set makes AddConsenter and RemoveConsenter use
      a consensus specific method UpdateEtcdRaftMetadata instead
      of the generic UpdateConsensusMetadata one, to remove
      code duplication.
      It also addresses a few nits in etcdraft_reconfig_test.
      Change-Id: I86d50fd80d4985df77474c054ce916f0d2fb62e7
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-1337] Raft: Commit genesis blocks for non-members · c9996d64
      yacovm authored
      Currently (before this CR), an onboarded OSN doesn't pull any blocks
      for channels it doesn't participate in.
      Aas a result, when the OSN starts up after onboarding - it doesn't have these
      channels in its registrar, and therefore may classify channel
      creation transactions differently than its fellow OSNs that do have
      the channels it didn't pull.
      In order to avoid a state fork, this change set makes the OSN
      to commit the genesis block for channels it doesn't participate in.
      This is *NOT* done by pulling the genesis blocks, since the OSN may not have
      permissions to do that in the first place, but instead - it creates
      a genesis block from the system channel block that has the channel creation
      This change set also changes the integration test for onboarding to
      adjust to the changes, namely - ensures the OSN committed the genesis
      block for a channel it doesn't participate in, and upon Broadcast,
      returns an answer stating it doesn't participate in the channel.
      Also, it reduces the run time for the integration test to 50s.
      Change-Id: Icf5754df6cedb7725c4d7091c7366ce0b17ff1b7
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
    • yacovm's avatar
      [FAB-13208] Raft Reconfig&Onboarding integration test · a46a55d5
      yacovm authored
      This change set adds an integration test for etcdraft orderers which:
      1) Spawns 3 OSNs of type etcdraft.
      2) Rotates their TLS certificates.
      3) Spawns a fourth OSN of type etcdraft.
      4) Gives it the last config block of the system channel.
      5) Ensures it sync with the channels it needs.
      6) Ensures it doesn't sync with the channels it doesn't need.
      7) Ensures it doesn't log errors to the logs of the orderers.
      Change-Id: I7f4cb1b6d841f51aae9f091da80797d1bac3df99
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
    • yacovm's avatar
      [FAB-13481] Make onboarding code more idiomatic · 532b5382
      yacovm authored
      This change set addresses code review comments from
      https://gerrit.hyperledger.org/r/#/c/28391/ and from
      in an attempt to make the orderer code more idiomatic.
      Change-Id: I04ac7bc21ee8fc1ccda4e76d8afa53fe527f7f5e
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
    • yacovm's avatar
      [FAB-13150] Re-enable etcdraft for v2.0 development · 3713cc30
      yacovm authored
      This change set re-enables etcdraft to resume v2.0 development
      after v1.4 branch is cut.
      Change-Id: I384247a9de2763a207bbde4fa8e519d703241ad5
      Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
  4. 21 Feb, 2019 1 commit
  5. 15 Jan, 2019 1 commit
  6. 09 Jan, 2019 1 commit
  7. 04 Dec, 2018 2 commits
  8. 29 Nov, 2018 1 commit
  9. 28 Nov, 2018 1 commit
  10. 27 Nov, 2018 1 commit
  11. 19 Nov, 2018 1 commit
  12. 16 Nov, 2018 2 commits
  13. 15 Nov, 2018 1 commit
    • Matthew Sykes's avatar
      [FAB-12843] wire logspec handler · 91e0b0b9
      Matthew Sykes authored
      This introduces the concept of an "operations" endpoint for the orderer
      and peer. The endpoint will support health checks, logspec management,
      and, when enabled, prometheus metrics.
      The endpoint uses TLS mutual auth for authentication and authorization.
      Fabric roles are not used so a separate client CA is recommended.
      Change-Id: Ifeb0e63faf0e3868845efad981cd1bbd16941535
      Signed-off-by: default avatarMatthew Sykes <sykesmat@us.ibm.com>
  14. 09 Nov, 2018 1 commit
    • Matthew Sykes's avatar
      Instantiate and wire metrics provider · 7c7f9458
      Matthew Sykes authored
      This introduces the configuration for metrics in the peer, initializes
      the metrics provider, wires grpc interceptors for metrics and logging,
      and establishes basic integration tests to ensure some metrics are
      exported by the peer.
      FAB-12713 #done
      FAB-12711 #done
      Change-Id: I47f44df4e11e3aeaaf401cb6a200bd4161a6e4db
      Signed-off-by: default avatarMatthew Sykes <sykesmat@us.ibm.com>
  15. 08 Nov, 2018 1 commit
  16. 31 Oct, 2018 1 commit
  17. 18 Oct, 2018 1 commit
  18. 17 Oct, 2018 1 commit
  19. 16 Oct, 2018 1 commit
  20. 14 Oct, 2018 1 commit