Skip to content

Commit 43c0791

Browse files
authored
Merge pull request #10609 from vegaprotocol/release/v0.74.0
Release/v0.74.0
2 parents 279a486 + 189a4f7 commit 43c0791

File tree

1,866 files changed

+223547
-56790
lines changed

Some content is hidden

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

1,866 files changed

+223547
-56790
lines changed

.github/ISSUE_TEMPLATE/api_ticket.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: API request
3+
about: A request for an API to support a feature
4+
title: '[API]: '
5+
labels: "api"
6+
assignees: ''
7+
---
8+
9+
# API Overview
10+
11+
**In order to** ... (context - overcome a problem or meet a requirement)
12+
**We will build an API to**... (what - describe what the API needs to do)
13+
**So that** ... (why - we create these outcomes)
14+
15+
-
16+
-
17+
-
18+
19+
## Specs
20+
[Spec name](URL) to spec or section within a spec
21+
22+
## API request details
23+
24+
- [ ] Create an API that... (specific details about the API's functionality and what it should provide)
25+
- [ ]
26+
27+
### Filtering requirements (inputs)
28+
- [ ]
29+
- [ ]
30+
31+
### Sample API output (optional)
32+
33+
```
34+
35+
```
36+
37+
## Questions
38+
Open questions about the feature implementation, what can be done with the APIs, or currently unresolved questions around the feature.
39+
40+
## API test scenarios
41+
Detailed scenarios that can be executed as feature tests to verify that the API has been implemented as expected.
42+
43+
GIVEN (setup/context)
44+
WHEN (action)
45+
THEN (assertion) For example...
46+
See [here](https://github.com/vegaprotocol/vega/tree/develop/core/integration) for more format information and examples.
47+
48+
### Additional Details (optional)
49+
Any additional information that provides context or gives information that will help us develop the feature.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
name: 'Sign windows binary'
3+
description: 'Sign binary using EV certificate'
4+
5+
inputs:
6+
current-working-directory:
7+
description: 'The working directory, where the binary is located in'
8+
required: true
9+
default: './'
10+
binary-file:
11+
description: 'Binary file to sign'
12+
required: true
13+
default: ''
14+
gcp-credentials:
15+
description: 'GCP credentials'
16+
required: true
17+
default: ''
18+
ev-cert-pem:
19+
description: 'EV certificate PEM'
20+
required: true
21+
default: ''
22+
23+
runs:
24+
using: "composite"
25+
steps:
26+
- name: "Import signing certificate"
27+
shell: bash
28+
run: |
29+
cd "${{ inputs.current-working-directory }}" && \
30+
echo "${{ inputs.ev-cert-pem }}" > certificate_chain.pem
31+
32+
- name: "Download Java v17"
33+
uses: oracle-actions/setup-java@v1
34+
with:
35+
website: oracle.com
36+
release: 17
37+
38+
- name: "Setup python"
39+
uses: actions/setup-python@v4
40+
with:
41+
python-version: "3.9"
42+
43+
- name: "Authenticate to the Google Cloud"
44+
uses: "google-github-actions/auth@v1"
45+
with:
46+
credentials_json: "${{ inputs.gcp-credentials }}"
47+
48+
- name: "Set up Cloud SDK"
49+
uses: "google-github-actions/setup-gcloud@v1"
50+
env:
51+
CLOUDSDK_PYTHON: "python3"
52+
53+
- name: "Check the Google Cloud CLI"
54+
shell: bash
55+
run: "gcloud info"
56+
57+
- name: "Download signing tool and verify sha265 checksum"
58+
shell: bash
59+
run: |
60+
cd "${{ inputs.current-working-directory }}" && \
61+
curl -L -o jsign.jar "https://github.com/ebourg/jsign/releases/download/4.2/jsign-4.2.jar" && \
62+
echo '290377fc4f593256200b3ea4061b7409e8276255f449d4c6de7833faf0850cc1 jsign.jar' | sha256sum -c
63+
64+
# We sign binaries with the EV Certificate. You MUST NOT have a key in a file to sign binary.
65+
# The only options to store keys are:
66+
# - HSM architecture(e.g., AWS or Google)
67+
# - Physical USB stick with hardware stored key
68+
# We are using the first option to be able to sign the binaries within the CI servers without
69+
# physical access to them. However, this signing method requires the signing tool supporting the HSM key.
70+
#
71+
# The high-level signing procedure looks like below:
72+
# 1. Calculate the SHA256 Hash for the app
73+
# 2. Send a request to sign the hash to the Google Cloud
74+
# 3. Google signs our signature with a physically stored key on Google's HSM server and returns the signature over the network
75+
# 4. Add our certificate and the signature received from the Google HSM to the EXE file
76+
# 5. Our signature hash is again signed with the timestamp authority's private key, and the final hash is added to our binary.
77+
# 6. Final executable with all necessary signing information included is produced
78+
- name: "Sign binary"
79+
shell: bash
80+
run: |
81+
cd "${{ inputs.current-working-directory }}" && \
82+
java -jar jsign.jar \
83+
--storetype GOOGLECLOUD \
84+
--storepass "$(gcloud auth print-access-token)" \
85+
--keystore "projects/vegaprotocol/locations/europe-west2/keyRings/windows-sign-apps" \
86+
--alias "digicert-ev-signing-key-ecc-256" \
87+
--certfile "./certificate_chain.pem" \
88+
--tsmode RFC3161 \
89+
--tsaurl http://timestamp.globalsign.com/tsa/r6advanced1 \
90+
"${{ inputs.binary-file }}"
91+
92+
- name: "Clean up"
93+
shell: bash
94+
run: |
95+
cd "${{ inputs.current-working-directory }}" && \
96+
rm -f certificate_chain.pem && \
97+
rm -f jsign.jar

.github/workflows/codeql.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,24 @@ jobs:
2626
language: ['go']
2727

2828
steps:
29+
- uses: actions/setup-go@v4
30+
with:
31+
go-version: '>=1.21.0'
2932
- name: Checkout repository
30-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3134

3235
# Initializes the CodeQL tools for scanning.
3336
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v2
37+
uses: github/codeql-action/init@v3
3538
with:
3639
languages: ${{ matrix.language }}
3740

3841
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
3942
# If this step fails, then you should remove it and run the build manually (see below)
4043
- name: Autobuild
41-
uses: github/codeql-action/autobuild@v2
44+
uses: github/codeql-action/autobuild@v3
4245

4346
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@v2
47+
uses: github/codeql-action/analyze@v3
4548
with:
4649
category: "/language:${{matrix.language}}"

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Setup Go
23-
uses: actions/setup-go@v3
23+
uses: actions/setup-go@v5
2424
with:
25-
go-version: '1.20'
26-
- uses: actions/checkout@v3
25+
go-version: '1.21.5'
26+
- uses: actions/checkout@v4
2727
- name: golangci-lint
28-
uses: golangci/golangci-lint-action@v3
28+
uses: golangci/golangci-lint-action@v3.7.0
2929
with:
30-
version: v1.53.2
30+
version: v1.55.2
3131
args: --config .golangci.toml

.github/workflows/release-binaries.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: Set up Go
7676
uses: actions/setup-go@v2
7777
with:
78-
go-version: '1.20'
78+
go-version: '1.21'
7979
id: go
8080

8181
- name: Check out code
@@ -142,7 +142,7 @@ jobs:
142142
uses: actions/setup-go@v2
143143

144144
with:
145-
go-version: '1.20'
145+
go-version: '1.21'
146146
id: go
147147

148148
- name: Check out code
@@ -264,7 +264,7 @@ jobs:
264264
- name: Set up Go
265265
uses: actions/setup-go@v2
266266
with:
267-
go-version: '1.20'
267+
go-version: '1.21'
268268
id: go
269269

270270
- name: Check out code
@@ -288,15 +288,14 @@ jobs:
288288
run: go build -o build/${{ matrix.app }}.exe ./cmd/${{ matrix.app }}
289289

290290
- name: "Sign binary"
291-
# we do notarization to vegawallet only
292291
if: ${{ matrix.app == 'vegawallet' }}
293-
uses: Dana-Prajea/code-sign-action@98c79121b376beab8d6a9484f445089db4461bca
292+
uses: ./.github/actions/sign-windows-binary
294293
with:
295-
certificate: ${{ secrets.WINDOWS_CERTIFICATE }}
296-
password: ${{ secrets.WINDOWS_CERTIFICATE_PASS }}
297-
certificatesha1: ${{ secrets.WINDOWS_CERTIFICATE_HASH }}
298-
folder: "build"
299-
timestampUrl: "http://timestamp.sectigo.com"
294+
current-working-directory: build
295+
binary-file: ${{ matrix.app }}.exe
296+
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}
297+
ev-cert-pem: ${{ secrets.EV_SIGN_CERT_FULL_CHAIN_PEM }}
298+
300299

301300
- name: Check version
302301
if: ${{ env.GOARCH == 'amd64' }}

.github/workflows/release-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
name: Set up Go
3838
uses: actions/setup-go@v2
3939
with:
40-
go-version: '1.20'
40+
go-version: '1.21'
4141
-
4242
name: Get dependencies
4343
run: cd vega; bash script/gettools.sh

.golangci.toml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ disable = [
5656
"varnamelen",
5757
"wrapcheck",
5858
"wsl",
59-
6059
## New linters, disabled until we evaluate if we want them
6160
"wastedassign",
6261
"nakedret",
@@ -68,9 +67,15 @@ disable = [
6867
"depguard",
6968
"revive",
7069

70+
## new with 1.55.2, need to evaluate
71+
"testifylint",
72+
"inamedparam",
73+
"perfsprint",
74+
"typecheck",
75+
"protogetter",
76+
7177
## Disabled on-pupose.
7278
"exhaustruct", # We often make incomplete structs.
73-
"gci", # Doesn't match our code style.
7479
"lll", # We don't have a line length.
7580
"nlreturn", # Doesn't match our code style.
7681
"nonamedreturns", # We don't mind named returns.
@@ -91,6 +96,33 @@ enable = [
9196
# "fieldalignment", to enable one day
9297
]
9398

99+
[linters-settings.goheader]
100+
template = """
101+
Copyright (C) 2023 Gobalsky Labs Limited
102+
103+
This program is free software: you can redistribute it and/or modify
104+
it under the terms of the GNU Affero General Public License as
105+
published by the Free Software Foundation, either version 3 of the
106+
License, or (at your option) any later version.
107+
108+
This program is distributed in the hope that it will be useful,
109+
but WITHOUT ANY WARRANTY; without even the implied warranty of
110+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111+
GNU Affero General Public License for more details.
112+
113+
You should have received a copy of the GNU Affero General Public License
114+
along with this program. If not, see <http://www.gnu.org/licenses/>."""
115+
116+
[linters-settings.gci]
117+
custom-order = true
118+
sections = [
119+
"standard", # Standard section: captures all standard packages.
120+
"prefix(code.vegaprotocol.io/vega)", # Custom section: groups all imports with the specified Prefix.
121+
"default", # Default section: contains all imports that could not be matched to another section type.
122+
"blank", # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
123+
"dot",
124+
]
125+
94126
[[issues.exclude-rules]]
95127
linters = ["staticcheck"]
96128
text = "SA1019:"

.spelling

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ cleanup
2323
Cleanup
2424
clef
2525
codegen
26+
cometbft
2627
config
2728
cyclomatic
2829
dApp
@@ -85,6 +86,8 @@ mutexes
8586
nodewallet
8687
notarising
8788
OpenRPC
89+
perp
90+
perps
8891
phish
8992
Prometheus
9093
proto

0 commit comments

Comments
 (0)