Skip to content

Commit 0a5b860

Browse files
authored
Merge branch 'main' into main
2 parents ac74c81 + 88a4c15 commit 0a5b860

File tree

160 files changed

+2459
-599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2459
-599
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Fixes # <issue_number_here>
3030
- [ ] I have performed a self-review of my own code or work.
3131
- [ ] I have commented my code, particularly in hard-to-understand areas.
3232
- [ ] My changes generates no new warnings.
33-
- [ ] My Pull Request title is in format <code>< issue name ></code> eg <code>Added links in the documentation</code>.
3433
- [ ] I have added tests that prove my fix is effective or that my feature works.
3534
- [ ] My changes have sufficient code coverage (unit, integration, e2e tests).
3635

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ __debug*
1212
!deploy/charts/firefly
1313
containerlogs
1414
.vscode/*.log
15-
.idea
16-
doc-site/site
15+
.idea/
16+
doc-site/site
17+
*.iml

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ linters-settings:
2121
values:
2222
regexp:
2323
COMPANY: .*
24+
YEAR: '\d\d\d\d(-\d\d\d\d)?'
2425
template: |-
2526
Copyright © {{ YEAR }} {{ COMPANY }}
2627

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ARG UI_TAG
7575
ARG UI_RELEASE
7676
RUN apk add --update --no-cache \
7777
sqlite=3.44.2-r0 \
78-
postgresql16-client=16.6-r0 \
78+
postgresql16-client=16.8-r0 \
7979
curl=8.12.1-r0 \
8080
jq=1.7.1-r0
8181
WORKDIR /firefly

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GOGC=30
1414

1515
all: build test go-mod-tidy
1616
test: deps lint
17-
$(VGO) test ./internal/... ./pkg/... ./cmd/... ./doc-site ./ffconfig/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s ${TEST_ARGS}
17+
$(VGO) test ./internal/... ./pkg/... ./cmd/... ./doc-site ./ffconfig/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=45s ${TEST_ARGS}
1818
coverage.html:
1919
$(VGO) tool cover -html=coverage.txt
2020
coverage: test coverage.html

auditevents/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package main
1818

1919
import (
2020
"encoding/json"
21+
"errors"
2122
"fmt"
2223
"io"
2324
"net/http"
@@ -94,7 +95,7 @@ func run(host string) error {
9495
protocolID := event.BlockchainEvent.ProtocolID
9596
fmt.Printf("%-10d %s\n", lastSequence, protocolID)
9697
if protocolID <= lastProtocolID {
97-
return fmt.Errorf("out of order events detected")
98+
return errors.New("out of order events detected")
9899
}
99100
lastProtocolID = protocolID
100101
validated++

doc-site/docs/gettingstarted/setup_env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Global Flags:
8484
-d, --database string Database type to use. Options are: [sqlite3 postgres] (default "sqlite3")
8585
-e, --external int Manage a number of FireFly core processes outside of the docker-compose stack - useful for development and debugging
8686
-p, --firefly-base-port int Mapped port base of FireFly core API (1 added for each member) (default 5000)
87-
--ipfs-mode string Set the mode in which IFPS operates. Options are: [private public] (default "private")
87+
--ipfs-mode string Set the mode in which IPFS operates. Options are: [private public] (default "private")
8888
-m, --manifest string Path to a manifest.json file containing the versions of each FireFly microservice to use. Overrides the --release flag.
8989
--multiparty Enable or disable multiparty mode (default true)
9090
--node-name stringArray Node name

doc-site/docs/reference/config.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,30 +407,70 @@ title: Configuration Reference
407407

408408
## metrics
409409

410+
|Key|Description|Type|Default Value|
411+
|---|-----------|----|-------------|
412+
|address|Deprecated - use monitoring.address instead|`int`|`127.0.0.1`
413+
|enabled|Deprecated - use monitoring.enabled instead|`boolean`|`true`
414+
|path|Deprecated - use monitoring.metricsPath instead|`string`|`/metrics`
415+
|port|Deprecated - use monitoring.port instead|`int`|`6000`
416+
|publicURL|Deprecated - use monitoring.publicURL instead|URL `string`|`<nil>`
417+
|readTimeout|Deprecated - use monitoring.readTimeout instead|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
418+
|shutdownTimeout|The maximum amount of time to wait for any open HTTP requests to finish before shutting down the HTTP server|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s`
419+
|writeTimeout|Deprecated - use monitoring.writeTimeout instead|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
420+
421+
## metrics.auth
422+
423+
|Key|Description|Type|Default Value|
424+
|---|-----------|----|-------------|
425+
|type|The auth plugin to use for server side authentication of requests|`string`|`<nil>`
426+
427+
## metrics.auth.basic
428+
429+
|Key|Description|Type|Default Value|
430+
|---|-----------|----|-------------|
431+
|passwordfile|The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.|`string`|`<nil>`
432+
433+
## metrics.tls
434+
435+
|Key|Description|Type|Default Value|
436+
|---|-----------|----|-------------|
437+
|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`<nil>`
438+
|caFile|The path to the CA file for TLS on this API|`string`|`<nil>`
439+
|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`<nil>`
440+
|certFile|The path to the certificate file for TLS on this API|`string`|`<nil>`
441+
|clientAuth|Enables or disables client auth for TLS on this API|`string`|`<nil>`
442+
|enabled|Enables or disables TLS on this API|`boolean`|`false`
443+
|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`<nil>`
444+
|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`<nil>`
445+
|keyFile|The path to the private key file for TLS on this API|`string`|`<nil>`
446+
|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>`
447+
448+
## monitoring
449+
410450
|Key|Description|Type|Default Value|
411451
|---|-----------|----|-------------|
412452
|address|The IP address on which the metrics HTTP API should listen|`int`|`127.0.0.1`
413453
|enabled|Enables the metrics API|`boolean`|`true`
414-
|path|The path from which to serve the Prometheus metrics|`string`|`/metrics`
454+
|metricsPath|The path from which to serve the Prometheus metrics|`string`|`/metrics`
415455
|port|The port on which the metrics HTTP API should listen|`int`|`6000`
416456
|publicURL|The fully qualified public URL for the metrics API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation|URL `string`|`<nil>`
417457
|readTimeout|The maximum time to wait when reading from an HTTP connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
418458
|shutdownTimeout|The maximum amount of time to wait for any open HTTP requests to finish before shutting down the HTTP server|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s`
419459
|writeTimeout|The maximum time to wait when writing to an HTTP connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
420460

421-
## metrics.auth
461+
## monitoring.auth
422462

423463
|Key|Description|Type|Default Value|
424464
|---|-----------|----|-------------|
425465
|type|The auth plugin to use for server side authentication of requests|`string`|`<nil>`
426466

427-
## metrics.auth.basic
467+
## monitoring.auth.basic
428468

429469
|Key|Description|Type|Default Value|
430470
|---|-----------|----|-------------|
431471
|passwordfile|The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.|`string`|`<nil>`
432472

433-
## metrics.tls
473+
## monitoring.tls
434474

435475
|Key|Description|Type|Default Value|
436476
|---|-----------|----|-------------|

doc-site/docs/reference/types/subscription.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ title: Subscription
8686
| Field Name | Description | Type |
8787
|------------|-------------|------|
8888
| `firstEvent` | Whether your application would like to receive events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' | `SubOptsFirstEvent` |
89-
| `readAhead` | The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts | `uint16` |
89+
| `readAhead` | The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts | `uint` |
9090
| `withData` | Whether message events delivered over the subscription, should be packaged with the full data of those messages in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. | `bool` |
9191
| `batch` | Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. | `bool` |
9292
| `batchTimeout` | When batching is enabled, the optional timeout to send events even when the batch hasn't filled. | `string` |

doc-site/docs/reference/types/wsstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ title: WSStart
7777
| Field Name | Description | Type |
7878
|------------|-------------|------|
7979
| `firstEvent` | Whether your application would like to receive events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' | `SubOptsFirstEvent` |
80-
| `readAhead` | The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts | `uint16` |
80+
| `readAhead` | The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts | `uint` |
8181
| `withData` | Whether message events delivered over the subscription, should be packaged with the full data of those messages in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. | `bool` |
8282
| `batch` | Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. | `bool` |
8383
| `batchTimeout` | When batching is enabled, the optional timeout to send events even when the batch hasn't filled. | `string` |

0 commit comments

Comments
 (0)