github.com/ethxdao/go-ethereum@v0.0.0-20221218102228-5ae34a9cc189/cmd/evm/internal/t8ntool/flags.go (about) 1 // Copyright 2020 The go-ethereum Authors 2 // This file is part of go-ethereum. 3 // 4 // go-ethereum is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // go-ethereum is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. 16 17 package t8ntool 18 19 import ( 20 "fmt" 21 "strings" 22 23 "github.com/ethxdao/go-ethereum/core/vm" 24 "github.com/ethxdao/go-ethereum/tests" 25 ) 26 27 var ( 28 TraceFlag = &cli.BoolFlag{ 29 Name: "trace", 30 Usage: "Output full trace logs to files <txhash>.jsonl", 31 } 32 TraceDisableMemoryFlag = &cli.BoolFlag{ 33 Name: "trace.nomemory", 34 Value: true, 35 Usage: "Disable full memory dump in traces (deprecated)", 36 } 37 TraceEnableMemoryFlag = &cli.BoolFlag{ 38 Name: "trace.memory", 39 Usage: "Enable full memory dump in traces", 40 } 41 TraceDisableStackFlag = &cli.BoolFlag{ 42 Name: "trace.nostack", 43 Usage: "Disable stack output in traces", 44 } 45 TraceDisableReturnDataFlag = &cli.BoolFlag{ 46 Name: "trace.noreturndata", 47 Value: true, 48 Usage: "Disable return data output in traces (deprecated)", 49 } 50 TraceEnableReturnDataFlag = &cli.BoolFlag{ 51 Name: "trace.returndata", 52 Usage: "Enable return data output in traces", 53 } 54 OutputBasedir = &cli.StringFlag{ 55 Name: "output.basedir", 56 Usage: "Specifies where output files are placed. Will be created if it does not exist.", 57 Value: "", 58 } 59 OutputBodyFlag = &cli.StringFlag{ 60 Name: "output.body", 61 Usage: "If set, the RLP of the transactions (block body) will be written to this file.", 62 Value: "", 63 } 64 OutputAllocFlag = &cli.StringFlag{ 65 Name: "output.alloc", 66 Usage: "Determines where to put the `alloc` of the post-state.\n" + 67 "\t`stdout` - into the stdout output\n" + 68 "\t`stderr` - into the stderr output\n" + 69 "\t<file> - into the file <file> ", 70 Value: "alloc.json", 71 } 72 OutputResultFlag = &cli.StringFlag{ 73 Name: "output.result", 74 Usage: "Determines where to put the `result` (stateroot, txroot etc) of the post-state.\n" + 75 "\t`stdout` - into the stdout output\n" + 76 "\t`stderr` - into the stderr output\n" + 77 "\t<file> - into the file <file> ", 78 Value: "result.json", 79 } 80 OutputBlockFlag = &cli.StringFlag{ 81 Name: "output.block", 82 Usage: "Determines where to put the `block` after building.\n" + 83 "\t`stdout` - into the stdout output\n" + 84 "\t`stderr` - into the stderr output\n" + 85 "\t<file> - into the file <file> ", 86 Value: "block.json", 87 } 88 InputAllocFlag = &cli.StringFlag{ 89 Name: "input.alloc", 90 Usage: "`stdin` or file name of where to find the prestate alloc to use.", 91 Value: "alloc.json", 92 } 93 InputEnvFlag = &cli.StringFlag{ 94 Name: "input.env", 95 Usage: "`stdin` or file name of where to find the prestate env to use.", 96 Value: "env.json", 97 } 98 InputTxsFlag = &cli.StringFlag{ 99 Name: "input.txs", 100 Usage: "`stdin` or file name of where to find the transactions to apply. " + 101 "If the file extension is '.rlp', then the data is interpreted as an RLP list of signed transactions." + 102 "The '.rlp' format is identical to the output.body format.", 103 Value: "txs.json", 104 } 105 InputHeaderFlag = &cli.StringFlag{ 106 Name: "input.header", 107 Usage: "`stdin` or file name of where to find the block header to use.", 108 Value: "header.json", 109 } 110 InputOmmersFlag = &cli.StringFlag{ 111 Name: "input.ommers", 112 Usage: "`stdin` or file name of where to find the list of ommer header RLPs to use.", 113 } 114 InputTxsRlpFlag = &cli.StringFlag{ 115 Name: "input.txs", 116 Usage: "`stdin` or file name of where to find the transactions list in RLP form.", 117 Value: "txs.rlp", 118 } 119 SealCliqueFlag = &cli.StringFlag{ 120 Name: "seal.clique", 121 Usage: "Seal block with Clique. `stdin` or file name of where to find the Clique sealing data.", 122 } 123 SealEthashFlag = &cli.BoolFlag{ 124 Name: "seal.ethash", 125 Usage: "Seal block with ethash.", 126 } 127 SealEthashDirFlag = &cli.StringFlag{ 128 Name: "seal.ethash.dir", 129 Usage: "Path to ethash DAG. If none exists, a new DAG will be generated.", 130 } 131 SealEthashModeFlag = &cli.StringFlag{ 132 Name: "seal.ethash.mode", 133 Usage: "Defines the type and amount of PoW verification an ethash engine makes.", 134 Value: "normal", 135 } 136 RewardFlag = &cli.Int64Flag{ 137 Name: "state.reward", 138 Usage: "Mining reward. Set to -1 to disable", 139 Value: 0, 140 } 141 ChainIDFlag = &cli.Int64Flag{ 142 Name: "state.chainid", 143 Usage: "ChainID to use", 144 Value: 1, 145 } 146 ForknameFlag = &cli.StringFlag{ 147 Name: "state.fork", 148 Usage: fmt.Sprintf("Name of ruleset to use."+ 149 "\n\tAvailable forknames:"+ 150 "\n\t %v"+ 151 "\n\tAvailable extra eips:"+ 152 "\n\t %v"+ 153 "\n\tSyntax <forkname>(+ExtraEip)", 154 strings.Join(tests.AvailableForks(), "\n\t "), 155 strings.Join(vm.ActivateableEips(), ", ")), 156 Value: "GrayGlacier", 157 } 158 VerbosityFlag = &cli.IntFlag{ 159 Name: "verbosity", 160 Usage: "sets the verbosity level", 161 Value: 3, 162 } 163 )