Skip to content

Commit 75580b5

Browse files
Merge pull request #53 from hyperledger/tzgo-migration
DA-608 TzGo migration
2 parents eda0c8e + 5e031ee commit 75580b5

33 files changed

+342
-710
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ${LINT}:
2424
$(VGO) install github.com/golangci/golangci-lint/cmd/[email protected]
2525
mockpaths:
2626
$(eval FFTM_PATH := $(shell $(VGO) list -f '{{.Dir}}' github.com/hyperledger/firefly-transaction-manager/pkg/fftm))
27-
$(eval TEZOS_CLIENT_PATH := $(shell $(VGO) list -f '{{.Dir}}' blockwatch.cc/tzgo/rpc))
27+
$(eval TEZOS_CLIENT_PATH := $(shell $(VGO) list -f '{{.Dir}}' github.com/trilitech/tzgo/rpc))
2828

2929
define makemock
3030
mocks: mocks-$(strip $(1))-$(strip $(2))

cmd/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func configCommand() *cobra.Command {
1313
Use: "docs",
1414
Short: "Prints the config info as markdown",
1515
Long: "",
16-
RunE: func(cmd *cobra.Command, args []string) error {
16+
RunE: func(_ *cobra.Command, _ []string) error {
1717
InitConfig()
1818
b, err := config.GenerateConfigMarkdown(context.Background(), "", config.GetKnownKeys())
1919
fmt.Println(string(b))

cmd/tezosconnect.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var rootCmd = &cobra.Command{
2525
Use: "tezosconnect",
2626
Short: "Hyperledger FireFly Connector for Tezos blockchain",
2727
Long: ``,
28-
RunE: func(cmd *cobra.Command, args []string) error {
28+
RunE: func(_ *cobra.Command, _ []string) error {
2929
ctx, cancelCtx := context.WithCancel(context.Background())
3030
return run(ctx, cancelCtx)
3131
},

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func versionCommand() *cobra.Command {
3737
Use: "version",
3838
Short: "Prints the version info",
3939
Long: "",
40-
RunE: func(cmd *cobra.Command, args []string) error {
40+
RunE: func(_ *cobra.Command, _ []string) error {
4141
info := &Info{
4242
Version: BuildVersionOverride,
4343
Date: BuildDate,

config.md

+62-1
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@
3131

3232
|Key|Description|Type|Default Value|
3333
|---|-----------|----|-------------|
34+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
3435
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
36+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
3537
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
3638
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
3739
|enabled|Enables or disables TLS on this API|`boolean`|`false`
40+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
41+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
3842
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
3943
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
4044

@@ -43,6 +47,7 @@
4347
|Key|Description|Type|Default Value|
4448
|---|-----------|----|-------------|
4549
|blockQueueLength|Internal queue length for notifying the confirmations manager of new blocks|`int`|`50`
50+
|fetchReceiptUponEntry|Fetch receipt of new transactions immediately when they are added to the internal queue. When set to false, fetch will only happen when a new block is received or the transaction has been queue for more than the stale receipt timeout|`boolean`|`false`
4651
|notificationQueueLength|Internal queue length for notifying the confirmations manager of new transactions/events|`int`|`50`
4752
|receiptWorkers|Number of workers to use to query in parallel for receipts|`int`|`10`
4853
|required|Number of confirmations required to consider a transaction/event final|`int`|`20`
@@ -113,20 +118,32 @@
113118
|---|-----------|----|-------------|
114119
|count|The maximum number of times to retry|`int`|`5`
115120
|enabled|Enables retries|`boolean`|`false`
121+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
116122
|factor|The retry backoff factor|`float32`|`2`
117123
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms`
118124
|initialDelay|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`100ms`
119125
|maxDelay|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
120126
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
121127

128+
## connector.throttle
129+
130+
|Key|Description|Type|Default Value|
131+
|---|-----------|----|-------------|
132+
|burst|The maximum number of requests that can be made in a short period of time before the throttling kicks in.|`int`|`<nil>`
133+
|requestsPerSecond|The average rate at which requests are allowed to pass through over time.|`int`|`<nil>`
134+
122135
## connector.tls
123136

124137
|Key|Description|Type|Default Value|
125138
|---|-----------|----|-------------|
139+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
126140
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
141+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
127142
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
128143
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
129144
|enabled|Enables or disables TLS on this API|`boolean`|`false`
145+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
146+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
130147
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
131148
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
132149

@@ -170,10 +187,14 @@
170187

171188
|Key|Description|Type|Default Value|
172189
|---|-----------|----|-------------|
190+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
173191
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
192+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
174193
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
175194
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
176195
|enabled|Enables or disables TLS on this API|`boolean`|`false`
196+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
197+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
177198
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
178199
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
179200

@@ -264,18 +285,22 @@
264285

265286
|Key|Description|Type|Default Value|
266287
|---|-----------|----|-------------|
288+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
267289
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
290+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
268291
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
269292
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
270293
|enabled|Enables or disables TLS on this API|`boolean`|`false`
294+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
295+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
271296
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
272297
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
273298

274299
## persistence
275300

276301
|Key|Description|Type|Default Value|
277302
|---|-----------|----|-------------|
278-
|type|The type of persistence to use|Only 'leveldb' currently supported|`leveldb`
303+
|type|The type of persistence to use|`leveldb`, `postgres`(supports rich query)|`leveldb`
279304

280305
## persistence.leveldb
281306

@@ -364,17 +389,29 @@
364389
|---|-----------|----|-------------|
365390
|count|The maximum number of times to retry|`int`|`5`
366391
|enabled|Enables retries|`boolean`|`false`
392+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
367393
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms`
368394
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
369395

396+
## policyengine.simple.gasOracle.throttle
397+
398+
|Key|Description|Type|Default Value|
399+
|---|-----------|----|-------------|
400+
|burst|The maximum number of requests that can be made in a short period of time before the throttling kicks in.|`int`|`<nil>`
401+
|requestsPerSecond|The average rate at which requests are allowed to pass through over time.|`int`|`<nil>`
402+
370403
## policyengine.simple.gasOracle.tls
371404

372405
|Key|Description|Type|Default Value|
373406
|---|-----------|----|-------------|
407+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
374408
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
409+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
375410
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
376411
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
377412
|enabled|Enables or disables TLS on this API|`boolean`|`false`
413+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
414+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
378415
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
379416
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
380417

@@ -453,17 +490,29 @@
453490
|---|-----------|----|-------------|
454491
|count|The maximum number of times to retry|`int`|`5`
455492
|enabled|Enables retries|`boolean`|`false`
493+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
456494
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms`
457495
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
458496

497+
## transactions.handler.simple.gasOracle.throttle
498+
499+
|Key|Description|Type|Default Value|
500+
|---|-----------|----|-------------|
501+
|burst|The maximum number of requests that can be made in a short period of time before the throttling kicks in.|`int`|`<nil>`
502+
|requestsPerSecond|The average rate at which requests are allowed to pass through over time.|`int`|`<nil>`
503+
459504
## transactions.handler.simple.gasOracle.tls
460505

461506
|Key|Description|Type|Default Value|
462507
|---|-----------|----|-------------|
508+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
463509
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
510+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
464511
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
465512
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
466513
|enabled|Enables or disables TLS on this API|`boolean`|`false`
514+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
515+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
467516
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
468517
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`
469518

@@ -509,16 +558,28 @@
509558
|---|-----------|----|-------------|
510559
|count|The maximum number of times to retry|`int`|`5`
511560
|enabled|Enables retries|`boolean`|`false`
561+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
512562
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms`
513563
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
514564

565+
## webhooks.throttle
566+
567+
|Key|Description|Type|Default Value|
568+
|---|-----------|----|-------------|
569+
|burst|The maximum number of requests that can be made in a short period of time before the throttling kicks in.|`int`|`<nil>`
570+
|requestsPerSecond|The average rate at which requests are allowed to pass through over time.|`int`|`<nil>`
571+
515572
## webhooks.tls
516573

517574
|Key|Description|Type|Default Value|
518575
|---|-----------|----|-------------|
576+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
519577
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
578+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
520579
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
521580
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
522581
|enabled|Enables or disables TLS on this API|`boolean`|`false`
582+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
583+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
523584
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
524585
|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`<nil>`

0 commit comments

Comments
 (0)