Skip to content

Commit a0cb6e3

Browse files
committed
Fix project code formatting
By running 'make format'
1 parent 154f168 commit a0cb6e3

File tree

70 files changed

+885
-702
lines changed

Some content is hidden

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

70 files changed

+885
-702
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
---
22
name: Bug report
33
about: You might have found a bug and decide to report it
4-
title: ''
5-
labels: 'bug :bug:'
6-
assignees: ''
4+
title: ""
5+
labels: "bug :bug:"
6+
assignees: ""
77
---
88

99
## Context & versions
10+
1011
<!-- Explain your setup and what versions have been used. -->
1112

1213
## Steps to reproduce
14+
1315
<!--
1416
1. Prepared x
1517
2. Started y
@@ -19,7 +21,9 @@ assignees: ''
1921
-->
2022

2123
## Actual behavior
24+
2225
<!-- A description of the (reproducible) outcome. -->
2326

2427
## Expected behavior
25-
<!-- A description of what you expect to happen instead. -->
28+
29+
<!-- A description of what you expect to happen instead. -->
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
name: Feature idea
33
about: Idea or request for some feature on the Mithril roadmap
4-
title: ''
5-
labels: ':thought_balloon: idea'
6-
assignees: ''
7-
4+
title: ""
5+
labels: ":thought_balloon: idea"
6+
assignees: ""
87
---
98

109
## Why
10+
1111
<!-- Explain why you (or the user) need/want this (e.g. problem, challenge, pain, benefit) -->
1212

1313
## What
14-
<!-- Explain what this is roughly about (e.g. description of a new API endpoint or message format). -->
14+
15+
<!-- Explain what this is roughly about (e.g. description of a new API endpoint or message format). -->

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Content
2+
23
<!-- Explain the reason for this change, if a feature is added, a bug is fixed, ... -->
4+
35
This PR includes...
46

57
## Pre-submit checklist
@@ -21,8 +23,11 @@ This PR includes...
2123
- [ ] Add dev blog post (if relevant)
2224

2325
## Comments
26+
2427
<!-- Some optional comments about the PR, such as how to run a command, or warnings about usage, .... -->
2528

2629
## Issue(s)
30+
2731
<!-- The issue(s) this PR relates to or closes -->
32+
2833
Relates to #YYY or Closes #YYY

.github/workflows/actions/build-upload-mithril-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: '3.x'
24+
python-version: "3.x"
2525

2626
- name: Add commit short sha to Cargo.tomls version
2727
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}

