Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: unify workspace code style #1622

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changelog/v0.2.0-beta.2/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

If you don't change this message, or if this file is empty, the release
will not be created. -->

This release contains some important bugfixes from the previous 0.2.0-beta.1 version.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/help.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ body:
value: "Describe the problem details:"
validations:
required: true

2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/others.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ body:
value: "Describe the problem details:"
validations:
required: true


2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ See also:
### **CI Description**

| CI Name | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------- |
|------------------------|---------------------------------------------------------------------------------------------------------|
| *Web3 Compatible Test* | Test the Web3 compatibility of Axon |
| *v3 Core Test* | Run the compatibility tests provided by Uniswap V3 |
| *OpenZeppelin tests* | Run the compatibility tests provided by OpenZeppelin, including OCT 1-5 \| 6-10 \| 11 \| 12-15 \| 16-19 |
Expand Down
38 changes: 25 additions & 13 deletions .github/config/_labeler.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,50 @@
underlying:
- any: ['core/consensus/src/*', 'core/mempool/src/*', 'core/executor/src/*', 'core/network/src/*', 'core/storage/src/*']
- any:
[
"core/consensus/src/*",
"core/mempool/src/*",
"core/executor/src/*",
"core/network/src/*",
"core/storage/src/*",
]

API:
- core/api/src/*
- core/api/src/*

interoperation:
- core/interoperation/src/*
- core/interoperation/src/*

crosschain:
- any: ['core/cross-client/src/*', 'core/tx-assembler/src/*']
- any: ["core/cross-client/src/*", "core/tx-assembler/src/*"]

devtools:
- devtools/*
- devtools/*

documents:
- any: ['docs/*', README.md, CHANGELOG.md]
- any: ["docs/*", README.md, CHANGELOG.md]

e2e:
- tests/e2e/src/*
- tests/e2e/src/*

contract:
- builtin-contract/*
- builtin-contract/*

protocol:
- protocol/src/*
- protocol/src/*

toolchain:
- rust-toolchain
- rust-toolchain

ci:
- any: ['.github/actions/*', '.github/workflows/*']
- any: [".github/actions/*", ".github/workflows/*"]

apm:
- any: ['common/apm/src/*', 'common/apm-derive/src/*', 'common/memory-tracker/src/*']
- any:
[
"common/apm/src/*",
"common/apm-derive/src/*",
"common/memory-tracker/src/*",
]

config:
- any: ['common/config-parser/src/*']
- any: ["common/config-parser/src/*"]
52 changes: 26 additions & 26 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name-template: 'v$RESOLVED_VERSION-alpha.1'
tag-template: 'v$RESOLVED_VERSION-alpha.1'
name-template: "v$RESOLVED_VERSION-alpha.1"
tag-template: "v$RESOLVED_VERSION-alpha.1"
template: |
# What's Changed

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: '🚀 Features'
label: 'feature'
- title: '🔥 Enhancement'
label: 'enhancement'
- title: '🐛 Bug Fixes'
label: 'bugfix'
- title: '🐝 refactor'
label: 'refactor'
- title: '🧰 Chore'
label: 'chore'
- title: '📖 Documentation'
label: 'document'
- title: '✨ Other changes'
- title: '⬆️ Dependency Updates'
label: 'dependencies'
- title: '🌈 Style'
label: 'style'
- title: "🚀 Features"
label: "feature"
- title: "🔥 Enhancement"
label: "enhancement"
- title: "🐛 Bug Fixes"
label: "bugfix"
- title: "🐝 refactor"
label: "refactor"
- title: "🧰 Chore"
label: "chore"
- title: "📖 Documentation"
label: "document"
- title: "✨ Other changes"
- title: "⬆️ Dependency Updates"
label: "dependencies"
- title: "🌈 Style"
label: "style"

version-resolver:
minor:
labels:
- 'feature'
- "feature"
patch:
labels:
- 'bug'
- 'maintenance'
- 'docs'
- 'dependencies'
- 'security'
- "bug"
- "maintenance"
- "docs"
- "dependencies"
- "security"

exclude-labels:
- 'skip-changelog'
- "skip-changelog"
196 changes: 98 additions & 98 deletions .github/workflows/axon-start-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,54 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Cache of Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Cache of Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build

- name: Start a single Axon node
env:
LOG_FILE: ${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log
run: |
target/debug/axon --version | tee ${{ env.LOG_FILE }}
target/debug/axon init \
--config devtools/chain/config.toml \
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
| tee -a ${{ env.LOG_FILE }}
target/debug/axon run \
--config devtools/chain/config.toml \
| tee -a ${{ env.LOG_FILE }} &
- name: Start a single Axon node
env:
LOG_FILE: ${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log
run: |
target/debug/axon --version | tee ${{ env.LOG_FILE }}
target/debug/axon init \
--config devtools/chain/config.toml \
--chain-spec devtools/chain/specs/single_node/chain-spec.toml \
| tee -a ${{ env.LOG_FILE }}
target/debug/axon run \
--config devtools/chain/config.toml \
| tee -a ${{ env.LOG_FILE }} &

npx zx <<'EOF'
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js'
await retry(3, '6s', () => waitXBlocksPassed('http://127.0.0.1:8000', 2))
EOF
timeout-minutes: 1
npx zx <<'EOF'
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js'
await retry(3, '6s', () => waitXBlocksPassed('http://127.0.0.1:8000', 2))
EOF
timeout-minutes: 1

- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: single-axon-node-logs
path: |
${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log
- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: single-axon-node-logs
path: |
${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log

multi-nodes:
strategy:
Expand All @@ -75,64 +75,64 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Cache of Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Cache of Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build

- name: Start multiple Axon nodes
env:
LOG_PATH: ${{ runner.temp }}/${{ matrix.os }}/multi-axon-nodes
run: |
mkdir -p ${{ env.LOG_PATH }}
- name: Start multiple Axon nodes
env:
LOG_PATH: ${{ runner.temp }}/${{ matrix.os }}/multi-axon-nodes
run: |
mkdir -p ${{ env.LOG_PATH }}

target/debug/axon --version
target/debug/axon --version

for id in 1 2 3 4; do
target/debug/axon init \
--config devtools/chain/nodes/node_${id}.toml \
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
> ${{ env.LOG_PATH }}/node_${id}.log
done
for id in 1 2 3 4; do
target/debug/axon init \
--config devtools/chain/nodes/node_${id}.toml \
--chain-spec devtools/chain/specs/multi_nodes_short_epoch_len/chain-spec.toml \
> ${{ env.LOG_PATH }}/node_${id}.log
done

for id in 1 2 3 4; do
target/debug/axon run \
--config devtools/chain/nodes/node_${id}.toml \
>> ${{ env.LOG_PATH }}/node_${id}.log &
done
for id in 1 2 3 4; do
target/debug/axon run \
--config devtools/chain/nodes/node_${id}.toml \
>> ${{ env.LOG_PATH }}/node_${id}.log &
done

npx zx <<'EOF'
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js'
await retry(3, '6s', () => Promise.all([
waitXBlocksPassed('http://127.0.0.1:8001', 4),
waitXBlocksPassed('http://127.0.0.1:8002', 4),
waitXBlocksPassed('http://127.0.0.1:8003', 4),
waitXBlocksPassed('http://127.0.0.1:8004', 4),
]))
EOF
timeout-minutes: 1
npx zx <<'EOF'
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js'
await retry(3, '6s', () => Promise.all([
waitXBlocksPassed('http://127.0.0.1:8001', 4),
waitXBlocksPassed('http://127.0.0.1:8002', 4),
waitXBlocksPassed('http://127.0.0.1:8003', 4),
waitXBlocksPassed('http://127.0.0.1:8004', 4),
]))
EOF
timeout-minutes: 1

- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: multi-axon-nodes-logs
path: |
${{ runner.temp }}/${{ matrix.os }}/multi-axon-nodes/
- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: multi-axon-nodes-logs
path: |
${{ runner.temp }}/${{ matrix.os }}/multi-axon-nodes/
Loading
Loading