Giter VIP home page Giter VIP logo

blockchain-explorer's Introduction

Blockchain Explorer

GitHub release (latest SemVer) node-current
Build Status CII Best Practice Documentation Status Test

Explorer is a simple, powerful, easy-to-use, well-maintained, open-source utility to browse activity on the underlying blockchain network. Users can configure and build Hyperledger Explorer on macOS and Ubuntu.

Current Release

Explorer Version Fabric Version Supported NodeJS Version Supported
v2.0.0 (Sep 05, 2023) v2.2, v2.4, v2.5 ^12.13.1, ^14.13.1, ^16.14.1

Legacy Releases (NOT SUPPORTED)

Explorer Version Fabric Version Supported NodeJS Version Supported
v1.1.8 (Aug 14, 2021) v1.4 to v2.3 ^12.13.1, ^14.13.1, ^16.14.1
v1.1.7 (Jul 04, 2021) v1.4 to v2.3 ^12.13.1, ^14.13.1
v1.1.6 (Jun 06, 2021) v1.4 to v2.3 ^12.13.1, ^14.13.1
v1.1.5 (Apr 20, 2021) v1.4 to v2.3 ^12.13.1, ^14.13.1
v1.1.4 (Jan 29, 2021) v1.4 to v2.2 ^12.13.1, ^14.13.1
v1.1.3 (Sep 28, 2020) v1.4.0 to v2.2.0 12.16.x
v1.1.2 (Aug 12, 2020) v1.4.0 to v2.2.0 12.16.x

There are 2 options to get Explorer started. Following are the software dependencies required for each option. And if you want to know more about each configuration, please refer README-CONFIG.md.

Quick start (using Docker)

Prerequisites

Start Hyperledger Fabric network

This guide assumes that you've already started the test network by following Hyperledger Fabric official tutorial.

Configure

  • Create a new directory (e.g. explorer)

    mkdir explorer
    cd explorer
  • Copy the following files from the repository

    wget https://raw.githubusercontent.com/hyperledger/blockchain-explorer/main/examples/net1/config.json
    wget https://raw.githubusercontent.com/hyperledger/blockchain-explorer/main/examples/net1/connection-profile/test-network.json -P connection-profile
    wget https://raw.githubusercontent.com/hyperledger/blockchain-explorer/main/docker-compose.yaml
  • Copy entire crypto artifact directory (organizations/) from your fabric network (e.g /fabric-samples/test-network)

    cp -r ../fabric-samples/test-network/organizations/ .
  • Now, you should have the following files and directory structure.

    docker-compose.yaml
    config.json
    connection-profile/test-network.json
    organizations/ordererOrganizations/
    organizations/peerOrganizations/
    
  • Edit environmental variables in docker-compose.yaml to align with your environment

        networks:
        mynetwork.com:
            external:
                name: fabric_test
    
        ...
    
        services:
          explorer.mynetwork.com:
    
            ...
    
            volumes:
              - ./config.json:/opt/explorer/app/platform/fabric/config.json
              - ./connection-profile:/opt/explorer/app/platform/fabric/connection-profile
              - ./organizations:/tmp/crypto
              - walletstore:/opt/explorer/wallet

    An alternative option is to export environment variables in your shell.

    export EXPLORER_CONFIG_FILE_PATH=./config.json
    export EXPLORER_PROFILE_DIR_PATH=./connection-profile
    export FABRIC_CRYPTO_PATH=./organizations
  • When you connect Explorer to your fabric network through the bridge network, you need to set DISCOVERY_AS_LOCALHOST to false for disabling hostname mapping into localhost.

    services:
    
      ...
    
      explorer.mynetwork.com:
    
        ...
    
        environment:
          - DISCOVERY_AS_LOCALHOST=false
  • Replace the user's certificate with an admin certificate and a secret (private) key in the connection profile (test-network.json). You need to specify the absolute path on the Explorer container.

    Before:

    "adminPrivateKey": {
        "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk"
    }

    After:

    "adminPrivateKey": {
        "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk"
    }

    Make sure you replace all paths.

Start container services

  • Run the following to start up explore and explorer-db services after starting your fabric network:

    $ docker-compose up -d

Clean up

  • To stop services without removing persistent data, run the following:

    $ docker-compose down
  • In the docker-compose.yaml, two named volumes are allocated for persistent data (for Postgres data and user wallet). If you would like to clear these named volumes up, run the following:

    $ docker-compose down -v

Quick start (using codebase)

Prerequisites

  • Nodejs 12, 14 and 16 (12.22.12, 14.21.3, 16.20.1 tested)
  • PostgreSQL 9.5 or greater
  • jq
  • Linux-based operating system, such as Ubuntu or MacOS
  • golang (optional)
    • For e2e testing

Start Hyperledger Fabric network

This guide assumes that you've already started the test network by following Hyperledger Fabric official tutorial.

Clone GIT Repository

Clone this repository to get the latest using the following command.

$ git clone https://github.com/hyperledger/blockchain-explorer.git
$ cd blockchain-explorer

Database Setup

