From c06858fc8eeaa52d4f65404541dd95f00d79a577 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 28 Feb 2024 14:23:39 -0500 Subject: [PATCH 1/5] Update E2E matrix Signed-off-by: Nicko Guyer --- .github/workflows/e2e.yml | 168 ++++++++++++++++++++++++-------------- 1 file changed, 107 insertions(+), 61 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cb373bb8..09aa04ac 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -7,64 +7,110 @@ permissions: contents: write jobs: - e2e-test: - runs-on: ubuntu-latest - strategy: - matrix: - test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] - blockchain-provider: [geth, fabric, besu] - token-provider: [none, erc1155, erc20_erc721] - database-type: [sqlite3, postgres] - exclude: - - blockchain-provider: geth - test-suite: TestFabricE2ESuite - - blockchain-provider: besu - test-suite: TestFabricE2ESuite - - blockchain-provider: fabric - test-suite: TestEthereumE2ESuite - - blockchain-provider: fabric - token-provider: erc1155 - - blockchain-provider: fabric - token-provider: erc20_erc721 - - blockchain-provider: geth - token-provider: none - - blockchain-provider: besu - token-provider: none - fail-fast: false - steps: - - name: Checkout FireFly CLI - uses: actions/checkout@v4 - with: - path: firefly-cli - fetch-depth: 0 - - name: Checkout FireFly Core repo - uses: actions/checkout@v4 - with: - repository: hyperledger/firefly - path: firefly - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: "1.21" - - - name: Compile FireFly CLI - working-directory: firefly-cli - run: make install - - - name: Run E2E tests - working-directory: firefly - env: - TEST_SUITE: ${{ matrix.test-suite }} - BLOCKCHAIN_PROVIDER: ${{ matrix.blockchain-provider }} - TOKENS_PROVIDER: ${{ matrix.token-provider }} - DATABASE_TYPE: ${{ matrix.database-type }} - DOWNLOAD_CLI: false - run: ./test/e2e/run.sh - - - name: Archive container logs - uses: actions/upload-artifact@v4 - if: always() - with: - name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.database-type }}-${{ matrix.token-provider }} - path: containerlogs/logs.txt + runs-on: ubuntu-latest + needs: docker + strategy: + fail-fast: false + matrix: + stack-type: [ethereum, fabric] + exclude: [stack-type: ethereum, stack-type: fabric] + include: + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: sqlite3 + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: postgres + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: sqlite3 + token-provider: erc1155 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyTokensRemoteNameE2ESuite + database-type: postgres + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: fabric + test-suite: TestFabricE2ESuite + database-type: sqlite3 + token-provider: none + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumGatewayE2ESuite + database-type: sqlite3 + token-provider: erc20_erc721 + multiparty-enabled: false + + - stack-type: fabric + test-suite: TestFabricGatewayE2ESuite + database-type: sqlite3 + token-provider: none + multiparty-enabled: false + + - stack-type: ethereum + blockchain-connector: ethconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: sqlite3 + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: ethconnect + test-suite: TestEthereumGatewayLegacyEthE2ESuite + database-type: sqlite3 + token-provider: erc1155 + multiparty-enabled: false + + steps: + - name: Checkout FireFly CLI + uses: actions/checkout@v4 + with: + path: firefly-cli + fetch-depth: 0 + - name: Checkout FireFly Core repo + uses: actions/checkout@v4 + with: + repository: hyperledger/firefly + path: firefly + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21" + + - name: Compile FireFly CLI + working-directory: firefly-cli + run: make install + + - name: Run E2E tests + working-directory: firefly + env: + TEST_SUITE: ${{ matrix.test-suite }} + STACK_TYPE: ${{ matrix.stack-type }} + BLOCKCHAIN_CONNECTOR: ${{ matrix.blockchain-connector }} + TOKENS_PROVIDER: ${{ matrix.token-provider }} + DATABASE_TYPE: ${{ matrix.database-type }} + MULTIPARTY_ENABLED: ${{ matrix.multiparty-enabled }} + run: ./test/e2e/run.sh + + - name: Archive container logs + uses: actions/upload-artifact@v4 + if: always() + with: + name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.blockchain-connector }}-${{ matrix.database-type }}-${{ matrix.token-provider }} + path: containerlogs/logs.txt From e55a86bc9d080e1b270cfa776fa06799e1e79041 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 28 Feb 2024 14:27:23 -0500 Subject: [PATCH 2/5] Fix yaml Signed-off-by: Nicko Guyer --- .github/workflows/e2e.yml | 137 +++++++++++++++++++------------------- 1 file changed, 69 insertions(+), 68 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 09aa04ac..9613a3c5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -7,74 +7,75 @@ permissions: contents: write jobs: - runs-on: ubuntu-latest - needs: docker - strategy: - fail-fast: false - matrix: - stack-type: [ethereum, fabric] - exclude: [stack-type: ethereum, stack-type: fabric] - include: - - stack-type: ethereum - blockchain-connector: evmconnect - test-suite: TestEthereumMultipartyE2ESuite - database-type: sqlite3 - token-provider: erc20_erc721 - multiparty-enabled: true - - - stack-type: ethereum - blockchain-connector: evmconnect - test-suite: TestEthereumMultipartyE2ESuite - database-type: postgres - token-provider: erc20_erc721 - multiparty-enabled: true - - - stack-type: ethereum - blockchain-connector: evmconnect - test-suite: TestEthereumMultipartyE2ESuite - database-type: sqlite3 - token-provider: erc1155 - multiparty-enabled: true - - - stack-type: ethereum - blockchain-connector: evmconnect - test-suite: TestEthereumMultipartyTokensRemoteNameE2ESuite - database-type: postgres - token-provider: erc20_erc721 - multiparty-enabled: true - - - stack-type: fabric - test-suite: TestFabricE2ESuite - database-type: sqlite3 - token-provider: none - multiparty-enabled: true - - - stack-type: ethereum - blockchain-connector: evmconnect - test-suite: TestEthereumGatewayE2ESuite - database-type: sqlite3 - token-provider: erc20_erc721 - multiparty-enabled: false - - - stack-type: fabric - test-suite: TestFabricGatewayE2ESuite - database-type: sqlite3 - token-provider: none - multiparty-enabled: false - - - stack-type: ethereum - blockchain-connector: ethconnect - test-suite: TestEthereumMultipartyE2ESuite - database-type: sqlite3 - token-provider: erc20_erc721 - multiparty-enabled: true - - - stack-type: ethereum - blockchain-connector: ethconnect - test-suite: TestEthereumGatewayLegacyEthE2ESuite - database-type: sqlite3 - token-provider: erc1155 - multiparty-enabled: false + e2e-test: + runs-on: ubuntu-latest + needs: docker + strategy: + fail-fast: false + matrix: + stack-type: [ethereum, fabric] + exclude: [stack-type: ethereum, stack-type: fabric] + include: + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: sqlite3 + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: postgres + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: sqlite3 + token-provider: erc1155 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumMultipartyTokensRemoteNameE2ESuite + database-type: postgres + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: fabric + test-suite: TestFabricE2ESuite + database-type: sqlite3 + token-provider: none + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: evmconnect + test-suite: TestEthereumGatewayE2ESuite + database-type: sqlite3 + token-provider: erc20_erc721 + multiparty-enabled: false + + - stack-type: fabric + test-suite: TestFabricGatewayE2ESuite + database-type: sqlite3 + token-provider: none + multiparty-enabled: false + + - stack-type: ethereum + blockchain-connector: ethconnect + test-suite: TestEthereumMultipartyE2ESuite + database-type: sqlite3 + token-provider: erc20_erc721 + multiparty-enabled: true + + - stack-type: ethereum + blockchain-connector: ethconnect + test-suite: TestEthereumGatewayLegacyEthE2ESuite + database-type: sqlite3 + token-provider: erc1155 + multiparty-enabled: false steps: - name: Checkout FireFly CLI From bf0a9ebfc39bd89abce8a324e45420f59d295e8d Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 28 Feb 2024 14:30:58 -0500 Subject: [PATCH 3/5] Fix yaml more Signed-off-by: Nicko Guyer --- .github/workflows/e2e.yml | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9613a3c5..08a9686a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -77,41 +77,41 @@ jobs: token-provider: erc1155 multiparty-enabled: false - steps: - - name: Checkout FireFly CLI - uses: actions/checkout@v4 - with: - path: firefly-cli - fetch-depth: 0 - - name: Checkout FireFly Core repo - uses: actions/checkout@v4 - with: - repository: hyperledger/firefly - path: firefly - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: "1.21" - - - name: Compile FireFly CLI - working-directory: firefly-cli - run: make install - - - name: Run E2E tests - working-directory: firefly - env: - TEST_SUITE: ${{ matrix.test-suite }} - STACK_TYPE: ${{ matrix.stack-type }} - BLOCKCHAIN_CONNECTOR: ${{ matrix.blockchain-connector }} - TOKENS_PROVIDER: ${{ matrix.token-provider }} - DATABASE_TYPE: ${{ matrix.database-type }} - MULTIPARTY_ENABLED: ${{ matrix.multiparty-enabled }} - run: ./test/e2e/run.sh - - - name: Archive container logs - uses: actions/upload-artifact@v4 - if: always() - with: - name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.blockchain-connector }}-${{ matrix.database-type }}-${{ matrix.token-provider }} - path: containerlogs/logs.txt + steps: + - name: Checkout FireFly CLI + uses: actions/checkout@v4 + with: + path: firefly-cli + fetch-depth: 0 + - name: Checkout FireFly Core repo + uses: actions/checkout@v4 + with: + repository: hyperledger/firefly + path: firefly + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21" + + - name: Compile FireFly CLI + working-directory: firefly-cli + run: make install + + - name: Run E2E tests + working-directory: firefly + env: + TEST_SUITE: ${{ matrix.test-suite }} + STACK_TYPE: ${{ matrix.stack-type }} + BLOCKCHAIN_CONNECTOR: ${{ matrix.blockchain-connector }} + TOKENS_PROVIDER: ${{ matrix.token-provider }} + DATABASE_TYPE: ${{ matrix.database-type }} + MULTIPARTY_ENABLED: ${{ matrix.multiparty-enabled }} + run: ./test/e2e/run.sh + + - name: Archive container logs + uses: actions/upload-artifact@v4 + if: always() + with: + name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.blockchain-connector }}-${{ matrix.database-type }}-${{ matrix.token-provider }} + path: containerlogs/logs.txt From aa46145bfd7da8d91f54f8c8726c7d0dd17c9561 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 28 Feb 2024 14:32:11 -0500 Subject: [PATCH 4/5] Moar yaml fix Signed-off-by: Nicko Guyer --- .github/workflows/e2e.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 08a9686a..0e320a06 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -9,7 +9,6 @@ permissions: jobs: e2e-test: runs-on: ubuntu-latest - needs: docker strategy: fail-fast: false matrix: From c71842f6d2df5167859d5ae87caf14a4e16c5ee1 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 28 Feb 2024 15:31:27 -0500 Subject: [PATCH 5/5] Fix fabric genesis issue Signed-off-by: Nicko Guyer --- internal/blockchain/fabric/constants.go | 2 +- internal/blockchain/fabric/fabric_provider.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/blockchain/fabric/constants.go b/internal/blockchain/fabric/constants.go index 9007c757..c08200d4 100644 --- a/internal/blockchain/fabric/constants.go +++ b/internal/blockchain/fabric/constants.go @@ -16,7 +16,7 @@ package fabric -var FabricToolsImageName = "hyperledger/fabric-tools:2.5" +var FabricToolsImageName = "hyperledger/fabric-tools:2.5.6" var FabricCAImageName = "hyperledger/fabric-ca:1.5" var FabricOrdererImageName = "hyperledger/fabric-orderer:2.5" var FabricPeerImageName = "hyperledger/fabric-peer:2.5" diff --git a/internal/blockchain/fabric/fabric_provider.go b/internal/blockchain/fabric/fabric_provider.go index 241839dd..ecafefde 100644 --- a/internal/blockchain/fabric/fabric_provider.go +++ b/internal/blockchain/fabric/fabric_provider.go @@ -126,7 +126,7 @@ func (p *FabricProvider) FirstTimeSetup() error { "--platform", getDockerPlatform(), "--rm", "-v", fmt.Sprintf("%s:/etc/firefly", volumeName), - "-v", fmt.Sprintf("%s:/var/hyperledger/fabric/config/configtx.yaml", path.Join(blockchainDirectory, "configtx.yaml")), + "-v", fmt.Sprintf("%s:/etc/hyperledger/fabric/configtx.yaml", path.Join(blockchainDirectory, "configtx.yaml")), FabricToolsImageName, "configtxgen", "-outputBlock", "/etc/firefly/firefly.block",