Skip to content

Commit 1b60743

Browse files
authored
Merge branch 'main' into feature/wallet-js-update
2 parents 3549a27 + 992e404 commit 1b60743

File tree

68 files changed

+1033
-254
lines changed

Some content is hidden

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

68 files changed

+1033
-254
lines changed

.github/workflows/build.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore: ["README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]
7+
pull_request:
8+
branches: [ "main" ]
9+
paths-ignore: ["README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
RUSTFLAGS: -D warnings
14+
RUST_BACKTRACE: 1
15+
CARGO_INCREMENTAL: 0
16+
17+
jobs:
18+
build_on_linux:
19+
name: Build Catalyst Core on Linux
20+
runs-on: ubuntu-latest
21+
env:
22+
CARGO_FLAGS: --verbose --locked
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v3
26+
with:
27+
ref: ${{ github.event.pull_request.head.sha }}
28+
29+
- uses: Swatinem/rust-cache@v2
30+
31+
- name: Install deps
32+
run:
33+
sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config
34+
35+
- name: Build on Linux
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: "1.65"
39+
- run: cargo build
40+
41+
build_on_windows:
42+
name: Build Catalyst Core on Windows
43+
runs-on: windows-latest
44+
env:
45+
CARGO_FLAGS: --verbose --locked
46+
steps:
47+
- name: Checkout code on PR
48+
#Workaround for the running out of disk space issue. See https://github.com/actions/runner-images/issues/1341
49+
run: |
50+
mkdir C:\\${{ github.event.repository.name }}
51+
git clone -n -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}
52+
cd C:\\${{ github.event.repository.name }}
53+
git checkout ${{ github.event.pull_request.head.sha }}
54+
if: ${{ github.event_name == 'pull_request' }}
55+
56+
- name: Checkout code on push
57+
run: |
58+
mkdir C:\\${{ github.event.repository.name }}
59+
git clone -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}
60+
cd C:\\${{ github.event.repository.name }}
61+
if: ${{ github.event_name == 'push' }}
62+
63+
- name: Allow long paths on Windows
64+
working-directory: "C:\\${{ github.event.repository.name }}"
65+
shell: powershell
66+
run: |
67+
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
68+
git config --system core.longpaths true
69+
70+
- uses: Swatinem/rust-cache@v2
71+
with:
72+
workspaces: "C:\\${{ github.event.repository.name }}"
73+
74+
- name: Set default linker
75+
working-directory: "C:\\${{ github.event.repository.name }}"
76+
run: rustup default stable-x86_64-pc-windows-msvc
77+
78+
- name: Install dependencies
79+
working-directory: "C:\\${{ github.event.repository.name }}"
80+
run:
81+
choco install -y protoc openssl sqlite postgresql14
82+
83+
- name: Set PostgreSQL env variables
84+
working-directory: "C:\\${{ github.event.repository.name }}"
85+
shell: powershell
86+
run: |
87+
"PQ_LIB_DIR=${env:PROGRAMFILES}\PostgreSQL\14\lib" >> $env:GITHUB_ENV
88+
89+
- uses: actions-rs/toolchain@v1
90+
with:
91+
toolchain: "1.65"
92+
93+
- name: Build on Windows
94+
working-directory: "C:\\${{ github.event.repository.name }}"
95+
run: cargo build --workspace

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ jobs:
210210
with:
211211
toolchain: "1.65" # it says it can read the rust-toolchain file, but it fails if we omit this
212212
components: rustfmt, clippy
213-
- run: scripts/check-fmt.sh
213+
- run: scripts/check-fmt.sh

