Manage Peer Nodes

This topic contains information about peer nodes.

Create a Peer Node

A peer node reads, endorses, and writes transactions to the blockchain ledger.

Note the following information:
  • You can add, configure, and remove peer nodes as required by your network.

  • You can add peers to achieve network resilience and scalability. For example, if your instantiated chaincode’s endorsement policy requires three peers to endorse transactions and there are three peers on your channel and one peer is down, then the transactions are not written to the blockchain ledger. You can add one or more extra peers and add them to the channel to prevent this interruption.

  • When you provisioned your instance, you specified the number of peer node your network will need as it grows. As your network gets larger, you might want to create more peers and separate them by channel to guarantee good system performance.

  1. Go to the Oracle Blockchain Platform console and select the Nodes tab.
  2. In the Nodes tab, click Add Node and select Peer.
    The Add Node dialog is displayed.
  3. Configure the new peer node as needed. Note the following information:
    • In most cases you’ll specify Member in the Role field. This role is used by the chaincode’s endorsement policy. The endorsement policy specifies the MSP that must validate the identity of the signer peer and the signer peer’s role.
    • In the Partition field, select which virtual machine (VM) you want to create the peer on. Your provisioned instance includes two VMs. When creating peers, you should balance the distribution of these peers between the VMs to ensure good system performance. The partition that you specify is included in the peer’s name. For example, peer0–1 and peer 1–1 are running on VM1, and peer0–2 and peer1–2 are running on VM2.
    • The alias name that you specify in the Alias field is appended to the peer node’s name. Provide an alias to help you identify your peer node and what it's used for. For example, peer0–1 (detroit). An alias must start with a letter and have 16 or fewer characters.
  4. Click Submit.
    The node is created and displays in the Nodes tab.

View and Edit the Peer Node Configuration

A peer node’s configuration determines how the node performs and behaves on the network.

Only administrators can change a node’s configuration. If you've got user permissions, then you can view a node’s configuration settings. See Peer Node Attributes.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, go to the Nodes table, locate the peer node that you want configuration information for, and click the node’s More Actions button.
  3. The configuration option is determined by your permissions. If you're an administrator, locate and click Edit Configuration. If you're a user, locate and click View.
    The Configure dialog is displayed.
  4. If you're an administrator, then modify the node’s settings as needed.
  5. Click Submit to save the configuration changes, or click X to close the Configure dialog.
  6. Restart the node to apply any changes that you made.

List Chaincodes Installed on a Peer Node

You can view a list of the chaincodes and their versions installed on a specific peer node in your network.

If you don’t see the chaincode or the chaincode version you were expecting, then you can install a chaincode or upgrade a chaincode to the peer node. You must be an administrator to install or upgrade a chaincode. See Typical Workflow to Deploy Chaincodes.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, click the name of the peer node you want to see information for.
    The Node Information page is displayed.
  3. Click the Chaincodes pane to view a list of chaincodes installed on the selected peer node.

View Health Information for a Peer Node

You can check a peer node’s metrics to see how the node is performing on the blockchain network. This information helps you discover and diagnose performance problems.

The Health Overview pane displays these performance metrics: CPU utilization, memory utilization, user transactions endorsed, and user transactions committed.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, click the name of the peer node you want to see health information for.
    The Node Information page is displayed.
  3. Click the Health Overview pane to view the node’s performance metrics.
    Note the following information:
    • If the CPU Utilization and Memory Utilization percentages are too high, then it might be because the peer is overloaded with endorsement requests. Consider adding another peer or changing the endorsement policy.
    • If the Disk Utilization percentage is too high, then the ledger might not get stored on the node properly.
    • The User Transactions Endorsed and User Transaction Committed metrics are collected and refreshed every ten minutes. The counts you see are cumulative.
    • If the utilization percentages are consistently high, then contact Oracle Support.

View Log Files for a Peer Node

You can access a peer node’s log files for information about the node’s performance and any errors that have occurred. This information helps you discover, diagnose, and fix problems.

The node’s configuration determines the type and amount of information included in the log files. You can change the logging level if you've got administrator permissions. See Set the Log Level for a Node.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, click the name of the peer node you want to see log file information for.
    The Node Information page is displayed.
  3. Click the Logs pane. Note the following options:
    • In the Log for field, specify if you want to see logs for the peer node or for the chaincodes that are installed on the peer node.
    • Select a time range such as Last day or Last week.
    • To specify your own time range, select Custom and then enter dates into the Start Time and End Time fields, or click the calendar icons and pick dates and times. Click Apply to query.
    If you select a specific time period (for example, Last day) and then select it again to re-run the query, the query doesn’t re-run. To get the latest information, click the Refresh button.
    The logs you requested are displayed in the Logs table where you can view or download them.
  4. In the Logs table, click a file’s Download option or select multiple log files and click the Download button to download the log files and open them in an application where you can search for specific information.
  5. Click the Current Log button to quickly find and open the most current log.

Export and Import Peer Nodes

If you want to run the blockchain transactions through the REST proxy, then after you’ve added a participant to the network, you must export its peer nodes and import them into the founder.

You need to do this export and import step because the REST proxy’s end point configuration needs to know about the peers from both members. After you’ve completed this step then you’ll have to update the founder and participants’ REST proxy nodes to add the peers so that the requests can be routed as required by the endorsement policy.
  1. Go to the participant’s console and select the Nodes tab.
  2. Click Export/Import Peers and select Export.
    The Export Nodes dialog is displayed.
  3. In the Peer List field, select the peer nodes that you want to export. Click Export.
    Note that files exported by the console and REST APIs are only compatible for import with the same component. That is you can't successfully use the REST API to import an export file created with the console. Likewise, you can't successfully use the console to import an export file created with the REST API.
  4. To import, go to the founder’s Oracle Blockchain Platform console and select the Nodes tab.
  5. Click Export/Import Peers and select Import.
    The Import Remote Nodes dialog is displayed.
  6. Click Upload remote nodes configurations and browse for and select the JSON file containing the node configuration information. Usually this file is named <instance name>-exported-nodes.json.
    Note that files exported by the console and REST APIs are only compatible for import with the same component. That is you can't successfully use the REST API to import an export file created with the console. Likewise, you can't successfully use the console to import an export file created with the REST API.
  7. Click the plus icon to upload another node configuration file for import.
  8. Click Import.
  9. To confirm that the nodes were added successfully, you can:
    • Go to the founder’s Nodes tab and in the nodes table locate the names of the imported peer nodes. Note that the imported nodes type is Remote Peer. You can’t view or edit a remote peer’s configuration information.
    • Go to the founder’s Network tab and click Topology View and locate the names of the imported peer nodes.