$ cd blockchain-explorer/app
  • Modify app/explorerconfig.json to update PostgreSQL database settings.

    "postgreSQL": {
        "host": "127.0.0.1",
        "port": "5432",
        "database": "fabricexplorer",
        "username": "hppoc",
        "passwd": "password"
    }
    • Another alternative to configuring database settings is to use environment variables:

      export DATABASE_HOST=127.0.0.1
      export DATABASE_PORT=5432
      export DATABASE_DATABASE=fabricexplorer
      export DATABASE_USERNAME=hppoc
      export DATABASE_PASSWD=pass12345

    Important repeat after every git pull (in some cases, you may need to apply permission to db/ directory, from blockchain-explorer/app/persistence/fabric/postgreSQL run: chmod -R 775 db/

Update configuration

  • Modify app/platform/fabric/config.json to define your fabric network connection profile:

    {
        "network-configs": {
            "test-network": {
                "name": "Test Network",
                "profile": "./connection-profile/test-network.json",
                "enableAuthentication": false
            }
        },
        "license": "Apache-2.0"
    }
    • test-network is the name of your connection profile and can be changed to any name
    • name is a name you want to give to your fabric network. You can change the only value of the key name
    • profile is the location of your connection profile. You can change the only value of the key profile
  • Modify connection profile in the JSON file app/platform/fabric/connection-profile/test-network.json:

    • Change fabric-path to your fabric network disk path in the test-network.json file:
    • Provide the full disk path to the adminPrivateKey config option. It usually ends with _sk, for example: /fabric-path/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk
    • exploreradmin and exploreradminpw is the credential for the user of Explorer to log in to the dashboard
    • enableAuthentication is a flag to enable authentication using a login page. Setting to false will skip authentication.

Run create database script:

  • Ubuntu

    $ cd blockchain-explorer/app/persistence/fabric/postgreSQL/db
    $ sudo -u postgres ./createdb.sh
    
  • MacOS

    $ cd blockchain-explorer/app/persistence/fabric/postgreSQL/db
    $ ./createdb.sh
    $ createdb `whoami`
    

Connect to the PostgreSQL database and run DB status commands. To export the settings from app/explorerconfig.json to the environment, run source app/exportConfig.sh; this will set $DATABASE_DATABASE and related envvars.

  • Ubuntu

    sudo -u postgres psql -c '\l'
    sudo -u postgres psql $DATABASE_DATABASE -c '\d'
  • MacOS

    psql -c '\l'
    psql $DATABASE_DATABASE -c '\d'

Expected output

$ sudo -u postgres psql -c '\l'
                                     List of databases
      Name      |        Owner        | Encoding | Collate |  Ctype  |   Access privileges
----------------+---------------------+----------+---------+---------+-----------------------
 fabricexplorer | $DATABASE_USERNAME  | UTF8     | C.UTF-8 | C.UTF-8 |
 postgres       | postgres            | UTF8     | C.UTF-8 | C.UTF-8 |
 template0      | postgres            | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +
                |                     |          |         |         | postgres=CTc/postgres
 template1      | postgres            | UTF8     | C.UTF-8 | C.UTF-8 | =c/postgres          +
                |                     |          |         |         | postgres=CTc/postgres
(4 rows)

$ sudo -u postgres psql $DATABASE_DATABASE -c '\d'
                   List of relations
 Schema |           Name            |   Type   |       Owner
--------+---------------------------+----------+-------------------
 public | blocks                    | table    | $DATABASE_USERNAME
 public | blocks_id_seq             | sequence | $DATABASE_USERNAME
 public | chaincodes                | table    | $DATABASE_USERNAME
 public | chaincodes_id_seq         | sequence | $DATABASE_USERNAME
 public | channel                   | table    | $DATABASE_USERNAME
 public | channel_id_seq            | sequence | $DATABASE_USERNAME
 public | orderer                   | table    | $DATABASE_USERNAME
 public | orderer_id_seq            | sequence | $DATABASE_USERNAME
 public | peer                      | table    | $DATABASE_USERNAME
 public | peer_id_seq               | sequence | $DATABASE_USERNAME
 public | peer_ref_chaincode        | table    | $DATABASE_USERNAME
 public | peer_ref_chaincode_id_seq | sequence | $DATABASE_USERNAME
 public | peer_ref_channel          | table    | $DATABASE_USERNAME
 public | peer_ref_channel_id_seq   | sequence | $DATABASE_USERNAME
 public | transactions              | table    | $DATABASE_USERNAME
 public | transactions_id_seq       | sequence | $DATABASE_USERNAME
 public | write_lock                | table    | $DATABASE_USERNAME
 public | write_lock_write_lock_seq | sequence | $DATABASE_USERNAME
(18 rows)

(On MacOS, expect to see your `whoami` rather than postgres. Entries with $DATABASE_USERNAME will have the valuei of that parameter, whether set as an environment variable or as a JSON keyval; it will not show the literal string.)

Build Hyperledger Explorer

Important: repeat the below steps after every git pull

From the root of the repository:

  • ./main.sh clean
    • To clean the /node_modules, client/node_modules client/build, client/coverage, app/test/node_modules directories
  • ./main.sh install
    • To install, run tests, and build project

Or

$ cd blockchain-explorer
$ npm install
$ cd client/
$ npm install
$ npm run build

Run Hyperledger Explorer

Bootup Mode

The Bootup Mode feature allows you to specify how many blocks should be loaded when starting the Hyperledger Explorer. You can choose from the below two modes:

  • ALL: Load all available blocks.
  • CUSTOM: Load a specific number of blocks as configured in the config.json file.

To set the Bootup Mode, update the app/platform/fabric/config.json file in your project with the desired mode.

  • ALL
      {
          "network-configs": {
              "test-network": {
                  "name": "Test Network",
                  "profile": "./connection-profile/test-network.json",
                  "enableAuthentication": false,
                  "bootMode": "ALL",
                  "noOfBlocks": 0
              }
          },
          "license": "Apache-2.0"
      }

Note: In ALL Mode, Please make sure that noOfBlocks paramater is set to 0

  • CUSTOM

    The noOfBlocks parameter allows you to specify the number of blocks that the Hyperledger Explorer will use when booting up. If you are using custom mode and want to control the number of blocks, make sure to pass your desired value to the noOfBlocks parameter.

      {
          "network-configs": {
              "test-network": {
                  "name": "Test Network",
                  "profile": "./connection-profile/test-network.json",
                  "enableAuthentication": false,
                  "bootMode": "CUSTOM",
                  "noOfBlocks": 5
              }
          },
          "license": "Apache-2.0"
      }

Note: Setting noOfBlocks to 0 will load Hyperledger Explorer with the latest block.

Bootup Mode example for reference

Let's say your blockchain network consists of a total of 20 blocks, numbered from 1 to 20. You are interested in loading only the latest 5 blocks, which are blocks 20, 19, 18, 17, and 16.

Here is an example of how you can configure Hyperledger Explorer to achieve this:

      {
          "network-configs": {
              "test-network": {
                  "name": "Test Network",
                  "profile": "./connection-profile/test-network.json",
                  "enableAuthentication": false,
                  "bootMode": "CUSTOM",
                  "noOfBlocks": 5
              }
          },
          "license": "Apache-2.0"
      }

Run Locally in the Same Location

  • Modify app/explorerconfig.json to update sync settings.

    "sync": {
      "type": "local"
    }
  • npm start

    • It will have the backend and GUI service up, for as long as the process runs
  • npm run app-stop

    • It will stop the node server

Note: If the Hyperledger Fabric network is deployed on other machines, please define the following environment variable

$ DISCOVERY_AS_LOCALHOST=false npm start

Run Standalone in Different Location

  • Modify app/explorerconfig.json to update sync settings.

    "sync": {
      "type": "host"
    }
  • If the Hyperledger Explorer was used previously in your browser, be sure to clear the cache before relaunching

  • ./syncstart.sh

    • It will have the sync node up
  • ./syncstop.sh

    • It will stop the sync node

Note: If the Hyperledger Fabric network is deployed on other machines, please define the following environment variable

$ DISCOVERY_AS_LOCALHOST=false ./syncstart.sh

Updating Docker image

To build a new version of the Docker image, use npm run-script docker_build. This creates a new image, which will become hyperledger-explorer:latest (distinct from the canonical images, which are hyperledger/explorer, with a /). This is a distinct build from the local version used in the Quick Start process. Run this image with docker-compose down && docker-compose up -d; both commands are needed.

Configuration

Please refer README-CONFIG.md for more detail on each configuration.

Logs

  • Please visit the ./logs/console folder to view the logs relating to the console and ./logs/app to view the application logs, and visit the ./logs/db to view the database logs.

Troubleshooting

Please visit the TROUBLESHOOT.md to view the Troubleshooting TechNotes for Hyperledger Explorer.

License

Hyperledger Explorer Project source code is released under the Apache 2.0 license. The README.md, CONTRIBUTING.md files, and files in the "images", "snapshots" folders are licensed under the Creative Commons Attribution 4.0 International License. You may obtain a copy of the license, titled CC-BY-4.0, at http://creativecommons.org/licenses/by/4.0/.

blockchain-explorer's People

Contributors

5pecia1 avatar aanugu avatar adamk1230 avatar adityajoshi12 avatar anilspecial avatar archanaarige avatar arigelas avatar deekshithvarma256 avatar dependabot[bot] avatar fnst-zhangxin avatar gcc2ge avatar jeevasang avatar jkopczyn avatar jojialex2 avatar ktalluri123 avatar mekiae avatar nekia avatar nfrunza avatar psandela avatar psaradhi avatar robertfeng1980 avatar ryjones avatar saksham1203 avatar skclusive avatar srinivas640 avatar thomasralee avatar udhayakumari avatar umaparam avatar vineeth2328 avatar xspeedcruiser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockchain-explorer's Issues

Add validations to blockId and blockRange search functionality

What would you like to be added?

In context to the Issue#334, this is to add some more validations to the search functionality blockId and blockRange.

BlockRangeSearch:
caseI: As we are purging the data based on block count (or) duration, sometimes the user may require to view the data that is not available as part of Posgres database. The requested data will be fetched directly from ledger if available.
caseII: A user can do a quick block range search by entering the start and endblock values.

Also introducted "blockRangeLimit" key in config.json where an user can configure the value.
Say for example, if blockRangeLimit is configured to value 10, then user can view the total blocks of 10.

config

If user tries to input the blocks which exceeds the blockRangeLimit configured value then it throws an error.

blockRangeMaxLimit

GUI view of blockRangeSearch:

blockRange_1

One more important point also to note here is to set the blockRangeLimit value to minimum, so that it won't impact the performance.

Why is this needed?

By adding validations, the code can handle the issues arising due to incorrect channelgenesishash etc. A backend configurable "blockRangeLimit" value can harness the user, with more flexibility of setting the blockRange value.

UI - Display Correct Chaincode Metadata Fix

What happened?

In the Chaincodes tab, if we are not in the first Channel, then "Click" on the Chaincode under Chaincode Name, here it always fetches the details of the metadata from the first Channel only. If the same Chaincode Name is present in the first Channel, then it fetches the details of the Metadata from the first Channel, Or else if the Chaincode Name is not present in the first Channel, it gives undefined in the Chaincode Metadata Display.

What did you expect to happen?

The Chaincode Metadata needs to be fetched and displayed for the correct Chaincodes present in the correct Channel that we are in.

How can we reproduce it (as minimally and precisely as possible)?

Steps to reproduce:

  1. Select any one of the Channel
  2. Go to the Chaincodes tab and "Click" any Chaincode under Chaincode Name
  3. Observe the details of the Metadata on the pop-up
  4. Change the Channel name from the Channel drop-down and go to the Chaincodes tab
  5. "Click" on the Chaincode under Chaincode Name that's not present in the first Channel
  6. Observe that the Display of Chaincode Metadata does not provide the Metadata of the Chaincode

Anything else we need to know?

This issue is related to #405 . Please check it for more detailed info.

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Deploying hyperledger explorer on kubernetes

What would you like to be added?

Deploying hyperledger explorer on Kubernetes

Why is this needed?

So far explorer was set up in a docker-based environment. it's a highly recommended/required feature for porting/deploying explorer on Kubernetes

Frontend - Register Form

What would you like to be added?

We would like to improve the form's user interface by adding icons to each field. This will help users quickly identify the purpose of each field and provide a better user experience.

Screenshot from 2023-05-15 23-35-30

Why is this needed?

Currently, the register form looks plain. We need to improve its design and user interface to make it more appealing and user-friendly. Specifically, need to add icons to the form to make it easier for users to identify the purpose of each field.

Screenshot from 2023-05-15 22-00-26

Failed to create wallet, please check the configuration, and valid file paths

I am using docker option while deploying the explorer. I have copied my organization folder and changed test file and also .env file

however when I run docker-compose i get the following (Althoug the certif exists and the path is correct)

explorer.mynetwork.com      | [2023-01-20T09:34:36.655] [INFO] PgService - SSL to Postgresql disabled
explorer.mynetwork.com      | [2023-01-20T09:34:36.660] [INFO] PgService - connecting to Postgresql postgres://hppoc:******@explorerdb.mynetwork.com:5432/fabricexplorer
explorer.mynetwork.com      | [2023-01-20T09:34:36.756] [INFO] Platform -  network_config.id  test-network  network_config.profile  ./connection-profile/test-network.json
explorer.mynetwork.com      | [2023-01-20T09:34:36.886] [INFO] Platform - Already registered : admin
explorer.mynetwork.com      | [2023-01-20T09:34:36.889] [INFO] FabricConfig - config.client.tlsEnable  true
explorer.mynetwork.com      | [2023-01-20T09:34:36.890] [INFO] FabricConfig - FabricConfig, this.config.channels  mychannel
explorer.mynetwork.com      | [2023-01-20T09:34:36.894] [ERROR] FabricGateway - Failed to create wallet, please check the configuration, and valid file paths: {}
explorer.mynetwork.com      | [2023-01-20T09:34:36.895] [ERROR] FabricClient - ExplorerError {
explorer.mynetwork.com      |   name: 'ExplorerError',
explorer.mynetwork.com      |   message: '[\n' +
explorer.mynetwork.com      |     "  'Failed to create wallet, please check the configuration, and valid file paths'\n" +
explorer.mynetwork.com      |     ']'
explorer.mynetwork.com      | }
explorer.mynetwork.com      | [2023-01-20T09:34:36.898] [ERROR] main - <<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
explorer.mynetwork.com      | [2023-01-20T09:34:36.899] [ERROR] main - Error :  [ 'Invalid platform configuration, Please check the log' ]
explorer.mynetwork.com      | [2023-01-20T09:34:38.900] [INFO] main - Received kill signal, shutting down gracefully
explorer.mynetwork.com      | [2023-01-20T09:34:38.904] [INFO] main - Closed out connections

Sigint bad trap and unexpected error on startup

What happened?

On starting the explorer, we are getting the following error in terminal:
./start.sh: 24: Syntax error: "(" unexpected ERROR: "app-start" exited with 2.
On resolving the above issue, the terminal shows:
trap: SIGINT: bad trap Server running...

What did you expect to happen?

Explorer should start without any error.

How can we reproduce it (as minimally and precisely as possible)?

  1. Start the application by running 'npm start' in terminal.
  2. Observe the following error in terminal:
    ./start.sh: 24: Syntax error: "(" unexpected ERROR: "app-start" exited with 2.
  3. Remove 'function' in start.sh file and repeat step 1.
  4. Observe the following in terminal:
    trap: SIGINT: bad trap

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Frontend - Dashboard UI responsiveness

What would you like to be added?

This feature will make Dashboard page more accessible on different screen sizes.

Why is this needed?

The current dashboard data in cards overlap or do not show information on various screen sizes.
image

Also the pie chart is not visible on smaller screen sizes

image

Frontend - Footer

What would you like to be added?

I would like to add a footer with more height. It will have an additional element logo and link.

Screenshot from 2023-05-13 16-16-36

Why is this needed?

The footer looks outdated and too small in comparison to the rest of the page. It would be beneficial to update it to make it more visually appealing.

Screenshot from 2023-05-13 15-17-00

Frontent - ChannelForm

What would you like to be added?

New input fields for uploading org, channel, network path.

Screenshot from 2023-05-13 02-11-09

Why is this needed?

In current input fields label gets hidden behind th browse button. They look very different from input fields of name, org name.

Screenshot from 2023-05-13 01-00-09

FrontEnd- Display chaincode metadata

What would you like to be added?

The addition of a new feature in the Chaincodes tab that opens a dialogue model to show the details related to particular Chaincode. The new feature provides quick and easy access to important information related to the Chaincode.

Why is this needed?

With the new feature being added to the application, user can now have more visibility into the smart contracts they are using. One such feature is the ability to view the structure of the contract and its associated metadata information.

Boot time and block/transaction loading for Explorer

What would you like to be added?

Load only the blocks and transactions as per the configuration. Currently the configuration defines to archive or delete old data from the database. But at the bootstrap time, the Explorer tries to read every data from block 0. This can be configured to load only the data from certain point in time that is as expected by the Explorer's configuration.

Why is this needed?

This will help in speeding up the bootstrap time of Explorer, the tool and the UI will be ready in shorter period.

Explorer docker image build failed

What happened?

In existing Dockerfile found issue with node-prune package

image

What did you expect to happen?

Expected the explorer docker image should be build. because of above issue not able to build it.

How can we reproduce it (as minimally and precisely as possible)?

Run ./build_docker_image.sh

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Release new container images for Explorer

What would you like to be added?

Release new container images for Explorer into Hyperledger Labs' ghcr.io repository.

Why is this needed?

Use the Explorer as the work on it continues.

Backend - Display Correct Chaincode Metadata Fix

What happened?

Backend- Issue in fetching the details of Chaincode Metadata with respect to multiple channel.

Considerations:
Tested with Hyperledger Fabric Version 2.2 and 2.4.7
Number of Channels - 2
Channel Name: "mychannelb" - In this channel the deployed chaincode name is "basic" and with versions V1 and V2. The other deployed chaincode is "auction" with version V1.
Channel Name: "channel2" - In this channel the deployed chaincode name is "basic" with version V1 and other deployed chaincode is basic2 with Version V1

Issue#1: Chaincode does not fetch the Chaincode Metadata of other Channel
channel2: Chaincode name: basic2
mychannelb: CC name: basic

metadata-issue#1

Issue#2: If the Chaincode name is same in both the channels, the Chaincode Metadata is fetched from the mychannelb
channel2: Chaincode Name: basic
mychannelb: Chaincode Name : basic

Metadata-Issue#2

What did you expect to happen?

The Chaincode Metadata needs to be fetched and displayed for the correct Chaincodes present in the correct Channel that we are in.

How can we reproduce it (as minimally and precisely as possible)?

Steps to reproduce:

  1. Select any one of the Channel
  2. Go to the Chaincodes tab and "Click" any Chaincode under Chaincode Name
  3. Observe the details of the Metadata on the pop-up
  4. Change the Channel name from the Channel drop-down and go to the Chaincodes tab
  5. "Click" on the Chaincode under Chaincode Name that's not present in the first Channel
  6. Observe that the Display of Chaincode Metadata does not provide the Metadata of the Chaincode

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Bug fix for UI

What happened?

While testing the main branch code after merging few of the PRs last week, we noticed that there are a few bugs.
1*. UI not loading( cause: missing Selector variable)
2*. Chaincode api call not working( cause: issue while code merge)
3. Transactions Query shows weird behaviour on selecting different organizations while querying the records.(cause: undesired state change)

What did you expect to happen?

For the bugs mentioned in order,

  1. UI to load properly.
  2. Chaincode view gives the list of chaincodes.
  3. Transactions Query to work just like the blocks Query.

How can we reproduce it (as minimally and precisely as possible)?

For the bugs mentioned in order,

  1. Login from the login screen and notice that the screen does not load.
  2. Go to the chaincode tab to observe that it shows 'No rows'.
  3. Go to the Transactions tab
    a. From Select Orgs dropdown, select Org1, Org2 and hit search. Observe the list.
    b. From Select Orgs dropdown, select Org2 and hit search. Observe that the list shows the Org2 list for a second and goes back to previous result with both Org1 and Org2.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Empty org is being displayed while fetching the list of orgs

What happened?

Test the Explorer compatibility with Hyperledger Fabric v2.4.7.
The functionality which fetches the list of orgs, is also fetching an empty org. This is due to the reason that the first transaction of type "config" is not associated with any creator organisation. So, while saving this transaction to the postgres, the field creator_msp_id is blank.

Screenshot 2023-04-03 121353

orgslist2

What did you expect to happen?

Expected only the list of orgs to be fetched.

How can we reproduce it (as minimally and precisely as possible)?

Deploy the Hyperledger Fabric Network with v2.4.7. Bring up the Explorer Application.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Can't connect to mychannel after setting everything up

Hello

I have started test network by this tutorial. Then created channel with this command:

sudo ./network up
sudo ./network createChannel
sudo ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go

After that I have created explorer folder and used these commands:

sudo wget https://raw.githubusercontent.com/hyperledger/blockchain- explorer/main/examples/net1/config.json
sudo wget https://raw.githubusercontent.com/hyperledger/blockchain-explorer/main/examples/net1/connection-profile/test-network.json -P connection-profile
sudo wget https://raw.githubusercontent.com/hyperledger/blockchain-explorer/main/docker-compose.yaml
sudo cp -r ../fabric-samples/test-network/organizations/ .

The docker-compose.yaml changed into this:

volumes:
  - ./config.json:/opt/explorer/app/platform/fabric/config.json
  - ./connection-profile:/opt/explorer/app/platform/fabric/connection-profile
  - ./organizations:/tmp/crypto
  - walletstore:/opt/explorer/wallet

Then on test-network.json I have changed these fields into these:

"adminPrivateKey": {
   "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk"
  },
 "peers": ["peer0.org1.example.com"],
 "signedCert": {
   "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]"
  }

I launched it by sudo docker-compose up this error:

[2022-04-21T16:32:34.374] [INFO] FabricConfig - FabricConfig, this.config.channels  mychannel
2022-04-21T16:32:34.630Z - error: [DiscoveryService]: send[mychannel] - Channel:mychannel received discovery error:access denied
[2022-04-21T16:32:34.631] [ERROR] FabricClient - Error: DiscoveryService: mychannel error: access denied
at DiscoveryService.send (/opt/explorer/node_modules/fabric-common/lib/DiscoveryService.js:363:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async NetworkImpl._initializeInternalChannel (/opt/explorer/node_modules/fabric-network/lib/network.js:279:13)
at async NetworkImpl._initialize (/opt/explorer/node_modules/fabric-network/lib/network.js:231:9)
at async Gateway.getNetwork (/opt/explorer/node_modules/fabric-network/lib/gateway.js:330:9)

Why this is happening? I did exactrly as it was instructed.

mac M2 start.sh: applet not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn 2 npm ERR! file sh npm ERR! errno ENOENT

What happened?

Facing issue after docker-compose -up -d explorer unable to start
2023-04-15 23:17:55 > [email protected] app-start /opt/explorer
2023-04-15 23:17:55 > ./start.sh
2023-04-15 23:17:55
2023-04-15 23:17:56 start.sh: applet not found
2023-04-15 23:17:56 npm ERR! code ELIFECYCLE
2023-04-15 23:17:56 npm ERR! syscall spawn
2023-04-15 23:17:56 npm ERR! file sh
2023-04-15 23:17:56 npm ERR! errno ENOENT
2023-04-15 23:17:56 npm ERR! [email protected] app-start: ./start.sh
2023-04-15 23:17:56 npm ERR! spawn ENOENT
2023-04-15 23:17:56 npm ERR!
2023-04-15 23:17:56 npm ERR! Failed at the [email protected] app-start script.
2023-04-15 23:17:56 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-04-15 23:17:56
2023-04-15 23:17:56 npm ERR! A complete log of this run can be found in:
2023-04-15 23:17:56 npm ERR! /root/.npm/_logs/2023-04-15T19_17_56_018Z-debug.log

Log File:
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'app-start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preapp-start', 'app-start', 'postapp-start' ]
5 info lifecycle [email protected]preapp-start: [email protected]
6 info lifecycle [email protected]
app-start: [email protected]
7 verbose lifecycle [email protected]app-start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
app-start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/explorer/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]app-start: CWD: /opt/explorer
10 silly lifecycle [email protected]
app-start: Args: [ '-c', './start.sh' ]
11 info lifecycle [email protected]~app-start: Failed to exec app-start script
12 verbose stack Error: [email protected] app-start: ./start.sh
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack

