Create a Polygon blockchain node

This page describes how to create a Polygon blockchain node in Blockchain Node Engine using the console or an API call.

Using the console

In the Google Cloud console, go to the Blockchain Node Engine page.

Go to Blockchain Node Engine

The Nodes list page is displayed by default. If no blockchain nodes have been created, you are prompted to create one.

To create a blockchain node:

  1. Click Create. The Create a blockchain node wizard opens.

    Blockchain Node Engine create node wizard Polygon

  2. Configure node info::

    1. Name of blockchain node: Type a name for the node. Use lowercase letters (a-z), numbers, and hyphens. For example, my-node.
    2. Blockchain type: Select the name of the blockchain. For example, POLYGON.
    3. Click Continue.
  3. Configure blockchain info: Configure blockchain-specific information. For example, to configure a Polygon node, select the following options. This information cannot be changed later:

    1. Network: The name of the network. For example MAINNET.
    2. Node type: The type of the blockchain node. For example, SENTRY FULL NODE.
    3. Block Producer/Validation client: The name of the block producer/validation pair. For example, HEIMDALL/BOR. See Supported configurations for supported combinations.
    4. Click Continue.
  4. Configure network info:

    1. Select the geographical location in which to host your resources. For example, us-central1. This information cannot be changed later. See Supported locations.
    2. Configure Endpoints: Creates publicly accessible endpoints by default. Review Private Service Connect for more information about using private endpoints.
    3. Click Continue.
  5. Add labels:

    1. Type a key/value pair. Click Add item to add more key/value pairs.
    2. Click Continue.
  6. Click Create. The node is created and the Nodes list is displayed. The Status indicates Creating until the blockchain node is ready to use, and then the status changes to Running.

Using an API

To create a blockchain node using an API, send a POST request to the API with the blockchain node specification. An example using the curl command to send a request to the API follows:

curl -X POST \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  -d '{
    "blockchainType": "BLOCKCHAIN_TYPE",
    "privateServiceConnectEnabled" : false,
    "polygonDetails": {
      "blockProducerClient": "PRODUCER_CLIENT",
      "validationClient": "VALIDATION_CLIENT",
      "network": "NETWORK",
      "nodeType": "NODE_TYPE"
    },
    "labels": {
      "LABEL_KEY": "LABEL_VALUE"
    }
  }' \
https://blockchainnodeengine.googleapis.com/v1/projects/PROJECT_ID/\
locations/LOCATION/blockchainNodes?blockchain_node_id=NODE_NAME

You must replace the variables in the earlier example with actual values as follows:

  • BLOCKCHAIN_TYPE: The name of the blockchain. For example, POLYGON.
  • privateServiceConnectEnabled: Optional and disabled by default. Set to true to enable Private Service Connect.
  • PRODUCER_CLIENT: The name of the producer client. For example, BOR. See Supported configurations for supported combinations.
  • VALIDATION_CLIENT: The name of the validation client. For example, HEIMDALL. See Supported configurations for supported combinations.
  • NETWORK: The name of the network. For example, MAINNET.
  • NODE_TYPE: The type of the blockchain node. For example, SENTRY_FULL.
  • PROJECT_ID: Your Google Cloud project ID. For example, my-project-id.
  • LOCATION: The location in which to host your resources. This information cannot be changed later. For example, us-central1. See Supported locations.
  • NODE_NAME: A name you specify for your node. Use lowercase letters (a-z), numbers, and hyphens. For example, my-node.
  • labels: A key-value pair. In the earlier example, the key is LABEL_KEY, for example my-label-key and the value is LABEL_VALUE, for example my-label-value.

Here is a sample response to the earlier command:

{
  "name": "projects/my-project-id/locations/us-central1/operations/operation-1694134701086-604ce790f5644-be6951f5-d1c2a914",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.blockchainnodeengine.v1.OperationMetadata",
    "createTime": "2023-09-08T00:58:21.543579239Z",
    "target": "projects/my-project-id/locations/us-central1/blockchainNodes/my-polygon-node1",
    "verb": "create",
    "requestedCancellation": false,
    "apiVersion": "v1"
  },
  "done": false
}

Note that the OPERATION_ID is returned in the earlier example:

operation-1694134701086-604ce790f5644-be6951f5-d1c2a914

You can use this value to get the status of the blockchain node creation.

Supported configurations

Blockchain Node Engine supports a variety of configurations. You can create nodes with any of the following combinations:

nodeType network blockProducerClient validationClient
SENTRY_FULL MAINNET BOR HEIMDALL
SENTRY_FULL TESTNET_MUMBAI BOR HEIMDALL