Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Nov 16, 2021
2 parents 4e8fb45 + 4b46b49 commit e9f3bb8
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 27 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ list:
tail_log:
docker-compose --file orchestra/docker/docker-compose.yaml --project-name orchestra logs > orchestra/docker-compose.log
docker-compose --file regnbue-bridge/docker/docker-compose.yaml --project-name faucet logs > regnbue-bridge/docker-compose.log
ls rollup-state-manager/*.log prover-cluster/*.log dingir-exchange/*.log dingir-exchange/logs/*.log regnbue-bridge/*.log contracts/*.log orchestra/*.log | xargs tail -n 3
docker-compose --file blockscout/docker/docker-compose.yaml --project-name blockscout logs > blockscout/docker-compose.log
ls rollup-state-manager/*.log prover-cluster/*.log dingir-exchange/*.log dingir-exchange/logs/*.log orchestra/*.log regnbue-bridge/*.log blockscout/*.log contracts/*.log | xargs tail -n 3
clean_log:
ls rollup-state-manager/*.log prover-cluster/*.log dingir-exchange/*.log dingir-exchange/logs/*.log regnbue-bridge/*.log contracts/*.log orchestra/*.log | xargs rm
ls rollup-state-manager/*.log prover-cluster/*.log dingir-exchange/*.log dingir-exchange/logs/*.log orchestra/*.log regnbue-bridge/*.log blockscout/*.log contracts/*.log | xargs rm

# code related
shfmt:
Expand Down
2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 1 files
+6 −8 hardhat.config.ts
2 changes: 1 addition & 1 deletion dingir-exchange
21 changes: 4 additions & 17 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export DIRTY=true
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
STATE_MNGR_DIR=$DIR/rollup-state-manager
CIRCUITS_DIR=$DIR/circuits
BLOCKSCOUT_DIR=$DIR/blockscout
TARGET_CIRCUIT_DIR=$CIRCUITS_DIR/testdata/Block_$NTXS"_"$BALANCELEVELS"_"$ORDERLEVELS"_"$ACCOUNTLEVELS
PROVER_DIR=$DIR/prover-cluster
EXCHANGE_DIR=$DIR/dingir-exchange
Expand Down Expand Up @@ -91,6 +92,7 @@ function start_docker_compose() {
function run_docker_compose() {
start_docker_compose $ORCHESTRA_DIR orchestra
start_docker_compose $FAUCET_DIR faucet
start_docker_compose $BLOCKSCOUT_DIR blockscout # ganache node & blockscout stuff
sleep 10
}

Expand Down Expand Up @@ -138,26 +140,11 @@ function run_prove_workers() {
fi
}

function run_eth_node() {
function boostrap_contract() {
# a mainnet like 50 Gwei gas price
# base on 21,000 units limit from mainnet (21,000 units * 50 Gwei)
cd $CONTRACTS_DIR
yarn install
GANACHE_CLI_ARG="--networkId 53371 \
--chainId 53371 \
--db $CONTRACTS_DIR/ganache \
--gasPrice 50000000000 \
--gasLimit 1050000000000000 \
--allowUnlimitedContractSize \
--accounts 20 \
--defaultBalanceEther 1000 \
--deterministic \
--mnemonic=$MNEMONIC"
if [ $VERBOSE_GANACHE == 'TRUE' ]; then
GANACHE_CLI_ARG=$GANACHE_CLI_ARG" --verbose"
fi
nohup npx ganache-cli $GANACHE_CLI_ARG >> $CONTRACTS_DIR/ganache.$CURRENTDATE.log 2>&1 &
sleep 1
}

function deploy_contracts() {
Expand Down Expand Up @@ -195,7 +182,7 @@ function run_bin() {
run_prove_workers
run_rollup
sleep 10
run_eth_node
boostrap_contract
if [ $DX_CLEAN == 'TRUE' ]; then
deploy_contracts
else
Expand Down
3 changes: 2 additions & 1 deletion stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EXCHANGE_DIR=$DIR/dingir-exchange
STATE_MNGR_DIR=$DIR/rollup-state-manager
FAUCET_DIR=$DIR/regnbue-bridge
ORCHESTRA_DIR=$DIR/orchestra
BLOCKSCOUT_DIR=$DIR/blockscout

echo "DX_CLEAN: $DX_CLEAN"

Expand Down Expand Up @@ -35,11 +36,11 @@ function stop_docker_compose() {
function stop_docker_composes() {
stop_docker_compose $ORCHESTRA_DIR orchestra
stop_docker_compose $FAUCET_DIR faucet
stop_docker_compose $BLOCKSCOUT_DIR blockscout
}

function clean_data() {
rm -rf rollup-state-manager/circuits/testdata/persist/
rm -rf contracts/ganache
}

kill_tasks
Expand Down

0 comments on commit e9f3bb8

Please sign in to comment.