What did you expect to happen?

it working fine on ubuntu , can you please help is this error due to Mac m2?

How can we reproduce it (as minimally and precisely as possible)?

run hyperledger explorer on mac m2 machine using first option deplotment

Anything else we need to know?

No response

OS version

On mac os M2 Machine:

info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'app-start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preapp-start', 'app-start', 'postapp-start' ]
5 info lifecycle [email protected]preapp-start: [email protected]
6 info lifecycle [email protected]
app-start: [email protected]
7 verbose lifecycle [email protected]app-start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
app-start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/explorer/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]app-start: CWD: /opt/explorer
10 silly lifecycle [email protected]
app-start: Args: [ '-c', './start.sh' ]
11 info lifecycle [email protected]~app-start: Failed to exec app-start script
12 verbose stack Error: [email protected] app-start: ./start.sh
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack

UI - Transaction Details for the first Config type transaction

What happened?

In the Blocks Tab, On clicking the Transaction hash of the first Config type txn (Block number '0'), a modal opens with a spinning circle instead of the actual Transaction Details. This only happens for the first 'Config' type Transaction where there is no Creator.

ConfigTxnLoading

What did you expect to happen?

In the Blocks Tab, On clicking the Transaction hash of any block, including the Config type txns, a modal opens with that specific Transaction Details.

