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

Sync main to forcerelay-test branch #1617

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
eea7af5
chore(deps): bump actions/setup-node from 3 to 4 (#1494)
dependabot[bot] Oct 24, 2023
9a0bdbd
refactor: more details for JSON RPC errors (#1495)
yangby-cryptape Oct 24, 2023
363b49f
chore(CI): build a portable binary in CI for different CPU architectu…
Flouse Oct 27, 2023
6494d69
chore(CI): Remove the duplicated `Smoking test` job (#1510)
Flouse Oct 27, 2023
6303cb9
chore: DO NOT change a tag on a remote repository (#1512)
Flouse Oct 27, 2023
2774ef8
ci: adjust CI after migrating the test projects (#1513)
sunchengzhu Oct 29, 2023
f9974e6
chore(deps): bump Namchee/conventional-pr from 0.14.1 to 0.15.1 (#1515)
dependabot[bot] Oct 30, 2023
166506f
refactor: remove the limitation of set ckb related info (#1517)
Oct 30, 2023
552b328
chore: make blst portable (#1520)
blckngm Nov 2, 2023
68aa8a9
feat: move axon-tools to axon (#1519)
wenyuanhust Nov 2, 2023
ad4375b
chore: remove empty crates (#1521)
yangby-cryptape Nov 2, 2023
2a88c0c
fix(docker-compose): `bash` not found in the blockscan container (#1527)
Flouse Nov 6, 2023
dfee005
refactor: enhance readability of output logs and errors (#1528)
yangby-cryptape Nov 7, 2023
b514a1d
fix: value of gas in JSON RPC Transaction should be gas limit (#1530)
yangby-cryptape Nov 7, 2023
64f07fb
chore: change default cache size config (#1531)
driftluo Nov 7, 2023
37cddb7
feat: add no-std version of axon-tools (#1532)
wenyuanhust Nov 8, 2023
fdb80b6
ci: specify commits of tests (#1536)
yangby-cryptape Nov 9, 2023
cdc2944
chore(deps): bump mikefarah/yq from 4.35.2 to 4.40.1 (#1535)
dependabot[bot] Nov 9, 2023
6cf0365
chore(CI): refactor `v3_core_test` workflow (#1541)
Flouse Nov 13, 2023
e310f38
feat: add `eth_getProof` JSON RPC API (#1540)
driftluo Nov 13, 2023
755faca
refactor: refactor fn is_hardfork_enabled (#1538)
driftluo Nov 13, 2023
9ad502d
chore(CI): add a retry mechanism for Axon node's health_check (#1542)
Flouse Nov 13, 2023
083b496
fix: check mempool when call `eth_getTransactionByHash`
yangby-cryptape Nov 6, 2023
4c3be3d
fix: block `eth_sendRawTransaction` to fix `eth_getTransactionCount(.…
yangby-cryptape Nov 13, 2023
cfd291b
chore: use a same default value for `max_payload_size` (#1548)
yangby-cryptape Nov 13, 2023
0fb4d7f
docs: add `eth_getProof` API doc (#1549)
driftluo Nov 13, 2023
f0fc4be
chore(CI): refactor openzeppelin-tests (#1543)
Flouse Nov 14, 2023
5c7cac1
chore(deps): bump actions/github-script from 6 to 7 (#1552)
dependabot[bot] Nov 14, 2023
7920672
config(blockscan): update the env variables of Axon's explorer (#1550)
Flouse Nov 14, 2023
a22b709
refactor: remove duplicated code to protect :eye::eye: of developers …
yangby-cryptape Nov 14, 2023
684610f
chore(CI): update axon-hardfork-test version (#1557)
sunchengzhu Nov 14, 2023
ea9ae7e
feat: add `ckb_blake2b` precompile contract (#1555)
Nov 14, 2023
077096a
fix: rlp decode of `SignedTransaction` with interoperation signature
Nov 7, 2023
c91a6af
refactor: remove the verify by ckb vm verification
Nov 9, 2023
835cb16
fix: rlp decode of `SignedTransction` with interoperation signature (…
Flouse Nov 15, 2023
9eb05dc
fix: get genesis block proposal may panic (#1554)
Nov 15, 2023
c837c81
ci: run unit tests in separate processes (#1559)
yangby-cryptape Nov 15, 2023
79be7c1
chore: update CkbType.sol for consistent ABI output with json file (#…
sunchengzhu Nov 15, 2023
0828794
chore(CI): update axon-hardfork-test version 2nd (#1562)
sunchengzhu Nov 15, 2023
3dbfe5a
chore: axon-tools use ckb-blst for riscv64 (#1563)
blckngm Nov 16, 2023
41133c0
fix: remove extra hash account.storage_root in fn get_proof (#1564)
driftluo Nov 16, 2023
110bb16
chore(CI): update axon-hardfork-test version 3rd (#1566)
sunchengzhu Nov 16, 2023
06340ba
style(axon-tools): rename some structs and change code style (#1545)
wenyuanhust Nov 17, 2023
d7e50cc
fix: fix typo in get_proof impl (#1571)
blckngm Nov 17, 2023
386fa3a
chore(CI): improve the stability of `e2e_test` workflow (#1572)
Flouse Nov 17, 2023
988161e
chore: update ImageCell.sol for consistent ABI output with json file …
sunchengzhu Nov 18, 2023
6b85b0f
chore(deps): bump mikefarah/yq from 4.40.1 to 4.40.2 (#1575)
dependabot[bot] Nov 20, 2023
7610890
chore(CI): set v3_core_test timeout minutes (#1577)
sunchengzhu Nov 20, 2023
f692b86
feat: support stop at specific height (#1581)
jjyr Nov 21, 2023
6a574cd
chore: make some structs to be public (#1582)
yangby-cryptape Nov 22, 2023
264a676
fix(executor)!: set_ckb_related_info transaction is not committed (#1…
wenyuanhust Nov 23, 2023
8ccbbbb
chore(deps): bump mikefarah/yq from 4.40.2 to 4.40.3 (#1594)
dependabot[bot] Nov 24, 2023
6ab0ae9
fix(ci): Intermittent failures in eth_getCode_9 (#1593)
sunchengzhu Nov 24, 2023
527ccdf
BREAKING CHANGE: fix the implementation of Axon Tries (#1580)
driftluo Nov 27, 2023
adceffa
fix: field `chainId` should be acceptable for `eth_estimateGas` (#1601)
yangby-cryptape Nov 28, 2023
3302eb3
chore(CI): remove call `eth_estimateGas` to metadata contract (#1602)
sunchengzhu Nov 28, 2023
9f609f7
chore(CI): set v3_core_test timeout minutes 2nd (#1598)
sunchengzhu Nov 28, 2023
0457119
refactor!: call reserved system contract address is forbidden (#1597)
Nov 28, 2023
0375d87
fix: enable estimation mode for query apis (#1603)
yangby-cryptape Nov 29, 2023
36d941e
fix: get pending tx count by number (#1605)
driftluo Nov 29, 2023
81a5ecb
chore(CI): add missing `build axon` step in e2e-test (#1606)
Flouse Nov 29, 2023
1092ca0
fix: duplicated calculation in `eth_estimateGas` (#1599)
yangby-cryptape Nov 30, 2023
6667c5d
ci: refactor OpenZeppelin tests and entry_workflow.yml (#1610)
Flouse Dec 1, 2023
e6082f5
feat: add ckb mbt proof verify precompile contract (#1578)
Dec 1, 2023
5ddf1e6
fix: rpc method `eth_call` shouldn't set `estimate = true` (#1609)
yangby-cryptape Dec 1, 2023
c3bec49
chore(CI): update openzeppelin-contracts version (#1611)
sunchengzhu Dec 1, 2023
bd7f55c
feat(axon-tools): add precompile payload codec (#1607)
Dec 1, 2023
e6eee4a
chore(CI): update axon-test version in web3_compatible.yml (#1612)
sunchengzhu Dec 1, 2023
c92fbf3
fix(axon-tools): cargo clippy --all-features errors (#1614)
Dec 3, 2023
05a124d
chore(CI): update axon-test version 2nd (#1613)
sunchengzhu Dec 3, 2023
b90612d
refactor!: change many `U256` type to `U64` (#1591)
Dec 4, 2023
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
23 changes: 6 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,14 @@ See also:
**CI Switch**

- [ ] Web3 Compatible Tests
- [ ] OCT 1-5 And 12-15
- [ ] OCT 6-10
- [ ] OCT 11
- [ ] OCT 16-19
- [ ] OpenZeppelin tests
- [ ] v3 Core Tests

### **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 |
| *OCT 1-5 \| 6-10 \| 11 \| 12-15 \| 16-19* | Run the compatibility tests provided by OpenZeppelin |

<!--
#### Deprecated CIs
- [ ] Chaos CI
| *Chaos CI* | Test the liveness and robustness of Axon under terrible network condition |
- [ ] Coverage Test
| *Coverage Test* | Get the unit test coverage report |
-->
| 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 |
</details>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
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:
Expand All @@ -47,11 +52,9 @@ jobs:
--config devtools/chain/config.toml \
| tee -a ${{ env.LOG_FILE }} &

sleep 10

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

Expand Down Expand Up @@ -87,7 +90,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
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:
Expand All @@ -112,12 +120,12 @@ jobs:

npx zx <<'EOF'
import { waitXBlocksPassed } from './devtools/ci/scripts/helper.js'
await Promise.all([
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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_image_ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Modify the Axon image of in devtools/chain/docker-compose.yml
env:
AXON_IMAGE: "${{ needs.build-amd64-image-to-ghcr.outputs.image_name }}:${{ needs.build-amd64-image-to-ghcr.outputs.image_tag }}"
uses: mikefarah/yq@v4.35.2
uses: mikefarah/yq@v4.40.3
with:
cmd: yq -i '.services.axon.image = "${{ env.AXON_IMAGE }}"' 'devtools/chain/docker-compose.yml'

Expand All @@ -122,6 +122,6 @@ jobs:

npx zx <<'EOF'
import { waitXBlocksPassed } from '../ci/scripts/helper.js'
await waitXBlocksPassed('http://127.0.0.1:8000', 2);
await retry(3, '6s', () => waitXBlocksPassed('http://127.0.0.1:8000', 2))
EOF
timeout-minutes: 2
4 changes: 2 additions & 2 deletions .github/workflows/chaos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Event is dispatch
if: contains(github.event_name, 'workflow_dispatch') &&
github.repository_owner == 'axonweb3' && github.event.inputs.dispatch != 'regression'
uses: actions/github-script@v6
uses: actions/github-script@v7
id: get_sha
with:
github-token: ${{ steps.generate_axon_bot_token.outputs.BOT_TOKEN }}
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
private_key: ${{ secrets.AXON_BOT_PRIVATE_KEY }}
- if: contains(join(needs.*.result, ';'), 'failure') || contains(join(needs.*.result, ';'), 'cancelled')
run: exit 1
- uses: actions/github-script@v6
- uses: actions/github-script@v7
if: ${{ always() }}
with:
github-token: ${{ steps.generate_axon_bot_token.outputs.BOT_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/copy_config_to_devops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: axonweb3/axon-devops
ref: 32e274a1f14c065fe63d37f006ac1a3c4f70654f
path: ${{ github.workspace}}/axon-devops
- name: apply config toml config_toml.patch
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Event is dispatch
if: contains(github.event_name, 'workflow_dispatch') &&
github.repository_owner == 'axonweb3'
uses: actions/github-script@v6
uses: actions/github-script@v7
id: get_sha
with:
github-token: ${{ steps.generate_axon_bot_token.outputs.BOT_TOKEN }}
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
private_key: ${{ secrets.AXON_BOT_PRIVATE_KEY }}
- if: contains(join(needs.*.result, ';'), 'failure') || contains(join(needs.*.result, ';'), 'cancelled')
run: exit 1
- uses: actions/github-script@v6
- uses: actions/github-script@v7
if: ${{ always() }}
with:
github-token: ${{ steps.generate_axon_bot_token.outputs.BOT_TOKEN }}
Expand Down
49 changes: 40 additions & 9 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
pull_request:
merge_group:
workflow_dispatch:

# Ensure that only a single job or workflow using the same concurrency group will run at a time.
# see https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
Expand Down Expand Up @@ -38,16 +39,35 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build

- uses: lyricwulf/abc@v1
with:
# https://www.gnu.org/software/m4/
linux: m4
- name: Build Axon in the development profile
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
lscpu
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 }} &

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

# TODO: use Node.js 18
- name: Use Node.js 16
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: 16
- name: Get yarn cache directory
id: yarn-cache-dir
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
Expand All @@ -67,6 +87,17 @@ jobs:
${{ runner.os }}-node_modules-

- name: E2E Tests Linting in tests/e2e
run: make e2e-test-lint
working-directory: tests/e2e
run: yarn && yarn lint

- name: Serve files in tests/e2e/src by http-server
working-directory: tests/e2e
run: echo '\n' | yarn http-server

- name: E2E Tests in tests/e2e
run: make e2e-test-ci
working-directory: tests/e2e
run: |
npx zx <<'EOF'
await retry(3, expBackoff(), () => $`HEADLESS=new yarn test`)
EOF
timeout-minutes: 6
142 changes: 37 additions & 105 deletions .github/workflows/entry_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Dispatch CIs if the user does have correct permission
if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission)
id: dispatch
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const dispatch = {
Expand All @@ -48,124 +48,56 @@ jobs:
.replace(/\\t/g, "\\\\t");

// get pr comments body,not issue comments body
const pr =
await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});

let check_list=`
let check_list = `
\### CI test list:
`;

// check Coverage Test exist or not
const coverage_match = pr.data.body.includes("[x] Coverage Test");
if (coverage_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "coverage.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
const dispatchWorkflow = async (workflowId) => {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: workflowId,
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});

core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - Coverage Test`;
}
check_list = `${check_list}\n - ${workflowId}`;
};

// check OCT 1-5 And 12-15 exist or not
const OCT_match = pr.data.body.includes("[x] OCT 1-5 And 12-15");
// check if OpenZeppelin tests is required
const OCT_match = pr.data.body.includes("[x] OpenZeppelin tests");
if (OCT_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "openzeppelin_test_1_5_and_12_15.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});
core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - OCT 1-5 And 12-15`;
}
// check OCT 6-10 exist or not
const OCT_6_match = pr.data.body.includes("[x] OCT 6-10");
if (OCT_6_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "openzeppelin_test_6_10.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});
core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - OCT 6-10`;
}
// check OCT 11 exist or not
const OCT_11_match = pr.data.body.includes("[x] OCT 11");
if (OCT_11_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "openzeppelin_test_11.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});
core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - OCT 11`;
}
// check OCT 16-19 exist or not
const OCT_16_match = pr.data.body.includes("[x] OCT 16-19");
if (OCT_16_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "openzeppelin_test_16_19.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});
core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - OCT 16-19`;
}
const workflowIds = [
"openzeppelin_test_1_5_and_12_15.yml",
"openzeppelin_test_6_10.yml",
"openzeppelin_test_11.yml",
"openzeppelin_test_16_19.yml",
];
await Promise.all(workflowIds.map(dispatchWorkflow));
}

// check v3 Core Tests exist or not
const v3_match = pr.data.body.includes("[x] v3 Core Tests");
if (v3_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "v3_core_test.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});
core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - v3 Core Tests`;
}
await dispatchWorkflow("v3_core_test.yml");
}

// check Unit Tests exist or not
const web3_match = pr.data.body.includes("[x] Web3 Compatible Tests");
if (web3_match) {
const resp = await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "web3_compatible.yml",
ref: `main`,
inputs: {
dispatch: jsonDispatch,
}
});
core.info(`${JSON.stringify(resp, null, 2)}`);
check_list=`${check_list}\n - Web3 Compatible Tests`;
};
return check_list
await dispatchWorkflow("web3_compatible.yml");
};

return check_list

- name: Escape check list
id: escape_multiple_lines_test_inputs
Expand All @@ -179,7 +111,7 @@ jobs:
- name: Post a coment about component information to PR
if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission)
id: post_workflow_run_comment
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
console.log(`${{ steps.escape_multiple_lines_test_inputs.outputs.result }}`);
Expand Down
Loading