Manage REST Proxy Nodes

This topic contains information to help you understand, set up, and manage the REST proxy nodes.

How's the REST Proxy Used?

The REST proxy maps an application identity to a blockchain member, which allows users and applications to call the Oracle Blockchain Platform REST APIs.

Instead of using the native Hyperledger Fabric APIs, Oracle Blockchain Platform can use the REST proxy to interact with the Hyperledger Fabric network in Oracle Cloud. When you use the native Hyperledger Fabric APIs, you connect to the peers and orderer directly. However, the REST proxy allows you to query or invoke a Fabric chaincode through the RESTful protocol.

If needed, the REST proxy can map users to different Hyperledger Fabric enrollments. For example, one Oracle Identity Cloud Service user can be mapped to one Hyperledger Fabric enrollment, while the remaining Oracle Identity Cloud Service users can be mapped to a different Hyperledger Fabric enrollment.

Add Enrollments to the REST Proxy

You can add Hyperledger Fabric enrollments to the REST proxy. Enrollments allow users to call the REST proxy without an enrollment certificate.

Adding an enrollment to the REST Proxy creates a new user role in Oracle Identity Cloud Service. This role is: RESTPROXY#_USER_${enrollment_name}

After the enrollment is created in the console, the Administrator uses Oracle Identity Cloud Service to assign the required users to this role.

For information about how users access the REST resources, see REST API for Oracle Blockchain Platform.

  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, click the REST proxy node you want to add an enrollment to.
    The Node Information page is displayed.
  3. Click the Enrollments pane to see a list of the node’s current enrollments.
  4. Click Create New Enrollment.
    The Create New Enrollment dialog is displayed.
  5. In the User Name field, enter a name for the Fabric’s CA enrollment. Click Enroll.
    After you click Enroll:
    • The enrollment is created and displays in the Enrollments table.

    • The new enrollment is copied to each REST Proxy node in the network.

    • A new user role called RESTPROXY#_USER_${enrollment_name} is created in Oracle Identity Cloud Service and is now ready for the Administrator to assign users to it. See Add Hyperledger Fabric Enrollments to a REST Proxy in Administering Oracle Blockchain Platform.

Configure a REST Proxy Node

Configure a REST proxy node if you want to expose a chaincode to be accessed by REST clients. To configure a REST proxy node, you’ll specify channel, chaincode, and endorsing peers.

  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, locate the REST proxy node you want to configure, click its More Actions icon, and click Edit Configuration.
    The Configure dialog is displayed.
  3. Click the plus (+) icon. A new row is displayed in the configuration table.
  4. From the drop-down menus, select a channel, chaincode, and which peers must endorse the chaincode.

    If your chaincode is using an endorsement policy, then it's important to add the correct number of peers to get the required endorsement. See View an Endorsement Policy.

    The items you specify here control the combination of channels and chaincodes that the REST proxy will accept requests from, and which peers are used to endorse transactions when requests are submitted.

  5. (Optional) Click the Plus icon to add another set of configuration information.
  6. Click Submit.

View and Edit the REST Proxy Node Configuration

A REST proxy 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 REST Proxy Node Attributes.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, go to the Nodes table, locate the REST proxy 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 Proposal Wait Time (ms) and Transaction Wait Time (ms) attributes as needed.
  5. Modify the node’s channel, chaincode, and peer values as needed. Click the + (plus) icon to add additional channels, chaincodes, and peers.
  6. Click Submit to save the configuration changes, or click X to close the Configure dialog.

View Health Information for a REST Proxy Node

You can check a REST proxy 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 pane displays these performance metrics: CPU utilization and memory utilization.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, click the REST proxy node you want to see health information for.
    The Node Information page is displayed.
  3. Click the Health pane to view the node’s performance metrics.
    If the utilization percentages are consistently high, then contact Oracle Support.

View Log Files for a REST Proxy Node

You can access a REST proxy node’s log files for information about the node’s performance. 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 REST proxy node you want to get log files for.
    The Node Information page is displayed.
  3. Click the Logs pane. Note the following options:
    • Select a time range such as Last day or Last week that contains the logs you want to explore.
    • 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.