Skip to content

Commit 0fb148d

Browse files
authored
gp/update-fee-rate-checker (#15)
* gp/update-fee-rate-checker * add ci * update dev test * update ckb-light-client version * fix tx commit * fix ci * Update README.md * update light version
1 parent 34d472e commit 0fb148d

21 files changed

+548
-85
lines changed

.github/workflows/ci-client-cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: yarn-cache-dir-path
2525
run: echo "::set-output name=dir::$(yarn cache dir)"
2626
- name: Node Cache
27-
uses: actions/cache@v2
27+
uses: actions/cache@v4
2828
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2929
with:
3030
path: |
@@ -45,7 +45,7 @@ jobs:
4545
4646
- name: Publish reports
4747
if: failure()
48-
uses: actions/upload-artifact@v2
48+
uses: actions/upload-artifact@v4
4949
with:
5050
name: jfoa-build-reports-${{ runner.os }}
5151
path: mochawesome-report/

.github/workflows/ci-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: yarn-cache-dir-path
2525
run: echo "::set-output name=dir::$(yarn cache dir)"
2626
- name: Node Cache
27-
uses: actions/cache@v2
27+
uses: actions/cache@v4
2828
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2929
with:
3030
path: |

.github/workflows/ci-dev.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: ci-dev
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
10+
jobs:
11+
npm-install-1:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
net: ['testnet_v1']
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
submodules: recursive
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: '16'
25+
- name: prepare env
26+
id: runtest
27+
run: |
28+
npm install --save-dev mocha @types/mocha chai @types/chai
29+
sh prepare_dev.sh
30+
- name: run test
31+
id: ci-test
32+
run: |
33+
npm run test-dev
34+
35+
- name: Publish reports
36+
if: failure()
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: jfoa-build-reports-${{ runner.os }}
40+
path: mochawesome-report/

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
id: yarn-cache-dir-path
2626
run: echo "::set-output name=dir::$(yarn cache dir)"
2727
- name: Node Cache
28-
uses: actions/cache@v2
28+
uses: actions/cache@v4
2929
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3030
with:
3131
path: |

.github/workflows/ckb-index-panic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: yarn-cache-dir-path
2525
run: echo "::set-output name=dir::$(yarn cache dir)"
2626
- name: Node Cache
27-
uses: actions/cache@v2
27+
uses: actions/cache@v4
2828
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2929
with:
3030
path: |
@@ -45,7 +45,7 @@ jobs:
4545
npm run test-index-panic
4646
- name: Publish reports
4747
if: failure()
48-
uses: actions/upload-artifact@v2
48+
uses: actions/upload-artifact@v4
4949
with:
5050
name: jfoa-build-reports-${{ runner.os }}
5151
path: mochawesome-report/

.github/workflows/ckb-light-client-roll-back.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: yarn-cache-dir-path
2525
run: echo "::set-output name=dir::$(yarn cache dir)"
2626
- name: Node Cache
27-
uses: actions/cache@v2
27+
uses: actions/cache@v4
2828
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2929
with:
3030
path: |
@@ -45,7 +45,7 @@ jobs:
4545
npm run test-roll-back
4646
- name: Publish reports
4747
if: failure()
48-
uses: actions/upload-artifact@v2
48+
uses: actions/upload-artifact@v4
4949
with:
5050
name: jfoa-build-reports-${{ runner.os }}
5151
path: mochawesome-report/

.github/workflows/miner-load.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id: yarn-cache-dir-path
2222
run: echo "::set-output name=dir::$(yarn cache dir)"
2323
- name: Node Cache
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2626
with:
2727
path: |
@@ -42,7 +42,7 @@ jobs:
4242
4343
- name: Publish reports
4444
if: failure()
45-
uses: actions/upload-artifact@v2
45+
uses: actions/upload-artifact@v4
4646
with:
4747
name: jfoa-build-reports-${{ runner.os }}
4848
path: mochawesome-report/

config/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {config, helpers, Indexer, RPC} from "@ckb-lumos/lumos";
22
import {LightClient} from "../service/node";
33
import {LightClientCli} from "../service/light-cli";
44
import {LightClientRPC} from "@ckb-lumos/light-client";
5+
import {CkbIndexer} from "@ckb-lumos/ckb-indexer/lib/indexer";
56

67
const CKB_CLIENT_CLI_PATH = "tmp/ckb-cli-light-client"
78
const CKB_LIGHT_CLIENT_PATH = "tmp/startBlockchain/ckbLightClient/ckb-light-client"
@@ -11,7 +12,7 @@ const CKB_DEV_INDEX_PATH = "tmp/startBlockchain/ckbDevWithIndexAndLightClient/ck
1112
const CKB_DEV_LIGHT_CLIENT_PATH = "tmp/startBlockchain/ckbDevWithIndexAndLightClient/ckb-light-client/target/release"
1213

1314
const CKB_DEV_RPC_URL = "http://localhost:8114/";
14-
const CKB_DEV_RPC_INDEX_URL = "http://localhost:8116/";
15+
const CKB_DEV_RPC_INDEX_URL = "http://localhost:8114/";
1516

1617
const RPC_DEBUG = true
1718
const CKB_RPC_URL = "https://testnet.ckbapp.dev/";
@@ -46,6 +47,9 @@ const newFullAddr = helpers.encodeToAddress(script);
4647
const rpcCLient = new RPC(CKB_RPC_URL);
4748
const rpcDevCLient = new RPC(CKB_DEV_RPC_URL);
4849

50+
export const rpcDevIndexClient = new CkbIndexer(CKB_DEV_RPC_URL,CKB_DEV_RPC_URL);
51+
52+
4953
const {AGGRON4} = config.predefined;
5054
const RPC_NETWORK = AGGRON4;
5155
const ACCOUNT_PRIVATE = "0xdd50cac37ec6dd12539a968c1a2cbedda75bd8724f7bcad486548eaabb87fc8b"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"scripts": {
4242
"test-wasm": "USE_LIGHT_CLIENT_WASM=true mocha --config test/runners/mocha/.mocharc.jsonc --reporter mochawesome",
4343
"test": "mocha --config test/runners/mocha/.mocharc.jsonc --reporter mochawesome",
44+
"test-dev": "mocha --config test/runners/mocha/.mocharc.dev.jsonc --reporter mochawesome",
4445
"test-load": "mocha --config test/runners/mocha/.mocharc.load.jsonc --reporter mochawesome",
4546
"test-data": "mocha --config test/runners/mocha/.mocharc.data.jsonc --reporter mochawesome",
4647
"test-data-wasm": "USE_LIGHT_CLIENT_WASM=true mocha mocha --config test/runners/mocha/.mocharc.data.jsonc --reporter mochawesome",

0 commit comments

Comments
 (0)