Skip to content

Commit

Permalink
Use rollup-scripts-deployer.key to deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
blckngm committed Feb 16, 2023
1 parent 3edbe83 commit a49b871
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 3 additions & 5 deletions docker/layer2/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,11 @@ function create_polyjuice_root_account() {

# Deposit for block_producer
#
# Here we deposit from ckb-miner-and-faucet.key instead of
# godwoken-block-producer.key to avoid double spending cells locked by the
# latter -- godwoken has already started and may spend them too for block
# submission etc.
# Use rollup-scripts-deployer so that this transaction isn't in conflict
# with submission txs or v0 deployment/submission txs.
log "Deposit for block_producer"
RUST_BACKTRACE=full gw-tools deposit-ckb \
--privkey-path $ACCOUNTS_DIR/ckb-miner-and-faucet.key \
--privkey-path $ACCOUNTS_DIR/rollup-scripts-deployer.key \
--eth-address 0x2e9df163055245bfadd35e3a1f05f06096447c85 \
--godwoken-rpc-url http://127.0.0.1:8119 \
--ckb-rpc http://ckb:8114 \
Expand Down
7 changes: 4 additions & 3 deletions kicker
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ function deposit() {
ethaddr=${1:?"\"$EXECUTABLE deposit\" requires eth address as 1st argument"}
amount=${2:?"\"$EXECUTABLE deposit\" requires amount as 2nd argument"}

pkpath=${PRIVATE_KEY_PATH:-"$WORKSPACE/accounts/ckb-miner-and-faucet.key"}
# Use rollup-scripts-deployer to avoid conflict with v0/v1 block submission.
pkpath=${PRIVATE_KEY_PATH:-"$WORKSPACE/accounts/rollup-scripts-deployer.key"}
if [ ! -f $pkpath ]; then
error "$pkpath: No such file or directory"
exit 1
Expand Down Expand Up @@ -305,7 +306,7 @@ function to_script_hash() {
function deposit_v0() {
amount=${1:?"\"$EXECUTABLE deposit\" requires amount as 1nd argument"}

pkpath=${PRIVATE_KEY_PATH:-"$WORKSPACE/accounts/ckb-miner-and-faucet.key"}
pkpath=${PRIVATE_KEY_PATH:-"$WORKSPACE/accounts/rollup-scripts-deployer.key"}
if [ ! -f $pkpath ]; then
error "$pkpath: No such file or directory"
exit 1
Expand Down Expand Up @@ -333,7 +334,7 @@ function withdraw_v0_to_v1() {
ethaddr=${1:?"\"$EXECUTABLE withdraw-v0-to-v1\" requires eth address as 1st argument"}
amount=${2:?"\"$EXECUTABLE withdraw-v0-to-v1\" requires amount as 2nd argument"}

pkpath=${PRIVATE_KEY_PATH:-"$WORKSPACE/accounts/ckb-miner-and-faucet.key"}
pkpath=${PRIVATE_KEY_PATH:-"$WORKSPACE/accounts/rollup-scripts-deployer.key"}
if [ ! -f $pkpath ]; then
error "$pkpath: No such file or directory"
exit 1
Expand Down

0 comments on commit a49b871

Please sign in to comment.