Skip to content

Fix #447: Upgrade Blockchain Explorer version to 2.0.0 #522

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

Closed

Conversation

VijetaPriya47
Copy link
Contributor

This PR fixes issue #447 by upgrading the Blockchain Explorer version from 1.1.8 to 2.0.0.

Changes made:

  • Updated the Explorer version in src/setup-docker/index.ts
  • Updated the image references to use the GHCR registry instead of DockerHub
  • Updated the test snapshots to reflect the new version and image references
  • Updated the CHANGELOG.md file to document the changes
  • This fix is done after fixing the error : 519

Fixes #447

Signed-off-by: Vijeta Priya <vijetapriya47@gmail.com>
Signed-off-by: Vijeta Priya <vijetapriya47@gmail.com>
Signed-off-by: Vijeta Priya <vijetapriya47@gmail.com>
@VijetaPriya47
Copy link
Contributor Author

VijetaPriya47 commented Apr 12, 2025

@dzikowski @umegbewe
Could you please take a moment to review and approve this? I am happy to make any changes to the code based on your feedback or suggestions. thanks

@dzikowski
Copy link
Contributor

the test-04-snapshot.sh test verify of the explorer is running. The check in the code verifies if given log messages are shown in explorer docker container. Since the version changed, maybe also the message is different. That's probably the cause of failing test-04-snapshot check.

@VijetaPriya47
Copy link
Contributor Author

So, would we have to change test-4 snapshot and test-3 also, according to the new version?

@dzikowski
Copy link
Contributor

Just test-4 I think. I don't see any verification of explorer in other test files.

@VijetaPriya47
Copy link
Contributor Author

It's failing test-3 also. Should I review my code again, as to why it's failing test-3

@dzikowski
Copy link
Contributor

You can ignore test-3:

Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-nodeenv:2.4: API error (500): toomanyrequests: You have reached your unauthenticated pull rate limit. https://www.docker.com/increase-rate-limit

It's because of too many docker pull calls from GH actions. We just need to wait some time and retry. I was just doing a lot of PR merges and updates, and we eventually exceeded the quota.

@VijetaPriya47
Copy link
Contributor Author

it passed test-3. Can we force merge it then?

@dzikowski
Copy link
Contributor

Test-4 is failing and action logs suggest explorer is not working. So we cannot merge it. Do you have access to action logs? Does test-4 pass locally?

@VijetaPriya47
Copy link
Contributor Author

log.txt
2025-04-14T10_00_52_710Z-debug-0.log
2025-04-14T10_00_49_968Z-debug-0.log
These are the action logs, which I was able to figure to extract from my system locally while running ./test-04-snapshot.sh

@dzikowski
Copy link
Contributor

When you run e2e-network/docker/test-04-snapshot.sh on your local machine, you should have output similar to the one here: https://github.com/hyperledger-labs/fablo/actions/runs/14433196704/job/40470552440?pr=522 (do you have access to it?)

The part that suggests explorer is not working correctly is:

➜ verifying if container explorer.example.com logs contain (88)... 'Successfully created channel event hub for \[my-channel1\]'
➜ verifying if container explorer.example.com logs contain (89)... 'Successfully created channel event hub for \[my-channel1\]'
➜ verifying if container explorer.example.com logs contain (90)... 'Successfully created channel event hub for \[my-channel1\]'
❌ failed: Container explorer.example.com logs does not contain 'Successfully created channel event hub for \[my-channel1\]'
Last log messages:
2025-04-13T20:53:31.464Z - error: [DiscoveryResultsProcessor]: parseDiscoveryResults[my-channel1] - Channel:my-channel1 received discovery error:access denied
    enableAuthentication: true,
    adminCredential: { id: 'admin', password: 'adminpw' },
    connection: { timeout: [Object] }
  },
  organizations: {
    Org1: {
      mspid: 'Org1MSP',
      adminPrivateKey: [Object],
      peers: [Array],
      signedCert: [Object]
    }
  },
  peers: {
    'peer0.org1.example.com': {
      url: 'grpcs://peer0.org1.example.com:7041',
      tlsCACerts: [Object]
    }
  },
  channels: { 'my-channel1': { peers: {} } }
}
[2025-04-13T20:53:31.470] [INFO] main - Please open web browser to access :http://localhost:8080/
[2025-04-13T20:53:31.470] [INFO] main - pid is 20
Error: 025-04-13T20:53:31.470] [ERROR] main - <<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
Error: 025-04-13T20:53:31.471] [ERROR] main - Error :  [
  'Default client peer is down and no channel details available database'
]
[2025-04-13T20:53:33.470] [INFO] main - Received kill signal, shutting down gracefully
[2025-04-13T20:53:33.471] [INFO] Platform - <<<<<<<<<<<<<<<<<<<<<<<<<< Closing explorer  >>>>>>>>>>>>>>>>>>>>>
[2025-04-13T20:53:33.471] [INFO] main - Closed out connections
Server stopped

I guess there was probably a change in explorer configuration, and the one provided previously needs to be adjusted to make explorer v2 working. A good way to start is to execute the test script locally, and verify explorer container logs. They will probably show what needs to be fixed.

@VijetaPriya47
Copy link
Contributor Author

Yup, I have access to the GitHub Actions log. I ran the e2e-network/docker/test-04-snapshot.sh script locally and compared my output with the CI logs. However, due to some permission issues in my local environment, the output isn't matching the CI logs. I feel I should set it up again and then rerun the script, compare and see where it needs to be fixed.

@VijetaPriya47 VijetaPriya47 closed this by deleting the head repository Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Blockchain Explorer version (2.0.0)
3 participants