Skip to content
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
14 changes: 4 additions & 10 deletions .github/workflows/ci-data-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ on:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
default: 'https://github.com/Officeyutong/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
default: 'use-trait-for-storage-functions'
push:
branches:
- master
Expand All @@ -40,9 +35,8 @@ jobs:
- name: prepare env
id: runtest
env:
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/nervosnetwork/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'develop' }}
RUSQLITE: ${{ github.event.inputs.rusqlite }}
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/Officeyutong/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'use-trait-for-storage-functions' }}
run: |
bash prepare_wasm.sh
npm install --save-dev mocha @types/mocha chai @types/chai
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ci-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ on:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
default: 'https://github.com/Officeyutong/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
default: 'use-trait-for-storage-functions'
push:
branches:
- master
Expand All @@ -28,6 +23,7 @@ jobs:
fail-fast: false
matrix:
net: ['testnet_v1']
rusqlite: [true, false]
runs-on: ubuntu-latest

steps:
Expand All @@ -51,9 +47,9 @@ jobs:
- name: prepare env
id: runtest
env:
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/nervosnetwork/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'develop' }}
RUSQLITE: ${{ github.event.inputs.rusqlite }}
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/Officeyutong/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'use-trait-for-storage-functions' }}
RUSQLITE: ${{ matrix.rusqlite && '1' || '' }}
run: |
npm install --save-dev mocha @types/mocha chai @types/chai
sh prepare.sh
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ on:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
default: 'https://github.com/Officeyutong/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
default: 'use-trait-for-storage-functions'
push:
branches:
- master
Expand All @@ -28,6 +23,7 @@ jobs:
fail-fast: false
matrix:
net: ['testnet_v1']
rusqlite: [true, false]
runs-on: ubuntu-latest

steps:
Expand All @@ -40,9 +36,9 @@ jobs:
- name: prepare env
id: runtest
env:
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/nervosnetwork/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'develop' }}
RUSQLITE: ${{ github.event.inputs.rusqlite }}
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/Officeyutong/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'use-trait-for-storage-functions' }}
RUSQLITE: ${{ matrix.rusqlite && '1' || '' }}
run: |
npm install --save-dev mocha @types/mocha chai @types/chai
sh prepare_dev.sh
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
name: ci

on:
workflow_dispatch:
inputs:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
push:
branches:
- master
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ckb-light-client-ci-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ on:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
default: 'https://github.com/Officeyutong/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
default: 'use-trait-for-storage-functions'

push:
branches:
- master
Expand Down Expand Up @@ -53,9 +49,9 @@ jobs:
- name: prepare env
id: runtest
env:
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/nervosnetwork/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'develop' }}
RUSQLITE: ${{ github.event.inputs.rusqlite }}
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/Officeyutong/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'use-trait-for-storage-functions' }}
RUSQLITE: ${{ matrix.rusqlite && '1' || '' }}
run: |
npm install --save-dev mocha @types/mocha chai @types/chai
bash prepare_wasm.sh
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ckb-light-client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ on:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
default: 'https://github.com/Officeyutong/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
default: 'use-trait-for-storage-functions'
push:
branches:
- master
Expand All @@ -28,6 +23,7 @@ jobs:
fail-fast: false
matrix:
net: ['testnet_v1']
rusqlite: [true, false]
runs-on: ubuntu-latest

steps:
Expand All @@ -51,9 +47,9 @@ jobs:
- name: prepare env
id: runtest
env:
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/nervosnetwork/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'develop' }}
RUSQLITE: ${{ github.event.inputs.rusqlite }}
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/Officeyutong/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'use-trait-for-storage-functions' }}
RUSQLITE: ${{ matrix.rusqlite && '1' || '' }}
run: |
npm install --save-dev mocha @types/mocha chai @types/chai
sh prepare.sh
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ckb-light-client-roll-back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ on:
ckb_light_client_url:
description: 'CKB Light Client Repository URL'
required: false
default: 'https://github.com/nervosnetwork/ckb-light-client.git'
default: 'https://github.com/Officeyutong/ckb-light-client.git'
ckb_light_client_branch:
description: 'CKB Light Client Branch'
required: false
default: 'develop'
rusqlite:
description: 'Enable rusqlite feature'
required: false
default: ''
type: string
default: 'use-trait-for-storage-functions'



Expand All @@ -25,6 +20,7 @@ jobs:
fail-fast: false
matrix:
net: ['testnet_v1']
rusqlite: [true, false]
runs-on: ubuntu-latest

steps:
Expand All @@ -50,9 +46,9 @@ jobs:
- name: test
id: runtest
env:
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/nervosnetwork/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'develop' }}
RUSQLITE: ${{ github.event.inputs.rusqlite }}
CKB_LIGHT_CLIENT_URL: ${{ github.event.inputs.ckb_light_client_url || 'https://github.com/Officeyutong/ckb-light-client.git' }}
CKB_LIGHT_CLIENT_BRANCH: ${{ github.event.inputs.ckb_light_client_branch || 'use-trait-for-storage-functions' }}
RUSQLITE: ${{ matrix.rusqlite && '1' || '' }}
run: |
npm install --save-dev mocha @types/mocha chai @types/chai
sh prepare.sh
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "ckb-light-wasm-demo"]
path = ckb-light-wasm-demo
url = https://github.com/gpBlockchain/ckb-light-wasm-demo.git
branch = main
2 changes: 1 addition & 1 deletion prepare_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ git clone https://github.com/gpBlockchain/startBlockchain.git
cd startBlockchain
cd ckbDevWithIndexAndLightClient
sh prepare.sh
sh start.sh
sh start.sh
2 changes: 1 addition & 1 deletion prepare_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ git submodule update
cd ckb-light-client
git log -1
cd ../
bash build.sh
bash build.sh
2 changes: 1 addition & 1 deletion service/CkbDevService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function cleanCkbLightClientEnv() {
}

export async function stopCkbLightClient() {
await shWithTimeOutNotErr("pkill ckb-light-client",1000)
await shWithTimeOutNotErr("pkill ckb-light",1000)
}

export async function startCkbLightClient() {
Expand Down
3 changes: 2 additions & 1 deletion test/dev/ckbLightClientCut.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ describe('rollback', function () {
it("transfer roll back ", async () => {
// await miner_block_until_number(1100)
await cleanAndRestartCkbLightClientEnv()
// await initLightClient()
await Sleep(3000);
await initLightClient()
await miner_block()
for (let i = 0; i < 2; i++) {
await transfer_cut_and_wait_light_sync(80)
Expand Down
Loading