Skip to content

Commit

Permalink
Merge pull request #106 from RetricSu/develop
Browse files Browse the repository at this point in the history
release v0.7.1-rc2
  • Loading branch information
RetricSu authored Sep 14, 2021
2 parents 09cabd9 + 8dfc874 commit 835ffaf
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.vscode/
config/deployment-results.json
config/runner_config.json
node_modules/
Expand Down
2 changes: 0 additions & 2 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions docker/.build.mode.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ DOCKER_PREBUILD_IMAGE_TAG=v0.6.2-rc6
DOCKER_MANUAL_BUILD_IMAGE_NAME=retricsu/godwoken-manual-build
DOCKER_MANUAL_BUILD_IMAGE_TAG=add-jq
DOCKER_JS_PREBUILD_IMAGE_NAME=nervos/godwoken-js-prebuilds
DOCKER_JS_PREBUILD_IMAGE_TAG=v0.7.3-rc1
DOCKER_JS_PREBUILD_IMAGE_TAG=v0.7.3-rc3

####[packages]
GODWOKEN_GIT_URL=https://github.com/nervosnetwork/godwoken.git
GODWOKEN_GIT_CHECKOUT=v0.6.2-rc5
POLYMAN_GIT_URL=https://github.com/RetricSu/godwoken-polyman.git
POLYMAN_GIT_CHECKOUT=v0.6.1-rc1
WEB3_GIT_URL=https://github.com/nervosnetwork/godwoken-web3.git
WEB3_GIT_CHECKOUT=v0.6.0-rc5
WEB3_GIT_CHECKOUT=v0.6.0-rc7
SCRIPTS_GIT_URL=https://github.com/nervosnetwork/godwoken-scripts.git
SCRIPTS_GIT_CHECKOUT=v0.8.0-rc2
POLYJUICE_GIT_URL=https://github.com/nervosnetwork/godwoken-polyjuice.git
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
- 8114:8114
- 8115:8115 # 8115 is not using for now, but we may need it when extend kicker in the future
volumes:
- ../ckb:/ckb
- ../:/code
- ../cache/activity/ckb-chain-data:/usr/local/ckb-chain-data
environment:
# env of layer 1:
Expand Down
23 changes: 19 additions & 4 deletions docker/layer1/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
#!/bin/sh
cd /ckb
#!/bin/bash

# import some helper function
source /code/gw_util.sh

cd /code/ckb
if ! [ -f ckb.toml ]; then
/bin/ckb init --chain "$CKB_CHAIN" --ba-arg "$BA_ARG" --ba-code-hash "$BA_CODE_HASH" --ba-hash-type "$BA_HASH_TYPE" --ba-message "$BA_MESSAGE"
fi

exec /bin/ckb run &
sleep 3
exec /bin/ckb miner

# wait for ckb rpc setup
while true; do
sleep 1;
if isCkbRpcRunning;
then
echo "start ckb-miner now.."
break;
else echo "keep waitting for ckb rpc .."
fi
done

exec /bin/ckb miner
2 changes: 1 addition & 1 deletion docker/layer2/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export GODWOKEN_BIN=${PROJECT_DIR}/workspace/bin/godwoken
export GW_TOOLS_BIN=${PROJECT_DIR}/workspace/bin/gw-tools

function runGodwoken(){
GODWOKEN_DEBUG=true RUST_LOG=gw_block_producer=info,gw_generator=debug,gw_web3_indexer=debug $GODWOKEN_BIN
RUST_LOG=info,gw_block_producer=info,gw_generator=debug,gw_web3_indexer=debug $GODWOKEN_BIN
}

# import some helper function
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ make sg # sg means show godwoken logs

after everything started, check `http://localhost:6100/` to deploy contract.

![panel](docs/main.png)
![panel](main.png)

### How to deploy contract

Expand All @@ -54,7 +54,7 @@ after deployment successfully get done, you will find the contract address listi

you can use the kicker's built-in `Contract Debugger` right on the page to give your dapp a first simple manual test.

![panel](docs/contract-debugger.png)
![panel](contract-debugger.png)

## 2. Custom mode

Expand Down
30 changes: 30 additions & 0 deletions gw_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,36 @@ isRollupCellExits(){
fi
}

isCkbRpcRunning(){
if [[ -n $1 ]];
then
local rpc_url="$1"
else
local rpc_url="http://localhost:8114"
fi

result=$( echo '{
"id": 2,
"jsonrpc": "2.0",
"method": "ping",
"params": []
}' \
| tr -d '\n' \
| curl -s --ipv4 \
-H 'content-type: application/json' -d @- \
$rpc_url)

if [[ $result =~ "pong" ]]; then
echo "ckb rpc server is up and running!"
# 0 equals true
return 0
else
echo "ckb rpc server is down."
# 1 equals false
return 1
fi
}

isGodwokenRpcRunning(){
if [[ -n $1 ]];
then
Expand Down

0 comments on commit 835ffaf

Please sign in to comment.