Skip to content

Gp/fiber 050 #88

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

Open
wants to merge 64 commits into
base: fiber
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
597c1fe
add fiber
gpBlockchain Jan 10, 2025
4205f07
format code
gpBlockchain Jan 10, 2025
d1098f2
update prepare
gpBlockchain Jan 10, 2025
051339a
update make file
gpBlockchain Jan 10, 2025
a49866b
update test
gpBlockchain Jan 10, 2025
20ad065
support develop
gpBlockchain Jan 13, 2025
b509445
fix build failed
gpBlockchain Jan 13, 2025
4454eb8
add compatibility test
gpBlockchain Jan 13, 2025
5f00e14
format p2p test
gpBlockchain Jan 13, 2025
062e53d
update fiber
gpBlockchain Jan 13, 2025
206abc1
fix get_tx is unknow
gpBlockchain Jan 13, 2025
3edd5b5
format code
gpBlockchain Jan 13, 2025
c29a5d9
update 0.3.0
gpBlockchain Jan 16, 2025
1ecfdc1
update fiber test case
gpBlockchain Jan 21, 2025
c068e82
update fiber
gpBlockchain Jan 21, 2025
8924189
add watch tower test
gpBlockchain Feb 5, 2025
e9fc1de
update accept channel
gpBlockchain Feb 5, 2025
261b70e
update test case
gpBlockchain Feb 6, 2025
6c1617b
update make file
gpBlockchain Feb 6, 2025
09dae93
update test
gpBlockchain Feb 7, 2025
47bc255
fix format
gpBlockchain Feb 7, 2025
e0807c0
fix ci
gpBlockchain Feb 8, 2025
c2aa79c
add rpc
gpBlockchain Feb 8, 2025
643ad81
update test_graph_nodes.py
gpBlockchain Feb 8, 2025
07566fa
update basic fiber
gpBlockchain Feb 9, 2025
7c76291
update v0.4.0
gpBlockchain Feb 28, 2025
b2e8c3e
Merge branch 'fiber' into gp/testnet-fiber
gpBlockchain Feb 28, 2025
5222354
fix ci failed
gpBlockchain Mar 3, 2025
38589e8
remove skip 363
gpBlockchain Mar 3, 2025
6c34487
update testnet ci
gpBlockchain Mar 3, 2025
0df23c6
update testnet rpc
gpBlockchain Mar 5, 2025
3658eff
0.4.1
gpBlockchain Mar 20, 2025
abe1129
update testnet fiber
gpBlockchain Mar 20, 2025
28d6c7b
fix testnet
gpBlockchain Mar 20, 2025
ca57e50
format code
gpBlockchain Mar 20, 2025
fe2bb2e
add abandon channel
gpBlockchain Mar 26, 2025
8a00acb
fix ci failed
gpBlockchain Mar 27, 2025
ae76b01
add hophint case
15168316096 Mar 27, 2025
0fb8d8c
Merge branch 'gp/testnet-fiber' of github.com:cryptape/ckb-py-integra…
15168316096 Mar 27, 2025
ad58c9c
format
15168316096 Mar 27, 2025
b941f58
add b-c-d,d-a private no use hint
15168316096 Mar 27, 2025
38e2bb7
add assert for route a-b
15168316096 Mar 27, 2025
ce78c3c
add assert for route a-b
15168316096 Mar 27, 2025
8eb5baa
add desc
15168316096 Mar 27, 2025
4343cb2
update rpc
gpBlockchain Mar 28, 2025
509cca3
add build_router and send_payment_with_router rpc
15168316096 Apr 9, 2025
5ebd1cf
add build_router and send_payment_with_router rpc
15168316096 Apr 9, 2025
c7713da
add assert for payment status build_router and send_payment_with_rout…
15168316096 Apr 9, 2025
597485b
del annotation for debug
15168316096 Apr 9, 2025
df8bab5
modify node call
15168316096 Apr 9, 2025
7c9fb4d
Use the correct tar.gz name for arm64
sunchengzhu Apr 9, 2025
899eb9c
add Assert and fix issue
15168316096 Apr 9, 2025
cf37701
format code
15168316096 Apr 9, 2025
550dbfd
update test_loop_send_payment_with_router case
15168316096 Apr 9, 2025
8a4c42f
format code
15168316096 Apr 10, 2025
c20f38b
050
gpBlockchain Apr 11, 2025
9c7034e
update debug yml
gpBlockchain Apr 14, 2025
41c7802
update debug
gpBlockchain Apr 14, 2025
cf1e300
fix bug for run premission
gpBlockchain Apr 14, 2025
5f1c9d8
update fiber
gpBlockchain Apr 14, 2025
1507eac
fix shutdown failed
gpBlockchain Apr 14, 2025
2302009
update test
gpBlockchain Apr 14, 2025
372817d
fix ci occue failed
gpBlockchain Apr 14, 2025
f3e3f69
add 测试build_router对amount参数的有效性检查
15168316096 Apr 17, 2025
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
338 changes: 312 additions & 26 deletions .github/workflows/fiber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,332 @@
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: fiber test

