├── .gitignore ├── doc ├── notes.md ├── replay-tx.md ├── server.md └── replay.md ├── replayer ├── types.go ├── neard │ ├── utils.go │ └── neard.go ├── tx.go ├── util_test.go ├── begin_block.go ├── block.go ├── begin_chain.go ├── genesis.go ├── util.go ├── create_account.go ├── stats.go ├── replay_tx.go └── replayer.go ├── scripts ├── replay_testnet.sh ├── test_local_setup.sh ├── deploy_testnet.sh └── test_local.sh ├── .github └── workflows │ ├── ci.yml │ └── codeql-analysis.yml ├── util ├── tar │ └── tar.go ├── gnumake │ └── gnumake.go ├── util.go ├── git │ └── git.go ├── aurora │ └── aurora.go └── hashcache │ └── hashcache.go ├── Makefile ├── command ├── command.go ├── genesis.go ├── block.go ├── dumpdb.go ├── replay_tx.go ├── state.go ├── stats.go ├── create_account.go ├── delete.go ├── send.go ├── util.go ├── call.go └── replay.go ├── README.md ├── go.mod ├── evm-bully.go ├── LICENSE ├── db └── db.go └── go.sum /.gitignore: -------------------------------------------------------------------------------- 1 | evm-bully 2 | -------------------------------------------------------------------------------- /doc/notes.md: -------------------------------------------------------------------------------- 1 | ## Ethereum testnet sizes 2 | 3 | - goerli: \~13 GB 4 | - rinkeby: \~66 GB 5 | - ropsten: \~105 GB 6 | -------------------------------------------------------------------------------- /replayer/types.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | // RawAddress type for Aurora Engine. 4 | type RawAddress [20]uint8 5 | 6 | // RawU256 type for Aurora Engine (big-endian large integer type). 7 | type RawU256 [32]uint8 8 | -------------------------------------------------------------------------------- /scripts/replay_testnet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ $# -ne 0 ] 4 | then 5 | echo "Usage: $0" >&2 6 | exit 1 7 | fi 8 | 9 | ACCOUNT=evm-bully.testnet 10 | 11 | evm-bully -v replay -accountId evm.$ACCOUNT -goerli evm.$ACCOUNT 12 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | build: 11 | runs-on: runs-on=${{ github.run_id }}/family=c5a.2xlarge+c6a.2xlarge/image=ubuntu24-full-x64 12 | steps: 13 | - uses: actions/checkout@v2 14 | - run: make 15 | - run: make test 16 | -------------------------------------------------------------------------------- /scripts/test_local_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | echo "Usage: $0 testnet_flag evm.wasm" >&2 6 | exit 1 7 | fi 8 | 9 | env NEAR_ENV=local evm-bully -v replay \ 10 | -initial-balance 1000 \ 11 | -keyPath $HOME/.near/local/validator_key.json \ 12 | -autobreak -setup -skip $1 -contract $2 13 | -------------------------------------------------------------------------------- /util/tar/tar.go: -------------------------------------------------------------------------------- 1 | // Package tar contains wrappers around some tar commands. 2 | package tar 3 | 4 | import ( 5 | "os" 6 | "os/exec" 7 | ) 8 | 9 | // Create creates a tar archive for the given dir. 10 | func Create(dir string) error { 11 | cmd := exec.Command("tar", "cvzf", dir+".tar.gz", dir) 12 | cmd.Stdout = os.Stdout 13 | cmd.Stderr = os.Stderr 14 | return cmd.Run() 15 | } 16 | -------------------------------------------------------------------------------- /scripts/deploy_testnet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ $# -ne 1 ] 4 | then 5 | echo "Usage: $0 evm.wasm" >&2 6 | exit 1 7 | fi 8 | 9 | ACCOUNT=evm-bully.testnet 10 | 11 | near delete evm.$ACCOUNT $ACCOUNT 12 | near create-account evm.$ACCOUNT --master-account=$ACCOUNT --initial-balance=100 13 | env NEAR_ENV=testnet aurora install --chain 1313161556 --engine evm.$ACCOUNT --signer evm.$ACCOUNT --owner evm.$ACCOUNT $1 14 | -------------------------------------------------------------------------------- /util/gnumake/gnumake.go: -------------------------------------------------------------------------------- 1 | // Package gnumake contains wrappers around some Make commands. 2 | package gnumake 3 | 4 | import ( 5 | "os" 6 | "os/exec" 7 | ) 8 | 9 | // Make calls make in the directory by provided path. 10 | func Make(path string, args ...string) error { 11 | cmd := exec.Command("make", args...) 12 | cmd.Dir = path 13 | cmd.Stdout = os.Stdout 14 | cmd.Stderr = os.Stderr 15 | return cmd.Run() 16 | } 17 | -------------------------------------------------------------------------------- /scripts/test_local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | echo "Usage: $0 testnet_flag evm.wasm" >&2 6 | exit 1 7 | fi 8 | 9 | ACCOUNT=test.near 10 | EVM=`openssl rand -hex 16` 11 | 12 | export NEAR_ENV=local 13 | 14 | near create-account $EVM.$ACCOUNT --master-account=$ACCOUNT --initial-balance=1000 --keyPath=$HOME/.near/local/validator_key.json 15 | aurora install --chain 1313161556 --engine $EVM.$ACCOUNT --signer $EVM.$ACCOUNT --owner $EVM.$ACCOUNT $2 16 | 17 | evm-bully -v replay -accountId $EVM.$ACCOUNT $1 -skip $EVM.$ACCOUNT 18 | -------------------------------------------------------------------------------- /util/util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | 7 | "github.com/frankbraun/codechain/util/homedir" 8 | ) 9 | 10 | // DetermineCacheDir determines the evm-bully cache directory: 11 | // ~/.config/evm-bully/tetstnet 12 | func DetermineCacheDir(testnet string) (string, error) { 13 | homeDir := homedir.Get("evm-bully") 14 | cacheDir := filepath.Join(homeDir, testnet) 15 | // make sure cache directory exists 16 | if err := os.MkdirAll(cacheDir, 0755); err != nil { 17 | return "", err 18 | } 19 | return cacheDir, nil 20 | } 21 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all install fmt test test-install 2 | 3 | all: 4 | env GO111MODULE=on go build -v . 5 | 6 | install: 7 | env GO111MODULE=on go install -v . 8 | 9 | fmt: 10 | pandoc -o tmp.md -s README.md 11 | mv tmp.md README.md 12 | pandoc -o tmp.md -s doc/server.md 13 | mv tmp.md doc/server.md 14 | pandoc -o tmp.md -s doc/notes.md 15 | mv tmp.md doc/notes.md 16 | 17 | test: 18 | gocheck -c -e doc -e scripts 19 | 20 | test-install: 21 | go get github.com/frankbraun/gocheck 22 | go get golang.org/x/tools/cmd/goimports 23 | go get golang.org/x/lint/golint 24 | -------------------------------------------------------------------------------- /replayer/neard/utils.go: -------------------------------------------------------------------------------- 1 | package neard 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/buger/jsonparser" 7 | ) 8 | 9 | type jsonEdit struct { 10 | Path []string 11 | Value string 12 | } 13 | 14 | func editJSONFile(filename string, edits []*jsonEdit) error { 15 | data, err := os.ReadFile(filename) 16 | if err != nil { 17 | return err 18 | } 19 | for _, edit := range edits { 20 | data, err = jsonparser.Set(data, []byte(edit.Value), edit.Path...) 21 | if err != nil { 22 | return err 23 | } 24 | } 25 | if err := os.WriteFile(filename, data, 0644); err != nil { 26 | return err 27 | } 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /replayer/tx.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import "github.com/aurora-is-near/evm-bully/db" 4 | 5 | // Tx defines a replayer transaction. 6 | type Tx struct { 7 | BlockNum int // block number (-1 if undefined) 8 | TxNum int // transaction number 9 | Comment string // comment for the transaction 10 | MethodName string // the Aurora Engine method name to call 11 | Args []byte // the argument to call the method with 12 | EthTx *db.Transaction // pointer to original Ethereum transaction (for 'submit') 13 | Error error // error during transaction construction 14 | } 15 | -------------------------------------------------------------------------------- /command/command.go: -------------------------------------------------------------------------------- 1 | // Package command implements the evm-bully commands. 2 | package command 3 | 4 | import ( 5 | "github.com/ethereum/go-ethereum/node" 6 | ) 7 | 8 | const ( 9 | // 2021-05-07 10 | defaultGoerliBlockHeight = 4747554 11 | defaultGoerliBlockHash = "0xca3f0a8bcbfadf60994423da4009b9519ccab6e1e91c637888d313ecf24f0a1a" 12 | defaultRinkebyBlockHeight = 8541193 13 | defaultRinkebyBlockHash = "0x9afd56145c5a771967b0d86800338694214e9c83d9d89d52215d916b555d9cd5" 14 | defaultRopstenBlockHeight = 10187164 15 | defaultRopstenBlockHash = "0x000f6b7fc929f6f3a493cad3cee9d65274e51228a05970cf03ad7fb6664007a6" 16 | ) 17 | 18 | const ( 19 | defaultGas = 300000000000000 20 | defaultInitialBalance = "100" 21 | ) 22 | 23 | var ( 24 | defaultDataDir = node.DefaultDataDir() 25 | ) 26 | -------------------------------------------------------------------------------- /command/genesis.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/aurora-is-near/evm-bully/replayer" 9 | ) 10 | 11 | // Genesis implements the 'genesis' command. 12 | func Genesis(argv0 string, args ...string) error { 13 | var f testnetFlags 14 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 15 | fs.Usage = func() { 16 | fmt.Fprintf(os.Stderr, "Usage: %s\n", argv0) 17 | fmt.Fprintf(os.Stderr, "Process genesis block.\n") 18 | fs.PrintDefaults() 19 | } 20 | f.registerFlags(fs) 21 | if err := fs.Parse(args); err != nil { 22 | return err 23 | } 24 | _, testnet, err := f.determineTestnet() 25 | if err != nil { 26 | return err 27 | } 28 | if fs.NArg() != 0 { 29 | fs.Usage() 30 | return flag.ErrHelp 31 | } 32 | return replayer.ProcGenesisBlock(testnet) 33 | } 34 | -------------------------------------------------------------------------------- /util/git/git.go: -------------------------------------------------------------------------------- 1 | // Package git contains wrappers around some Git commands. 2 | package git 3 | 4 | import ( 5 | "bytes" 6 | "os" 7 | "os/exec" 8 | "strings" 9 | ) 10 | 11 | // Head returns the current Git HEAD in the repository by given path. 12 | func Head(repoPath string) (string, error) { 13 | cmd := exec.Command("git", "rev-parse", "HEAD") 14 | cmd.Dir = repoPath 15 | var stdout bytes.Buffer 16 | cmd.Stdout = &stdout 17 | cmd.Stderr = os.Stderr 18 | if err := cmd.Run(); err != nil { 19 | return "", err 20 | } 21 | return strings.TrimSpace(stdout.String()), nil 22 | } 23 | 24 | // Checkout checks out the given head in the repository by given path. 25 | func Checkout(repoPath string, head string) error { 26 | cmd := exec.Command("git", "checkout", head) 27 | cmd.Dir = repoPath 28 | cmd.Stdout = os.Stdout 29 | cmd.Stderr = os.Stderr 30 | return cmd.Run() 31 | } 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## `evm-bully` --- stress testing and benchmarking tool for the NEAR EVM 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/github.com/aurora-is-near/evm-bully.svg)](https://pkg.go.dev/github.com/aurora-is-near/evm-bully) 4 | [![CI](https://github.com/aurora-is-near/evm-bully/actions/workflows/ci.yml/badge.svg)](https://github.com/aurora-is-near/evm-bully/actions/workflows/ci.yml) 5 | [![Go Report Card](https://goreportcard.com/badge/github.com/aurora-is-near/evm-bully)](https://goreportcard.com/report/github.com/aurora-is-near/evm-bully) 6 | 7 | ### Installation 8 | 9 | go get -u -v github.com/aurora-is-near/evm-bully 10 | 11 | (How to [install Go](https://golang.org/doc/install). Add `$GOPATH/bin` 12 | to your `$PATH`.) 13 | 14 | ### Documentation 15 | 16 | - [Server setup](doc/server.md) 17 | - [Replaying an Ethereum testnet](doc/replay.md) 18 | - [Replay failing transactions](doc/replay-tx.md) 19 | -------------------------------------------------------------------------------- /command/block.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "encoding/json" 5 | "flag" 6 | "fmt" 7 | "os" 8 | 9 | "github.com/aurora-is-near/near-api-go" 10 | ) 11 | 12 | // Block implements the 'block' command. 13 | func Block(argv0 string, args ...string) error { 14 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 15 | fs.Usage = func() { 16 | fmt.Fprintf(os.Stderr, "Usage: %s\n", argv0) 17 | fmt.Fprintf(os.Stderr, "Queries network for latest block details.\n") 18 | fs.PrintDefaults() 19 | } 20 | cfg := near.GetConfig() 21 | registerCfgFlags(fs, cfg, false) 22 | if err := fs.Parse(args); err != nil { 23 | return err 24 | } 25 | if fs.NArg() != 0 { 26 | fs.Usage() 27 | return flag.ErrHelp 28 | } 29 | c := near.NewConnection(cfg.NodeURL) 30 | res, err := c.Block() 31 | if err != nil { 32 | return err 33 | } 34 | jsn, err := json.MarshalIndent(res, "", " ") 35 | if err != nil { 36 | return err 37 | } 38 | fmt.Println(string(jsn)) 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /replayer/util_test.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "math/big" 5 | "reflect" 6 | "testing" 7 | ) 8 | 9 | func TestBigIntToRawU256(t *testing.T) { 10 | input := big.NewInt(256*256*256*13 + 37) 11 | expectedOutput := RawU256{ 12 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 37, 13 | } 14 | 15 | output, err := bigIntToRawU256(input) 16 | if err != nil { 17 | t.Fatalf("bigIntToRawU256(input) returns error, but it shouldn't") 18 | } 19 | if !reflect.DeepEqual(output, expectedOutput) { 20 | t.Fatalf("bigIntToRawU256(input) result is %v, but expected value is %v", output, expectedOutput) 21 | } 22 | } 23 | 24 | func TestBigIntToRawU256Overflow(t *testing.T) { 25 | // 2^300 shouldn't fit into RawU256 26 | input := big.NewInt(0) 27 | input.Exp(big.NewInt(2), big.NewInt(300), nil) 28 | 29 | _, err := bigIntToRawU256(input) 30 | if err == nil { 31 | t.Fatalf("bigIntToRawU256(2^300) has to return error, but didn't") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /replayer/begin_block.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "encoding/binary" 5 | "fmt" 6 | 7 | "github.com/near/borsh-go" 8 | ) 9 | 10 | // BeginBlockArgs encodes the arguments for 'begin_block'. 11 | type BeginBlockArgs struct { 12 | Hash RawU256 13 | Coinbase RawAddress 14 | Timestamp RawU256 15 | Number RawU256 16 | Difficulty RawU256 17 | Gaslimit RawU256 18 | } 19 | 20 | func beginBlockTx(gas uint64, c *blockContext) *Tx { 21 | var args BeginBlockArgs 22 | copy(args.Hash[:], c.hash[:]) 23 | copy(args.Coinbase[:], c.coinbase[:]) 24 | binary.LittleEndian.PutUint64(args.Timestamp[:], c.timestamp) 25 | binary.LittleEndian.PutUint64(args.Number[:], c.number) 26 | binary.LittleEndian.PutUint64(args.Difficulty[:], c.difficulty) 27 | binary.LittleEndian.PutUint64(args.Gaslimit[:], c.gaslimit) 28 | 29 | data, err := borsh.Serialize(args) 30 | if err != nil { 31 | return &Tx{Error: err} 32 | } 33 | 34 | return &Tx{ 35 | Comment: fmt.Sprintf("begin_block(%d)", c.number), 36 | MethodName: "begin_block", 37 | Args: data, 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /command/dumpdb.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/aurora-is-near/evm-bully/db" 9 | ) 10 | 11 | // DumpDB implements the 'dumpdb' command. 12 | func DumpDB(argv0 string, args ...string) error { 13 | var f testnetFlags 14 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 15 | fs.Usage = func() { 16 | fmt.Fprintf(os.Stderr, "Usage: %s\n", argv0) 17 | fmt.Fprintf(os.Stderr, "Calculate testnet statistics.\n") 18 | fs.PrintDefaults() 19 | } 20 | block := fs.Uint64("block", defaultGoerliBlockHeight, "Block height") 21 | dataDir := fs.String("datadir", defaultDataDir, "Data directory containing the database to read") 22 | defrost := fs.Bool("defrost", false, "Defrost the database first") 23 | hash := fs.String("hash", defaultGoerliBlockHash, "Block hash") 24 | f.registerFlags(fs) 25 | if err := fs.Parse(args); err != nil { 26 | return err 27 | } 28 | _, testnet, err := f.determineTestnet() 29 | if err != nil { 30 | return err 31 | } 32 | adjustBlockDefaults(block, hash, testnet) 33 | if fs.NArg() != 0 { 34 | fs.Usage() 35 | return flag.ErrHelp 36 | } 37 | // dump database 38 | return db.Dump(*dataDir, testnet, *block, *hash, *defrost) 39 | } 40 | -------------------------------------------------------------------------------- /command/replay_tx.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/aurora-is-near/evm-bully/replayer" 9 | "github.com/aurora-is-near/near-api-go" 10 | ) 11 | 12 | // ReplayTx implements the 'replay-tx' command. 13 | func ReplayTx(argv0 string, args ...string) error { 14 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 15 | fs.Usage = func() { 16 | fmt.Fprintf(os.Stderr, "Usage: %s \n", argv0) 17 | fmt.Fprintf(os.Stderr, "Replay transaction from breakpoint directory.\n") 18 | fs.PrintDefaults() 19 | } 20 | build := fs.Bool("build", false, "Build nearcore and aurora-engine before replaying tx") 21 | contract := fs.String("contract", "", "Upgrade EVM contract with file before replaying tx") 22 | gas := fs.Uint64("gas", defaultGas, "Max amount of gas a call can use (in gas units)") 23 | release := fs.Bool("release", false, "Run release version of neard") 24 | cfg := near.GetConfig() 25 | registerCfgFlags(fs, cfg, true) 26 | if err := fs.Parse(args); err != nil { 27 | return err 28 | } 29 | if fs.NArg() != 1 { 30 | fs.Usage() 31 | return flag.ErrHelp 32 | } 33 | breakpointDir := fs.Arg(0) 34 | return replayer.ReplayTx(breakpointDir, *build, *contract, *release, *gas) 35 | } 36 | -------------------------------------------------------------------------------- /command/state.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "encoding/json" 5 | "flag" 6 | "fmt" 7 | "os" 8 | 9 | "github.com/aurora-is-near/near-api-go" 10 | "github.com/aurora-is-near/near-api-go/utils" 11 | ) 12 | 13 | // State implements the 'state' command. 14 | func State(argv0 string, args ...string) error { 15 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 16 | fs.Usage = func() { 17 | fmt.Fprintf(os.Stderr, "Usage: %s \n", argv0) 18 | fmt.Fprintf(os.Stderr, "View account state.\n") 19 | fs.PrintDefaults() 20 | } 21 | cfg := near.GetConfig() 22 | registerCfgFlags(fs, cfg, false) 23 | if err := fs.Parse(args); err != nil { 24 | return err 25 | } 26 | if fs.NArg() != 1 { 27 | fs.Usage() 28 | return flag.ErrHelp 29 | } 30 | accountID := fs.Arg(0) 31 | c := near.NewConnection(cfg.NodeURL) 32 | res, err := c.GetAccountState(accountID) 33 | if err != nil { 34 | return err 35 | } 36 | amount, ok := res["amount"].(string) 37 | if ok { 38 | fa, err := utils.FormatNearAmount(amount) 39 | if err != nil { 40 | return err 41 | } 42 | res["formattedAmount"] = fa 43 | } 44 | jsn, err := json.MarshalIndent(res, "", " ") 45 | if err != nil { 46 | return err 47 | } 48 | fmt.Println(string(jsn)) 49 | return nil 50 | } 51 | -------------------------------------------------------------------------------- /command/stats.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/aurora-is-near/evm-bully/replayer" 9 | ) 10 | 11 | // Stats implements the 'stats' command. 12 | func Stats(argv0 string, args ...string) error { 13 | var f testnetFlags 14 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 15 | fs.Usage = func() { 16 | fmt.Fprintf(os.Stderr, "Usage: %s\n", argv0) 17 | fmt.Fprintf(os.Stderr, "Calculate testnet statistics.\n") 18 | fs.PrintDefaults() 19 | } 20 | block := fs.Uint64("block", defaultGoerliBlockHeight, "Block height") 21 | dataDir := fs.String("datadir", defaultDataDir, "Data directory containing the database to read") 22 | defrost := fs.Bool("defrost", false, "Defrost the database first") 23 | dump := fs.Bool("dump", false, "Use dump file instead of database") 24 | hash := fs.String("hash", defaultGoerliBlockHash, "Block hash") 25 | f.registerFlags(fs) 26 | if err := fs.Parse(args); err != nil { 27 | return err 28 | } 29 | _, testnet, err := f.determineTestnet() 30 | if err != nil { 31 | return err 32 | } 33 | adjustBlockDefaults(block, hash, testnet) 34 | if fs.NArg() != 0 { 35 | fs.Usage() 36 | return flag.ErrHelp 37 | } 38 | // calculate statistics 39 | return replayer.CalcStats(*dataDir, testnet, *block, *hash, *defrost, *dump) 40 | } 41 | -------------------------------------------------------------------------------- /util/aurora/aurora.go: -------------------------------------------------------------------------------- 1 | // Package aurora contains wrappers around some Aurora CLI commands. 2 | package aurora 3 | 4 | import ( 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "strconv" 9 | "strings" 10 | 11 | "github.com/ethereum/go-ethereum/log" 12 | ) 13 | 14 | var auroraCliPath string 15 | 16 | func init() { 17 | auroraCliPath = "aurora" 18 | } 19 | 20 | // SetAuroraCliPath sets aurora-cli path (or alias) 21 | func SetAuroraCliPath(path string) { 22 | auroraCliPath = path 23 | } 24 | 25 | // Install the EVM contract with given accountID owner and chainID. 26 | func Install(accountID string, chainID uint8, contract string) error { 27 | args := []string{ 28 | "install", 29 | "--chain", strconv.FormatUint(uint64(chainID), 10), 30 | "--engine", accountID, 31 | "--signer", accountID, 32 | "--owner", accountID, 33 | contract, 34 | } 35 | log.Info(fmt.Sprintf("$ %v %v", auroraCliPath, strings.Join(args, " "))) 36 | cmd := exec.Command(auroraCliPath, args...) 37 | cmd.Stdout = os.Stdout 38 | cmd.Stderr = os.Stderr 39 | return cmd.Run() 40 | } 41 | 42 | // Upgrade the EVM contract with given accountID owner and ChainID. 43 | func Upgrade(accountID string, chainID uint8, contract string) error { 44 | // `aurora upgrade` is an alias for `aurora install` 45 | return Install(accountID, chainID, contract) 46 | } 47 | -------------------------------------------------------------------------------- /replayer/block.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/aurora-is-near/evm-bully/db" 7 | "github.com/ethereum/go-ethereum/common" 8 | ) 9 | 10 | type blockContext struct { 11 | coinbase common.Address // block.coinbase 12 | timestamp uint64 // block.timestamp 13 | number uint64 // block.number 14 | difficulty uint64 // block.difficulty 15 | gaslimit uint64 // block.gaslimit 16 | hash common.Hash // hash = block.blockHash(blockNumber) 17 | } 18 | 19 | func getBlockContext(b *db.Block) (*blockContext, error) { 20 | var c blockContext 21 | var err error 22 | h := b.Header 23 | c.coinbase = b.Coinbase 24 | c.timestamp = b.Time 25 | c.number, err = bigIntToUint64(h.Number) 26 | if err != nil { 27 | return nil, err 28 | } 29 | c.difficulty, err = bigIntToUint64(h.Difficulty) 30 | if err != nil { 31 | return nil, err 32 | } 33 | c.gaslimit = h.GasLimit 34 | c.hash = b.Hash 35 | return &c, nil 36 | } 37 | 38 | func (c *blockContext) dump() { 39 | fmt.Println("block context:") 40 | fmt.Printf("block.coinbase=%s\n", c.coinbase.String()) 41 | fmt.Printf("block.timestamp=%d\n", c.timestamp) 42 | fmt.Printf("block.number=%d\n", c.number) 43 | fmt.Printf("block.difficulty=%d\n", c.difficulty) 44 | fmt.Printf("block.gaslimit=%d\n", c.gaslimit) 45 | fmt.Printf("block.hash=%s\n", c.hash.Hex()) 46 | } 47 | -------------------------------------------------------------------------------- /command/create_account.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "errors" 5 | "flag" 6 | "fmt" 7 | "os" 8 | 9 | "github.com/aurora-is-near/evm-bully/replayer" 10 | "github.com/aurora-is-near/near-api-go" 11 | ) 12 | 13 | // CreateAccount implements the 'create-account' command. 14 | func CreateAccount(argv0 string, args ...string) error { 15 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 16 | fs.Usage = func() { 17 | fmt.Fprintf(os.Stderr, "Usage: %s \n", argv0) 18 | fmt.Fprintf(os.Stderr, "Create a new developer account (subaccount of the masterAccount, ex: app.alice.test)\n") 19 | fs.PrintDefaults() 20 | } 21 | initialBalance := fs.String("initial-balance", defaultInitialBalance, "Number of tokens to transfer to newly created account") 22 | masterAccount := fs.String("master-account", "", "Account used to create requested account") 23 | cfg := near.GetConfig() 24 | registerCfgFlags(fs, cfg, true) 25 | if err := fs.Parse(args); err != nil { 26 | return err 27 | } 28 | if fs.NArg() != 1 { 29 | fs.Usage() 30 | return flag.ErrHelp 31 | } 32 | if *masterAccount == "" { 33 | return errors.New("option -master-account is mandatory") 34 | } 35 | accountID := fs.Arg(0) 36 | // create account 37 | c := replayer.CreateAccount{ 38 | Config: cfg, 39 | InitialBalance: *initialBalance, 40 | MasterAccount: *masterAccount, 41 | } 42 | return c.Create(accountID) 43 | } 44 | -------------------------------------------------------------------------------- /replayer/begin_chain.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/ethereum/go-ethereum/core" 7 | "github.com/near/borsh-go" 8 | ) 9 | 10 | // AccountBalance encodes (genesis) account balances used by the 'begin_chain' function. 11 | type AccountBalance struct { 12 | Account RawAddress 13 | Balance RawU256 14 | } 15 | 16 | // BeginChainArgs encodes the arguments for 'begin_chain'. 17 | type BeginChainArgs struct { 18 | ChainID RawU256 19 | GenesisAlloc []AccountBalance 20 | } 21 | 22 | func genesisAlloc(g *core.Genesis) ([]AccountBalance, error) { 23 | ga := make([]AccountBalance, 0, len(g.Alloc)) 24 | for address, account := range g.Alloc { 25 | var ab AccountBalance 26 | copy(ab.Account[:], address[:]) 27 | b, err := bigIntToRawU256(account.Balance) 28 | if err != nil { 29 | return nil, err 30 | } 31 | ab.Balance = b 32 | ga = append(ga, ab) 33 | } 34 | return ga, nil 35 | } 36 | 37 | func (r *Replayer) beginChainTx(g *core.Genesis) *Tx { 38 | var args BeginChainArgs 39 | var err error 40 | args.ChainID[31] = r.ChainID 41 | args.GenesisAlloc, err = genesisAlloc(g) 42 | if err != nil { 43 | return &Tx{Error: err} 44 | } 45 | data, err := borsh.Serialize(args) 46 | if err != nil { 47 | return &Tx{Error: err} 48 | } 49 | return &Tx{ 50 | Comment: fmt.Sprintf("begin_chain()"), 51 | MethodName: "begin_chain", 52 | Args: data, 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/aurora-is-near/evm-bully 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/VictoriaMetrics/fastcache v1.8.0 // indirect 7 | github.com/aurora-is-near/near-api-go v0.0.11 8 | github.com/btcsuite/btcd v0.22.0-beta // indirect 9 | github.com/buger/jsonparser v1.1.1 10 | github.com/deckarep/golang-set v1.8.0 // indirect 11 | github.com/edsrzf/mmap-go v1.1.0 // indirect 12 | github.com/ethereum/go-ethereum v1.10.15 13 | github.com/fjl/memsize v0.0.1 // indirect 14 | github.com/frankbraun/codechain v1.2.0 15 | github.com/go-stack/stack v1.8.1 // indirect 16 | github.com/golang/protobuf v1.5.2 // indirect 17 | github.com/hashicorp/go-bexpr v0.1.11 // indirect 18 | github.com/jackpal/go-nat-pmp v1.0.2 // indirect 19 | github.com/mattn/go-colorable v0.1.12 // indirect 20 | github.com/mattn/go-runewidth v0.0.13 // indirect 21 | github.com/mitchellh/mapstructure v1.4.3 // indirect 22 | github.com/near/borsh-go v0.3.1 23 | github.com/prometheus/tsdb v0.10.0 // indirect 24 | github.com/rs/cors v1.8.2 // indirect 25 | github.com/shirou/gopsutil v3.21.11+incompatible // indirect 26 | github.com/tklauser/go-sysconf v0.3.9 // indirect 27 | github.com/yusufpapurcu/wmi v1.2.2 // indirect 28 | golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect 29 | golang.org/x/sys v0.0.0-20220111092808-5a964db01320 // indirect 30 | golang.org/x/text v0.3.7 // indirect 31 | google.golang.org/protobuf v1.27.1 // indirect 32 | ) 33 | -------------------------------------------------------------------------------- /replayer/genesis.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | 7 | "github.com/ethereum/go-ethereum/common" 8 | "github.com/ethereum/go-ethereum/core" 9 | ) 10 | 11 | func getGenesisBlock(net string) *core.Genesis { 12 | switch net { 13 | case "goerli": 14 | return core.DefaultGoerliGenesisBlock() 15 | case "rinkeby": 16 | return core.DefaultRinkebyGenesisBlock() 17 | case "ropsten": 18 | return core.DefaultRopstenGenesisBlock() 19 | default: 20 | return core.DefaultGenesisBlock() 21 | } 22 | } 23 | 24 | // AddrSlice is an array of addresses. 25 | type AddrSlice []common.Address 26 | 27 | func (s AddrSlice) Len() int { return len(s) } 28 | func (s AddrSlice) Less(i, j int) bool { return s[i].String() < s[j].String() } 29 | func (s AddrSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } 30 | 31 | func dumpAccounts(g *core.Genesis) error { 32 | var addresses AddrSlice 33 | accounts := make(map[common.Address]string) 34 | for address, account := range g.Alloc { 35 | addresses = append(addresses, address) 36 | accounts[address] = account.Balance.String() 37 | } 38 | sort.Sort(addresses) 39 | for _, a := range addresses { 40 | fmt.Printf("%s: %s\n", a.String(), accounts[a]) 41 | } 42 | return nil 43 | } 44 | 45 | // ProcGenesisBlock processes the genesis block for the given testnet. 46 | func ProcGenesisBlock(testnet string) error { 47 | g := getGenesisBlock(testnet) 48 | return dumpAccounts(g) 49 | } 50 | -------------------------------------------------------------------------------- /doc/replay-tx.md: -------------------------------------------------------------------------------- 1 | ## Replay failing transactions 2 | 3 | It is assumed that the `evm-bully` is run out of the `evm-bully` 4 | repository directory and that it is located "parallel" to the 5 | [`nearcore`](https://github.com/near/nearcore/) and 6 | [`aurora-engine`](https://github.com/aurora-is-near/aurora-engine) 7 | repositories: 8 | 9 | . 10 | ├── aurora-engine 11 | ├── evm-bully 12 | └── nearcore 13 | 14 | ### Install `evm-bully` 15 | 16 | Run `make` in the `evm-bully` directory. 17 | 18 | ### Extract problem `.tar.gz` file 19 | 20 | Example: 21 | 22 | tar xvzf rinkeby-block-55-tx-0.tar.gz 23 | 24 | ### Reproduce problem 25 | 26 | Example: 27 | 28 | evm-bully replay-tx rinkeby-block-55-tx-0 29 | 30 | This automatically starts the debug version of `neard` in `../nearcore`. 31 | For verbose output pass the global flag `-v` to the `evm-bully` binary: 32 | 33 | evm-bully -v replay-tx rinkeby-block-55-tx-0 34 | 35 | ### Options 36 | 37 | - Use `-release` to run release version of `neard`. 38 | - Use `-build` to build "nearcore" version of `neard` given in 39 | `breakpoint.json` before running it. 40 | - Use `-contract` to update the EVM contract in `neard` state before 41 | replaying transaction (for debugging). 42 | 43 | `-contract` requires that given the contract in `../aurora-engine/` has 44 | been build with `make evm-bully=yes` and that 45 | [aurora-cli](https://github.com/aurora-is-near/aurora-cli) is installed 46 | in `$PATH`. 47 | -------------------------------------------------------------------------------- /command/delete.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "encoding/json" 5 | "flag" 6 | "fmt" 7 | "os" 8 | 9 | "github.com/aurora-is-near/near-api-go" 10 | "github.com/aurora-is-near/near-api-go/utils" 11 | ) 12 | 13 | // Delete implements the 'delete' command. 14 | func Delete(argv0 string, args ...string) error { 15 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 16 | fs.Usage = func() { 17 | fmt.Fprintf(os.Stderr, "Usage: %s \n", argv0) 18 | fmt.Fprintf(os.Stderr, "Delete an account and transfer funds to beneficiary account.\n") 19 | fs.PrintDefaults() 20 | } 21 | cfg := near.GetConfig() 22 | registerCfgFlags(fs, cfg, true) 23 | if err := fs.Parse(args); err != nil { 24 | return err 25 | } 26 | if fs.NArg() != 2 { 27 | fs.Usage() 28 | return flag.ErrHelp 29 | } 30 | accountID := fs.Arg(0) 31 | beneficiaryID := fs.Arg(1) 32 | c := near.NewConnection(cfg.NodeURL) 33 | a, err := near.LoadAccount(c, cfg, accountID) 34 | if err != nil { 35 | return err 36 | } 37 | fmt.Printf("Deleting account. Account ID: %s, node: %s, beneficiary: %s\n", 38 | accountID, cfg.NodeURL, beneficiaryID) 39 | txResult, err := a.DeleteAccount(beneficiaryID) 40 | if err != nil { 41 | return err 42 | } 43 | utils.PrettyPrintResponse(txResult) 44 | res, err := near.GetTransactionLastResult(txResult) 45 | if err != nil { 46 | return err 47 | } 48 | if res != nil { 49 | jsn, err := json.MarshalIndent(res, "", " ") 50 | if err != nil { 51 | return err 52 | } 53 | fmt.Println(string(jsn)) 54 | } 55 | return nil 56 | } 57 | -------------------------------------------------------------------------------- /replayer/util.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "fmt" 5 | "math/big" 6 | "path/filepath" 7 | "time" 8 | 9 | "github.com/aurora-is-near/evm-bully/util/git" 10 | "github.com/ethereum/go-ethereum/log" 11 | ) 12 | 13 | func auroraEngineHead(contract string) (string, error) { 14 | // get current HEAD in aurora-engine directory 15 | head, err := git.Head(filepath.Dir(contract)) 16 | if err != nil { 17 | return "", err 18 | } 19 | log.Info(fmt.Sprintf("head=%s", head)) 20 | return head, nil 21 | } 22 | 23 | // bigIntToUint64 converts a big integer b to a uint64, if possible. 24 | func bigIntToUint64(b *big.Int) (uint64, error) { 25 | if !b.IsUint64() { 26 | return 0, 27 | fmt.Errorf("replayer: big.Int cannot be represented as uint64: %s", 28 | b.String()) 29 | } 30 | return b.Uint64(), nil 31 | } 32 | 33 | // bigIntToRawU256 converts a big integer b to a RawU256, if possible. 34 | func bigIntToRawU256(b *big.Int) (RawU256, error) { 35 | var res RawU256 36 | bytes := b.Bytes() 37 | if len(bytes) > 32 { 38 | return res, 39 | fmt.Errorf("replayer: big.Int cannot be represented as RawU256: %s", 40 | b.String()) 41 | } 42 | // the encoding is already big-endian 43 | copy(res[32-len(bytes):], bytes[:]) 44 | return res, nil 45 | } 46 | 47 | func checkUntilTrue(timeout time.Duration, msg string, predicate func() bool) bool { 48 | for start := time.Now(); time.Since(start) < timeout; { 49 | if predicate() { 50 | return true 51 | } 52 | log.Info(fmt.Sprintf("%v, sleeping for 1 second...", msg)) 53 | time.Sleep(time.Second) 54 | } 55 | return false 56 | } 57 | -------------------------------------------------------------------------------- /command/send.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "encoding/json" 5 | "flag" 6 | "fmt" 7 | "os" 8 | 9 | "github.com/aurora-is-near/near-api-go" 10 | "github.com/aurora-is-near/near-api-go/utils" 11 | ) 12 | 13 | // Send implements the 'send' command. 14 | func Send(argv0 string, args ...string) error { 15 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 16 | fs.Usage = func() { 17 | fmt.Fprintf(os.Stderr, "Usage: %s \n", argv0) 18 | fmt.Fprintf(os.Stderr, "Send tokens to given receiver.\n") 19 | fs.PrintDefaults() 20 | } 21 | cfg := near.GetConfig() 22 | registerCfgFlags(fs, cfg, true) 23 | if err := fs.Parse(args); err != nil { 24 | return err 25 | } 26 | if fs.NArg() != 3 { 27 | fs.Usage() 28 | return flag.ErrHelp 29 | } 30 | sender := fs.Arg(0) 31 | receiver := fs.Arg(1) 32 | amount := fs.Arg(2) 33 | c := near.NewConnection(cfg.NodeURL) 34 | a, err := near.LoadAccount(c, cfg, sender) 35 | if err != nil { 36 | return err 37 | } 38 | amnt, err := utils.ParseNearAmountAsBigInt(amount) 39 | if err != nil { 40 | return err 41 | } 42 | fmt.Printf("Sending %s NEAR to %s from %s\n", amount, receiver, sender) 43 | txResult, err := a.SendMoney(receiver, *amnt) 44 | if err != nil { 45 | return err 46 | } 47 | utils.PrettyPrintResponse(txResult) 48 | res, err := near.GetTransactionLastResult(txResult) 49 | if err != nil { 50 | return err 51 | } 52 | if res != nil { 53 | jsn, err := json.MarshalIndent(res, "", " ") 54 | if err != nil { 55 | return err 56 | } 57 | fmt.Println(string(jsn)) 58 | } 59 | return nil 60 | } 61 | -------------------------------------------------------------------------------- /util/hashcache/hashcache.go: -------------------------------------------------------------------------------- 1 | // Package hashcache implements a cache file for block hashes. 2 | package hashcache 3 | 4 | import ( 5 | "bufio" 6 | "os" 7 | "path/filepath" 8 | 9 | "github.com/ethereum/go-ethereum/common" 10 | "github.com/frankbraun/codechain/util/file" 11 | "github.com/frankbraun/codechain/util/lockfile" 12 | ) 13 | 14 | const ( 15 | defaultFilename = "hashcache.txt" 16 | ) 17 | 18 | // Load block hashes from hash cache file in cacheDir. 19 | func Load(cacheDir string) ([]common.Hash, error) { 20 | filename := filepath.Join(cacheDir, defaultFilename) 21 | l, err := lockfile.Create(filename) 22 | if err != nil { 23 | return nil, err 24 | } 25 | defer l.Release() 26 | exists, err := file.Exists(filename) 27 | if err != nil { 28 | return nil, err 29 | } 30 | if !exists { 31 | return nil, nil 32 | } 33 | f, err := os.Open(filename) 34 | if err != nil { 35 | return nil, err 36 | } 37 | defer f.Close() 38 | s := bufio.NewScanner(f) 39 | var blocks []common.Hash 40 | for s.Scan() { 41 | blocks = append(blocks, common.HexToHash(s.Text())) 42 | } 43 | if err := s.Err(); err != nil { 44 | return nil, err 45 | } 46 | return blocks, nil 47 | 48 | } 49 | 50 | // Save hashes from blocks in hash cache file in cacheDir. 51 | func Save(cacheDir string, blocks []common.Hash) error { 52 | filename := filepath.Join(cacheDir, defaultFilename) 53 | l, err := lockfile.Create(filename) 54 | if err != nil { 55 | return err 56 | } 57 | defer l.Release() 58 | f, err := os.Create(filename) 59 | if err != nil { 60 | return err 61 | } 62 | defer f.Close() 63 | for _, block := range blocks { 64 | if _, err := f.WriteString(block.Hex() + "\n"); err != nil { 65 | return err 66 | } 67 | } 68 | return nil 69 | } 70 | -------------------------------------------------------------------------------- /doc/server.md: -------------------------------------------------------------------------------- 1 | ## Server setup 2 | 3 | Instructions for a local Ubuntu 20.04 LTS development environment. 4 | 5 | ### Some tools 6 | 7 | sudo apt install -y build-essential lld git ncdu tree screen 8 | 9 | ### Get Rust 10 | 11 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 12 | 13 | Follow instructions that appear after that command, then: 14 | 15 | rustup target add wasm32-unknown-unknown 16 | 17 | **Note**: this custom target is not strictly needed for running a 18 | nearcore node, but is needed for building smart contracts in Rust. 19 | 20 | ### Set up NEAR node 21 | 22 | Clone the [nearcore repository](https://github.com/near/nearcore) with: 23 | 24 | git clone https://github.com/near/nearcore.git 25 | 26 | Navigate to the project root: 27 | 28 | cd nearcore 29 | 30 | Build (this will take a while, feel free to move on to future steps 31 | while this is happening): 32 | 33 | cargo build -p neard --release --features nightly_protocol_features 34 | 35 | When the build is complete, initialize with: 36 | 37 | ./target/release/neard --home=$HOME/.near/local init 38 | 39 | Then run: 40 | 41 | ./target/release/neard --home=$HOME/.near/local run 42 | 43 | **Note**: hit Ctrl + C to stop the local node. If you want to pick up 44 | where you left off, just use this final "run" command again. If you'd 45 | like to start from scratch, remove the folder: 46 | 47 | rm -rf ~/.near/local 48 | 49 | and then use the "initialize" and "run" commands. 50 | 51 | ### Set up Node.js 52 | 53 | curl -sL https://deb.nodesource.com/setup_15.x -o nodesource_setup.sh 54 | sudo bash nodesource_setup.sh 55 | sudo apt install -y nodejs 56 | sudo npm install -g near-cli 57 | sudo npm install -g aurora-is-near/aurora-cli 58 | 59 | ### Install Go 60 | 61 | See https://golang.org/doc/install 62 | 63 | ### Install `geth` 64 | 65 | See https://github.com/ethereum/go-ethereum 66 | 67 | ### Synching testnets 68 | 69 | geth --ropsten --verbosity=2 --vmodule core=3 70 | geth --rinkeby --verbosity=2 --vmodule core=3 --port 30304 71 | geth --goerli --verbosity=2 --vmodule core=3 --port 30305 72 | -------------------------------------------------------------------------------- /command/util.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "errors" 5 | "flag" 6 | "fmt" 7 | 8 | "github.com/aurora-is-near/near-api-go" 9 | ) 10 | 11 | func registerCfgFlags(fs *flag.FlagSet, cfg *near.Config, keyPath bool) { 12 | if keyPath { 13 | fs.StringVar(&cfg.KeyPath, "keyPath", cfg.KeyPath, "Path to master account key") 14 | } 15 | fs.StringVar(&cfg.NodeURL, "nodeUrl", cfg.NodeURL, "NEAR node URL") 16 | } 17 | 18 | type testnetFlags struct { 19 | goerli bool 20 | rinkeby bool 21 | ropsten bool 22 | } 23 | 24 | func (f *testnetFlags) registerFlags(fs *flag.FlagSet) { 25 | fs.BoolVar(&f.goerli, "goerli", false, "Use the Görli testnet") 26 | fs.BoolVar(&f.rinkeby, "rinkeby", false, "Use the Rinkeby testnet") 27 | fs.BoolVar(&f.ropsten, "ropsten", false, "Use the Ropsten testnet") 28 | } 29 | 30 | func (f *testnetFlags) determineTestnet() (chainID uint8, testnet string, err error) { 31 | if !f.goerli && !f.rinkeby && !f.ropsten { 32 | return 0, "", errors.New("one of the options -goerli, -rinkeby, or -ropsten is mandatory") 33 | } 34 | if f.goerli && f.rinkeby { 35 | return 0, "", errors.New("the options -goerli and -rinkeby exclude each other") 36 | } 37 | if f.goerli && f.ropsten { 38 | return 0, "", errors.New("the options -goerli and -ropsten exclude each other") 39 | } 40 | if f.rinkeby && f.ropsten { 41 | return 0, "", errors.New("the options -rinkeby and -ropsten exclude each other") 42 | } 43 | if f.rinkeby { 44 | return 4, "rinkeby", nil 45 | } else if f.ropsten { 46 | return 3, "ropsten", nil 47 | } 48 | // use Görli as the default 49 | return 5, "goerli", nil 50 | } 51 | 52 | func adjustBlockDefaults(block *uint64, hash *string, testnet string) { 53 | switch testnet { 54 | case "rinkeby": 55 | if *block == defaultGoerliBlockHeight && *hash == defaultGoerliBlockHash { 56 | fmt.Printf("changing -block value to %d\n", defaultRinkebyBlockHeight) 57 | *block = defaultRinkebyBlockHeight 58 | fmt.Printf("changing -hash value to %s\n", defaultRinkebyBlockHash) 59 | *hash = defaultRinkebyBlockHash 60 | } 61 | case "ropsten": 62 | if *block == defaultGoerliBlockHeight && *hash == defaultGoerliBlockHash { 63 | fmt.Printf("changing -block value to %d\n", defaultRopstenBlockHeight) 64 | *block = defaultRopstenBlockHeight 65 | fmt.Printf("changing -hash value to %s\n", defaultRopstenBlockHash) 66 | *hash = defaultRopstenBlockHash 67 | } 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '39 21 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'go' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v2 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v1 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 52 | 53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 54 | # If this step fails, then you should remove it and run the build manually (see below) 55 | - name: Autobuild 56 | uses: github/codeql-action/autobuild@v1 57 | 58 | # ℹ️ Command-line programs to run using the OS shell. 59 | # 📚 https://git.io/JvXDl 60 | 61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 62 | # and modify them (or add more) to build your code if your project 63 | # uses a compiled language 64 | 65 | #- run: | 66 | # make bootstrap 67 | # make release 68 | 69 | - name: Perform CodeQL Analysis 70 | uses: github/codeql-action/analyze@v1 71 | -------------------------------------------------------------------------------- /evm-bully.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/aurora-is-near/evm-bully/command" 9 | "github.com/ethereum/go-ethereum/log" 10 | ) 11 | 12 | func init() { 13 | log.Root().SetHandler(log.DiscardHandler()) 14 | } 15 | 16 | func fatal(err error) { 17 | fmt.Fprintf(os.Stderr, "%s: error: %s\n", os.Args[0], err) 18 | os.Exit(1) 19 | } 20 | 21 | func usage() { 22 | cmd := os.Args[0] + " [-v]" 23 | fmt.Fprintf(os.Stderr, "Usage: %s genesis\n", cmd) 24 | fmt.Fprintf(os.Stderr, " %s dumpdb\n", cmd) 25 | fmt.Fprintf(os.Stderr, " %s replay \n", cmd) 26 | fmt.Fprintf(os.Stderr, " %s replay-tx \n", cmd) 27 | fmt.Fprintf(os.Stderr, " %s create-account \n", cmd) 28 | fmt.Fprintf(os.Stderr, " %s block\n", cmd) 29 | fmt.Fprintf(os.Stderr, " %s state \n", cmd) 30 | fmt.Fprintf(os.Stderr, " %s delete \n", cmd) 31 | fmt.Fprintf(os.Stderr, " %s call \n", cmd) 32 | fmt.Fprintf(os.Stderr, " %s send \n", cmd) 33 | fmt.Fprintf(os.Stderr, " %s stats\n", cmd) 34 | fmt.Fprintf(os.Stderr, "Stress test and benchmark the NEAR EVM.\n") 35 | fmt.Fprintf(os.Stderr, "Global flags:\n") 36 | flag.PrintDefaults() 37 | } 38 | 39 | func main() { 40 | // define flags 41 | verbose := flag.Bool("v", false, "Be verbose") 42 | 43 | // parse flags 44 | flag.Usage = usage 45 | flag.Parse() 46 | 47 | // enable logging, if necessary 48 | if *verbose { 49 | log.Root().SetHandler(log.StdoutHandler) 50 | } 51 | 52 | // makes sure a command was given 53 | if flag.NArg() == 0 { 54 | usage() 55 | os.Exit(2) 56 | } 57 | 58 | // call command 59 | var err error 60 | argv0 := os.Args[0] + " " + flag.Args()[0] 61 | args := flag.Args()[1:] 62 | switch flag.Arg(0) { 63 | case "genesis": 64 | err = command.Genesis(argv0, args...) 65 | case "dumpdb": 66 | err = command.DumpDB(argv0, args...) 67 | case "replay": 68 | err = command.Replay(argv0, args...) 69 | case "replay-tx": 70 | err = command.ReplayTx(argv0, args...) 71 | case "create-account": 72 | err = command.CreateAccount(argv0, args...) 73 | case "block": 74 | err = command.Block(argv0, args...) 75 | case "state": 76 | err = command.State(argv0, args...) 77 | case "delete": 78 | err = command.Delete(argv0, args...) 79 | case "call": 80 | err = command.Call(argv0, args...) 81 | case "send": 82 | err = command.Send(argv0, args...) 83 | case "stats": 84 | err = command.Stats(argv0, args...) 85 | default: 86 | usage() 87 | } 88 | if err != nil { 89 | if err != flag.ErrHelp { 90 | fatal(err) 91 | } 92 | os.Exit(2) 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /command/call.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "encoding/base64" 5 | "encoding/json" 6 | "errors" 7 | "flag" 8 | "fmt" 9 | "os" 10 | 11 | "github.com/aurora-is-near/near-api-go" 12 | "github.com/aurora-is-near/near-api-go/utils" 13 | ) 14 | 15 | func parseArgs(args string, base64enc bool) ([]byte, error) { 16 | if base64enc { 17 | b, err := base64.URLEncoding.DecodeString(args) 18 | if err != nil { 19 | return nil, err 20 | } 21 | return b, nil 22 | } 23 | // else 24 | var obj map[string]interface{} 25 | if err := json.Unmarshal([]byte(args), &obj); err != nil { 26 | return nil, err 27 | } 28 | jsn, err := json.Marshal(&obj) 29 | if err != nil { 30 | return nil, err 31 | } 32 | return jsn, nil 33 | } 34 | 35 | // Call implements the 'call' command. 36 | func Call(argv0 string, args ...string) error { 37 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 38 | fs.Usage = func() { 39 | fmt.Fprintf(os.Stderr, "Usage: %s \n", argv0) 40 | fmt.Fprintf(os.Stderr, "Schedule smart contract call which can modify state.\n") 41 | fs.PrintDefaults() 42 | } 43 | cfg := near.GetConfig() 44 | registerCfgFlags(fs, cfg, true) 45 | accountID := fs.String("accountId", "", "Unique identifier for the account that will be used to sign this call") 46 | methodArgs := fs.String("args", "{}", "Arguments to the contract call, in JSON format by default (e.g. '{\"param_a\": \"value\"}')") 47 | base64enc := fs.Bool("base64", false, "Treat arguments as base64-encoded BLOB") 48 | gas := fs.Uint64("gas", defaultGas, "Max amount of gas this call can use (in gas units)") 49 | amount := fs.String("amount", "0", "Number of tokens to attach (in NEAR)") 50 | if err := fs.Parse(args); err != nil { 51 | return err 52 | } 53 | if *accountID == "" { 54 | return errors.New("option -accountId is mandatory") 55 | } 56 | if fs.NArg() != 2 { 57 | fs.Usage() 58 | return flag.ErrHelp 59 | } 60 | contract := fs.Arg(0) 61 | method := fs.Arg(1) 62 | c := near.NewConnection(cfg.NodeURL) 63 | a, err := near.LoadAccount(c, cfg, *accountID) 64 | if err != nil { 65 | return err 66 | } 67 | amnt, err := utils.ParseNearAmountAsBigInt(*amount) 68 | if err != nil { 69 | return err 70 | } 71 | parsedArgs, err := parseArgs(*methodArgs, *base64enc) 72 | if err != nil { 73 | return err 74 | } 75 | fmt.Printf("Scheduling a call: %s.%s(%s)\n", contract, method, *methodArgs) 76 | txResult, err := a.FunctionCall(contract, method, parsedArgs, *gas, *amnt) 77 | if err != nil { 78 | return err 79 | } 80 | utils.PrettyPrintResponse(txResult) 81 | res, err := near.GetTransactionLastResult(txResult) 82 | if err != nil { 83 | return err 84 | } 85 | if res != nil { 86 | jsn, err := json.MarshalIndent(res, "", " ") 87 | if err != nil { 88 | return err 89 | } 90 | fmt.Println(string(jsn)) 91 | } 92 | return nil 93 | } 94 | -------------------------------------------------------------------------------- /replayer/create_account.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "strings" 7 | 8 | "github.com/aurora-is-near/near-api-go" 9 | "github.com/aurora-is-near/near-api-go/keystore" 10 | "github.com/aurora-is-near/near-api-go/utils" 11 | ) 12 | 13 | // TLAMinLength defines the minimum length for top-level accounts. 14 | const TLAMinLength = 32 15 | 16 | // CreateAccount allow to create accounts. 17 | type CreateAccount struct { 18 | Config *near.Config 19 | InitialBalance string 20 | MasterAccount string 21 | } 22 | 23 | // Create account with accountID. 24 | func (ca *CreateAccount) Create(accountID string) error { 25 | splitAccount := strings.Split(accountID, ".") 26 | if len(splitAccount) == 1 { 27 | // TLA (bob-with-at-least-maximum-characters) 28 | if len(splitAccount[0]) < TLAMinLength { 29 | return fmt.Errorf("top-level accounts must be at least %d characters.\n"+ 30 | "Note: this is for advanced usage only. Typical account names are of the form:\n"+ 31 | "app.alice.test, where the masterAccount shares the top-level account (.test).", 32 | TLAMinLength) 33 | } 34 | } 35 | // Subaccounts (short.alice.near, even.more.bob.test, and eventually peter.potato) 36 | // Check that master account TLA matches 37 | if !strings.HasSuffix(accountID, ca.MasterAccount) { 38 | return fmt.Errorf("new account doesn't share the same top-level account. Expecting account name to end in %s", 39 | ca.MasterAccount) 40 | } 41 | c := near.NewConnection(ca.Config.NodeURL) 42 | 43 | // generate key 44 | kp, err := keystore.GenerateEd25519KeyPair(accountID) 45 | if err != nil { 46 | return err 47 | } 48 | 49 | // check to see if account already exists 50 | _, err = c.GetAccountState(accountID) 51 | if err == nil { 52 | return fmt.Errorf("sorry, account '%s' already exists", accountID) 53 | } else if !strings.Contains(err.Error(), "does not exist while viewing") { 54 | return err 55 | } 56 | 57 | amnt, err := utils.ParseNearAmountAsBigInt(ca.InitialBalance) 58 | if err != nil { 59 | return err 60 | } 61 | a, err := near.LoadAccount(c, ca.Config, ca.MasterAccount) 62 | if err != nil { 63 | fmt.Println("error") 64 | return err 65 | } 66 | 67 | // save key 68 | filename, err := kp.Write(ca.Config.NetworkID) 69 | if err != nil { 70 | return err 71 | } 72 | fmt.Printf("saving key to '%s'\n", filename) 73 | 74 | // create account 75 | txResult, err := a.CreateAccount(accountID, utils.PublicKeyFromEd25519(kp.Ed25519PubKey), *amnt) 76 | if err != nil { 77 | if err == utils.ErrRetriesExceeded { 78 | fmt.Fprintf(os.Stderr, "Received a timeout when creating account, please run:\n") 79 | fmt.Fprintf(os.Stderr, "`evm state %s\n", accountID) 80 | fmt.Fprintf(os.Stderr, "to confirm creation. Keyfile for this account has been saved.\n") 81 | } else { 82 | // remove keyfile 83 | os.Remove(filename) 84 | } 85 | return err 86 | } 87 | utils.PrettyPrintResponse(txResult) 88 | fmt.Printf("account %s for network \"%s\" was created\n", accountID, ca.Config.NetworkID) 89 | return nil 90 | } 91 | -------------------------------------------------------------------------------- /doc/replay.md: -------------------------------------------------------------------------------- 1 | ## Replay an Ethereum testnet 2 | 3 | See [server setup](server.md) for the generic server setup and [replay 4 | transactions](replay-tx.md) on how to replay failing transactions. 5 | 6 | It is assumed that the `evm-bully` is run out of the `evm-bully` 7 | repository directory and that it is located "parallel" to the 8 | [`nearcore`](https://github.com/near/nearcore/) and 9 | [`aurora-engine`](https://github.com/aurora-is-near/aurora-engine) 10 | repositories: 11 | 12 | . 13 | ├── aurora-engine 14 | ├── evm-bully 15 | └── nearcore 16 | 17 | ### Install `evm-bully` 18 | 19 | Run `make` in the `evm-bully` directory. 20 | 21 | ### Compile Aurora Engine 22 | 23 | Run `make evm-bully=yes` in `aurora-engine` directory. 24 | 25 | ### Replay transactions 26 | 27 | Replaying transactions requires that the corresponding Ethereum testnet 28 | is synched, see [synching testnets](server.md#synching-testnets). 29 | 30 | In order to run `evm-bully replay` we either need to manually create a 31 | NEAR account and install the EVM contract to it (see 32 | [`test_local.sh`](../scripts/test_local.sh)) or let the `evm-bully` do 33 | what with the options `-setup` and `-contract`. We use the latter 34 | approach by employing the wrapper script 35 | [`test_local_setup.sh`](../scripts/test_local_setup.sh): 36 | 37 | Example: 38 | 39 | ./scripts/test_local_setup.sh -goerli ../aurora-engine/release.wasm 40 | 41 | ### Options 42 | 43 | - Use `-autobreak` to automatically repeat with a break point after an 44 | error. Leads to a [replayable](replay-tx.md) problem `.tar.gz` file. 45 | - Use `-contract` to set the EVM contract file to deploy. Requires 46 | option `-setup`. 47 | - Use `-initial-balance` to set the number of tokens to transfer to 48 | newly created account. Requires option `-setup`. 49 | - Use `-keyPath` to set the path to master account key. 50 | - Use `-release` to run release version of neard (instead of debug 51 | version). 52 | - Use `-setup` to setup and run neard before replaying (auto-deploys 53 | contract). Requires option `-contract`. See [setup 54 | option](#setup-option) for details. 55 | - Use `-skip` to skip empty blocks during replay. 56 | 57 | #### Testnet options 58 | 59 | - Use `-goerli` to use the Görli testnet. 60 | - Use `-rinkeby` to use the Rinkeby testnet. 61 | - Use `-ropsten` to use the Ropsten testnet. 62 | 63 | ### Setup option 64 | 65 | Using the options `-setup` and `-contract` automatically starts `neard` 66 | and deploys the EVM contract before replaying transactions. The 67 | following steps are executed: 68 | 69 | - Switch to the `nearcore` directory, compile the current `HEAD`, and 70 | start `neard`. 71 | - Create a NEAR account, using the optional argument supplied to 72 | `evm-bully replay` as the account name. If no argument has been 73 | given the account name is automatically generated. 74 | - Installing the EVM contract supplied to `-contract` under the 75 | created contract by calling out to 76 | [`aurora-cli`](https://github.com/aurora-is-near/aurora-cli). 77 | 78 | Afterwards the transactions from the supplied testnet are replayed until 79 | an error occurs. 80 | -------------------------------------------------------------------------------- /replayer/stats.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/aurora-is-near/evm-bully/db" 7 | "github.com/aurora-is-near/evm-bully/util" 8 | "github.com/ethereum/go-ethereum/common" 9 | "github.com/ethereum/go-ethereum/core/rawdb" 10 | "github.com/ethereum/go-ethereum/core/types" 11 | "github.com/ethereum/go-ethereum/ethdb" 12 | "github.com/ethereum/go-ethereum/log" 13 | ) 14 | 15 | func calcStatsForTxs(blockHeight int, txs types.Transactions) (uint64, error) { 16 | var contractTxCounter uint64 17 | for i, tx := range txs { 18 | // only look at contract creating transactions 19 | if tx.To() == nil { 20 | log.Info(fmt.Sprintf("block=%d, tx=%d", blockHeight, i)) 21 | contractTxCounter++ 22 | } 23 | } 24 | return contractTxCounter, nil 25 | } 26 | 27 | func calcStatsForBlocks(db ethdb.Database, blocks []common.Hash) error { 28 | var contractTxCounter uint64 29 | var totalTxCounter uint64 30 | for blockHeight, blockHash := range blocks { 31 | // read block from DB 32 | b := rawdb.ReadBlock(db, blockHash, uint64(blockHeight)) 33 | if b == nil { 34 | return fmt.Errorf("cannot read block at height %d with hash %s", 35 | blockHeight, blockHash.Hex()) 36 | } 37 | 38 | // transactions 39 | if len(b.Transactions()) > 0 { 40 | counter, err := calcStatsForTxs(blockHeight, b.Transactions()) 41 | if err != nil { 42 | return err 43 | } 44 | contractTxCounter += counter 45 | totalTxCounter += uint64(len(b.Transactions())) 46 | } 47 | } 48 | fmt.Printf("contract creating txs: %d\n", contractTxCounter) 49 | fmt.Printf("total txs: %d\n", totalTxCounter) 50 | fmt.Printf("percentage of contract creating txs: %.2f%%\n", float64(contractTxCounter)/float64(totalTxCounter)*100.0) 51 | return nil 52 | } 53 | 54 | func calcStatsForTxsDump(blockHeight int, txs []*db.Transaction) (uint64, error) { 55 | var contractTxCounter uint64 56 | for i, tx := range txs { 57 | // only look at contract creating transactions 58 | if tx.To == nil { 59 | log.Info(fmt.Sprintf("block=%d, tx=%d", blockHeight, i)) 60 | contractTxCounter++ 61 | } 62 | } 63 | return contractTxCounter, nil 64 | } 65 | 66 | func calcStatsFromDumpFile(testnet string) error { 67 | r, err := db.NewReader(testnet) 68 | if err != nil { 69 | return err 70 | } 71 | defer r.Close() 72 | var contractTxCounter uint64 73 | var totalTxCounter uint64 74 | blockHeight := 0 75 | for { 76 | // read block from dump file 77 | b, err := r.Next() 78 | if err != nil { 79 | return err 80 | } 81 | if b == nil { 82 | break 83 | } 84 | 85 | // transactions 86 | if len(b.Transactions) > 0 { 87 | counter, err := calcStatsForTxsDump(blockHeight, b.Transactions) 88 | if err != nil { 89 | return err 90 | } 91 | contractTxCounter += counter 92 | totalTxCounter += uint64(len(b.Transactions)) 93 | } 94 | blockHeight++ 95 | } 96 | fmt.Printf("contract creating txs: %d\n", contractTxCounter) 97 | fmt.Printf("total txs: %d\n", totalTxCounter) 98 | fmt.Printf("percentage of contract creating txs: %.2f%%\n", float64(contractTxCounter)/float64(totalTxCounter)*100.0) 99 | return nil 100 | } 101 | 102 | // CalcStats calculates some statistics for the given testnet and prints them to stdout. 103 | func CalcStats( 104 | dataDir, testnet string, 105 | blockHeight uint64, 106 | blockHash string, 107 | defrost bool, 108 | dump bool, 109 | ) error { 110 | if dump { 111 | return calcStatsFromDumpFile(testnet) 112 | } 113 | // determine cache directory 114 | cacheDir, err := util.DetermineCacheDir(testnet) 115 | if err != nil { 116 | return err 117 | } 118 | // open database 119 | db, blocks, err := db.Open(dataDir, testnet, cacheDir, blockHeight, 120 | blockHash, defrost) 121 | if err != nil { 122 | return err 123 | } 124 | defer func() { 125 | log.Info("closing DB") 126 | db.Close() 127 | }() 128 | // calculate statistics 129 | return calcStatsForBlocks(db, blocks) 130 | } 131 | -------------------------------------------------------------------------------- /replayer/replay_tx.go: -------------------------------------------------------------------------------- 1 | package replayer 2 | 3 | import ( 4 | "encoding/hex" 5 | "encoding/json" 6 | "fmt" 7 | "math/big" 8 | "os" 9 | "path/filepath" 10 | "time" 11 | 12 | "github.com/aurora-is-near/evm-bully/replayer/neard" 13 | "github.com/aurora-is-near/evm-bully/util/aurora" 14 | "github.com/aurora-is-near/evm-bully/util/git" 15 | "github.com/aurora-is-near/evm-bully/util/gnumake" 16 | "github.com/aurora-is-near/near-api-go" 17 | "github.com/aurora-is-near/near-api-go/utils" 18 | "github.com/frankbraun/codechain/util/file" 19 | ) 20 | 21 | func buildAuroraEngine(head string) error { 22 | fmt.Println("build aurora-engine") 23 | engineDir := filepath.Join("..", "aurora-engine") 24 | // checkout 25 | if err := git.Checkout(engineDir, head); err != nil { 26 | return err 27 | } 28 | // build 29 | if err := gnumake.Make(engineDir, "evm-bully=yes"); err != nil { 30 | return err 31 | } 32 | return nil 33 | } 34 | 35 | // ReplayTx replays transaction from breakpointDir. 36 | func ReplayTx( 37 | breakpointDir string, 38 | build bool, 39 | contract string, 40 | release bool, 41 | gas uint64, 42 | ) error { 43 | // parse breakpoint.json 44 | filename := filepath.Join(breakpointDir, "breakpoint.json") 45 | data, err := os.ReadFile(filename) 46 | if err != nil { 47 | return err 48 | } 49 | var bp Breakpoint 50 | if err := json.Unmarshal(data, &bp); err != nil { 51 | return err 52 | } 53 | 54 | if build { 55 | if err := buildAuroraEngine(bp.AuroraEngineHead); err != nil { 56 | return err 57 | } 58 | } 59 | 60 | nearDir := filepath.Join("..", "nearcore") 61 | if build { 62 | if err := git.Checkout(nearDir, bp.NearcoreHead); err != nil { 63 | return err 64 | } 65 | } 66 | nearDaemon, err := neard.LoadFromRepo(nearDir, release, build) 67 | if err != nil { 68 | return err 69 | } 70 | if err := nearDaemon.RestoreLocalData(filepath.Join(breakpointDir, "local")); err != nil { 71 | return err 72 | } 73 | if err := nearDaemon.Start(); err != nil { 74 | return err 75 | } 76 | defer nearDaemon.Stop() 77 | 78 | if err := os.Setenv("NEAR_ENV", "local"); err != nil { 79 | return err 80 | } 81 | cfg := near.GetConfig() 82 | c := near.NewConnection(cfg.NodeURL) 83 | nearStarted := checkUntilTrue(time.Second*100, "near node is not up yet", func() bool { 84 | _, err := c.GetNodeStatus() 85 | return err == nil 86 | }) 87 | if !nearStarted { 88 | return fmt.Errorf("replayer: near node is not reachable after 100 seconds") 89 | } 90 | 91 | // copy credentials file 92 | home, err := os.UserHomeDir() 93 | if err != nil { 94 | return err 95 | } 96 | credDir := filepath.Join(home, ".near-credentials", "local") 97 | if err := os.MkdirAll(credDir, 0700); err != nil { 98 | return err 99 | } 100 | dst := filepath.Join(credDir, bp.AccountID+".json") 101 | if err := os.RemoveAll(dst); err != nil { 102 | return err 103 | } 104 | err = file.Copy(filepath.Join(breakpointDir, bp.AccountID+".json"), dst) 105 | if err != nil { 106 | return err 107 | } 108 | 109 | // upgrade contract before replaying tx, if necessary 110 | if contract != "" { 111 | err := aurora.Upgrade(bp.AccountID, bp.ChainID, contract) 112 | if err != nil { 113 | return err 114 | } 115 | } 116 | 117 | // run transaction 118 | zeroAmount := big.NewInt(0) 119 | rlp, err := hex.DecodeString(bp.Transaction) 120 | if err != nil { 121 | return err 122 | } 123 | 124 | // TODO: why validator_key.json and test.near here? 125 | cfg.KeyPath = filepath.Join(home, ".near", "local", "validator_key.json") 126 | a, err := near.LoadAccount(c, cfg, "test.near") 127 | if err != nil { 128 | return err 129 | } 130 | 131 | txResult, err := a.FunctionCall(bp.AccountID, "submit", rlp, gas, *zeroAmount) 132 | if err != nil { 133 | return err 134 | } 135 | utils.PrettyPrintResponse(txResult) 136 | res, err := near.GetTransactionLastResult(txResult) 137 | if err != nil { 138 | return err 139 | } 140 | if res != nil { 141 | jsn, err := json.MarshalIndent(res, "", " ") 142 | if err != nil { 143 | return err 144 | } 145 | fmt.Println(string(jsn)) 146 | } 147 | return nil 148 | } 149 | -------------------------------------------------------------------------------- /replayer/neard/neard.go: -------------------------------------------------------------------------------- 1 | // Package neard implements NEAR daemon related functionality. 2 | package neard 3 | 4 | import ( 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "path/filepath" 9 | "strings" 10 | 11 | "github.com/aurora-is-near/evm-bully/util/git" 12 | "github.com/ethereum/go-ethereum/log" 13 | "github.com/frankbraun/codechain/util/file" 14 | ) 15 | 16 | // NEARDaemon wraps a neard. 17 | type NEARDaemon struct { 18 | Head string 19 | binaryPath string 20 | localDir string 21 | nearDaemon *exec.Cmd 22 | } 23 | 24 | func getDefaultLocalDir() (string, error) { 25 | home, err := os.UserHomeDir() 26 | if err != nil { 27 | return "", err 28 | } 29 | return filepath.Join(home, ".near", "local"), nil 30 | } 31 | 32 | // LoadFromBinary loads NEARDaemon from existing binary. 33 | func LoadFromBinary(binaryPath string, head string) (*NEARDaemon, error) { 34 | log.Info("load neard binary") 35 | 36 | if _, err := os.Stat(binaryPath); err != nil { 37 | return nil, fmt.Errorf("can't access neard binary on path %v: %v", binaryPath, err) 38 | } 39 | 40 | localDir, err := getDefaultLocalDir() 41 | if err != nil { 42 | return nil, err 43 | } 44 | 45 | return &NEARDaemon{ 46 | Head: head, 47 | binaryPath: binaryPath, 48 | localDir: localDir, 49 | }, nil 50 | } 51 | 52 | func buildBinary(repoPath string, release bool) error { 53 | log.Info("build neard") 54 | 55 | args := []string{ 56 | "build", 57 | "--package", "neard", 58 | "--features", "nightly_protocol_features", 59 | } 60 | if release { 61 | args = append(args, "--release") 62 | } 63 | 64 | cmd := exec.Command("cargo", args...) 65 | cmd.Dir = repoPath 66 | cmd.Stdout = os.Stdout 67 | cmd.Stderr = os.Stderr 68 | return cmd.Run() 69 | } 70 | 71 | // LoadFromRepo loads NEARDaemon from repo by provided path (and build if requested). 72 | func LoadFromRepo(repoPath string, release bool, build bool) (*NEARDaemon, error) { 73 | log.Info("load neard repo") 74 | 75 | head, err := git.Head(repoPath) 76 | if err != nil { 77 | return nil, err 78 | } 79 | 80 | if build { 81 | if err := buildBinary(repoPath, release); err != nil { 82 | return nil, err 83 | } 84 | } 85 | 86 | binaryPath := filepath.Join(repoPath, "target", "debug", "neard") 87 | if release { 88 | binaryPath = filepath.Join(repoPath, "target", "release", "neard") 89 | } 90 | 91 | return LoadFromBinary(binaryPath, head) 92 | } 93 | 94 | // Backup local data if it exists 95 | func (daemon *NEARDaemon) backupLocalData() error { 96 | exists, err := file.Exists(daemon.localDir) 97 | if err != nil { 98 | return err 99 | } 100 | if exists { 101 | localOld := strings.TrimSuffix(daemon.localDir, "/") + "_old" 102 | log.Info(fmt.Sprintf("mv %s %s", daemon.localDir, localOld)) 103 | // remove old backup directory 104 | if err := os.RemoveAll(localOld); err != nil { 105 | return err 106 | } 107 | // move 108 | if err := os.Rename(daemon.localDir, localOld); err != nil { 109 | return err 110 | } 111 | } else { 112 | log.Info(fmt.Sprintf("directory '%s' does not exist", daemon.localDir)) 113 | } 114 | return nil 115 | } 116 | 117 | func (daemon *NEARDaemon) init() error { 118 | cmd := exec.Command(daemon.binaryPath, "--home="+daemon.localDir, "--verbose=true", "init") 119 | cmd.Stdout = os.Stdout 120 | cmd.Stderr = os.Stderr 121 | return cmd.Run() 122 | } 123 | 124 | func (daemon *NEARDaemon) editConfig() error { 125 | filename := filepath.Join(daemon.localDir, "config.json") 126 | backup := filepath.Join(daemon.localDir, "config_old.json") 127 | if err := file.Copy(filename, backup); err != nil { 128 | return err 129 | } 130 | 131 | edits := []*jsonEdit{ 132 | {[]string{"rpc", "polling_config", "polling_interval", "secs"}, "0"}, 133 | {[]string{"rpc", "polling_config", "polling_interval", "nanos"}, "5000000"}, 134 | {[]string{"consensus", "block_production_tracking_delay", "secs"}, "0"}, 135 | {[]string{"consensus", "block_production_tracking_delay", "nanos"}, "10000000"}, 136 | {[]string{"consensus", "min_block_production_delay", "secs"}, "0"}, 137 | {[]string{"consensus", "min_block_production_delay", "nanos"}, "10000000"}, 138 | {[]string{"consensus", "max_block_production_delay", "secs"}, "0"}, 139 | {[]string{"consensus", "max_block_production_delay", "nanos"}, "50000000"}, 140 | {[]string{"consensus", "catchup_step_period", "secs"}, "0"}, 141 | {[]string{"consensus", "catchup_step_period", "nanos"}, "10000000"}, 142 | {[]string{"consensus", "doomslug_step_period", "secs"}, "0"}, 143 | {[]string{"consensus", "doomslug_step_period", "nanos"}, "10000000"}, 144 | } 145 | return editJSONFile(filename, edits) 146 | } 147 | 148 | // SetupLocalData initializes local data of a NEARDaemon. 149 | func (daemon *NEARDaemon) SetupLocalData() error { 150 | log.Info("setup neard local data") 151 | 152 | if err := daemon.backupLocalData(); err != nil { 153 | return err 154 | } 155 | 156 | // initialize neard 157 | if err := daemon.init(); err != nil { 158 | return err 159 | } 160 | 161 | // edit genesis.json 162 | if err := daemon.editConfig(); err != nil { 163 | return err 164 | } 165 | 166 | return nil 167 | } 168 | 169 | // RestoreLocalData restores local data of a NEARDaemon from given directory. 170 | func (daemon *NEARDaemon) RestoreLocalData(source string) error { 171 | log.Info("restore neard local data") 172 | return file.CopyDir(source, daemon.localDir) 173 | } 174 | 175 | // Start NEARDaemon. 176 | func (daemon *NEARDaemon) Start() error { 177 | log.Info("start neard") 178 | daemon.nearDaemon = exec.Command(daemon.binaryPath, "--home="+daemon.localDir, "--verbose=true", "run") 179 | daemon.nearDaemon.Stdout = os.Stdout 180 | daemon.nearDaemon.Stderr = os.Stderr 181 | return daemon.nearDaemon.Start() 182 | } 183 | 184 | // Stop NEARDaemon. 185 | func (daemon *NEARDaemon) Stop() error { 186 | log.Info("stop neard") 187 | return daemon.nearDaemon.Process.Kill() 188 | } 189 | -------------------------------------------------------------------------------- /command/replay.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | "crypto/rand" 5 | "encoding/hex" 6 | "errors" 7 | "flag" 8 | "fmt" 9 | "os" 10 | 11 | "github.com/aurora-is-near/evm-bully/replayer" 12 | "github.com/aurora-is-near/evm-bully/util/aurora" 13 | "github.com/aurora-is-near/near-api-go" 14 | ) 15 | 16 | // Replay implements the 'replay' command. 17 | func Replay(argv0 string, args ...string) error { 18 | var testnetFlags testnetFlags 19 | fs := flag.NewFlagSet(argv0, flag.ContinueOnError) 20 | fs.Usage = func() { 21 | fmt.Fprintf(os.Stderr, "Usage: %s []\n", argv0) 22 | fmt.Fprintf(os.Stderr, "Replay transactions to NEAR EVM installed in account .\n") 23 | fs.PrintDefaults() 24 | } 25 | autobreak := fs.Bool("autobreak", false, "Automatically repeat with a break point after an error") 26 | accountID := fs.String("accountId", "", "Unique identifier for the account that will be used to sign this call") 27 | batch := fs.Bool("batch", false, "Batch transactions") 28 | batchSize := fs.Int("size", 10, "Batch size when batching transactions") 29 | breakBlock := fs.Int("breakblock", -1, "Break replaying at this block height") 30 | breakTx := fs.Int("breaktx", 0, "Break replaying at this transaction (in block given by -breakblock)") 31 | contract := fs.String("contract", "", "EVM contract file to deploy") 32 | dataDir := fs.String("datadir", defaultDataDir, "Data directory containing the database to read") 33 | defrost := fs.Bool("defrost", false, "Defrost the database first") 34 | gas := fs.Uint64("gas", defaultGas, "Max amount of gas a call can use (in gas units)") 35 | initialBalance := fs.String("initial-balance", defaultInitialBalance, "Number of tokens to transfer to newly created account") 36 | release := fs.Bool("release", false, "Run release version of neard (instead of debug version)") 37 | setup := fs.Bool("setup", false, "Setup and run neard before replaying (auto-deploys contract)") 38 | neardPath := fs.String("neard", "", "Path to neard binary (won't build neard if -setup is provided)") 39 | neardHead := fs.String("neardhead", "", "Git hash of neard (required if -neard is provided)") 40 | auroraCliPath := fs.String("auroracli", "aurora", "Path (or alias) to aurora-cli") 41 | skip := fs.Bool("skip", false, "Skip empty blocks during replay") 42 | startBlock := fs.Int("startblock", 0, "Start replaying at this block height") 43 | startTx := fs.Int("starttx", 0, "Start replaying at this transaction (in block given by -startblock)") 44 | timeout := fs.Duration("timeout", 0, "Timeout for JSON-RPC client") 45 | cfg := near.GetConfig() 46 | registerCfgFlags(fs, cfg, true) 47 | testnetFlags.registerFlags(fs) 48 | if err := fs.Parse(args); err != nil { 49 | return err 50 | } 51 | if !*setup && *initialBalance != defaultInitialBalance { 52 | return errors.New("option -initial-balance requires -setup") 53 | } 54 | if !*setup && *accountID == "" { 55 | return errors.New("option -accountId is mandatory") 56 | } 57 | if *autobreak && *breakBlock != -1 { 58 | return errors.New("options -autobreak and -breakblock exclude each other") 59 | } 60 | if *autobreak && *breakTx != 0 { 61 | return errors.New("options -autobreak and -breaktx exclude each other") 62 | } 63 | if *autobreak && *startBlock != 0 { 64 | return errors.New("options -autobreak and -startblock exclude each other") 65 | } 66 | if *autobreak && *startTx != 0 { 67 | return errors.New("options -autobreak and -starttx exclude each other") 68 | } 69 | if *startBlock != 0 && *breakBlock != -1 { 70 | return errors.New("options -startblock and -breakblock exclude each other") 71 | } 72 | if *startBlock != 0 && *breakTx != 0 { 73 | return errors.New("options -startblock and -breaktx exclude each other") 74 | } 75 | if *startTx != 0 && *breakBlock != -1 { 76 | return errors.New("options -starttx and -breakblock exclude each other") 77 | } 78 | if *startTx != 0 && *breakTx != 0 { 79 | return errors.New("options -starttx and -breaktx exclude each other") 80 | } 81 | if *release && !*setup { 82 | return errors.New("option -release requires option -setup") 83 | } 84 | if *setup && *contract == "" { 85 | return errors.New("option -setup requires option -contract") 86 | } 87 | if *contract != "" && !*setup { 88 | return errors.New("option -contract requires option -setup") 89 | } 90 | if *neardPath != "" && *neardHead == "" { 91 | return errors.New("option -neard requires option -neardhead") 92 | } 93 | chainID, testnet, err := testnetFlags.determineTestnet() 94 | if err != nil { 95 | return err 96 | } 97 | if !*setup { 98 | if fs.NArg() != 1 { 99 | fs.Usage() 100 | return flag.ErrHelp 101 | } 102 | } else { 103 | if fs.NArg() > 1 { 104 | fs.Usage() 105 | return flag.ErrHelp 106 | } 107 | } 108 | 109 | aurora.SetAuroraCliPath(*auroraCliPath) 110 | 111 | // determine evmContract 112 | var evmContract string 113 | if fs.NArg() == 1 { 114 | evmContract = fs.Arg(0) 115 | } else { 116 | var b [16]byte 117 | if _, err := rand.Read(b[:]); err != nil { 118 | return err 119 | } 120 | evmContract = hex.EncodeToString(b[:]) + ".test.near" 121 | fmt.Fprintf(os.Stderr, "evmContract name generated: %s\n", evmContract) 122 | } 123 | 124 | // set accountID, if necessary 125 | if *accountID == "" { 126 | *accountID = evmContract 127 | } 128 | 129 | // run replayer 130 | r := replayer.Replayer{ 131 | Config: cfg, 132 | Timeout: *timeout, 133 | ChainID: chainID, 134 | Gas: *gas, 135 | DataDir: *dataDir, 136 | Testnet: testnet, 137 | Defrost: *defrost, 138 | Skip: *skip, 139 | Batch: *batch, 140 | BatchSize: *batchSize, 141 | StartBlock: *startBlock, 142 | StartTx: *startTx, 143 | Autobreak: *autobreak, 144 | BreakBlock: *breakBlock, 145 | BreakTx: *breakTx, 146 | Release: *release, 147 | Setup: *setup, 148 | NeardPath: *neardPath, 149 | NeardHead: *neardHead, 150 | InitialBalance: *initialBalance, 151 | Contract: *contract, 152 | Breakpoint: replayer.Breakpoint{ 153 | AccountID: *accountID, 154 | }, 155 | } 156 | if err := r.Replay(evmContract); err != nil { 157 | return err 158 | } 159 | return nil 160 | } 161 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /db/db.go: -------------------------------------------------------------------------------- 1 | // Package db implements functions to create and read Ethereum database dumps. 2 | package db 3 | 4 | import ( 5 | "encoding/gob" 6 | "fmt" 7 | "io" 8 | "math/big" 9 | "os" 10 | "path/filepath" 11 | 12 | "github.com/aurora-is-near/evm-bully/util" 13 | "github.com/aurora-is-near/evm-bully/util/hashcache" 14 | "github.com/ethereum/go-ethereum/common" 15 | "github.com/ethereum/go-ethereum/core/rawdb" 16 | "github.com/ethereum/go-ethereum/core/types" 17 | "github.com/ethereum/go-ethereum/ethdb" 18 | "github.com/ethereum/go-ethereum/log" 19 | "github.com/frankbraun/codechain/util/file" 20 | ) 21 | 22 | // Block defines an Ethereum block. 23 | type Block struct { 24 | Header *types.Header 25 | Coinbase common.Address 26 | Time uint64 27 | Hash common.Hash 28 | Transactions []*Transaction 29 | } 30 | 31 | // Transaction defines an Ethereum transaction. 32 | type Transaction struct { 33 | RLP []byte 34 | Nonce uint64 35 | GasPrice *big.Int 36 | GasLimit uint64 37 | To *common.Address 38 | Value *big.Int 39 | Data []byte 40 | } 41 | 42 | // traverse blockchain backwards starting at block b with given blockHeight 43 | // and return list of block hashes starting with the genesis block. 44 | func traverse( 45 | db ethdb.Database, 46 | b *types.Block, 47 | blockHeight uint64, 48 | ) ([]common.Hash, error) { 49 | var ( 50 | blocks []common.Hash 51 | txCount uint64 52 | ) 53 | for blockHeight > 0 { 54 | blockHash := b.ParentHash() 55 | blockHeight-- 56 | b = rawdb.ReadBlock(db, blockHash, blockHeight) 57 | if b == nil { 58 | return nil, fmt.Errorf("cannot read block at height %d with hash %s", 59 | blockHeight, blockHash.Hex()) 60 | } 61 | log.Info(fmt.Sprintf("read block at height %d with hash %s", 62 | blockHeight, blockHash.Hex())) 63 | blocks = append(blocks, blockHash) 64 | txCount += uint64(len(b.Transactions())) 65 | } 66 | // reverse blocks 67 | for i, j := 0, len(blocks)-1; i < j; i, j = i+1, j-1 { 68 | blocks[i], blocks[j] = blocks[j], blocks[i] 69 | } 70 | log.Info(fmt.Sprintf("total number of transactions: %d", txCount)) 71 | return blocks, nil 72 | } 73 | 74 | // Open database. 75 | func Open( 76 | dataDir, testnet, cacheDir string, 77 | blockHeight uint64, 78 | blockHash string, 79 | defrost bool, 80 | ) (ethdb.Database, []common.Hash, error) { 81 | dbDir := filepath.Join(dataDir, testnet, "geth", "chaindata") 82 | 83 | log.Info(fmt.Sprintf("opening DB in '%s'", dbDir)) 84 | // open DB readonly 85 | db, err := rawdb.NewLevelDBDatabaseWithFreezer(dbDir, 0, 0, 86 | filepath.Join(dbDir, "ancient"), "", true) 87 | if err != nil { 88 | return nil, nil, err 89 | } 90 | 91 | // "defrost" the database first 92 | if defrost { 93 | rawdb.InitDatabaseFromFreezer(db) 94 | } 95 | 96 | // load block hash cache 97 | blocks, err := hashcache.Load(cacheDir) 98 | if err != nil { 99 | return nil, nil, err 100 | } 101 | 102 | if blocks == nil || uint64(len(blocks)) < blockHeight+1 || blocks[blockHeight].Hex() != blockHash { 103 | log.Info("cache doesn't exist, is too small, or hash mismatch") 104 | 105 | // read starting block 106 | b := rawdb.ReadBlock(db, common.HexToHash(blockHash), blockHeight) 107 | if b == nil { 108 | return nil, nil, fmt.Errorf("cannot read block at height %d with hash %s", 109 | blockHeight, blockHash) 110 | } 111 | log.Info(fmt.Sprintf("read block at height %d with hash %s", blockHeight, 112 | blockHash)) 113 | 114 | // traverse backwards from there 115 | blocks, err = traverse(db, b, blockHeight) 116 | if err != nil { 117 | return nil, nil, err 118 | } 119 | blocks = append(blocks, common.HexToHash(blockHash)) 120 | 121 | // save block hash cache 122 | if err := hashcache.Save(cacheDir, blocks); err != nil { 123 | return nil, nil, err 124 | } 125 | } else { 126 | log.Info("block hashes read from cache") 127 | // truncate blocks to blockHeight 128 | blocks = blocks[:blockHeight+1] 129 | } 130 | 131 | return db, blocks, nil 132 | } 133 | 134 | func readTx(tx *types.Transaction) (*Transaction, error) { 135 | var ( 136 | encTx Transaction 137 | err error 138 | ) 139 | encTx.RLP, err = tx.MarshalBinary() 140 | if err != nil { 141 | return nil, err 142 | } 143 | encTx.Nonce = tx.Nonce() 144 | encTx.GasPrice = tx.GasPrice() 145 | encTx.GasLimit = tx.Gas() 146 | encTx.To = tx.To() 147 | encTx.Value = tx.Value() 148 | encTx.Data = tx.Data() 149 | return &encTx, nil 150 | } 151 | 152 | // Dump dumps the Ethereum database for the given testnet stored in dataDir 153 | // up to blockHeight with given blockHash into the evm-bully cache directory: 154 | // ~/.config/evm-bully/tetstnet/dbdump. 155 | func Dump( 156 | dataDir, testnet string, 157 | blockHeight uint64, 158 | blockHash string, 159 | defrost bool, 160 | ) error { 161 | // determine cache directory 162 | cacheDir, err := util.DetermineCacheDir(testnet) 163 | if err != nil { 164 | return err 165 | } 166 | 167 | // check dump file 168 | dumpFile := filepath.Join(cacheDir, "dump.db") 169 | exists, err := file.Exists(dumpFile) 170 | if err != nil { 171 | return err 172 | } 173 | if exists { 174 | return fmt.Errorf("db: file '%s' exists already", dumpFile) 175 | } 176 | 177 | // open database 178 | db, blocks, err := Open(dataDir, testnet, cacheDir, blockHeight, 179 | blockHash, defrost) 180 | if err != nil { 181 | return err 182 | } 183 | defer func() { 184 | log.Info("closing DB") 185 | db.Close() 186 | }() 187 | 188 | // open dump file 189 | fp, err := os.Create(dumpFile) 190 | if err != nil { 191 | return err 192 | } 193 | defer func() { 194 | fp.Close() 195 | log.Info(fmt.Sprintf("'%s' written", dumpFile)) 196 | }() 197 | /* 198 | gw := gzip.NewWriter(fp) 199 | defer func() { 200 | gw.Close() 201 | log.Info("gzip writer closed") 202 | }() 203 | */ 204 | enc := gob.NewEncoder(fp) 205 | 206 | // read DB 207 | for blockHeight, blockHash := range blocks { 208 | // read block from DB 209 | b := rawdb.ReadBlock(db, blockHash, uint64(blockHeight)) 210 | if b == nil { 211 | return fmt.Errorf("cannot read block at height %d with hash %s", 212 | blockHeight, blockHash.Hex()) 213 | } 214 | 215 | // transactions 216 | var encBlock Block 217 | encBlock.Header = b.Header() 218 | encBlock.Coinbase = b.Coinbase() 219 | encBlock.Time = b.Time() 220 | encBlock.Hash = b.Hash() 221 | if len(b.Transactions()) > 0 { 222 | for _, tx := range b.Transactions() { 223 | encTx, err := readTx(tx) 224 | if err != nil { 225 | return err 226 | } 227 | encBlock.Transactions = append(encBlock.Transactions, encTx) 228 | } 229 | } 230 | // save block 231 | if err := enc.Encode(encBlock); err != nil { 232 | return err 233 | } 234 | log.Info(fmt.Sprintf("block %d/%d written", blockHeight, len(blocks))) 235 | } 236 | return nil 237 | } 238 | 239 | // Reader implments a DB dump reader. 240 | type Reader struct { 241 | fp *os.File 242 | dec *gob.Decoder 243 | } 244 | 245 | // NewReader returns a new DB dump reader for the given testnet. 246 | func NewReader(testnet string) (*Reader, error) { 247 | // determine cache directory 248 | cacheDir, err := util.DetermineCacheDir(testnet) 249 | if err != nil { 250 | return nil, err 251 | } 252 | 253 | // check dump file 254 | dumpFile := filepath.Join(cacheDir, "dump.db") 255 | exists, err := file.Exists(dumpFile) 256 | if err != nil { 257 | return nil, err 258 | } 259 | if !exists { 260 | return nil, fmt.Errorf("db: file '%s' doesn't exist", dumpFile) 261 | } 262 | 263 | // open reader 264 | var r Reader 265 | r.fp, err = os.Open(dumpFile) 266 | if err != nil { 267 | return nil, err 268 | } 269 | /* 270 | gr, err := gzip.NewReader(r.fp) 271 | if err != nil { 272 | return nil, err 273 | } 274 | */ 275 | r.dec = gob.NewDecoder(r.fp) 276 | return &r, nil 277 | } 278 | 279 | // Next returns the next Block for the given reader or nil. 280 | func (r *Reader) Next() (*Block, error) { 281 | var b Block 282 | if err := r.dec.Decode(&b); err != nil { 283 | if err == io.EOF { 284 | return nil, nil 285 | } 286 | return nil, err 287 | } 288 | return &b, nil 289 | } 290 | 291 | // Close closes the reader. 292 | func (r *Reader) Close() error { 293 | return r.fp.Close() 294 | } 295 | -------------------------------------------------------------------------------- /replayer/replayer.go: -------------------------------------------------------------------------------- 1 | // Package replayer implements an Ethereum transaction replayer. 2 | package replayer 3 | 4 | import ( 5 | "encoding/hex" 6 | "encoding/json" 7 | "errors" 8 | "fmt" 9 | "math/big" 10 | "os" 11 | "path/filepath" 12 | "strconv" 13 | "strings" 14 | "time" 15 | 16 | "github.com/aurora-is-near/evm-bully/db" 17 | "github.com/aurora-is-near/evm-bully/replayer/neard" 18 | "github.com/aurora-is-near/evm-bully/util/aurora" 19 | "github.com/aurora-is-near/evm-bully/util/tar" 20 | "github.com/aurora-is-near/near-api-go" 21 | "github.com/aurora-is-near/near-api-go/utils" 22 | "github.com/ethereum/go-ethereum/log" 23 | "github.com/frankbraun/codechain/util/file" 24 | ) 25 | 26 | // A Replayer replays transactions. 27 | type Replayer struct { 28 | Config *near.Config 29 | Timeout time.Duration 30 | ChainID uint8 31 | Gas uint64 32 | DataDir string 33 | Testnet string 34 | Defrost bool 35 | Skip bool // skip empty blocks 36 | Batch bool // batch transactions 37 | BatchSize int // batch size when batching transactions 38 | StartBlock int // start replaying at this block height 39 | StartTx int // start replaying at this transaction (in block given by StartBlock) 40 | Autobreak bool // automatically repeat with break point after error 41 | BreakBlock int // break replaying at this block height 42 | BreakTx int // break replaying at this transaction (in block given by BreakBlock) 43 | Release bool // run release version of neard 44 | Setup bool // setup and run neard before replaying 45 | NeardPath string // path to neard binary 46 | NeardHead string // git hash of neard 47 | InitialBalance string 48 | Contract string 49 | Breakpoint Breakpoint 50 | } 51 | 52 | // Breakpoint defines a break point. 53 | type Breakpoint struct { 54 | ChainID uint8 `json:"chain-id"` 55 | AccountID string `json:"account-id"` 56 | NearcoreHead string `json:"nearcore"` 57 | AuroraEngineHead string `json:"aurora-engine"` 58 | Transaction string `json:"transaction"` 59 | tx *db.Transaction 60 | } 61 | 62 | // startGenerator starts a goroutine that feeds transactions into the returned tx channel. 63 | func (r *Replayer) startTxGenerator() chan *Tx { 64 | c := make(chan *Tx, 10*r.BatchSize) 65 | 66 | go func() { 67 | // process genesis block 68 | genesisBlock := getGenesisBlock(r.Testnet) 69 | c <- r.beginChainTx(genesisBlock) 70 | 71 | reader, err := db.NewReader(r.Testnet) 72 | if err != nil { 73 | c <- &Tx{ 74 | BlockNum: -1, 75 | Error: err, 76 | } 77 | return 78 | } 79 | defer reader.Close() 80 | 81 | emptyRangeStart, emptyRangeEnd := -2, -2 82 | flushEmptyRange := func() { 83 | if emptyRangeEnd < 0 { 84 | return 85 | } 86 | c <- &Tx{ 87 | BlockNum: -1, 88 | Comment: fmt.Sprintf( 89 | "begin_block() skipped for empty blocks [%d;%d]", 90 | emptyRangeStart, 91 | emptyRangeEnd, 92 | ), 93 | } 94 | emptyRangeStart, emptyRangeEnd = -2, -2 95 | } 96 | 97 | outer: 98 | for blockHeight := 0; true; blockHeight++ { 99 | b, err := reader.Next() 100 | if err != nil { 101 | flushEmptyRange() 102 | c <- &Tx{ 103 | BlockNum: -1, 104 | Error: err, 105 | } 106 | return 107 | } 108 | if b == nil { 109 | break 110 | } 111 | 112 | if blockHeight < r.StartBlock { 113 | c <- &Tx{ 114 | BlockNum: -1, 115 | Comment: fmt.Sprintf("skipping block %d", blockHeight), 116 | } 117 | continue 118 | } 119 | 120 | // early break, if necessary 121 | if r.BreakBlock != -1 && r.BreakTx == 0 && blockHeight == r.BreakBlock { 122 | flushEmptyRange() 123 | c <- &Tx{ 124 | BlockNum: -1, 125 | Comment: fmt.Sprintf("breaking block %d", blockHeight), 126 | } 127 | log.Info("sleep") 128 | time.Sleep(5 * time.Second) 129 | txs := b.Transactions 130 | if txs != nil && len(txs) > 0 { 131 | r.Breakpoint.tx = txs[0] 132 | } 133 | break 134 | } 135 | 136 | // block context 137 | ctx, err := getBlockContext(b) 138 | if err != nil { 139 | flushEmptyRange() 140 | c <- &Tx{ 141 | BlockNum: -1, 142 | Error: err, 143 | } 144 | return 145 | } 146 | 147 | if len(b.Transactions) == 0 && r.Skip { 148 | if emptyRangeEnd != blockHeight-1 { 149 | emptyRangeStart = blockHeight 150 | } 151 | emptyRangeEnd = blockHeight 152 | continue 153 | } 154 | 155 | flushEmptyRange() 156 | c <- beginBlockTx(r.Gas, ctx) 157 | 158 | // actual transactions 159 | for i, tx := range b.Transactions { 160 | // early break, if necessary 161 | if r.BreakBlock != -1 && blockHeight == r.BreakBlock && i == r.BreakTx { 162 | c <- &Tx{ 163 | BlockNum: -1, 164 | Comment: fmt.Sprintf("breaking at transaction %d (in block %d)", i, blockHeight), 165 | } 166 | log.Info("sleep") 167 | time.Sleep(5 * time.Second) 168 | r.Breakpoint.tx = tx 169 | break outer 170 | } 171 | if blockHeight == r.StartBlock && i < r.StartTx { 172 | c <- &Tx{ 173 | BlockNum: -1, 174 | Comment: fmt.Sprintf("skipping transaction %d (in block %d)", i, blockHeight), 175 | } 176 | continue 177 | } 178 | amount, err := utils.FormatNearAmount(strconv.FormatUint(r.Gas/uint64(r.BatchSize), 10)) 179 | if err != nil { 180 | c <- &Tx{ 181 | BlockNum: -1, 182 | Error: err, 183 | } 184 | return 185 | } 186 | c <- &Tx{ 187 | BlockNum: blockHeight, 188 | TxNum: i, 189 | Comment: fmt.Sprintf("submit(%d, tx=%d, tx_size=%d, gas=%sⓃ)", 190 | blockHeight, i, len(tx.RLP), amount), 191 | MethodName: "submit", 192 | Args: tx.RLP, 193 | EthTx: tx, 194 | } 195 | } 196 | } 197 | flushEmptyRange() 198 | close(c) 199 | }() 200 | 201 | return c 202 | } 203 | 204 | func (r *Replayer) replay( 205 | evmContract string, 206 | ) (blockNum int, txNum int, errormsg []byte, err error) { 207 | conn := near.NewConnectionWithTimeout(r.Config.NodeURL, r.Timeout) 208 | 209 | // setup, if necessary 210 | if r.Setup { 211 | // setup neard 212 | log.Info("setup neard") 213 | 214 | var nearDaemon *neard.NEARDaemon 215 | var err error 216 | if r.NeardPath != "" { 217 | nearDaemon, err = neard.LoadFromBinary(r.NeardPath, r.NeardHead) 218 | } else { 219 | nearDaemon, err = neard.LoadFromRepo(filepath.Join("..", "nearcore"), r.Release, true) 220 | } 221 | if err != nil { 222 | return -1, -1, nil, err 223 | } 224 | 225 | if err := nearDaemon.SetupLocalData(); err != nil { 226 | return -1, -1, nil, err 227 | } 228 | if err := nearDaemon.Start(); err != nil { 229 | return -1, -1, nil, err 230 | } 231 | defer nearDaemon.Stop() 232 | r.Breakpoint.NearcoreHead = nearDaemon.Head 233 | 234 | nearStarted := checkUntilTrue(time.Second*100, "near node is not up yet", func() bool { 235 | _, err := conn.GetNodeStatus() 236 | return err == nil 237 | }) 238 | if !nearStarted { 239 | return -1, -1, nil, fmt.Errorf("replayer: near node is not reachable after 100 seconds") 240 | } 241 | 242 | // create account 243 | log.Info("create account") 244 | ca := CreateAccount{ 245 | Config: r.Config, 246 | InitialBalance: r.InitialBalance, 247 | MasterAccount: strings.Join(strings.Split(r.Breakpoint.AccountID, ".")[1:], "."), 248 | } 249 | if err := ca.Create(r.Breakpoint.AccountID); err != nil { 250 | return -1, -1, nil, err 251 | } 252 | 253 | accountCreated := checkUntilTrue(time.Second*100, "account is not accessible yet", func() bool { 254 | _, err := conn.GetAccountState(r.Breakpoint.AccountID) 255 | return err == nil 256 | }) 257 | if !accountCreated { 258 | return -1, -1, nil, fmt.Errorf("replayer: account is not accessible after 100 seconds") 259 | } 260 | 261 | // install EVM contract 262 | log.Info("install EVM contract") 263 | err = aurora.Install(r.Breakpoint.AccountID, r.ChainID, r.Contract) 264 | if err != nil { 265 | return -1, -1, nil, err 266 | } 267 | 268 | contractInstalled := checkUntilTrue(time.Second*100, "contract is not accessible yet", func() bool { 269 | _, err := conn.GetContractCode(r.Breakpoint.AccountID) 270 | return err == nil 271 | }) 272 | if !contractInstalled { 273 | return -1, -1, nil, fmt.Errorf("replayer: contract is not accessible after 100 seconds") 274 | } 275 | 276 | // reset key path 277 | r.Config.KeyPath = "" 278 | } 279 | 280 | // load account 281 | a, err := near.LoadAccount(conn, r.Config, r.Breakpoint.AccountID) 282 | if err != nil { 283 | return -1, -1, nil, err 284 | } 285 | 286 | // process transactions 287 | batch := make([]near.Action, 0, r.BatchSize) 288 | zeroAmount := big.NewInt(0) 289 | c := r.startTxGenerator() 290 | 291 | // Sleep 2 seconds to prevent contract installation data-race 292 | // which leads to InvalidNonce error message from nearcore 293 | log.Info("sleeping for 2 seconds") 294 | time.Sleep(2 * time.Second) 295 | 296 | for tx := range c { 297 | if tx.Error != nil { 298 | return -1, -1, nil, tx.Error 299 | } 300 | if tx.MethodName != "" { 301 | var ( 302 | txResult map[string]interface{} 303 | err error 304 | ) 305 | if !r.Batch { 306 | // no tx batching 307 | if tx.Comment != "" { 308 | fmt.Println(tx.Comment) 309 | } 310 | txResult, err = a.FunctionCall(evmContract, tx.MethodName, tx.Args, r.Gas, *zeroAmount) 311 | if err != nil { 312 | return -1, -1, nil, err 313 | } 314 | } else { 315 | // batch mode 316 | if tx.Comment != "" { 317 | fmt.Println("batching: " + tx.Comment) 318 | } 319 | batch = append(batch, near.Action{ 320 | Enum: 2, 321 | FunctionCall: near.FunctionCall{ 322 | MethodName: tx.MethodName, 323 | Args: tx.Args, 324 | Gas: r.Gas / uint64(r.BatchSize), 325 | Deposit: *zeroAmount, 326 | }, 327 | }) 328 | if len(batch) == r.BatchSize { 329 | fmt.Println("running batch") 330 | txResult, err = a.SignAndSendTransaction(evmContract, batch) 331 | if err != nil { 332 | return -1, -1, nil, err 333 | } 334 | batch = batch[:0] // reset 335 | } else { 336 | continue // batch no full yet 337 | } 338 | } 339 | if errormsg, err := procTxResult(r.Batch, tx.EthTx, txResult); err != nil { 340 | return tx.BlockNum, tx.TxNum, errormsg, err 341 | } 342 | } else if tx.Comment != "" { 343 | fmt.Println(tx.Comment) 344 | } 345 | } 346 | 347 | // process last batch, if not empty 348 | if len(batch) > 0 { 349 | fmt.Println("running last batch") 350 | txResult, err := a.SignAndSendTransaction(evmContract, batch) 351 | if err != nil { 352 | return -1, -1, nil, err 353 | } 354 | if errormsg, err := procTxResult(r.Batch, nil, txResult); err != nil { 355 | return -1, -1, errormsg, err 356 | } 357 | } 358 | return -1, -1, nil, nil 359 | } 360 | 361 | // Replay transactions with evmContract. 362 | func (r *Replayer) Replay(evmContract string) error { 363 | keyPath := r.Config.KeyPath 364 | blockNum, txNum, errormsg, err := r.replay(evmContract) 365 | if err != nil { 366 | if r.Autobreak && blockNum != -1 { 367 | // restore key path 368 | r.Config.KeyPath = keyPath 369 | // replay again with breakpoint set 370 | r.BreakBlock = blockNum 371 | r.BreakTx = txNum 372 | log.Info("replay again with breakpoint set") 373 | if _, _, _, err := r.replay(evmContract); err != nil { 374 | return err 375 | } 376 | } else { 377 | return err 378 | } 379 | } 380 | 381 | if r.BreakBlock != -1 { 382 | return r.saveBreakpoint(errormsg) 383 | } 384 | return nil 385 | } 386 | 387 | func showTx(tx *db.Transaction) { 388 | fmt.Println("transaction:") 389 | fmt.Println("0x" + hex.EncodeToString(tx.RLP)) 390 | fmt.Printf("nonce: %d\n", tx.Nonce) 391 | fmt.Printf("gasPrice: %s\n", tx.GasPrice.String()) 392 | fmt.Printf("gasLimit: %d\n", tx.GasLimit) 393 | if tx.To != nil { 394 | fmt.Printf("to: 0x%s\n", hex.EncodeToString(tx.To[:])) 395 | } else { 396 | fmt.Println("to: contract creation") 397 | } 398 | fmt.Printf("value: %s\n", tx.Value.String()) 399 | if len(tx.Data) > 0 { 400 | fmt.Println("data:") 401 | fmt.Println("0x" + hex.EncodeToString(tx.Data)) 402 | } 403 | } 404 | 405 | func procTxResult( 406 | batch bool, 407 | tx *db.Transaction, 408 | txResult map[string]interface{}, 409 | ) ([]byte, error) { 410 | utils.PrettyPrintResponse(txResult) 411 | status := txResult["status"].(map[string]interface{}) 412 | jsn, err := json.MarshalIndent(status, "", " ") 413 | if err != nil { 414 | return nil, err 415 | } 416 | fmt.Println(string(jsn)) 417 | if status["Failure"] != nil { 418 | if !batch && tx != nil { 419 | // print last failing transaction if possible 420 | showTx(tx) 421 | } 422 | return jsn, errors.New("replayer: transaction failed") 423 | } 424 | return nil, nil 425 | } 426 | 427 | // saveBreakpoint saves replayer break point for evmContract. 428 | func (r *Replayer) saveBreakpoint(errormsg []byte) error { 429 | var err error 430 | dir := fmt.Sprintf("%s-block-%d-tx-%d", r.Testnet, r.BreakBlock, r.BreakTx) 431 | log.Info(fmt.Sprintf("save breakpoint %s", dir)) 432 | 433 | // set chainID 434 | r.Breakpoint.ChainID = r.ChainID 435 | 436 | // get HEAD of aurora-engine 437 | r.Breakpoint.AuroraEngineHead, err = auroraEngineHead(r.Contract) 438 | if err != nil { 439 | return err 440 | } 441 | 442 | // encode transaction 443 | if r.Breakpoint.tx != nil { 444 | r.Breakpoint.Transaction = hex.EncodeToString(r.Breakpoint.tx.RLP) 445 | } 446 | 447 | // remove output dir 448 | if err := os.RemoveAll(dir); err != nil { 449 | return err 450 | } 451 | if err := os.Mkdir(dir, 0755); err != nil { 452 | return err 453 | } 454 | 455 | // marshal breakpoint data structure 456 | jsn, err := json.MarshalIndent(&r.Breakpoint, "", " ") 457 | if err != nil { 458 | return err 459 | } 460 | filename := filepath.Join(dir, "breakpoint.json") 461 | if err := os.WriteFile(filename, jsn, 0644); err != nil { 462 | return err 463 | } 464 | log.Info(fmt.Sprintf("'%s' written", filename)) 465 | 466 | // write error message, if defined (-autobreak was used) 467 | if errormsg != nil { 468 | filename := filepath.Join(dir, "errormsg.json") 469 | if err := os.WriteFile(filename, errormsg, 0644); err != nil { 470 | return err 471 | } 472 | log.Info(fmt.Sprintf("'%s' written", filename)) 473 | } 474 | 475 | // copy key file 476 | home, err := os.UserHomeDir() 477 | if err != nil { 478 | return err 479 | } 480 | filename = r.Breakpoint.AccountID + ".json" 481 | path := filepath.Join(home, ".near-credentials", r.Config.NetworkID, filename) 482 | if err := file.Copy(path, filepath.Join(dir, filename)); err != nil { 483 | return err 484 | } 485 | 486 | // copy local nearcore directory 487 | localDir := filepath.Join(home, ".near", "local") 488 | if err := file.CopyDir(localDir, filepath.Join(dir, "local")); err != nil { 489 | return err 490 | } 491 | 492 | // tar everything up 493 | return tar.Create(dir) 494 | } 495 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= 5 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 6 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 7 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 8 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 9 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 10 | cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= 11 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 12 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 13 | cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= 14 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 15 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 16 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 17 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 18 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 19 | collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= 20 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 21 | github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= 22 | github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= 23 | github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= 24 | github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= 25 | github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= 26 | github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= 27 | github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= 28 | github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= 29 | github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= 30 | github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= 31 | github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= 32 | github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 33 | github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= 34 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 35 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 36 | github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= 37 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 38 | github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= 39 | github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= 40 | github.com/VictoriaMetrics/fastcache v1.8.0 h1:ybZqS7kRy8YVzYsI09GLzQhs7iqS6cOEH2avtknD1SU= 41 | github.com/VictoriaMetrics/fastcache v1.8.0/go.mod h1:n7Sl+ioh/HlWeYHLSIBIE8TcZFHg/+xgvomWSS5xuEE= 42 | github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= 43 | github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= 44 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 45 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 46 | github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= 47 | github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= 48 | github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= 49 | github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= 50 | github.com/aurora-is-near/go-jsonrpc/v3 v3.1.1 h1:Nw9J9K7CksfVBa9uCVfvf1uAIQRhrNG677q8eH1gtVg= 51 | github.com/aurora-is-near/go-jsonrpc/v3 v3.1.1/go.mod h1:Li013EFlPu3crtlFQtWJAeE7VmdhSsxOpRoop1J0icw= 52 | github.com/aurora-is-near/near-api-go v0.0.11 h1:HxMzVCxDpfLjlDrzTa2XXJRtCt/2Elp0gheBYS7ALxw= 53 | github.com/aurora-is-near/near-api-go v0.0.11/go.mod h1:Z3i9AiorLfdsuJGKspZToKUR6+niPy1srb6DNSqlE/k= 54 | github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= 55 | github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= 56 | github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= 57 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= 58 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= 59 | github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= 60 | github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= 61 | github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= 62 | github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= 63 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 64 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 65 | github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= 66 | github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= 67 | github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= 68 | github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= 69 | github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= 70 | github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= 71 | github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= 72 | github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= 73 | github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= 74 | github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= 75 | github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= 76 | github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= 77 | github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= 78 | github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= 79 | github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= 80 | github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= 81 | github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= 82 | github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= 83 | github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= 84 | github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= 85 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 86 | github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= 87 | github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= 88 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= 89 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 90 | github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= 91 | github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 92 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 93 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 94 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 95 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 96 | github.com/cloudflare/cloudflare-go v0.11.0/go.mod h1:/FTeLWG9RAMaxNx2eAJ17d5n0XzlfMjFhU9sjMuKcWo= 97 | github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= 98 | github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= 99 | github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= 100 | github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 101 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 102 | github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= 103 | github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= 104 | github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 105 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 106 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 107 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 108 | github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= 109 | github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= 110 | github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= 111 | github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= 112 | github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= 113 | github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= 114 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 115 | github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= 116 | github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= 117 | github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= 118 | github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= 119 | github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= 120 | github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= 121 | github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= 122 | github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= 123 | github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= 124 | github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= 125 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 126 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 127 | github.com/ethereum/go-ethereum v1.10.15 h1:E9o0kMbD8HXhp7g6UwIwntY05WTDheCGziMhegcBsQw= 128 | github.com/ethereum/go-ethereum v1.10.15/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= 129 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 130 | github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= 131 | github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 132 | github.com/fjl/memsize v0.0.1 h1:+zhkb+dhUgx0/e+M8sF0QqiouvMQUiKR+QYvdxIOKcQ= 133 | github.com/fjl/memsize v0.0.1/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 134 | github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= 135 | github.com/frankbraun/codechain v1.2.0 h1:1l5MvmSIvoJjfJwQHW6xhyBbXBswUWITI/opxQ5KhpQ= 136 | github.com/frankbraun/codechain v1.2.0/go.mod h1:nr3SDPm5pqJS5HHu3FWdr7daodmqF3oW4YKplIPikAg= 137 | github.com/frankbraun/go-diff v1.0.0/go.mod h1:Wrp+O0MYpykg99dB2rA1oVnZk8/DdkLis2QWAWR6QfU= 138 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 139 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= 140 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 141 | github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= 142 | github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= 143 | github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= 144 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 145 | github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= 146 | github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= 147 | github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= 148 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 149 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 150 | github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= 151 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 152 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 153 | github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= 154 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 155 | github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= 156 | github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= 157 | github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= 158 | github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= 159 | github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= 160 | github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= 161 | github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= 162 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 163 | github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= 164 | github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= 165 | github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 166 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 167 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 168 | github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= 169 | github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= 170 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 171 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 172 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 173 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 174 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 175 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 176 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 177 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 178 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 179 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 180 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 181 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 182 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 183 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 184 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 185 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 186 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 187 | github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 188 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 189 | github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 190 | github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 191 | github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 192 | github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= 193 | github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 194 | github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= 195 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 196 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 197 | github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= 198 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 199 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 200 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 201 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 202 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 203 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 204 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 205 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 206 | github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 207 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 208 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 209 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 210 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 211 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 212 | github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 213 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 214 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 215 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 216 | github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 217 | github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= 218 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 219 | github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= 220 | github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= 221 | github.com/hashicorp/go-bexpr v0.1.11 h1:6DqdA/KBjurGby9yTY0bmkathya0lfwF2SeuubCI7dY= 222 | github.com/hashicorp/go-bexpr v0.1.11/go.mod h1:f03lAo0duBlDIUMGCuad8oLcgejw4m7U+N8T+6Kz1AE= 223 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 224 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 225 | github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= 226 | github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 227 | github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= 228 | github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= 229 | github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= 230 | github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= 231 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 232 | github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= 233 | github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= 234 | github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= 235 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 236 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 237 | github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= 238 | github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= 239 | github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= 240 | github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= 241 | github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= 242 | github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= 243 | github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= 244 | github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= 245 | github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= 246 | github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= 247 | github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= 248 | github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 249 | github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= 250 | github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 251 | github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= 252 | github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 253 | github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 254 | github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= 255 | github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 256 | github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= 257 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 258 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 259 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 260 | github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= 261 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 262 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 263 | github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= 264 | github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= 265 | github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= 266 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 267 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 268 | github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= 269 | github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= 270 | github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= 271 | github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= 272 | github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= 273 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 274 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= 275 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 276 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 277 | github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= 278 | github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 279 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 280 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 281 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 282 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 283 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 284 | github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= 285 | github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= 286 | github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= 287 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 288 | github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 289 | github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 290 | github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= 291 | github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 292 | github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 293 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 294 | github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 295 | github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 296 | github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 297 | github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= 298 | github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 299 | github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= 300 | github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= 301 | github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= 302 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 303 | github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= 304 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= 305 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 306 | github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= 307 | github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 308 | github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 309 | github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= 310 | github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= 311 | github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= 312 | github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 313 | github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= 314 | github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= 315 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 316 | github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 317 | github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= 318 | github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 319 | github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= 320 | github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw= 321 | github.com/mitchellh/pointerstructure v1.2.1/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= 322 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 323 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 324 | github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= 325 | github.com/mutecomm/mute v0.0.0-20180427225835-8124193e6371/go.mod h1:V0AN5RERqeAJ0oaqiH0WzgjFmdm2FFT+hmSU1hI1Aq8= 326 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 327 | github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= 328 | github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= 329 | github.com/near/borsh-go v0.3.0/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ= 330 | github.com/near/borsh-go v0.3.1 h1:ukNbhJlPKxfua0/nIuMZhggSU8zvtRP/VyC25LLqPUA= 331 | github.com/near/borsh-go v0.3.1/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ= 332 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= 333 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 334 | github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= 335 | github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= 336 | github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= 337 | github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 338 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 339 | github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 340 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 341 | github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= 342 | github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 343 | github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 344 | github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 345 | github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 346 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 347 | github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= 348 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 349 | github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 350 | github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 351 | github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 352 | github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= 353 | github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= 354 | github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= 355 | github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= 356 | github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= 357 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 358 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 359 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 360 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 361 | github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= 362 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 363 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 364 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 365 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 366 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 367 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 368 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 369 | github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 370 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 371 | github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= 372 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 373 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 374 | github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 375 | github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= 376 | github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= 377 | github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= 378 | github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= 379 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 380 | github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= 381 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 382 | github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= 383 | github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= 384 | github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 385 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 386 | github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= 387 | github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= 388 | github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= 389 | github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= 390 | github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= 391 | github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= 392 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 393 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 394 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 395 | github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 396 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 397 | github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 398 | github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= 399 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 400 | github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= 401 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 402 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 403 | github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 404 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 405 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 406 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 407 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 408 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 409 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 410 | github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= 411 | github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= 412 | github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= 413 | github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= 414 | github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= 415 | github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= 416 | github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= 417 | github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= 418 | github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= 419 | github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= 420 | github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= 421 | github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= 422 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= 423 | github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= 424 | github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= 425 | github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= 426 | github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= 427 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 428 | github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= 429 | github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= 430 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 431 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 432 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 433 | go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= 434 | go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= 435 | go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 436 | golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 437 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 438 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 439 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 440 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 441 | golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 442 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 443 | golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 444 | golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 445 | golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 446 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 447 | golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 448 | golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= 449 | golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 450 | golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI= 451 | golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 452 | golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 453 | golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 454 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 455 | golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 456 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 457 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 458 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 459 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 460 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 461 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 462 | golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 463 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 464 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 465 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 466 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 467 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 468 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 469 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 470 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 471 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 472 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 473 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 474 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 475 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 476 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 477 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 478 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 479 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 480 | golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 481 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 482 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 483 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 484 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 485 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 486 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 487 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 488 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 489 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 490 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 491 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 492 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 493 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 494 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 495 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 496 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 497 | golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 498 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 499 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 500 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 501 | golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 502 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 503 | golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 504 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= 505 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 506 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 507 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 508 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 509 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 510 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 511 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 512 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 513 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 514 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 515 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 516 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 517 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 518 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 519 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= 520 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 521 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 522 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 523 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 524 | golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 525 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 526 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 527 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 528 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 529 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 530 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 531 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 532 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 533 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 534 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 535 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 536 | golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 537 | golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 538 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 539 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 540 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 541 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 542 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 543 | golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 544 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 545 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 546 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 547 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 548 | golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 549 | golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 550 | golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 551 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 552 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 553 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 554 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 555 | golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 556 | golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 557 | golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 558 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 559 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 560 | golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 561 | golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 562 | golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 563 | golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 564 | golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 565 | golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 566 | golang.org/x/sys v0.0.0-20220111092808-5a964db01320 h1:0jf+tOCoZ3LyutmCOWpVni1chK4VfFLhRsDK7MhqGRY= 567 | golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 568 | golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 569 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 570 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 571 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 572 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 573 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 574 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 575 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 576 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 577 | golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= 578 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 579 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 580 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 581 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 582 | golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 583 | golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 584 | golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 585 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 586 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 587 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 588 | golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 589 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 590 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 591 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 592 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 593 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 594 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 595 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 596 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 597 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 598 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 599 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 600 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 601 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 602 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 603 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 604 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 605 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 606 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 607 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 608 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 609 | golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 610 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 611 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 612 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 613 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 614 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 615 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 616 | gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= 617 | gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= 618 | gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= 619 | gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= 620 | gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= 621 | gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= 622 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 623 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 624 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 625 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 626 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 627 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 628 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 629 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 630 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 631 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 632 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 633 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 634 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 635 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 636 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 637 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 638 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 639 | google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 640 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 641 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 642 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 643 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 644 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 645 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 646 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 647 | google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 648 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 649 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 650 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 651 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 652 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 653 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 654 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 655 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 656 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 657 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 658 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 659 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 660 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 661 | google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= 662 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 663 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 664 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 665 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 666 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 667 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 668 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 669 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 670 | gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= 671 | gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= 672 | gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= 673 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= 674 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 675 | gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= 676 | gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= 677 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 678 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 679 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 680 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 681 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 682 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 683 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 684 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 685 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 686 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 687 | gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= 688 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 689 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 690 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 691 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 692 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 693 | honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= 694 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 695 | rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= 696 | --------------------------------------------------------------------------------