.github/workflows/nix.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Nix CI
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/nix.yml'
7+
- 'nix/**'
8+
- 'src/**'
9+
- 'Cargo.*'
10+
- 'flake.*'
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- '.github/workflows/nix.yml'
16+
- 'nix/**'
17+
- 'src/**'
18+
- 'Cargo.*'
19+
- 'flake.*'
20+
workflow_dispatch:
21+
22+
permissions:
23+
contents: read
24+
25+
concurrency:
26+
group: ${{ github.sha }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
discover:
31+
outputs:
32+
hits: ${{ steps.discovery.outputs.hits }}
33+
nix_conf: ${{ steps.discovery.outputs.nix_conf }}
34+
runs-on: ubuntu-latest
35+
concurrency:
36+
group: ${{ github.workflow }}
37+
steps:
38+
- name: Standard Discovery
39+
uses: divnix/std-action/discover@main
40+
id: discovery
41+
publish-containers:
42+
needs: discover
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
target: ${{ fromJSON(needs.discover.outputs.hits).containers.publish }}
47+
name: ${{ matrix.target.cell }} - ${{ matrix.target.name }}
48+
runs-on: ubuntu-latest
49+
steps:
50+
- run: |
51+
config="$HOME/.docker/config.json"
52+
mkdir -p "${config%/*}"
53+
jq -n --arg token "${{ secrets.DOCKER_AUTH_TOKEN }}" '{ "auths": { "registry.ci.iog.io": { auth: $token } } }' > "$config"
54+
chmod 0600 "$config"
55+
- uses: divnix/std-action/run@main
56+
with:
57+
extra_nix_config: |
58+
${{ needs.discover.outputs.nix_conf }}
59+
json: ${{ toJSON(matrix.target) }}
60+
nix_key: ${{ secrets.NIX_SIGNING_KEY }}
61+
s3_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
62+
s3_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
63+
cache: s3://iog-catalyst-cache?region=eu-central-1
64+
build-packages:
65+
if: always()
66+
needs:
67+
- discover
68+
- publish-containers
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
73+
name: ${{ matrix.target.cell }} - ${{ matrix.target.name }}
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: divnix/std-action/run@main
77+
with:
78+
extra_nix_config: |
79+
${{ needs.discover.outputs.nix_conf }}
80+
json: ${{ toJSON(matrix.target) }}
81+
nix_key: ${{ secrets.NIX_SIGNING_KEY }}
82+
s3_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
83+
s3_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
84+
cache: s3://iog-catalyst-cache?region=eu-central-1
85+
build-devshells:
86+
if: always()
87+
needs:
88+
- discover
89+
- publish-containers
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
target: ${{ fromJSON(needs.discover.outputs.hits).devshells.build }}
94+
name: ${{ matrix.target.cell }} - ${{ matrix.target.name }}
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: divnix/std-action/run@main
98+
with:
99+
extra_nix_config: |
100+
${{ needs.discover.outputs.nix_conf }}
101+
json: ${{ toJSON(matrix.target) }}
102+
nix_key: ${{ secrets.NIX_SIGNING_KEY }}
103+
s3_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
104+
s3_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
105+
cache: s3://iog-catalyst-cache?region=eu-central-1

Cargo.lock

Lines changed: 23 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ brew install protobuf-c libsigsegv libpq libserdes pkg-config
7474

7575
##### Windows
7676

77+
- [choco](https://chocolatey.org/)
7778

78-
TODO: - https://github.com/input-output-hk/catalyst-core/issues/138
79-
79+
```sh
80+
choco install protoc openssl sqlite postgresql14
81+
```
8082

8183
### Install Extra Packages/Tools
8284

SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security
2+
3+
## Reporting a Vulnerability
4+
5+
Please report (suspected) security vulnerabilities to [email protected]. You will receive a
6+
response from us within 48 hours. If the issue is confirmed, we will release a patch as soon
7+
as possible.
8+
9+
Please provide a clear and concise description of the vulnerability, including:
10+
11+
* the affected version(s),
12+
* steps that can be followed to exercise the vulnerability,
13+
* any workarounds or mitigations.
14+
15+
If you have developed any code or utilities that can help demonstrate the suspected
16+
vulnerability, please mention them in your email but ***DO NOT*** attempt to include them as
17+
attachments as this may cause your Email to be blocked by spam filters.

book/src/core-ledger-doc/api/v0.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ paths:
7171
description: Current balance of this account
7272
type: integer
7373
minimum: 0
74-
counter:
75-
description: Number of transactions performed with this account
76-
type: integer
77-
minimum: 0
74+
counters:
75+
description: An array of corresponding spending counters to the account
76+
type: array
77+
items:
78+
description: Spending counter with the specified lane
79+
type: integer
7880
tokens:
7981
description: Current state of the token balances of this account
8082
type: object

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)