How can we reproduce it (as minimally and precisely as possible)?

  1. Go to the Blocks Tab
  2. Search for the first Block by giving '0' in From and To fields of the Block No. and click on search icon.
  3. Click on the Transaction hash under the Transaction column.
  4. Observe that a Modal box opens with a loading circle instead of the Transaction Details.

Anything else we need to know?

This issue is observed in fabric 2.4.7. And in UI, it can also be observed from the Transactions Tab and the Dashboard Tab (by querying for the Transaction hash of the first block)

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Backend - Block Pagination Query Fix

What happened?

Block Pagination does not fetch the correct data when querying with the Orgs.

What did you expect to happen?

Block Pagination needs to fetch the correct data when querying with or without the Orgs.

How can we reproduce it (as minimally and precisely as possible)?

Steps to reproduce:

  1. Add some transactions
  2. Go to the Blocks tab and observe the added transactions in the list
  3. Select any Orgs from the "Select Orgs" drop down and click on "Search" button
  4. Observe that the list does not show the correct transactions

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Duplicate PeerStatus api call

What happened?

For the network tab ledger height and the dashboard peer status, the same api is being called. But instead of calling it once, a duplicate api call is being made, making the api being hit two times consecutively. By these consecutive calls, one response gives the correct peer status, while the other response continuously gives the fetching status for the peers.

