Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SmartBFT consensus support #3781

Merged
merged 53 commits into from
Feb 20, 2023
Merged

Commits on Feb 17, 2023

  1. add SMaRtBFT consensus support

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    e3be07a View commit details
    Browse the repository at this point in the history
  2. Upgraded smartbft consensus library

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    8bc9086 View commit details
    Browse the repository at this point in the history
  3. smartbft mock interfaces

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    db83dbd View commit details
    Browse the repository at this point in the history
  4. smartbft consensus unit tests

    Signed-off-by: Yacov Manevich yacovm@il.ibm.com
    Signed-off-by: Yoav Tock tock@il.ibm.com
    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    6fe0ffa View commit details
    Browse the repository at this point in the history
  5. Validate block validation policy matches consenter set

    Change-Id: Ia0f926ddb984cc3008542328a85d41af56be36d3
    Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    ad6c10c View commit details
    Browse the repository at this point in the history
  6. bft configtxgen updates

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    61be868 View commit details
    Browse the repository at this point in the history
  7. integration test updates

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    76c7bf1 View commit details
    Browse the repository at this point in the history
  8. update to orderer main with debug statements

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    c39770c View commit details
    Browse the repository at this point in the history
  9. BFT chains are up and running

    Change-Id: I59bf40ff90be2299aa1733cc672ea88f94984b4f
    Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    894f3ed View commit details
    Browse the repository at this point in the history
  10. WIP first integration test

    DO NOT MERGE - the signature verification in the peer has been temporarily disabled
    
    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    c688bf4 View commit details
    Browse the repository at this point in the history
  11. Only append block signature if needed

    Change-Id: I13ebe069fe4f8fb9b7a3d4671668a5da85cab8ea
    Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    0b66bf1 View commit details
    Browse the repository at this point in the history
  12. Use identifier headers instead of signature headers and properly enco…

    …de/decode signatures
    
    Change-Id: Ifdd7e9a2a690dc6328bfec60ad22efae9a42fa7c
    Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    c651c80 View commit details
    Browse the repository at this point in the history
  13. integration test for update config transaction

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    1b53e83 View commit details
    Browse the repository at this point in the history
  14. Properly encode BFT policy when updating consenters

    Change-Id: I9eb09e2874f4c4fbea77d99aa0528204412c0820
    Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    d20d3fe View commit details
    Browse the repository at this point in the history
  15. block puller failing while block data identity referencing

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    76ed2b6 View commit details
    Browse the repository at this point in the history
  16. Fix signature verification

    Change the BlockPuller to use the protoutil.BlockVerifierFunc generator which works for BFT blocks.
    
    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    65beb66 View commit details
    Browse the repository at this point in the history
  17. reconfig with node removal failing

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    eb1fce5 View commit details
    Browse the repository at this point in the history
  18. Add “smartbft multiple nodes view change” test

    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    96c8893 View commit details
    Browse the repository at this point in the history
  19. integration test iteratively add and remove nodes

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    f414643 View commit details
    Browse the repository at this point in the history
  20. updated orderer rejoin integration test scenario

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    9cf5213 View commit details
    Browse the repository at this point in the history
  21. fixed lint erros and upgrade consensus module

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    07e1204 View commit details
    Browse the repository at this point in the history
  22. Fix unit tests

    Most of the test build failures were due to changing the signature verifier from an interface to a function generated by a HOF.  This meant that the mocks in the tests had to be rewritten.
    There are still some test failures in the smartbft package that I suspect haven’t worked in this version of Fabric.  They will be addressed in another commit.
    
    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    03cb1ae View commit details
    Browse the repository at this point in the history
  23. Fix ConfigTx ConsenterMapping integration test

    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    f2fb2b9 View commit details
    Browse the repository at this point in the history
  24. Fix raft integration tests

    The Raft channel_participation integration tests were failing because the new logic in initializeMultichannelRegistrar() for initialising without system channel assumes that the consenter type is BFT unless it is told otherwise in the local config.
    This commit adds the consenter type to the orderer config template
    
    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    020ba6c View commit details
    Browse the repository at this point in the history
  25. Fix linter error

    Fixes CI failure in BasicChecks phase
    
    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    878b229 View commit details
    Browse the repository at this point in the history
  26. Fix failures in smartbft unit tests

    Many of these were failing due to comparing error message that contain serialized proto structures.  Ideally, these shouldn’t be relied on in tests.
    
    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    3303530 View commit details
    Browse the repository at this point in the history
  27. Add smartbft integration test to CI

    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    e6fa688 View commit details
    Browse the repository at this point in the history
  28. Fix configtx integration test

    Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
    andrew-coleman authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    46da358 View commit details
    Browse the repository at this point in the history
  29. Align log expectation in test to actual log printed by the BFT library

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    9811043 View commit details
    Browse the repository at this point in the history
  30. Fix autonomous synchronization integration test

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    70e772f View commit details
    Browse the repository at this point in the history
  31. Make smartbft node addition and removal pass

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    3da479d View commit details
    Browse the repository at this point in the history
  32. code cleanup and updated quorum calculation

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    0ba16b1 View commit details
    Browse the repository at this point in the history
  33. go modules conflict

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    78be67d View commit details
    Browse the repository at this point in the history
  34. Removed commneted code

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    97d4aae View commit details
    Browse the repository at this point in the history
  35. addressed first set of review comments

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    8f5fc3b View commit details
    Browse the repository at this point in the history
  36. Updated detectSelfID to use consentermapping ecert

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    e520646 View commit details
    Browse the repository at this point in the history
  37. BFTchain uses new communication service

    Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
    Param-S authored and yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    3b4f173 View commit details
    Browse the repository at this point in the history
  38. Configure ingress at reconfig and include intermediate TLS CA certs

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    236052a View commit details
    Browse the repository at this point in the history
  39. Sanitize e-certs in communication mapping and when looking up ids

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    283d6ac View commit details
    Browse the repository at this point in the history
  40. Vendor latest consensus library

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    27ab528 View commit details
    Browse the repository at this point in the history
  41. Fix iterated removal integration test

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    8f8f502 View commit details
    Browse the repository at this point in the history
  42. Fix Raft integration tests

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    cda973a View commit details
    Browse the repository at this point in the history
  43. Verify requests received from followers

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    a89d10a View commit details
    Browse the repository at this point in the history
  44. Remove redundant print

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    6f84d44 View commit details
    Browse the repository at this point in the history
  45. Follower detects rogue genesis block, uses BFT signature verification

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    7fab0d0 View commit details
    Browse the repository at this point in the history
  46. Sanitize certs in UT

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    74b0023 View commit details
    Browse the repository at this point in the history
  47. Fix UT

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    96979f7 View commit details
    Browse the repository at this point in the history
  48. Fix integration test

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    9355ab4 View commit details
    Browse the repository at this point in the history
  49. Fix UTs, fix some ITs

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    f2ac0b1 View commit details
    Browse the repository at this point in the history
  50. add err check

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    ea1d78d View commit details
    Browse the repository at this point in the history
  51. Rebuild verifier when encountering config block

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    0c93b88 View commit details
    Browse the repository at this point in the history
  52. Remove print, elaborate comment

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    a2b6bd0 View commit details
    Browse the repository at this point in the history
  53. Resolve module conflicts and rebase on top of main

    Signed-off-by: Yacov Manevich <yacov.manevich@ibm.com>
    yacovm committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    af479c5 View commit details
    Browse the repository at this point in the history