From 5a36da86bc0067a2ea05bdfff7058483a30f5a35 Mon Sep 17 00:00:00 2001 From: Chris Bygrave Date: Wed, 28 Sep 2022 11:03:31 +0100 Subject: [PATCH 1/3] Fix a few data types in the config docs - update contributors URL Signed-off-by: Chris Bygrave --- CONTRIBUTING.md | 2 +- config.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da89b2d..cc31051 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ We welcome contributions to the FireFly Project in many forms, and there's always plenty to do! Please visit the -[contributors guide](https://labs.hyperledger.org/firefly/contributors/contributors.html) in the +[contributors guide](https://hyperledger.github.io/firefly/contributors/) in the docs to learn how to make contributions to this exciting project. Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/config.md b/config.md index 515a6b2..fe74445 100644 --- a/config.md +++ b/config.md @@ -91,7 +91,7 @@ |---|-----------|----|-------------| |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` -|factor|The retry backoff factor|`boolean`|`2` +|factor|The retry backoff factor|`int`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`100ms` |maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -104,10 +104,10 @@ |credentials|CORS setting to control whether a browser allows credentials to be sent to this API|`boolean`|`true` |debug|Whether debug is enabled for the CORS implementation|`boolean`|`false` |enabled|Whether CORS is enabled|`boolean`|`true` -|headers|CORS setting to control the allowed headers|`string`|`[*]` +|headers|CORS setting to control the allowed headers|`[]string`|`[*]` |maxAge|The maximum age a browser should rely on CORS checks|[`time.Duration`](https://pkg.go.dev/time#Duration)|`600` -|methods| CORS setting to control the allowed methods|`string`|`[GET POST PUT PATCH DELETE]` -|origins|CORS setting to control the allowed origins|`string`|`[*]` +|methods| CORS setting to control the allowed methods|`[]string`|`[GET POST PUT PATCH DELETE]` +|origins|CORS setting to control the allowed origins|`[]string`|`[*]` ## debug @@ -137,7 +137,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|factor|Factor to increase the delay by, between each retry|`boolean`|`2` +|factor|Factor to increase the delay by, between each retry|`int`|`2` |initialDelay|Initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxDelay|Maximum delay between retries|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -210,7 +210,7 @@ |idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`475ms` |maxIdleConns|The max number of idle connections to hold pooled|`int`|`100` |method|The HTTP Method to use when invoking the Gas Oracle REST API|`string`|`GET` -|mode|The gas oracle mode|connector | restapi | disabled|`connector` +|mode|The gas oracle mode - connector, restapi, fixed, or disabled|`string`|`connector` |queryInterval|The minimum interval between queries to the Gas Oracle|[`time.Duration`](https://pkg.go.dev/time#Duration)|`5m` |requestTimeout|The maximum amount of time that a request is allowed to remain open|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |template|REST API Gas Oracle: A go template to execute against the result from the Gas Oracle, to create a JSON block that will be passed as the gas price to the connector|[Go Template](https://pkg.go.dev/text/template) `string`|`` @@ -249,7 +249,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|factor|The retry backoff factor|`boolean`|`2` +|factor|The retry backoff factor|`int`|`2` |initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` From 3e9b8bdb70103939b83c8ba0735e561b8547ae19 Mon Sep 17 00:00:00 2001 From: Chris Bygrave Date: Fri, 7 Oct 2022 15:10:58 +0100 Subject: [PATCH 2/3] Fix link in CONTRIBUTING.md Signed-off-by: Chris Bygrave --- config.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config.md b/config.md index fe74445..515a6b2 100644 --- a/config.md +++ b/config.md @@ -91,7 +91,7 @@ |---|-----------|----|-------------| |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` -|factor|The retry backoff factor|`int`|`2` +|factor|The retry backoff factor|`boolean`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`100ms` |maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -104,10 +104,10 @@ |credentials|CORS setting to control whether a browser allows credentials to be sent to this API|`boolean`|`true` |debug|Whether debug is enabled for the CORS implementation|`boolean`|`false` |enabled|Whether CORS is enabled|`boolean`|`true` -|headers|CORS setting to control the allowed headers|`[]string`|`[*]` +|headers|CORS setting to control the allowed headers|`string`|`[*]` |maxAge|The maximum age a browser should rely on CORS checks|[`time.Duration`](https://pkg.go.dev/time#Duration)|`600` -|methods| CORS setting to control the allowed methods|`[]string`|`[GET POST PUT PATCH DELETE]` -|origins|CORS setting to control the allowed origins|`[]string`|`[*]` +|methods| CORS setting to control the allowed methods|`string`|`[GET POST PUT PATCH DELETE]` +|origins|CORS setting to control the allowed origins|`string`|`[*]` ## debug @@ -137,7 +137,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|factor|Factor to increase the delay by, between each retry|`int`|`2` +|factor|Factor to increase the delay by, between each retry|`boolean`|`2` |initialDelay|Initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxDelay|Maximum delay between retries|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -210,7 +210,7 @@ |idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`475ms` |maxIdleConns|The max number of idle connections to hold pooled|`int`|`100` |method|The HTTP Method to use when invoking the Gas Oracle REST API|`string`|`GET` -|mode|The gas oracle mode - connector, restapi, fixed, or disabled|`string`|`connector` +|mode|The gas oracle mode|connector | restapi | disabled|`connector` |queryInterval|The minimum interval between queries to the Gas Oracle|[`time.Duration`](https://pkg.go.dev/time#Duration)|`5m` |requestTimeout|The maximum amount of time that a request is allowed to remain open|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |template|REST API Gas Oracle: A go template to execute against the result from the Gas Oracle, to create a JSON block that will be passed as the gas price to the connector|[Go Template](https://pkg.go.dev/text/template) `string`|`` @@ -249,7 +249,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|factor|The retry backoff factor|`int`|`2` +|factor|The retry backoff factor|`boolean`|`2` |initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` From 36aa00a9641b3e2429e92bbd3dd5aca59d9b6432 Mon Sep 17 00:00:00 2001 From: Chris Bygrave Date: Fri, 7 Oct 2022 18:28:28 +0100 Subject: [PATCH 3/3] Pull in FFTM 1.1.1 Signed-off-by: Chris Bygrave --- config.md | 14 +++++++------- go.mod | 4 ++-- go.sum | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/config.md b/config.md index 515a6b2..b8b8e3a 100644 --- a/config.md +++ b/config.md @@ -91,7 +91,7 @@ |---|-----------|----|-------------| |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` -|factor|The retry backoff factor|`boolean`|`2` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`100ms` |maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -104,10 +104,10 @@ |credentials|CORS setting to control whether a browser allows credentials to be sent to this API|`boolean`|`true` |debug|Whether debug is enabled for the CORS implementation|`boolean`|`false` |enabled|Whether CORS is enabled|`boolean`|`true` -|headers|CORS setting to control the allowed headers|`string`|`[*]` +|headers|CORS setting to control the allowed headers|`[]string`|`[*]` |maxAge|The maximum age a browser should rely on CORS checks|[`time.Duration`](https://pkg.go.dev/time#Duration)|`600` -|methods| CORS setting to control the allowed methods|`string`|`[GET POST PUT PATCH DELETE]` -|origins|CORS setting to control the allowed origins|`string`|`[*]` +|methods| CORS setting to control the allowed methods|`[]string`|`[GET POST PUT PATCH DELETE]` +|origins|CORS setting to control the allowed origins|`[]string`|`[*]` ## debug @@ -137,7 +137,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|factor|Factor to increase the delay by, between each retry|`boolean`|`2` +|factor|Factor to increase the delay by, between each retry|`float32`|`2` |initialDelay|Initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxDelay|Maximum delay between retries|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -210,7 +210,7 @@ |idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`475ms` |maxIdleConns|The max number of idle connections to hold pooled|`int`|`100` |method|The HTTP Method to use when invoking the Gas Oracle REST API|`string`|`GET` -|mode|The gas oracle mode|connector | restapi | disabled|`connector` +|mode|The gas oracle mode|'connector', 'restapi', 'fixed', or 'disabled'|`connector` |queryInterval|The minimum interval between queries to the Gas Oracle|[`time.Duration`](https://pkg.go.dev/time#Duration)|`5m` |requestTimeout|The maximum amount of time that a request is allowed to remain open|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |template|REST API Gas Oracle: A go template to execute against the result from the Gas Oracle, to create a JSON block that will be passed as the gas price to the connector|[Go Template](https://pkg.go.dev/text/template) `string`|`` @@ -249,7 +249,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|factor|The retry backoff factor|`boolean`|`2` +|factor|The retry backoff factor|`float32`|`2` |initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` diff --git a/go.mod b/go.mod index d01be6a..75fd2b3 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,9 @@ go 1.17 require ( github.com/hashicorp/golang-lru v0.5.4 - github.com/hyperledger/firefly-common v1.1.2 + github.com/hyperledger/firefly-common v1.1.3 github.com/hyperledger/firefly-signer v0.9.21 - github.com/hyperledger/firefly-transaction-manager v1.1.0 + github.com/hyperledger/firefly-transaction-manager v1.1.1 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.4.0 github.com/stretchr/testify v1.8.0 diff --git a/go.sum b/go.sum index 7fda25c..aeca8d7 100644 --- a/go.sum +++ b/go.sum @@ -291,10 +291,14 @@ github.com/hyperledger/firefly-common v0.1.13/go.mod h1:2NqPi5Ud9H6rSlZXkLbotxW7 github.com/hyperledger/firefly-common v0.1.17-0.20220808193503-961a6b241a1a/go.mod h1:MNbaI2spBsdZYOub6Duj9xueE7Qyu9itOmJ4vE8tjYw= github.com/hyperledger/firefly-common v1.1.2 h1:tSsptTxlgOlbbsyU6Ae83rOWA6tx1o0oNdqI8PAgzsk= github.com/hyperledger/firefly-common v1.1.2/go.mod h1:gMlv4Iy5JjnzXmSEdb+tWVDIc/2GhL9MRcgNX+VmI4M= +github.com/hyperledger/firefly-common v1.1.3 h1:srCodaJSLl8/qaq+Cse6HfHZbzYFzguerX370YGxnXU= +github.com/hyperledger/firefly-common v1.1.3/go.mod h1:gMlv4Iy5JjnzXmSEdb+tWVDIc/2GhL9MRcgNX+VmI4M= github.com/hyperledger/firefly-signer v0.9.21 h1:xgR5/rH1KLSU8HFoXVXrDm4sTJAI7qS1MCnPucpORFE= github.com/hyperledger/firefly-signer v0.9.21/go.mod h1:Ng3UzN1He1zrNBYMVQOeRs69aHobfVPMKXKyettjZk0= github.com/hyperledger/firefly-transaction-manager v1.1.0 h1:XEAYuAN+uqnMHsyUplc7OxuvCYsb7WwbknWmluZw4Vs= github.com/hyperledger/firefly-transaction-manager v1.1.0/go.mod h1:wB5YXPIL4sXXWLXO2pwjdAj9q4+iJsYt4NVaWtuttRI= +github.com/hyperledger/firefly-transaction-manager v1.1.1 h1:KlMs2Uhi5IoIJjCa6yCwr0TnxGvHFZpbKtedHlnMI2E= +github.com/hyperledger/firefly-transaction-manager v1.1.1/go.mod h1:jr9d7t1fEE45SuWs6+0GonZI/E0O69cGFecX2fmsGKU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=