From b2e5d0fdea6dd3499f56d2c29e450218b65725c4 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Fri, 22 Oct 2021 15:58:46 +0800 Subject: [PATCH 01/17] decode l2 tx; return l1_tx_hash; fix real_tx_num (#94) * bump dependencies * bump regnbue-bridge --- circuits | 2 +- dingir-exchange | 2 +- orchestra | 2 +- regnbue-bridge | 2 +- rollup-state-manager | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/circuits b/circuits index 7b813d9..b31afb3 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit 7b813d910fde66e92baf7953ccdb2c60b2ea0df3 +Subproject commit b31afb30073a105183a24108ec77b4a63242c24c diff --git a/dingir-exchange b/dingir-exchange index db01b40..ae56c74 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit db01b40b19574dd06932d47b2dbeb6a6dabcb5bf +Subproject commit ae56c741f999da827778d50bdf65326c3740aa59 diff --git a/orchestra b/orchestra index f9877b5..ed3dfe4 160000 --- a/orchestra +++ b/orchestra @@ -1 +1 @@ -Subproject commit f9877b514310bb9da105bfe1b09eb2a799cec3b7 +Subproject commit ed3dfe48dde36de349fac28d8e714a4641b567f6 diff --git a/regnbue-bridge b/regnbue-bridge index 3a246f2..3624754 160000 --- a/regnbue-bridge +++ b/regnbue-bridge @@ -1 +1 @@ -Subproject commit 3a246f2e09b7de82b56aa4cdb48ec6fb5865e913 +Subproject commit 36247547565d6341069c25bb7a61468724954434 diff --git a/rollup-state-manager b/rollup-state-manager index 891eacf..11b2eed 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit 891eacf00bf4ad0bb48e4b0ed5c4a1cbfe4ef06c +Subproject commit 11b2eedb95977d51787c5b7ba5d7f4aeafde3eb7 From 5de73e39cd52b1cdc968e2b659c9c15195e84fac Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 25 Oct 2021 11:51:51 +0800 Subject: [PATCH 02/17] Change GRPC and rest url path (#93) * Update GRPC and REST URL path. * Update * Update * Update --- dingir-exchange | 2 +- orchestra | 2 +- rollup-state-manager | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dingir-exchange b/dingir-exchange index ae56c74..d2afd93 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit ae56c741f999da827778d50bdf65326c3740aa59 +Subproject commit d2afd935d58491025c23c0fe92a38ddbd379e37a diff --git a/orchestra b/orchestra index ed3dfe4..74deffb 160000 --- a/orchestra +++ b/orchestra @@ -1 +1 @@ -Subproject commit ed3dfe48dde36de349fac28d8e714a4641b567f6 +Subproject commit 74deffb697bcea73e3cfc20a7632d47611ad56bf diff --git a/rollup-state-manager b/rollup-state-manager index 11b2eed..2dd8ab2 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit 11b2eedb95977d51787c5b7ba5d7f4aeafde3eb7 +Subproject commit 2dd8ab2e7d39f03b7d9fc2b8f9434aba13457a84 From 131e412dd7620d400be8039f78ef94c6e9b6ad3f Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 26 Oct 2021 14:51:29 +0800 Subject: [PATCH 03/17] Update submodule exchange. (#95) --- dingir-exchange | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dingir-exchange b/dingir-exchange index d2afd93..bf1f84d 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit d2afd935d58491025c23c0fe92a38ddbd379e37a +Subproject commit bf1f84dc2c77b2206c841c9e9c0d24720efc8217 From e3561ba70b30e3eaf81269235ac528370f88af2d Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Fri, 29 Oct 2021 14:44:37 +0800 Subject: [PATCH 04/17] fix(rollup_state_manager): fix spot_trade token_id index in l2_block_query API (#97) --- rollup-state-manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup-state-manager b/rollup-state-manager index 2dd8ab2..afc6d7f 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit 2dd8ab2e7d39f03b7d9fc2b8f9434aba13457a84 +Subproject commit afc6d7fbefc3fe96b0e1a7651397bfe411cff2c6 From 7ad678c91a98a48572715dfdac6fa5065c482a55 Mon Sep 17 00:00:00 2001 From: "HHQ. Zhang" Date: Fri, 29 Oct 2021 15:42:06 +0800 Subject: [PATCH 05/17] feat: add blockscout (#96) * add blockscout * update * update comments * fix typos * update Co-authored-by: HAOYUatHZ --- .gitmodules | 3 +++ blockscout | 1 + run.sh | 21 ++++----------------- stop.sh | 3 ++- 4 files changed, 10 insertions(+), 18 deletions(-) create mode 160000 blockscout diff --git a/.gitmodules b/.gitmodules index b2fce0c..5790cac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "orchestra"] path = orchestra url = git@github.com:fluidex/orchestra.git +[submodule "blockscout"] + path = blockscout + url = git@github.com:fluidex/blockscout.git diff --git a/blockscout b/blockscout new file mode 160000 index 0000000..073ceda --- /dev/null +++ b/blockscout @@ -0,0 +1 @@ +Subproject commit 073ceda612c8d01de24368181ff2bf915b602e68 diff --git a/run.sh b/run.sh index 49555c4..08dea6f 100755 --- a/run.sh +++ b/run.sh @@ -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 @@ -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 } @@ -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() { @@ -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 diff --git a/stop.sh b/stop.sh index 5c0b914..1fde391 100755 --- a/stop.sh +++ b/stop.sh @@ -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" @@ -35,11 +36,11 @@ function stop_docker_compose() { function stop_docker_composes() { stop_docker_compose $ORCHESTRA_DIR orchestra stop_docker_compose $FAUCET_DIR faucet + cd $BLOCKSCOUT_DIR && docker-compose down --remove-orphans } function clean_data() { rm -rf rollup-state-manager/circuits/testdata/persist/ - rm -rf contracts/ganache } kill_tasks From cce3c75459de14afc02af58b257d241fce483d34 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Fri, 29 Oct 2021 15:50:40 +0800 Subject: [PATCH 06/17] fix stop_docker_compose and clean_log (#98) * add blockscout * update * update comments * fix typos * update * fix Co-authored-by: lightsing --- Makefile | 5 +++-- stop.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dfd400a..cad3bfe 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/stop.sh b/stop.sh index 1fde391..73bfb03 100755 --- a/stop.sh +++ b/stop.sh @@ -36,7 +36,7 @@ function stop_docker_compose() { function stop_docker_composes() { stop_docker_compose $ORCHESTRA_DIR orchestra stop_docker_compose $FAUCET_DIR faucet - cd $BLOCKSCOUT_DIR && docker-compose down --remove-orphans + stop_docker_compose $BLOCKSCOUT_DIR blockscout } function clean_data() { From ff6ecdfefd570099072cc42cfbbaa3f392fa7e72 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ Date: Fri, 29 Oct 2021 15:59:21 +0800 Subject: [PATCH 07/17] fix blockscout yaml path --- blockscout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockscout b/blockscout index 073ceda..8a2d64e 160000 --- a/blockscout +++ b/blockscout @@ -1 +1 @@ -Subproject commit 073ceda612c8d01de24368181ff2bf915b602e68 +Subproject commit 8a2d64e33161ed30ba1558551df02d9e8eac7b2d From 7a1e7743998658ad89ff679979802847f37e9ca6 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Tue, 2 Nov 2021 15:34:26 +0800 Subject: [PATCH 08/17] add balance details to decoded_tx (#99) --- dingir-exchange | 2 +- orchestra | 2 +- rollup-state-manager | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dingir-exchange b/dingir-exchange index bf1f84d..b8a0644 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit bf1f84dc2c77b2206c841c9e9c0d24720efc8217 +Subproject commit b8a0644987a5b4eda769c05fed86bda93205abf0 diff --git a/orchestra b/orchestra index 74deffb..7dee0d6 160000 --- a/orchestra +++ b/orchestra @@ -1 +1 @@ -Subproject commit 74deffb697bcea73e3cfc20a7632d47611ad56bf +Subproject commit 7dee0d6caac22566db6ad72c4816fe9107843b8b diff --git a/rollup-state-manager b/rollup-state-manager index afc6d7f..ddfde16 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit afc6d7fbefc3fe96b0e1a7651397bfe411cff2c6 +Subproject commit ddfde16fe75df54007ba21a980ee84ef128952c4 From ccd428b8e3f8e3d71f9df443cdedc501b31a36af Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 3 Nov 2021 15:52:31 +0800 Subject: [PATCH 09/17] Update to Rust `1.56.0` and edition 2021. (#101) --- dingir-exchange | 2 +- prover-cluster | 2 +- regnbue-bridge | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dingir-exchange b/dingir-exchange index b8a0644..16e4865 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit b8a0644987a5b4eda769c05fed86bda93205abf0 +Subproject commit 16e4865cda73e59b7f62696e8aee8f2318b8c205 diff --git a/prover-cluster b/prover-cluster index 75683b9..61d3429 160000 --- a/prover-cluster +++ b/prover-cluster @@ -1 +1 @@ -Subproject commit 75683b937986c07a7f95b92b1532d3c05f1cbf20 +Subproject commit 61d34293ed4cc8883f6b53a89c8129eca3fb63ee diff --git a/regnbue-bridge b/regnbue-bridge index 3624754..f9ad977 160000 --- a/regnbue-bridge +++ b/regnbue-bridge @@ -1 +1 @@ -Subproject commit 36247547565d6341069c25bb7a61468724954434 +Subproject commit f9ad9777eaa2fdcdda7ff894e79a8dab2ddcf5b9 From 63910840bbdcc7ba28dc237833565b4235fbf417 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 5 Nov 2021 16:48:01 +0800 Subject: [PATCH 10/17] Update git sub-modules for time of unit milliseconds. (#102) --- dingir-exchange | 2 +- orchestra | 2 +- rollup-state-manager | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dingir-exchange b/dingir-exchange index 16e4865..3d467db 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit 16e4865cda73e59b7f62696e8aee8f2318b8c205 +Subproject commit 3d467db113d7bfd8b74c125ea45662ae4858b810 diff --git a/orchestra b/orchestra index 7dee0d6..17f2a3f 160000 --- a/orchestra +++ b/orchestra @@ -1 +1 @@ -Subproject commit 7dee0d6caac22566db6ad72c4816fe9107843b8b +Subproject commit 17f2a3f92f1569b61e623d4743305f4af49fdcf6 diff --git a/rollup-state-manager b/rollup-state-manager index ddfde16..dae521f 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit ddfde16fe75df54007ba21a980ee84ef128952c4 +Subproject commit dae521f8101007bbc8933937f93e5824618a2201 From 0d8aad88a3f40617e4b8f539a99eaf67f020a121 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Mon, 8 Nov 2021 14:50:27 +0800 Subject: [PATCH 11/17] feat(exchange): support query by user_id in get_user API (#105) --- dingir-exchange | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dingir-exchange b/dingir-exchange index 3d467db..3e0fa61 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit 3d467db113d7bfd8b74c125ea45662ae4858b810 +Subproject commit 3e0fa614e7be6d773502512c9d760238f316e33f From 2008e1b773d405e6146a578cf126265795b9b572 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Tue, 9 Nov 2021 11:35:16 +0800 Subject: [PATCH 12/17] fix precision for amount & balance in block_detail (#106) --- rollup-state-manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup-state-manager b/rollup-state-manager index dae521f..ccf6d96 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit dae521f8101007bbc8933937f93e5824618a2201 +Subproject commit ccf6d9607468da95510975e584365e9278cab446 From dd1aa5cc1837bbba00a85101981d8ec228c7faf4 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Tue, 9 Nov 2021 19:03:16 +0800 Subject: [PATCH 13/17] fix(exchange): fix wrong type of user_id when binding to SQL in get_user rest API (#107) --- dingir-exchange | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dingir-exchange b/dingir-exchange index 3e0fa61..79fbd48 160000 --- a/dingir-exchange +++ b/dingir-exchange @@ -1 +1 @@ -Subproject commit 3e0fa614e7be6d773502512c9d760238f316e33f +Subproject commit 79fbd48d9d1d00c668758a48dfe781afa9aa3879 From 5ec26008a10ca8bd855a66a21b4ed3eedeb7e156 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 12 Nov 2021 10:36:13 +0800 Subject: [PATCH 14/17] Update for latest circuits and rollup. (#108) --- circuits | 2 +- orchestra | 2 +- rollup-state-manager | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/circuits b/circuits index b31afb3..d1b10ee 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit b31afb30073a105183a24108ec77b4a63242c24c +Subproject commit d1b10ee8470f7cc5012d457cb21f61e2a7f19614 diff --git a/orchestra b/orchestra index 17f2a3f..182e3ec 160000 --- a/orchestra +++ b/orchestra @@ -1 +1 @@ -Subproject commit 17f2a3f92f1569b61e623d4743305f4af49fdcf6 +Subproject commit 182e3ec723f23656a329246cf32c0fc020c2b2c1 diff --git a/rollup-state-manager b/rollup-state-manager index ccf6d96..822b3c7 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit ccf6d9607468da95510975e584365e9278cab446 +Subproject commit 822b3c7b3ad78451a64222d3a8b8d85793ed51ac From e36e45f5e214c8425d1036153fc7b62045f5ccfa Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Fri, 12 Nov 2021 16:40:28 +0800 Subject: [PATCH 15/17] feat(DA): add block's raw_pubdata; fix wrong balance calculation for spot_trade_tx detail (#109) --- prover-cluster | 2 +- rollup-state-manager | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prover-cluster b/prover-cluster index 61d3429..5653e01 160000 --- a/prover-cluster +++ b/prover-cluster @@ -1 +1 @@ -Subproject commit 61d34293ed4cc8883f6b53a89c8129eca3fb63ee +Subproject commit 5653e017659c3233091fbf1dc584c8fa752e925e diff --git a/rollup-state-manager b/rollup-state-manager index 822b3c7..ce16ada 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit 822b3c7b3ad78451a64222d3a8b8d85793ed51ac +Subproject commit ce16adabe7adf57b5ea48c51181d8c27bb5bfc4f From ee8c0171694065d501df6d364d6fef1709217916 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:06:02 +0800 Subject: [PATCH 16/17] feat(prover): support optional lagrange key (#111) --- prover-cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prover-cluster b/prover-cluster index 5653e01..53552aa 160000 --- a/prover-cluster +++ b/prover-cluster @@ -1 +1 @@ -Subproject commit 5653e017659c3233091fbf1dc584c8fa752e925e +Subproject commit 53552aa2f0f39b647484f4afec8cf5b805a410f1 From 4b46b4916c5e2f7f8734e8ea05c06c2fec9089a8 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:21:46 +0800 Subject: [PATCH 17/17] fix precision for amount & balance in block_detail (#112) --- orchestra | 2 +- rollup-state-manager | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/orchestra b/orchestra index 182e3ec..c755a74 160000 --- a/orchestra +++ b/orchestra @@ -1 +1 @@ -Subproject commit 182e3ec723f23656a329246cf32c0fc020c2b2c1 +Subproject commit c755a740afd6c1975a624daf60a458d067e347e4 diff --git a/rollup-state-manager b/rollup-state-manager index ce16ada..5570032 160000 --- a/rollup-state-manager +++ b/rollup-state-manager @@ -1 +1 @@ -Subproject commit ce16adabe7adf57b5ea48c51181d8c27bb5bfc4f +Subproject commit 557003269786acdfb443e97236006d3b345e7694