github.com/klaytn/klaytn@v1.12.1/build/packaging/windows/start-ken.bat (about) 1 @echo off 2 3 set HOME=%~dp0 4 set CONF=%HOME%\conf 5 6 call %CONF%\ken-conf.cmd 7 8 REM Check if exist data directory 9 set "NOT_INIT=" 10 IF NOT EXIST %KLAY_HOME% ( 11 set NOT_INIT=1 12 ) 13 IF NOT EXIST %DATA_DIR% ( 14 set NOT_INIT=1 15 ) 16 17 IF DEFINED NOT_INIT ( 18 echo "[ERROR] : ken is not initiated, Initiate ken with genesis file first." 19 GOTO end 20 ) 21 22 set OPTIONS=--networkid %NETWORK_ID% 23 24 IF DEFINED DATA_DIR ( 25 set OPTIONS=%OPTIONS% --datadir %DATA_DIR% 26 ) 27 28 IF DEFINED PORT ( 29 set OPTIONS=%OPTIONS% --port %PORT% 30 ) 31 32 IF DEFINED SERVER_TYPE ( 33 set OPTIONS=%OPTIONS% --srvtype %SERVER_TYPE% 34 ) 35 36 IF DEFINED VERBOSITY ( 37 set OPTIONS=%OPTIONS% --verbosity %VERBOSITY% 38 ) 39 40 IF DEFINED TXPOOL_EXEC_SLOTS_ALL ( 41 set OPTIONS=%OPTIONS% --txpool.exec-slots.all %TXPOOL_EXEC_SLOTS_ALL% 42 ) 43 44 IF DEFINED TXPOOL_NONEXEC_SLOTS_ALL ( 45 set OPTIONS=%OPTIONS% --txpool.nonexec-slots.all %TXPOOL_NONEXEC_SLOTS_ALL% 46 ) 47 48 IF DEFINED TXPOOL_EXEC_SLOTS_ACCOUNT ( 49 set OPTIONS=%OPTIONS% --txpool.exec-slots.account %TXPOOL_EXEC_SLOTS_ACCOUNT% 50 ) 51 52 IF DEFINED TXPOOL_NONEXEC_SLOTS_ACCOUNT ( 53 set OPTIONS=%OPTIONS% --txpool.nonexec-slots.account %TXPOOL_NONEXEC_SLOTS_ACCOUNT% 54 ) 55 56 IF DEFINED TXPOOL_LIFE_TIME ( 57 set OPTIONS=%OPTIONS% --txpool.lifetime %TXPOOL_LIFE_TIME% 58 ) 59 60 IF DEFINED SYNCMODE ( 61 set OPTIONS=%OPTIONS% --syncmode %SYNCMODE% 62 ) 63 64 IF DEFINED MAXCONNECTIONS ( 65 set OPTIONS=%OPTIONS% --maxconnections %MAXCONNECTIONS% 66 ) 67 68 IF DEFINED LDBCACHESIZE ( 69 set OPTIONS=%OPTIONS% --db.leveldb.cache-size %LDBCACHESIZE% 70 ) 71 72 IF DEFINED RPC_ENABLE ( 73 IF %RPC_ENABLE%==1 ( 74 set OPTIONS=%OPTIONS% --rpc --rpcapi %RPC_API% --rpcport %RPC_PORT% --rpcaddr %RPC_ADDR% --rpccorsdomain ^ 75 %RPC_CORSDOMAIN% --rpcvhosts %RPC_VHOSTS% 76 IF DEFINED RPC_CONCURRENCY_LIMIT ( 77 set OPTIONS=%OPTIONS% --rpc.concurrencylimit %RPC_CONCURRENCY_LIMIT% 78 ) 79 IF DEFINED RPC_READ_TIMEOUT ( 80 set OPTIONS=%OPTIONS% --rpcreadtimeout %RPC_READ_TIMEOUT% 81 ) 82 IF DEFINED RPC_WRITE_TIMEOUT ( 83 set OPTIONS=%OPTIONS% --rpcwritetimeout %RPC_WRITE_TIMEOUT% 84 ) 85 IF DEFINED RPC_IDLE_TIMEOUT ( 86 set OPTIONS=%OPTIONS% --rpcidletimeout %RPC_IDLE_TIMEOUT% 87 ) 88 IF DEFINED RPC_EXECUTION_TIMEOUT ( 89 set OPTIONS=%OPTIONS% --rpcexecutiontimeout %RPC_EXECUTION_TIMEOUT% 90 ) 91 ) 92 ) 93 94 IF DEFINED WS_ENABLE ( 95 IF %WS_ENABLE%==1 ( 96 set OPTIONS=%OPTIONS% --ws --wsapi %WS_API% --wsaddr %WS_ADDR% --wsport %WS_PORT% --wsorigins %WS_ORIGINS% 97 ) 98 ) 99 100 IF DEFINED METRICS ( 101 IF %METRICS%==1 ( 102 set OPTIONS=%OPTIONS% --metrics 103 ) 104 ) 105 106 IF DEFINED PROMETHEUS ( 107 IF %PROMETHEUS%==1 ( 108 set OPTIONS=%OPTIONS% --prometheus 109 ) 110 ) 111 112 IF DEFINED NO_DISCOVER ( 113 IF %NO_DISCOVER%==1 ( 114 set OPTIONS=%OPTIONS% --nodiscover 115 ) 116 ) 117 118 IF DEFINED DB_NO_PARALLEL_WRITE ( 119 IF %DB_NO_PARALLEL_WRITE%==1 ( 120 set OPTIONS=%OPTIONS% --db.no-parallel-write 121 ) 122 ) 123 124 IF DEFINED MULTICHANNEL ( 125 IF %MULTICHANNEL%==1 ( 126 set OPTIONS=%OPTIONS% --multichannel 127 ) 128 ) 129 130 IF DEFINED SC_BRIDGE ( 131 IF %SC_BRIDGE%==1 ( 132 set OPTIONS=%OPTIONS% --bridge --mainbridge --bridgeport %SC_BRIDGE_PORT% 133 if %SC_INDEXING%==1 ( 134 set OPTIONS=%OPTIONS% --childchainindexing 135 ) 136 ) 137 ) 138 139 IF DEFINED ADDITIONAL ( 140 IF NOT %ADDITIONAL%=="" ( 141 set OPTIONS=%OPTIONS% %ADDITIONAL% 142 ) 143 ) 144 145 %HOME%\bin\ken.exe %OPTIONS% 146 147 :end 148 @pause