What did you expect to happen?

For the network tab ledger height and the dashboard peer status, the respective api should be called only once returning the correct peer status as response.

How can we reproduce it (as minimally and precisely as possible)?

  1. Start the explorer.
  2. Observe the dashboard peer status( green/red dots) and the network tab - ledger height.
  3. Open inspect tab in the browser and observe the network tab filtering the 'peer' api. Observe that on every sync, a duplicate api call is being made and the response is incorrect for the same.
  4. Stop one peer and repeat steps 2 & 3.
  5. Stop one orderer and repeat steps 2 & 3.
  6. Restart the peer and orderer. Observe in dashboard that the peer status shows 'fetching' continuously.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Backend- Display chaincode metadata

What would you like to be added?

A new feature to display the chaincode metadata information in Blockchain Explorer. Explorer will look into the channel and identifies the chaincodes installed on it and enables the feature to view the metadata.

Why is this needed?

Users can see the how the contract is structured and its associated metadata information.

Support for Fabric v2.5 as lastest version

What would you like to be added?

hello devs,

I am now learning to build fabric, and I really wish there could be tested with Fabric v2.5 !!!

Why is this needed?

Learning with Fabric v2.5 !!

Thanks a lot.

Test Cases Failing (4)

What happened?

I have tried running the test-cases of which 4 are failing.
processBlockEvent
1) should return without error
✓ should throw an error if it has already been in process
✓ should raise new channel notification if genesis has not already been stored yet
2) should raise update channel notification if config block is processed
3) should be done without any errors when config block doesn't have any payload in last updated data
4) should be done without any errors when _lifecycle block is processed