.github/workflows/actions/prepare-distribution/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: prepare-distribution
22
description: |
33
Package, add crates table, sign artifacts
4-
4+
55
The artifacts for all supported environments must have been downloaded
66
in "package-{EnvName}-x64" subfolders before calling this action.
77
inputs:
@@ -88,7 +88,7 @@ runs:
8888
shell: bash
8989
run: |
9090
cat >> ./release-notes-addon.txt << EOF
91-
91+
9292
## Linux Requirements
9393
The Linux binaries target \`glibc\`: to run them or install the \`.deb\` packages you must have \`glibc\` version \`2.31+\` installed.
9494
Compatible systems include, but are not limited to, \`Ubuntu 20.04+\` or \`Debian 11+\` (Bullseye)).
@@ -99,7 +99,7 @@ runs:
9999
shell: bash
100100
run: |
101101
cat >> ./release-notes-addon.txt << EOF
102-
102+
103103
## Fetch the latest version of the \`unstable\` tag
104104
The \`unstable\` tag is updated with a new commit id when a new \`unstable\` release is published.
105105
To fetch the latest version of the unstable tag, execute the command:

.github/workflows/actions/publish-crate-package/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
LOCAL_VERSION=$(cargo metadata --quiet --no-deps | jq -r '.packages[] | select(.name=="${{ inputs.package}}") | .version')
2828
echo "Latest crate.io version: $LATEST_REMOTE_VERSION"
2929
echo "Local version: $LOCAL_VERSION"
30-
30+
3131
if [ "$LOCAL_VERSION" != "$LATEST_REMOTE_VERSION" ]; then
3232
echo "Local version is newer than remote version: we will publish to crates.io"
3333
echo "should_deploy=true" >> $GITHUB_OUTPUT
@@ -47,7 +47,7 @@ runs:
4747
shell: bash
4848
run: |
4949
echo "Cargo publish '${{ inputs.package }}' package (dry run)"
50-
cargo publish -p ${{ inputs.package }} --dry-run --no-verify --allow-dirty ${{ inputs.publish_args }}
50+
cargo publish -p ${{ inputs.package }} --dry-run --no-verify --allow-dirty ${{ inputs.publish_args }}
5151
5252
- name: Cargo package list
5353
shell: bash

.github/workflows/actions/publish-npm-package/action.yml

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -19,103 +19,103 @@ inputs:
1919
description: npm package access.
2020
required: false
2121
default: "public"
22-
api_token:
22+
api_token:
2323
description: npm API token.
2424
required: false
2525

2626
runs:
2727
using: "composite"
2828
steps:
29-
- name: Check npm latest version
30-
id: check_version
31-
shell: bash
32-
run: |
33-
echo "Check crate latest published version for '${{ inputs.package}}' package"
29+
- name: Check npm latest version
30+
id: check_version
31+
shell: bash
32+
run: |
33+
echo "Check crate latest published version for '${{ inputs.package}}' package"
3434
35-
if [ "${{ inputs.tag }}" != "latest" -a "${{ inputs.tag }}" != "next" ]; then
36-
echo "Tag '${{ inputs.tag }}' is not valid. It should be one of 'latest' or 'next'"
37-
exit 1
38-
fi
35+
if [ "${{ inputs.tag }}" != "latest" -a "${{ inputs.tag }}" != "next" ]; then
36+
echo "Tag '${{ inputs.tag }}' is not valid. It should be one of 'latest' or 'next'"
37+
exit 1
38+
fi
3939
40-
LOCAL_VERSION=$(cargo metadata --quiet --no-deps | jq -r '.packages[] | select(.name=="${{ inputs.package}}") | .version')
41-
NEXT_REMOTE_VERSION=$(npm view @${{ inputs.scope }}/${{ inputs.package }} dist-tags.next 2> /dev/null || true)
42-
LATEST_REMOTE_VERSION=$(npm view @${{ inputs.scope }}/${{ inputs.package }} dist-tags.latest 2> /dev/null || true)
40+
LOCAL_VERSION=$(cargo metadata --quiet --no-deps | jq -r '.packages[] | select(.name=="${{ inputs.package}}") | .version')
41+
NEXT_REMOTE_VERSION=$(npm view @${{ inputs.scope }}/${{ inputs.package }} dist-tags.next 2> /dev/null || true)
42+
LATEST_REMOTE_VERSION=$(npm view @${{ inputs.scope }}/${{ inputs.package }} dist-tags.latest 2> /dev/null || true)
4343
44-
echo "Latest crate.io version: '$LATEST_REMOTE_VERSION'"
45-
echo "Next crate.io version: '$NEXT_REMOTE_VERSION'"
46-
echo "Local version: '$LOCAL_VERSION'"
44+
echo "Latest crate.io version: '$LATEST_REMOTE_VERSION'"
45+
echo "Next crate.io version: '$NEXT_REMOTE_VERSION'"
46+
echo "Local version: '$LOCAL_VERSION'"
4747
48-
if [ "${{ inputs.tag }}" == "latest" ]; then
49-
if [ "$LOCAL_VERSION" == "$LATEST_REMOTE_VERSION" ]; then
50-
echo "Local version and remote version are the same: no need to publish to npm registry"
51-
DEPLOY_MODE='none'
52-
elif [ "$LOCAL_VERSION" == "$NEXT_REMOTE_VERSION" ]; then
53-
DEPLOY_MODE='promote'
54-
else
55-
DEPLOY_MODE='publish'
48+
if [ "${{ inputs.tag }}" == "latest" ]; then
49+
if [ "$LOCAL_VERSION" == "$LATEST_REMOTE_VERSION" ]; then
50+
echo "Local version and remote version are the same: no need to publish to npm registry"
51+
DEPLOY_MODE='none'
52+
elif [ "$LOCAL_VERSION" == "$NEXT_REMOTE_VERSION" ]; then
53+
DEPLOY_MODE='promote'
54+
else
55+
DEPLOY_MODE='publish'
56+
fi
57+
else # input.tag == 'next'
58+
if [ "$LOCAL_VERSION" == "$LATEST_REMOTE_VERSION" ]; then
59+
# A latest already published: no need to tag with next
60+
echo "Local version and remote version are the same: no need to publish to npm registry"
61+
DEPLOY_MODE='none'
62+
elif [ "$LOCAL_VERSION" == "$NEXT_REMOTE_VERSION" ]; then
63+
echo "Local version and remote version are the same: no need to publish to npm registry"
64+
DEPLOY_MODE='none'
65+
else
66+
DEPLOY_MODE='publish'
67+
fi
5668
fi
57-
else # input.tag == 'next'
58-
if [ "$LOCAL_VERSION" == "$LATEST_REMOTE_VERSION" ]; then
59-
# A latest already published: no need to tag with next
60-
echo "Local version and remote version are the same: no need to publish to npm registry"
61-
DEPLOY_MODE='none'
62-
elif [ "$LOCAL_VERSION" == "$NEXT_REMOTE_VERSION" ]; then
63-
echo "Local version and remote version are the same: no need to publish to npm registry"
64-
DEPLOY_MODE='none'
65-
else
66-
DEPLOY_MODE='publish'
67-
fi
68-
fi
6969
70-
echo "Deploy mode: '$DEPLOY_MODE'"
71-
echo "Dry run: '${{ inputs.dry_run }}'"
72-
echo "deploy_mode=$DEPLOY_MODE" >> $GITHUB_OUTPUT
73-
echo "package_version=$LOCAL_VERSION" >> $GITHUB_OUTPUT
70+
echo "Deploy mode: '$DEPLOY_MODE'"
71+
echo "Dry run: '${{ inputs.dry_run }}'"
72+
echo "deploy_mode=$DEPLOY_MODE" >> $GITHUB_OUTPUT
73+
echo "package_version=$LOCAL_VERSION" >> $GITHUB_OUTPUT
7474
75-
- name: Build package
76-
shell: bash
77-
run: |
78-
echo "Build '@${{ inputs.scope }}/${{ inputs.package }}' package"
79-
cp ./LICENSE ./mithril-client-wasm/
80-
cp -f ./mithril-client-wasm/npm/README.md ./mithril-client-wasm/
81-
wasm-pack build ${{ inputs.package }} --release --target web --out-dir ./pkg --scope ${{ inputs.scope }} --out-name index
75+
- name: Build package
76+
shell: bash
77+
run: |
78+
echo "Build '@${{ inputs.scope }}/${{ inputs.package }}' package"
79+
cp ./LICENSE ./mithril-client-wasm/
80+
cp -f ./mithril-client-wasm/npm/README.md ./mithril-client-wasm/
81+
wasm-pack build ${{ inputs.package }} --release --target web --out-dir ./pkg --scope ${{ inputs.scope }} --out-name index
8282
83-
- name: List package
84-
shell: bash
85-
run: |
86-
echo "List '@${{ inputs.scope }}/${{ inputs.package }}' package"
87-
ls -al ${{ inputs.package }}/pkg
83+
- name: List package
84+
shell: bash
85+
run: |
86+
echo "List '@${{ inputs.scope }}/${{ inputs.package }}' package"
87+
ls -al ${{ inputs.package }}/pkg
8888
89-
- name: Publish package new version
90-
if: steps.check_version.outputs.deploy_mode == 'publish'
91-
shell: bash
92-
env:
93-
NPM_TOKEN: ${{ inputs.api_token }}
94-
run: |
95-
echo "Publish '@${{ inputs.scope }}/${{ inputs.package }}' package"
96-
npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
97-
if [ -z "${NPM_TOKEN}" -a "${{ inputs.dry_run }}" == "true" ]; then
98-
echo "Warning: An NPM access token is required for authentication and has not been provided."
99-
else
100-
npm whoami
101-
fi
102-
cd ${{ inputs.package }}/pkg
103-
if [ "${{ inputs.dry_run }}" == "false" ]; then
104-
dry_run_option=""
105-
else
106-
dry_run_option="--dry-run"
107-
fi
108-
npm publish --tag ${{ inputs.tag }} --access ${{ inputs.access }} $dry_run_option
89+
- name: Publish package new version
90+
if: steps.check_version.outputs.deploy_mode == 'publish'
91+
shell: bash
92+
env:
93+
NPM_TOKEN: ${{ inputs.api_token }}
94+
run: |
95+
echo "Publish '@${{ inputs.scope }}/${{ inputs.package }}' package"
96+
npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
97+
if [ -z "${NPM_TOKEN}" -a "${{ inputs.dry_run }}" == "true" ]; then
98+
echo "Warning: An NPM access token is required for authentication and has not been provided."
99+
else
100+
npm whoami
101+
fi
102+
cd ${{ inputs.package }}/pkg
103+
if [ "${{ inputs.dry_run }}" == "false" ]; then
104+
dry_run_option=""
105+
else
106+
dry_run_option="--dry-run"
107+
fi
108+
npm publish --tag ${{ inputs.tag }} --access ${{ inputs.access }} $dry_run_option
109109
110-
- name: Promote package distribution tag to 'latest'
111-
if: inputs.dry_run == 'false' && steps.check_version.outputs.deploy_mode == 'promote'
112-
shell: bash
113-
env:
114-
NPM_TOKEN: ${{ inputs.api_token }}
115-
run: |
116-
echo "Publish '@${{ inputs.scope }}/${{ inputs.package }}' package"
117-
npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
118-
npm whoami
119-
cd ${{ inputs.package }}/pkg
120-
npm dist-tag add @${{ inputs.scope }}/${{ inputs.package }}@${{ steps.check_version.outputs.package_version }} latest
121-
npm dist-tag rm @${{ inputs.scope }}/${{ inputs.package }}@${{ steps.check_version.outputs.package_version }} next
110+
- name: Promote package distribution tag to 'latest'
111+
if: inputs.dry_run == 'false' && steps.check_version.outputs.deploy_mode == 'promote'
112+
shell: bash
113+
env:
114+
NPM_TOKEN: ${{ inputs.api_token }}
115+
run: |
116+
echo "Publish '@${{ inputs.scope }}/${{ inputs.package }}' package"
117+
npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
118+
npm whoami
119+
cd ${{ inputs.package }}/pkg
120+
npm dist-tag add @${{ inputs.scope }}/${{ inputs.package }}@${{ steps.check_version.outputs.package_version }} latest
121+
npm dist-tag rm @${{ inputs.scope }}/${{ inputs.package }}@${{ steps.check_version.outputs.package_version }} next

.github/workflows/actions/toolchain-and-cache/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ inputs:
44
cache-version:
55
description: Version of the current cache
66
required: false
7-
default: ''
7+
default: ""
88
cargo-tools:
99
description: Space seperated list of cargo tools to install
1010
required: false
11-
default: ''
11+
default: ""
1212
github-token:
1313
description: GitHub token to use for installing cargo tools
1414
required: true

.github/workflows/aggregator-stress-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
7171
- name: Run the aggregator stress test
7272
run: |
73-
./bin/load-aggregator ${{ steps.prepare.outputs.debug_level }} \
74-
--cardano-cli-path ./mithril-test-lab/mithril-end-to-end/script/mock-cardano-cli \
75-
--aggregator-dir ./bin \
76-
--num-signers=${{ inputs.num_signers }} \
77-
--num-clients=${{ inputs.num_clients }}
73+
./bin/load-aggregator ${{ steps.prepare.outputs.debug_level }} \
74+
--cardano-cli-path ./mithril-test-lab/mithril-end-to-end/script/mock-cardano-cli \
75+
--aggregator-dir ./bin \
76+
--num-signers=${{ inputs.num_signers }} \
77+
--num-clients=${{ inputs.num_clients }}

0 commit comments

Comments
 (0)