Skip to content
Merged
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 .github/workflows/fiber-attack-fnn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
./venv/bin/python -m download
./venv/bin/python -m download_btc
./venv/bin/python -m download_lnd
install -m 0755 download/0.202.0/ckb-cli source/ckb-cli
install -m 0755 download/0.210.0/ckb-cli source/ckb-cli

- name: Build stock and attack FNN binaries
env:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ prepare_develop_testnet:

echo "install fiber"
python3 -m download_fiber
cp download/0.202.0/ckb-cli ./source/ckb-cli
cp download/0.210.0/ckb-cli ./source/ckb-cli
bash develop_fiber.sh


Expand Down
13 changes: 8 additions & 5 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
from tqdm import tqdm

versions = [
"0.202.0",
"0.210.0",
] # Replace with your versions

DOWNLOAD_DIR = "download"
SYSTEMS = {
"Windows": {
"url": "https://github.com/nervosnetwork/ckb/releases/download/v{version}/ckb_v{"
"version}_x86_64-pc-windows-gnu.zip",
"version}_x86_64-pc-windows-msvc.zip",
"ext": ".zip",
},
"Linux": {
Expand All @@ -37,7 +37,7 @@
"Darwin": {
"x86_64": {
"url": "https://github.com/nervosnetwork/ckb/releases/download/v{version}/ckb_v{"
"version}_aarch64-apple-darwin-portable.zip",
"version}_x86_64-apple-darwin-portable.zip",
"ext": ".zip",
},
"arm64": {
Expand Down Expand Up @@ -127,8 +127,11 @@ def download_ckb(ckb_version):
system=system, architecture=architecture
)
)
url = SYSTEMS[system][architecture]["url"].format(version=ckb_version)
ext = SYSTEMS[system][architecture]["ext"]
system_config = SYSTEMS[system]
if architecture:
system_config = system_config[architecture]
url = system_config["url"].format(version=ckb_version)
ext = system_config["ext"]

filename = f"ckb_v{ckb_version}_binary{ext}"
download_path = os.path.join(DOWNLOAD_DIR, ckb_version).split("-")[0]
Expand Down
4 changes: 2 additions & 2 deletions framework/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class CkbNodeConfigPath(Enum):
"source/template/ckb/v118/ckb.toml.j2",
"source/template/ckb/v118/ckb-miner.toml.j2",
"source/template/ckb/v118/specs/dev.toml",
"download/0.202.0",
"download/0.210.0",
)

CURRENT_FIBER = (
"source/template/ckb/v118/ckb.toml.j2",
"source/template/ckb/v118/ckb-miner.toml.j2",
"source/template/ckb/fiber/dev.toml",
"download/0.201.0",
"download/0.210.0",
)
TESTNET = (
"source/template/ckb/v118/ckb.toml.j2",
Expand Down
2 changes: 1 addition & 1 deletion prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DEFAULT_FIBER_URL="https://github.com/nervosnetwork/fiber.git"
GitFIBERBranch="${GitBranch:-$DEFAULT_FIBER_BRANCH}"
GitFIBERUrl="${GitUrl:-$DEFAULT_FIBER_URL}"

cp download/0.202.0/ckb-cli ./source/ckb-cli
cp download/0.210.0/ckb-cli ./source/ckb-cli
git clone -b $GitFIBERBranch $GitFIBERUrl
cd fiber
cargo build
Expand Down
Loading