Has anyone faced the same issue while running the testcases? Please help, in fixing these issues.

Testcases

What did you expect to happen?

Expected all the test cases would pass.

How can we reproduce it (as minimally and precisely as possible)?

Need to run the test- cases as per the ReadMe.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Display health status of peers and orderers

What would you like to be added?

This feature enables the explorer to indicate the health status of peers and orderers that are online or offline.

Why is this needed?

As of now the explorer is not showing the status of peers/orderers that are part of HLF-Network. With this new feature enablement, we could display the health status of peers/orderers in the explorer dashboard.

Fetch data by block number, block range and transaction id

What would you like to be added?

This functionality enables the explorer to retrieve data using block id, block range (for example, blocks 1 to 10), and transaction data by giving the transaction id .Using these inputs, matching data are pulled in accordance with the user's search selection. First it will check whether the data is available in the PostgreSQL, if it is there it will fetch from there, otherwise it will fetch from blockchain.

Why is this needed?

With this new feature, data is fetched from the blockchain if it is not available in PostgreSQL using the block number, block number range, or transaction id.

After the exploreris started, it is automatically closed

Thank you for your project!

The following command is used to start the test network
network.sh up createChannel -ca -c mychannel -s couchdb
but
After the exploreris started, it is automatically closed

image

Here is the container log(explorer.mynetwork.com)
image