on:
push:
branches: [ "fiber" ]
branches: ["fiber"]
pull_request:
branches: [ "fiber" ]
branches: ["fiber"]

permissions:
contents: read

jobs:
build:
prepare:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Run make prepare
run: make prepare

- name: Tar backup
run: |
tar -czf prepare-backup.tar.gz \
download \
source/ckb-cli \
source/ckb-cli-old

- name: Backup data
uses: actions/upload-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: prepare-backup.tar.gz

fiber_test_open_channel:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO=test_cases/fiber/devnet/open_channel

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-open_channel-reports-${{ runner.os }}
path: ./report

fiber_test_accept_channel_cancel_invoice_connect_peer_disconnect_peer:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/accept_channel test_cases/fiber/devnet/cancel_invoice test_cases/fiber/devnet/connect_peer test_cases/fiber/devnet/disconnect_peer"

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-accept_channel_to_disconnect_peer-reports-${{ runner.os }}
path: ./report

fiber_test_get_invoice_graph_channels_graph_nodes_list_channels_new_invoice:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/get_invoice test_cases/fiber/devnet/graph_channels test_cases/fiber/devnet/graph_nodes test_cases/fiber/devnet/list_channels test_cases/fiber/devnet/new_invoice"

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-accept_channel_to_disconnect_peer-reports-${{ runner.os }}
path: ./report

fiber_test_send_payment_module_offline:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/send_payment/module test_cases/fiber/devnet/send_payment/offline"

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-send_payment-module-offline-reports-${{ runner.os }}
path: ./report

fiber_test_send_payment_params_path:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/send_payment/params test_cases/fiber/devnet/send_payment/path"

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-send_payment-params-path-reports-${{ runner.os }}
path: ./report


fiber_test_shutdown_channel_update_channel_issue:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/shutdown_channel test_cases/fiber/devnet/update_channel test_cases/fiber/devnet/issue"

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-send_payment-reports-${{ runner.os }}
path: ./report


fiber_test_watch_tower:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/watch_tower"
- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-watch_tower-reports-${{ runner.os }}
path: ./report


fiber_test_watch_tower_tlc:
needs: prepare
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: make prepare
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Run tests
run: make fiber_test
- name: Download prepare backup
uses: actions/download-artifact@v4
with:
name: prepare-backup-${{ runner.os }}
path: ./

# - name: Setup upterm session
# if: always()
# uses: lhotari/action-upterm@v1
- name: Extract tarball and restore permissions
run: |
tar -xzf prepare-backup.tar.gz

- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-build-reports-${{ runner.os }}
path: ./report
- name: Run fiber_test_demo
run: make fiber_test_demo FIBER_TEST_DEMO="test_cases/fiber/devnet/watch_tower_wit_tlc"
- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-watch_tower-reports-${{ runner.os }}
path: ./report
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ fiber_test_cases := \
test_cases/fiber/devnet/shutdown_channel \
test_cases/fiber/devnet/update_channel \
test_cases/fiber/devnet/issue \
test_cases/fiber/devnet/compatibility \
test_cases/fiber/devnet/watch_tower

fiber_testnet_cases := \
Expand Down Expand Up @@ -139,6 +138,21 @@ fiber_test:
exit 1; \
fi

fiber_test_demo:
@failed_cases=; \
echo "Running tests for $$FIBER_TEST_DEMO"; \
for test_case in $(FIBER_TEST_DEMO); do \
echo "Running tests for $$test_case"; \
if ! bash test.sh "$$test_case"; then \
echo "$$test_case" >> failed_test_cases.txt; \
fi \
done; \
if [ -s failed_test_cases.txt ]; then \
echo "Some test cases failed: $$(cat failed_test_cases.txt)"; \
rm -f failed_test_cases.txt; \
exit 1; \
fi

develop_test:
@failed_cases=; \
for test_case in $(TestCases); do \
Expand Down
2 changes: 1 addition & 1 deletion download_ckb_light_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"arm64": {
"url": "https://github.com/nervosnetwork/fiber/releases/download/v{version}/fnn_v{"
"version}-x86_64-darwin.tar.gz",
"version}-x86_64-darwin-portable.tar.gz",
"ext": ".tar.gz",
},
},
Expand Down
Loading
Loading