Skip to content

Configuration

Jean-Baptiste Dusseaut edited this page Apr 9, 2021 · 8 revisions

Configuration

Setting configuration values

Signer reads it configuration from several sources :

Regarding the json source, you can either change the file shipped with the distribution (directly if you use a bare metal distribution, or by mounting it with docker under /app/appsettings.json)

In addition, if you don’t want to write a full appsettings.json, you can specifiy an additional one that will be merged, via env variables : CONFIG_BASE_DIR and CONFIG_FILE. Signer will look for it under ${CONFIG_BASE_DIR}/${CONFIG_FILE}

On top of that, you can override specific values with env or command line arguments as speficied in the linked documentation above.

Here is the default configuration shipped with signer node :

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    },
    "Console": {
      "LogLevel": {
        "Default": "Information",
        "Microsoft": "Warning",
        "Microsoft.Hosting.Lifetime": "Information"
      },
      "FormatterName": "json",
      "FormatterOptions": {
        "SingleLine": true,
        "IncludeScopes": true,
        "TimestampFormat": "HH:mm:ss ",
        "UseUtcTimestamp": true,
        "JsonWriterOptions": {
          "Indented": false
        }
      }
    }
  },
  "LiteDB": {
    "Path": "./data/state.db"
  },
  "Ethereum": {
    "InitialLevel": 0,
    "LockingContract": "",
    "Node": {
      "Endpoint": "",
      "Confirmations": 10
    },
    "Signer": {
      "Type": "Memory"
    }
  },
  "Tezos": {
    "InitialLevel": 2,
    "QuorumContract": "",
    "MinterContract": "",
    "Node": {
      "ChainId": "",
      "Endpoint": "",
      "Confirmations": 60
    },
    "Signer": {
      "Type": "Memory"
    }
  },
  "IPFS": {
    "Endpoint": "",
    "KeyName": ""
  }
}

Admin api port

To change the admin api default port, set ASPNETCORE_URLS env variable. For instance, to listen to :5000 in http on all interfaces: ASPNETCORE_URLS=http://0.0.0.0:5000

LiteDB block

Signer saves its state (last level observed, and last event published) in LiteDB

This block only contains the database file path

Ethereum block

InitialLevel

At which level to begin to search for events

Lockingcontract

Address of the locking contract to watch for wrapping transactions, and to sign unwrapping transactions

Node
Endpoint

node address to use

Confirmations

how many confirmations the signer node must observe before providing a signature

Signer
Type

Type of signing strategy to use. Can be one of :

  • Memory

  • AWS

  • Azure AWS and Azure strategies requires additionnal configuration, listed below

KeyId

keyId to use for AWS KMS or Azure Vault

Key

In case of in memory key, hex private key to use

Tezos block

InitialLevel

At which level to begin to search for events

QuorumContract

Address of the quorum contract on tezos. It’s the target of minting signatures.

MinterContract

Address of the minter contract on tezos. It’s the target of minting signatures, and it will be watched for unwrapping transactions.

Node
Endpoint

node address to use

ChainId

the expected chainid. The signer will fail if the node’s main chain does not match.

Confirmations

how many confirmations the signer node must observe before providing a signature

Signer
Type

Type of signing strategy to use. Can be one of :

  • Memory

  • AWS

  • Azure

AWS and Azure strategies requires additionnal configuration, listed below

KeyId

keyId to use for AWS KMS or Azure Vault

Key

In case of in memory key, base58 encoded private key to use

IPFS block

Endpoint

Api endpoint of the ipfs node to use

KeyName

ipns key name to use for event publication.

AWS block

This the standard AWS configuration.

For instance:

"AWS": {
    "Profile": "<profile you configured>",
    "Region": "<region to use>",
  }

AWS KMS is described in more details here.

Key ids are configured in Tezos block and Ethereum block

Azure block

Signer node will use Default azure credentials. All you have to configure is the vault uri to use:

"Azure": {
    "KeyVault":"<your vault uri>"
}

Azure Vault is described in more details here.

Key ids are configured in Tezos block and Ethereum block

Logging block

Clone this wiki locally