I tried and I found:
When I started the test network, I found some files didn't match
image

image

Even though I changed the configuration file to the following, it still didn't work
image

Purging old records from explorer database

What would you like to be added?

Now explorer database is saving each transaction that is committed on to the ledger making replica copies of ledger. When number of transactions increases there is a chance of outage of postgres database. In order to address this we would keep only the recent data in database and provide a query back mechanism to read back from the blockchain for any of the purged data.

Implementation

  • Based on BLOCKCOUNT
  • Based on TIME

We can set the purgeMode attribute in config.json file and according to the purge mode, it enables purging from database.
If it is based on blockcount (mention the number of blocks as blockCount value in config.json) ,it will retain those many blocks in the database and the rest of the records would be purged.
If it is based on time (mention the number of days as daysToPurge value in config.json) then it will keep those many days of records in the database according to the daystoPurge provided in the config file.
If the purgeMode attribute is set to "NONE", then purging won't happen and it will retain the complete data as of ledger.

All the audit records of deletion is saved to explorer_audit_table which is further used for the sync process.

Why is this needed?

Explorer creates duplicate copy of complete ledger data in postgres which can be of larger number and can lead to database storage outage.

Backend- Improper updation of Txn Count and Chaincodes list

What happened?

Backend - Issue in updating the Txn count w.r.t mutiple versions of the same chaincode and issue in fetching the chaincodes list w.r.t to other channel.
Considerations:
Tested with Hyperledger Fabric Version 2.2 and 2.4.7
No of Channels -2
channel Name:"mychannelb" In this channel the deployed chaincode name is "basic" and with versions 1 and 2. The other deployed chaincode is "auction" with version 1.
channel name: "channel2" In this channel the deployed chaincode name is "auction" - version 1.

Issue#1: When we invoke a Txn, the Txn count is incrementing by one in all the available versions of the same chaincode.

<style> </style>
CC Name CC version Txn Count Comments
basic 1 8 The Txn Count will be incremented by 1, when a txn is invoked in basic-V2.

The below screenshot shows the txn count increment in "basic-V1" with 9 txn count.
image

Isse#2: Issue in fetching the list of chaincodes when there are multiple channels.
The chaincode installed in channel2 is only "auction" but it is picking even the "basic- V2" chaincode which is installed in channel - mychannelb.
image

What did you expect to happen?

The correct Txn count w.r.t chaincode version.
Fetch the correct list of chanicodes installed with specific to channels.

How can we reproduce it (as minimally and precisely as possible)?

  1. The Hyperledger Fabric network consideration is mentioned in "What happened" section of this issue.
  2. click on the chaincodes tab w.r.t to each channel in the UI.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Getting error on npm run start

Getting below error on npm run start in blockchain-explorer directory:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] app-start: ./start.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] app-start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hammad/.npm/_logs/2022-04-26T10_56_32_697Z-debug.log
ERROR: "app-start" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: run-s build app-start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Backend - Pagination implementation for the Transactions tab

What would you like to be added?

This feature implements the pagination for list of transactions to be fetched from PostgreSQL.

Why is this needed?

As of now the pagination is being handled from UI. Implementing pagination from backend addresses an issue when dealing with retrieval of huge data sets.

FrontEnd - Display health status of peers and orderers

What would you like to be added?

This feature enables the explorer to indicate the health status of peers and orderers that are online or offline.
The status can be indicated with red being offline, green being online, green with flickering - fetching status.

Why is this needed?

As of now the explorer is not showing the status of peers/orderers that are part of HLF-Network. With this new feature enablement, we could display the health status of peers/orderers in the explorer dashboard.

Failed to get block 0 from channel mychannel : Error: Invalid chain ID, mychannel

Hi BE-Team,

i have a working HLF Network with a Channel called tnschannel and i can connect with BE to this channel.

But after a while the cmd throws this Error:

 [ERROR] FabricGateway - Failed to get block 0 from channel mychannel :  Error: Invalid chain ID, mychannel
   at SingleQueryHandler.evaluate (/opt/explorer/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:41:57)
   at processTicksAndRejections (internal/process/task_queues.js:97:5)
   at async Transaction.evaluate (/opt/explorer/node_modules/fabric-network/lib/transaction.js:291:25) {
      status: 500,
      payload: <Buffer >,
      isEndorsed: false
   }
[2022-12-21T10:17:49.753] [ERROR] FabricClient - Failed to get genesis block

How can i customize the channel name and where?

Thanks for any help

Frontend- Search data by block range

What would you like to be added?

The feature facilitates user to search data using a block range. The Search field is provided in the blocks tab. A modal with the appropriate data will be displayed in response to user input.

Why is this needed?

It provisions user for a quick data search pertaining to specific block range.

Backend - Pagination implementation for Blocks Tab

What would you like to be added?

This feature implements the pagination for list of blocks to be fetched from PostgreSQL.

Why is this needed?

As of now the pagination is being handled from UI. Implementing pagination from backend addresses an issue when dealing with retrieval of huge data sets.

run_e2e_test.sh is failing

What happened?

when we are running run_e2e_test.sh file, its failing

image

What did you expect to happen?

run_e2e_test.sh should provide us end to end API test results, but its not running instead its showing above error.

How can we reproduce it (as minimally and precisely as possible)?

Run run_e2e_test.sh

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Frontend - Pagination implementation for Blocks Tab

What would you like to be added?

This feature integrates the Api calls to render server-side pagination for list of blocks to be fetched.

Why is this needed?

As of now the pagination is being handled from UI. Implementing pagination from backend addresses an issue when dealing with retrieval of huge data sets.

Chaincode count on Dashboard is incorrect

What happened?

The Chaincode Names with various versions are visible in the UI. In this case the total count of chaincodes seems to be 4.

image

What did you expect to happen?

As per the chaincodes and their versions there are only 2 chaincodes installed on the Fabric Network. So, the count displayed on the Dashboard for CHAINCODES should be 2 and not 4.

image

How can we reproduce it (as minimally and precisely as possible)?

You must install new Chaincode or upgrade any current Chaincode with upgraded version and bring up the Explorer Application.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

TLS to PostGres Sequalize function error

What happened?

The fix provided through #30
is incomplete. The Sequelize function requires enabling TLS.

In the file https://github.com/hyperledger-labs/blockchain-explorer/blob/main/app/persistence/postgreSQL/PgService.ts

Please change the code for the below:
getUserModel(attributes, options) { const sequelize = new Sequelize(postgres://${this.pgconfig.user}:${this.pgconfig.password}@${this.pgconfig.host}:${this.pgconfig.port}/${this.pgconfig.database}, { logging: false } );

to

`const isPostgresSslEnabled = process.env.DATABASE_SSL_ENABLED || false;
if (isPostgresSslEnabled) {

const sequelize = new Sequelize(
postgres://${this.pgconfig.user}:${this.pgconfig.password}@${this.pgconfig.host}:${this.pgconfig.port}/${this.pgconfig.database},
{ logging: false, dialectOptions: { ssl: true, }, }
);
}else{

const sequelize = new Sequelize(
postgres://${this.pgconfig.user}:${this.pgconfig.password}@${this.pgconfig.host}:${this.pgconfig.port}/${this.pgconfig.database},
{ logging: false }
);
}`

What did you expect to happen?

TLS connection should work to PostGreSQL

How can we reproduce it (as minimally and precisely as possible)?

the current as is code will not work - will get a SequelizeConnectionError

Anything else we need to know?

I have tested with the above changes to code and it worked for me

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Ledger Height and Peers Status is not updating w.r.t multiple channels

What happened?

Hyperledger Fabric Network Considerations:
Created two channels:
1.mychannelb
2.channel2
The ledger height and status of the peers is dynamically fetched from the ledger periodically and thus send as response to UI.
The issue over here is the discovery service which we use for fetching the peers ledger height and status wasn't refreshing and updating when we try to switch to other channel.

mychannelb ledger height:

image

channel2 ledgerheight: Here if we observe the ledger height is of "mychannelb"
ledgerheighIssue

What did you expect to happen?

Fetch the updated and correct ledger height / status w.r.t the channels.

How can we reproduce it (as minimally and precisely as possible)?

Should deploy a fabric network having multiple channels.
Switch the channels in UI , observe the status of peers/orderers in dashboard and the ledger height in the network tab.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Frontend - Search data by block number (or) transaction id

What would you like to be added?

The feature facilitates user to search data using a block number/transaction id. The Search field is provided in the dashboard screen. A modal with the appropriate data will be displayed in response to user input.

Why is this needed?

It provisions user for a quick data search pertaining to specific block or transaction.

Frontend - Pagination implementation for Transactions Tab

What would you like to be added?

This feature integrates the Api calls to render server-side pagination for list of transactions to be fetched.

Why is this needed?

As of now the pagination is being handled from UI. Implementing pagination from backend addresses an issue when dealing with retrieval of huge data sets.

UI - Transaction by Orgs Pie chart Css fix

What would you like to be added?

Adjust the CSS for the Dashboard - Transaction by Orgs Pie chart, so we can see the organisation names below, without the names getting cropped.

Why is this needed?

In the Dashboard - Transaction by Orgs Pie chart, we should be able to see the organisation names below, without any crop.
Attached image of the current piechart with the css issue mentioned above:
piechart

Argument of type 'unknown' is not assignable to parameter of type 'string'.

app/platform/fabric/FabricClient.ts
Error at line # 60 (highligted in bold)

try {
// Use Gateway to connect to fabric network
this.fabricGateway = new FabricGateway(this.config);
await this.fabricGateway.initialize();
} catch (error) {
// TODO in case of the failure, should terminate explorer?
logger.error(error);
throw new ExplorerError(error);
}

Backend - Block & Transaction Count Updation For Channel And Chaincode Tab w.r.t Purge

What would you like to be added?

This feature helps to update the total Transaction Count And Block Count in The Channels And Chaincode Tabs Respectively based on Purging Of Data .

Why is this needed?

After Purging was implemented the earlier feature of total transaction count and block count in the channels and chaincode tabs wasn't updating correctly so we needed to implement this feature so that the count gets updated correctly.

moving container images from docker to ghcr registry

What would you like to be added?

I want to have a automated way of pushing the container images to ghcr registry. Right now the images are pushed to docker container image registry.

Why is this needed?

Storing container images to ghcr is the recommendation by TOC.

Add CODEOWNERS file with list of maintainers GitHub IDs

Any PR that is raised against the repository should be notified to the maintainers. Either add list of all maintainer IDs or add the team's tag to the CODEOWNERS file. The CODEOWNERS can also be a curated to include UI vs backend only code committers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.