diff --git a/.dockerignore b/.dockerignore index 6d09bb2128..fae28f2680 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,15 +1,31 @@ -Dockerfile -.github -.git .* +.git +.github +.github +.idea +.vscode +.waypoint *.bat +*.log *.md *.png *.toml +*.tpl +*.hcl +contracts/wasm +Dockerfile +docOps/ +documentation +evmemulator +gascalibration +packages/snapshot +packges/vm/wasmlib +schema +snapshot +tools +wal wasp wasp-cli -*.log -waspdb/ -docOps/ -tools/devnet -tools/cluster \ No newline at end of file +wasp-cluster +waspdb + diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 89028ded9c..7fb5569b34 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -29,7 +29,7 @@ jobs: - name: Test run: make test-short - + contract-test: name: Wasm contract tests runs-on: ubuntu-latest @@ -43,7 +43,7 @@ jobs: - name: install golang uses: actions/setup-go@v3 with: - go-version: '1.18.5' + go-version: "1.18.5" - name: install tinygo # only work on x86_64 @@ -51,17 +51,17 @@ jobs: wget https://github.com/tinygo-org/tinygo/releases/download/v0.23.0/tinygo_0.23.0_amd64.deb sudo dpkg -i tinygo_0.23.0_amd64.deb export PATH=$PATH:/usr/local/bin - + - name: install rust-toolchain uses: actions-rs/toolchain@v1.0.6 with: - toolchain: stable + toolchain: stable - name: install wasm-pack run: | curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - name: install Node.js + - name: install Node.js uses: actions/setup-node@v3 with: node-version: 18 @@ -103,35 +103,33 @@ jobs: elif [ $TEST_LANG == "rswasm" ]; then go test ./... -rswasm fi - + golangci: name: Lint runs-on: ubuntu-latest steps: - uses: actions/setup-go@v2 with: - go-version: 1.18.5 + go-version: 1.19.1 id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Generate SC files - run: | - cd contracts/wasm/scripts - bash schema_all.sh + # - name: Generate SC files + # run: | + # cd contracts/wasm/scripts + # bash schema_all.sh - - name: golangci-lint in SC - uses: golangci/golangci-lint-action@v3 - with: - version: v1.48.0 - working-directory: contracts/wasm - args: --fix --timeout 5m0s --path-prefix="" - skip-pkg-cache: true + # - name: golangci-lint in SC + # uses: golangci/golangci-lint-action@v3 + # with: + # working-directory: contracts/wasm + # args: --fix --timeout 5m0s --path-prefix="" + # skip-pkg-cache: true - name: Run global scope golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.48.0 args: --timeout 5m0s skip-pkg-cache: true diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 477bbc0cef..a2e19128b4 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -1,38 +1,41 @@ -name: Deploy IOTA Operator on DockerHub +name: Docker Image CI on: - push: - branches: - - 'master' - tags: - - 'v*' - - workflow_dispatch: + release: + types: + - published jobs: - push_to_registry: - name: Push Docker image to Docker Hub + docker: + name: Build and Push Docker image runs-on: ubuntu-latest + env: + image_name: iotaledger/wasp + steps: - - name: Check out the repo - uses: actions/checkout@v2 - - - name: Log in to Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + - uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 with: username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }} password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }} - + - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4 with: images: iotaledger/wasp - - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + + - name: Build and push + uses: docker/build-push-action@v3 with: + context: . push: true + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: BUILD_TAGS=rocksdb,builtin_static,BUILD_LD_FLAGS=-X github.com/iotaledger/wasp/packages/wasp.VersionHash=${{ env. GITHUB_SHA }} + build-args: BUILD_TAGS="rocksdb,builtin_static",BUILD_LD_FLAGS="-X github.com/iotaledger/wasp/packages/wasp.VersionHash=${{ github.sha }}" diff --git a/.golangci.yml b/.golangci.yml index a9af9fe176..d19741c7fa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,8 +1,17 @@ run: - go: "1.18" + tests: true + skip-dirs: + - contracts/wasm + issues: exclude-use-default: false + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 max-same-issues: 0 new-from-rev: "" exclude: @@ -57,8 +66,6 @@ linters-settings: - octalLiteral - whyNoLint - wrapperFunc - goimports: - local-prefixes: "" gomnd: settings: mnd: @@ -70,17 +77,68 @@ linters-settings: locale: US nolintlint: allow-unused: false # report any unused nolint directives + goimports: + local-prefixes: github.com/iotaledger + golint: + min-confidence: 0.9 + gocyclo: + min-complexity: 15 + staticcheck: + checks: ["all"] + stylecheck: + initialisms: + [ + "ACL", + "API", + "ASCII", + "CPU", + "CSS", + "DNS", + "EOF", + "GUID", + "HTML", + "HTTP", + "HTTPS", + "ID", + "IP", + "JSON", + "QPS", + "RAM", + "RPC", + "SLA", + "SMTP", + "SQL", + "SSH", + "TCP", + "TLS", + "TTL", + "UDP", + "UI", + "GID", + "UID", + "UUID", + "URI", + "URL", + "UTF8", + "VM", + "XML", + "XMPP", + "XSRF", + "XSS", + "SIP", + "RTP", + "AMQP", + "DB", + "TS", + ] linters: disable-all: true enable: - bodyclose # Checks whether HTTP response body is closed successfully. - - deadcode # Finds unused code. - dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f()). - dupl # Tool for code clone detection. - # Errcheck is a program for checking for unchecked errors in go programs. - # These unchecked errors can be critical bugs in some cases - - errcheck + - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases - exportloopref # Checks for pointers to enclosing loop variables. - funlen # Tool for detection of long functions. - goconst # Finds repeated strings that could be replaced by a constant. @@ -93,30 +151,42 @@ linters: - revive # revive is the newer replacement for golint - goprintffuncname # Checks that printf-like functions are named with f at the end. - gosec # Inspects source code for security problems. - # - gosimple # Linter for Go source code that specializes in simplifying a code. + - gosimple # Linter for Go source code that specializes in simplifying a code. - govet # Vet examines Go source code and reports suspicious constructs. - ineffassign # Detects when assignments to existing variables are not used. - misspell # Finds commonly misspelled English words in comments. - nakedret # Finds naked returns in functions greater than a specified function length. - noctx # noctx finds sending http request without context.Context. - # - nolintlint # Reports ill-formed or insufficient nolint directives. - # - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks. - - structcheck # Finds unused struct fields. + - nolintlint # Reports ill-formed or insufficient nolint directives. + - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks. - unconvert # Remove unnecessary type conversions. - unparam # Reports unused function parameters. - # - unused # Checks Go code for unused constants, variables, functions and types. - - varcheck # Finds unused global variables and constants. + - unused # Checks Go code for unused constants, variables, functions and types. - whitespace # Tool for detection of leading and trailing whitespace. + - asasalint # check for pass []any as any in variadic func(...any) + - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false] + - bidichk # Checks for dangerous unicode character sequences + - contextcheck # check the function whether use a non-inherited context + - decorder # check declaration order and count of types, constants, variables and functions + - depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false] + - execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds + - goheader # Checks is file header matches to pattern [fast: true, auto-fix: false] + - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false] + - grouper # An analyzer to analyze expression groups. + - importas # Enforces consistent import aliases [fast: true, auto-fix: false] + - predeclared # find code that shadows one of Go's predeclared identifiers [fast: true, auto-fix: false] + - rowserrcheck # checks whether Err of rows is checked successfully [fast: true, auto-fix: false] + - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed. [fast: true, auto-fix: false] + - tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17 + - tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes [fast: true, auto-fix: false] + - usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library. + - wastedassign # wastedassign finds wasted assignment statements. [fast: true, auto-fix: false] - ### `gosimple` `staticcheck` and `unused` are disabled because of issues with go 1.18: https://github.com/golangci/golangci-lint/issues/2649 - ### nolintlint also disabled while the above ones are disabled, to avoid false positives - + # nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity [fast: true, auto-fix: false] # don't enable: # gomnd: An analyzer to detect magic numbers. - # asciicheck: Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false] # cyclop: checks function and package cyclomatic complexity [fast: true, auto-fix: false] - # depguard: Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false] # durationcheck: check for two durations multiplied together [fast: true, auto-fix: false] # errorlint: go-errorlint is a source code linter for Go software that can be used to find code that will cause problemswith the error wrapping scheme introduced in Go 1.13. [fast: true, auto-fix: false] # exhaustive: check exhaustiveness of enum switch statements [fast: true, auto-fix: false] @@ -130,27 +200,18 @@ linters: # godot: Check if comments end in a period [fast: true, auto-fix: true] # godox: Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false] # gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true] - # goheader: Checks is file header matches to pattern [fast: true, auto-fix: false] - # gomodguard: Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false] # ifshort: Checks that your code uses short syntax for if-statements whenever possible [fast: true, auto-fix: false] - # importas: Enforces consistent import aliases [fast: true, auto-fix: false] # interfacer: Linter that suggests narrower interface types [fast: true, auto-fix: false] # lll: Reports long lines [fast: true, auto-fix: false] # makezero: Finds slice declarations with non-zero initial length [fast: true, auto-fix: false] # maligned: Tool to detect Go structs that would take less memory if their fields were sorted [fast: true, auto-fix: false] # nestif: Reports deeply nested if statements [fast: true, auto-fix: false] # nilerr: Finds the code that returns nil even if it checks that the error is not nil. [fast: true, auto-fix: false] - # nlreturn: nlreturn checks for a new line before return and branch statements to increase code clarity [fast: true, auto-fix: false] # paralleltest: paralleltest detects missing usage of t.Parallel() method in your Go test [fast: true, auto-fix: false] # prealloc: Finds slice declarations that could potentially be preallocated [fast: true, auto-fix: false] - # predeclared: find code that shadows one of Go's predeclared identifiers [fast: true, auto-fix: false] - # rowserrcheck: checks whether Err of rows is checked successfully [fast: true, auto-fix: false] # scopelint: Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false] - # sqlclosecheck: Checks that sql.Rows and sql.Stmt are closed. [fast: true, auto-fix: false] # testpackage: linter that makes you use a separate _test package [fast: true, auto-fix: false] # thelper: thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers [fast: true, auto-fix: false] - # tparallel: tparallel detects inappropriate usage of t.Parallel() method in your Go test codes [fast: true, auto-fix: false] # typecheck: Like the front-end of a Go compiler, parses and type-checks Go code [fast: true, auto-fix: false] - # wastedassign: wastedassign finds wasted assignment statements. [fast: true, auto-fix: false] # wrapcheck: Checks that errors returned from external packages are wrapped [fast: true, auto-fix: false] # wsl: Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false] diff --git a/Dockerfile b/Dockerfile index 48cba1f3a7..7bbea96eac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ ARG BUILD_LD_FLAGS="" ARG BUILD_TARGET="./..." WORKDIR /wasp +RUN mkdir waspdb # Make sure that modules only get pulled when the module file has changed COPY go.mod go.sum ./ @@ -16,10 +17,15 @@ RUN go mod verify # Project build stage COPY . . + RUN go build -o . -tags=${BUILD_TAGS} -ldflags="${BUILD_LD_FLAGS}" ${BUILD_TARGET} -# Wasp build -FROM gcr.io/distroless/cc +############################ +# Image +############################ +# https://console.cloud.google.com/gcr/images/distroless/global/cc-debian11 +# using distroless cc "nonroot" image, which includes everything in the base image (glibc, libssl and openssl) +FROM gcr.io/distroless/cc-debian11:nonroot ARG FINAL_BINARY="wasp" @@ -29,7 +35,11 @@ EXPOSE 5550/tcp EXPOSE 6060/tcp EXPOSE 4000/udp -COPY --from=build /wasp/${FINAL_BINARY} /usr/bin/ -COPY docker_config.json /etc/wasp_config.json +# Copy the app dir into distroless image +COPY --chown=nonroot:nonroot --from=build /wasp/${FINAL_BINARY} /usr/bin/ +COPY --chown=nonroot:nonroot --from=build /wasp/waspdb /waspdb + +WORKDIR /usr/bin/ +USER nonroot -CMD ["wasp", "-c", "/etc/wasp_config.json"] +ENTRYPOINT ["/usr/bin/wasp"] \ No newline at end of file diff --git a/client/chainclient/checkrequest.go b/client/chainclient/checkrequest.go index 43e5d0a808..1b4370dbac 100644 --- a/client/chainclient/checkrequest.go +++ b/client/chainclient/checkrequest.go @@ -1,11 +1,12 @@ package chainclient import ( + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/blocklog" - "golang.org/x/xerrors" ) // CheckRequestResult fetches the receipt for the given request ID, and returns diff --git a/client/chainclient/evm.go b/client/chainclient/evm.go index 9919cb531a..3af043876a 100644 --- a/client/chainclient/evm.go +++ b/client/chainclient/evm.go @@ -2,6 +2,7 @@ package chainclient import ( "github.com/ethereum/go-ethereum/common" + "github.com/iotaledger/wasp/packages/isc" ) diff --git a/client/client.go b/client/client.go index 73b4f960f6..12743532db 100644 --- a/client/client.go +++ b/client/client.go @@ -9,8 +9,9 @@ import ( "net/http" "strings" - "github.com/iotaledger/wasp/packages/webapi/model" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/webapi/model" ) // WaspClient allows to make requests to the Wasp web API. diff --git a/client/evm.go b/client/evm.go index fb2d7268c8..eee0aab7b2 100644 --- a/client/evm.go +++ b/client/evm.go @@ -4,6 +4,7 @@ import ( "net/http" "github.com/ethereum/go-ethereum/common" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" diff --git a/client/multiclient/reqstatus.go b/client/multiclient/reqstatus.go index e37ed015cb..ecb19cd60d 100644 --- a/client/multiclient/reqstatus.go +++ b/client/multiclient/reqstatus.go @@ -3,10 +3,11 @@ package multiclient import ( "time" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/packages/isc" - "golang.org/x/xerrors" ) // WaitUntilRequestProcessed blocks until the request has been processed by all nodes diff --git a/config.json b/config.json index 9ad2267696..f63fb80f6b 100644 --- a/config.json +++ b/config.json @@ -1,14 +1,19 @@ { - "l1": { - "inxAddress": "localhost:9029" - }, - "database": { - "directory": "waspdb" + "app": { + "checkForUpdates": true, + "shutdown": { + "stopGracePeriod": "5m", + "log": { + "enabled": true, + "filePath": "shutdown.log" + } + } }, "logger": { "level": "debug", "disableCaller": false, "disableStacktrace": true, + "stacktraceLevel": "panic", "encoding": "console", "outputPaths": [ "stdout", @@ -16,29 +21,52 @@ ], "disableEvents": true }, - "network": { - "bindAddress": "0.0.0.0", - "externalAddress": "auto" + "inx": { + "address": "localhost:9029", + "maxConnectionAttempts": 30 }, - "node": { - "disablePlugins": [], - "enablePlugins": [] + "database": { + "inMemory": false, + "directory": "waspdb" }, - "users": { - "wasp": { - "password": "wasp", - "permissions": [ - "dashboard", - "api", - "chain.read", - "chain.write" - ] - } + "registry": { + "useText": false, + "fileName": "chain-registry.json" + }, + "peering": { + "netID": "127.0.0.1:4000", + "port": 4000 + }, + "chains": { + "broadcastUpToNPeers": 2, + "broadcastInterval": "5s", + "apiCacheTTL": "5m", + "pullMissingRequestsFromCommittee": true + }, + "rawBlocks": { + "enabled": false, + "directory": "blocks" + }, + "profiling": { + "enabled": false, + "bindAddress": "localhost:6060" + }, + "wal": { + "enabled": true, + "directory": "wal" + }, + "metrics": { + "enabled": true, + "bindAddress": "127.0.0.1:2112" }, "webapi": { + "enabled": true, + "nodeOwnerAddresses": [], + "bindAddress": "0.0.0.0:9090", "auth": { + "scheme": "none", "jwt": { - "durationHours": 24 + "duration": "24h" }, "basic": { "username": "wasp" @@ -47,15 +75,21 @@ "whitelist": [ "127.0.0.1" ] - }, - "scheme": "none" - }, - "bindAddress": "0.0.0.0:9090" + } + } + }, + "nanomsg": { + "enabled": true, + "port": 5550 }, "dashboard": { + "enabled": true, + "bindAddress": "0.0.0.0:7000", + "exploreAddressURL": "", "auth": { + "scheme": "basic", "jwt": { - "durationHours": 24 + "duration": "24h" }, "basic": { "username": "wasp" @@ -64,24 +98,20 @@ "whitelist": [ "127.0.0.1" ] - }, - "scheme": "basic" - }, - "bindAddress": "0.0.0.0:7000" - }, - "peering": { - "port": 4000, - "netid": "127.0.0.1:4000" - }, - "nanomsg": { - "port": 5550 - }, - "metrics": { - "bindAddress": "127.0.0.1:2112", - "enabled": true + } + } }, - "wal": { - "directory": "wal", - "enabled": true + "users": { + "users": { + "wasp": { + "Password": "wasp", + "Permissions": [ + "dashboard", + "api", + "chain.read", + "chain.write" + ] + } + } } -} \ No newline at end of file +} diff --git a/config_defaults.json b/config_defaults.json new file mode 100755 index 0000000000..e3a2d20e7d --- /dev/null +++ b/config_defaults.json @@ -0,0 +1,116 @@ +{ + "app": { + "checkForUpdates": true, + "shutdown": { + "stopGracePeriod": "5m", + "log": { + "enabled": true, + "filePath": "shutdown.log" + } + } + }, + "logger": { + "level": "info", + "disableCaller": true, + "disableStacktrace": false, + "stacktraceLevel": "panic", + "encoding": "console", + "outputPaths": [ + "stdout" + ], + "disableEvents": true + }, + "inx": { + "address": "localhost:9029", + "maxConnectionAttempts": 30 + }, + "database": { + "inMemory": false, + "directory": "waspdb" + }, + "registry": { + "useText": false, + "fileName": "chain-registry.json" + }, + "peering": { + "netID": "127.0.0.1:4000", + "port": 4000 + }, + "chains": { + "broadcastUpToNPeers": 2, + "broadcastInterval": "5s", + "apiCacheTTL": "5m", + "pullMissingRequestsFromCommittee": true + }, + "rawBlocks": { + "enabled": false, + "directory": "blocks" + }, + "profiling": { + "enabled": false, + "bindAddress": "localhost:6060" + }, + "wal": { + "enabled": true, + "directory": "wal" + }, + "metrics": { + "enabled": true, + "bindAddress": "127.0.0.1:2112" + }, + "webapi": { + "enabled": true, + "nodeOwnerAddresses": [], + "bindAddress": "127.0.0.1:9090", + "auth": { + "scheme": "jwt", + "jwt": { + "duration": "24h" + }, + "basic": { + "username": "wasp" + }, + "ip": { + "whitelist": [ + "127.0.0.1" + ] + } + } + }, + "nanomsg": { + "enabled": true, + "port": 5550 + }, + "dashboard": { + "enabled": true, + "bindAddress": "127.0.0.1:7000", + "exploreAddressURL": "", + "auth": { + "scheme": "basic", + "jwt": { + "duration": "24h" + }, + "basic": { + "username": "wasp" + }, + "ip": { + "whitelist": [ + "127.0.0.1" + ] + } + } + }, + "users": { + "users": { + "wasp": { + "Password": "wasp", + "Permissions": [ + "dashboard", + "api", + "chain.read", + "chain.write" + ] + } + } + } +} diff --git a/contracts/native/inccounter/inccounter_test.go b/contracts/native/inccounter/inccounter_test.go index 72289bb31d..019b62b6e3 100644 --- a/contracts/native/inccounter/inccounter_test.go +++ b/contracts/native/inccounter/inccounter_test.go @@ -4,6 +4,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/stretchr/testify/require" ) const incName = "incTest" diff --git a/contracts/native/micropay/payment.go b/contracts/native/micropay/payment.go index 0d663edcaf..b035cecbbe 100644 --- a/contracts/native/micropay/payment.go +++ b/contracts/native/micropay/payment.go @@ -7,7 +7,6 @@ import ( iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/util" ) @@ -39,16 +38,6 @@ func NewPayment(ord uint32, amount uint64, targetAddr iotago.Address, payerKeyPa // } } -//nolint:deadcode -func paymentEssence(ord uint32, amount uint64, payerAddr, targetAddr iotago.Address) []byte { - var buf bytes.Buffer - buf.Write(util.Uint32To4Bytes(ord)) - buf.Write(util.Uint64To8Bytes(amount)) - buf.Write(isc.BytesFromAddress(payerAddr)) - buf.Write(isc.BytesFromAddress(targetAddr)) - return buf.Bytes() -} - func NewPaymentFromBytes(data []byte) (*Payment, error) { ret := &Payment{} if err := ret.Read(bytes.NewReader(data)); err != nil { diff --git a/contracts/wasm/corecontracts/test/core_root_test.go b/contracts/wasm/corecontracts/test/core_root_test.go index 72da1205fc..7fd9004bf9 100644 --- a/contracts/wasm/corecontracts/test/core_root_test.go +++ b/contracts/wasm/corecontracts/test/core_root_test.go @@ -34,7 +34,7 @@ func TestDeployContract(t *testing.T) { wasm, err := os.ReadFile("./testdata/testdata.wasm") require.NoError(t, err) fblob.Params.ProgBinary().SetValue(wasm) - fblob.Params.VmType().SetValue("wasmtime") + fblob.Params.VMType().SetValue("wasmtime") fblob.Func.Post() require.NoError(t, ctxb.Err) diff --git a/contracts/wasm/scripts/all_build.sh b/contracts/wasm/scripts/all_build.sh index de2cc3a879..e734c8e84c 100644 --- a/contracts/wasm/scripts/all_build.sh +++ b/contracts/wasm/scripts/all_build.sh @@ -1,6 +1,8 @@ #!/bin/bash -bash core_build.sh -bash go_all.sh -force -bash ts_all.sh -force -bash rust_all.sh -force -bash update_hardcoded.sh +root_path=$(git rev-parse --show-toplevel)/contracts/wasm/scripts +bash $root_path/core_build.sh +bash $root_path/schema_all.sh +bash $root_path/go_all.sh -force +bash $root_path/ts_all.sh -force +bash $root_path/rust_all.sh -force +bash $root_path/update_hardcoded.sh diff --git a/contracts/wasm/scripts/cleanup.cmd b/contracts/wasm/scripts/cleanup.cmd index 8d4ea1b22d..3da278ab17 100644 --- a/contracts/wasm/scripts/cleanup.cmd +++ b/contracts/wasm/scripts/cleanup.cmd @@ -1,29 +1,50 @@ -cd .. -del /s consts.* -del /s contract.* -del /s keys.* -del /s lib.* -del /s params.* -del /s results.* -del /s state.* -del /s typedefs.* -del /s types.* -del /s /q target\*.* +cd %1 -rem careful not to delete all, this could fuck up gascalibration -for /d %%f in (*.) do del %%f\go\main.go +# remove go files +del /s go/%1/consts.go +del /s go/%1/contract.go +del /s go/%1/keys.go +del /s go/%1/lib.go +del /s go/%1/params.go +del /s go/%1/results.go +del /s go/%1/state.go +del /s go/%1/typedefs.go +del /s go/%1/events.go +del /s go/%1/eventhandlers.go +del /s go/%1/structs.go +del /s go/%1/types.go +del /s go/main.go -rem careful not to delete all, this could fuck up fairroulette frontend -for /d %%f in (*.) do del %%f\ts\%%f\index.ts -for /d %%f in (*.) do del %%f\ts\%%f\tsconfig.json +# remove ts files +del /s ts/%1/consts.ts +del /s ts/%1/contract.ts +del /s ts/%1/keys.ts +del /s ts/%1/lib.ts +del /s ts/%1/params.ts +del /s ts/%1/results.ts +del /s ts/%1/state.ts +del /s ts/%1/typedefs.ts +del /s ts/%1/events.ts +del /s ts/%1/eventhandlers.ts +del /s ts/%1/structs.ts +del /s ts/%1/types.ts +del /s ts/%1/index.ts +del /s ts/%1/tsconfig.json +del /s /q pkg/*.* +del /s /q ts/pkg/*.* -for /d %%f in (*.) do del /s /q %%f\pkg\*.* -for /d %%f in (*.) do del /s /q %%f\ts\pkg\*.* +# remove rs files +del /s src/consts.rs +del /s src/contract.rs +del /s src/keys.rs +del /s src/lib.rs +del /s src/params.rs +del /s src/results.rs +del /s src/state.rs +del /s src/typedefs.rs +del /s src/events.rs +del /s src/eventhandlers.rs +del /s src/structs.rs +del /s src/types.rs -cd gascalibration -for /d %%f in (*.) do del %%f\go\main.go -for /d %%f in (*.) do del %%f\ts\%%f\index.ts -for /d %%f in (*.) do del %%f\ts\%%f\tsconfig.json -for /d %%f in (*.) do del /s /q %%f\pkg\*.* -for /d %%f in (*.) do del /s /q %%f\ts\pkg\*.* cd scripts diff --git a/contracts/wasm/scripts/cleanup.sh b/contracts/wasm/scripts/cleanup.sh index 8123a20ad1..e4bb4fd121 100644 --- a/contracts/wasm/scripts/cleanup.sh +++ b/contracts/wasm/scripts/cleanup.sh @@ -1,38 +1,50 @@ #!/bin/bash -cd .. -root=$(git rev-parse --show-toplevel) +example_name=$1 +cd $example_name -rm "$root"/contracts/wasm/*/*/*/consts.* -rm "$root"/contracts/wasm/*/*/*/contract.* -rm "$root"/contracts/wasm/*/*/*/keys.* -rm "$root"/contracts/wasm/*/*/*/lib.* -rm "$root"/contracts/wasm/*/*/*/params.* -rm "$root"/contracts/wasm/*/*/*/results.* -rm "$root"/contracts/wasm/*/*/*/state.* -rm "$root"/contracts/wasm/*/*/*/typedefs.* -rm "$root"/contracts/wasm/*/*/*/types.* -rm -r "$root"/contracts/wasm/target -rm -r "$root"/contracts/wasm/*/*/pkg -rm -r "$root"/contracts/wasm/node_modules +# remove go files +rm ./go/$example_name/consts.go +rm ./go/$example_name/contract.go +rm ./go/$example_name/keys.go +rm ./go/$example_name/lib.go +rm ./go/$example_name/params.go +rm ./go/$example_name/results.go +rm ./go/$example_name/state.go +rm ./go/$example_name/typedefs.go +rm ./go/$example_name/events.go +rm ./go/$example_name/eventhandlers.go +rm ./go/$example_name/structs.go +rm ./go/$example_name/types.go +rm ./go/main.go -for dir in "$root"/contracts/wasm/*; do - if [ -d "$dir" ]; then - rm "$dir"/go/main.go - rm "$dir"/ts/"$dir"/index.ts - rm "$dir"/ts/"$dir"/tsconfig.json - rm "$dir"/pkg/*.* - rm "$dir"/ts/pkg/*.* - fi -done +# remove ts files +rm ./ts/$example_name/consts.ts +rm ./ts/$example_name/contract.ts +rm ./ts/$example_name/keys.ts +rm ./ts/$example_name/lib.ts +rm ./ts/$example_name/params.ts +rm ./ts/$example_name/results.ts +rm ./ts/$example_name/state.ts +rm ./ts/$example_name/typedefs.ts +rm ./ts/$example_name/events.ts +rm ./ts/$example_name/eventhandlers.ts +rm ./ts/$example_name/structs.ts +rm ./ts/$example_name/types.ts +rm ./ts/$example_name/index.ts +rm ./ts/$example_name/tsconfig.json +rm ./pkg/*.* +rm ./ts/pkg/*.* -cd gascalibration -for dir in ./*; do - if [ -d "$dir" ]; then - rm "$dir"/go/main.go - rm "$dir"/ts/"$dir"/index.ts - rm "$dir"/ts/"$dir"/tsconfig.json - rm "$dir"/pkg/*.* - rm "$dir"/ts/pkg/*.* - fi -done -cd ../scripts +# remove rs files +rm ./src/consts.rs +rm ./src/contract.rs +rm ./src/keys.rs +rm ./src/lib.rs +rm ./src/params.rs +rm ./src/results.rs +rm ./src/state.rs +rm ./src/typedefs.rs +rm ./src/events.rs +rm ./src/eventhandlers.rs +rm ./src/structs.rs +rm ./src/types.rs diff --git a/contracts/wasm/scripts/cleanup_all.cmd b/contracts/wasm/scripts/cleanup_all.cmd new file mode 100644 index 0000000000..b7f16f5ab1 --- /dev/null +++ b/contracts/wasm/scripts/cleanup_all.cmd @@ -0,0 +1,6 @@ +@echo off +cd .. +for /d %%f in (*.) do call scripts\cleanup.cmd %%f +cd gascalibration +for /d %%f in (*.) do call ..\scripts\cleanup.cmd %%f +cd ..\scripts diff --git a/contracts/wasm/scripts/cleanup_all.sh b/contracts/wasm/scripts/cleanup_all.sh new file mode 100644 index 0000000000..5e37a7c9fa --- /dev/null +++ b/contracts/wasm/scripts/cleanup_all.sh @@ -0,0 +1,15 @@ +#!/bin/bash +contracts_path=$(git rev-parse --show-toplevel)/contracts/wasm +cd $contracts_path +for dir in ./*; do + if [ -d "$dir" ]; then + echo "$dir" + bash scripts/cleanup.sh "$dir" + fi +done +cd $contracts_path/gascalibration +for dir in ./*; do + if [ -d "$dir" ]; then + bash ../scripts/cleanup.sh "$dir" + fi +done diff --git a/contracts/wasm/scripts/core_build.sh b/contracts/wasm/scripts/core_build.sh index e3101ed38a..281682dbf6 100644 --- a/contracts/wasm/scripts/core_build.sh +++ b/contracts/wasm/scripts/core_build.sh @@ -1,8 +1,11 @@ #!/bin/bash -go install ../../../tools/schema -cd ../../../packages/wasmvm/wasmlib +root_path=$(git rev-parse --show-toplevel) +cd $root_path/contracts/wasm +npm install + +go install $root_path/tools/schema +cd $root_path/packages/wasmvm/wasmlib schema -core -go -rust -ts -force -cd ../../../contracts/wasm +cd $root_path/contracts/wasm rm -rf ./node_modules/wasmlib/ -cp -R ../../packages/wasmvm/wasmlib/ts/wasmlib ./node_modules -cd scripts +cp -R $root_path/packages/wasmvm/wasmlib/ts/wasmlib ./node_modules diff --git a/contracts/wasm/scripts/generate_wasm.sh b/contracts/wasm/scripts/generate_wasm.sh index d3658ecd1d..9840e5d1a2 100644 --- a/contracts/wasm/scripts/generate_wasm.sh +++ b/contracts/wasm/scripts/generate_wasm.sh @@ -1,8 +1,8 @@ #!/bin/bash -cd ./contracts/wasm/scripts -bash schema_all.sh -cd .. +root_path=$(git rev-parse --show-toplevel) +contracts_path=$root_path/contracts/wasm +cd $contracts_path +bash scripts/schema_all.sh golangci-lint run --fix -cd ../../packages/wasmvm +cd $root_path/packages/wasmvm golangci-lint run --fix -cd ../.. diff --git a/contracts/wasm/scripts/go_all.sh b/contracts/wasm/scripts/go_all.sh index d49d1d2862..cfe97884b0 100755 --- a/contracts/wasm/scripts/go_all.sh +++ b/contracts/wasm/scripts/go_all.sh @@ -1,14 +1,14 @@ #!/bin/bash -cd .. +contracts_path=$(git rev-parse --show-toplevel)/contracts/wasm +cd $contracts_path for dir in ./*; do - if [ -d "$dir" ]; then + if [ -d "$dir" ]; then bash scripts/go_build.sh "$dir" $1 fi done -cd gascalibration +cd $contracts_path/gascalibration for dir in ./*; do - if [ -d "$dir" ]; then + if [ -d "$dir" ]; then bash ../scripts/go_build.sh "$dir" $1 fi done -cd ../scripts diff --git a/contracts/wasm/scripts/go_build.sh b/contracts/wasm/scripts/go_build.sh index 3adac3c905..feb0828ea1 100644 --- a/contracts/wasm/scripts/go_build.sh +++ b/contracts/wasm/scripts/go_build.sh @@ -1,5 +1,5 @@ #!/bin/bash -example_name=$1 +example_name=$1 # path relative to wasp/contracts/wasm flag=$2 cd $example_name @@ -17,4 +17,3 @@ if [ ! -d "./go/pkg" ]; then mkdir ./go/pkg fi tinygo build -o ./go/pkg/"$example_name"_go.wasm -target wasm -gc=leaking -opt 2 -no-debug go/main.go -cd .. diff --git a/contracts/wasm/scripts/rust_all.sh b/contracts/wasm/scripts/rust_all.sh index 28b3f535ef..d5d3b4657e 100644 --- a/contracts/wasm/scripts/rust_all.sh +++ b/contracts/wasm/scripts/rust_all.sh @@ -1,14 +1,17 @@ #!/bin/bash -cd .. +contracts_path=$(git rev-parse --show-toplevel)/contracts/wasm +# build all the schema.yaml, since any missing members of rust would cause contract building fail +bash $contracts_path/scripts/schema_all.sh + +cd $contracts_path for dir in ./*; do - if [ -d "$dir" ]; then + if [ -d "$dir" ]; then bash scripts/rust_build.sh "$dir" $1 fi done -cd gascalibration +cd $contracts_path/gascalibration for dir in ./*; do - if [ -d "$dir" ]; then + if [ -d "$dir" ]; then bash ../scripts/rust_build.sh "$dir" $1 fi done -cd ../scripts diff --git a/contracts/wasm/scripts/rust_build.sh b/contracts/wasm/scripts/rust_build.sh index 1bbc63b029..adab33bd6e 100644 --- a/contracts/wasm/scripts/rust_build.sh +++ b/contracts/wasm/scripts/rust_build.sh @@ -1,11 +1,10 @@ #!/bin/bash -example_name=$1 +example_name=$1 # path relative to wasp/contracts/wasm flag=$2 cd $example_name if [ ! -f "schema.yaml" ]; then echo "schema.yaml not found" - cd .. exit 1 fi @@ -13,4 +12,3 @@ echo "Building $example_name" schema -rust $flag echo "Compiling "$example_name"_bg.wasm" wasm-pack build -cd .. diff --git a/contracts/wasm/scripts/schema_all.sh b/contracts/wasm/scripts/schema_all.sh index 480ef7980c..b572bffcd1 100644 --- a/contracts/wasm/scripts/schema_all.sh +++ b/contracts/wasm/scripts/schema_all.sh @@ -1,15 +1,16 @@ #!/bin/bash -cd .. -go install ../../tools/schema +root_path=$(git rev-parse --show-toplevel) +contracts_path=$root_path/contracts/wasm +go install $root_path/tools/schema +cd $contracts_path for dir in ./*; do if [ -d "$dir" ]; then bash scripts/schema_build.sh "$dir" $1 fi done -cd gascalibration +cd $contracts_path/gascalibration for dir in ./*; do if [ -d "$dir" ]; then bash ../scripts/schema_build.sh "$dir" $1 fi done -cd ../scripts diff --git a/contracts/wasm/scripts/schema_build.sh b/contracts/wasm/scripts/schema_build.sh index 5c02de305f..b7460b0d72 100644 --- a/contracts/wasm/scripts/schema_build.sh +++ b/contracts/wasm/scripts/schema_build.sh @@ -4,10 +4,8 @@ flag=$2 cd $example_name if [ ! -f "schema.yaml" ]; then - cd .. exit 1 fi echo "Generating $example_name" schema -go -rust -ts $flag -cd .. diff --git a/contracts/wasm/scripts/ts_all.sh b/contracts/wasm/scripts/ts_all.sh index 3441a83d2a..4d7358eb9e 100644 --- a/contracts/wasm/scripts/ts_all.sh +++ b/contracts/wasm/scripts/ts_all.sh @@ -1,16 +1,14 @@ #!/bin/bash -node_modules_path="../node_modules" -cd .. +contracts_path=$(git rev-parse --show-toplevel)/contracts/wasm +cd $contracts_path for dir in ./*; do - if [ -d "$dir" ]; then - bash scripts/ts_build.sh "$dir" "$node_modules_path" $1 + if [ -d "$dir" ]; then + bash scripts/ts_build.sh "$dir" $1 fi done -cd gascalibration -node_modules_path="../../node_modules" +cd $contracts_path/gascalibration for dir in ./*; do - if [ -d "$dir" ]; then - bash ../scripts/ts_build.sh "$dir" "$node_modules_path" $1 + if [ -d "$dir" ]; then + bash ../scripts/ts_build.sh "$dir" $1 fi done -cd ../scripts diff --git a/contracts/wasm/scripts/ts_build.sh b/contracts/wasm/scripts/ts_build.sh index 88feea823c..75c2fee608 100644 --- a/contracts/wasm/scripts/ts_build.sh +++ b/contracts/wasm/scripts/ts_build.sh @@ -2,12 +2,10 @@ example_name=$1 # path relative to wasp/contracts/wasm flag=$2 node_modules_path=$(git rev-parse --show-toplevel)/contracts/wasm/node_modules - cd $example_name if [ ! -f "schema.yaml" ]; then echo "schema.yaml not found" - cd .. exit 1 fi @@ -18,4 +16,3 @@ if [ ! -d "./ts/pkg" ]; then mkdir ./ts/pkg fi npx asc ts/"$example_name"/lib.ts --lib "$node_modules_path" -O --outFile ts/pkg/"$example_name"_ts.wasm -cd .. diff --git a/contracts/wasm/scripts/update_hardcoded.sh b/contracts/wasm/scripts/update_hardcoded.sh index 67d5b7b940..2edd6fc110 100644 --- a/contracts/wasm/scripts/update_hardcoded.sh +++ b/contracts/wasm/scripts/update_hardcoded.sh @@ -1,12 +1,13 @@ #!/bin/bash -if [ -f "../testcore/pkg/testcore_bg.wasm" ]; then - cp ../testcore/pkg/testcore_bg.wasm ../../../packages/vm/core/testcore/sbtests/sbtestsc/ +root_path=$(git rev-parse --show-toplevel) +contracts_path=$root_path/contracts/wasm +if [ -f "$contracts_path/testcore/pkg/testcore_bg.wasm" ]; then + cp $contracts_path/testcore/pkg/testcore_bg.wasm $root_path/packages/vm/core/testcore/sbtests/sbtestsc/ fi -if [ -f "../inccounter/pkg/inccounter_bg.wasm" ]; then - cp ../inccounter/pkg/inccounter_bg.wasm ../../../tools/cluster/tests/wasm/ +if [ -f "$contracts_path/inccounter/pkg/inccounter_bg.wasm" ]; then + cp $contracts_path/inccounter/pkg/inccounter_bg.wasm $root_path/tools/cluster/tests/wasm/ fi -cd ../../../documentation/tutorial-examples +cd $root_path/documentation/tutorial-examples wasm-pack build cp pkg/solotutorial_bg.wasm test/ -cd ../../contracts/wasm/scripts diff --git a/core/app/app.go b/core/app/app.go new file mode 100644 index 0000000000..e1a9fb39ff --- /dev/null +++ b/core/app/app.go @@ -0,0 +1,81 @@ +package app + +import ( + _ "net/http/pprof" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/hive.go/core/app/core/shutdown" + "github.com/iotaledger/hive.go/core/app/plugins/profiling" + "github.com/iotaledger/inx-app/inx" + + "github.com/iotaledger/wasp/core/chains" + "github.com/iotaledger/wasp/core/database" + "github.com/iotaledger/wasp/core/dkg" + "github.com/iotaledger/wasp/core/logger" + "github.com/iotaledger/wasp/core/nodeconn" + "github.com/iotaledger/wasp/core/peering" + "github.com/iotaledger/wasp/core/processors" + "github.com/iotaledger/wasp/core/registry" + "github.com/iotaledger/wasp/core/users" + "github.com/iotaledger/wasp/core/wasmtimevm" + "github.com/iotaledger/wasp/plugins/dashboard" + "github.com/iotaledger/wasp/plugins/metrics" + "github.com/iotaledger/wasp/plugins/publishernano" + "github.com/iotaledger/wasp/plugins/wal" + "github.com/iotaledger/wasp/plugins/webapi" +) + +var ( + // Name of the app. + Name = "WASP" + + // Version of the app. + Version = "0.3.0-alpha.1" +) + +func App() *app.App { + return app.New(Name, Version, + app.WithVersionCheck("iotaledger", "wasp"), + app.WithInitComponent(InitComponent), + app.WithCoreComponents([]*app.CoreComponent{ + inx.CoreComponent, + shutdown.CoreComponent, + nodeconn.CoreComponent, + users.CoreComponent, + logger.CoreComponent, + database.CoreComponent, + registry.CoreComponent, + peering.CoreComponent, + dkg.CoreComponent, + processors.CoreComponent, + wasmtimevm.CoreComponent, + chains.CoreComponent, + }...), + app.WithPlugins([]*app.Plugin{ + profiling.Plugin, + wal.Plugin, + metrics.Plugin, + webapi.Plugin, + publishernano.Plugin, + dashboard.Plugin, + }...), + ) +} + +var InitComponent *app.InitComponent + +func init() { + InitComponent = &app.InitComponent{ + Component: &app.Component{ + Name: "App", + }, + NonHiddenFlags: []string{ + "app.checkForUpdates", + "app.profile", + "config", + "help", + "peering", + "version", + }, + } +} diff --git a/core/chains/component.go b/core/chains/component.go new file mode 100644 index 0000000000..313664f801 --- /dev/null +++ b/core/chains/component.go @@ -0,0 +1,121 @@ +package chains + +import ( + "context" + "time" + + "github.com/labstack/gommon/log" + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/core/database" + "github.com/iotaledger/wasp/core/nodeconn" + "github.com/iotaledger/wasp/core/peering" + "github.com/iotaledger/wasp/core/processors" + "github.com/iotaledger/wasp/core/registry" + _ "github.com/iotaledger/wasp/packages/chain/chainimpl" + "github.com/iotaledger/wasp/packages/chains" + metricspkg "github.com/iotaledger/wasp/packages/metrics" + "github.com/iotaledger/wasp/packages/parameters" + "github.com/iotaledger/wasp/packages/util/ready" + "github.com/iotaledger/wasp/packages/wal" + "github.com/iotaledger/wasp/plugins/metrics" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Chains", + DepsFunc: func(cDeps dependencies) { deps = cDeps }, + Params: params, + InitConfigPars: initConfigPars, + Configure: configure, + Run: run, + }, + } +} + +var ( + CoreComponent *app.CoreComponent + deps dependencies + + initialized *ready.Ready + allChains *chains.Chains + allMetrics *metricspkg.Metrics +) + +type dependencies struct { + dig.In + + MetricsEnabled bool `name:"metricsEnabled"` + WAL *wal.WAL +} + +func initConfigPars(c *dig.Container) error { + type cfgResult struct { + dig.Out + APICacheTTL time.Duration `name:"apiCacheTTL"` + } + + if err := c.Provide(func() cfgResult { + return cfgResult{ + APICacheTTL: ParamsChains.APICacheTTL, + } + }); err != nil { + CoreComponent.LogPanic(err) + } + + return nil +} + +func configure() error { + initialized = ready.New(CoreComponent.Name) + return nil +} + +func run() error { + allChains = chains.New( + CoreComponent.Logger(), + processors.Config, + ParamsChains.BroadcastUpToNPeers, + ParamsChains.BroadcastInterval, + ParamsChains.PullMissingRequestsFromCommittee, + peering.DefaultNetworkProvider(), + database.GetOrCreateKVStore, + ParamsRawBlocks.Enabled, + ParamsRawBlocks.Directory, + ) + + err := CoreComponent.Daemon().BackgroundWorker(CoreComponent.Name, func(ctx context.Context) { + if deps.MetricsEnabled { + allMetrics = metrics.AllMetrics() + } + + allChains.SetNodeConn(nodeconn.NodeConnection()) + if err := allChains.ActivateAllFromRegistry(registry.DefaultRegistry, allMetrics, deps.WAL); err != nil { + log.Errorf("failed to read chain activation records from registry: %v", err) + return + } + + initialized.SetReady() + + <-ctx.Done() + + log.Info("dismissing chains...") + go func() { + allChains.Dismiss() + log.Info("dismissing chains... Done") + }() + }, parameters.PriorityChains) + if err != nil { + log.Error(err) + return err + } + + return nil +} + +func AllChains() *chains.Chains { + initialized.MustWait(5 * time.Second) + return allChains +} diff --git a/core/chains/params.go b/core/chains/params.go new file mode 100644 index 0000000000..f5d7614e6a --- /dev/null +++ b/core/chains/params.go @@ -0,0 +1,32 @@ +package chains + +import ( + "time" + + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersChains struct { + BroadcastUpToNPeers int `default:"2" usage:"number of peers an offledger request is broadcasted to"` + BroadcastInterval time.Duration `default:"5s" usage:"time between re-broadcast of offledger requests"` + APICacheTTL time.Duration `default:"300s" usage:"time to keep processed offledger requests in api cache"` + PullMissingRequestsFromCommittee bool `default:"true" usage:"whether or not to pull missing requests from other committee members"` +} + +type ParametersRawBlocks struct { + Enabled bool `default:"false" usage:"whether the raw blocks plugin is enabled"` + Directory string `default:"blocks" usage:"the raw blocks path"` +} + +var ( + ParamsChains = &ParametersChains{} + ParamsRawBlocks = &ParametersRawBlocks{} +) + +var params = &app.ComponentParams{ + Params: map[string]any{ + "chains": ParamsChains, + "rawBlocks": ParamsRawBlocks, + }, + Masked: nil, +} diff --git a/plugins/database/clean_test.go b/core/database/clean_test.go similarity index 96% rename from plugins/database/clean_test.go rename to core/database/clean_test.go index 0c3af37a27..ca9bd913e0 100644 --- a/plugins/database/clean_test.go +++ b/core/database/clean_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/wasp/packages/database/dbmanager" "github.com/stretchr/testify/assert" ) diff --git a/core/database/component.go b/core/database/component.go new file mode 100644 index 0000000000..46dfff2cba --- /dev/null +++ b/core/database/component.go @@ -0,0 +1,77 @@ +// Package database is a plugin that manages the badger database (e.g. garbage collection). +package database + +import ( + "context" + + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/wasp/packages/database/dbmanager" + "github.com/iotaledger/wasp/packages/isc" + "github.com/iotaledger/wasp/packages/parameters" + "github.com/iotaledger/wasp/packages/registry" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Database", + DepsFunc: func(cDeps dependencies) { deps = cDeps }, + Params: params, + Configure: configure, + Run: run, + }, + } +} + +var ( + CoreComponent *app.CoreComponent + deps dependencies + + dbm *dbmanager.DBManager +) + +type dependencies struct { + dig.In + RegistryConfig *registry.Config +} + +func configure() error { + dbm = dbmanager.NewDBManager(CoreComponent.App().NewLogger("dbmanager"), ParamsDatabase.InMemory, ParamsDatabase.Directory, deps.RegistryConfig) + + // we open the database in the configure, so we must also make sure it's closed here + err := CoreComponent.Daemon().BackgroundWorker(CoreComponent.Name, func(ctx context.Context) { + <-ctx.Done() + CoreComponent.LogInfof("syncing database to disk...") + dbm.Close() + CoreComponent.LogInfof("syncing database to disk... done") + }, parameters.PriorityDatabase) + if err != nil { + CoreComponent.LogPanicf("failed to start a daemon: %s", err) + } + + return err +} + +func run() error { + err := CoreComponent.Daemon().BackgroundWorker(CoreComponent.Name+"[GC]", dbm.RunGC, parameters.PriorityDBGarbageCollection) + if err != nil { + CoreComponent.LogErrorf("failed to start as daemon: %s", err) + } + + return err +} + +func GetRegistryKVStore() kvstore.KVStore { + return dbm.GetRegistryKVStore() +} + +func GetOrCreateKVStore(chainID *isc.ChainID) kvstore.KVStore { + return dbm.GetOrCreateKVStore(chainID) +} + +func GetKVStore(chainID *isc.ChainID) kvstore.KVStore { + return dbm.GetKVStore(chainID) +} diff --git a/plugins/database/mapdb_test.go b/core/database/mapdb_test.go similarity index 83% rename from plugins/database/mapdb_test.go rename to core/database/mapdb_test.go index 9b8b575082..3462ef1604 100644 --- a/plugins/database/mapdb_test.go +++ b/core/database/mapdb_test.go @@ -3,10 +3,11 @@ package database import ( "testing" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/kvstore/mapdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/kvstore/mapdb" ) func TestMapDB(t *testing.T) { diff --git a/core/database/params.go b/core/database/params.go new file mode 100644 index 0000000000..700ae91c77 --- /dev/null +++ b/core/database/params.go @@ -0,0 +1,19 @@ +package database + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersDatabase struct { + InMemory bool `default:"false" usage:"whether the database is only kept in memory and not persisted"` + Directory string `default:"waspdb" usage:"path to the database folder"` +} + +var ParamsDatabase = &ParametersDatabase{} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "database": ParamsDatabase, + }, + Masked: nil, +} diff --git a/plugins/database/versioning.go b/core/database/versioning.go similarity index 97% rename from plugins/database/versioning.go rename to core/database/versioning.go index b8a69900ec..64bcaad0b2 100644 --- a/plugins/database/versioning.go +++ b/core/database/versioning.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/wasp/packages/database/dbkeys" "github.com/iotaledger/wasp/packages/hashing" ) diff --git a/core/dkg/component.go b/core/dkg/component.go new file mode 100644 index 0000000000..2e8760d61b --- /dev/null +++ b/core/dkg/component.go @@ -0,0 +1,52 @@ +// Copyright 2020 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +package dkg + +import ( + "go.uber.org/zap" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/core/peering" + "github.com/iotaledger/wasp/core/registry" + dkg_pkg "github.com/iotaledger/wasp/packages/dkg" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "DKG", + Configure: configure, + }, + } +} + +var ( + CoreComponent *app.CoreComponent + defaultNode *dkg_pkg.Node +) + +func configure() error { + reg := registry.DefaultRegistry() + peeringProvider := peering.DefaultNetworkProvider() + var err error + defaultNode, err = dkg_pkg.NewNode( + reg.GetNodeIdentity(), + peeringProvider, + reg, + CoreComponent.Logger().Desugar().WithOptions(zap.IncreaseLevel(logger.LevelWarn)).Sugar(), + ) + if err != nil { + panic(xerrors.Errorf("failed to initialize the DKG node: %w", err)) + } + + return err +} + +// DefaultNode returns the default instance of the DKG Node Provider. +// It should be used to access all the DKG Node functions (not the DKG Initiator's). +func DefaultNode() *dkg_pkg.Node { + return defaultNode +} diff --git a/core/logger/component.go b/core/logger/component.go new file mode 100644 index 0000000000..728ebbdc3e --- /dev/null +++ b/core/logger/component.go @@ -0,0 +1,22 @@ +package logger + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Logger", + Configure: configure, + }, + } +} + +var CoreComponent *app.CoreComponent + +func configure() error { + initGoEthLogger(CoreComponent.App().NewLogger("go-ethereum")) + + return nil +} diff --git a/plugins/logger/evm.go b/core/logger/evm.go similarity index 91% rename from plugins/logger/evm.go rename to core/logger/evm.go index ae8a908827..0750cac0bf 100644 --- a/plugins/logger/evm.go +++ b/core/logger/evm.go @@ -2,7 +2,8 @@ package logger import ( "github.com/ethereum/go-ethereum/log" - "github.com/iotaledger/hive.go/logger" + + "github.com/iotaledger/hive.go/core/logger" ) func initGoEthLogger(waspLogger *logger.Logger) { diff --git a/core/nodeconn/component.go b/core/nodeconn/component.go new file mode 100644 index 0000000000..d7d607ce35 --- /dev/null +++ b/core/nodeconn/component.go @@ -0,0 +1,57 @@ +package nodeconn + +import ( + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/inx-app/nodebridge" + "github.com/iotaledger/wasp/packages/chain" + "github.com/iotaledger/wasp/packages/nodeconn" + "github.com/iotaledger/wasp/plugins/metrics" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "NodeConn", + DepsFunc: func(cDeps dependencies) { deps = cDeps }, + Configure: configure, + Run: run, + }, + } +} + +var ( + CoreComponent *app.CoreComponent + deps dependencies + + nc chain.NodeConnection +) + +type dependencies struct { + dig.In + NodeBridge *nodebridge.NodeBridge + MetricsEnabled bool `name:"metricsEnabled"` +} + +func configure() error { + nc = nodeconn.New( + CoreComponent.Daemon().ContextStopped(), + CoreComponent.Logger(), + deps.NodeBridge, + ) + + return nil +} + +func run() error { + if deps.MetricsEnabled { + nc.SetMetrics(metrics.AllMetrics().GetNodeConnectionMetrics()) + } + + return nil +} + +func NodeConnection() chain.NodeConnection { + return nc +} diff --git a/core/peering/component.go b/core/peering/component.go new file mode 100644 index 0000000000..52b6185ac4 --- /dev/null +++ b/core/peering/component.go @@ -0,0 +1,71 @@ +// Copyright 2020 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +package peering + +import ( + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/core/registry" + "github.com/iotaledger/wasp/packages/parameters" + peering_pkg "github.com/iotaledger/wasp/packages/peering" + peering_lpp "github.com/iotaledger/wasp/packages/peering/lpp" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Peering", + Params: params, + Configure: configure, + Run: run, + }, + } +} + +var ( + CoreComponent *app.CoreComponent + + defaultNetworkProvider peering_pkg.NetworkProvider + defaultTrustedNetworkManager peering_pkg.TrustedNetworkManager +) + +func configure() error { + netID := ParamsPeering.NetID + netImpl, tnmImpl, err := peering_lpp.NewNetworkProvider( + netID, + ParamsPeering.Port, + registry.DefaultRegistry().GetNodeIdentity(), + registry.DefaultRegistry(), + CoreComponent.Logger(), + ) + if err != nil { + CoreComponent.LogPanicf("Init.peering: %v", err) + } + defaultNetworkProvider = netImpl + defaultTrustedNetworkManager = tnmImpl + CoreComponent.LogInfof("------------- NetID is %s ------------------", netID) + + return nil +} + +func run() error { + err := CoreComponent.Daemon().BackgroundWorker( + "WaspPeering", + defaultNetworkProvider.Run, + parameters.PriorityPeering, + ) + if err != nil { + panic(err) + } + + return nil +} + +// DefaultNetworkProvider returns the default network provider implementation. +func DefaultNetworkProvider() peering_pkg.NetworkProvider { + return defaultNetworkProvider +} + +func DefaultTrustedNetworkManager() peering_pkg.TrustedNetworkManager { + return defaultTrustedNetworkManager +} diff --git a/core/peering/params.go b/core/peering/params.go new file mode 100644 index 0000000000..1507993332 --- /dev/null +++ b/core/peering/params.go @@ -0,0 +1,19 @@ +package peering + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersPeering struct { + NetID string `default:"127.0.0.1:4000" usage:"node host address as it is recognized by other peers"` + Port int `default:"4000" usage:"port for Wasp committee connection/peering"` +} + +var ParamsPeering = &ParametersPeering{} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "peering": ParamsPeering, + }, + Masked: nil, +} diff --git a/plugins/processors/plugin.go b/core/processors/component.go similarity index 60% rename from plugins/processors/plugin.go rename to core/processors/component.go index 09f94aa6f5..6a352678c8 100644 --- a/plugins/processors/plugin.go +++ b/core/processors/component.go @@ -1,41 +1,40 @@ package processors import ( - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" + "github.com/iotaledger/hive.go/core/app" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/vm/core/coreprocessors" "github.com/iotaledger/wasp/packages/vm/processors" ) -const pluginName = "Processors" +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Processors", + Configure: configure, + }, + } +} var ( - log *logger.Logger - Config *processors.Config + CoreComponent *app.CoreComponent + Config *processors.Config nativeContracts = []*coreutil.ContractProcessor{ inccounter.Processor, } ) -func Init() *node.Plugin { - return node.NewPlugin(pluginName, nil, node.Enabled, configure, run) -} - -func configure(ctx *node.Plugin) { - log = logger.NewLogger(pluginName) - - log.Info("Registering native contracts...") +func configure() error { + CoreComponent.LogInfo("Registering native contracts...") for _, c := range nativeContracts { - log.Debugf( + CoreComponent.LogDebugf( "Registering native contract: name: '%s', program hash: %s, description: '%s'\n", c.Contract.Name, c.Contract.ProgramHash.String(), c.Contract.Description, ) } Config = coreprocessors.Config().WithNativeContracts(nativeContracts...) -} -func run(_ *node.Plugin) { + return nil } diff --git a/core/registry/component.go b/core/registry/component.go new file mode 100644 index 0000000000..cfa3dc9872 --- /dev/null +++ b/core/registry/component.go @@ -0,0 +1,53 @@ +// Copyright 2020 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +package registry + +import ( + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/core/database" + "github.com/iotaledger/wasp/packages/registry" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Registry", + Params: params, + Provide: provide, + Configure: configure, + }, + } +} + +var ( + CoreComponent *app.CoreComponent + + defaultRegistry *registry.Impl +) + +func provide(c *dig.Container) error { + if err := c.Provide(func() *registry.Config { + return ®istry.Config{UseText: ParamsRegistry.UseText, Filename: ParamsRegistry.FileName} + }); err != nil { + CoreComponent.LogPanic(err) + } + + return nil +} + +func configure() error { + defaultRegistry = registry.NewRegistry( + CoreComponent.Logger(), + database.GetRegistryKVStore(), + ) + + return nil +} + +// DefaultRegistry returns an initialized default registry. +func DefaultRegistry() *registry.Impl { + return defaultRegistry +} diff --git a/core/registry/params.go b/core/registry/params.go new file mode 100644 index 0000000000..7675a1860e --- /dev/null +++ b/core/registry/params.go @@ -0,0 +1,19 @@ +package registry + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersRegistry struct { + UseText bool `default:"false" usage:"enable text key/value store for registry db."` + FileName string `default:"chain-registry.json" usage:"registry filename. Ignored if registry.useText is false."` +} + +var ParamsRegistry = &ParametersRegistry{} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "registry": ParamsRegistry, + }, + Masked: nil, +} diff --git a/core/users/component.go b/core/users/component.go new file mode 100644 index 0000000000..5891e51070 --- /dev/null +++ b/core/users/component.go @@ -0,0 +1,46 @@ +package users + +import ( + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/packages/users" +) + +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "Users", + Params: params, + Configure: configure, + }, + } +} + +var CoreComponent *app.CoreComponent + +func configure() error { + users.InitUsers(loadUsersFromConfiguration()) + + return nil +} + +func loadUsersFromConfiguration() map[string]*users.UserData { + userMap := make(map[string]*users.UserData) + for name, user := range ParamsUsers.Users { + userMap[name] = &users.UserData{ + Username: name, + Password: user.Password, + Permissions: user.Permissions, + } + } + + if len(userMap) == 0 { + // During the transition phase, create a default user when the config is empty. + // This keeps the old authentication working. + userMap["wasp"] = &users.UserData{ + Username: "wasp", + Password: "wasp", + Permissions: []string{"api", "dashboard"}, + } + } + return userMap +} diff --git a/core/users/params.go b/core/users/params.go new file mode 100644 index 0000000000..8ed33b0483 --- /dev/null +++ b/core/users/params.go @@ -0,0 +1,35 @@ +package users + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type User struct { + Password string `default:"" usage:"the password of the user"` + Permissions []string `default:"" usage:"the users permissions"` +} + +type ParametersUsers struct { + Users map[string]*User `noflag:"true" usage:"the list of accepted users"` +} + +var ParamsUsers = &ParametersUsers{ + Users: map[string]*User{ + "wasp": { + Password: "wasp", + Permissions: []string{ + "dashboard", + "api", + "chain.read", + "chain.write", + }, + }, + }, +} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "users": ParamsUsers, + }, + Masked: nil, +} diff --git a/plugins/wasmtimevm/plugin.go b/core/wasmtimevm/component.go similarity index 59% rename from plugins/wasmtimevm/plugin.go rename to core/wasmtimevm/component.go index 4bb905c9ca..944a02ac23 100644 --- a/plugins/wasmtimevm/plugin.go +++ b/core/wasmtimevm/component.go @@ -6,37 +6,35 @@ package wasmtimevm import ( - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/core/processors" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/vm/vmtypes" "github.com/iotaledger/wasp/packages/wasmvm/wasmhost" - "github.com/iotaledger/wasp/plugins/processors" ) -// pluginName is the name of the plugin. -const pluginName = "WasmTimeVM" - -var log *logger.Logger - -func Init() *node.Plugin { - return node.NewPlugin(pluginName, nil, node.Enabled, configure, run) +func init() { + CoreComponent = &app.CoreComponent{ + Component: &app.Component{ + Name: "WasmTimeVM", + Configure: configure, + }, + } } -func configure(_ *node.Plugin) { - log = logger.NewLogger(pluginName) +var CoreComponent *app.CoreComponent +func configure() error { // register VM type(s) err := processors.Config.RegisterVMType(vmtypes.WasmTime, func(binary []byte) (isc.VMProcessor, error) { // TODO (via config?) pass non-default timeout for WasmTime processor like this: // WasmTimeout = 3 * time.Second - return wasmhost.GetProcessor(binary, log) + return wasmhost.GetProcessor(binary, CoreComponent.Logger()) }) if err != nil { - log.Panicf("%v: %v", pluginName, err) + CoreComponent.LogPanic(err) } - log.Infof("registered VM type: '%s'", vmtypes.WasmTime) -} + CoreComponent.LogInfof("registered VM type: '%s'", vmtypes.WasmTime) -func run(_ *node.Plugin) { + return nil } diff --git a/docker_config.json b/docker_config.json index c8ce835995..c9dcafed0d 100644 --- a/docker_config.json +++ b/docker_config.json @@ -1,6 +1,7 @@ { - "l1": { - "inxAddress": "hornet:9029" + "inx": { + "address": "localhost:9029", + "maxConnectionAttempts": 30 }, "database": { "directory": "waspdb" diff --git a/documentation/docs/configuration.md b/documentation/docs/configuration.md new file mode 100755 index 0000000000..11395c7f5d --- /dev/null +++ b/documentation/docs/configuration.md @@ -0,0 +1,440 @@ + +--- +description: This section describes the configuration parameters and their types for WASP. +keywords: +- IOTA Node +- Hornet Node +- WASP Node +- Smart Contracts +- L2 +- Configuration +- JSON +- Customize +- Config +- reference +--- + + +# Core Configuration + +WASP uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the [official JSON specs](https://www.json.org). + +You can change the path of the config file by using the `-c` or `--config` argument while executing `wasp` executable. + +For example: +```bash +wasp -c config_defaults.json +``` + +You can always get the most up-to-date description of the config parameters by running: + +```bash +wasp -h --full +``` + +## 1. Application + +| Name | Description | Type | Default value | +| ------------------------- | ------------------------------------------------------ | ------- | ------------- | +| checkForUpdates | Whether to check for updates of the application or not | boolean | true | +| [shutdown](#app_shutdown) | Configuration for shutdown | object | | + +### Shutdown + +| Name | Description | Type | Default value | +| ------------------------ | ------------------------------------------------------------------------------------------------------ | ------ | ------------- | +| stopGracePeriod | The maximum time to wait for background processes to finish during shutdown before terminating the app | string | "5m" | +| [log](#app_shutdown_log) | Configuration for Shutdown Log | object | | + +### Shutdown Log + +| Name | Description | Type | Default value | +| -------- | --------------------------------------------------- | ------- | -------------- | +| enabled | Whether to store self-shutdown events to a log file | boolean | true | +| filePath | The file path to the self-shutdown log | string | "shutdown.log" | + +Example: + +```json + { + "app": { + "checkForUpdates": true, + "shutdown": { + "stopGracePeriod": "5m", + "log": { + "enabled": true, + "filePath": "shutdown.log" + } + } + } + } +``` + +## 2. Logger + +| Name | Description | Type | Default value | +| ----------------- | --------------------------------------------------------------------------- | ------- | ------------- | +| level | The minimum enabled logging level | string | "info" | +| disableCaller | Stops annotating logs with the calling function's file name and line number | boolean | true | +| disableStacktrace | Disables automatic stacktrace capturing | boolean | false | +| stacktraceLevel | The level stacktraces are captured and above | string | "panic" | +| encoding | The logger's encoding (options: "json", "console") | string | "console" | +| outputPaths | A list of URLs, file paths or stdout/stderr to write logging output to | array | stdout | +| disableEvents | Prevents log messages from being raced as events | boolean | true | + +Example: + +```json + { + "logger": { + "level": "info", + "disableCaller": true, + "disableStacktrace": false, + "stacktraceLevel": "panic", + "encoding": "console", + "outputPaths": [ + "stdout" + ], + "disableEvents": true + } + } +``` + +## 3. INX + +| Name | Description | Type | Default value | +| --------------------- | -------------------------------------------------------------------------------------------------- | ------ | ---------------- | +| address | The INX address to which to connect to | string | "localhost:9029" | +| maxConnectionAttempts | The amount of times the connection to INX will be attempted before it fails (1 attempt per second) | uint | 30 | + +Example: + +```json + { + "inx": { + "address": "localhost:9029", + "maxConnectionAttempts": 30 + } + } +``` + +## 4. Database + +| Name | Description | Type | Default value | +| --------- | ------------------------------------------------------------- | ------- | ------------- | +| inMemory | Whether the database is only kept in memory and not persisted | boolean | false | +| directory | Path to the database folder | string | "waspdb" | + +Example: + +```json + { + "database": { + "inMemory": false, + "directory": "waspdb" + } + } +``` + +## 5. Registry + +| Name | Description | Type | Default value | +| -------- | -------------------------------------------------------- | ------- | --------------------- | +| useText | Enable text key/value store for registry db. | boolean | false | +| fileName | Registry filename. Ignored if registry.useText is false. | string | "chain-registry.json" | + +Example: + +```json + { + "registry": { + "useText": false, + "fileName": "chain-registry.json" + } + } +``` + +## 6. Peering + +| Name | Description | Type | Default value | +| ----- | ---------------------------------------------------- | ------ | ---------------- | +| netID | Node host address as it is recognized by other peers | string | "127.0.0.1:4000" | +| port | Port for Wasp committee connection/peering | int | 4000 | + +Example: + +```json + { + "peering": { + "netID": "127.0.0.1:4000", + "port": 4000 + } + } +``` + +## 7. Chains + +| Name | Description | Type | Default value | +| -------------------------------- | -------------------------------------------------------------------- | ------- | ------------- | +| broadcastUpToNPeers | Number of peers an offledger request is broadcasted to | int | 2 | +| broadcastInterval | Time between re-broadcast of offledger requests | string | "5s" | +| apiCacheTTL | Time to keep processed offledger requests in api cache | string | "5m" | +| pullMissingRequestsFromCommittee | Whether or not to pull missing requests from other committee members | boolean | true | + +Example: + +```json + { + "chains": { + "broadcastUpToNPeers": 2, + "broadcastInterval": "5s", + "apiCacheTTL": "5m", + "pullMissingRequestsFromCommittee": true + } + } +``` + +## 8. Raw Blocks + +| Name | Description | Type | Default value | +| --------- | ---------------------------------------- | ------- | ------------- | +| enabled | Whether the raw blocks plugin is enabled | boolean | false | +| directory | The raw blocks path | string | "blocks" | + +Example: + +```json + { + "rawBlocks": { + "enabled": false, + "directory": "blocks" + } + } +``` + +## 9. Profiling + +| Name | Description | Type | Default value | +| ----------- | ------------------------------------------------- | ------- | ---------------- | +| enabled | Whether the profiling plugin is enabled | boolean | false | +| bindAddress | The bind address on which the profiler listens on | string | "localhost:6060" | + +Example: + +```json + { + "profiling": { + "enabled": false, + "bindAddress": "localhost:6060" + } + } +``` + +## 10. Write-Ahead Logging + +| Name | Description | Type | Default value | +| --------- | --------------------------------- | ------- | ------------- | +| enabled | Whether the WAL plugin is enabled | boolean | true | +| directory | Path to logs folder | string | "wal" | + +Example: + +```json + { + "wal": { + "enabled": true, + "directory": "wal" + } + } +``` + +## 11. Metrics + +| Name | Description | Type | Default value | +| ----------- | --------------------------------------- | ------- | ---------------- | +| enabled | Whether the metrics plugin is enabled | boolean | true | +| bindAddress | The bind address for the node dashboard | string | "127.0.0.1:2112" | + +Example: + +```json + { + "metrics": { + "enabled": true, + "bindAddress": "127.0.0.1:2112" + } + } +``` + +## 12. Web API + +| Name | Description | Type | Default value | +| -------------------- | ----------------------------------------------- | ------- | ---------------- | +| enabled | Whether the web api plugin is enabled | boolean | true | +| nodeOwnerAddresses | Defines a list of node owner addresses (bech32) | array | | +| bindAddress | The bind address for the node web api | string | "127.0.0.1:9090" | +| [auth](#webapi_auth) | Configuration for auth | object | | + +### Auth + +| Name | Description | Type | Default value | +| --------------------------- | -------------------------------------- | ------ | ------------- | +| scheme | Selects which authentication to choose | string | "jwt" | +| [jwt](#webapi_auth_jwt) | Configuration for JWT Auth | object | | +| [basic](#webapi_auth_basic) | Configuration for Basic Auth | object | | +| [ip](#webapi_auth_ip) | Configuration for IP-based Auth | object | | + +### JWT Auth + +| Name | Description | Type | Default value | +| -------- | ------------------ | ------ | ------------- | +| duration | Jwt token lifetime | string | "24h" | + +### Basic Auth + +| Name | Description | Type | Default value | +| -------- | ----------------------------------------------- | ------ | ------------- | +| username | The username which grants access to the service | string | "wasp" | + +### IP-based Auth + +| Name | Description | Type | Default value | +| --------- | ---------------------------------------------------- | ----- | ------------- | +| whitelist | A list of ips that are allowed to access the service | array | 127.0.0.1 | + +Example: + +```json + { + "webapi": { + "enabled": true, + "nodeOwnerAddresses": [], + "bindAddress": "127.0.0.1:9090", + "auth": { + "scheme": "jwt", + "jwt": { + "duration": "24h" + }, + "basic": { + "username": "wasp" + }, + "ip": { + "whitelist": [ + "127.0.0.1" + ] + } + } + } + } +``` + +## 13. nanomsg + +| Name | Description | Type | Default value | +| ------- | ---------------------------------------- | ------- | ------------- | +| enabled | Whether the publisher plugin is enabled | boolean | true | +| port | The port for the nanomsg event publisher | int | 5550 | + +Example: + +```json + { + "nanomsg": { + "enabled": true, + "port": 5550 + } + } +``` + +## 14. Dashboard + +| Name | Description | Type | Default value | +| ----------------------- | ------------------------------------------------ | ------- | ---------------- | +| enabled | Whether the dashboard plugin is enabled | boolean | true | +| bindAddress | The bind address for the node dashboard | string | "127.0.0.1:7000" | +| exploreAddressURL | URL to add as href to addresses in the dashboard | string | "" | +| [auth](#dashboard_auth) | Configuration for auth | object | | + +### Auth + +| Name | Description | Type | Default value | +| ------------------------------ | -------------------------------------- | ------ | ------------- | +| scheme | Selects which authentication to choose | string | "basic" | +| [jwt](#dashboard_auth_jwt) | Configuration for JWT Auth | object | | +| [basic](#dashboard_auth_basic) | Configuration for Basic Auth | object | | +| [ip](#dashboard_auth_ip) | Configuration for IP-based Auth | object | | + +### JWT Auth + +| Name | Description | Type | Default value | +| -------- | ------------------ | ------ | ------------- | +| duration | Jwt token lifetime | string | "24h" | + +### Basic Auth + +| Name | Description | Type | Default value | +| -------- | ----------------------------------------------- | ------ | ------------- | +| username | The username which grants access to the service | string | "wasp" | + +### IP-based Auth + +| Name | Description | Type | Default value | +| --------- | ---------------------------------------------------- | ----- | ------------- | +| whitelist | A list of ips that are allowed to access the service | array | 127.0.0.1 | + +Example: + +```json + { + "dashboard": { + "enabled": true, + "bindAddress": "127.0.0.1:7000", + "exploreAddressURL": "", + "auth": { + "scheme": "basic", + "jwt": { + "duration": "24h" + }, + "basic": { + "username": "wasp" + }, + "ip": { + "whitelist": [ + "127.0.0.1" + ] + } + } + } + } +``` + +## 15. Users + +| Name | Description | Type | Default value | +| ----- | -------------------------- | ------ | ----------------- | +| users | The list of accepted users | object | see example below | + +Example: + +```json + { + "users": { + "users": { + "wasp": { + "Password": "wasp", + "Permissions": [ + "dashboard", + "api", + "chain.read", + "chain.write" + ] + } + } + } + } +``` + diff --git a/documentation/docs/guide/chains_and_nodes/docker_standalone.md b/documentation/docs/guide/chains_and_nodes/docker_standalone.md index 7578a700fd..3eb2f235d7 100644 --- a/documentation/docs/guide/chains_and_nodes/docker_standalone.md +++ b/documentation/docs/guide/chains_and_nodes/docker_standalone.md @@ -62,8 +62,9 @@ Depending on the use case, you may need to change the default Hornet [configurat editing the [docker_config.json](https://github.com/iotaledger/wasp/blob/develop/docker_config.json) file: ```json -"l1": { - "inxAddress": "hornet:9029", +"inx": { + "address": "localhost:9029", + "maxConnectionAttempts": 30 }, ``` diff --git a/documentation/docs/guide/chains_and_nodes/testnet.md b/documentation/docs/guide/chains_and_nodes/testnet.md index 6d493a25a2..4140cff18d 100644 --- a/documentation/docs/guide/chains_and_nodes/testnet.md +++ b/documentation/docs/guide/chains_and_nodes/testnet.md @@ -12,14 +12,12 @@ keywords: The testnet is deployed for the community to use for testing and interacting with smart contracts. :::caution unscheduled network resets -To make the barrier to entry for trying out the testnet as low as possible, we decided to set all possible fees to zero. -Since we expect this decision will pollute the chain quickly, we’ll perform regular, unscheduled network resets if -needed. +While we are in active development we might update and reset this chain at any time without prior notice; Keep this in mind while testing. ::: ## Introduction -This testnet is deployed with our GoShimmer cluster that backs smart contracts. Multiple committee nodes do the work for +This testnet is deployed on the Shimmer Beta Network (testnet). Multiple committee nodes do the work for the chain and multiple access nodes are exposed via the endpoints listed below. We do throttle the endpoints to prevent overloading the testnet because we are looking for functionality testing more than stress testing. @@ -27,29 +25,21 @@ overloading the testnet because we are looking for functionality testing more th You can access the testnet via the following endpoints: -- https://wasp.sc.iota.org . **Username**: wasp **Password**: wasp +- https://sc.testnet.shimmer.network **Username**: wasp **Password**: wasp - The Wasp dashboard to explore the node configuration and view peering/chain configurations - - https://api.wasp.sc.iota.org + - https://api.sc.testnet.shimmer.network - The Wasp api to deploy and interact with smart contracts - - https://api.wasp.sc.iota.org/info + - https://api.sc.testnet.shimmer.network/info - Information about the Wasp access node - https://api.wasp.sc.iota.org/doc - API reference for the Wasp API - - https://evm.wasp.sc.iota.org + - https://api.sc.testnet.shimmer.network/chain/rms1pzmg4h3tj8n7mg46slgnsttf9pr4tsta73r5mvhq9gr02e6kj0dhkalc670/evm/jsonrpc - The URL to interact with the Ethereum Virtual Machine on our testnet - - https://explorer.wasp.sc.iota.org - - The URL to interact with the Ethereum Block Explorer on our testnet -- https://goshimmer.sc.iota.org - - The GoShimmer dashboard to explore the Tangle backing our smart contract testnet - - goshimmer.sc.iota.org:5000 - - The TXStream TCP port to use for the `nodeconn` address with Wasp nodes. - - https://api.goshimmer.sc.iota.org/ - - The GoShimmer api to interact with the Tangle directly - - https://api.goshimmer.sc.iota.org/info - - Information about GoShimmer via the API -- https://demo.sc.iota.org - - Our FairRoulette demo application to see a live smart contract in action -- https://wasp.sc.iota.org/metrics +- https://api.testnet.shimmer.network + - The public API exposed by Hornet for the Shimmer Beta network (testnet) +- https://faucet.testnet.shimmer.network + - The faucet for the Shimmer Beta network +- https://sc.testnet.shimmer.network/metrics - System metrics ## Configuring `wasp-cli` @@ -62,12 +52,16 @@ You will need to initialize `wasp-cli` to create a seed that will be used to gen wasp-cli init ``` -### Set the GoShimmer API URL +### Configure for the test chain -Next, you should tell `wasp-cli` how to reach our GoShimmer node. +Next, you should tell `wasp-cli` how to reach our test chain: ```shell -wasp-cli set goshimmer.api https://api.goshimmer.sc.iota.org +wasp-cli set l1.apiaddress https://api.testnet.shimmer.network +wasp-cli set l1.faucetaddress https://faucet.testnet.shimmer.network +wasp-cli set chains.testchain rms1pzmg4h3tj8n7mg46slgnsttf9pr4tsta73r5mvhq9gr02e6kj0dhkalc670 +wasp-cli set chain testchain + ``` ### Request Funds @@ -79,62 +73,16 @@ following command to request some funds. wasp-cli request-funds ``` -### Configure the Wasp API URL - -Next, you need to let `wasp-cli` know how to reach _Wasp_ by configuring the API address. - -```shell -wasp-cli set wasp.0.api https://api.wasp.sc.iota.org -``` - -### Set the Chain ID - -You will need to set the chain ID in `wasp-cli` to find the correct chain. You can find the ChainID by navigating to -the [chains](https://wasp.sc.iota.org/chains) page of the wasp dashboard. Click on the ChainID of the chain. You will be -able to copy the ChainID from the next page. It will be formatted like `jaSDxeZNtum7kLuRg8oWQ6nXKgYjb3XVq7yiwnvtUG3C`. - -Use the ChainID to tell `wasp-cli` which chain you want to interact with: - -```shell -wasp-cli set chains.testchain jaSDxeZNtum7kLuRg8oWQ6nXKgYjb3XVq7yiwnvtUG3C -wasp-cli set chain testchain -``` - -### Test Your Chain - -We have deployed a FairRoulette game on the __testchain__. You can use to ensure your configuration is correct. - -```shell -wasp-cli --verbose chain post-request fairroulete placeBet string number int 2 -``` - -### Putting It All Together - -For simplicity, here is the full set of commands to configure `wasp-cli`. - -```shell -wasp-cli init -wasp-cli set goshimmer.api https://api.goshimmer.sc.iota.org -wasp-cli request-funds -wasp-cli set wasp.0.api https://api.wasp.sc.iota.org -wasp-cli set chains.testchain jaSDxeZNtum7kLuRg8oWQ6nXKgYjb3XVq7yiwnvtUG3C -wasp-cli set chain testchain -``` - ## Interact with EVM We have deployed an experimental EVM chain that you can interact with. To begin, add a custom network to Metamask with the following configuration: -| Key | Value | -|--------------------|-----------------------------------| -| RPC URL | https://evm.wasp.sc.iota.org | -| Chain ID | 1074 | -| Block Explorer URL | https://explorer.wasp.sc.iota.org | - -It should look similar to this image. +| Key | Value | +|--------------------|---------------------------------------------------------------------------------------------------------------------------| +| RPC URL | https://api.sc.testnet.shimmer.network/chain/rms1pzmg4h3tj8n7mg46slgnsttf9pr4tsta73r5mvhq9gr02e6kj0dhkalc670/evm/jsonrpc | +| Chain ID | 1076 | -![MetaMask](/img/metamask_testnet.png) :::note @@ -142,5 +90,7 @@ The other values (network name and currency symbol) can be whatever value you li ::: +We have a faucet for you to use directly with your EVM address which can be found on https://deposit.sc.testnet.shimmer.network/ +We also have a withdrawal interface to get any native assets deposited to a EVM chain back into your L1 address: https://withdraw.sc.testnet.shimmer.network/ diff --git a/documentation/package.json b/documentation/package.json index ae46eb8bab..069ec93e5e 100644 --- a/documentation/package.json +++ b/documentation/package.json @@ -1,5 +1,5 @@ { - "name": "wasp", + "name": "wasp-develop", "version": "0.0.0", "scripts": { "start": "iota-wiki start", diff --git a/documentation/tutorial-examples/test/tutorial_test.go b/documentation/tutorial-examples/test/tutorial_test.go index 40159a50dd..7f31c0d1b4 100644 --- a/documentation/tutorial-examples/test/tutorial_test.go +++ b/documentation/tutorial-examples/test/tutorial_test.go @@ -3,6 +3,8 @@ package test import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/parameters" @@ -10,7 +12,6 @@ import ( "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" - "github.com/stretchr/testify/require" ) func TestTutorialFirst(t *testing.T) { diff --git a/documentation/yarn.lock b/documentation/yarn.lock index 8265760776..acbf01f985 100644 --- a/documentation/yarn.lock +++ b/documentation/yarn.lock @@ -10902,9 +10902,9 @@ plugin-image-zoom@flexanalytics/plugin-image-zoom: languageName: node linkType: hard -"wasp@workspace:.": +"wasp-develop@workspace:.": version: 0.0.0-use.local - resolution: "wasp@workspace:." + resolution: "wasp-develop@workspace:." dependencies: "@iota-community/iota-wiki-cli": "iota-community/iota-wiki-cli#v2" remark-code-import: ^0.3.0 diff --git a/go.mod b/go.mod index 0db6cec912..81423978ca 100644 --- a/go.mod +++ b/go.mod @@ -2,32 +2,36 @@ module github.com/iotaledger/wasp go 1.18 +replace ( + github.com/anthdm/hbbft => github.com/kape1395/hbbft v0.0.0-20220823095040-07b2628097ef + github.com/ethereum/go-ethereum => github.com/dessaya/go-ethereum v1.10.10-0.20220809124259-a32cc1199f6b + go.dedis.ch/kyber/v3 v3.0.14 => github.com/kape1395/kyber/v3 v3.0.14-0.20210622094514-fefb81148dc3 +) + require ( - github.com/PuerkitoBio/goquery v1.6.1 + github.com/PuerkitoBio/goquery v1.8.0 github.com/anthdm/hbbft v0.0.0-20190702061856-0826ffdcf567 - github.com/bygui86/multi-profile/v2 v2.1.0 github.com/bytecodealliance/wasmtime-go v0.40.0 github.com/ethereum/go-ethereum v1.10.23 github.com/golang-jwt/jwt v3.2.2+incompatible - github.com/iotaledger/hive.go v0.0.0-20220623193802-86a373581cc1 - github.com/iotaledger/hive.go/core v1.0.0-beta.5 + github.com/iotaledger/hive.go/core v1.0.0-beta.6 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-beta.3 - github.com/iotaledger/inx-app v1.0.0-beta.11 - github.com/iotaledger/inx/go v1.0.0-beta.7 + github.com/iotaledger/inx-app v1.0.0-beta.13 + github.com/iotaledger/inx/go v1.0.0-beta.8 github.com/iotaledger/iota.go/v3 v3.0.0-beta.9 - github.com/iotaledger/trie.go v0.0.0-20220831125128-ee0850058e60 - github.com/knadh/koanf v1.4.3 + github.com/iotaledger/trie.go v0.0.0-20220913055112-2b1eae4ebed9 github.com/labstack/echo/v4 v4.9.0 + github.com/labstack/gommon v0.3.1 github.com/libp2p/go-libp2p v0.22.0 github.com/mr-tron/base58 v1.2.0 - github.com/multiformats/go-multiaddr v0.6.0 + github.com/multiformats/go-multiaddr v0.7.0 github.com/pangpanglabs/echoswagger/v2 v2.4.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.13.0 github.com/second-state/WasmEdge-go v0.11.0 - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.7.0 + github.com/spf13/viper v1.13.0 github.com/stretchr/testify v1.8.0 github.com/wasmerio/wasmer-go v1.0.4 go.dedis.ch/kyber/v3 v3.0.14 @@ -36,9 +40,9 @@ require ( go.uber.org/dig v1.15.0 go.uber.org/zap v1.23.0 golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 - golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 + golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 - gonum.org/v1/plot v0.11.0 + gonum.org/v1/plot v0.12.0 gopkg.in/yaml.v3 v3.0.1 nhooyr.io/websocket v1.8.7 ) @@ -52,7 +56,7 @@ require ( github.com/NebulousLabs/merkletree v0.0.0-20181203152040-08d5d54b07f5 // indirect github.com/VictoriaMetrics/fastcache v1.10.0 // indirect github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b // indirect - github.com/andybalholm/cascadia v1.1.0 // indirect + github.com/andybalholm/cascadia v1.3.1 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect @@ -85,14 +89,16 @@ require ( github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/gohornet/grocksdb v1.7.1-0.20220426081058-60f50d7c59e8 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-github v17.0.0+incompatible // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect @@ -100,6 +106,7 @@ require ( github.com/huin/goupnp v1.0.3 // indirect github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/iotaledger/grocksdb v1.7.5-0.20220808142449-1dc0b8ac4d7d // indirect github.com/iotaledger/iota.go v1.0.0 // indirect github.com/ipfs/go-cid v0.3.2 // indirect github.com/ipfs/go-log/v2 v2.5.1 // indirect @@ -108,10 +115,10 @@ require ( github.com/klauspost/compress v1.15.9 // indirect github.com/klauspost/cpuid/v2 v2.1.1 // indirect github.com/klauspost/reedsolomon v1.10.0 // indirect + github.com/knadh/koanf v1.4.3 // indirect github.com/koron/go-ssdp v0.0.3 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect - github.com/labstack/gommon v0.3.1 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-cidranger v1.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect @@ -123,7 +130,7 @@ require ( github.com/libp2p/go-reuseport v0.2.0 // indirect github.com/libp2p/go-yamux/v3 v3.1.2 // indirect github.com/lucas-clemente/quic-go v0.28.1 // indirect - github.com/magiconair/properties v1.8.1 // indirect + github.com/magiconair/properties v1.8.6 // indirect github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect @@ -158,7 +165,7 @@ require ( github.com/panjf2000/ants/v2 v2.5.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml v1.7.0 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/petermattis/goid v0.0.0-20220824145935-af5520614cb6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -174,12 +181,13 @@ require ( github.com/sirupsen/logrus v1.9.0 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/afero v1.8.2 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/stretchr/objx v0.4.0 // indirect - github.com/subosito/gotenv v1.2.0 // indirect + github.com/subosito/gotenv v1.4.1 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.5.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect @@ -188,7 +196,7 @@ require ( go.dedis.ch/fixbuf v1.0.3 // indirect go.dedis.ch/protobuf v1.0.11 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect + golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 // indirect golang.org/x/sync v0.0.0-20220907140024-f12130a52804 // indirect @@ -199,16 +207,9 @@ require ( google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 // indirect google.golang.org/grpc v1.49.0 // indirect google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/ini.v1 v1.51.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect lukechampine.com/blake3 v1.1.7 // indirect ) - -replace ( - github.com/anthdm/hbbft => github.com/kape1395/hbbft v0.0.0-20220823095040-07b2628097ef - github.com/ethereum/go-ethereum => github.com/dessaya/go-ethereum v1.10.10-0.20220809124259-a32cc1199f6b - github.com/linxGnu/grocksdb => github.com/gohornet/grocksdb v1.6.38-0.20211012114404-55f425442260 - go.dedis.ch/kyber/v3 v3.0.14 => github.com/kape1395/kyber/v3 v3.0.14-0.20210622094514-fefb81148dc3 -) diff --git a/go.sum b/go.sum index f13c712aa0..7cb84d098f 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,7 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -17,6 +18,9 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -26,7 +30,6 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7 cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -36,6 +39,7 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -61,7 +65,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= @@ -80,8 +83,8 @@ github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e/go.mod h1:Bd github.com/NebulousLabs/merkletree v0.0.0-20181203152040-08d5d54b07f5 h1:pk9SclNGplPbF6YDIDKMhHh9SaUWcoxPkMr7zdu1hfk= github.com/NebulousLabs/merkletree v0.0.0-20181203152040-08d5d54b07f5/go.mod h1:Cn056wBLKay+uIS9LJn7ymwhgC5mqbOtG6iOhEvyy4M= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/goquery v1.6.1 h1:FgjbQZKl5HTmcn4sKBgvx8vv63nhyhIpv7lJpFGCWpk= -github.com/PuerkitoBio/goquery v1.6.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= +github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= @@ -102,8 +105,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= +github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= +github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= @@ -141,7 +144,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -157,8 +159,6 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bygui86/multi-profile/v2 v2.1.0 h1:x/jPqeL/6hJqLXoDI/H5zLPsSFbDR6IEbrBbFpkWQdw= -github.com/bygui86/multi-profile/v2 v2.1.0/go.mod h1:f4qCZiQo1nnJdwbPoADUtdDXg3hhnpfgZ9iq3/kW4BA= github.com/bytecodealliance/wasmtime-go v0.40.0 h1:7cGLQEctJf09JWBl3Ai0eMl1PTrXVAjkAb27+KHfIq0= github.com/bytecodealliance/wasmtime-go v0.40.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= @@ -177,6 +177,7 @@ github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v1.0.1-0.20211007161720-b558070c3be0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.1-0.20220214170620-9913f5bc19b7/go.mod h1:hi0MtSY3AYDQNDi83kDkMH5/yqM/CsIrsOITkSoH7KI= @@ -196,21 +197,18 @@ github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1 github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -259,6 +257,8 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= @@ -367,20 +367,16 @@ github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q8 github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/gohornet/grocksdb v1.7.1-0.20220426081058-60f50d7c59e8 h1:JBcaA1xdFtalpZsMTYZuwUSOZxPAqqYAZa1gKYpK9nw= -github.com/gohornet/grocksdb v1.7.1-0.20220426081058-60f50d7c59e8/go.mod h1:RlgTltBHJ3ha/p0pWAd1g2zjw/524L1Vw6pjBTYLdIA= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -434,8 +430,11 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= @@ -443,6 +442,7 @@ github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -450,6 +450,9 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -458,7 +461,7 @@ github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -468,19 +471,15 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= @@ -496,7 +495,6 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -506,7 +504,8 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= @@ -514,11 +513,8 @@ github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:i github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= @@ -541,6 +537,7 @@ github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:q github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -555,22 +552,22 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/iotaledger/hive.go v0.0.0-20220623193802-86a373581cc1 h1:gpoVDPnuj1UFlsMOpUbEw+BNlvR9kEb+Q0UwiNIgLdI= -github.com/iotaledger/hive.go v0.0.0-20220623193802-86a373581cc1/go.mod h1:qY0Eg2w/r+Ot0KrocMQHrtHzrcYKxDAEf33c6nSd8mI= -github.com/iotaledger/hive.go/core v1.0.0-beta.5 h1:lKEw/gMYWMUIAUt/s2+zaF2eAcWb0dod/pGe66tkG34= -github.com/iotaledger/hive.go/core v1.0.0-beta.5/go.mod h1:O0lzYAaP2vTv802PChD+Nop34dkosfmg9MYnHNO2fyY= +github.com/iotaledger/grocksdb v1.7.5-0.20220808142449-1dc0b8ac4d7d h1:KYc/EkMX3CXvsYyUC9EvToUeYc0c74ZwjRg/0Wd27LU= +github.com/iotaledger/grocksdb v1.7.5-0.20220808142449-1dc0b8ac4d7d/go.mod h1:DuNKJ1G/vKugT7WGAoftMTu2aApNNxF4ADFMxLmKS2Y= +github.com/iotaledger/hive.go/core v1.0.0-beta.6 h1:y9gP9q5eFib5RI8/kimtdrFVz2tDlRWJqthjtcsPOmo= +github.com/iotaledger/hive.go/core v1.0.0-beta.6/go.mod h1:O0lzYAaP2vTv802PChD+Nop34dkosfmg9MYnHNO2fyY= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-beta.3 h1:o7uLky3LQhNeMHZmNP7iaY67jdDUPRjKGL1GyvALQNM= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-beta.3/go.mod h1:OMyV/ZEKiCzfqxXAmt1IBxl4Xmr6ipZFg6bjnzomtGc= -github.com/iotaledger/inx-app v1.0.0-beta.11 h1:S3VjuvmqEC8AkLmFHMK/pLSITbgvTHdNP1KD+SyTWWc= -github.com/iotaledger/inx-app v1.0.0-beta.11/go.mod h1:o2Twmzo90eKebT3bWHWwLR3D3e8nepd+1fMkz5ze5DU= -github.com/iotaledger/inx/go v1.0.0-beta.7 h1:acOor0b/fHNeq2ifM/XZ7qyzTyFNW2YgCc1zocXlXlU= -github.com/iotaledger/inx/go v1.0.0-beta.7/go.mod h1:jK0MxS90aPIYz0KWnV2UrdMqrqmW8TzCT48pNteLALg= +github.com/iotaledger/inx-app v1.0.0-beta.13 h1:D36WPxMA3vpMvuEQ0ZPoLy1xX6stqgSr5h99nsfrM48= +github.com/iotaledger/inx-app v1.0.0-beta.13/go.mod h1:SX2Wztpb/4JEEpVmXmTJYe9nJF7XbHatxMfaSCLMnuo= +github.com/iotaledger/inx/go v1.0.0-beta.8 h1:+2XJynipziKbjPjS3i2hTp93HE8OXwVKzWGE3jYkYEM= +github.com/iotaledger/inx/go v1.0.0-beta.8/go.mod h1:jK0MxS90aPIYz0KWnV2UrdMqrqmW8TzCT48pNteLALg= github.com/iotaledger/iota.go v1.0.0 h1:tqm1FxJ/zOdzbrAaQ5BQpVF8dUy2eeGlSeWlNG8GoXY= github.com/iotaledger/iota.go v1.0.0/go.mod h1:RiKYwDyY7aCD1L0YRzHSjOsJ5mUR9yvQpvhZncNcGQI= github.com/iotaledger/iota.go/v3 v3.0.0-beta.9 h1:qUn2gO7OUjQYO8U8NmqpjaJEBOVo4Yr0+1V94riF2D8= github.com/iotaledger/iota.go/v3 v3.0.0-beta.9/go.mod h1:Y1roBqFLNqZMj4C2eBYpW9mkl6e6vsdm5PQJhehpcj8= -github.com/iotaledger/trie.go v0.0.0-20220831125128-ee0850058e60 h1:D/qnDSh7KY0QWCUqJFSKZ6KEZHPaE+hw22xghaFW19E= -github.com/iotaledger/trie.go v0.0.0-20220831125128-ee0850058e60/go.mod h1:51uMkJe4OWpB91nI8xJMyfLcCcwVN1TBhPuXsqBUh4o= +github.com/iotaledger/trie.go v0.0.0-20220913055112-2b1eae4ebed9 h1:Oi+8c+rzBgoT5QT7Lxk7WNoPktpCyi4sVjH8gNBEoFY= +github.com/iotaledger/trie.go v0.0.0-20220913055112-2b1eae4ebed9/go.mod h1:PiH9j3MVFwSwF/5Ttcwgz1PatJYggmmGb4H3UZGueJo= github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= @@ -594,7 +591,6 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -606,7 +602,6 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= @@ -631,7 +626,6 @@ github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2 github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -662,6 +656,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/koron/go-ssdp v0.0.3 h1:JivLMY45N76b4p/vsWGOKewBQu6uf39y8l+AQ7sDKx8= github.com/koron/go-ssdp v0.0.3/go.mod h1:b2MxI6yh02pKrsyNoQUsk4+YNikaGhe4894J+Q5lDvA= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -717,8 +712,8 @@ github.com/lucas-clemente/quic-go v0.28.1 h1:Uo0lvVxWg5la9gflIF9lwa39ONq85Xq2D91 github.com/lucas-clemente/quic-go v0.28.1/go.mod h1:oGz5DKK41cJt5+773+BSO9BXDsREY4HLf7+0odGAPO0= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -773,7 +768,6 @@ github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQ github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= @@ -793,13 +787,10 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -828,8 +819,8 @@ github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ8 github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.6.0 h1:qMnoOPj2s8xxPU5kZ57Cqdr0hHhARz7mFsPMIiYNqzg= -github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= +github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= +github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= @@ -904,8 +895,9 @@ github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChl github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -925,6 +917,7 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -932,7 +925,6 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= @@ -947,7 +939,6 @@ github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2 github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -957,7 +948,6 @@ github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8 github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= @@ -976,7 +966,6 @@ github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -987,6 +976,7 @@ github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -1035,11 +1025,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= @@ -1047,23 +1034,25 @@ github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= +github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1075,16 +1064,17 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e h1:IWllFTiDjjLIf2oeKxpIUmtiDV5sn71VgeQgg6vcE7k= +github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= @@ -1094,7 +1084,6 @@ github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZF github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tklauser/numcpus v0.5.0 h1:ooe7gN0fg6myJ0EKoTAf5hebTZrH52px3New/D9iJ+A= github.com/tklauser/numcpus v0.5.0/go.mod h1:OGzpTxpcIMNGYQdit2BYL1pvk/dSOaJWjKoflh+RQjo= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -1124,7 +1113,6 @@ github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= @@ -1146,7 +1134,6 @@ go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRL go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= @@ -1159,6 +1146,7 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1182,7 +1170,6 @@ go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1 golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1203,7 +1190,9 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1230,8 +1219,8 @@ golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+o golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867 h1:TcHcE0vrmgzNH1v3ppjcMGbhG5+9fMuvOmUYwNEF4q4= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY= +golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -1243,6 +1232,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1252,19 +1242,18 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1299,7 +1288,10 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1310,6 +1302,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1323,6 +1316,10 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= @@ -1344,7 +1341,6 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1401,11 +1397,15 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1413,6 +1413,7 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1438,8 +1439,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= -golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1459,7 +1460,6 @@ golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1484,7 +1484,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1512,8 +1511,14 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1531,12 +1536,12 @@ golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNq gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= +gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.11.0 h1:z2ZkgNqW34d0oYUzd80RRlc0L9kWtenqK4kflZG1lGc= -gonum.org/v1/plot v0.11.0/go.mod h1:fH9YnKnDKax0u5EzHVXvhN5HJwtMFWIOLNuhgUahbCQ= +gonum.org/v1/plot v0.12.0 h1:y1ZNmfz/xHuHvtgFe8USZVyykQo5ERXPnspQNVK15Og= +gonum.org/v1/plot v0.12.0/go.mod h1:PgiMf9+3A3PnZdJIciIXmyN1FwdAA6rXELSN761oQkw= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -1556,6 +1561,9 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1564,6 +1572,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1603,6 +1612,13 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 h1:bMz0aY2wd9TwUp9M7QfjBWuQqaFD/ZaTtvDpPDCo2Ow= @@ -1624,7 +1640,11 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= @@ -1656,20 +1676,18 @@ gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/R gopkg.in/h2non/gock.v1 v1.0.14/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/main.go b/main.go index a22ea4d8d0..298ccaa1ee 100644 --- a/main.go +++ b/main.go @@ -1,55 +1,9 @@ package main import ( - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/plugins/banner" - "github.com/iotaledger/wasp/plugins/chains" - "github.com/iotaledger/wasp/plugins/config" - "github.com/iotaledger/wasp/plugins/dashboard" - "github.com/iotaledger/wasp/plugins/database" - "github.com/iotaledger/wasp/plugins/dkg" - "github.com/iotaledger/wasp/plugins/gracefulshutdown" - "github.com/iotaledger/wasp/plugins/logger" - "github.com/iotaledger/wasp/plugins/metrics" - "github.com/iotaledger/wasp/plugins/nodeconn" - "github.com/iotaledger/wasp/plugins/peering" - "github.com/iotaledger/wasp/plugins/processors" - "github.com/iotaledger/wasp/plugins/profiling" - "github.com/iotaledger/wasp/plugins/publishernano" - "github.com/iotaledger/wasp/plugins/registry" - "github.com/iotaledger/wasp/plugins/users" - "github.com/iotaledger/wasp/plugins/wal" - "github.com/iotaledger/wasp/plugins/wasmtimevm" - "github.com/iotaledger/wasp/plugins/webapi" + "github.com/iotaledger/wasp/core/app" ) func main() { - params := parameters.Init() - - plugins := node.Plugins( - users.Init(params), - banner.Init(), - config.Init(params), - logger.Init(params), - gracefulshutdown.Init(), - nodeconn.Init(), - database.Init(), - registry.Init(), - peering.Init(), - dkg.Init(), - processors.Init(), - wasmtimevm.Init(), - wal.Init(), - chains.Init(), - metrics.Init(), - webapi.Init(), - publishernano.Init(), - dashboard.Init(), - profiling.Init(), - ) - - node.Run( - plugins, - ) + app.App().Run() } diff --git a/packages/apilib/deploychain.go b/packages/apilib/deploychain.go index 7af568cefc..974a8fed37 100644 --- a/packages/apilib/deploychain.go +++ b/packages/apilib/deploychain.go @@ -9,6 +9,8 @@ import ( "math/rand" "time" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client/multiclient" "github.com/iotaledger/wasp/packages/cryptolib" @@ -17,7 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/l1connection" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/transaction" - "golang.org/x/xerrors" ) // TODO DeployChain on peering domain, not on committee diff --git a/packages/apilib/rundkg.go b/packages/apilib/rundkg.go index 397e9e9319..d8ff820f1c 100644 --- a/packages/apilib/rundkg.go +++ b/packages/apilib/rundkg.go @@ -7,10 +7,11 @@ import ( "math" "time" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/packages/webapi/model" - "golang.org/x/xerrors" ) // RunDKG runs DKG procedure on specific Wasp hosts: generates new keys and puts corresponding committee records diff --git a/packages/authentication/basic_auth.go b/packages/authentication/basic_auth.go index e04c072474..445c68107e 100644 --- a/packages/authentication/basic_auth.go +++ b/packages/authentication/basic_auth.go @@ -3,9 +3,10 @@ package authentication import ( "crypto/subtle" - "github.com/iotaledger/wasp/packages/users" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" + + "github.com/iotaledger/wasp/packages/users" ) func AddBasicAuth(webAPI WebAPI, userMap map[string]*users.UserData) { diff --git a/packages/authentication/ip_whitelist.go b/packages/authentication/ip_whitelist.go index c7000213ef..e58944d44e 100644 --- a/packages/authentication/ip_whitelist.go +++ b/packages/authentication/ip_whitelist.go @@ -14,7 +14,7 @@ func AddIPWhiteListAuth(webAPI WebAPI, config IPWhiteListAuthConfiguration) { func createIPWhiteList(config IPWhiteListAuthConfiguration) []net.IP { r := make([]net.IP, 0) - for _, ip := range config.IPWhiteList { + for _, ip := range config.Whitelist { r = append(r, net.ParseIP(ip)) } return r diff --git a/packages/authentication/jwt_auth.go b/packages/authentication/jwt_auth.go index 20004dc4f6..96c1ce2d69 100644 --- a/packages/authentication/jwt_auth.go +++ b/packages/authentication/jwt_auth.go @@ -10,9 +10,10 @@ import ( "github.com/iotaledger/wasp/packages/authentication/shared" "github.com/golang-jwt/jwt" - "github.com/iotaledger/wasp/packages/users" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" + + "github.com/iotaledger/wasp/packages/users" ) // Errors @@ -22,18 +23,18 @@ var ( ) type JWTAuth struct { - durationHours time.Duration - nodeID string - secret []byte + duration time.Duration + nodeID string + secret []byte } type MiddlewareValidator = func(c echo.Context, authContext *AuthContext) bool -func NewJWTAuth(durationHours time.Duration, nodeID string, secret []byte) (*JWTAuth, error) { +func NewJWTAuth(duration time.Duration, nodeID string, secret []byte) (*JWTAuth, error) { return &JWTAuth{ - durationHours: durationHours, - nodeID: nodeID, - secret: secret, + duration: duration, + nodeID: nodeID, + secret: secret, }, nil } @@ -61,7 +62,7 @@ func (c *WaspClaims) VerifySubject(expected string) bool { return c.compare(c.Subject, expected) } -const defaultJwtDurationHours = 24 +const defaultJWTDuration = 24 * time.Hour func (j *JWTAuth) Middleware(skipper middleware.Skipper, allow MiddlewareValidator) echo.MiddlewareFunc { config := middleware.JWTConfig{ @@ -131,8 +132,8 @@ func (j *JWTAuth) IssueJWT(username string, authClaims *WaspClaims) (string, err NotBefore: now.Unix(), } - if j.durationHours > 0 { - stdClaims.ExpiresAt = now.Add(j.durationHours).Unix() + if j.duration > 0 { + stdClaims.ExpiresAt = now.Add(j.duration).Unix() } authClaims.StandardClaims = stdClaims @@ -173,8 +174,8 @@ func (j *JWTAuth) VerifyJWT(token string, allow ClaimValidator) bool { return true } -func initJWT(durationHours int, nodeID string, privateKey []byte, userMap map[string]*users.UserData, claimValidator ClaimValidator) (*JWTAuth, func(context echo.Context) bool, MiddlewareValidator, error) { - jwtAuth, err := NewJWTAuth(time.Duration(durationHours)*time.Hour, nodeID, privateKey) +func initJWT(duration time.Duration, nodeID string, privateKey []byte, userMap map[string]*users.UserData, claimValidator ClaimValidator) (*JWTAuth, func(context echo.Context) bool, MiddlewareValidator, error) { + jwtAuth, err := NewJWTAuth(duration, nodeID, privateKey) if err != nil { return nil, nil, nil, err } @@ -213,14 +214,14 @@ func initJWT(durationHours int, nodeID string, privateKey []byte, userMap map[st } func AddJWTAuth(webAPI WebAPI, config JWTAuthConfiguration, privateKey []byte, userMap map[string]*users.UserData, claimValidator ClaimValidator) *JWTAuth { - durationHours := config.DurationHours + duration := config.Duration - // If durationHours is 0, we set 24h as the default durationHours. - if durationHours <= 0 { - durationHours = defaultJwtDurationHours + // If durationHours is 0, we set 24h as the default duration + if duration == 0 { + duration = defaultJWTDuration } - jwtAuth, jwtSkipper, jwtAuthAllow, _ := initJWT(durationHours, "wasp0", privateKey, userMap, claimValidator) + jwtAuth, jwtSkipper, jwtAuthAllow, _ := initJWT(duration, "wasp0", privateKey, userMap, claimValidator) webAPI.Use(jwtAuth.Middleware(jwtSkipper, jwtAuthAllow)) diff --git a/packages/authentication/jwt_handler.go b/packages/authentication/jwt_handler.go index 408ba95681..984339b0b0 100644 --- a/packages/authentication/jwt_handler.go +++ b/packages/authentication/jwt_handler.go @@ -10,8 +10,9 @@ import ( "github.com/iotaledger/wasp/packages/authentication/shared" - "github.com/iotaledger/wasp/packages/users" "github.com/labstack/echo/v4" + + "github.com/iotaledger/wasp/packages/users" ) type AuthHandler struct { @@ -80,7 +81,7 @@ func (a *AuthHandler) handleFormAuthRequest(c echo.Context, token string, errorR Name: "jwt", Value: token, HttpOnly: true, // JWT Token will be stored in a http only cookie, this is important to mitigate XSS/XSRF attacks - Expires: time.Now().Add(a.Jwt.durationHours * time.Hour), + Expires: time.Now().Add(a.Jwt.duration), Path: "/", SameSite: http.SameSiteStrictMode, } diff --git a/packages/authentication/strategy.go b/packages/authentication/strategy.go index 990d251e25..6c1c1bac74 100644 --- a/packages/authentication/strategy.go +++ b/packages/authentication/strategy.go @@ -2,13 +2,14 @@ package authentication import ( "fmt" + "time" "github.com/iotaledger/wasp/packages/authentication/shared" - "github.com/iotaledger/wasp/packages/parameters" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/users" - "github.com/labstack/echo/v4" ) const ( @@ -18,25 +19,24 @@ const ( AuthNone = "none" ) -type AuthConfiguration struct { - Scheme string `koanf:"scheme"` - AddRoutes bool `koanf:"addRoutes"` - - JWTConfig JWTAuthConfiguration `koanf:"jwt"` - BasicAuthConfig BasicAuthConfiguration `koanf:"basic"` - IPWhitelistConfig IPWhiteListAuthConfiguration `koanf:"ip"` -} - type JWTAuthConfiguration struct { - DurationHours int `koanf:"durationHours"` + Duration time.Duration `default:"24h" usage:"jwt token lifetime"` } type BasicAuthConfiguration struct { - UserName string `koanf:"username"` + Username string `default:"wasp" usage:"the username which grants access to the service"` } type IPWhiteListAuthConfiguration struct { - IPWhiteList []string `koanf:"whitelist"` + Whitelist []string `default:"127.0.0.1" usage:"a list of ips that are allowed to access the service"` +} + +type AuthConfiguration struct { + Scheme string `default:"ip" usage:"selects which authentication to choose"` + + JWTConfig JWTAuthConfiguration `name:"jwt" usage:"defines the jwt configuration"` + BasicAuthConfig BasicAuthConfiguration `name:"basic" usage:"defines the basic auth configuration"` + IPWhitelistConfig IPWhiteListAuthConfiguration `name:"ip" usage:"defines the whitelist configuration"` } type WebAPI interface { @@ -62,18 +62,12 @@ func AddNoneAuth(webAPI WebAPI) { webAPI.Use(noneFunc) } -func AddAuthentication(webAPI WebAPI, registryProvider registry.Provider, configSectionPath string, claimValidator ClaimValidator) { - var config AuthConfiguration - - if err := parameters.GetStruct(configSectionPath, &config); err != nil { - return - } - +func AddAuthentication(webAPI WebAPI, registryProvider registry.Provider, authConfig AuthConfiguration, claimValidator ClaimValidator) { userMap := users.All() - addAuthContext(webAPI, config) + addAuthContext(webAPI, authConfig) - switch config.Scheme { + switch authConfig.Scheme { case AuthBasic: AddBasicAuth(webAPI, userMap) case AuthJWT: @@ -82,22 +76,22 @@ func AddAuthentication(webAPI WebAPI, registryProvider registry.Provider, config privateKey := nodeIdentity.GetPrivateKey().AsBytes() // The primary claim is the one mandatory claim that gives access to api/webapi/alike - jwtAuth := AddJWTAuth(webAPI, config.JWTConfig, privateKey, userMap, claimValidator) + jwtAuth := AddJWTAuth(webAPI, authConfig.JWTConfig, privateKey, userMap, claimValidator) authHandler := &AuthHandler{Jwt: jwtAuth, Users: userMap} webAPI.POST(shared.AuthRoute(), authHandler.CrossAPIAuthHandler) case AuthIPWhitelist: - AddIPWhiteListAuth(webAPI, config.IPWhitelistConfig) + AddIPWhiteListAuth(webAPI, authConfig.IPWhitelistConfig) case AuthNone: AddNoneAuth(webAPI) default: - panic(fmt.Sprintf("Unknown auth scheme %s", config.Scheme)) + panic(fmt.Sprintf("Unknown auth scheme %s", authConfig.Scheme)) } - addAuthenticationStatus(webAPI, config) + addAuthenticationStatus(webAPI, authConfig) } func addAuthContext(webAPI WebAPI, config AuthConfiguration) { diff --git a/packages/chain/chain.go b/packages/chain/chain.go index 85902ced80..5dedb6de1c 100644 --- a/packages/chain/chain.go +++ b/packages/chain/chain.go @@ -6,9 +6,9 @@ import ( "fmt" "time" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/trie.go/trie" @@ -117,7 +117,6 @@ type NodeConnection interface { SetMetrics(metrics nodeconnmetrics.NodeConnectionMetrics) GetMetrics() nodeconnmetrics.NodeConnectionMetrics - Close() } type ChainNodeConnection interface { diff --git a/packages/chain/chainimpl/chainimpl.go b/packages/chain/chainimpl/chainimpl.go index 8319ae2367..de7347b433 100644 --- a/packages/chain/chainimpl/chainimpl.go +++ b/packages/chain/chainimpl/chainimpl.go @@ -7,9 +7,11 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" + "go.uber.org/atomic" + + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/consensus/journal" dss_node_pkg "github.com/iotaledger/wasp/packages/chain/dss/node" @@ -32,7 +34,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/processors" "github.com/iotaledger/wasp/packages/vm/viewcontext" - "go.uber.org/atomic" ) const maxMsgBuffer = 1000 @@ -105,6 +106,8 @@ func NewChain( chainMetrics metrics.ChainMetrics, consensusJournalRegistry journal.Registry, wal chain.WAL, + rawBlocksEnabled bool, + rawBlocksDir string, ) chain.Chain { var err error log.Debugf("creating chain object for %s", chainID.String()) @@ -168,11 +171,11 @@ func NewChain( return nil } - ret.stateMgr = statemgr.New(db, ret, stateMgrDomain, ret.nodeConn, chainMetrics, wal) + ret.stateMgr = statemgr.New(db, ret, stateMgrDomain, ret.nodeConn, chainMetrics, wal, rawBlocksEnabled, rawBlocksDir, false) ret.stateMgr.SetChainPeers(chainPeerNodes) ret.eventChainTransitionClosure = events.NewClosure(ret.processChainTransition) - ret.eventChainTransition.Attach(ret.eventChainTransitionClosure) + ret.eventChainTransition.Hook(ret.eventChainTransitionClosure) ret.nodeConn.AttachToOnLedgerRequest(ret.receiveOnLedgerRequest) ret.nodeConn.AttachToAliasOutput(ret.EnqueueAliasOutput) ret.receiveChainPeerMessagesAttachID = ret.chainPeers.Attach(peering.PeerMessageReceiverChain, ret.receiveChainPeerMessages) diff --git a/packages/chain/chainimpl/chainimpl_test.go b/packages/chain/chainimpl/chainimpl_test.go index ec20e8f7e0..007d62155b 100644 --- a/packages/chain/chainimpl/chainimpl_test.go +++ b/packages/chain/chainimpl/chainimpl_test.go @@ -6,9 +6,10 @@ package chainimpl import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/testutil" - "github.com/stretchr/testify/require" ) // NOTE: this test tests verification of off ledger requests rather than chainimpl. diff --git a/packages/chain/chainimpl/core.go b/packages/chain/chainimpl/core.go index beb88ce5be..8499b951ab 100644 --- a/packages/chain/chainimpl/core.go +++ b/packages/chain/chainimpl/core.go @@ -6,7 +6,7 @@ package chainimpl import ( - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/chain/chainimpl/eventproc.go b/packages/chain/chainimpl/eventproc.go index eee41521df..b9d937deac 100644 --- a/packages/chain/chainimpl/eventproc.go +++ b/packages/chain/chainimpl/eventproc.go @@ -24,6 +24,7 @@ import ( "github.com/iotaledger/wasp/packages/tcrypto" ) +//nolint:gocyclo func (c *chainObj) recvLoop() { dismissChainMsgChannel := c.dismissChainMsgPipe.Out() aliasOutputChannel := c.aliasOutputPipe.Out() diff --git a/packages/chain/chainimpl/requests.go b/packages/chain/chainimpl/requests.go index 9cb8b172eb..21a1284109 100644 --- a/packages/chain/chainimpl/requests.go +++ b/packages/chain/chainimpl/requests.go @@ -5,7 +5,7 @@ package chainimpl import ( - "github.com/iotaledger/hive.go/events" + "github.com/iotaledger/hive.go/core/events" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" @@ -42,7 +42,7 @@ func (c *chainObj) ResolveError(e *isc.UnresolvedVMError) (*isc.VMError, error) func (c *chainObj) AttachToRequestProcessed(handler func(isc.RequestID)) *events.Closure { closure := events.NewClosure(handler) - c.eventRequestProcessed.Attach(closure) + c.eventRequestProcessed.Hook(closure) return closure } diff --git a/packages/chain/chainimpl/runner.go b/packages/chain/chainimpl/runner.go index c7dc931d2f..406f3afe35 100644 --- a/packages/chain/chainimpl/runner.go +++ b/packages/chain/chainimpl/runner.go @@ -3,7 +3,7 @@ package chainimpl import ( "time" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/wasp/packages/isc" ) diff --git a/packages/chain/chainutil/simulatecall.go b/packages/chain/chainutil/simulatecall.go index 9e3dad97fe..2665ece481 100644 --- a/packages/chain/chainutil/simulatecall.go +++ b/packages/chain/chainutil/simulatecall.go @@ -3,6 +3,9 @@ package chainutil import ( "time" + "go.uber.org/zap" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" @@ -10,8 +13,6 @@ import ( "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/runvm" - "go.uber.org/zap" - "golang.org/x/xerrors" ) // SimulateCall executes the given request and discards the resulting chain state. It is useful diff --git a/packages/chain/committee/committee.go b/packages/chain/committee/committee.go index 777ce76c1a..f5bbd9c2a6 100644 --- a/packages/chain/committee/committee.go +++ b/packages/chain/committee/committee.go @@ -6,7 +6,10 @@ package committee import ( "time" - "github.com/iotaledger/hive.go/logger" + "go.uber.org/atomic" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" @@ -16,8 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/util" - "go.uber.org/atomic" - "golang.org/x/xerrors" ) type committee struct { diff --git a/packages/chain/committee/committee_test.go b/packages/chain/committee/committee_test.go index 49d6634365..f80106c978 100644 --- a/packages/chain/committee/committee_test.go +++ b/packages/chain/committee/committee_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" ) func TestCommitteeBasic(t *testing.T) { diff --git a/packages/chain/consensus/action.go b/packages/chain/consensus/action.go index c0c7215bf3..715a118aab 100644 --- a/packages/chain/consensus/action.go +++ b/packages/chain/consensus/action.go @@ -10,7 +10,9 @@ import ( "sort" "time" - "github.com/iotaledger/hive.go/identity" + "go.uber.org/zap" + + "github.com/iotaledger/hive.go/core/identity" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/consensus/journal" @@ -28,7 +30,6 @@ import ( "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/core/governance" - "go.uber.org/zap" ) // takeAction triggers actions whenever relevant @@ -100,7 +101,7 @@ func (c *consensus) proposeBatchIfNeeded() { // runVMIfNeeded attempts to extract deterministic batch of requests from ACS. // If it succeeds (i.e. all requests are available) and the extracted batch is nonempty, it runs the request -func (c *consensus) runVMIfNeeded() { // nolint:funlen +func (c *consensus) runVMIfNeeded() { //nolint:funlen if !c.workflow.IsConsensusBatchKnown() { c.log.Debugf("runVM not needed: consensus batch is not known") return @@ -289,7 +290,7 @@ func (c *consensus) prepareVMTask(reqs []isc.Request) *vm.VMTask { // Then it deterministically calculates a priority sequence among contributing nodes for posting // the transaction to L1. The deadline por posting is set proportionally to the sequence number (deterministic) // If the node sees the transaction of the L1 before its deadline, it cancels its posting -func (c *consensus) checkQuorum() { //nolint:funlen +func (c *consensus) checkQuorum() { if c.workflow.IsTransactionFinalized() { c.log.Debugf("checkQuorum not needed: transaction already finalized") return @@ -476,7 +477,7 @@ func (c *consensus) prepareBatchProposal(reqs []isc.Request, dssNonceIndexPropos // receiveACS processed new ACS received from ACS consensus // -//nolint:funlen +//nolint:funlen,gocyclo func (c *consensus) receiveACS(values [][]byte, sessionID uint64, logIndex journal.LogIndex) { if c.acsSessionID != sessionID { c.log.Debugf("receiveACS: session id mismatch: expected %v, received %v", c.acsSessionID, sessionID) @@ -516,8 +517,8 @@ func (c *consensus) receiveACS(values [][]byte, sessionID uint64, logIndex journ // validate ACS. Dismiss ACS if inconsistent. Should not happen for _, prop := range acs { if !prop.StateOutputID.Equals(c.stateOutput.ID()) { - c.log.Warnf("receiveACS: ACS out of context or consensus failure: expected stateOuptudId: %v, generated stateOutputID: %v ", - isc.OID(c.stateOutput.ID()), isc.OID(prop.StateOutputID)) + c.log.Warnf("receiveACS: ACS out of context or consensus failure: expected stateOuptudId: %v, contributor %v stateOutputID: %v ", + isc.OID(c.stateOutput.ID()), prop.ValidatorIndex, isc.OID(prop.StateOutputID)) c.resetWorkflow() return } @@ -725,8 +726,6 @@ func (c *consensus) setNewState(msg *messages.StateTransitionMsg) bool { return false } c.stateTimestamp = msg.StateTimestamp - oid := c.stateOutput.OutputID() - c.acsSessionID = util.MustUint64From8Bytes(hashing.HashData(oid[:]).Bytes()[:8]) if msg.IsGovernance && !sameIndex { c.currentState = nil c.log.Debugf("SET NEW STATE #%d (rotate) and pausing consensus to wait for adequate state, output: %s", diff --git a/packages/chain/consensus/batch_proposal.go b/packages/chain/consensus/batch_proposal.go index 0232cac7fc..e4db6f4d3c 100644 --- a/packages/chain/consensus/batch_proposal.go +++ b/packages/chain/consensus/batch_proposal.go @@ -7,14 +7,15 @@ import ( "sort" "time" - "github.com/iotaledger/hive.go/identity" - "github.com/iotaledger/hive.go/marshalutil" + "go.dedis.ch/kyber/v3/sign/tbls" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/identity" + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/util" - "go.dedis.ch/kyber/v3/sign/tbls" - "golang.org/x/xerrors" ) type BatchProposal struct { diff --git a/packages/chain/consensus/commoncoin/commoncoin.go b/packages/chain/consensus/commoncoin/commoncoin.go index 7f4fc5f433..998188fe0d 100644 --- a/packages/chain/consensus/commoncoin/commoncoin.go +++ b/packages/chain/consensus/commoncoin/commoncoin.go @@ -14,11 +14,12 @@ import ( "io" "github.com/anthdm/hbbft" - "github.com/iotaledger/hive.go/crypto/bls" - "github.com/iotaledger/wasp/packages/tcrypto" - "github.com/iotaledger/wasp/packages/util" "go.dedis.ch/kyber/v3/sign/tbls" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/crypto/bls" + "github.com/iotaledger/wasp/packages/tcrypto" + "github.com/iotaledger/wasp/packages/util" ) // region blsCommonCoin //////////////////////////////////////////////////////// diff --git a/packages/chain/consensus/commoncoin/commoncoin_test.go b/packages/chain/consensus/commoncoin/commoncoin_test.go index d5e1c9405e..64c667305c 100644 --- a/packages/chain/consensus/commoncoin/commoncoin_test.go +++ b/packages/chain/consensus/commoncoin/commoncoin_test.go @@ -8,10 +8,11 @@ import ( "testing" "github.com/anthdm/hbbft" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/chain/consensus/commoncoin" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" ) func TestBLSCommonCoin(t *testing.T) { diff --git a/packages/chain/consensus/commonsubset/commonsubset.go b/packages/chain/consensus/commonsubset/commonsubset.go index 43ff465a13..bc455635ff 100644 --- a/packages/chain/consensus/commonsubset/commonsubset.go +++ b/packages/chain/consensus/commonsubset/commonsubset.go @@ -37,12 +37,13 @@ import ( "time" "github.com/anthdm/hbbft" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/chain/consensus/commoncoin" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) const ( diff --git a/packages/chain/consensus/commonsubset/commonsubset_test.go b/packages/chain/consensus/commonsubset/commonsubset_test.go index 799be135e4..1d32ce0d08 100644 --- a/packages/chain/consensus/commonsubset/commonsubset_test.go +++ b/packages/chain/consensus/commonsubset/commonsubset_test.go @@ -11,13 +11,14 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" ) func TestBasic(t *testing.T) { diff --git a/packages/chain/consensus/commonsubset/commonsubsetcoordinator.go b/packages/chain/consensus/commonsubset/commonsubsetcoordinator.go index fb4d459b25..324c5286fe 100644 --- a/packages/chain/consensus/commonsubset/commonsubsetcoordinator.go +++ b/packages/chain/consensus/commonsubset/commonsubsetcoordinator.go @@ -7,10 +7,11 @@ import ( "sort" "sync" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/tcrypto" - "golang.org/x/xerrors" ) const ( diff --git a/packages/chain/consensus/consensus.go b/packages/chain/consensus/consensus.go index 75125a9e06..0b0230138f 100644 --- a/packages/chain/consensus/consensus.go +++ b/packages/chain/consensus/consensus.go @@ -7,7 +7,9 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" + "go.uber.org/atomic" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/wasp/packages/chain" @@ -24,7 +26,6 @@ import ( "github.com/iotaledger/wasp/packages/util/pipe" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/runvm" - "go.uber.org/atomic" ) type consensus struct { @@ -48,7 +49,6 @@ type consensus struct { workflow *workflowStatus delayBatchProposalUntil time.Time delayRunVMUntil time.Time - delaySendingSignedResult time.Time resultTxEssence *iotago.TransactionEssence resultState state.VirtualStateAccess finalTx *iotago.Transaction @@ -186,6 +186,7 @@ func (c *consensus) Close() { c.eventTimerMsgPipe.Close() } +//nolint:gocyclo func (c *consensus) recvLoop() { eventStateTransitionMsgCh := c.eventStateTransitionMsgPipe.Out() eventDssIndexProposalMsgCh := c.eventDssIndexProposalMsgPipe.Out() diff --git a/packages/chain/consensus/consensus_test.go b/packages/chain/consensus/consensus_test.go index bc4e46dd90..352549a852 100644 --- a/packages/chain/consensus/consensus_test.go +++ b/packages/chain/consensus/consensus_test.go @@ -9,8 +9,9 @@ import ( "testing" "time" - "github.com/iotaledger/wasp/packages/chain/consensus" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/chain/consensus" ) const waitMempoolTimeout = 3 * time.Minute diff --git a/packages/chain/consensus/journal/journal.go b/packages/chain/consensus/journal/journal.go index 7277fa40ba..b7aba8bff0 100644 --- a/packages/chain/consensus/journal/journal.go +++ b/packages/chain/consensus/journal/journal.go @@ -8,13 +8,14 @@ import ( "errors" "sort" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) //////////////////////////////////////////////////////////////////////////////// @@ -102,7 +103,7 @@ type Registry interface { type consensusJournalImpl struct { id ID chainID isc.ChainID - committee iotago.Address + committee iotago.Address //nolint: unused // probably can be removed committeeN int committeeF int registry Registry diff --git a/packages/chain/consensus/journal/journal_test.go b/packages/chain/consensus/journal/journal_test.go index 3394e497db..3754f5425a 100644 --- a/packages/chain/consensus/journal/journal_test.go +++ b/packages/chain/consensus/journal/journal_test.go @@ -6,11 +6,12 @@ package journal_test import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/chain/consensus/journal" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/testutil/testchain" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestConsensusJournal(t *testing.T) { diff --git a/packages/chain/consensus/journal/localView_test.go b/packages/chain/consensus/journal/localView_test.go index 2c36a054f6..a360b93e46 100644 --- a/packages/chain/consensus/journal/localView_test.go +++ b/packages/chain/consensus/journal/localView_test.go @@ -6,10 +6,11 @@ package journal_test import ( "testing" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain/consensus/journal" "github.com/iotaledger/wasp/packages/isc" - "github.com/stretchr/testify/require" ) func TestLocalView(t *testing.T) { diff --git a/packages/chain/consensus/mocked_env_test.go b/packages/chain/consensus/mocked_env_test.go index 3a238fa9bc..b5824cd2ae 100644 --- a/packages/chain/consensus/mocked_env_test.go +++ b/packages/chain/consensus/mocked_env_test.go @@ -9,7 +9,10 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/cryptolib" @@ -22,8 +25,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil/testchain" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" ) type MockedEnv struct { diff --git a/packages/chain/consensus/mocked_node_test.go b/packages/chain/consensus/mocked_node_test.go index 5aa1751e5e..94b3f0d4b0 100644 --- a/packages/chain/consensus/mocked_node_test.go +++ b/packages/chain/consensus/mocked_node_test.go @@ -3,8 +3,10 @@ package consensus import ( "time" - "github.com/iotaledger/hive.go/kvstore/mapdb" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/chain" @@ -24,7 +26,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil/testchain" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/wal" - "github.com/stretchr/testify/require" ) type mockedNode struct { diff --git a/packages/chain/consensus/quorum_test.go b/packages/chain/consensus/quorum_test.go index c9c5538116..2d3749bdde 100644 --- a/packages/chain/consensus/quorum_test.go +++ b/packages/chain/consensus/quorum_test.go @@ -8,8 +8,9 @@ package consensus_test import ( "testing" - "github.com/iotaledger/wasp/packages/chain/consensus" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/chain/consensus" ) func TestMaxNodesFaulty(t *testing.T) { diff --git a/packages/chain/consensus/workflow_status.go b/packages/chain/consensus/workflow_status.go index 81ca64aadd..451eee15bc 100644 --- a/packages/chain/consensus/workflow_status.go +++ b/packages/chain/consensus/workflow_status.go @@ -148,7 +148,7 @@ func (wsT *workflowStatus) IsInProgress() bool { return wsT.flagInProgress } -func (wsT *workflowStatus) GetIndexProposalReceived() time.Time { +func (wsT *workflowStatus) GetIndexProposalReceivedTime() time.Time { return wsT.timeIndexProposalReceived } diff --git a/packages/chain/dss/dss.go b/packages/chain/dss/dss.go index 2e1bdf068e..4f584ebf3d 100644 --- a/packages/chain/dss/dss.go +++ b/packages/chain/dss/dss.go @@ -25,12 +25,13 @@ package dss import ( "fmt" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/gpa/adkg/nonce" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/sign/dss" "go.dedis.ch/kyber/v3/suites" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/gpa/adkg/nonce" ) type DSS interface { @@ -152,6 +153,7 @@ func (d *dssImpl) Output() gpa.Output { } } +//nolint:gocyclo func (d *dssImpl) tryHandleDkgOutput(msgs gpa.OutMessages) gpa.OutMessages { dkgOut := d.dkg.Output() if d.dkgOutIndexes == nil && dkgOut != nil && dkgOut.(*nonce.Output).Indexes != nil { diff --git a/packages/chain/dss/dss_test.go b/packages/chain/dss/dss_test.go index 8183fd8d77..1ee61dddac 100644 --- a/packages/chain/dss/dss_test.go +++ b/packages/chain/dss/dss_test.go @@ -7,15 +7,16 @@ import ( "bytes" "testing" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + "go.dedis.ch/kyber/v3" + "go.dedis.ch/kyber/v3/sign/eddsa" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/chain/dss" "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/gpa/adkg" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/sign/eddsa" ) func TestBasic(t *testing.T) { diff --git a/packages/chain/dss/msg.go b/packages/chain/dss/msg.go index 8fe559a8d0..016a0483a7 100644 --- a/packages/chain/dss/msg.go +++ b/packages/chain/dss/msg.go @@ -4,8 +4,9 @@ package dss import ( - "github.com/iotaledger/wasp/packages/gpa" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) const ( diff --git a/packages/chain/dss/msg_decided.go b/packages/chain/dss/msg_decided.go index cefe038237..f3cad33ef9 100644 --- a/packages/chain/dss/msg_decided.go +++ b/packages/chain/dss/msg_decided.go @@ -4,8 +4,9 @@ package dss import ( - "github.com/iotaledger/wasp/packages/gpa" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) type msgDecided struct { diff --git a/packages/chain/dss/msg_partial_sig.go b/packages/chain/dss/msg_partial_sig.go index c879e9bbd4..001aafc59b 100644 --- a/packages/chain/dss/msg_partial_sig.go +++ b/packages/chain/dss/msg_partial_sig.go @@ -6,12 +6,13 @@ package dss import ( "bytes" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/util" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/sign/dss" "go.dedis.ch/kyber/v3/suites" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/util" ) type msgPartialSig struct { diff --git a/packages/chain/dss/node/dss_node.go b/packages/chain/dss/node/dss_node.go index db8aea78d6..b2f3f9a2c4 100644 --- a/packages/chain/dss/node/dss_node.go +++ b/packages/chain/dss/node/dss_node.go @@ -22,13 +22,14 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" + "go.dedis.ch/kyber/v3/suites" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/tcrypto" - "go.dedis.ch/kyber/v3/suites" - "golang.org/x/xerrors" ) type DSSNode interface { diff --git a/packages/chain/dss/node/dss_node_test.go b/packages/chain/dss/node/dss_node_test.go index 643f845b24..1def2bc969 100644 --- a/packages/chain/dss/node/dss_node_test.go +++ b/packages/chain/dss/node/dss_node_test.go @@ -9,8 +9,17 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/crypto/bls" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.dedis.ch/kyber/v3" + "go.dedis.ch/kyber/v3/share" + "go.dedis.ch/kyber/v3/sign/dss" + "go.dedis.ch/kyber/v3/sign/eddsa" + "go.dedis.ch/kyber/v3/sign/tbls" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/crypto/bls" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" dss_node "github.com/iotaledger/wasp/packages/chain/dss/node" "github.com/iotaledger/wasp/packages/cryptolib" @@ -22,14 +31,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/share" - "go.dedis.ch/kyber/v3/sign/dss" - "go.dedis.ch/kyber/v3/sign/eddsa" - "go.dedis.ch/kyber/v3/sign/tbls" - "golang.org/x/xerrors" ) const ( // HT = High Threshold, LT = Low Threshold. diff --git a/packages/chain/dss/node/dss_series.go b/packages/chain/dss/node/dss_series.go index 01192c7bc5..b09d511738 100644 --- a/packages/chain/dss/node/dss_series.go +++ b/packages/chain/dss/node/dss_series.go @@ -6,14 +6,15 @@ package node import ( "time" + "go.dedis.ch/kyber/v3" + "go.dedis.ch/kyber/v3/sign/eddsa" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/chain/dss" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/tcrypto" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/sign/eddsa" - "golang.org/x/xerrors" ) const ( diff --git a/packages/chain/dss/trivial_dkg_test.go b/packages/chain/dss/trivial_dkg_test.go index 646d50954c..89fb0fa3a8 100644 --- a/packages/chain/dss/trivial_dkg_test.go +++ b/packages/chain/dss/trivial_dkg_test.go @@ -10,14 +10,15 @@ package dss_test import ( "testing" - "github.com/iotaledger/wasp/packages/chain/dss" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/gpa/adkg" - "github.com/iotaledger/wasp/packages/tcrypto" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" kyberDSS "go.dedis.ch/kyber/v3/sign/dss" "go.dedis.ch/kyber/v3/suites" + + "github.com/iotaledger/wasp/packages/chain/dss" + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/gpa/adkg" + "github.com/iotaledger/wasp/packages/tcrypto" ) // Just to debug DSS/DKG with a simple Shamir Secret Sharing. diff --git a/packages/chain/mempool/mempool.go b/packages/chain/mempool/mempool.go index 2857299448..603a51a9ed 100644 --- a/packages/chain/mempool/mempool.go +++ b/packages/chain/mempool/mempool.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/rotate" diff --git a/packages/chain/mempool/mempool_test.go b/packages/chain/mempool/mempool_test.go index d520327169..46f65477e5 100644 --- a/packages/chain/mempool/mempool_test.go +++ b/packages/chain/mempool/mempool_test.go @@ -4,7 +4,10 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -19,8 +22,6 @@ import ( "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/blocklog" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" ) var chainAddress = tpkg.RandEd25519Address() diff --git a/packages/chain/messages/peer_log_index_msg.go b/packages/chain/messages/peer_log_index_msg.go index a98438b495..f76302a8a9 100644 --- a/packages/chain/messages/peer_log_index_msg.go +++ b/packages/chain/messages/peer_log_index_msg.go @@ -7,9 +7,10 @@ import ( "bytes" "io" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/chain/consensus/journal" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) // Consensus -> Consensus diff --git a/packages/chain/messages/peer_missing_request_ids_msg.go b/packages/chain/messages/peer_missing_request_ids_msg.go index 7bfffbca75..8a4eb24f46 100644 --- a/packages/chain/messages/peer_missing_request_ids_msg.go +++ b/packages/chain/messages/peer_missing_request_ids_msg.go @@ -4,7 +4,7 @@ package messages import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" ) diff --git a/packages/chain/messages/peer_missing_request_msg.go b/packages/chain/messages/peer_missing_request_msg.go index 6bd9a6de47..c64195270d 100644 --- a/packages/chain/messages/peer_missing_request_msg.go +++ b/packages/chain/messages/peer_missing_request_msg.go @@ -4,7 +4,7 @@ package messages import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/isc" ) diff --git a/packages/chain/messages/peer_offledger_request_msg.go b/packages/chain/messages/peer_offledger_request_msg.go index f40b8f65f1..64573df4cd 100644 --- a/packages/chain/messages/peer_offledger_request_msg.go +++ b/packages/chain/messages/peer_offledger_request_msg.go @@ -4,10 +4,11 @@ package messages import ( - "github.com/iotaledger/hive.go/marshalutil" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" - "golang.org/x/xerrors" ) type OffLedgerRequestMsg struct { diff --git a/packages/chain/messages/peer_offledger_request_msg_test.go b/packages/chain/messages/peer_offledger_request_msg_test.go index 7bd8432a21..d5acbc9f19 100644 --- a/packages/chain/messages/peer_offledger_request_msg_test.go +++ b/packages/chain/messages/peer_offledger_request_msg_test.go @@ -8,10 +8,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/testutil/testkey" - "github.com/stretchr/testify/require" ) const foo = "foo" diff --git a/packages/chain/messages/peer_request_ack_msg.go b/packages/chain/messages/peer_request_ack_msg.go index 0b800c95f7..7d0ea4b30a 100644 --- a/packages/chain/messages/peer_request_ack_msg.go +++ b/packages/chain/messages/peer_request_ack_msg.go @@ -7,9 +7,10 @@ import ( "bytes" "io" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" - "golang.org/x/xerrors" ) type RequestAckMsg struct { diff --git a/packages/chain/nodeconnchain/nodeconn_chain.go b/packages/chain/nodeconnchain/nodeconn_chain.go index 9cd2ff7fca..8984cfb7d5 100644 --- a/packages/chain/nodeconnchain/nodeconn_chain.go +++ b/packages/chain/nodeconnchain/nodeconn_chain.go @@ -6,8 +6,8 @@ package nodeconnchain import ( "sync" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/chain/statemgr/domain_with_fallback.go b/packages/chain/statemgr/domain_with_fallback.go index 9cc44b956d..1262685781 100644 --- a/packages/chain/statemgr/domain_with_fallback.go +++ b/packages/chain/statemgr/domain_with_fallback.go @@ -7,10 +7,11 @@ import ( "context" "time" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" - "golang.org/x/xerrors" ) // DomainWithFallback acts as a peering domain, but maintains 2 sets of peers, diff --git a/packages/chain/statemgr/mocked_env_test.go b/packages/chain/statemgr/mocked_env_test.go index c5d66bb046..dfdb5fdde0 100644 --- a/packages/chain/statemgr/mocked_env_test.go +++ b/packages/chain/statemgr/mocked_env_test.go @@ -7,7 +7,9 @@ import ( "sync" "testing" - "github.com/iotaledger/hive.go/logger" + "go.uber.org/zap/zapcore" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -16,7 +18,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil/testchain" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "go.uber.org/zap/zapcore" ) type MockedEnv struct { diff --git a/packages/chain/statemgr/mocked_node_test.go b/packages/chain/statemgr/mocked_node_test.go index 072250004a..662260e182 100644 --- a/packages/chain/statemgr/mocked_node_test.go +++ b/packages/chain/statemgr/mocked_node_test.go @@ -6,8 +6,11 @@ package statemgr import ( "time" - "github.com/iotaledger/hive.go/kvstore/mapdb" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/messages" @@ -19,8 +22,6 @@ import ( "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/testutil/testchain" "github.com/iotaledger/wasp/packages/wal" - "github.com/stretchr/testify/require" - "golang.org/x/xerrors" ) type MockedNode struct { @@ -65,7 +66,7 @@ func NewMockedNode(env *MockedEnv, nodeIndex int, timers StateManagerTimers) *Mo }) ret.ChainNodeConn, err = nodeconnchain.NewChainNodeConnection(env.ChainID, ret.NodeConn, log) require.NoError(env.T, err) - ret.StateManager = New(store, ret.ChainCore, stateMgrDomain, ret.ChainNodeConn, stateMgrMetrics, wal.NewDefault(), timers) + ret.StateManager = New(store, ret.ChainCore, stateMgrDomain, ret.ChainNodeConn, stateMgrMetrics, wal.NewDefault(), false, "", true, timers) ret.Log.Debugf("Mocked node %v created: id %v public key %v", nodeIndex, nodeID, ret.PubKey.String()) return ret } diff --git a/packages/chain/statemgr/raw_blocks.go b/packages/chain/statemgr/raw_blocks.go index 57405b7a04..286ce266ae 100644 --- a/packages/chain/statemgr/raw_blocks.go +++ b/packages/chain/statemgr/raw_blocks.go @@ -4,16 +4,16 @@ import ( "os" "path" - "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/state" ) func (sm *stateManager) setRawBlocksOptions() { // parameters are not loaded in the context of unit tests - if !parameters.IsLoaded() || !parameters.GetBool(parameters.RawBlocksEnabled) { + if sm.unitTests || !sm.rawBlocksEnabled { return } - dir := path.Join(parameters.GetString(parameters.RawBlocksDir), sm.chain.ID().String()) + + dir := path.Join(sm.rawBlocksDir, sm.chain.ID().String()) if err := os.MkdirAll(dir, 0o777); err != nil { sm.log.Errorf("create dir: %v", err) sm.log.Warnf("raw blocks won't be stored") diff --git a/packages/chain/statemgr/statemgr.go b/packages/chain/statemgr/statemgr.go index b791b6fcab..d457cd3071 100644 --- a/packages/chain/statemgr/statemgr.go +++ b/packages/chain/statemgr/statemgr.go @@ -9,8 +9,10 @@ import ( "fmt" "time" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" + "go.uber.org/atomic" + + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/messages" @@ -21,7 +23,6 @@ import ( "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/util/pipe" "github.com/iotaledger/wasp/packages/util/ready" - "go.uber.org/atomic" ) type stateManager struct { @@ -40,6 +41,11 @@ type stateManager struct { receivePeerMessagesAttachID interface{} timers StateManagerTimers log *logger.Logger + stateManagerMetrics metrics.StateManagerMetrics + wal chain.WAL + rawBlocksEnabled bool + rawBlocksDir string + unitTests bool // Channels for accepting external events. eventGetBlockMsgPipe pipe.Pipe @@ -47,8 +53,6 @@ type stateManager struct { eventAliasOutputPipe pipe.Pipe eventStateCandidateMsgPipe pipe.Pipe eventTimerMsgPipe pipe.Pipe - stateManagerMetrics metrics.StateManagerMetrics - wal chain.WAL } var _ chain.StateManager = &stateManager{} @@ -69,6 +73,9 @@ func New( nodeconn chain.ChainNodeConnection, stateManagerMetrics metrics.StateManagerMetrics, wal chain.WAL, + rawBlocksEnabled bool, + rawBlocksDir string, + unitTests bool, timersOpt ...StateManagerTimers, ) chain.StateManager { var timers StateManagerTimers @@ -95,6 +102,9 @@ func New( eventTimerMsgPipe: pipe.NewLimitInfinitePipe(1), stateManagerMetrics: stateManagerMetrics, wal: wal, + rawBlocksEnabled: rawBlocksEnabled, + rawBlocksDir: rawBlocksDir, + unitTests: unitTests, } ret.receivePeerMessagesAttachID = ret.domain.Attach(peering.PeerMessageReceiverStateManager, ret.receiveChainPeerMessages) go ret.initLoadState() @@ -192,6 +202,7 @@ func (sm *stateManager) GetStatusSnapshot() *chain.SyncInfo { return v.(*chain.SyncInfo) } +//nolint:gocyclo func (sm *stateManager) recvLoop() { sm.ready.SetReady() eventGetBlockMsgCh := sm.eventGetBlockMsgPipe.Out() diff --git a/packages/chain/statemgr/statemgr_test.go b/packages/chain/statemgr/statemgr_test.go index facc223db3..36a6775a56 100644 --- a/packages/chain/statemgr/statemgr_test.go +++ b/packages/chain/statemgr/statemgr_test.go @@ -9,11 +9,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/state" - "github.com/stretchr/testify/require" ) // --------------------------------------------- diff --git a/packages/chain/statemgr/syncing_block.go b/packages/chain/statemgr/syncing_block.go index 6633470510..e129de00ac 100644 --- a/packages/chain/statemgr/syncing_block.go +++ b/packages/chain/statemgr/syncing_block.go @@ -6,7 +6,7 @@ package statemgr import ( "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/state" diff --git a/packages/chain/statemgr/syncing_blocks.go b/packages/chain/statemgr/syncing_blocks.go index 7f99f04749..e617430433 100644 --- a/packages/chain/statemgr/syncing_blocks.go +++ b/packages/chain/statemgr/syncing_blocks.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/chain/util.go b/packages/chain/util.go index 421cc3b8df..0578f896cb 100644 --- a/packages/chain/util.go +++ b/packages/chain/util.go @@ -3,7 +3,7 @@ package chain import ( "strconv" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/chains/chains.go b/packages/chains/chains.go index 8df7afe511..ebab51b6d9 100644 --- a/packages/chains/chains.go +++ b/packages/chains/chains.go @@ -7,7 +7,9 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/chainimpl" "github.com/iotaledger/wasp/packages/database/dbmanager" @@ -18,7 +20,6 @@ import ( "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/vm/processors" "github.com/iotaledger/wasp/packages/wal" - "golang.org/x/xerrors" ) type Provider func() *Chains @@ -42,6 +43,8 @@ type Chains struct { pullMissingRequestsFromCommittee bool networkProvider peering.NetworkProvider getOrCreateKVStore dbmanager.ChainKVStoreProvider + rawBlocksEnabled bool + rawBlocksDir string } func New( @@ -52,6 +55,8 @@ func New( pullMissingRequestsFromCommittee bool, networkProvider peering.NetworkProvider, getOrCreateKVStore dbmanager.ChainKVStoreProvider, + rawBlocksEnabled bool, + rawBlocksDir string, ) *Chains { ret := &Chains{ log: log, @@ -62,6 +67,8 @@ func New( pullMissingRequestsFromCommittee: pullMissingRequestsFromCommittee, networkProvider: networkProvider, getOrCreateKVStore: getOrCreateKVStore, + rawBlocksEnabled: rawBlocksEnabled, + rawBlocksDir: rawBlocksDir, } return ret } @@ -145,6 +152,8 @@ func (c *Chains) Activate(chr *registry.ChainRecord, registryProvider registry.P chainMetrics, defaultRegistry, chainWAL, + c.rawBlocksEnabled, + c.rawBlocksDir, ) if newChain == nil { return xerrors.New("Chains.Activate: failed to create chain object") diff --git a/packages/chains/chains_test.go b/packages/chains/chains_test.go index 52323e793a..5ad0145197 100644 --- a/packages/chains/chains_test.go +++ b/packages/chains/chains_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/vm/core/coreprocessors" @@ -20,5 +20,5 @@ func TestBasic(t *testing.T) { return mapdb.NewMapDB() } - _ = New(logger, coreprocessors.Config(), 10, time.Second, false, nil, getOrCreateKVStore) + _ = New(logger, coreprocessors.Config(), 10, time.Second, false, nil, getOrCreateKVStore, false, "") } diff --git a/packages/cryptolib/byteutils/byteutils.go b/packages/cryptolib/byteutils/byteutils.go index a831afe67a..47723fffcb 100644 --- a/packages/cryptolib/byteutils/byteutils.go +++ b/packages/cryptolib/byteutils/byteutils.go @@ -5,7 +5,7 @@ import ( "strings" ) -func ReadAvailableBytesToBuffer(target []byte, targetOffset int, source []byte, sourceOffset int, sourceLength int) int { // nolint:gocritic +func ReadAvailableBytesToBuffer(target []byte, targetOffset int, source []byte, sourceOffset int, sourceLength int) int { //nolint:gocritic availableBytes := sourceLength - sourceOffset requiredBytes := len(target) - targetOffset diff --git a/packages/cryptolib/public_key.go b/packages/cryptolib/public_key.go index 856323aed9..9a6bc2d3c8 100644 --- a/packages/cryptolib/public_key.go +++ b/packages/cryptolib/public_key.go @@ -4,9 +4,10 @@ import ( "crypto/ed25519" "encoding/hex" - iotago "github.com/iotaledger/iota.go/v3" "github.com/mr-tron/base58" "golang.org/x/xerrors" + + iotago "github.com/iotaledger/iota.go/v3" ) type PublicKey struct { diff --git a/packages/cryptolib/seed.go b/packages/cryptolib/seed.go index 680092a408..e67e19e87c 100644 --- a/packages/cryptolib/seed.go +++ b/packages/cryptolib/seed.go @@ -4,9 +4,10 @@ import ( "crypto/ed25519" "encoding/binary" - hivecrypto "github.com/iotaledger/hive.go/crypto/ed25519" - "github.com/iotaledger/wasp/packages/cryptolib/byteutils" "golang.org/x/crypto/blake2b" + + hivecrypto "github.com/iotaledger/hive.go/core/crypto/ed25519" + "github.com/iotaledger/wasp/packages/cryptolib/byteutils" ) const ( diff --git a/packages/dashboard/base.go b/packages/dashboard/base.go index f806b9d5fb..23928222cf 100644 --- a/packages/dashboard/base.go +++ b/packages/dashboard/base.go @@ -12,15 +12,16 @@ import ( "github.com/iotaledger/wasp/packages/authentication" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/iotaledger/hive.go/logger" + "github.com/labstack/echo/v4" + "github.com/mr-tron/base58" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/wasp" - "github.com/labstack/echo/v4" - "github.com/mr-tron/base58" ) //go:embed templates/base.tmpl diff --git a/packages/dashboard/chain.go b/packages/dashboard/chain.go index 3880bd00a7..eade182344 100644 --- a/packages/dashboard/chain.go +++ b/packages/dashboard/chain.go @@ -5,6 +5,8 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" @@ -14,7 +16,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/blob" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/evm" - "github.com/labstack/echo/v4" ) //go:embed templates/chain.tmpl diff --git a/packages/dashboard/chainaccount.go b/packages/dashboard/chainaccount.go index b02f473485..60dde01815 100644 --- a/packages/dashboard/chainaccount.go +++ b/packages/dashboard/chainaccount.go @@ -5,10 +5,11 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/vm/core/accounts" - "github.com/labstack/echo/v4" ) //go:embed templates/chainaccount.tmpl diff --git a/packages/dashboard/chainblob.go b/packages/dashboard/chainblob.go index 3d487b2eb5..f9ebd39ca0 100644 --- a/packages/dashboard/chainblob.go +++ b/packages/dashboard/chainblob.go @@ -5,14 +5,15 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/mr-tron/base58" + "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/blob" - "github.com/labstack/echo/v4" - "github.com/mr-tron/base58" ) //go:embed templates/chainblob.tmpl diff --git a/packages/dashboard/chainblock.go b/packages/dashboard/chainblock.go index cc773e854c..b4000129fe 100644 --- a/packages/dashboard/chainblock.go +++ b/packages/dashboard/chainblock.go @@ -6,6 +6,8 @@ import ( "net/http" "strconv" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/collections" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/errors" - "github.com/labstack/echo/v4" ) //go:embed templates/chainblock.tmpl diff --git a/packages/dashboard/chaincontract.go b/packages/dashboard/chaincontract.go index 3b633f2d5a..566eb6e9f5 100644 --- a/packages/dashboard/chaincontract.go +++ b/packages/dashboard/chaincontract.go @@ -5,12 +5,13 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/labstack/echo/v4" ) //go:embed templates/chaincontract.tmpl diff --git a/packages/dashboard/chainlist.go b/packages/dashboard/chainlist.go index b542b77990..90828a8850 100644 --- a/packages/dashboard/chainlist.go +++ b/packages/dashboard/chainlist.go @@ -7,8 +7,9 @@ import ( _ "embed" "net/http" - "github.com/iotaledger/wasp/packages/isc" "github.com/labstack/echo/v4" + + "github.com/iotaledger/wasp/packages/isc" ) //go:embed templates/chainlist.tmpl diff --git a/packages/dashboard/dashboard_test.go b/packages/dashboard/dashboard_test.go index 06ce180024..1d4411b022 100644 --- a/packages/dashboard/dashboard_test.go +++ b/packages/dashboard/dashboard_test.go @@ -6,12 +6,13 @@ import ( "testing" "github.com/PuerkitoBio/goquery" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/webapi/testutil" - "github.com/stretchr/testify/require" ) func checkProperConversionsToString(t *testing.T, html *goquery.Document) { diff --git a/packages/dashboard/metrics_chain.go b/packages/dashboard/metrics_chain.go index 86f08c4d94..3d40fa1ff0 100644 --- a/packages/dashboard/metrics_chain.go +++ b/packages/dashboard/metrics_chain.go @@ -5,8 +5,9 @@ import ( "fmt" "net/http" - "github.com/iotaledger/wasp/packages/isc" "github.com/labstack/echo/v4" + + "github.com/iotaledger/wasp/packages/isc" ) //go:embed templates/metrics_chain.tmpl diff --git a/packages/dashboard/metrics_chain_consensus.go b/packages/dashboard/metrics_chain_consensus.go index 59970c2392..29e7b41456 100644 --- a/packages/dashboard/metrics_chain_consensus.go +++ b/packages/dashboard/metrics_chain_consensus.go @@ -5,9 +5,10 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" - "github.com/labstack/echo/v4" ) //go:embed templates/metrics_chain_consensus.tmpl diff --git a/packages/dashboard/metrics_chain_nodeconn.go b/packages/dashboard/metrics_chain_nodeconn.go index 6b8f8d6105..64b110fce4 100644 --- a/packages/dashboard/metrics_chain_nodeconn.go +++ b/packages/dashboard/metrics_chain_nodeconn.go @@ -5,9 +5,10 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" - "github.com/labstack/echo/v4" ) //go:embed templates/metrics_chain_nodeconn.tmpl diff --git a/packages/dashboard/metrics_nodeconn.go b/packages/dashboard/metrics_nodeconn.go index ffbbf9eb03..fbcab7d52b 100644 --- a/packages/dashboard/metrics_nodeconn.go +++ b/packages/dashboard/metrics_nodeconn.go @@ -4,8 +4,9 @@ import ( _ "embed" "net/http" - "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" "github.com/labstack/echo/v4" + + "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" ) //go:embed templates/metrics_nodeconn.tmpl diff --git a/packages/dashboard/mock_test.go b/packages/dashboard/mock_test.go index 913dccfcd3..3aa534357e 100644 --- a/packages/dashboard/mock_test.go +++ b/packages/dashboard/mock_test.go @@ -9,6 +9,9 @@ import ( iotago "github.com/iotaledger/iota.go/v3" + "github.com/labstack/echo/v4" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -17,8 +20,6 @@ import ( "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/labstack/echo/v4" - "golang.org/x/xerrors" ) // waspServicesMock is a mock implementation of the WaspServices interface diff --git a/packages/dashboard/peering.go b/packages/dashboard/peering.go index 8bd277e8bf..001debf2ca 100644 --- a/packages/dashboard/peering.go +++ b/packages/dashboard/peering.go @@ -7,8 +7,9 @@ import ( _ "embed" "net/http" - "github.com/iotaledger/wasp/packages/cryptolib" "github.com/labstack/echo/v4" + + "github.com/iotaledger/wasp/packages/cryptolib" ) //go:embed templates/peering.tmpl diff --git a/packages/dashboard/templates/metrics_chain_consensus.tmpl b/packages/dashboard/templates/metrics_chain_consensus.tmpl index eab93f68d7..d043f960ad 100644 --- a/packages/dashboard/templates/metrics_chain_consensus.tmpl +++ b/packages/dashboard/templates/metrics_chain_consensus.tmpl @@ -18,6 +18,11 @@ {{ template "booleanValue" (.Status.IsStateReceived) }} + + Index proposal received + {{ template "booleanValue" (.Status.IsIndexProposalReceived) }} + {{ (formatTimestampOrNever (.Status.GetIndexProposalReceivedTime)) }} + Batch proposal sent {{ template "booleanValue" (.Status.IsBatchProposalSent) }} @@ -33,6 +38,11 @@ {{ template "booleanValue" (.Status.IsVMStarted) }} {{ (formatTimestampOrNever (.Status.GetVMStartedTime)) }} + + DSS signing started + {{ template "booleanValue" (.Status.IsDssSigningStarted) }} + {{ (formatTimestampOrNever (.Status.GetDssSigningStartedTime)) }} + Virtual machine result signed {{ template "booleanValue" (.Status.IsVMResultSigned) }} @@ -69,10 +79,15 @@ - Event PeerLogIndexMsg pipe size + Event peer log index message pipe size {{ .PipeMetrics.GetEventPeerLogIndexMsgPipeSize }} + + Event ACS message pipe size + {{ .PipeMetrics.GetEventACSMsgPipeSize }} + + Event inclusion state message pipe size {{ .PipeMetrics.GetEventInclusionStateMsgPipeSize }} diff --git a/packages/dashboard/templates/metrics_chain_nodeconn.tmpl b/packages/dashboard/templates/metrics_chain_nodeconn.tmpl index 93b32e73e5..2b99790950 100644 --- a/packages/dashboard/templates/metrics_chain_nodeconn.tmpl +++ b/packages/dashboard/templates/metrics_chain_nodeconn.tmpl @@ -12,46 +12,60 @@ - Pull state + Pull latest output OUT - {{ (($metrics.GetOutPullState).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetOutPullState).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetOutPullState).GetLastMessage)}} + {{ (($metrics.GetOutPullLatestOutput).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetOutPullLatestOutput).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetOutPullLatestOutput).GetLastMessage)}} Pull tx inclusion state OUT - {{ (($metrics.GetOutPullTransactionInclusionState).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetOutPullTransactionInclusionState).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetOutPullTransactionInclusionState).GetLastMessage)}} + {{ (($metrics.GetOutPullTxInclusionState).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetOutPullTxInclusionState).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetOutPullTxInclusionState).GetLastMessage)}} - Pull confirmed output + Pull output by ID OUT - {{ (($metrics.GetOutPullConfirmedOutput).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetOutPullConfirmedOutput).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetOutPullConfirmedOutput).GetLastMessage)}} + {{ (($metrics.GetOutPullOutputByID).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetOutPullOutputByID).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetOutPullOutputByID).GetLastMessage)}} - Post transaction + Publish state tx OUT - {{ (($metrics.GetOutPostTransaction).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetOutPostTransaction).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetOutPostTransaction).GetLastMessage)}} + {{ (($metrics.GetOutPublishStateTransaction).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetOutPublishStateTransaction).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetOutPublishStateTransaction).GetLastMessage)}} - Transaction + Publish governance tx + OUT + {{ (($metrics.GetOutPublishGovernanceTransaction).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetOutPublishGovernanceTransaction).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetOutPublishGovernanceTransaction).GetLastMessage)}} + + + TX inclusion state + IN + {{ (($metrics.GetInTxInclusionState).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetInTxInclusionState).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetInTxInclusionState).GetLastMessage)}} + + + State output IN - {{ (($metrics.GetInTransaction).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetInTransaction).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetInTransaction).GetLastMessage)}} + {{ (($metrics.GetInStateOutput).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetInStateOutput).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetInStateOutput).GetLastMessage)}} - Inclusion state + Alias output IN - {{ (($metrics.GetInInclusionState).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetInInclusionState).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetInInclusionState).GetLastMessage)}} + {{ (($metrics.GetInAliasOutput).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetInAliasOutput).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetInAliasOutput).GetLastMessage)}} Output @@ -61,11 +75,11 @@ {{ template "longStringCell" (($metrics.GetInOutput).GetLastMessage)}} - Unspent alias output + On ledger request IN - {{ (($metrics.GetInUnspentAliasOutput).GetMessageTotal) }} - {{ (formatTimestampOrNever (($metrics.GetInUnspentAliasOutput).GetLastEvent)) }} - {{ template "longStringCell" (($metrics.GetInUnspentAliasOutput).GetLastMessage)}} + {{ (($metrics.GetInOnLedgerRequest).GetMessageTotal) }} + {{ (formatTimestampOrNever (($metrics.GetInOnLedgerRequest).GetLastEvent)) }} + {{ template "longStringCell" (($metrics.GetInOnLedgerRequest).GetLastMessage)}} diff --git a/packages/dashboard/templates/metrics_nodeconn.tmpl b/packages/dashboard/templates/metrics_nodeconn.tmpl index d65dde6c38..fcc296dc87 100644 --- a/packages/dashboard/templates/metrics_nodeconn.tmpl +++ b/packages/dashboard/templates/metrics_nodeconn.tmpl @@ -4,13 +4,13 @@

Chains, subscribed to L1

Total L1 messages

- {{template "metricsNodeconnMessages" (args .Metrics.NodeConnectionMessagesMetrics)}} + {{template "metricsNodeconnMessages" (args .Metrics)}}
{{end}} diff --git a/packages/database/dbmanager/db.go b/packages/database/dbmanager/db.go index 1582622ace..b322cfb436 100644 --- a/packages/database/dbmanager/db.go +++ b/packages/database/dbmanager/db.go @@ -3,9 +3,9 @@ package dbmanager import ( "runtime" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/kvstore/mapdb" - "github.com/iotaledger/hive.go/kvstore/rocksdb" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/kvstore/mapdb" + "github.com/iotaledger/hive.go/core/kvstore/rocksdb" ) // region Interface //////////////////////////////////////////////////////////// diff --git a/packages/database/dbmanager/dbmanager.go b/packages/database/dbmanager/dbmanager.go index 77793ffb94..ab24b495e8 100644 --- a/packages/database/dbmanager/dbmanager.go +++ b/packages/database/dbmanager/dbmanager.go @@ -7,13 +7,12 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/timeutil" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/hive.go/core/timeutil" "github.com/iotaledger/wasp/packages/database/registrykvstore" "github.com/iotaledger/wasp/packages/database/textdb" "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/registry" ) @@ -27,15 +26,17 @@ type DBManager struct { stores map[isc.ChainID]kvstore.KVStore mutex sync.RWMutex inMemory bool + databaseDir string } -func NewDBManager(log *logger.Logger, inMemory bool, registryConfig *registry.Config) *DBManager { +func NewDBManager(log *logger.Logger, inMemory bool, databaseDir string, registryConfig *registry.Config) *DBManager { dbm := DBManager{ - log: log, - databases: make(map[isc.ChainID]DB), - stores: make(map[isc.ChainID]kvstore.KVStore), - mutex: sync.RWMutex{}, - inMemory: inMemory, + log: log, + databases: make(map[isc.ChainID]DB), + stores: make(map[isc.ChainID]kvstore.KVStore), + mutex: sync.RWMutex{}, + inMemory: inMemory, + databaseDir: databaseDir, } // registry db is created with an empty chainID dbm.registryDB = dbm.createDB(nil) @@ -69,17 +70,16 @@ func (m *DBManager) createDB(chainID *isc.ChainID) DB { return db } - dbDir := parameters.GetString(parameters.DatabaseDir) - if _, err := os.Stat(dbDir); os.IsNotExist(err) { + if _, err := os.Stat(m.databaseDir); os.IsNotExist(err) { // create a new database dir if none exists - err := os.Mkdir(dbDir, os.ModePerm) + err := os.Mkdir(m.databaseDir, os.ModePerm) if err != nil { m.log.Fatal(err) return nil } } - instanceDir := fmt.Sprintf("%s/%s", dbDir, chainIDStr) + instanceDir := fmt.Sprintf("%s/%s", m.databaseDir, chainIDStr) if _, err := os.Stat(instanceDir); os.IsNotExist(err) { m.log.Infof("creating new database for: %s.", chainIDStr) } else { diff --git a/packages/database/dbmanager/dbmanager_test.go b/packages/database/dbmanager/dbmanager_test.go index 82fd419c11..8ff3b52189 100644 --- a/packages/database/dbmanager/dbmanager_test.go +++ b/packages/database/dbmanager/dbmanager_test.go @@ -3,15 +3,16 @@ package dbmanager import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestNewDbManager(t *testing.T) { log := testlogger.NewLogger(t) - dbm := NewDBManager(log, true, registry.DefaultConfig()) + dbm := NewDBManager(log, true, "", registry.DefaultConfig()) require.NotNil(t, dbm.registryDB) require.NotNil(t, dbm.registryStore) require.Empty(t, dbm.databases) @@ -20,7 +21,7 @@ func TestNewDbManager(t *testing.T) { func TestCreateDb(t *testing.T) { log := testlogger.NewLogger(t) - dbm := NewDBManager(log, true, registry.DefaultConfig()) + dbm := NewDBManager(log, true, "", registry.DefaultConfig()) chainID := isc.RandomChainID() require.Nil(t, dbm.GetKVStore(chainID)) require.NotNil(t, dbm.GetOrCreateKVStore(chainID)) diff --git a/packages/database/registrykvstore/registrykvstore.go b/packages/database/registrykvstore/registrykvstore.go index 9db2d303e9..8db45d6074 100644 --- a/packages/database/registrykvstore/registrykvstore.go +++ b/packages/database/registrykvstore/registrykvstore.go @@ -1,6 +1,6 @@ package registrykvstore -import "github.com/iotaledger/hive.go/kvstore" +import "github.com/iotaledger/hive.go/core/kvstore" // registrykvstore is just a wrapper to any kv store that flushes the changes to disk immediately (Sets or Dels) // this is to prevent that the registry database is corrupted if the node is not shutdown gracefully diff --git a/packages/database/textdb/textkv.go b/packages/database/textdb/textkv.go index 20269dad52..7db8e6f16d 100644 --- a/packages/database/textdb/textkv.go +++ b/packages/database/textdb/textkv.go @@ -5,12 +5,13 @@ import ( "path/filepath" "sync" - "github.com/iotaledger/hive.go/byteutils" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/kvstore/mapdb" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/types" "github.com/mr-tron/base58" + + "github.com/iotaledger/hive.go/core/byteutils" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/kvstore/mapdb" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/hive.go/core/types" ) const storePerm = 0o664 diff --git a/packages/dkg/messages.go b/packages/dkg/messages.go index e3f6631a34..94e6451e6c 100644 --- a/packages/dkg/messages.go +++ b/packages/dkg/messages.go @@ -15,16 +15,17 @@ import ( "io" "time" - iotago "github.com/iotaledger/iota.go/v3" - "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/peering" - "github.com/iotaledger/wasp/packages/util" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" rabin_dkg "go.dedis.ch/kyber/v3/share/dkg/rabin" rabin_vss "go.dedis.ch/kyber/v3/share/vss/rabin" "golang.org/x/xerrors" + + iotago "github.com/iotaledger/iota.go/v3" + "github.com/iotaledger/wasp/packages/cryptolib" + "github.com/iotaledger/wasp/packages/isc" + "github.com/iotaledger/wasp/packages/peering" + "github.com/iotaledger/wasp/packages/util" ) const ( diff --git a/packages/dkg/node.go b/packages/dkg/node.go index 6beeb8ba41..1247adbfe8 100644 --- a/packages/dkg/node.go +++ b/packages/dkg/node.go @@ -9,16 +9,17 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/wasp/packages/peering" - "github.com/iotaledger/wasp/packages/registry" - "github.com/iotaledger/wasp/packages/tcrypto" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/group/edwards25519" "go.dedis.ch/kyber/v3/sign/eddsa" "go.dedis.ch/kyber/v3/suites" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/cryptolib" + "github.com/iotaledger/wasp/packages/peering" + "github.com/iotaledger/wasp/packages/registry" + "github.com/iotaledger/wasp/packages/tcrypto" ) type NodeProvider func() *Node @@ -98,7 +99,7 @@ func (n *Node) Close() { // GenerateDistributedKey takes all the required parameters from the node and initiated the DKG procedure. // This function is executed on the DKG initiator node (a chosen leader for this DKG instance). // -//nolint:funlen,gocritic +//nolint:funlen,gocritic,gocyclo func (n *Node) GenerateDistributedKey( peerPubs []*cryptolib.PublicKey, threshold uint16, diff --git a/packages/dkg/node_test.go b/packages/dkg/node_test.go index 9ff0a2e37d..216555ef47 100644 --- a/packages/dkg/node_test.go +++ b/packages/dkg/node_test.go @@ -11,14 +11,15 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/dkg" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" ) // TestBasic checks if DKG procedure is executed successfully in a common case. diff --git a/packages/dkg/proc.go b/packages/dkg/proc.go index fd46d68ce4..0a73b97350 100644 --- a/packages/dkg/proc.go +++ b/packages/dkg/proc.go @@ -12,16 +12,17 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/wasp/packages/peering" - "github.com/iotaledger/wasp/packages/tcrypto" "github.com/mr-tron/base58" "go.dedis.ch/kyber/v3" rabin_dkg "go.dedis.ch/kyber/v3/share/dkg/rabin" "go.dedis.ch/kyber/v3/suites" "go.dedis.ch/kyber/v3/util/key" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/cryptolib" + "github.com/iotaledger/wasp/packages/peering" + "github.com/iotaledger/wasp/packages/tcrypto" ) const ( @@ -500,6 +501,7 @@ func (p *proc) rabinStep6R6SendReconstructCommitsMakeSent(step byte, kst keySetT return sentMsgs, nil } +//nolint:gocyclo func (p *proc) rabinStep6R6SendReconstructCommitsMakeResp( //nolint:funlen step byte, initRecv *peering.PeerMessageGroupIn, diff --git a/packages/evm/evmtypes/callargs.go b/packages/evm/evmtypes/callargs.go index 816286909f..72766b9fb8 100644 --- a/packages/evm/evmtypes/callargs.go +++ b/packages/evm/evmtypes/callargs.go @@ -8,7 +8,8 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" ) func EncodeCallMsg(c ethereum.CallMsg) []byte { diff --git a/packages/evm/evmtypes/chainid.go b/packages/evm/evmtypes/chainid.go index 8837e0d3c5..6a5f855f8c 100644 --- a/packages/evm/evmtypes/chainid.go +++ b/packages/evm/evmtypes/chainid.go @@ -4,8 +4,9 @@ package evmtypes import ( - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) func EncodeChainID(chainID uint16) []byte { diff --git a/packages/evm/evmtypes/genesis.go b/packages/evm/evmtypes/genesis.go index f63ef496ad..f3bd728fde 100644 --- a/packages/evm/evmtypes/genesis.go +++ b/packages/evm/evmtypes/genesis.go @@ -8,7 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" ) func DecodeGenesisAlloc(b []byte) (core.GenesisAlloc, error) { diff --git a/packages/evm/evmtypes/logs.go b/packages/evm/evmtypes/logs.go index 05c03bbf4b..5d020f82f2 100644 --- a/packages/evm/evmtypes/logs.go +++ b/packages/evm/evmtypes/logs.go @@ -11,7 +11,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" ) func EncodeLog(log *types.Log, includeDerivedFields bool) []byte { diff --git a/packages/evm/evmtypes/receipt.go b/packages/evm/evmtypes/receipt.go index b036a4dca5..945c2e8214 100644 --- a/packages/evm/evmtypes/receipt.go +++ b/packages/evm/evmtypes/receipt.go @@ -10,7 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" ) // EncodeReceipt serializes the receipt in RLP format diff --git a/packages/evm/jsonrpc/chainbackend.go b/packages/evm/jsonrpc/chainbackend.go index ba61ea56dc..87ae1aa99a 100644 --- a/packages/evm/jsonrpc/chainbackend.go +++ b/packages/evm/jsonrpc/chainbackend.go @@ -6,6 +6,7 @@ package jsonrpc import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/core/types" + "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/parameters" ) diff --git a/packages/evm/jsonrpc/evmchain.go b/packages/evm/jsonrpc/evmchain.go index 4320c52253..d65a5c0e3c 100644 --- a/packages/evm/jsonrpc/evmchain.go +++ b/packages/evm/jsonrpc/evmchain.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" + "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/kv/codec" diff --git a/packages/evm/jsonrpc/jsonrpctest/env.go b/packages/evm/jsonrpc/jsonrpctest/env.go index 214ce3c275..464a4b2b8d 100644 --- a/packages/evm/jsonrpc/jsonrpctest/env.go +++ b/packages/evm/jsonrpc/jsonrpctest/env.go @@ -20,12 +20,13 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/evm/evmtest" "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/evm/jsonrpc" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/vm/core/evm" - "github.com/stretchr/testify/require" ) type Env struct { diff --git a/packages/evm/jsonrpc/jsonrpctest/jsonrpc_test.go b/packages/evm/jsonrpc/jsonrpctest/jsonrpc_test.go index b1e7abf28c..1bfca3fa35 100644 --- a/packages/evm/jsonrpc/jsonrpctest/jsonrpc_test.go +++ b/packages/evm/jsonrpc/jsonrpctest/jsonrpc_test.go @@ -17,6 +17,8 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/evm/evmtest" "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/evmutil" @@ -24,7 +26,6 @@ import ( "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/evm" - "github.com/stretchr/testify/require" ) type soloTestEnv struct { diff --git a/packages/evm/jsonrpc/service.go b/packages/evm/jsonrpc/service.go index ef7626c3f5..7a14a5cb01 100644 --- a/packages/evm/jsonrpc/service.go +++ b/packages/evm/jsonrpc/service.go @@ -18,10 +18,11 @@ import ( "github.com/ethereum/go-ethereum/eth/protocols/eth" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/vm/core/errors" "golang.org/x/crypto/sha3" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" + "github.com/iotaledger/wasp/packages/vm/core/errors" ) type EthService struct { @@ -158,7 +159,7 @@ func (e *EthService) GetTransactionReceipt(txHash common.Hash) (map[string]inter if r == nil { return nil, nil } - tx, _, _, _, err := e.evmChain.TransactionByHash(txHash) // nolint:dogsled + tx, _, _, _, err := e.evmChain.TransactionByHash(txHash) //nolint:dogsled if err != nil { return nil, e.resolveError(err) } diff --git a/packages/evm/jsonrpc/types.go b/packages/evm/jsonrpc/types.go index 5c54da14f7..de6e67979c 100644 --- a/packages/evm/jsonrpc/types.go +++ b/packages/evm/jsonrpc/types.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" + "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/vm/core/evm" ) @@ -232,6 +233,8 @@ type SendTxArgs struct { } // setDefaults is a helper function that fills in default values for unspecified tx fields. +// +//nolint:gocyclo func (args *SendTxArgs) setDefaults(e *EthService) error { if args.GasPrice == nil { args.GasPrice = (*hexutil.Big)(evm.GasPrice) @@ -305,6 +308,8 @@ func (args *SendTxArgs) toTransaction() *types.Transaction { type RPCFilterQuery ethereum.FilterQuery // UnmarshalJSON sets *args fields with given data. +// +//nolint:gocyclo func (q *RPCFilterQuery) UnmarshalJSON(data []byte) error { type input struct { BlockHash *common.Hash `json:"blockHash"` diff --git a/packages/gpa/aba/craig/aba.go b/packages/gpa/aba/craig/aba.go index e1f3b2e127..df694003a0 100644 --- a/packages/gpa/aba/craig/aba.go +++ b/packages/gpa/aba/craig/aba.go @@ -5,8 +5,9 @@ package craig import ( - "github.com/iotaledger/wasp/packages/gpa" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) type abaImpl struct{} diff --git a/packages/gpa/aba/mostefaoui/aba.go b/packages/gpa/aba/mostefaoui/aba.go index 1df09ab26f..b552be1f07 100644 --- a/packages/gpa/aba/mostefaoui/aba.go +++ b/packages/gpa/aba/mostefaoui/aba.go @@ -5,8 +5,9 @@ package aba import ( - "github.com/iotaledger/wasp/packages/gpa" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) type abaImpl struct{} diff --git a/packages/gpa/ack_handler.go b/packages/gpa/ack_handler.go index 4373bf0c7f..afbe64b36e 100644 --- a/packages/gpa/ack_handler.go +++ b/packages/gpa/ack_handler.go @@ -8,8 +8,9 @@ import ( "fmt" "time" - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) // The purpose of this wrapper is to handle unreliable network by implementing diff --git a/packages/gpa/acss/acss.go b/packages/gpa/acss/acss.go index ff5718963c..d0117ecfa0 100644 --- a/packages/gpa/acss/acss.go +++ b/packages/gpa/acss/acss.go @@ -86,14 +86,15 @@ import ( "fmt" "math" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/gpa/acss/crypto" - rbc "github.com/iotaledger/wasp/packages/gpa/rbc/bracha" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/suites" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/gpa/acss/crypto" + rbc "github.com/iotaledger/wasp/packages/gpa/rbc/bracha" ) const ( diff --git a/packages/gpa/acss/acss_test.go b/packages/gpa/acss/acss_test.go index a5c3a18dd3..7bea1ecadc 100644 --- a/packages/gpa/acss/acss_test.go +++ b/packages/gpa/acss/acss_test.go @@ -7,14 +7,15 @@ import ( "math/rand" "testing" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + "go.dedis.ch/kyber/v3" + "go.dedis.ch/kyber/v3/share" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/gpa/acss" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/share" ) // In this test all the nodes are actually fair. @@ -50,6 +51,7 @@ func genericTest( silentNodes int, // Number of actually faulty nodes (by not responding to anything). faultyDeals int, // How many faulty deals the dealer produces? ) { + t.Parallel() require.True(t, silentNodes+faultyDeals <= f) // Assert tests are within assumptions. log := testlogger.WithLevel(testlogger.NewLogger(t), logger.LevelWarn, false) defer log.Sync() diff --git a/packages/gpa/acss/msg_implicate_recover.go b/packages/gpa/acss/msg_implicate_recover.go index c25c4b1a25..d45da716d0 100644 --- a/packages/gpa/acss/msg_implicate_recover.go +++ b/packages/gpa/acss/msg_implicate_recover.go @@ -6,9 +6,10 @@ package acss import ( "bytes" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) type msgImplicateKind byte diff --git a/packages/gpa/acss/msg_rbc_ce.go b/packages/gpa/acss/msg_rbc_ce.go index a968d483c4..7f3a305a40 100644 --- a/packages/gpa/acss/msg_rbc_ce.go +++ b/packages/gpa/acss/msg_rbc_ce.go @@ -6,10 +6,11 @@ package acss import ( "bytes" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/util" "go.dedis.ch/kyber/v3/suites" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/util" ) // This message is used as a payload of the RBC: diff --git a/packages/gpa/acss/msg_vote.go b/packages/gpa/acss/msg_vote.go index c65ca49b3a..6386d85bfa 100644 --- a/packages/gpa/acss/msg_vote.go +++ b/packages/gpa/acss/msg_vote.go @@ -6,9 +6,10 @@ package acss import ( "bytes" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) type msgVoteKind byte diff --git a/packages/gpa/adkg/nonce/msg.go b/packages/gpa/adkg/nonce/msg.go index a6ec49fb26..9bca64df10 100644 --- a/packages/gpa/adkg/nonce/msg.go +++ b/packages/gpa/adkg/nonce/msg.go @@ -4,8 +4,9 @@ package nonce import ( - "github.com/iotaledger/wasp/packages/gpa" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) func (n *nonceDKGImpl) subsystemFunc(subsystem byte, index int) (gpa.GPA, error) { diff --git a/packages/gpa/adkg/nonce/msg_acss_output.go b/packages/gpa/adkg/nonce/msg_acss_output.go index 69a93b54dd..ad0e32cb87 100644 --- a/packages/gpa/adkg/nonce/msg_acss_output.go +++ b/packages/gpa/adkg/nonce/msg_acss_output.go @@ -4,9 +4,10 @@ package nonce import ( - "github.com/iotaledger/wasp/packages/gpa" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" + + "github.com/iotaledger/wasp/packages/gpa" ) // An event to self. diff --git a/packages/gpa/adkg/nonce/msg_agreement_result.go b/packages/gpa/adkg/nonce/msg_agreement_result.go index 8d3924d549..70b370e7db 100644 --- a/packages/gpa/adkg/nonce/msg_agreement_result.go +++ b/packages/gpa/adkg/nonce/msg_agreement_result.go @@ -4,8 +4,9 @@ package nonce import ( - "github.com/iotaledger/wasp/packages/gpa" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) // An event to self. diff --git a/packages/gpa/adkg/nonce/nonce.go b/packages/gpa/adkg/nonce/nonce.go index 14f4193a7f..057cb590d6 100644 --- a/packages/gpa/adkg/nonce/nonce.go +++ b/packages/gpa/adkg/nonce/nonce.go @@ -35,13 +35,14 @@ import ( "fmt" "sort" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/gpa/acss" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/suites" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/gpa/acss" ) type Output struct { diff --git a/packages/gpa/adkg/nonce/nonce_test.go b/packages/gpa/adkg/nonce/nonce_test.go index c789543742..2b9592a37f 100644 --- a/packages/gpa/adkg/nonce/nonce_test.go +++ b/packages/gpa/adkg/nonce/nonce_test.go @@ -6,15 +6,16 @@ package nonce_test import ( "testing" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + "go.dedis.ch/kyber/v3" + "go.dedis.ch/kyber/v3/share" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/gpa/adkg" "github.com/iotaledger/wasp/packages/gpa/adkg/nonce" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/share" ) func TestBasic(t *testing.T) { diff --git a/packages/gpa/adkg/test_util.go b/packages/gpa/adkg/test_util.go index 2918feb1c9..34e138599d 100644 --- a/packages/gpa/adkg/test_util.go +++ b/packages/gpa/adkg/test_util.go @@ -6,14 +6,15 @@ package adkg import ( "testing" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/gpa" - "github.com/iotaledger/wasp/packages/gpa/adkg/nonce" "github.com/stretchr/testify/require" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/sign/dss" "go.dedis.ch/kyber/v3/suites" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/gpa" + "github.com/iotaledger/wasp/packages/gpa/adkg/nonce" ) // For tests only. diff --git a/packages/gpa/cc/blssig/blssig.go b/packages/gpa/cc/blssig/blssig.go index c4b9018382..7966796054 100644 --- a/packages/gpa/cc/blssig/blssig.go +++ b/packages/gpa/cc/blssig/blssig.go @@ -17,11 +17,12 @@ package blssig import ( "fmt" - "github.com/iotaledger/wasp/packages/gpa" "go.dedis.ch/kyber/v3/pairing" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/sign/tbls" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/gpa" ) type ccImpl struct { diff --git a/packages/gpa/msg_wrapper.go b/packages/gpa/msg_wrapper.go index 8d1b8038ed..ff04c196d9 100644 --- a/packages/gpa/msg_wrapper.go +++ b/packages/gpa/msg_wrapper.go @@ -6,8 +6,9 @@ package gpa import ( "bytes" - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) // MsgWrapper can be used to compose an algorithm out of other abstractions. diff --git a/packages/gpa/out_messages.go b/packages/gpa/out_messages.go index b6a3464fcd..9bcab7ede7 100644 --- a/packages/gpa/out_messages.go +++ b/packages/gpa/out_messages.go @@ -42,7 +42,7 @@ func (omi *outMessagesImpl) AddMany(msgs []Message) OutMessages { if omi.done { panic("out messages marked as done") } - if msgs == nil || len(msgs) == 0 { + if len(msgs) == 0 { return omi } omi.addElem(&outMessagesElem{msgs: msgs, next: nil}) diff --git a/packages/gpa/out_messages_test.go b/packages/gpa/out_messages_test.go index 68c269edba..694388dfbe 100644 --- a/packages/gpa/out_messages_test.go +++ b/packages/gpa/out_messages_test.go @@ -6,8 +6,9 @@ package gpa_test import ( "testing" - "github.com/iotaledger/wasp/packages/gpa" "github.com/stretchr/testify/assert" + + "github.com/iotaledger/wasp/packages/gpa" ) func TestOutMessages(t *testing.T) { diff --git a/packages/gpa/rbc/bracha/bracha.go b/packages/gpa/rbc/bracha/bracha.go index ee203cdd6d..7c58571549 100644 --- a/packages/gpa/rbc/bracha/bracha.go +++ b/packages/gpa/rbc/bracha/bracha.go @@ -45,9 +45,10 @@ package bracha import ( "fmt" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/hashing" - "golang.org/x/xerrors" ) type rbc struct { diff --git a/packages/gpa/rbc/bracha/bracha_test.go b/packages/gpa/rbc/bracha/bracha_test.go index 66e754d0b9..22d06dee83 100644 --- a/packages/gpa/rbc/bracha/bracha_test.go +++ b/packages/gpa/rbc/bracha/bracha_test.go @@ -8,14 +8,16 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/gpa" "github.com/iotaledger/wasp/packages/gpa/rbc/bracha" - "github.com/stretchr/testify/require" ) // In this test all the nodes are actually fair. func TestBasic(t *testing.T) { test := func(tt *testing.T, n, f int) { + tt.Parallel() nodeIDs := gpa.MakeTestNodeIDs("node", n) leader := nodeIDs[rand.Intn(len(nodeIDs))] input := []byte("something important to broadcast") @@ -30,7 +32,6 @@ func TestBasic(t *testing.T) { require.Equal(tt, o.([]byte), input) } } - t.Parallel() t.Run("n=1,f=0", func(tt *testing.T) { test(tt, 1, 0) }) t.Run("n=2,f=0", func(tt *testing.T) { test(tt, 2, 0) }) t.Run("n=3,f=0", func(tt *testing.T) { test(tt, 3, 0) }) @@ -42,6 +43,7 @@ func TestBasic(t *testing.T) { // Assume f nodes are actually faulty by dropping all the messages. func TestWithSilent(t *testing.T) { test := func(tt *testing.T, n, f int) { + tt.Parallel() nodeIDs := gpa.ShuffleNodeIDs(gpa.MakeTestNodeIDs("node", n)) faulty := nodeIDs[0:f] fair := nodeIDs[f:] @@ -63,7 +65,6 @@ func TestWithSilent(t *testing.T) { require.Equal(tt, o.([]byte), input) } } - t.Parallel() t.Run("n=1,f=0", func(tt *testing.T) { test(tt, 1, 0) }) t.Run("n=2,f=0", func(tt *testing.T) { test(tt, 2, 0) }) t.Run("n=3,f=0", func(tt *testing.T) { test(tt, 3, 0) }) @@ -76,6 +77,7 @@ func TestWithSilent(t *testing.T) { func TestPredicate(t *testing.T) { pFalse := func(b []byte) bool { return false } test := func(tt *testing.T, n, f int) { + tt.Parallel() nodeIDs := gpa.MakeTestNodeIDs("node", n) leader := nodeIDs[rand.Intn(len(nodeIDs))] input := []byte("something important to broadcast") @@ -91,7 +93,6 @@ func TestPredicate(t *testing.T) { require.Nil(tt, nodes[nid].Output()) } } - t.Parallel() t.Run("n=1,f=0", func(tt *testing.T) { test(tt, 1, 0) }) t.Run("n=2,f=0", func(tt *testing.T) { test(tt, 2, 0) }) t.Run("n=3,f=0", func(tt *testing.T) { test(tt, 3, 0) }) diff --git a/packages/isc/addressutil.go b/packages/isc/addressutil.go index 4349552c7b..50cf790f6e 100644 --- a/packages/isc/addressutil.go +++ b/packages/isc/addressutil.go @@ -3,7 +3,7 @@ package isc import ( "fmt" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" ) diff --git a/packages/isc/agentid.go b/packages/isc/agentid.go index b52bc90742..4a397c2334 100644 --- a/packages/isc/agentid.go +++ b/packages/isc/agentid.go @@ -7,10 +7,11 @@ import ( "fmt" "strings" - "github.com/iotaledger/hive.go/marshalutil" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/parameters" - "golang.org/x/xerrors" ) type AgentIDKind uint8 diff --git a/packages/isc/agentid_address.go b/packages/isc/agentid_address.go index 1aa9008f33..50e0c44b98 100644 --- a/packages/isc/agentid_address.go +++ b/packages/isc/agentid_address.go @@ -1,7 +1,7 @@ package isc import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/parameters" diff --git a/packages/isc/agentid_contract.go b/packages/isc/agentid_contract.go index af64a7bca7..c9aee2aea9 100644 --- a/packages/isc/agentid_contract.go +++ b/packages/isc/agentid_contract.go @@ -1,9 +1,10 @@ package isc import ( - "github.com/iotaledger/hive.go/marshalutil" - iotago "github.com/iotaledger/iota.go/v3" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" + iotago "github.com/iotaledger/iota.go/v3" ) // ContractAgentID is an AgentID formed by a ChainID and a contract Hname. diff --git a/packages/isc/agentid_eth.go b/packages/isc/agentid_eth.go index 4f8a92ac7f..777c170ca9 100644 --- a/packages/isc/agentid_eth.go +++ b/packages/isc/agentid_eth.go @@ -2,7 +2,8 @@ package isc import ( "github.com/ethereum/go-ethereum/common" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" ) // EthereumAddressAgentID is an AgentID formed by an Ethereum address diff --git a/packages/isc/agentid_test.go b/packages/isc/agentid_test.go index 15fb8d2c43..55b609c99a 100644 --- a/packages/isc/agentid_test.go +++ b/packages/isc/agentid_test.go @@ -5,9 +5,10 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/parameters" - "github.com/stretchr/testify/require" ) func TestAgentID(t *testing.T) { diff --git a/packages/isc/allowance.go b/packages/isc/allowance.go index abdd3cb4d4..66f5a6a282 100644 --- a/packages/isc/allowance.go +++ b/packages/isc/allowance.go @@ -3,7 +3,7 @@ package isc import ( "fmt" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/util" ) diff --git a/packages/isc/allowance_test.go b/packages/isc/allowance_test.go index 787ebba85e..1cde2b2b79 100644 --- a/packages/isc/allowance_test.go +++ b/packages/isc/allowance_test.go @@ -3,8 +3,9 @@ package isc import ( "testing" - iotago "github.com/iotaledger/iota.go/v3" "github.com/stretchr/testify/require" + + iotago "github.com/iotaledger/iota.go/v3" ) func TestAddNFTs(t *testing.T) { diff --git a/packages/isc/assert/util.go b/packages/isc/assert/util.go index 4088814398..78bcb2312b 100644 --- a/packages/isc/assert/util.go +++ b/packages/isc/assert/util.go @@ -4,8 +4,9 @@ import ( "fmt" "strings" - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) type Assert struct { diff --git a/packages/isc/chainid.go b/packages/isc/chainid.go index 0784de1a38..3987b61a6b 100644 --- a/packages/isc/chainid.go +++ b/packages/isc/chainid.go @@ -6,11 +6,12 @@ package isc import ( "fmt" - "github.com/iotaledger/hive.go/marshalutil" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/parameters" - "golang.org/x/xerrors" ) const ChainIDLength = iotago.AliasIDLength diff --git a/packages/isc/ftokens.go b/packages/isc/ftokens.go index 5705fd849d..eeaace8c1b 100644 --- a/packages/isc/ftokens.go +++ b/packages/isc/ftokens.go @@ -5,14 +5,15 @@ import ( "fmt" "math/big" - "github.com/iotaledger/hive.go/marshalutil" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/gas" - "golang.org/x/xerrors" ) // FungibleTokens is used as assets in the UTXO and as tokens in transfer diff --git a/packages/isc/ftokens_test.go b/packages/isc/ftokens_test.go index 2a0bace39c..a52b1839cb 100644 --- a/packages/isc/ftokens_test.go +++ b/packages/isc/ftokens_test.go @@ -4,11 +4,12 @@ import ( "math/big" "testing" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/require" ) func TestMarshalling(t *testing.T) { diff --git a/packages/isc/hname.go b/packages/isc/hname.go index b9c670c5cc..c80dd8de90 100644 --- a/packages/isc/hname.go +++ b/packages/isc/hname.go @@ -10,9 +10,10 @@ import ( "io" "strconv" - "github.com/iotaledger/hive.go/marshalutil" - "github.com/iotaledger/wasp/packages/hashing" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" + "github.com/iotaledger/wasp/packages/hashing" ) // Hname is 4 bytes of blake2b hash of any string interpreted as little-endian uint32. diff --git a/packages/isc/iotago.go b/packages/isc/iotago.go index 2261d49a17..e88d527562 100644 --- a/packages/isc/iotago.go +++ b/packages/isc/iotago.go @@ -1,9 +1,10 @@ package isc import ( - "github.com/iotaledger/hive.go/marshalutil" - iotago "github.com/iotaledger/iota.go/v3" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" + iotago "github.com/iotaledger/iota.go/v3" ) const Million = uint64(1_000_000) diff --git a/packages/isc/nft.go b/packages/isc/nft.go index 37db408c63..ed47fed8c7 100644 --- a/packages/isc/nft.go +++ b/packages/isc/nft.go @@ -1,7 +1,7 @@ package isc import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" ) diff --git a/packages/isc/nft_test.go b/packages/isc/nft_test.go index 95b4ed7d92..25d0c5c9d3 100644 --- a/packages/isc/nft_test.go +++ b/packages/isc/nft_test.go @@ -3,9 +3,10 @@ package isc import ( "testing" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" - "github.com/stretchr/testify/require" ) func TestSerialize(t *testing.T) { diff --git a/packages/isc/output.go b/packages/isc/output.go index 521b93c558..a210059438 100644 --- a/packages/isc/output.go +++ b/packages/isc/output.go @@ -7,7 +7,7 @@ import ( "bytes" "fmt" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/util" ) diff --git a/packages/isc/request.go b/packages/isc/request.go index 7cf2cc495e..8226686259 100644 --- a/packages/isc/request.go +++ b/packages/isc/request.go @@ -3,7 +3,7 @@ package isc import ( "time" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/hashing" diff --git a/packages/isc/request_evm.go b/packages/isc/request_evm.go index a063917bb9..76fa4b9590 100644 --- a/packages/isc/request_evm.go +++ b/packages/isc/request_evm.go @@ -6,7 +6,8 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/core/types" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/evmutil" diff --git a/packages/isc/request_test.go b/packages/isc/request_test.go index b245678b3e..0788c9c526 100644 --- a/packages/isc/request_test.go +++ b/packages/isc/request_test.go @@ -5,12 +5,13 @@ import ( "math/big" "testing" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/kv/dict" - "github.com/stretchr/testify/require" ) func TestSerializeRequestData(t *testing.T) { diff --git a/packages/isc/requestimpl.go b/packages/isc/requestimpl.go index 2ca93453e8..3ef4e0cfc5 100644 --- a/packages/isc/requestimpl.go +++ b/packages/isc/requestimpl.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" diff --git a/packages/isc/rotate/rotate.go b/packages/isc/rotate/rotate.go index 8a0af635b6..d2eda770fc 100644 --- a/packages/isc/rotate/rotate.go +++ b/packages/isc/rotate/rotate.go @@ -3,7 +3,7 @@ package rotate import ( "time" - "github.com/iotaledger/hive.go/identity" + "github.com/iotaledger/hive.go/core/identity" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/isc/rotate/rotate_test.go b/packages/isc/rotate/rotate_test.go index b06e5943cd..81ce0cebf1 100644 --- a/packages/isc/rotate/rotate_test.go +++ b/packages/isc/rotate/rotate_test.go @@ -3,9 +3,10 @@ package rotate import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/testutil/testkey" - "github.com/stretchr/testify/require" ) func TestBasicRotateRequest(t *testing.T) { diff --git a/packages/isc/vmerror.go b/packages/isc/vmerror.go index 407a8903ec..69e523a5ee 100644 --- a/packages/isc/vmerror.go +++ b/packages/isc/vmerror.go @@ -7,7 +7,7 @@ import ( "hash/crc32" "math" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/hashing" ) diff --git a/packages/kv/buffered/buffered.go b/packages/kv/buffered/buffered.go index e9fb6f0613..c285fc8129 100644 --- a/packages/kv/buffered/buffered.go +++ b/packages/kv/buffered/buffered.go @@ -5,9 +5,10 @@ import ( "fmt" "sort" + "github.com/mr-tron/base58" + "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/dict" - "github.com/mr-tron/base58" ) // BufferedKVStoreAccess is a KVStore backed by a given KVStoreReader. Writes are cached in-memory; diff --git a/packages/kv/buffered/buffered_test.go b/packages/kv/buffered/buffered_test.go index 85257f627d..db7ee47e9a 100644 --- a/packages/kv/buffered/buffered_test.go +++ b/packages/kv/buffered/buffered_test.go @@ -3,10 +3,11 @@ package buffered import ( "testing" - "github.com/iotaledger/hive.go/kvstore/mapdb" - "github.com/iotaledger/wasp/packages/kv" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" + "github.com/iotaledger/wasp/packages/kv" ) func TestBufferedKVStore(t *testing.T) { diff --git a/packages/kv/buffered/mutation_test.go b/packages/kv/buffered/mutation_test.go index 8a62a70582..347c95937e 100644 --- a/packages/kv/buffered/mutation_test.go +++ b/packages/kv/buffered/mutation_test.go @@ -6,8 +6,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/iotaledger/wasp/packages/util" "github.com/stretchr/testify/assert" + + "github.com/iotaledger/wasp/packages/util" ) func TestEmptyMutations(t *testing.T) { diff --git a/packages/kv/codec/address.go b/packages/kv/codec/address.go index 8e2aa87ea4..43d7993d1d 100644 --- a/packages/kv/codec/address.go +++ b/packages/kv/codec/address.go @@ -1,9 +1,10 @@ package codec import ( + "golang.org/x/xerrors" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" - "golang.org/x/xerrors" ) func DecodeAddress(b []byte, def ...iotago.Address) (iotago.Address, error) { diff --git a/packages/kv/codec/agentid.go b/packages/kv/codec/agentid.go index b5f86b5120..ebc2188104 100644 --- a/packages/kv/codec/agentid.go +++ b/packages/kv/codec/agentid.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) func DecodeAgentID(b []byte, def ...isc.AgentID) (isc.AgentID, error) { diff --git a/packages/kv/codec/allowance.go b/packages/kv/codec/allowance.go index 986aadc1e6..54c777e938 100644 --- a/packages/kv/codec/allowance.go +++ b/packages/kv/codec/allowance.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) func DecodeAllowance(b []byte, def ...*isc.Allowance) (*isc.Allowance, error) { diff --git a/packages/kv/codec/bool.go b/packages/kv/codec/bool.go index 3b856d2df5..289a210e79 100644 --- a/packages/kv/codec/bool.go +++ b/packages/kv/codec/bool.go @@ -3,8 +3,9 @@ package codec import ( "bytes" - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) func DecodeBool(b []byte, def ...bool) (bool, error) { diff --git a/packages/kv/codec/chainid.go b/packages/kv/codec/chainid.go index ea907a91c6..b579b795a7 100644 --- a/packages/kv/codec/chainid.go +++ b/packages/kv/codec/chainid.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) func DecodeChainID(b []byte, def ...*isc.ChainID) (*isc.ChainID, error) { diff --git a/packages/kv/codec/encodego.go b/packages/kv/codec/encodego.go index d1b1636a89..cb631a2df1 100644 --- a/packages/kv/codec/encodego.go +++ b/packages/kv/codec/encodego.go @@ -11,6 +11,7 @@ import ( "github.com/iotaledger/wasp/packages/util" ) +//nolint:gocyclo func Encode(v interface{}) []byte { //nolint:funlen switch vt := v.(type) { case bool: diff --git a/packages/kv/codec/hashvalue.go b/packages/kv/codec/hashvalue.go index 446d6d53df..2eeeeab26f 100644 --- a/packages/kv/codec/hashvalue.go +++ b/packages/kv/codec/hashvalue.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/hashing" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/hashing" ) func DecodeHashValue(b []byte, def ...hashing.HashValue) (hashing.HashValue, error) { diff --git a/packages/kv/codec/hname.go b/packages/kv/codec/hname.go index 230f3de024..e0efe56a6c 100644 --- a/packages/kv/codec/hname.go +++ b/packages/kv/codec/hname.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) func DecodeHname(b []byte, def ...isc.Hname) (isc.Hname, error) { diff --git a/packages/kv/codec/int.go b/packages/kv/codec/int.go index 46ee3ac87a..5f6338bc4b 100644 --- a/packages/kv/codec/int.go +++ b/packages/kv/codec/int.go @@ -3,8 +3,9 @@ package codec import ( "math/big" - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) func checkLength(d []byte, mustLen int, typeName string) error { diff --git a/packages/kv/codec/nativetokenid.go b/packages/kv/codec/nativetokenid.go index ca7d9cfdb1..2a045907b0 100644 --- a/packages/kv/codec/nativetokenid.go +++ b/packages/kv/codec/nativetokenid.go @@ -1,8 +1,9 @@ package codec import ( - iotago "github.com/iotaledger/iota.go/v3" "golang.org/x/xerrors" + + iotago "github.com/iotaledger/iota.go/v3" ) func DecodeNativeTokenID(b []byte, def ...iotago.NativeTokenID) (iotago.NativeTokenID, error) { diff --git a/packages/kv/codec/ratio.go b/packages/kv/codec/ratio.go index 6d171bead0..fa6b25db33 100644 --- a/packages/kv/codec/ratio.go +++ b/packages/kv/codec/ratio.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) func EncodeRatio32(r util.Ratio32) []byte { diff --git a/packages/kv/codec/requestid.go b/packages/kv/codec/requestid.go index 6665840852..160a65aeba 100644 --- a/packages/kv/codec/requestid.go +++ b/packages/kv/codec/requestid.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) func DecodeRequestID(b []byte, def ...isc.RequestID) (isc.RequestID, error) { diff --git a/packages/kv/codec/time.go b/packages/kv/codec/time.go index 40daa5a47e..a65feac25e 100644 --- a/packages/kv/codec/time.go +++ b/packages/kv/codec/time.go @@ -3,8 +3,9 @@ package codec import ( "time" - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) var zeroUnixNano = time.Time{}.UnixNano() diff --git a/packages/kv/codec/tokenscheme.go b/packages/kv/codec/tokenscheme.go index baabebb384..752245164e 100644 --- a/packages/kv/codec/tokenscheme.go +++ b/packages/kv/codec/tokenscheme.go @@ -1,9 +1,10 @@ package codec import ( + "golang.org/x/xerrors" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" - "golang.org/x/xerrors" ) func DecodeTokenScheme(b []byte, def ...iotago.TokenScheme) (iotago.TokenScheme, error) { diff --git a/packages/kv/codec/tokenscheme_test.go b/packages/kv/codec/tokenscheme_test.go index 08722d359b..8b2859ae97 100644 --- a/packages/kv/codec/tokenscheme_test.go +++ b/packages/kv/codec/tokenscheme_test.go @@ -4,8 +4,9 @@ import ( "math/big" "testing" - iotago "github.com/iotaledger/iota.go/v3" "github.com/stretchr/testify/require" + + iotago "github.com/iotaledger/iota.go/v3" ) func TestTokenSchemeDeSeri(t *testing.T) { diff --git a/packages/kv/codec/vmerror.go b/packages/kv/codec/vmerror.go index 717edaeebb..92dfca3119 100644 --- a/packages/kv/codec/vmerror.go +++ b/packages/kv/codec/vmerror.go @@ -1,8 +1,9 @@ package codec import ( - "github.com/iotaledger/wasp/packages/isc" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc" ) func DecodeVMErrorCode(b []byte, def ...isc.VMErrorCode) (isc.VMErrorCode, error) { diff --git a/packages/kv/collections/array_test.go b/packages/kv/collections/array_test.go index 7de403c9ef..b08f8a8679 100644 --- a/packages/kv/collections/array_test.go +++ b/packages/kv/collections/array_test.go @@ -3,8 +3,9 @@ package collections import ( "testing" - "github.com/iotaledger/wasp/packages/kv/dict" "github.com/stretchr/testify/assert" + + "github.com/iotaledger/wasp/packages/kv/dict" ) //nolint:dupl // TODO duplicated code, could be refactored diff --git a/packages/kv/collections/map_test.go b/packages/kv/collections/map_test.go index f62ad6a532..ce04001285 100644 --- a/packages/kv/collections/map_test.go +++ b/packages/kv/collections/map_test.go @@ -3,9 +3,10 @@ package collections import ( "testing" - "github.com/iotaledger/wasp/packages/kv/dict" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/kv/dict" ) func TestBasicMap(t *testing.T) { diff --git a/packages/kv/collections/tlog.go b/packages/kv/collections/tlog.go index d079120d9b..c49e51ce3f 100644 --- a/packages/kv/collections/tlog.go +++ b/packages/kv/collections/tlog.go @@ -350,6 +350,7 @@ func (l *ImmutableTimestampedLog) MustTakeTimeSlice(fromTs, toTs int64) *TimeSli return tsl } +//nolint:gocyclo func (l *ImmutableTimestampedLog) findLowerIdx(ts int64, fromIdx, toIdx uint32) (uint32, bool, error) { if fromIdx > toIdx { return 0, false, nil @@ -406,6 +407,7 @@ func (l *ImmutableTimestampedLog) findLowerIdx(ts int64, fromIdx, toIdx uint32) return l.findLowerIdx(ts, middleIdx, toIdx) } +//nolint:gocyclo func (l *ImmutableTimestampedLog) findUpperIdx(ts int64, fromIdx, toIdx uint32) (uint32, bool, error) { if fromIdx > toIdx { return 0, false, nil diff --git a/packages/kv/collections/tlog_test.go b/packages/kv/collections/tlog_test.go index f82f1cd23a..2dcbf258ea 100644 --- a/packages/kv/collections/tlog_test.go +++ b/packages/kv/collections/tlog_test.go @@ -5,9 +5,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/assert" ) func TestTlogBasic(t *testing.T) { diff --git a/packages/kv/dict/dict.go b/packages/kv/dict/dict.go index b1f9d14615..0e9ac93b57 100644 --- a/packages/kv/dict/dict.go +++ b/packages/kv/dict/dict.go @@ -8,10 +8,11 @@ import ( "fmt" "sort" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/mr-tron/base58" + + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/kv" - "github.com/mr-tron/base58" ) // Dict is an implementation kv.KVStore interface backed by an in-memory map. diff --git a/packages/kv/dict/dict_test.go b/packages/kv/dict/dict_test.go index 56fbd2af0b..91c2141fa5 100644 --- a/packages/kv/dict/dict_test.go +++ b/packages/kv/dict/dict_test.go @@ -6,9 +6,10 @@ import ( "github.com/stretchr/testify/require" + "github.com/stretchr/testify/assert" + "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/assert" ) func TestBasicKVMap(t *testing.T) { diff --git a/packages/kv/hiveadapter.go b/packages/kv/hiveadapter.go index 1bc807927e..2901ab9a77 100644 --- a/packages/kv/hiveadapter.go +++ b/packages/kv/hiveadapter.go @@ -4,7 +4,7 @@ import ( "errors" "sort" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" ) // HiveKVStoreReader is an implementation of KVStoreReader with an instance of diff --git a/packages/kv/kv.go b/packages/kv/kv.go index 4b371d1816..c4805dd0bf 100644 --- a/packages/kv/kv.go +++ b/packages/kv/kv.go @@ -4,8 +4,9 @@ import ( "bytes" "fmt" - "github.com/iotaledger/wasp/packages/util" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/util" ) // Key represents a key in the KVStore, to avoid unnecessary conversions diff --git a/packages/kv/kvdecoder/kvdecoder.go b/packages/kv/kvdecoder/kvdecoder.go index 8d09528d24..d1995407db 100644 --- a/packages/kv/kvdecoder/kvdecoder.go +++ b/packages/kv/kvdecoder/kvdecoder.go @@ -5,13 +5,14 @@ import ( "math/big" "time" + "golang.org/x/xerrors" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" - "golang.org/x/xerrors" ) type kvdecoder struct { diff --git a/packages/kv/kvtest/testutil.go b/packages/kv/kvtest/testutil.go index 467300b394..d8f645ebcc 100644 --- a/packages/kv/kvtest/testutil.go +++ b/packages/kv/kvtest/testutil.go @@ -2,6 +2,7 @@ package kvtest import ( + "errors" "io" "math" "math/rand" @@ -10,7 +11,6 @@ import ( "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) const nilprefix = "" @@ -79,7 +79,7 @@ func writeKV(w io.Writer, k, v []byte) (int, error) { func readKV(r io.Reader) ([]byte, []byte, bool) { k, err := util.ReadBytes16(r) - if xerrors.Is(err, io.EOF) { + if errors.Is(err, io.EOF) { return nil, nil, true } v, err := util.ReadBytes32(r) diff --git a/packages/kv/optimism/optimism.go b/packages/kv/optimism/optimism.go index a70d24c363..801e653b3f 100644 --- a/packages/kv/optimism/optimism.go +++ b/packages/kv/optimism/optimism.go @@ -5,9 +5,10 @@ import ( "errors" "time" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv" - "golang.org/x/xerrors" ) // OptimisticKVStoreReader implements KVReader interfaces. It wraps any kv.KVStoreReader together with the baseline diff --git a/packages/kv/optimism/optimism_test.go b/packages/kv/optimism/optimism_test.go index 5f8224fbe9..24935a0d7b 100644 --- a/packages/kv/optimism/optimism_test.go +++ b/packages/kv/optimism/optimism_test.go @@ -4,9 +4,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv/dict" - "github.com/stretchr/testify/require" ) func TestOptimismBasic(t *testing.T) { diff --git a/packages/l1connection/l1connection.go b/packages/l1connection/l1connection.go index b3e4d25d1c..07bee40056 100644 --- a/packages/l1connection/l1connection.go +++ b/packages/l1connection/l1connection.go @@ -9,7 +9,7 @@ import ( "net/http" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/builder" "github.com/iotaledger/iota.go/v3/nodeclient" @@ -155,6 +155,8 @@ func (c *l1client) PostTx(tx *iotago.Transaction, timeout ...time.Duration) erro const pollConfirmedTxInterval = 200 * time.Millisecond // waitUntilConfirmed waits until a given tx Block is confirmed, it takes care of promotions/re-attachments for that Block +// +//nolint:gocyclo func (c *l1client) waitUntilConfirmed(ctx context.Context, block *iotago.Block) error { // wait until tx is confirmed blockID, err := block.ID() diff --git a/packages/l1connection/pow.go b/packages/l1connection/pow.go index 4de836136f..1f4fcb7867 100644 --- a/packages/l1connection/pow.go +++ b/packages/l1connection/pow.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/iotaledger/hive.go/contextutils" + "github.com/iotaledger/hive.go/core/contextutils" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" @@ -66,6 +66,8 @@ type RefreshTipsFunc = func() (tips iotago.BlockIDs, err error) // DoPoW does the proof-of-work required to hit the given target score. // The given iota.Block's nonce is automatically updated. +// +//nolint:gocyclo func doPoW(ctx context.Context, block *iotago.Block, targetScore float64, parallelism int, refreshTipsInterval time.Duration, refreshTipsFunc RefreshTipsFunc) (blockSize int, err error) { if targetScore == 0 { block.Nonce = 0 diff --git a/packages/metrics/chain.go b/packages/metrics/chain.go index fb91596303..ad93a2164b 100644 --- a/packages/metrics/chain.go +++ b/packages/metrics/chain.go @@ -4,8 +4,9 @@ import ( "fmt" "time" - "github.com/iotaledger/wasp/packages/isc" "github.com/prometheus/client_golang/prometheus" + + "github.com/iotaledger/wasp/packages/isc" ) type StateManagerMetrics interface { diff --git a/packages/metrics/metrics.go b/packages/metrics/metrics.go index 7b4123424a..f31ecc5efd 100644 --- a/packages/metrics/metrics.go +++ b/packages/metrics/metrics.go @@ -6,13 +6,14 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/isc" + "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" ) const ReadHeaderTimeout = time.Millisecond * 500 diff --git a/packages/metrics/nodeconnmetrics/message_simple.go b/packages/metrics/nodeconnmetrics/message_simple.go index c8a89c1559..3fdeb047f3 100644 --- a/packages/metrics/nodeconnmetrics/message_simple.go +++ b/packages/metrics/nodeconnmetrics/message_simple.go @@ -3,9 +3,10 @@ package nodeconnmetrics import ( "time" - "github.com/iotaledger/wasp/packages/isc" "github.com/prometheus/client_golang/prometheus" "go.uber.org/atomic" + + "github.com/iotaledger/wasp/packages/isc" ) type nodeConnectionMessageSimpleMetrics struct { diff --git a/packages/metrics/nodeconnmetrics/metrics.go b/packages/metrics/nodeconnmetrics/metrics.go index e093abf0db..0c2ea9542a 100644 --- a/packages/metrics/nodeconnmetrics/metrics.go +++ b/packages/metrics/nodeconnmetrics/metrics.go @@ -1,9 +1,10 @@ package nodeconnmetrics import ( - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/isc" "github.com/prometheus/client_golang/prometheus" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/isc" ) type nodeConnectionMetricsImpl struct { diff --git a/packages/metrics/nodeconnmetrics/metrics_test.go b/packages/metrics/nodeconnmetrics/metrics_test.go index 21b77ddd32..f91bb59a5b 100644 --- a/packages/metrics/nodeconnmetrics/metrics_test.go +++ b/packages/metrics/nodeconnmetrics/metrics_test.go @@ -6,9 +6,10 @@ package nodeconnmetrics import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestRegister(t *testing.T) { diff --git a/packages/metrics/nodeconnmetrics/util.go b/packages/metrics/nodeconnmetrics/util.go index f98a5621da..e2c6a1877f 100644 --- a/packages/metrics/nodeconnmetrics/util.go +++ b/packages/metrics/nodeconnmetrics/util.go @@ -1,8 +1,9 @@ package nodeconnmetrics import ( - "github.com/iotaledger/wasp/packages/isc" "github.com/prometheus/client_golang/prometheus" + + "github.com/iotaledger/wasp/packages/isc" ) const ( diff --git a/packages/nodeconn/nc_chain.go b/packages/nodeconn/nc_chain.go index 40860eafed..e490e19c5b 100644 --- a/packages/nodeconn/nc_chain.go +++ b/packages/nodeconn/nc_chain.go @@ -5,12 +5,15 @@ package nodeconn import ( "context" + "errors" "time" "golang.org/x/xerrors" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/hive.go/serializer/v2" + inx "github.com/iotaledger/inx/go" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/wasp/packages/chain" @@ -79,7 +82,7 @@ func (ncc *ncChain) PublishTransaction(tx *iotago.Transaction, timeout ...time.D // (e.g. another validator finished PoW and tx was confirmed) // the given context will be canceled by the pending transaction checks. blockID, err := ncc.nc.doPostTx(ctxPendingTransaction, tx) - if err != nil && !xerrors.Is(err, context.Canceled) { + if err != nil && !errors.Is(err, context.Canceled) { return err } @@ -97,21 +100,40 @@ func (ncc *ncChain) PublishTransaction(tx *iotago.Transaction, timeout ...time.D func (ncc *ncChain) PullStateOutputByID(id iotago.OutputID) { ctxWithTimeout, cancelContext := newCtxWithTimeout(ncc.nc.ctx) + defer cancelContext() - // TODO: replace this with nodebridge.Client().ReadOutput if still needed - // MH: With this you would also apply spent outputs to the current state, is that intended? - res, err := ncc.nc.nodeClient.OutputByID(ctxWithTimeout, id) - cancelContext() + resp, err := ncc.nc.nodeBridge.Client().ReadOutput(ctxWithTimeout, inx.NewOutputId(id)) if err != nil { ncc.log.Errorf("PullOutputByID: error querying API - chainID %s OutputID %s: %s", ncc.chainID, id, err) return } - out, err := res.Output() - if err != nil { - ncc.log.Errorf("PullOutputByID: error getting output from response - chainID %s OutputID %s: %s", ncc.chainID, id, err) + + var output iotago.Output + switch resp.GetPayload().(type) { + //nolint:nosnakecase // grpc uses underscores + case *inx.OutputResponse_Output: + out, err := resp.GetOutput().UnwrapOutput(serializer.DeSeriModePerformValidation, ncc.nc.nodeBridge.ProtocolParameters()) + if err != nil { + ncc.log.Errorf("PullOutputByID: error getting output from response - chainID %s OutputID %s: %s", ncc.chainID, id, err) + return + } + output = out + + //nolint:nosnakecase // grpc uses underscores + case *inx.OutputResponse_Spent: + // MH: With this you would also apply spent outputs to the current state, is that intended? + out, err := resp.GetSpent().GetOutput().UnwrapOutput(serializer.DeSeriModePerformValidation, ncc.nc.nodeBridge.ProtocolParameters()) + if err != nil { + ncc.log.Errorf("PullOutputByID: error getting output from response - chainID %s OutputID %s: %s", ncc.chainID, id, err) + return + } + output = out + + default: + ncc.log.Errorf("PullOutputByID: error getting output from response - chainID %s OutputID %s: invalid inx.OutputResponse payload type", ncc.chainID, id) return } - ncc.stateOutputHandler(id, out) + ncc.stateOutputHandler(id, output) } func shouldBeProcessed(out iotago.Output) bool { diff --git a/packages/nodeconn/nodeconn.go b/packages/nodeconn/nodeconn.go index 160f923bc9..90dd29b718 100644 --- a/packages/nodeconn/nodeconn.go +++ b/packages/nodeconn/nodeconn.go @@ -9,16 +9,17 @@ package nodeconn import ( "context" + "errors" "sync" "time" "golang.org/x/xerrors" + "github.com/iotaledger/hive.go/core/events" hivecore "github.com/iotaledger/hive.go/core/events" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/hive.go/core/workerpool" "github.com/iotaledger/hive.go/serializer/v2" - "github.com/iotaledger/hive.go/workerpool" "github.com/iotaledger/inx-app/nodebridge" inx "github.com/iotaledger/inx/go" iotago "github.com/iotaledger/iota.go/v3" @@ -32,17 +33,14 @@ import ( ) const ( - inxTimeoutBlockMetadata = 500 * time.Millisecond - inxTimeoutSubmitBlock = 60 * time.Second - inxTimeoutPublishTransaction = 120 * time.Second - reattachWorkerPoolQueueSize = 100 + indexerPluginAvailableTimeout = 30 * time.Second + inxTimeoutInfo = 500 * time.Millisecond + inxTimeoutBlockMetadata = 500 * time.Millisecond + inxTimeoutSubmitBlock = 60 * time.Second + inxTimeoutPublishTransaction = 120 * time.Second + reattachWorkerPoolQueueSize = 100 ) -type ChainL1Config struct { - INXAddress string - UseRemotePoW bool -} - type LedgerUpdateHandler func(*nodebridge.LedgerUpdate) // nodeconn implements chain.NodeConnection. @@ -50,14 +48,12 @@ type LedgerUpdateHandler func(*nodebridge.LedgerUpdate) // we expect to have a single instance of this structure. type nodeConn struct { ctx context.Context - ctxCancel context.CancelFunc chains map[string]*ncChain // key = iotago.Address.Key() chainsLock sync.RWMutex indexerClient nodeclient.IndexerClient milestones *events.Event metrics nodeconnmetrics.NodeConnectionMetrics log *logger.Logger - config ChainL1Config nodeBridge *nodebridge.NodeBridge nodeClient *nodeclient.Client @@ -69,12 +65,12 @@ type nodeConn struct { var _ chain.NodeConnection = &nodeConn{} -func setL1ProtocolParams(info *nodeclient.InfoResponse) { +func setL1ProtocolParams(protocolParameters *iotago.ProtocolParameters, baseToken *nodeclient.InfoResBaseToken) { parameters.InitL1(¶meters.L1Params{ // There are no limits on how big from a size perspective an essence can be, so it is just derived from 32KB - Block fields without payload = max size of the payload MaxPayloadSize: parameters.MaxPayloadSize, - Protocol: &info.Protocol, - BaseToken: (*parameters.BaseToken)(info.BaseToken), + Protocol: protocolParameters, + BaseToken: (*parameters.BaseToken)(baseToken), }) } @@ -88,35 +84,28 @@ func newCtxWithTimeout(ctx context.Context, timeout ...time.Duration) (context.C return context.WithTimeout(ctx, t) } -func New(config ChainL1Config, log *logger.Logger, timeout ...time.Duration) chain.NodeConnection { - ctx, ctxCancel := context.WithCancel(context.Background()) - - ctxWithTimeout, cancelContext := newCtxWithTimeout(ctx, timeout...) - defer cancelContext() - - nb, err := nodebridge.NewNodeBridge(ctxWithTimeout, config.INXAddress, log.Named("NodeBridge")) - if err != nil { - panic(err) - } +func New(ctx context.Context, log *logger.Logger, nodeBridge *nodebridge.NodeBridge) chain.NodeConnection { + inxNodeClient := nodeBridge.INXNodeClient() - go nb.Run(context.Background()) - inxNodeClient := nb.INXNodeClient() + ctxInfo, cancelInfo := context.WithTimeout(ctx, inxTimeoutInfo) + defer cancelInfo() - nodeInfo, err := inxNodeClient.Info(ctxWithTimeout) + nodeInfo, err := inxNodeClient.Info(ctxInfo) if err != nil { panic(xerrors.Errorf("error getting node info: %w", err)) } + setL1ProtocolParams(nodeBridge.ProtocolParameters(), nodeInfo.BaseToken) - setL1ProtocolParams(nodeInfo) + ctxIndexer, cancelIndexer := context.WithTimeout(ctx, indexerPluginAvailableTimeout) + defer cancelIndexer() - indexerClient, err := inxNodeClient.Indexer(ctxWithTimeout) + indexerClient, err := nodeBridge.Indexer(ctxIndexer) if err != nil { panic(xerrors.Errorf("failed to get nodeclient indexer: %v", err)) } nc := nodeConn{ ctx: ctx, - ctxCancel: ctxCancel, chains: make(map[string]*ncChain), chainsLock: sync.RWMutex{}, indexerClient: indexerClient, @@ -125,8 +114,7 @@ func New(config ChainL1Config, log *logger.Logger, timeout ...time.Duration) cha }), metrics: nodeconnmetrics.NewEmptyNodeConnectionMetrics(), log: log.Named("nc"), - config: config, - nodeBridge: nb, + nodeBridge: nodeBridge, nodeClient: inxNodeClient, pendingTransactionsMap: make(map[iotago.TransactionID]*PendingTransaction), pendingTransactionsLock: sync.Mutex{}, @@ -329,7 +317,7 @@ func (nc *nodeConn) AttachTxInclusionStateEvents(chainID *isc.ChainID, handler c } closure := events.NewClosure(handler) - ncc.inclusionStates.Attach(closure) + ncc.inclusionStates.Hook(closure) return closure, nil } @@ -346,7 +334,7 @@ func (nc *nodeConn) DetachTxInclusionStateEvents(chainID *isc.ChainID, closure * // AttachMilestones implements chain.NodeConnection. func (nc *nodeConn) AttachMilestones(handler chain.NodeConnectionMilestonesHandlerFun) *events.Closure { closure := events.NewClosure(handler) - nc.milestones.Attach(closure) + nc.milestones.Hook(closure) return closure } @@ -355,10 +343,6 @@ func (nc *nodeConn) DetachMilestones(attachID *events.Closure) { nc.milestones.Detach(attachID) } -func (nc *nodeConn) Close() { - nc.ctxCancel() -} - func (nc *nodeConn) PullLatestOutput(chainID *isc.ChainID) { ncc := nc.chains[chainID.Key()] if ncc == nil { @@ -397,7 +381,7 @@ func (nc *nodeConn) doPostTx(ctx context.Context, tx *iotago.Transaction) (iotag blockID, err := nc.nodeBridge.SubmitBlock(ctx, block) if err != nil { - if xerrors.Is(ctx.Err(), context.Canceled) { + if errors.Is(ctx.Err(), context.Canceled) { // context was canceled return iotago.EmptyBlockID(), ctx.Err() } diff --git a/packages/parameters/parameters.go b/packages/parameters/parameters.go deleted file mode 100644 index fb6586a5fd..0000000000 --- a/packages/parameters/parameters.go +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2020 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -package parameters - -import ( - "reflect" - "unsafe" - - "github.com/iotaledger/hive.go/configuration" - "github.com/knadh/koanf" - flag "github.com/spf13/pflag" -) - -var all *configuration.Configuration - -const ( - UserList = "users" - NodeOwnerAddresses = "node.ownerAddresses" - - LoggerLevel = "logger.level" - LoggerDisableCaller = "logger.disableCaller" - LoggerDisableStacktrace = "logger.disableStacktrace" - LoggerEncoding = "logger.encoding" - LoggerOutputPaths = "logger.outputPaths" - LoggerDisableEvents = "logger.disableEvents" - - DatabaseDir = "database.directory" - DatabaseInMemory = "database.inMemory" - - WebAPIBindAddress = "webapi.bindAddress" - WebAPIAdminWhitelist = "webapi.adminWhitelist" - WebAPIAdminWhitelistDisabled = "webapi.adminWhitelistDisabled" - WebAPIAuth = "webapi.auth" - - DashboardBindAddress = "dashboard.bindAddress" - DashboardExploreAddressURL = "dashboard.exploreAddressUrl" - DashboardAuth = "dashboard.auth" - - L1INXAddress = "l1.inxAddress" - - PeeringMyNetID = "peering.netid" - PeeringPort = "peering.port" - PullMissingRequestsFromCommittee = "peering.pullMissingRequests" - - NanomsgPublisherPort = "nanomsg.port" - - IpfsGatewayAddress = "ipfs.gatewayAddress" - - OffledgerBroadcastUpToNPeers = "offledger.broadcastUpToNPeers" - OffledgerBroadcastInterval = "offledger.broadcastInterval" - OffledgerAPICacheTTL = "offledger.apiCacheTTL" - - ProfilingBindAddress = "profiling.bindAddress" - ProfilingEnabled = "profiling.enabled" - ProfilingWriteProfiles = "profiling.writeProfiles" - - MetricsBindAddress = "metrics.bindAddress" - MetricsEnabled = "metrics.enabled" - - WALEnabled = "wal.enabled" - WALDirectory = "wal.directory" - - RawBlocksEnabled = "debug.rawblocksEnabled" - RawBlocksDir = "debug.rawblocksDirectory" - RegistryUseText = "registry.useText" - RegistryFile = "registry.file" -) - -func Init() *configuration.Configuration { - // set the default logger config - all = configuration.New() - - flag.StringSlice(NodeOwnerAddresses, []string{}, "A list of node owner addresses.") - - flag.String(LoggerLevel, "info", "log level") - flag.Bool(LoggerDisableCaller, false, "disable caller info in log") - flag.Bool(LoggerDisableStacktrace, false, "disable stack trace in log") - flag.String(LoggerEncoding, "console", "log encoding") - flag.StringSlice(LoggerOutputPaths, []string{"stdout", "goshimmer.log"}, "log output paths") - flag.Bool(LoggerDisableEvents, true, "disable logger events") - - flag.String(DatabaseDir, "waspdb", "path to the database folder") - flag.Bool(DatabaseInMemory, false, "whether the database is only kept in memory and not persisted") - - flag.String(WebAPIBindAddress, "127.0.0.1:8080", "the bind address for the web API") - flag.StringSlice(WebAPIAdminWhitelist, []string{}, "IP whitelist for /adm wndpoints") - flag.StringToString(WebAPIAuth, nil, "authentication scheme for web API") - flag.Bool(WebAPIAdminWhitelistDisabled, false, "Disables IP whitelisting and allows requests from _any_ IP") - - flag.String(DashboardBindAddress, "127.0.0.1:7000", "the bind address for the node dashboard") - flag.String(DashboardExploreAddressURL, "", "URL to add as href to addresses in the dashboard [default: :8081/explorer/address]") - flag.StringToString(DashboardAuth, nil, "authentication scheme for the node dashboard") - - flag.Int(PeeringPort, 4000, "port for Wasp committee connection/peering") - flag.String(PeeringMyNetID, "127.0.0.1:4000", "node host address as it is recognized by other peers") - - flag.Bool(PullMissingRequestsFromCommittee, true, "whether or not to pull missing requests from other committee members") - - flag.Int(NanomsgPublisherPort, 5550, "the port for nanomsg even publisher") - - flag.String(IpfsGatewayAddress, "https://ipfs.io/", "the address of HTTP(s) gateway to which download from ipfs requests will be forwarded") - - flag.Int(OffledgerBroadcastUpToNPeers, 2, "number of peers an offledger request is broadcasted to") - flag.Int(OffledgerBroadcastInterval, 5000, "time between re-broadcast of offledger requests (in ms)") - flag.Int(OffledgerAPICacheTTL, 5*60, "time to keep processed offledger requests in api cache (in seconds)") - - flag.String(ProfilingBindAddress, "127.0.0.1:6060", "pprof http server address") - flag.Bool(ProfilingEnabled, false, "whether profiling is enabled") - flag.Bool(ProfilingWriteProfiles, false, "whether to write profiling profiles to disk on node shutdown (when enabled some metrics will be unavailable via pprof runtime endpoint)") - - flag.String(MetricsBindAddress, "127.0.0.1:2112", "prometheus metrics http server address") - flag.Bool(MetricsEnabled, false, "disable and enable prometheus metrics") - - flag.Bool(WALEnabled, true, "enabled wal") - flag.String(WALDirectory, "wal", "path to logs folder") - - flag.Bool(RawBlocksEnabled, false, "enable raw blocks to be written to disk on a separate dir") - flag.String(RawBlocksDir, "blocks", "path to the directory where the blocks should be written to") - flag.Bool(RegistryUseText, false, "enable text key/value store for registry db.") - flag.String(RegistryFile, "chain-registry.json", "registry filename. Ignored if registry.useText is false.") - - return all -} - -func IsLoaded() bool { - return all != nil -} - -func GetBool(name string) bool { - return all.Bool(name) -} - -func GetString(name string) string { - return all.String(name) -} - -func GetStringSlice(name string) []string { - return all.Strings(name) -} - -func GetInt(name string) int { - return all.Int(name) -} - -func GetStringToString(name string) map[string]string { - return all.StringMap(name) -} - -func GetStruct(path string, object interface{}) error { - return all.Unmarshal(path, object) -} - -func GetStructWithConf(path string, object interface{}, uc koanf.UnmarshalConf) error { - return all.UnmarshalWithConf(path, object, uc) -} - -func Dump() map[string]interface{} { - // hack to access private member Node.config - rf := reflect.ValueOf(all).Elem().FieldByName("config") - rf = reflect.NewAt(rf.Type(), unsafe.Pointer(rf.UnsafeAddr())).Elem() - tree := rf.Interface().(*koanf.Koanf).Raw() - - m := map[string]interface{}{} - flatten(m, tree, "") - - return m -} - -func flatten(dst, src map[string]interface{}, path string) { - for k, v := range src { - switch vt := v.(type) { - case map[string]interface{}: - flatten(dst, vt, path+k+".") - default: - dst[path+k] = v - } - } -} diff --git a/packages/peering/domain/domain.go b/packages/peering/domain/domain.go index 0585bc30e5..7f85d76ee0 100644 --- a/packages/peering/domain/domain.go +++ b/packages/peering/domain/domain.go @@ -6,7 +6,7 @@ package domain import ( "sync" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/util" diff --git a/packages/peering/domain/domain_test.go b/packages/peering/domain/domain_test.go index 6afc99ae83..43e4352e9f 100644 --- a/packages/peering/domain/domain_test.go +++ b/packages/peering/domain/domain_test.go @@ -8,11 +8,12 @@ import ( "sync" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" ) func TestDomainProvider(t *testing.T) { diff --git a/packages/peering/group/group.go b/packages/peering/group/group.go index 050a515b8d..6766eecce3 100644 --- a/packages/peering/group/group.go +++ b/packages/peering/group/group.go @@ -9,10 +9,11 @@ import ( "fmt" "time" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" - "golang.org/x/xerrors" ) const NotInGroup uint16 = 0xFFFF @@ -104,6 +105,8 @@ func (g *groupImpl) SendMsgBroadcast(msgReceiver, msgType byte, msgData []byte, // ExchangeRound sends a message to the specified set of peers and waits for acks. // Resends the messages if acks are not received for some time. +// +//nolint:gocyclo func (g *groupImpl) ExchangeRound( peers map[uint16]peering.PeerSender, recvCh chan *peering.PeerMessageIn, diff --git a/packages/peering/group/group_test.go b/packages/peering/group/group_test.go index f58d1f457f..0e335960fd 100644 --- a/packages/peering/group/group_test.go +++ b/packages/peering/group/group_test.go @@ -7,11 +7,12 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" - "github.com/stretchr/testify/require" ) func TestGroupProvider(t *testing.T) { diff --git a/packages/peering/lpp/lppNetImpl.go b/packages/peering/lpp/lppNetImpl.go index 6f1e8bdeb2..2ba9c2e762 100644 --- a/packages/peering/lpp/lppNetImpl.go +++ b/packages/peering/lpp/lppNetImpl.go @@ -26,14 +26,7 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/wasp/packages/peering" - "github.com/iotaledger/wasp/packages/peering/domain" - "github.com/iotaledger/wasp/packages/peering/group" - "github.com/iotaledger/wasp/packages/util" - libp2p "github.com/libp2p/go-libp2p" + "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" @@ -44,6 +37,14 @@ import ( "github.com/libp2p/go-libp2p/p2p/transport/tcp" "github.com/multiformats/go-multiaddr" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/cryptolib" + "github.com/iotaledger/wasp/packages/peering" + "github.com/iotaledger/wasp/packages/peering/domain" + "github.com/iotaledger/wasp/packages/peering/group" + "github.com/iotaledger/wasp/packages/util" ) const ( @@ -362,7 +363,7 @@ func (n *netImpl) Attach(peeringID *peering.PeeringID, receiver byte, callback f callback(recv) } }) - n.recvEvents.Attach(closure) + n.recvEvents.Hook(closure) return closure } diff --git a/packages/peering/lpp/lppNetImpl_test.go b/packages/peering/lpp/lppNetImpl_test.go index de32f1d0ac..8fe4b683ea 100644 --- a/packages/peering/lpp/lppNetImpl_test.go +++ b/packages/peering/lpp/lppNetImpl_test.go @@ -8,12 +8,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/peering/lpp" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestLPPPeeringImpl(t *testing.T) { diff --git a/packages/peering/lpp/lppPeer.go b/packages/peering/lpp/lppPeer.go index 568f7c721b..39fe13fd58 100644 --- a/packages/peering/lpp/lppPeer.go +++ b/packages/peering/lpp/lppPeer.go @@ -7,12 +7,13 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" + libp2ppeer "github.com/libp2p/go-libp2p/core/peer" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/util/pipe" - libp2ppeer "github.com/libp2p/go-libp2p/core/peer" - "golang.org/x/xerrors" ) const ( diff --git a/packages/peering/peering.go b/packages/peering/peering.go index f7dad9e138..c74fc520b5 100644 --- a/packages/peering/peering.go +++ b/packages/peering/peering.go @@ -15,8 +15,9 @@ import ( "strings" "time" - "github.com/iotaledger/wasp/packages/cryptolib" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/cryptolib" ) const ( diff --git a/packages/peering/peering_id.go b/packages/peering/peering_id.go index 3ca3e95e40..b34797ee00 100644 --- a/packages/peering/peering_id.go +++ b/packages/peering/peering_id.go @@ -13,9 +13,10 @@ import ( "io" "math/rand" - iotago "github.com/iotaledger/iota.go/v3" "github.com/mr-tron/base58" "golang.org/x/xerrors" + + iotago "github.com/iotaledger/iota.go/v3" ) // PeeringID is relates peers in different nodes for a particular diff --git a/packages/peering/peering_test.go b/packages/peering/peering_test.go index cbe56aeaf9..6edd7b6ef8 100644 --- a/packages/peering/peering_test.go +++ b/packages/peering/peering_test.go @@ -4,8 +4,9 @@ import ( "bytes" "testing" - "github.com/iotaledger/wasp/packages/peering" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/peering" ) func TestPeerMessageCodec(t *testing.T) { diff --git a/packages/publisher/publisher.go b/packages/publisher/publisher.go index 91eb93d118..0c187c484c 100644 --- a/packages/publisher/publisher.go +++ b/packages/publisher/publisher.go @@ -1,7 +1,7 @@ package publisher import ( - "github.com/iotaledger/hive.go/events" + "github.com/iotaledger/hive.go/core/events" ) var Event = events.NewEvent(func(handler interface{}, params ...interface{}) { diff --git a/packages/publisher/publisherws/publisherws.go b/packages/publisher/publisherws/publisherws.go index 52c45219c5..385d625157 100644 --- a/packages/publisher/publisherws/publisherws.go +++ b/packages/publisher/publisherws/publisherws.go @@ -7,11 +7,12 @@ import ( "net/http" "strings" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "nhooyr.io/websocket" + + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/publisher" - "nhooyr.io/websocket" ) type PublisherWebSocket struct { @@ -63,7 +64,7 @@ func (p *PublisherWebSocket) ServeHTTP(chainID *isc.ChainID, w http.ResponseWrit p.log.Warnf("dropping websocket message for %s", r.RemoteAddr) } }) - publisher.Event.Attach(cl) + publisher.Event.Hook(cl) defer publisher.Event.Detach(cl) for { diff --git a/packages/registry/chainrecord.go b/packages/registry/chainrecord.go index 4d2c6bb835..bd75dc288e 100644 --- a/packages/registry/chainrecord.go +++ b/packages/registry/chainrecord.go @@ -7,7 +7,7 @@ import ( "encoding/json" "fmt" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/isc" ) diff --git a/packages/registry/chainrecord_test.go b/packages/registry/chainrecord_test.go index 7893d1cf6a..8a8fac4827 100644 --- a/packages/registry/chainrecord_test.go +++ b/packages/registry/chainrecord_test.go @@ -6,8 +6,9 @@ package registry import ( "testing" - "github.com/iotaledger/wasp/packages/isc" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/isc" ) func TestChainRecord(t *testing.T) { diff --git a/packages/registry/journal_registry.go b/packages/registry/journal_registry.go index 4a71a9777d..49ccf99c4b 100644 --- a/packages/registry/journal_registry.go +++ b/packages/registry/journal_registry.go @@ -9,10 +9,11 @@ import ( "encoding/binary" "errors" - "github.com/iotaledger/hive.go/kvstore" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/wasp/packages/chain/consensus/journal" "github.com/iotaledger/wasp/packages/database/dbkeys" - "golang.org/x/xerrors" ) const ( diff --git a/packages/registry/registry_impl.go b/packages/registry/registry_impl.go index 9d021ea5ef..47c12eb76b 100644 --- a/packages/registry/registry_impl.go +++ b/packages/registry/registry_impl.go @@ -12,8 +12,8 @@ import ( "github.com/iotaledger/wasp/packages/chain/consensus/journal" "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/database/dbkeys" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/registry/trustedpeer_test.go b/packages/registry/trustedpeer_test.go index 642549fa56..9a93436f70 100644 --- a/packages/registry/trustedpeer_test.go +++ b/packages/registry/trustedpeer_test.go @@ -3,10 +3,11 @@ package registry import ( "testing" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestTrustedPeer(t *testing.T) { diff --git a/packages/snapshot/snapshot.go b/packages/snapshot/snapshot.go index 6222af955b..d367463886 100644 --- a/packages/snapshot/snapshot.go +++ b/packages/snapshot/snapshot.go @@ -6,13 +6,14 @@ import ( "path" "time" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) type ConsoleReportParams struct { diff --git a/packages/snapshot/snapshot_test.go b/packages/snapshot/snapshot_test.go index 22b6dca957..6e90079302 100644 --- a/packages/snapshot/snapshot_test.go +++ b/packages/snapshot/snapshot_test.go @@ -5,14 +5,15 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/kvtest" "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/testutil/testmisc" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/require" ) func Test1(t *testing.T) { diff --git a/packages/solo/chain.go b/packages/solo/chain.go index 43c91262e0..9e3e7d2870 100644 --- a/packages/solo/chain.go +++ b/packages/solo/chain.go @@ -9,6 +9,8 @@ import ( "math" "os" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/cryptolib" @@ -28,7 +30,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/gas" "github.com/iotaledger/wasp/packages/vm/vmtypes" - "github.com/stretchr/testify/require" ) // String is string representation for main parameters of the chain diff --git a/packages/solo/check.go b/packages/solo/check.go index 7da8707782..1558869dc0 100644 --- a/packages/solo/check.go +++ b/packages/solo/check.go @@ -6,6 +6,8 @@ package solo import ( "bytes" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/util" @@ -14,7 +16,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/stretchr/testify/require" ) func (ch *Chain) AssertL2NativeTokens(agentID isc.AgentID, tokenID *iotago.NativeTokenID, bal interface{}) { diff --git a/packages/solo/evm.go b/packages/solo/evm.go index 27a3ebf79b..b850e5175b 100644 --- a/packages/solo/evm.go +++ b/packages/solo/evm.go @@ -7,6 +7,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/jsonrpc" "github.com/iotaledger/wasp/packages/isc" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/evm" - "github.com/stretchr/testify/require" ) type jsonRPCSoloBackend struct { diff --git a/packages/solo/ledgerl1l2.go b/packages/solo/ledgerl1l2.go index 712f9c2c1a..e4c79010f2 100644 --- a/packages/solo/ledgerl1l2.go +++ b/packages/solo/ledgerl1l2.go @@ -6,6 +6,8 @@ import ( "math/big" "sort" + "github.com/stretchr/testify/require" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" @@ -16,7 +18,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/kvdecoder" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/accounts" - "github.com/stretchr/testify/require" ) // L2Accounts returns all accounts on the chain with non-zero balances @@ -175,7 +176,7 @@ const ( TransferAllowanceToGasBudgetBaseTokens = 1 * isc.Million ) -func (ch *Chain) NewFoundryParams(maxSupply interface{}) *foundryParams { // nolint:revive +func (ch *Chain) NewFoundryParams(maxSupply interface{}) *foundryParams { //nolint:revive ret := &foundryParams{ ch: ch, sch: &iotago.SimpleTokenScheme{ diff --git a/packages/solo/req.go b/packages/solo/req.go index 38c12dc5bc..d5fc029c35 100644 --- a/packages/solo/req.go +++ b/packages/solo/req.go @@ -8,6 +8,9 @@ import ( "math" "time" + "github.com/stretchr/testify/require" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/trie.go/models/trie_blake2b" "github.com/iotaledger/trie.go/trie" @@ -23,8 +26,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/errors" "github.com/iotaledger/wasp/packages/vm/viewcontext" - "github.com/stretchr/testify/require" - "golang.org/x/xerrors" ) type CallParams struct { @@ -364,41 +365,6 @@ func (ch *Chain) LastReceipt() *isc.Receipt { return blocklogReceipt.ToISCReceipt(ch.ResolveVMError(blocklogReceipt.Error)) } -func (ch *Chain) checkCanAffordFee(fee uint64, req *CallParams, keyPair *cryptolib.KeyPair) error { - if keyPair == nil { - keyPair = ch.OriginatorPrivateKey - } - agentID := isc.NewAgentID(keyPair.GetPublicKey().AsEd25519Address()) - policy := ch.GetGasFeePolicy() - available := uint64(0) - if policy.GasFeeTokenID == nil { - available = ch.L2BaseTokens(agentID) - if req.ftokens != nil { - available += req.ftokens.BaseTokens - } - if req.allowance != nil { - available -= req.allowance.Assets.BaseTokens - } - } else { - n := ch.L2NativeTokens(agentID, policy.GasFeeTokenID) - if req.ftokens != nil { - n.Add(n, req.ftokens.AmountNativeToken(policy.GasFeeTokenID)) - } - if req.allowance != nil { - n.Sub(n, req.allowance.Assets.AmountNativeToken(policy.GasFeeTokenID)) - } - if n.IsUint64() { - available = n.Uint64() - } else { - available = math.MaxUint64 - } - } - if available < fee { - return fmt.Errorf("sender's available tokens on L2 (%d) is less than the %d required", available, fee) - } - return nil -} - func (ch *Chain) PostRequestSyncExt(req *CallParams, keyPair *cryptolib.KeyPair) (*iotago.Transaction, *blocklog.RequestReceipt, dict.Dict, error) { defer ch.logRequestLastBlock() diff --git a/packages/solo/run.go b/packages/solo/run.go index 4be63d1f2a..7dcccff711 100644 --- a/packages/solo/run.go +++ b/packages/solo/run.go @@ -10,7 +10,10 @@ import ( "strings" "time" - "github.com/iotaledger/hive.go/identity" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + + "github.com/iotaledger/hive.go/core/identity" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/hashing" @@ -20,8 +23,6 @@ import ( "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/packages/vm" - "github.com/stretchr/testify/require" - "go.uber.org/zap" ) func (ch *Chain) RunOffLedgerRequest(r isc.Request) (dict.Dict, error) { diff --git a/packages/solo/solo.go b/packages/solo/solo.go index 84263b6d5f..3ba5b5e68a 100644 --- a/packages/solo/solo.go +++ b/packages/solo/solo.go @@ -10,8 +10,11 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/chain" @@ -38,8 +41,6 @@ import ( _ "github.com/iotaledger/wasp/packages/vm/sandbox" "github.com/iotaledger/wasp/packages/vm/vmtypes" "github.com/iotaledger/wasp/packages/wasmvm/wasmhost" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" ) const ( @@ -160,7 +161,7 @@ func New(t TestContext, initOptions ...*InitOptions) *Solo { ret := &Solo{ T: t, logger: opt.Log, - dbmanager: dbmanager.NewDBManager(opt.Log.Named("db"), true, registry.DefaultConfig()), + dbmanager: dbmanager.NewDBManager(opt.Log.Named("db"), true, "", registry.DefaultConfig()), utxoDB: utxodb.New(utxoDBinitParams), chains: make(map[isc.ChainID]*Chain), processorConfig: coreprocessors.Config(), @@ -176,7 +177,7 @@ func New(t TestContext, initOptions ...*InitOptions) *Solo { }) require.NoError(t, err) - publisher.Event.Attach(events.NewClosure(func(msgType string, parts []string) { + publisher.Event.Hook(events.NewClosure(func(msgType string, parts []string) { ret.logger.Infof("solo publisher: %s %v", msgType, parts) })) diff --git a/packages/solo/solobench/solobench.go b/packages/solo/solobench/solobench.go index a993323051..1e3dbdc279 100644 --- a/packages/solo/solobench/solobench.go +++ b/packages/solo/solobench/solobench.go @@ -5,10 +5,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/solo" - "github.com/stretchr/testify/require" ) type Func func(b *testing.B, chain *solo.Chain, reqs []*solo.CallParams, keyPair *cryptolib.KeyPair) diff --git a/packages/solo/solofun.go b/packages/solo/solofun.go index bab43f192f..8f2ef7512c 100644 --- a/packages/solo/solofun.go +++ b/packages/solo/solofun.go @@ -1,13 +1,14 @@ package solo import ( + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/testutil/testkey" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/utxodb" - "github.com/stretchr/testify/require" ) func (env *Solo) NewKeyPairFromIndex(index int) *cryptolib.KeyPair { diff --git a/packages/state/block.go b/packages/state/block.go index d74c82bdf6..8ec0535f96 100644 --- a/packages/state/block.go +++ b/packages/state/block.go @@ -6,12 +6,13 @@ import ( "io" "time" + "golang.org/x/xerrors" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/buffered" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) type blockImpl struct { diff --git a/packages/state/block_test.go b/packages/state/block_test.go index 555631a191..f94af8a50e 100644 --- a/packages/state/block_test.go +++ b/packages/state/block_test.go @@ -4,10 +4,11 @@ import ( "testing" "time" - "github.com/iotaledger/iota.go/v3/tpkg" - "github.com/iotaledger/wasp/packages/util" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/iotaledger/iota.go/v3/tpkg" + "github.com/iotaledger/wasp/packages/util" ) func TestBlockBasic(t *testing.T) { diff --git a/packages/state/commitment_model.go b/packages/state/commitment_model.go index 197e70de72..48d2e3966e 100644 --- a/packages/state/commitment_model.go +++ b/packages/state/commitment_model.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/trie.go/hive_adaptor" "github.com/iotaledger/trie.go/models/trie_blake2b" "github.com/iotaledger/trie.go/models/trie_blake2b/trie_blake2b_verify" diff --git a/packages/state/l1commitment.go b/packages/state/l1commitment.go index 7912e1f39d..1a6ac12bf1 100644 --- a/packages/state/l1commitment.go +++ b/packages/state/l1commitment.go @@ -7,11 +7,12 @@ import ( "io" "math/rand" + "golang.org/x/crypto/blake2b" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/crypto/blake2b" - "golang.org/x/xerrors" ) const BlockHashSize = 20 diff --git a/packages/state/loadsave.go b/packages/state/loadsave.go index b39cf6592b..5d227304c4 100644 --- a/packages/state/loadsave.go +++ b/packages/state/loadsave.go @@ -7,8 +7,8 @@ import ( "os" "path" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/database/dbkeys" "github.com/iotaledger/wasp/packages/hashing" diff --git a/packages/state/mostate.go b/packages/state/mostate.go index 8b10e6a851..a1d33431ef 100644 --- a/packages/state/mostate.go +++ b/packages/state/mostate.go @@ -96,7 +96,8 @@ func (s *mustOptimisticVirtualStateAccess) OptimisticStateReader(glb coreutil.Ch s.baseline.MustValidate() defer s.baseline.MustValidate() - return s.OptimisticStateReader(glb) + panic("FIXME, infinite loop") + // return s.OptimisticStateReader(glb) } func (s *mustOptimisticVirtualStateAccess) ApplyStateUpdate(upd Update) { diff --git a/packages/state/oreader.go b/packages/state/oreader.go index 971016a88a..07077833a5 100644 --- a/packages/state/oreader.go +++ b/packages/state/oreader.go @@ -3,7 +3,7 @@ package state import ( "time" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/database/dbkeys" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/state/state.go b/packages/state/state.go index a98b0e7a92..54409e5919 100644 --- a/packages/state/state.go +++ b/packages/state/state.go @@ -7,8 +7,10 @@ import ( "fmt" "time" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/database/dbkeys" "github.com/iotaledger/wasp/packages/isc" @@ -16,7 +18,6 @@ import ( "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/buffered" "github.com/iotaledger/wasp/packages/kv/codec" - "golang.org/x/xerrors" ) // region VirtualStateAccess ///////////////////////////////////////////////// diff --git a/packages/state/state_determinism_test.go b/packages/state/state_determinism_test.go index 4500d0da6d..7533d3cc76 100644 --- a/packages/state/state_determinism_test.go +++ b/packages/state/state_determinism_test.go @@ -11,14 +11,15 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore" + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/testutil/testmisc" - "github.com/stretchr/testify/require" ) func genRnd4() []string { diff --git a/packages/state/state_test.go b/packages/state/state_test.go index 5656ae5127..166c84936c 100644 --- a/packages/state/state_test.go +++ b/packages/state/state_test.go @@ -4,7 +4,9 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/trie.go/trie" "github.com/iotaledger/wasp/packages/isc" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/testutil/testmisc" - "github.com/stretchr/testify/require" ) func TestOriginHashes(t *testing.T) { diff --git a/packages/state/stateupdate.go b/packages/state/stateupdate.go index 37e89374d9..f62250d71d 100644 --- a/packages/state/stateupdate.go +++ b/packages/state/stateupdate.go @@ -6,11 +6,12 @@ import ( "io" "time" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/buffered" "github.com/iotaledger/wasp/packages/kv/codec" - "golang.org/x/xerrors" ) // stateUpdateImpl implement Update interface diff --git a/packages/tcrypto/dkshare.go b/packages/tcrypto/dkshare.go index be67d443c6..b2e651e94c 100644 --- a/packages/tcrypto/dkshare.go +++ b/packages/tcrypto/dkshare.go @@ -9,11 +9,6 @@ import ( "bytes" "io" - "github.com/iotaledger/hive.go/crypto/bls" - "github.com/iotaledger/hive.go/serializer/v2" - iotago "github.com/iotaledger/iota.go/v3" - "github.com/iotaledger/wasp/packages/cryptolib" - "github.com/iotaledger/wasp/packages/util" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/sign/bdn" @@ -23,6 +18,12 @@ import ( "go.dedis.ch/kyber/v3/sign/tbls" "go.dedis.ch/kyber/v3/suites" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/crypto/bls" + "github.com/iotaledger/hive.go/serializer/v2" + iotago "github.com/iotaledger/iota.go/v3" + "github.com/iotaledger/wasp/packages/cryptolib" + "github.com/iotaledger/wasp/packages/util" ) // secretShare is an implementation for dss.DistKeyShare. @@ -169,6 +170,8 @@ func (s *dkShareImpl) Bytes() []byte { } // Write returns byte representation of this struct. +// +//nolint:gocyclo func (s *dkShareImpl) Write(w io.Writer) error { var err error // diff --git a/packages/tcrypto/dkshare_test.go b/packages/tcrypto/dkshare_test.go index e37be0954a..4584407d67 100644 --- a/packages/tcrypto/dkshare_test.go +++ b/packages/tcrypto/dkshare_test.go @@ -6,12 +6,13 @@ package tcrypto import ( "testing" - "github.com/iotaledger/wasp/packages/cryptolib" "github.com/stretchr/testify/require" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/pairing/bn256" "go.dedis.ch/kyber/v3/suites" "go.dedis.ch/kyber/v3/util/random" + + "github.com/iotaledger/wasp/packages/cryptolib" ) func TestMarshaling(t *testing.T) { diff --git a/packages/tcrypto/interface.go b/packages/tcrypto/interface.go index 635cf8e78c..e0ddf1af1f 100644 --- a/packages/tcrypto/interface.go +++ b/packages/tcrypto/interface.go @@ -4,13 +4,14 @@ package tcrypto import ( - "github.com/iotaledger/hive.go/crypto/bls" - iotago "github.com/iotaledger/iota.go/v3" - "github.com/iotaledger/wasp/packages/cryptolib" "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/share" "go.dedis.ch/kyber/v3/sign/dss" "go.dedis.ch/kyber/v3/sign/tbls" + + "github.com/iotaledger/hive.go/core/crypto/bls" + iotago "github.com/iotaledger/iota.go/v3" + "github.com/iotaledger/wasp/packages/cryptolib" ) type SecretShare interface { diff --git a/packages/testutil/peeringNetBehaviour.go b/packages/testutil/peeringNetBehaviour.go index 568f3fa3d4..a9cdee42e4 100644 --- a/packages/testutil/peeringNetBehaviour.go +++ b/packages/testutil/peeringNetBehaviour.go @@ -11,7 +11,7 @@ import ( "math/rand" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" ) diff --git a/packages/testutil/peeringNetBehaviourDynamic.go b/packages/testutil/peeringNetBehaviourDynamic.go index c154e2f5ac..a59fd7518f 100644 --- a/packages/testutil/peeringNetBehaviourDynamic.go +++ b/packages/testutil/peeringNetBehaviourDynamic.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" ) diff --git a/packages/testutil/peeringNetBehaviourDynamic_test.go b/packages/testutil/peeringNetBehaviourDynamic_test.go index 69fb050427..b0d40e4262 100644 --- a/packages/testutil/peeringNetBehaviourDynamic_test.go +++ b/packages/testutil/peeringNetBehaviourDynamic_test.go @@ -7,10 +7,11 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestPeeringNetDynamicReliable(t *testing.T) { diff --git a/packages/testutil/peeringNetBehaviour_test.go b/packages/testutil/peeringNetBehaviour_test.go index 89361fb622..300d6393b0 100644 --- a/packages/testutil/peeringNetBehaviour_test.go +++ b/packages/testutil/peeringNetBehaviour_test.go @@ -7,10 +7,11 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func TestPeeringNetReliable(t *testing.T) { diff --git a/packages/testutil/peeringNetworkProvider.go b/packages/testutil/peeringNetworkProvider.go index 535984ee35..ca5c26b43c 100644 --- a/packages/testutil/peeringNetworkProvider.go +++ b/packages/testutil/peeringNetworkProvider.go @@ -8,12 +8,13 @@ import ( "errors" "time" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/peering/domain" "github.com/iotaledger/wasp/packages/peering/group" - "golang.org/x/xerrors" ) // PeeringNetwork represents a global view of the mocked network. diff --git a/packages/testutil/privtangle/privtangle.go b/packages/testutil/privtangle/privtangle.go index 53904077a4..2170f5718e 100644 --- a/packages/testutil/privtangle/privtangle.go +++ b/packages/testutil/privtangle/privtangle.go @@ -18,21 +18,22 @@ import ( "strings" "time" + "github.com/libp2p/go-libp2p" + "github.com/libp2p/go-libp2p/core/crypto" + "golang.org/x/xerrors" + "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/l1connection" "github.com/iotaledger/wasp/packages/testutil/privtangle/privtangledefaults" "github.com/iotaledger/wasp/packages/util" - "github.com/libp2p/go-libp2p" - "github.com/libp2p/go-libp2p/core/crypto" - "golang.org/x/xerrors" ) // requires hornet, and inx plugins binaries to be in PATH -// https://github.com/iotaledger/hornet (v2.0.0-beta.7) -// https://github.com/iotaledger/inx-indexer (v1.0.0-beta.6) -// https://github.com/iotaledger/inx-coordinator (v1.0.0-beta.6) -// https://github.com/iotaledger/inx-faucet (v1.0.0-beta.6) (requires `git submodule update --init --recursive` before building ) +// https://github.com/iotaledger/hornet (5b35e2a) +// https://github.com/iotaledger/inx-indexer (7cdb3ed) +// https://github.com/iotaledger/inx-coordinator (f84d8dd) +// https://github.com/iotaledger/inx-faucet (c847f1c) (requires `git submodule update --init --recursive` before building ) type LogFunc func(format string, args ...interface{}) @@ -78,7 +79,7 @@ func Start(ctx context.Context, baseDir string, basePort, nodeCount int, logfunc pt.generateSnapshot() for i := range pt.NodeKeyPairs { - pt.startNode(i) + pt.startNode(i) //nolint:contextcheck // false-positive time.Sleep(500 * time.Millisecond) // TODO: Remove? } pt.logf("Starting... all nodes started.") @@ -215,7 +216,6 @@ func (pt *PrivTangle) startFaucet(i int) *exec.Cmd { ), } args := []string{ - "--app.stopGracePeriod=10s", fmt.Sprintf("--inx.address=0.0.0.0:%d", pt.NodePortINX(i)), fmt.Sprintf("--faucet.bindAddress=localhost:%d", pt.NodePortFaucet(i)), } @@ -225,7 +225,7 @@ func (pt *PrivTangle) startFaucet(i int) *exec.Cmd { func (pt *PrivTangle) startIndexer(i int) *exec.Cmd { args := []string{ fmt.Sprintf("--inx.address=0.0.0.0:%d", pt.NodePortINX(i)), - fmt.Sprintf("--indexer.bindAddress=0.0.0.0:%d", pt.NodePortIndexer(i)), + fmt.Sprintf("--restAPI.bindAddress=0.0.0.0:%d", pt.NodePortIndexer(i)), } return pt.startINXPlugin(i, "inx-indexer", args, nil) } @@ -370,7 +370,7 @@ type FaucetInfoResponse struct { func (pt *PrivTangle) queryFaucetInfo() error { faucetURL := fmt.Sprintf("http://localhost:%d/api/info", pt.NodePortFaucet(0)) - httpReq, err := http.NewRequestWithContext(pt.ctx, "GET", faucetURL, http.NoBody) + httpReq, err := http.NewRequestWithContext(pt.ctx, http.MethodGet, faucetURL, http.NoBody) if err != nil { return xerrors.Errorf("unable to create request: %w", err) } @@ -384,7 +384,7 @@ func (pt *PrivTangle) queryFaucetInfo() error { return err } res.Body.Close() - if res.StatusCode != 200 { + if res.StatusCode != http.StatusOK { return fmt.Errorf("error querying faucet info endpoint: HTTP %d, %s", res.StatusCode, resBody) } var parsedResp FaucetInfoResponse diff --git a/packages/testutil/testchain/mock_acs.go b/packages/testutil/testchain/mock_acs.go index 676c8a0e16..11e84e59f1 100644 --- a/packages/testutil/testchain/mock_acs.go +++ b/packages/testutil/testchain/mock_acs.go @@ -3,8 +3,8 @@ package testchain import ( "sync" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/hive.go/core/marshalutil" ) type MockedACSRunner struct { diff --git a/packages/testutil/testchain/mock_chain_core.go b/packages/testutil/testchain/mock_chain_core.go index 9e1a7a11f4..83536dc241 100644 --- a/packages/testutil/testchain/mock_chain_core.go +++ b/packages/testutil/testchain/mock_chain_core.go @@ -6,8 +6,8 @@ package testchain import ( "testing" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/chain" @@ -86,10 +86,10 @@ func NewMockedChainCore(t *testing.T, chainID *isc.ChainID, log *logger.Logger) ret.onEventStateTransition = func(msg *chain.ChainTransitionEventData) { chain.LogStateTransition(msg.VirtualState.BlockIndex(), isc.OID(msg.ChainOutput.ID()), state.RootCommitment(msg.VirtualState.TrieNodeStore()), nil, log) } - ret.eventStateTransition.Attach(events.NewClosure(func(data *chain.ChainTransitionEventData) { + ret.eventStateTransition.Hook(events.NewClosure(func(data *chain.ChainTransitionEventData) { ret.onEventStateTransition(data) })) - ret.eventRequestProcessed.Attach(events.NewClosure(func(id isc.RequestID) { + ret.eventRequestProcessed.Hook(events.NewClosure(func(id isc.RequestID) { ret.onEventRequestProcessed(id) })) return ret diff --git a/packages/testutil/testchain/mock_ledger.go b/packages/testutil/testchain/mock_ledger.go index 0226f0a132..ac33bbfa57 100644 --- a/packages/testutil/testchain/mock_ledger.go +++ b/packages/testutil/testchain/mock_ledger.go @@ -4,8 +4,8 @@ import ( "fmt" "sync" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/chain" @@ -258,7 +258,7 @@ func (mlT *MockedLedger) AttachTxInclusionStateEvents(nodeID string, handler cha }) mlT.inclusionStateEvents[nodeID] = event } - event.Attach(closure) + event.Hook(closure) return closure, nil } diff --git a/packages/testutil/testchain/mock_ledgers.go b/packages/testutil/testchain/mock_ledgers.go index e22eb5bd3b..0a739e2db9 100644 --- a/packages/testutil/testchain/mock_ledgers.go +++ b/packages/testutil/testchain/mock_ledgers.go @@ -4,8 +4,8 @@ import ( "sync" "time" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/wasp/packages/chain" @@ -54,7 +54,7 @@ func (mlT *MockedLedgers) GetLedger(chainID *isc.ChainID) *MockedLedger { func (mlT *MockedLedgers) AttachMilestones(handler chain.NodeConnectionMilestonesHandlerFun) *events.Closure { closure := events.NewClosure(handler) - mlT.milestones.Attach(closure) + mlT.milestones.Hook(closure) return closure } diff --git a/packages/testutil/testchain/mock_nodeconn.go b/packages/testutil/testchain/mock_nodeconn.go index c65c6bcfd3..f48d6aceac 100644 --- a/packages/testutil/testchain/mock_nodeconn.go +++ b/packages/testutil/testchain/mock_nodeconn.go @@ -3,8 +3,8 @@ package testchain import ( "fmt" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/testutil/testchain/mock_vm.go b/packages/testutil/testchain/mock_vm.go index 041f869e38..5f72e19eb4 100644 --- a/packages/testutil/testchain/mock_vm.go +++ b/packages/testutil/testchain/mock_vm.go @@ -4,7 +4,9 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/trie.go/trie" @@ -17,7 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/core/blocklog" - "github.com/stretchr/testify/require" ) type MockedVMRunner struct { diff --git a/packages/testutil/testlogger/logger.go b/packages/testutil/testlogger/logger.go index 50a956abdb..3f4be0d1b2 100644 --- a/packages/testutil/testlogger/logger.go +++ b/packages/testutil/testlogger/logger.go @@ -6,9 +6,10 @@ package testlogger import ( "testing" - "github.com/iotaledger/hive.go/logger" "go.uber.org/zap" "go.uber.org/zap/zapcore" + + "github.com/iotaledger/hive.go/core/logger" ) // NewLogger produces a logger adjusted for test cases. diff --git a/packages/testutil/testmisc/misc.go b/packages/testutil/testmisc/misc.go index 1dab1a8854..bb9499c59f 100644 --- a/packages/testutil/testmisc/misc.go +++ b/packages/testutil/testmisc/misc.go @@ -5,9 +5,10 @@ import ( "strings" "testing" - "github.com/iotaledger/wasp/packages/isc" "github.com/pkg/errors" "github.com/stretchr/testify/assert" + + "github.com/iotaledger/wasp/packages/isc" ) func RequireErrorToBe(t *testing.T, err error, target interface{}) { diff --git a/packages/testutil/testpeers/testkeys.go b/packages/testutil/testpeers/testkeys.go index dfdd032a5b..77233a4b03 100644 --- a/packages/testutil/testpeers/testkeys.go +++ b/packages/testutil/testpeers/testkeys.go @@ -9,7 +9,9 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/dkg" @@ -18,7 +20,6 @@ import ( "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func SetupKeys(peerCount uint16) ([]string, []*cryptolib.KeyPair) { diff --git a/packages/testutil/testpeers/testkeys_pregenerated_test.go b/packages/testutil/testpeers/testkeys_pregenerated_test.go index ca87108f31..0cb2d69c7d 100644 --- a/packages/testutil/testpeers/testkeys_pregenerated_test.go +++ b/packages/testutil/testpeers/testkeys_pregenerated_test.go @@ -9,12 +9,13 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/tcrypto" "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/require" ) // To update the pregenerated keys uncomment the t.Skip temporarily and run: diff --git a/packages/testutil/trustedNetworkManager.go b/packages/testutil/trustedNetworkManager.go index d44054c51b..dd8fe75965 100644 --- a/packages/testutil/trustedNetworkManager.go +++ b/packages/testutil/trustedNetworkManager.go @@ -4,9 +4,10 @@ package testutil import ( + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" - "golang.org/x/xerrors" ) type trustedNetworkManager struct { diff --git a/packages/transaction/dust_assumption.go b/packages/transaction/dust_assumption.go index 13cd3c9f28..d110e63f00 100644 --- a/packages/transaction/dust_assumption.go +++ b/packages/transaction/dust_assumption.go @@ -4,7 +4,8 @@ import ( "fmt" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/iotaledger/hive.go/marshalutil" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/cryptolib" diff --git a/packages/transaction/tx_test.go b/packages/transaction/tx_test.go index 6be262370f..995a47d55a 100644 --- a/packages/transaction/tx_test.go +++ b/packages/transaction/tx_test.go @@ -5,13 +5,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/utxodb" - "github.com/stretchr/testify/require" ) func TestCreateOrigin(t *testing.T) { diff --git a/packages/transaction/util.go b/packages/transaction/util.go index 2d00fb8f0f..2125910035 100644 --- a/packages/transaction/util.go +++ b/packages/transaction/util.go @@ -4,12 +4,13 @@ import ( "fmt" "math/big" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) var ( @@ -161,6 +162,8 @@ func computeInputsAndRemainder( // - outBaseTokens, outTokens is what is in outputs, except the remainder output itself with its storage deposit // Returns (nil, error) if inputs are not enough (taking into account storage deposit requirements) // If return (nil, nil) it means remainder is a perfect match between inputs and outputs, remainder not needed +// +//nolint:gocyclo func computeRemainderOutput(senderAddress iotago.Address, inBaseTokens, outBaseTokens uint64, inTokens, outTokens map[iotago.NativeTokenID]*big.Int) (*iotago.BasicOutput, error) { if inBaseTokens < outBaseTokens { return nil, ErrNotEnoughBaseTokens diff --git a/packages/util/bitvector.go b/packages/util/bitvector.go index d8eb00383a..ffc83b5cef 100644 --- a/packages/util/bitvector.go +++ b/packages/util/bitvector.go @@ -4,7 +4,7 @@ package util import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" ) type BitVector interface { diff --git a/packages/util/bitvector_test.go b/packages/util/bitvector_test.go index 0b586aa85d..34f45e48fb 100644 --- a/packages/util/bitvector_test.go +++ b/packages/util/bitvector_test.go @@ -6,9 +6,10 @@ package util_test import ( "testing" - "github.com/iotaledger/hive.go/marshalutil" - "github.com/iotaledger/wasp/packages/util" "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/marshalutil" + "github.com/iotaledger/wasp/packages/util" ) func TestFixedSizeBitVector(t *testing.T) { diff --git a/packages/util/l1starter/l1starter.go b/packages/util/l1starter/l1starter.go index 123f4eaa0c..08ba90a3f1 100644 --- a/packages/util/l1starter/l1starter.go +++ b/packages/util/l1starter/l1starter.go @@ -18,13 +18,13 @@ type L1Starter struct { } // New sets up the CLI flags relevant to L1/privtangle configuration in the given FlagSet. -func New(flags *flag.FlagSet) *L1Starter { +func New(l1flags, inxFlags *flag.FlagSet) *L1Starter { s := &L1Starter{} - flags.StringVar(&s.Config.APIAddress, "layer1-api", "", "layer1 API address") - flags.StringVar(&s.Config.INXAddress, "layer1-inx", "", "layer1 INX address") - flags.StringVar(&s.Config.FaucetAddress, "layer1-faucet", "", "layer1 faucet port") - flags.BoolVar(&s.Config.UseRemotePoW, "layer1-remote-pow", false, "use remote PoW (must be enabled on the Hornet node)") - flags.IntVar(&s.privtangleNumNodes, "privtangle-num-nodes", 2, "number of hornet nodes to be spawned in the private tangle") + l1flags.StringVar(&s.Config.APIAddress, "layer1-api", "", "layer1 API address") + inxFlags.StringVar(&s.Config.INXAddress, "layer1-inx", "", "layer1 INX address") + l1flags.StringVar(&s.Config.FaucetAddress, "layer1-faucet", "", "layer1 faucet port") + l1flags.BoolVar(&s.Config.UseRemotePoW, "layer1-remote-pow", false, "use remote PoW (must be enabled on the Hornet node)") + l1flags.IntVar(&s.privtangleNumNodes, "privtangle-num-nodes", 2, "number of hornet nodes to be spawned in the private tangle") return s } diff --git a/packages/util/panicutil/panicutil.go b/packages/util/panicutil/panicutil.go index 0e596322a0..0e1dd03d9b 100644 --- a/packages/util/panicutil/panicutil.go +++ b/packages/util/panicutil/panicutil.go @@ -3,10 +3,11 @@ package panicutil import ( "runtime/debug" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/kv" "github.com/pkg/errors" "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/kv" ) func CatchPanicReturnError(fun func(), catchErrors ...error) error { @@ -20,7 +21,7 @@ func CatchPanicReturnError(fun func(), catchErrors ...error) error { if err1, ok := r.(error); ok { for _, targetError := range catchErrors { - if xerrors.Is(err1, targetError) { + if errors.Is(err1, targetError) { err = targetError return } diff --git a/packages/util/pipe/queue.go b/packages/util/pipe/queue.go index dc4562dc67..f8ecb28d38 100644 --- a/packages/util/pipe/queue.go +++ b/packages/util/pipe/queue.go @@ -125,6 +125,8 @@ func (q *LimitedPriorityHashQueue) resize() { // // If it is a hash queue, the element is not added, if it is already in the queue. // If the add was successful, returns `true`. +// +//nolint:gocyclo func (q *LimitedPriorityHashQueue) Add(elem interface{}) bool { var elemHashable Hashable var elemHash hashing.HashValue diff --git a/packages/util/rwutil.go b/packages/util/rwutil.go index 076e28533c..1c53ff1f49 100644 --- a/packages/util/rwutil.go +++ b/packages/util/rwutil.go @@ -8,10 +8,11 @@ import ( "math" "time" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/pkg/errors" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" - "github.com/pkg/errors" ) //////////////////// byte \\\\\\\\\\\\\\\\\\\\ diff --git a/packages/util/rwutil_test.go b/packages/util/rwutil_test.go index 43f123c854..7883d77203 100644 --- a/packages/util/rwutil_test.go +++ b/packages/util/rwutil_test.go @@ -4,8 +4,9 @@ import ( "bytes" "testing" - "github.com/iotaledger/wasp/packages/util" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/util" ) func TestReadIntsAsBits(t *testing.T) { diff --git a/packages/util/waitChan_test.go b/packages/util/waitChan_test.go index 5760bebaf8..f965c0fc3a 100644 --- a/packages/util/waitChan_test.go +++ b/packages/util/waitChan_test.go @@ -7,8 +7,9 @@ import ( "testing" "time" - "github.com/iotaledger/wasp/packages/util" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/util" ) func TestWaitChan(t *testing.T) { diff --git a/packages/utxodb/util.go b/packages/utxodb/util.go index 47f5023d03..66a9b5aad0 100644 --- a/packages/utxodb/util.go +++ b/packages/utxodb/util.go @@ -1,8 +1,9 @@ package utxodb import ( - iotago "github.com/iotaledger/iota.go/v3" "golang.org/x/xerrors" + + iotago "github.com/iotaledger/iota.go/v3" ) func GetSingleChainedAliasOutput(tx *iotago.Transaction) (*iotago.AliasOutput, iotago.OutputID, error) { diff --git a/packages/utxodb/utxodb.go b/packages/utxodb/utxodb.go index 132b9485cb..53e7004a8f 100644 --- a/packages/utxodb/utxodb.go +++ b/packages/utxodb/utxodb.go @@ -6,6 +6,8 @@ import ( "sync" "time" + "golang.org/x/xerrors" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/builder" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/parameters" - "golang.org/x/xerrors" ) const ( diff --git a/packages/utxodb/utxodb_test.go b/packages/utxodb/utxodb_test.go index 17a0ca766f..1a68aceefc 100644 --- a/packages/utxodb/utxodb_test.go +++ b/packages/utxodb/utxodb_test.go @@ -4,12 +4,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/builder" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/parameters" - "github.com/stretchr/testify/require" ) func TestBasic(t *testing.T) { diff --git a/packages/vm/core/accounts/accounts_intern_test.go b/packages/vm/core/accounts/accounts_intern_test.go index ad66d4156b..743327f8d0 100644 --- a/packages/vm/core/accounts/accounts_intern_test.go +++ b/packages/vm/core/accounts/accounts_intern_test.go @@ -4,14 +4,15 @@ import ( "math/big" "testing" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/require" ) func knownAgentID(b byte, h uint32) isc.AgentID { diff --git a/packages/vm/core/accounts/interface.go b/packages/vm/core/accounts/interface.go index e766575f21..8ded974c68 100644 --- a/packages/vm/core/accounts/interface.go +++ b/packages/vm/core/accounts/interface.go @@ -1,8 +1,9 @@ package accounts import ( - "github.com/iotaledger/wasp/packages/isc/coreutil" "golang.org/x/xerrors" + + "github.com/iotaledger/wasp/packages/isc/coreutil" ) var Contract = coreutil.NewContract(coreutil.CoreContractAccounts, "Chain account ledger contract") diff --git a/packages/vm/core/accounts/internal.go b/packages/vm/core/accounts/internal.go index 080f5e65d9..b033e55a3b 100644 --- a/packages/vm/core/accounts/internal.go +++ b/packages/vm/core/accounts/internal.go @@ -5,7 +5,9 @@ import ( "math/big" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/iotaledger/hive.go/marshalutil" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" @@ -17,7 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/errors/coreerrors" - "golang.org/x/xerrors" ) var ( diff --git a/packages/vm/core/accounts/internal_nft.go b/packages/vm/core/accounts/internal_nft.go index c1842749bd..866dafee9b 100644 --- a/packages/vm/core/accounts/internal_nft.go +++ b/packages/vm/core/accounts/internal_nft.go @@ -3,12 +3,13 @@ package accounts import ( "fmt" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/collections" - "golang.org/x/xerrors" ) // CreditNFTToAccount credits an NFT to the on chain ledger diff --git a/packages/vm/core/blocklog/blocklog_test.go b/packages/vm/core/blocklog/blocklog_test.go index 523abfc27c..208691d5c3 100644 --- a/packages/vm/core/blocklog/blocklog_test.go +++ b/packages/vm/core/blocklog/blocklog_test.go @@ -4,9 +4,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" - "github.com/stretchr/testify/require" ) func TestSerdeRequestReceipt(t *testing.T) { diff --git a/packages/vm/core/blocklog/controladdress.go b/packages/vm/core/blocklog/controladdress.go index 429c9de352..e1b6f7d4f4 100644 --- a/packages/vm/core/blocklog/controladdress.go +++ b/packages/vm/core/blocklog/controladdress.go @@ -3,7 +3,7 @@ package blocklog import ( "fmt" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" ) diff --git a/packages/vm/core/blocklog/external.go b/packages/vm/core/blocklog/external.go index c33bee89f3..6d3ed08ac1 100644 --- a/packages/vm/core/blocklog/external.go +++ b/packages/vm/core/blocklog/external.go @@ -3,12 +3,13 @@ package blocklog import ( "fmt" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/kv/subrealm" "github.com/iotaledger/wasp/packages/state" - "golang.org/x/xerrors" ) // GetRequestIDsForLastBlock reads blocklog from chain state and returns request IDs settled in specific block diff --git a/packages/vm/core/blocklog/internal.go b/packages/vm/core/blocklog/internal.go index b88485e84b..2510c8b326 100644 --- a/packages/vm/core/blocklog/internal.go +++ b/packages/vm/core/blocklog/internal.go @@ -7,12 +7,13 @@ import ( "io" "math" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/state" - "golang.org/x/xerrors" ) // SaveNextBlockInfo appends block info and returns its index diff --git a/packages/vm/core/blocklog/receipt.go b/packages/vm/core/blocklog/receipt.go index c239adba14..397b2fd3d1 100644 --- a/packages/vm/core/blocklog/receipt.go +++ b/packages/vm/core/blocklog/receipt.go @@ -6,7 +6,7 @@ import ( "io" "math" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/gas" diff --git a/packages/vm/core/errors/state_error_collection.go b/packages/vm/core/errors/state_error_collection.go index a479b6971c..e2cc51c6a7 100644 --- a/packages/vm/core/errors/state_error_collection.go +++ b/packages/vm/core/errors/state_error_collection.go @@ -1,13 +1,14 @@ package errors import ( - "github.com/iotaledger/hive.go/marshalutil" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/vm/core/errors/coreerrors" - "golang.org/x/xerrors" ) func errorTemplateKey(contractID isc.Hname) string { diff --git a/packages/vm/core/evm/emulator/blockchaindb.go b/packages/vm/core/evm/emulator/blockchaindb.go index 226d6086fb..f07909b39c 100644 --- a/packages/vm/core/evm/emulator/blockchaindb.go +++ b/packages/vm/core/evm/emulator/blockchaindb.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/kv" diff --git a/packages/vm/core/evm/emulator/emulator.go b/packages/vm/core/evm/emulator/emulator.go index e1b13598de..f0a53c2780 100644 --- a/packages/vm/core/evm/emulator/emulator.go +++ b/packages/vm/core/evm/emulator/emulator.go @@ -15,10 +15,11 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/subrealm" - "golang.org/x/xerrors" ) type EVMEmulator struct { diff --git a/packages/vm/core/evm/emulator/emulator_test.go b/packages/vm/core/evm/emulator/emulator_test.go index 4254c88f4d..c0d7eefde8 100644 --- a/packages/vm/core/evm/emulator/emulator_test.go +++ b/packages/vm/core/evm/emulator/emulator_test.go @@ -15,11 +15,12 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/evm/evmtest" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/evm" - "github.com/stretchr/testify/require" ) func sendTransaction(t testing.TB, emu *EVMEmulator, sender *ecdsa.PrivateKey, receiverAddress common.Address, amount *big.Int, data []byte, gasLimit uint64) *types.Receipt { diff --git a/packages/vm/core/evm/emulator/statedb.go b/packages/vm/core/evm/emulator/statedb.go index 1f99c4ab65..b405ec5372 100644 --- a/packages/vm/core/evm/emulator/statedb.go +++ b/packages/vm/core/evm/emulator/statedb.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/buffered" "github.com/iotaledger/wasp/packages/kv/codec" @@ -67,14 +68,14 @@ func (s *StateDB) CreateAccount(addr common.Address) { func (s *StateDB) SubBalance(addr common.Address, amount *big.Int) { _ = addr if amount != nil && amount.Sign() != 0 { - panic(fmt.Sprintf("modifying an Ethereum account balance is not supported")) + panic("modifying an Ethereum account balance is not supported") } } func (s *StateDB) AddBalance(addr common.Address, amount *big.Int) { _ = addr if amount != nil && amount.Sign() != 0 { - panic(fmt.Sprintf("modifying an Ethereum account balance is not supported")) + panic("modifying an Ethereum account balance is not supported") } } diff --git a/packages/vm/core/evm/evmimpl/impl.go b/packages/vm/core/evm/evmimpl/impl.go index 55dd85119f..1a91b3abe3 100644 --- a/packages/vm/core/evm/evmimpl/impl.go +++ b/packages/vm/core/evm/evmimpl/impl.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/isc" @@ -139,7 +140,6 @@ func getBalance(ctx isc.SandboxView) dict.Dict { // TODO: balance might change between two eth blocks addr := common.BytesToAddress(ctx.Params().MustGet(evm.FieldAddress)) emu := createEmulatorR(ctx) - _ = paramBlockNumberOrHashAsNumber(ctx, emu, false) return result(emu.StateDB().GetBalance(addr).Bytes()) } @@ -189,14 +189,12 @@ func getReceipt(ctx isc.SandboxView) dict.Dict { func getNonce(ctx isc.SandboxView) dict.Dict { emu := createEmulatorR(ctx) addr := common.BytesToAddress(ctx.Params().MustGet(evm.FieldAddress)) - _ = paramBlockNumberOrHashAsNumber(ctx, emu, false) return result(codec.EncodeUint64(emu.StateDB().GetNonce(addr))) } func getCode(ctx isc.SandboxView) dict.Dict { emu := createEmulatorR(ctx) addr := common.BytesToAddress(ctx.Params().MustGet(evm.FieldAddress)) - _ = paramBlockNumberOrHashAsNumber(ctx, emu, false) return result(emu.StateDB().GetCode(addr)) } @@ -204,7 +202,6 @@ func getStorage(ctx isc.SandboxView) dict.Dict { emu := createEmulatorR(ctx) addr := common.BytesToAddress(ctx.Params().MustGet(evm.FieldAddress)) key := common.BytesToHash(ctx.Params().MustGet(evm.FieldKey)) - _ = paramBlockNumberOrHashAsNumber(ctx, emu, false) data := emu.StateDB().GetState(addr, key) return result(data[:]) } @@ -226,7 +223,6 @@ func callContract(ctx isc.SandboxView) dict.Dict { callMsg, err := evmtypes.DecodeCallMsg(ctx.Params().MustGet(evm.FieldCallMsg)) ctx.RequireNoError(err) emu := createEmulatorR(ctx) - _ = paramBlockNumberOrHashAsNumber(ctx, emu, false) res, err := emu.CallContract(callMsg, nil) ctx.RequireNoError(err) return result(res.Return()) diff --git a/packages/vm/core/evm/evmimpl/internal.go b/packages/vm/core/evm/evmimpl/internal.go index 6a8f2493fd..27bdc34c7a 100644 --- a/packages/vm/core/evm/evmimpl/internal.go +++ b/packages/vm/core/evm/evmimpl/internal.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/evm/evmutil" "github.com/iotaledger/wasp/packages/isc" @@ -189,7 +190,7 @@ func transactionByBlockNumberAndIndex(ctx isc.SandboxView) (*emulator.EVMEmulato func requireLatestBlock(ctx isc.SandboxView, emu *emulator.EVMEmulator, allowPrevious bool, blockNumber uint64) uint64 { current := emu.BlockchainDB().GetNumber() if blockNumber != current { - assert.NewAssert(ctx.Log()).Requiref(allowPrevious, "unsupported operation") + assert.NewAssert(ctx.Log()).Requiref(allowPrevious, "unsupported operation, cannot query previous blocks") } return blockNumber } @@ -203,18 +204,6 @@ func paramBlockNumber(ctx isc.SandboxView, emu *emulator.EVMEmulator, allowPrevi return current } -//nolint:unparam -func paramBlockNumberOrHashAsNumber(ctx isc.SandboxView, emu *emulator.EVMEmulator, allowPrevious bool) uint64 { - if ctx.Params().MustHas(evm.FieldBlockHash) { - a := assert.NewAssert(ctx.Log()) - blockHash := common.BytesToHash(ctx.Params().MustGet(evm.FieldBlockHash)) - header := emu.BlockchainDB().GetHeaderByHash(blockHash) - a.Requiref(header != nil, "block not found") - return requireLatestBlock(ctx, emu, allowPrevious, header.Number.Uint64()) - } - return paramBlockNumber(ctx, emu, allowPrevious) -} - func getBalanceFunc(ctx isc.SandboxBase) emulator.BalanceFunc { res := ctx.CallView( governance.Contract.Hname(), diff --git a/packages/vm/core/evm/evmimpl/iscmagic.go b/packages/vm/core/evm/evmimpl/iscmagic.go index e4aae03b00..c692e22fa1 100644 --- a/packages/vm/core/evm/evmimpl/iscmagic.go +++ b/packages/vm/core/evm/evmimpl/iscmagic.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" @@ -302,7 +303,6 @@ func (c *magicContractView) doRun(evm *vm.EVM, caller vm.ContractRef, input []by return ret, remainingGas } -//nolint:unparam func tryViewCall(ctx isc.SandboxBase, caller vm.ContractRef, input []byte, gas uint64) (ret []byte, remainingGas uint64, method *abi.Method, ok bool) { remainingGas = gas method, args := parseCall(input) diff --git a/packages/vm/core/evm/evmtest/bench_test.go b/packages/vm/core/evm/evmtest/bench_test.go index 1bc5674fb5..e46a6799ed 100644 --- a/packages/vm/core/evm/evmtest/bench_test.go +++ b/packages/vm/core/evm/evmtest/bench_test.go @@ -6,10 +6,11 @@ package evmtest import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" ) func initBenchmark(b *testing.B) (*solo.Chain, []isc.Request) { diff --git a/packages/vm/core/evm/evmtest/evm_test.go b/packages/vm/core/evm/evmtest/evm_test.go index 081db919c9..9b0ef8f889 100644 --- a/packages/vm/core/evm/evmtest/evm_test.go +++ b/packages/vm/core/evm/evmtest/evm_test.go @@ -12,6 +12,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/require" + "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/evm/evmtest" @@ -25,7 +27,6 @@ import ( "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/evm/iscmagic" - "github.com/stretchr/testify/require" ) func TestStorageContract(t *testing.T) { diff --git a/packages/vm/core/evm/evmtest/gascalibration_test.go b/packages/vm/core/evm/evmtest/gascalibration_test.go index 1c03935db1..e573577ec8 100644 --- a/packages/vm/core/evm/evmtest/gascalibration_test.go +++ b/packages/vm/core/evm/evmtest/gascalibration_test.go @@ -3,8 +3,9 @@ package evmtest import ( "testing" - "github.com/iotaledger/wasp/contracts/wasm/gascalibration" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/contracts/wasm/gascalibration" ) const factor = 10 diff --git a/packages/vm/core/evm/evmtest/utils_test.go b/packages/vm/core/evm/evmtest/utils_test.go index 36b6c52b6f..f79dcc7692 100644 --- a/packages/vm/core/evm/evmtest/utils_test.go +++ b/packages/vm/core/evm/evmtest/utils_test.go @@ -17,6 +17,8 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rpc" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/evm/evmtest" "github.com/iotaledger/wasp/packages/evm/evmutil" @@ -29,7 +31,6 @@ import ( "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/evm" "github.com/iotaledger/wasp/packages/vm/core/evm/iscmagic" - "github.com/stretchr/testify/require" ) var latestBlock = rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber) @@ -175,12 +176,6 @@ func (e *soloChainEnv) getBlockNumber() uint64 { return n.Uint64() } -func (e *soloChainEnv) getBlockByNumber(n uint64) *types.Block { - block, err := e.evmChain.BlockByNumber(new(big.Int).SetUint64(n)) - require.NoError(e.t, err) - return block -} - func (e *soloChainEnv) getCode(addr common.Address) []byte { ret, err := e.evmChain.Code(addr, latestBlock) require.NoError(e.t, err) @@ -200,12 +195,6 @@ func (e *soloChainEnv) setGasRatio(newGasRatio util.Ratio32, opts ...iscCallOpti return err } -func (e *soloChainEnv) getBalance(addr common.Address) *big.Int { - bal, err := e.evmChain.Balance(addr, latestBlock) - require.NoError(e.t, err) - return bal -} - func (e *soloChainEnv) getNonce(addr common.Address) uint64 { ret, err := e.callView(evm.FuncGetNonce.Name, evm.FieldAddress, addr.Bytes()) require.NoError(e.t, err) @@ -374,13 +363,6 @@ func (e *evmContractInstance) callFn(opts []ethCallOptions, fnName string, args return res, sendTxErr } -func (e *evmContractInstance) callFnExpectError(opts []ethCallOptions, fnName string, args ...interface{}) error { - _, err := e.callFn(opts, fnName, args...) - require.Error(e.chain.t, err) - return err -} - -//nolint:unparam func (e *evmContractInstance) callFnExpectEvent(opts []ethCallOptions, eventName string, v interface{}, fnName string, args ...interface{}) { res, err := e.callFn(opts, fnName, args...) require.NoError(e.chain.t, err) diff --git a/packages/vm/core/governance/accessnodes.go b/packages/vm/core/governance/accessnodes.go index 35ce4faebc..03a2a19c13 100644 --- a/packages/vm/core/governance/accessnodes.go +++ b/packages/vm/core/governance/accessnodes.go @@ -6,6 +6,8 @@ package governance import ( "bytes" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/util" - "golang.org/x/xerrors" ) // NodeOwnershipCertificate is a proof that a specified address is an owner of the specified node. diff --git a/packages/vm/core/governance/contractfees.go b/packages/vm/core/governance/contractfees.go index 0aa9c95c33..8b06859feb 100644 --- a/packages/vm/core/governance/contractfees.go +++ b/packages/vm/core/governance/contractfees.go @@ -4,7 +4,7 @@ package governance import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" ) // ContractFeesRecord is a structure which contains the fee information for a contract diff --git a/packages/vm/core/root/contractrecord.go b/packages/vm/core/root/contractrecord.go index f31a33e6fc..fea13036c4 100644 --- a/packages/vm/core/root/contractrecord.go +++ b/packages/vm/core/root/contractrecord.go @@ -1,7 +1,7 @@ package root import ( - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" diff --git a/packages/vm/core/root/internal.go b/packages/vm/core/root/internal.go index 4632d8bbd4..2d348ed5ef 100644 --- a/packages/vm/core/root/internal.go +++ b/packages/vm/core/root/internal.go @@ -3,11 +3,12 @@ package root import ( "sort" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/collections" - "golang.org/x/xerrors" ) func GetContractRegistry(state kv.KVStore) *collections.Map { diff --git a/packages/vm/core/testcore/accounts_test.go b/packages/vm/core/testcore/accounts_test.go index 241e8ff31f..245c3a53cd 100644 --- a/packages/vm/core/testcore/accounts_test.go +++ b/packages/vm/core/testcore/accounts_test.go @@ -8,7 +8,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" "github.com/iotaledger/wasp/packages/cryptolib" @@ -24,7 +25,6 @@ import ( "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/gas" - "github.com/stretchr/testify/require" ) const BaseTokensDepositFee = 100 @@ -138,12 +138,6 @@ func TestFoundries(t *testing.T) { initTest := func() { env = solo.New(t, &solo.InitOptions{AutoAdjustStorageDeposit: true}) ch, _, _ = env.NewChainExt(nil, 10*isc.Million, "chain1") - defer func(log *logger.Logger) { - err := log.Sync() - if err != nil { - } - }(ch.Log()) - senderKeyPair, senderAddr = env.NewKeyPairWithFunds(env.NewSeedFromIndex(10)) senderAgentID = isc.NewAgentID(senderAddr) diff --git a/packages/vm/core/testcore/base_test.go b/packages/vm/core/testcore/base_test.go index 7e895e7443..50de000663 100644 --- a/packages/vm/core/testcore/base_test.go +++ b/packages/vm/core/testcore/base_test.go @@ -5,6 +5,8 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" @@ -21,7 +23,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func GetStorageDeposit(tx *iotago.Transaction) []uint64 { diff --git a/packages/vm/core/testcore/blob_test.go b/packages/vm/core/testcore/blob_test.go index a3bc027cfa..dc44784a72 100644 --- a/packages/vm/core/testcore/blob_test.go +++ b/packages/vm/core/testcore/blob_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil/testmisc" "github.com/iotaledger/wasp/packages/vm/core/blob" "github.com/iotaledger/wasp/packages/vm/core/governance" - "github.com/stretchr/testify/require" ) const ( diff --git a/packages/vm/core/testcore/blocklog_test.go b/packages/vm/core/testcore/blocklog_test.go index d5b79c25bb..ed1939f2e1 100644 --- a/packages/vm/core/testcore/blocklog_test.go +++ b/packages/vm/core/testcore/blocklog_test.go @@ -4,11 +4,12 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/governance" - "github.com/stretchr/testify/require" ) func TestBlockInfoLatest(t *testing.T) { diff --git a/packages/vm/core/testcore/errors_test.go b/packages/vm/core/testcore/errors_test.go index 0006ee7046..fbafa790ce 100644 --- a/packages/vm/core/testcore/errors_test.go +++ b/packages/vm/core/testcore/errors_test.go @@ -4,6 +4,8 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv/codec" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/errors" "github.com/iotaledger/wasp/packages/vm/core/errors/coreerrors" - "github.com/stretchr/testify/require" ) var errorMessageToTest = "Test error message %v" diff --git a/packages/vm/core/testcore/events_test.go b/packages/vm/core/testcore/events_test.go index b1654274cb..290be1c76e 100644 --- a/packages/vm/core/testcore/events_test.go +++ b/packages/vm/core/testcore/events_test.go @@ -5,6 +5,8 @@ import ( "math" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/governance" - "github.com/stretchr/testify/require" ) var ( diff --git a/packages/vm/core/testcore/governance_test.go b/packages/vm/core/testcore/governance_test.go index 5778ebbcff..082f577e5c 100644 --- a/packages/vm/core/testcore/governance_test.go +++ b/packages/vm/core/testcore/governance_test.go @@ -4,6 +4,8 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv/codec" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/governance" - "github.com/stretchr/testify/require" ) func TestGovernance1(t *testing.T) { diff --git a/packages/vm/core/testcore/proof_test.go b/packages/vm/core/testcore/proof_test.go index 8fb3354f33..bec39c9cca 100644 --- a/packages/vm/core/testcore/proof_test.go +++ b/packages/vm/core/testcore/proof_test.go @@ -4,12 +4,13 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/vm/core/blob" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" - "github.com/stretchr/testify/require" ) func TestProofs(t *testing.T) { diff --git a/packages/vm/core/testcore/return_unlock_condition_test.go b/packages/vm/core/testcore/return_unlock_condition_test.go index cf2ae498bd..ef75dac999 100644 --- a/packages/vm/core/testcore/return_unlock_condition_test.go +++ b/packages/vm/core/testcore/return_unlock_condition_test.go @@ -4,6 +4,8 @@ import ( "math" "testing" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" @@ -11,7 +13,6 @@ import ( "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/transaction" - "github.com/stretchr/testify/require" ) func TestSendBack(t *testing.T) { diff --git a/packages/vm/core/testcore/root_test.go b/packages/vm/core/testcore/root_test.go index df60300c31..5afae15f49 100644 --- a/packages/vm/core/testcore/root_test.go +++ b/packages/vm/core/testcore/root_test.go @@ -6,6 +6,8 @@ package testcore import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/accounts" @@ -14,7 +16,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestRootBasic(t *testing.T) { diff --git a/packages/vm/core/testcore/sbtests/2chains_test.go b/packages/vm/core/testcore/sbtests/2chains_test.go index 53943c46ee..90dc2c5474 100644 --- a/packages/vm/core/testcore/sbtests/2chains_test.go +++ b/packages/vm/core/testcore/sbtests/2chains_test.go @@ -5,13 +5,14 @@ import ( "time" "github.com/ethereum/go-ethereum/common/math" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) // TODO deposit fee needs to be constant, this test is using a placeholder value that will need to be changed diff --git a/packages/vm/core/testcore/sbtests/call_test.go b/packages/vm/core/testcore/sbtests/call_test.go index 1d3a26abbd..ea002895f2 100644 --- a/packages/vm/core/testcore/sbtests/call_test.go +++ b/packages/vm/core/testcore/sbtests/call_test.go @@ -3,10 +3,11 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestGetSet(t *testing.T) { run2(t, testGetSet) } diff --git a/packages/vm/core/testcore/sbtests/check_ctx_test.go b/packages/vm/core/testcore/sbtests/check_ctx_test.go index 13e00c6664..ee622afb87 100644 --- a/packages/vm/core/testcore/sbtests/check_ctx_test.go +++ b/packages/vm/core/testcore/sbtests/check_ctx_test.go @@ -3,10 +3,11 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestMainCallsFromFullEP(t *testing.T) { run2(t, testMainCallsFromFullEP) } diff --git a/packages/vm/core/testcore/sbtests/concurrency_test.go b/packages/vm/core/testcore/sbtests/concurrency_test.go index aff6c3ecdf..63e1125df0 100644 --- a/packages/vm/core/testcore/sbtests/concurrency_test.go +++ b/packages/vm/core/testcore/sbtests/concurrency_test.go @@ -5,6 +5,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common/math" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestCounter(t *testing.T) { run2(t, testCounter) } diff --git a/packages/vm/core/testcore/sbtests/gas_limits_test.go b/packages/vm/core/testcore/sbtests/gas_limits_test.go index e19d8a2681..e0b0a9b843 100644 --- a/packages/vm/core/testcore/sbtests/gas_limits_test.go +++ b/packages/vm/core/testcore/sbtests/gas_limits_test.go @@ -6,13 +6,14 @@ import ( "github.com/iotaledger/wasp/packages/vm" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/testutil/testmisc" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" "github.com/iotaledger/wasp/packages/vm/gas" - "github.com/stretchr/testify/require" ) func maxGasRequest(ch *solo.Chain, seedIndex int) (*solo.CallParams, *cryptolib.KeyPair) { diff --git a/packages/vm/core/testcore/sbtests/init_fail_test.go b/packages/vm/core/testcore/sbtests/init_fail_test.go index e51a275dff..64bd5766da 100644 --- a/packages/vm/core/testcore/sbtests/init_fail_test.go +++ b/packages/vm/core/testcore/sbtests/init_fail_test.go @@ -3,9 +3,10 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestInitSuccess(t *testing.T) { diff --git a/packages/vm/core/testcore/sbtests/misc_call_test.go b/packages/vm/core/testcore/sbtests/misc_call_test.go index d92156dad5..d723a94457 100644 --- a/packages/vm/core/testcore/sbtests/misc_call_test.go +++ b/packages/vm/core/testcore/sbtests/misc_call_test.go @@ -3,9 +3,10 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestChainOwnerIDView(t *testing.T) { run2(t, testChainOwnerIDView) } diff --git a/packages/vm/core/testcore/sbtests/offledger_test.go b/packages/vm/core/testcore/sbtests/offledger_test.go index 95f0d17ea5..0cb2927179 100644 --- a/packages/vm/core/testcore/sbtests/offledger_test.go +++ b/packages/vm/core/testcore/sbtests/offledger_test.go @@ -3,12 +3,13 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/kvdecoder" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/testutil/testmisc" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestOffLedgerFailNoAccount(t *testing.T) { diff --git a/packages/vm/core/testcore/sbtests/sandbox_panic_test.go b/packages/vm/core/testcore/sbtests/sandbox_panic_test.go index 7e5585f69a..e558846f9f 100644 --- a/packages/vm/core/testcore/sbtests/sandbox_panic_test.go +++ b/packages/vm/core/testcore/sbtests/sandbox_panic_test.go @@ -4,11 +4,12 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/testutil/testmisc" "github.com/iotaledger/wasp/packages/vm/core/errors/coreerrors" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestPanicFull(t *testing.T) { run2(t, testPanicFull) } diff --git a/packages/vm/core/testcore/sbtests/send_test.go b/packages/vm/core/testcore/sbtests/send_test.go index c3d31fd6e2..acbdd51621 100644 --- a/packages/vm/core/testcore/sbtests/send_test.go +++ b/packages/vm/core/testcore/sbtests/send_test.go @@ -5,6 +5,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common/math" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -14,7 +16,6 @@ import ( "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestTooManyOutputsInASingleCall(t *testing.T) { run2(t, testTooManyOutputsInASingleCall) } diff --git a/packages/vm/core/testcore/sbtests/setup_test.go b/packages/vm/core/testcore/sbtests/setup_test.go index 6b041e055f..1d6033e0a8 100644 --- a/packages/vm/core/testcore/sbtests/setup_test.go +++ b/packages/vm/core/testcore/sbtests/setup_test.go @@ -4,13 +4,14 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) const ( diff --git a/packages/vm/core/testcore/sbtests/spawn_test.go b/packages/vm/core/testcore/sbtests/spawn_test.go index f64c3c49a6..3ad20db166 100644 --- a/packages/vm/core/testcore/sbtests/spawn_test.go +++ b/packages/vm/core/testcore/sbtests/spawn_test.go @@ -3,11 +3,12 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/kv/kvdecoder" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestSpawn(t *testing.T) { diff --git a/packages/vm/core/testcore/sbtests/types_test.go b/packages/vm/core/testcore/sbtests/types_test.go index 9c21db008f..a8112c899b 100644 --- a/packages/vm/core/testcore/sbtests/types_test.go +++ b/packages/vm/core/testcore/sbtests/types_test.go @@ -3,11 +3,12 @@ package sbtests import ( "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc" - "github.com/stretchr/testify/require" ) func TestTypesFull(t *testing.T) { run2(t, testTypesFull) } diff --git a/packages/vm/gas/burnlog.go b/packages/vm/gas/burnlog.go index 4e5b4c0aab..4328f9f463 100644 --- a/packages/vm/gas/burnlog.go +++ b/packages/vm/gas/burnlog.go @@ -34,6 +34,6 @@ func (h *BurnLog) String() string { ret = append(ret, fmt.Sprintf("%10s: %d", h.records[i].Code.Name(), h.records[i].GasBurned)) total += h.records[i].GasBurned } - ret = append(ret, fmt.Sprintf("---------------"), fmt.Sprintf("%10s: %d", "TOTAL", total)) + ret = append(ret, "---------------", fmt.Sprintf("%10s: %d", "TOTAL", total)) return strings.Join(ret, "\n") } diff --git a/packages/vm/gas/policy.go b/packages/vm/gas/policy.go index f8a1240730..a43509a618 100644 --- a/packages/vm/gas/policy.go +++ b/packages/vm/gas/policy.go @@ -3,7 +3,7 @@ package gas import ( "math" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/iotaledger/hive.go/core/marshalutil" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/util" ) diff --git a/packages/vm/gas/policy_test.go b/packages/vm/gas/policy_test.go index 86f426dd69..ede952cdaf 100644 --- a/packages/vm/gas/policy_test.go +++ b/packages/vm/gas/policy_test.go @@ -3,8 +3,9 @@ package gas import ( "testing" - "github.com/iotaledger/iota.go/v3/tpkg" "github.com/stretchr/testify/require" + + "github.com/iotaledger/iota.go/v3/tpkg" ) func TestFeePolicySerde(t *testing.T) { diff --git a/packages/vm/processors/cache.go b/packages/vm/processors/cache.go index 8329bbef2c..21aa10659e 100644 --- a/packages/vm/processors/cache.go +++ b/packages/vm/processors/cache.go @@ -4,11 +4,12 @@ import ( "fmt" "sync" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/vmtypes" - "golang.org/x/xerrors" ) // Cache stores all initialized VMProcessor instances used by a single chain diff --git a/packages/vm/sandbox/utils.go b/packages/vm/sandbox/utils.go index 9ad435e4c9..127032dfbf 100644 --- a/packages/vm/sandbox/utils.go +++ b/packages/vm/sandbox/utils.go @@ -1,16 +1,17 @@ package sandbox import ( - "github.com/iotaledger/hive.go/crypto/bls" + "github.com/mr-tron/base58" + "go.dedis.ch/kyber/v3/pairing/bn256" + "go.dedis.ch/kyber/v3/sign/bdn" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/crypto/bls" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/vm/gas" - "github.com/mr-tron/base58" - "go.dedis.ch/kyber/v3/pairing/bn256" - "go.dedis.ch/kyber/v3/sign/bdn" - "golang.org/x/xerrors" ) type utilImpl struct { @@ -37,7 +38,7 @@ func (u utilImpl) ED25519() isc.ED25519 { } func (u utilImpl) BLS() isc.BLS { - return utilImplBLS{u.gas} + return utilImplBLS(u) } // --- isc.Base58 interface diff --git a/packages/vm/viewcontext/viewcontext.go b/packages/vm/viewcontext/viewcontext.go index 3e8eb0de34..2d43074985 100644 --- a/packages/vm/viewcontext/viewcontext.go +++ b/packages/vm/viewcontext/viewcontext.go @@ -4,7 +4,9 @@ import ( "math/big" "time" - "github.com/iotaledger/hive.go/logger" + "go.uber.org/zap" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/trie.go/models/trie_blake2b" "github.com/iotaledger/trie.go/models/trie_blake2b/trie_blake2b_verify" @@ -29,7 +31,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/gas" "github.com/iotaledger/wasp/packages/vm/processors" "github.com/iotaledger/wasp/packages/vm/sandbox" - "go.uber.org/zap" ) // ViewContext implements the needed infrastructure to run external view calls, its more lightweight than vmcontext diff --git a/packages/vm/vmcontext/call.go b/packages/vm/vmcontext/call.go index 79b5624f39..f0ba8b3872 100644 --- a/packages/vm/vmcontext/call.go +++ b/packages/vm/vmcontext/call.go @@ -1,6 +1,8 @@ package vmcontext import ( + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv" @@ -10,7 +12,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/execution" "github.com/iotaledger/wasp/packages/vm/sandbox" - "golang.org/x/xerrors" ) // Call implements sandbox logic of the call between contracts on-chain diff --git a/packages/vm/vmcontext/internal.go b/packages/vm/vmcontext/internal.go index f57f80b4f7..5dd21e3d30 100644 --- a/packages/vm/vmcontext/internal.go +++ b/packages/vm/vmcontext/internal.go @@ -54,14 +54,6 @@ func (vmctx *VMContext) mustMoveBetweenAccounts(fromAgentID, toAgentID isc.Agent }) } -func (vmctx *VMContext) totalL2Assets() *isc.FungibleTokens { - var ret *isc.FungibleTokens - vmctx.callCore(accounts.Contract, func(s kv.KVStore) { - ret = accounts.GetTotalL2Assets(s) - }) - return ret -} - func (vmctx *VMContext) findContractByHname(contractHname isc.Hname) (ret *root.ContractRecord) { vmctx.callCore(root.Contract, func(s kv.KVStore) { ret = root.FindContract(s, contractHname) diff --git a/packages/vm/vmcontext/privileged.go b/packages/vm/vmcontext/privileged.go index 9ee2ce42da..c55bcb68f9 100644 --- a/packages/vm/vmcontext/privileged.go +++ b/packages/vm/vmcontext/privileged.go @@ -8,6 +8,8 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/vm/execution" - "golang.org/x/xerrors" ) func (vmctx *VMContext) mustBeCalledFromContract(contract *coreutil.ContractInfo) { diff --git a/packages/vm/vmcontext/sandbox.go b/packages/vm/vmcontext/sandbox.go index 6cffbb55bd..9a166b6368 100644 --- a/packages/vm/vmcontext/sandbox.go +++ b/packages/vm/vmcontext/sandbox.go @@ -1,7 +1,6 @@ // Copyright 2020 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -// nolint:typecheck package vmcontext import ( diff --git a/packages/vm/vmcontext/skipreq.go b/packages/vm/vmcontext/skipreq.go index 502d343b6f..3031b7c889 100644 --- a/packages/vm/vmcontext/skipreq.go +++ b/packages/vm/vmcontext/skipreq.go @@ -4,6 +4,8 @@ import ( "fmt" "time" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" @@ -11,7 +13,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/vmcontext/vmexceptions" - "golang.org/x/xerrors" ) const ( @@ -145,7 +146,7 @@ func (vmctx *VMContext) checkReasonExpiry() error { windowTo := vmctx.finalStateTimestamp.Add(ExpiryUnlockSafetyWindowDuration) if expiry.After(windowFrom) && expiry.Before(windowTo) { - return xerrors.Errorf("can't be consumed in the expire safety window close to v", expiry) + return xerrors.Errorf("can't be consumed in the expire safety window close to %v", expiry) } // General unlock validation @@ -156,7 +157,7 @@ func (vmctx *VMContext) checkReasonExpiry() error { }) if !unlockable { - return xerrors.Errorf("can't be consumed", expiry) + return xerrors.Errorf("can't be consumed, expiry: %v", expiry) } return nil diff --git a/packages/vm/vmcontext/stateaccess_test.go b/packages/vm/vmcontext/stateaccess_test.go index 08367969f5..7b3da71c77 100644 --- a/packages/vm/vmcontext/stateaccess_test.go +++ b/packages/vm/vmcontext/stateaccess_test.go @@ -6,13 +6,14 @@ import ( "github.com/iotaledger/wasp/packages/vm" - "github.com/iotaledger/hive.go/kvstore/mapdb" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/kvstore/mapdb" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/isc/coreutil" "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/packages/state" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestSetThenGet(t *testing.T) { diff --git a/packages/vm/vmcontext/vmtxbuilder/foundries.go b/packages/vm/vmcontext/vmtxbuilder/foundries.go index 1388bfd869..f4917f89eb 100644 --- a/packages/vm/vmcontext/vmtxbuilder/foundries.go +++ b/packages/vm/vmcontext/vmtxbuilder/foundries.go @@ -4,13 +4,14 @@ import ( "math/big" "sort" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/util/panicutil" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/vmcontext/vmexceptions" - "golang.org/x/xerrors" ) func (txb *AnchorTransactionBuilder) CreateNewFoundry( diff --git a/packages/vm/vmcontext/vmtxbuilder/tokens.go b/packages/vm/vmcontext/vmtxbuilder/tokens.go index 428b27c1c8..51f5dc95b4 100644 --- a/packages/vm/vmcontext/vmtxbuilder/tokens.go +++ b/packages/vm/vmcontext/vmtxbuilder/tokens.go @@ -6,11 +6,12 @@ import ( "sort" "github.com/ethereum/go-ethereum/accounts/abi" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/vmcontext/vmexceptions" - "golang.org/x/xerrors" ) // nativeTokenBalance represents on-chain account of the specific native token diff --git a/packages/vm/vmcontext/vmtxbuilder/totals.go b/packages/vm/vmcontext/vmtxbuilder/totals.go index a85179197d..15ac96d9b7 100644 --- a/packages/vm/vmcontext/vmtxbuilder/totals.go +++ b/packages/vm/vmcontext/vmtxbuilder/totals.go @@ -4,12 +4,13 @@ import ( "fmt" "math/big" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm" - "golang.org/x/xerrors" ) type TransactionTotals struct { diff --git a/packages/vm/vmcontext/vmtxbuilder/txbuilder.go b/packages/vm/vmcontext/vmtxbuilder/txbuilder.go index 9b45237aac..b001eca00d 100644 --- a/packages/vm/vmcontext/vmtxbuilder/txbuilder.go +++ b/packages/vm/vmcontext/vmtxbuilder/txbuilder.go @@ -5,6 +5,8 @@ import ( "fmt" "math/big" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/parameters" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/packages/vm" "github.com/iotaledger/wasp/packages/vm/vmcontext/vmexceptions" - "golang.org/x/xerrors" ) // tokenOutputLoader externally supplied function which loads stored output from the state diff --git a/packages/vm/vmcontext/vmtxbuilder/txbuilder_test.go b/packages/vm/vmcontext/vmtxbuilder/txbuilder_test.go index fd3e673c35..8bbe4ed7c5 100644 --- a/packages/vm/vmcontext/vmtxbuilder/txbuilder_test.go +++ b/packages/vm/vmcontext/vmtxbuilder/txbuilder_test.go @@ -5,6 +5,8 @@ import ( "math/rand" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/hive.go/serializer/v2" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/tpkg" @@ -18,7 +20,6 @@ import ( "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/util/panicutil" "github.com/iotaledger/wasp/packages/vm/vmcontext/vmexceptions" - "github.com/stretchr/testify/require" ) func rndAliasID() (ret iotago.AliasID) { diff --git a/packages/vm/vmtask.go b/packages/vm/vmtask.go index 82e109230f..ea9a4c5740 100644 --- a/packages/vm/vmtask.go +++ b/packages/vm/vmtask.go @@ -3,7 +3,7 @@ package vm import ( "time" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" diff --git a/packages/wal/wal.go b/packages/wal/wal.go index d1dcbddba8..3d6cd1a089 100644 --- a/packages/wal/wal.go +++ b/packages/wal/wal.go @@ -8,11 +8,12 @@ import ( "strconv" "sync" - "github.com/iotaledger/hive.go/logger" + "github.com/prometheus/client_golang/prometheus" + + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/state" - "github.com/prometheus/client_golang/prometheus" ) type WAL struct { diff --git a/packages/wasmvm/wasmclient/go/wasmclient/wasmclientsandbox.go b/packages/wasmvm/wasmclient/go/wasmclient/wasmclientsandbox.go index e1a91ca6a5..8e19fc5dab 100644 --- a/packages/wasmvm/wasmclient/go/wasmclient/wasmclientsandbox.go +++ b/packages/wasmvm/wasmclient/go/wasmclient/wasmclientsandbox.go @@ -4,6 +4,8 @@ package wasmclient import ( + "github.com/pkg/errors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmrequests" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" - "github.com/pkg/errors" ) func (s *WasmClientContext) ExportName(index int32, name string) { diff --git a/packages/wasmvm/wasmhost/wasmprocessor.go b/packages/wasmvm/wasmhost/wasmprocessor.go index 4353da46ac..d3bc8573e2 100644 --- a/packages/wasmvm/wasmhost/wasmprocessor.go +++ b/packages/wasmvm/wasmhost/wasmprocessor.go @@ -6,7 +6,7 @@ package wasmhost import ( "sync" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/isc" ) diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/consts.go b/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/consts.go index 80002f2bce..f313acf9af 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/consts.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/consts.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreaccounts import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/params.go b/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/params.go index 67c0703f05..4524c2db91 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/params.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/params.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreaccounts import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/results.go b/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/results.go index bc0aa278ae..ef782c2f16 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/results.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts/results.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreaccounts import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" @@ -87,7 +86,7 @@ type ImmutableAccountsResults struct { } func (s ImmutableAccountsResults) AllAccounts() MapAgentIDToImmutableBool { - return MapAgentIDToImmutableBool{proxy: s.proxy} + return MapAgentIDToImmutableBool(s) } type MapAgentIDToMutableBool struct { @@ -107,7 +106,7 @@ type MutableAccountsResults struct { } func (s MutableAccountsResults) AllAccounts() MapAgentIDToMutableBool { - return MapAgentIDToMutableBool{proxy: s.proxy} + return MapAgentIDToMutableBool(s) } type MapTokenIDToImmutableBigInt struct { @@ -123,7 +122,7 @@ type ImmutableBalanceResults struct { } func (s ImmutableBalanceResults) Balances() MapTokenIDToImmutableBigInt { - return MapTokenIDToImmutableBigInt{proxy: s.proxy} + return MapTokenIDToImmutableBigInt(s) } type MapTokenIDToMutableBigInt struct { @@ -143,7 +142,7 @@ type MutableBalanceResults struct { } func (s MutableBalanceResults) Balances() MapTokenIDToMutableBigInt { - return MapTokenIDToMutableBigInt{proxy: s.proxy} + return MapTokenIDToMutableBigInt(s) } type ImmutableFoundryOutputResults struct { @@ -191,7 +190,7 @@ type ImmutableGetNativeTokenIDRegistryResults struct { } func (s ImmutableGetNativeTokenIDRegistryResults) Mapping() MapTokenIDToImmutableBool { - return MapTokenIDToImmutableBool{proxy: s.proxy} + return MapTokenIDToImmutableBool(s) } type MapTokenIDToMutableBool struct { @@ -211,7 +210,7 @@ type MutableGetNativeTokenIDRegistryResults struct { } func (s MutableGetNativeTokenIDRegistryResults) Mapping() MapTokenIDToMutableBool { - return MapTokenIDToMutableBool{proxy: s.proxy} + return MapTokenIDToMutableBool(s) } type ImmutableNftDataResults struct { @@ -235,7 +234,7 @@ type ImmutableTotalAssetsResults struct { } func (s ImmutableTotalAssetsResults) Assets() MapTokenIDToImmutableBigInt { - return MapTokenIDToImmutableBigInt{proxy: s.proxy} + return MapTokenIDToImmutableBigInt(s) } type MutableTotalAssetsResults struct { @@ -243,5 +242,5 @@ type MutableTotalAssetsResults struct { } func (s MutableTotalAssetsResults) Assets() MapTokenIDToMutableBigInt { - return MapTokenIDToMutableBigInt{proxy: s.proxy} + return MapTokenIDToMutableBigInt(s) } diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreblob/consts.go b/packages/wasmvm/wasmlib/go/wasmlib/coreblob/consts.go index e0eaf954f4..7b264468e6 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreblob/consts.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreblob/consts.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreblob import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" @@ -22,7 +21,7 @@ const ( ParamField = "field" ParamHash = "hash" ParamProgBinary = "p" - ParamVmType = "v" + ParamVMType = "v" ) const ( diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreblob/params.go b/packages/wasmvm/wasmlib/go/wasmlib/coreblob/params.go index d9e3121358..17b5b6669f 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreblob/params.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreblob/params.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreblob import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" @@ -24,7 +23,7 @@ type ImmutableStoreBlobParams struct { // set of named blobs func (s ImmutableStoreBlobParams) Blobs() MapStringToImmutableBytes { - return MapStringToImmutableBytes{proxy: s.proxy} + return MapStringToImmutableBytes(s) } // description of progBinary @@ -38,8 +37,8 @@ func (s ImmutableStoreBlobParams) ProgBinary() wasmtypes.ScImmutableBytes { } // VM type that must be used to run progBinary -func (s ImmutableStoreBlobParams) VmType() wasmtypes.ScImmutableString { - return wasmtypes.NewScImmutableString(s.proxy.Root(ParamVmType)) +func (s ImmutableStoreBlobParams) VMType() wasmtypes.ScImmutableString { + return wasmtypes.NewScImmutableString(s.proxy.Root(ParamVMType)) } type MapStringToMutableBytes struct { @@ -60,7 +59,7 @@ type MutableStoreBlobParams struct { // set of named blobs func (s MutableStoreBlobParams) Blobs() MapStringToMutableBytes { - return MapStringToMutableBytes{proxy: s.proxy} + return MapStringToMutableBytes(s) } // description of progBinary @@ -74,8 +73,8 @@ func (s MutableStoreBlobParams) ProgBinary() wasmtypes.ScMutableBytes { } // VM type that must be used to run progBinary -func (s MutableStoreBlobParams) VmType() wasmtypes.ScMutableString { - return wasmtypes.NewScMutableString(s.proxy.Root(ParamVmType)) +func (s MutableStoreBlobParams) VMType() wasmtypes.ScMutableString { + return wasmtypes.NewScMutableString(s.proxy.Root(ParamVMType)) } type ImmutableGetBlobFieldParams struct { diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreblob/results.go b/packages/wasmvm/wasmlib/go/wasmlib/coreblob/results.go index e6f1ff2905..f496e648b5 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreblob/results.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreblob/results.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreblob import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" @@ -60,7 +59,7 @@ type ImmutableGetBlobInfoResults struct { // size for each named blob func (s ImmutableGetBlobInfoResults) BlobSizes() MapStringToImmutableInt32 { - return MapStringToImmutableInt32{proxy: s.proxy} + return MapStringToImmutableInt32(s) } type MapStringToMutableInt32 struct { @@ -81,7 +80,7 @@ type MutableGetBlobInfoResults struct { // size for each named blob func (s MutableGetBlobInfoResults) BlobSizes() MapStringToMutableInt32 { - return MapStringToMutableInt32{proxy: s.proxy} + return MapStringToMutableInt32(s) } type MapHashToImmutableInt32 struct { @@ -98,7 +97,7 @@ type ImmutableListBlobsResults struct { // total size for each blob set func (s ImmutableListBlobsResults) BlobSizes() MapHashToImmutableInt32 { - return MapHashToImmutableInt32{proxy: s.proxy} + return MapHashToImmutableInt32(s) } type MapHashToMutableInt32 struct { @@ -119,5 +118,5 @@ type MutableListBlobsResults struct { // total size for each blob set func (s MutableListBlobsResults) BlobSizes() MapHashToMutableInt32 { - return MapHashToMutableInt32{proxy: s.proxy} + return MapHashToMutableInt32(s) } diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/consts.go b/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/consts.go index 7d2fb6845f..858d888ceb 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/consts.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/consts.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreblocklog import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/params.go b/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/params.go index d813c7ae32..e96c04fb0b 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/params.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/params.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreblocklog import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/results.go b/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/results.go index bae9ff1b29..8f30c6fa53 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/results.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog/results.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreblocklog import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/consts.go b/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/consts.go index 2fa21bdea3..fb139ee61f 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/consts.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/consts.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coregovernance import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/params.go b/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/params.go index eca0d5d3a2..6ef6a98c79 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/params.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/params.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coregovernance import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/results.go b/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/results.go index 75b923802b..a977df502d 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/results.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coregovernance/results.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coregovernance import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreroot/consts.go b/packages/wasmvm/wasmlib/go/wasmlib/coreroot/consts.go index b4edb8005e..61cfcd94f9 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreroot/consts.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreroot/consts.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreroot import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" @@ -18,8 +17,8 @@ const ( const ( ParamCloseFunc = "bcc" - ParamDeployPermissionsEnabled = "de" ParamDeployer = "dp" + ParamDeployPermissionsEnabled = "de" ParamDescription = "ds" ParamHname = "hn" ParamName = "nm" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreroot/params.go b/packages/wasmvm/wasmlib/go/wasmlib/coreroot/params.go index fe9df111ae..daa5e95590 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreroot/params.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreroot/params.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreroot import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/coreroot/results.go b/packages/wasmvm/wasmlib/go/wasmlib/coreroot/results.go index d3a63ec4e9..bc5b966d2c 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/coreroot/results.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/coreroot/results.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package coreroot import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/wasmrequests/consts.go b/packages/wasmvm/wasmlib/go/wasmlib/wasmrequests/consts.go index de1c523843..f4df6e6a46 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/wasmrequests/consts.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/wasmrequests/consts.go @@ -5,7 +5,6 @@ // >>>> DO NOT CHANGE THIS FILE! <<<< // Change the json schema instead -//nolint:revive package wasmrequests import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" diff --git a/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/schash.go b/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/schash.go index a84355db32..f7443d3943 100644 --- a/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/schash.go +++ b/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes/schash.go @@ -1,7 +1,5 @@ // Copyright 2020 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 - -//nolint:dupl package wasmtypes // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ diff --git a/packages/wasmvm/wasmlib/src/coreroot/consts.rs b/packages/wasmvm/wasmlib/src/coreroot/consts.rs index 0590e73a53..ec611da6d8 100644 --- a/packages/wasmvm/wasmlib/src/coreroot/consts.rs +++ b/packages/wasmvm/wasmlib/src/coreroot/consts.rs @@ -14,8 +14,8 @@ pub const SC_DESCRIPTION : &str = "Root Contract"; pub const HSC_NAME : ScHname = ScHname(0xcebf5908); pub(crate) const PARAM_CLOSE_FUNC : &str = "bcc"; -pub(crate) const PARAM_DEPLOY_PERMISSIONS_ENABLED : &str = "de"; pub(crate) const PARAM_DEPLOYER : &str = "dp"; +pub(crate) const PARAM_DEPLOY_PERMISSIONS_ENABLED : &str = "de"; pub(crate) const PARAM_DESCRIPTION : &str = "ds"; pub(crate) const PARAM_HNAME : &str = "hn"; pub(crate) const PARAM_NAME : &str = "nm"; diff --git a/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/consts.ts b/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/consts.ts index 5c052e8dd1..a2052723fb 100644 --- a/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/consts.ts +++ b/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/consts.ts @@ -16,7 +16,7 @@ export const ParamDescription = "d"; export const ParamField = "field"; export const ParamHash = "hash"; export const ParamProgBinary = "p"; -export const ParamVmType = "v"; +export const ParamVMType = "v"; export const ResultBlobSizes = "this"; export const ResultBytes = "bytes"; diff --git a/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/params.ts b/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/params.ts index ea9a9ed1b1..d537fcd49f 100644 --- a/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/params.ts +++ b/packages/wasmvm/wasmlib/ts/wasmlib/coreblob/params.ts @@ -33,7 +33,7 @@ export class ImmutableStoreBlobParams extends wasmtypes.ScProxy { // VM type that must be used to run progBinary vmType(): wasmtypes.ScImmutableString { - return new wasmtypes.ScImmutableString(this.proxy.root(sc.ParamVmType)); + return new wasmtypes.ScImmutableString(this.proxy.root(sc.ParamVMType)); } } @@ -66,7 +66,7 @@ export class MutableStoreBlobParams extends wasmtypes.ScProxy { // VM type that must be used to run progBinary vmType(): wasmtypes.ScMutableString { - return new wasmtypes.ScMutableString(this.proxy.root(sc.ParamVmType)); + return new wasmtypes.ScMutableString(this.proxy.root(sc.ParamVMType)); } } diff --git a/packages/wasmvm/wasmlib/ts/wasmlib/coreroot/consts.ts b/packages/wasmvm/wasmlib/ts/wasmlib/coreroot/consts.ts index 3eaa454c62..be983bd249 100644 --- a/packages/wasmvm/wasmlib/ts/wasmlib/coreroot/consts.ts +++ b/packages/wasmvm/wasmlib/ts/wasmlib/coreroot/consts.ts @@ -12,8 +12,8 @@ export const ScDescription = "Root Contract"; export const HScName = new wasmtypes.ScHname(0xcebf5908); export const ParamCloseFunc = "bcc"; -export const ParamDeployPermissionsEnabled = "de"; export const ParamDeployer = "dp"; +export const ParamDeployPermissionsEnabled = "de"; export const ParamDescription = "ds"; export const ParamHname = "hn"; export const ParamName = "nm"; diff --git a/packages/wasmvm/wasmsolo/soloagent.go b/packages/wasmvm/wasmsolo/soloagent.go index b6bb7766b4..de5b826ec6 100644 --- a/packages/wasmvm/wasmsolo/soloagent.go +++ b/packages/wasmvm/wasmsolo/soloagent.go @@ -4,12 +4,13 @@ package wasmsolo import ( + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/solo" "github.com/iotaledger/wasp/packages/wasmvm/wasmhost" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" - "github.com/stretchr/testify/require" ) type SoloAgent struct { diff --git a/packages/wasmvm/wasmsolo/solobalances.go b/packages/wasmvm/wasmsolo/solobalances.go index 22ee25aa29..e446908059 100644 --- a/packages/wasmvm/wasmsolo/solobalances.go +++ b/packages/wasmvm/wasmsolo/solobalances.go @@ -8,8 +8,9 @@ import ( "sort" "testing" - "github.com/iotaledger/wasp/packages/isc" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/isc" ) type SoloBalances struct { diff --git a/packages/wasmvm/wasmsolo/soloclientservice.go b/packages/wasmvm/wasmsolo/soloclientservice.go index ace67efc64..c282bfc4fc 100644 --- a/packages/wasmvm/wasmsolo/soloclientservice.go +++ b/packages/wasmvm/wasmsolo/soloclientservice.go @@ -4,6 +4,8 @@ import ( "strings" "time" + "github.com/pkg/errors" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/solo" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/wasmvm/wasmhost" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" - "github.com/pkg/errors" ) type SoloClientService struct { diff --git a/packages/wasmvm/wasmsolo/solocontext.go b/packages/wasmvm/wasmsolo/solocontext.go index 5608527a5a..a04ee6e80a 100644 --- a/packages/wasmvm/wasmsolo/solocontext.go +++ b/packages/wasmvm/wasmsolo/solocontext.go @@ -8,6 +8,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/hashing" @@ -19,7 +21,6 @@ import ( "github.com/iotaledger/wasp/packages/wasmvm/wasmhost" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes" - "github.com/stretchr/testify/require" ) const ( diff --git a/packages/wasmvm/wasmsolo/solosandbox.go b/packages/wasmvm/wasmsolo/solosandbox.go index e351c00562..d78d9396bd 100644 --- a/packages/wasmvm/wasmsolo/solosandbox.go +++ b/packages/wasmvm/wasmsolo/solosandbox.go @@ -7,6 +7,8 @@ import ( "bytes" "errors" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/solo" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/wasmvm/wasmhost" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib" "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmrequests" - "golang.org/x/xerrors" ) // SoloSandbox acts as a temporary host side of the WasmLib Sandbox interface. diff --git a/packages/wasp/constants.go b/packages/wasp/constants.go index d02a18fd07..9fb14dec1c 100644 --- a/packages/wasp/constants.go +++ b/packages/wasp/constants.go @@ -4,7 +4,7 @@ var VersionHash string const ( // Version version number - Version = "0.3.0" + Version = "0.3.1" // Name app code name Name = "Wasp" diff --git a/packages/webapi/admapi/activatechain.go b/packages/webapi/admapi/activatechain.go index e9168354c6..02608c4053 100644 --- a/packages/webapi/admapi/activatechain.go +++ b/packages/webapi/admapi/activatechain.go @@ -7,6 +7,9 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" @@ -19,8 +22,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) type chainWebAPI struct { diff --git a/packages/webapi/admapi/chainmetrics.go b/packages/webapi/admapi/chainmetrics.go index c3a31413a2..51f399b5cd 100644 --- a/packages/webapi/admapi/chainmetrics.go +++ b/packages/webapi/admapi/chainmetrics.go @@ -5,14 +5,15 @@ import ( "net/http" "time" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) func addChainMetricsEndpoints(adm echoswagger.ApiGroup, chainsProvider chains.Provider) { diff --git a/packages/webapi/admapi/chainrecord.go b/packages/webapi/admapi/chainrecord.go index 2d90d87a32..bb9dfb7c37 100644 --- a/packages/webapi/admapi/chainrecord.go +++ b/packages/webapi/admapi/chainrecord.go @@ -4,13 +4,14 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) func addChainRecordEndpoints(adm echoswagger.ApiGroup, registryProvider registry.Provider) { diff --git a/packages/webapi/admapi/dkshares.go b/packages/webapi/admapi/dkshares.go index 09675da82b..dcac789f87 100644 --- a/packages/webapi/admapi/dkshares.go +++ b/packages/webapi/admapi/dkshares.go @@ -11,6 +11,9 @@ import ( "net/http" "time" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/dkg" @@ -21,8 +24,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) func addDKSharesEndpoints(adm echoswagger.ApiGroup, registryProvider registry.Provider, nodeProvider dkg.NodeProvider) { diff --git a/packages/webapi/admapi/endpoints.go b/packages/webapi/admapi/endpoints.go index a21dd89e8f..9f160c6ccd 100644 --- a/packages/webapi/admapi/endpoints.go +++ b/packages/webapi/admapi/endpoints.go @@ -4,26 +4,23 @@ package admapi import ( - "github.com/iotaledger/hive.go/logger" + "github.com/pangpanglabs/echoswagger/v2" + + loggerpkg "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/authentication" "github.com/iotaledger/wasp/packages/authentication/shared/permissions" "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/dkg" metricspkg "github.com/iotaledger/wasp/packages/metrics" - "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/wal" - "github.com/pangpanglabs/echoswagger/v2" ) -var log *logger.Logger - -func initLogger() { - log = logger.NewLogger("webapi/adm") -} +var log *loggerpkg.Logger func AddEndpoints( + logger *loggerpkg.Logger, adm echoswagger.ApiGroup, network peering.NetworkProvider, tnm peering.TrustedNetworkManager, @@ -33,17 +30,19 @@ func AddEndpoints( shutdown ShutdownFunc, metrics *metricspkg.Metrics, w *wal.WAL, + authConfig authentication.AuthConfiguration, + nodeOwnerAddresses []string, ) { - initLogger() + log = logger claimValidator := func(claims *authentication.WaspClaims) bool { // The API will be accessible if the token has an 'API' claim return claims.HasPermission(permissions.API) } - authentication.AddAuthentication(adm.EchoGroup(), registryProvider, parameters.WebAPIAuth, claimValidator) + authentication.AddAuthentication(adm.EchoGroup(), registryProvider, authConfig, claimValidator) addShutdownEndpoint(adm, shutdown) - addNodeOwnerEndpoints(adm, registryProvider) + addNodeOwnerEndpoints(adm, registryProvider, nodeOwnerAddresses) addChainRecordEndpoints(adm, registryProvider) addChainMetricsEndpoints(adm, chainsProvider) addChainEndpoints(adm, &chainWebAPI{ diff --git a/packages/webapi/admapi/node_owner.go b/packages/webapi/admapi/node_owner.go index 431bab1112..acc9c6c9d4 100644 --- a/packages/webapi/admapi/node_owner.go +++ b/packages/webapi/admapi/node_owner.go @@ -7,19 +7,22 @@ import ( "bytes" "net/http" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) -func addNodeOwnerEndpoints(adm echoswagger.ApiGroup, registryProvider registry.Provider) { +func addNodeOwnerEndpoints(adm echoswagger.ApiGroup, registryProvider registry.Provider, nodeOwnerAddresses []string) { + nos := &nodeOwnerService{ + nodeOwnerAddresses: nodeOwnerAddresses, + } addCtx := func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { c.Set("reg", registryProvider) @@ -33,13 +36,17 @@ func addNodeOwnerEndpoints(adm echoswagger.ApiGroup, registryProvider registry.P resExample := model.NodeOwnerCertificateResponse{ Certificate: model.NewBytes([]byte{0, 1, 17, 19}), } - adm.POST(routes.AdmNodeOwnerCertificate(), handleAdmNodeOwnerCertificate, addCtx). + adm.POST(routes.AdmNodeOwnerCertificate(), nos.handleAdmNodeOwnerCertificate, addCtx). AddParamBody(reqExample, "Request", "Certificate request", true). AddResponse(http.StatusOK, "Generated certificate.", resExample, nil). SetSummary("Provides a certificate, if the node recognizes the owner.") } -func handleAdmNodeOwnerCertificate(c echo.Context) error { +type nodeOwnerService struct { + nodeOwnerAddresses []string +} + +func (n *nodeOwnerService) handleAdmNodeOwnerCertificate(c echo.Context) error { registryProvider := c.Get("reg").(registry.Provider) var req model.NodeOwnerCertificateRequest @@ -59,9 +66,8 @@ func handleAdmNodeOwnerCertificate(c echo.Context) error { // // Check, if owner is presented in the configuration. - nodeOwnerAddresses := parameters.GetStringSlice(parameters.NodeOwnerAddresses) ownerAuthorized := false - for _, nodeOwnerAddressStr := range nodeOwnerAddresses { + for _, nodeOwnerAddressStr := range n.nodeOwnerAddresses { _, nodeOwnerAddress, err := iotago.ParseBech32(nodeOwnerAddressStr) if err != nil { continue diff --git a/packages/webapi/admapi/peering.go b/packages/webapi/admapi/peering.go index 3f30dd0fa0..9ae6caa346 100644 --- a/packages/webapi/admapi/peering.go +++ b/packages/webapi/admapi/peering.go @@ -8,13 +8,14 @@ import ( "github.com/mr-tron/base58" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) func addPeeringEndpoints(adm echoswagger.ApiGroup, network peering.NetworkProvider, tnm peering.TrustedNetworkManager) { diff --git a/packages/webapi/admapi/shutdown.go b/packages/webapi/admapi/shutdown.go index 169ec65369..4b51dd5f94 100644 --- a/packages/webapi/admapi/shutdown.go +++ b/packages/webapi/admapi/shutdown.go @@ -3,9 +3,10 @@ package admapi import ( "net/http" - "github.com/iotaledger/wasp/packages/webapi/routes" "github.com/labstack/echo/v4" "github.com/pangpanglabs/echoswagger/v2" + + "github.com/iotaledger/wasp/packages/webapi/routes" ) type ShutdownFunc func() diff --git a/packages/webapi/endpoints.go b/packages/webapi/endpoints.go index f8f7d23a6e..934d81b35e 100644 --- a/packages/webapi/endpoints.go +++ b/packages/webapi/endpoints.go @@ -6,12 +6,15 @@ package webapi import ( "time" - "github.com/iotaledger/hive.go/logger" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + + loggerpkg "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/authentication" "github.com/iotaledger/wasp/packages/chain/chainutil" "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/dkg" metricspkg "github.com/iotaledger/wasp/packages/metrics" - "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/wal" @@ -21,13 +24,12 @@ import ( "github.com/iotaledger/wasp/packages/webapi/reqstatus" "github.com/iotaledger/wasp/packages/webapi/request" "github.com/iotaledger/wasp/packages/webapi/state" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) -var log *logger.Logger +var log *loggerpkg.Logger func Init( + logger *loggerpkg.Logger, server echoswagger.ApiRoot, network peering.NetworkProvider, tnm peering.TrustedNetworkManager, @@ -37,8 +39,12 @@ func Init( shutdown admapi.ShutdownFunc, metrics *metricspkg.Metrics, w *wal.WAL, + authConfig authentication.AuthConfiguration, + nodeOwnerAddresses []string, + apiCacheTTL time.Duration, + publisherPort int, ) { - log = logger.NewLogger("WebAPI") + log = logger server.SetRequestContentType(echo.MIMEApplicationJSON) server.SetResponseContentType(echo.MIMEApplicationJSON) @@ -46,7 +52,7 @@ func Init( pub := server.Group("public", "").SetDescription("Public endpoints") addWebSocketEndpoint(pub, log) - info.AddEndpoints(pub, network) + info.AddEndpoints(pub, network, publisherPort) reqstatus.AddEndpoints(pub, chainsProvider.ChainProvider()) state.AddEndpoints(pub, chainsProvider) evm.AddEndpoints(pub, chainsProvider, network.Self().PubKey) @@ -57,13 +63,14 @@ func Init( chainutil.HasRequestBeenProcessed, chainutil.CheckNonce, network.Self().PubKey(), - time.Duration(parameters.GetInt(parameters.OffledgerAPICacheTTL))*time.Second, + apiCacheTTL, log, ) adm := server.Group("admin", "").SetDescription("Admin endpoints") admapi.AddEndpoints( + logger.Named("webapi/adm"), adm, network, tnm, @@ -73,6 +80,8 @@ func Init( shutdown, metrics, w, + authConfig, + nodeOwnerAddresses, ) log.Infof("added web api endpoints") } diff --git a/packages/webapi/evm/jsonrpc.go b/packages/webapi/evm/jsonrpc.go index 083c4d8c21..cfc1a78cfa 100644 --- a/packages/webapi/evm/jsonrpc.go +++ b/packages/webapi/evm/jsonrpc.go @@ -7,6 +7,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/cryptolib" @@ -18,8 +21,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) type jsonRPCService struct { diff --git a/packages/webapi/evm/waspbackend.go b/packages/webapi/evm/waspbackend.go index fb12a972ec..de09df7c91 100644 --- a/packages/webapi/evm/waspbackend.go +++ b/packages/webapi/evm/waspbackend.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/chainutil" "github.com/iotaledger/wasp/packages/chain/messages" diff --git a/packages/webapi/info/info.go b/packages/webapi/info/info.go index ef277b30ec..00028f2847 100644 --- a/packages/webapi/info/info.go +++ b/packages/webapi/info/info.go @@ -3,21 +3,25 @@ package info import ( "net/http" - "github.com/iotaledger/wasp/packages/parameters" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/packages/wasp" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) type infoService struct { - network peering.NetworkProvider + network peering.NetworkProvider + publisherPort int } -func AddEndpoints(server echoswagger.ApiRouter, network peering.NetworkProvider) { - s := &infoService{network} +func AddEndpoints(server echoswagger.ApiRouter, network peering.NetworkProvider, publisherPort int) { + s := &infoService{ + network: network, + publisherPort: publisherPort, + } server.GET(routes.Info(), s.handleInfo). SetSummary("Get information about the node"). @@ -29,6 +33,6 @@ func (s *infoService) handleInfo(c echo.Context) error { Version: wasp.Version, VersionHash: wasp.VersionHash, NetworkID: s.network.Self().NetID(), - PublisherPort: parameters.GetInt(parameters.NanomsgPublisherPort), + PublisherPort: s.publisherPort, }) } diff --git a/packages/webapi/model/httperror.go b/packages/webapi/model/httperror.go index ac6052692f..fea47be998 100644 --- a/packages/webapi/model/httperror.go +++ b/packages/webapi/model/httperror.go @@ -1,10 +1,9 @@ package model import ( + "errors" "fmt" "net/http" - - "golang.org/x/xerrors" ) // HTTPError is the standard error response for all webapi endpoints, and also implements @@ -30,6 +29,6 @@ func (e *HTTPError) Error() string { // IsHTTPNotFound returns true if the error is an HTTPError with status code http.StatusNotFound func IsHTTPNotFound(e error) bool { var he *HTTPError - ok := xerrors.As(e, &he) + ok := errors.As(e, &he) return ok && he.StatusCode == http.StatusNotFound } diff --git a/packages/webapi/reqstatus/reqstatus.go b/packages/webapi/reqstatus/reqstatus.go index 12b386d8b1..40c469e182 100644 --- a/packages/webapi/reqstatus/reqstatus.go +++ b/packages/webapi/reqstatus/reqstatus.go @@ -6,6 +6,10 @@ import ( "net/http" "time" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "golang.org/x/xerrors" + "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/isc" @@ -15,9 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" - "golang.org/x/xerrors" ) type reqstatusWebAPI struct { diff --git a/packages/webapi/reqstatus/reqstatus_test.go b/packages/webapi/reqstatus/reqstatus_test.go index d7a301af0d..15730bb075 100644 --- a/packages/webapi/reqstatus/reqstatus_test.go +++ b/packages/webapi/reqstatus/reqstatus_test.go @@ -4,7 +4,9 @@ import ( "net/http" "testing" - "github.com/iotaledger/hive.go/events" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/events" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/messages" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" "github.com/iotaledger/wasp/packages/webapi/testutil" - "github.com/stretchr/testify/require" ) type mockChain struct{} diff --git a/packages/webapi/request/request.go b/packages/webapi/request/request.go index cfb0d31ffc..582781aedd 100644 --- a/packages/webapi/request/request.go +++ b/packages/webapi/request/request.go @@ -7,8 +7,11 @@ import ( "strings" "time" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/marshalutil" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/hive.go/core/marshalutil" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/messages" "github.com/iotaledger/wasp/packages/chains" @@ -18,8 +21,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) type ( diff --git a/packages/webapi/request/request_test.go b/packages/webapi/request/request_test.go index eafa44e12d..01827b2a78 100644 --- a/packages/webapi/request/request_test.go +++ b/packages/webapi/request/request_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/hive.go/core/kvstore" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/chain" "github.com/iotaledger/wasp/packages/chain/messages" diff --git a/packages/webapi/state/callview.go b/packages/webapi/state/callview.go index 031ccec6c5..1daa9b4423 100644 --- a/packages/webapi/state/callview.go +++ b/packages/webapi/state/callview.go @@ -7,6 +7,9 @@ import ( "fmt" "net/http" + "github.com/labstack/echo/v4" + "github.com/pangpanglabs/echoswagger/v2" + "github.com/iotaledger/wasp/packages/chain/chainutil" "github.com/iotaledger/wasp/packages/chains" "github.com/iotaledger/wasp/packages/isc" @@ -16,8 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/optimism" "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/iotaledger/wasp/packages/webapi/routes" - "github.com/labstack/echo/v4" - "github.com/pangpanglabs/echoswagger/v2" ) type callViewService struct { diff --git a/packages/webapi/testutil/httptest.go b/packages/webapi/testutil/httptest.go index b4cbc2959e..d937e6a7cb 100644 --- a/packages/webapi/testutil/httptest.go +++ b/packages/webapi/testutil/httptest.go @@ -10,9 +10,10 @@ import ( "testing" "github.com/PuerkitoBio/goquery" - "github.com/iotaledger/wasp/packages/webapi/httperrors" "github.com/labstack/echo/v4" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/packages/webapi/httperrors" ) func buildRequest(t *testing.T, method string, body interface{}) *http.Request { diff --git a/packages/webapi/websocket.go b/packages/webapi/websocket.go index c34e57aeb2..457fc57d35 100644 --- a/packages/webapi/websocket.go +++ b/packages/webapi/websocket.go @@ -3,11 +3,12 @@ package webapi import ( _ "embed" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/publisher/publisherws" "github.com/labstack/echo/v4" "github.com/pangpanglabs/echoswagger/v2" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/isc" + "github.com/iotaledger/wasp/packages/publisher/publisherws" ) type webSocketAPI struct { diff --git a/plugins/banner/plugin.go b/plugins/banner/plugin.go deleted file mode 100644 index fcfacc38e4..0000000000 --- a/plugins/banner/plugin.go +++ /dev/null @@ -1,36 +0,0 @@ -package banner - -import ( - "fmt" - - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/wasp" -) - -// PluginName is the name of the banner plugin. -const PluginName = "Banner" - -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func configure(ctx *node.Plugin) { - fmt.Printf(` - __ __ - \ \ / / - \ \ /\ / /_ _ ___ _ __ - \ \/ \/ / _| / __| |_ \ - \ /\ / (_| \__ \ |_) | - \/ \/ \__,_|___/ |__/ - | | - |_| - %s (commit: %s) -`, wasp.Version, wasp.VersionHash) - fmt.Println() - - // TODO embed build time see https://stackoverflow.com/questions/53031035/generate-build-timestamp-in-go/53045029 - ctx.Node.Logger.Info("Loading plugins ...") -} - -func run(_ *node.Plugin) { -} diff --git a/plugins/chains/plugin.go b/plugins/chains/plugin.go deleted file mode 100644 index d146e7896c..0000000000 --- a/plugins/chains/plugin.go +++ /dev/null @@ -1,80 +0,0 @@ -package chains - -import ( - "context" - "time" - - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - _ "github.com/iotaledger/wasp/packages/chain/chainimpl" - "github.com/iotaledger/wasp/packages/chains" - metricspkg "github.com/iotaledger/wasp/packages/metrics" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/packages/util/ready" - "github.com/iotaledger/wasp/plugins/database" - "github.com/iotaledger/wasp/plugins/metrics" - "github.com/iotaledger/wasp/plugins/nodeconn" - "github.com/iotaledger/wasp/plugins/peering" - "github.com/iotaledger/wasp/plugins/processors" - "github.com/iotaledger/wasp/plugins/registry" - "github.com/iotaledger/wasp/plugins/wal" -) - -const PluginName = "Chains" - -var ( - log *logger.Logger - allChains *chains.Chains - allMetrics *metricspkg.Metrics - initialized = ready.New(PluginName) -) - -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func configure(_ *node.Plugin) { - log = logger.NewLogger(PluginName) -} - -func run(_ *node.Plugin) { - allChains = chains.New( - log, - processors.Config, - parameters.GetInt(parameters.OffledgerBroadcastUpToNPeers), - time.Duration(parameters.GetInt(parameters.OffledgerBroadcastInterval))*time.Millisecond, - parameters.GetBool(parameters.PullMissingRequestsFromCommittee), - peering.DefaultNetworkProvider(), - database.GetOrCreateKVStore, - ) - err := daemon.BackgroundWorker(PluginName, func(ctx context.Context) { - if parameters.GetBool(parameters.MetricsEnabled) { - allMetrics = metrics.AllMetrics() - } - allChains.SetNodeConn(nodeconn.NodeConnection()) - if err := allChains.ActivateAllFromRegistry(registry.DefaultRegistry, allMetrics, wal.GetWAL()); err != nil { - log.Errorf("failed to read chain activation records from registry: %v", err) - return - } - - initialized.SetReady() - - <-ctx.Done() - - log.Info("dismissing chains...") - go func() { - allChains.Dismiss() - log.Info("dismissing chains... Done") - }() - }, parameters.PriorityChains) - if err != nil { - log.Error(err) - return - } -} - -func AllChains() *chains.Chains { - initialized.MustWait(5 * time.Second) - return allChains -} diff --git a/plugins/config/plugin.go b/plugins/config/plugin.go deleted file mode 100644 index 6167883c48..0000000000 --- a/plugins/config/plugin.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -package config - -import ( - "fmt" - "os" - - "github.com/iotaledger/hive.go/configuration" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/node" - flag "github.com/spf13/pflag" - "go.uber.org/dig" -) - -// PluginName is the name of the config plugin. -const PluginName = "Config" - -const ( - // CfgDisablePlugins contains the name of the parameter that allows to manually disable node plugins. - CfgDisablePlugins = "node.disablePlugins" - - // CfgEnablePlugins contains the name of the parameter that allows to manually enable node plugins. - CfgEnablePlugins = "node.enablePlugins" -) - -func Init(conf *configuration.Configuration) *node.Plugin { - plugin := node.NewPlugin(PluginName, nil, node.Enabled) - - plugin.Events.Init.Attach(events.NewClosure(func(*node.Plugin, *dig.Container) { - if skipConfigAvailable, err := fetch(conf, false); err != nil { - if !skipConfigAvailable { - // we wanted a config file but it was not present - // global logger instance is not initialized at this stage... - fmt.Println(err.Error()) - fmt.Println("no config file present, terminating Wasp. please use the provided config.default.json to create a config.json.") - // daemon is not running yet, so we just exit - os.Exit(1) - } - panic(err) - } - })) - - return plugin -} - -// fetch fetches config values from a dir defined via CLI flag --config-dir (or the current working dir if not set). -// -// It automatically reads in a single config file starting with "config" (can be changed via the --config CLI flag) -// and ending with: .json, .toml, .yaml or .yml (in this sequence). -func fetch(conf *configuration.Configuration, printConfig bool, ignoreSettingsAtPrint ...[]string) (bool, error) { - // flags - configFilePath := flag.StringP("config", "c", "config.json", "File path of the config file") - skipConfigAvailable := flag.Bool("skip-config", false, "Skip config file availability check") - - flag.Parse() - - err := conf.LoadFile(*configFilePath) - if err != nil { - return *skipConfigAvailable, err - } - - if err := conf.LoadFlagSet(flag.CommandLine); err != nil { - return *skipConfigAvailable, err - } - - // read in ENV variables - // load the env vars after default values from flags were set (otherwise the env vars are not added because the keys don't exist) - if err := conf.LoadEnvironmentVars(""); err != nil { - return *skipConfigAvailable, err - } - - // load the flags again to overwrite env vars that were also set via command line - if err := conf.LoadFlagSet(flag.CommandLine); err != nil { - return *skipConfigAvailable, err - } - - if printConfig { - conf.Print(ignoreSettingsAtPrint...) - } - - for _, pluginName := range conf.Strings(CfgDisablePlugins) { - node.DisabledPlugins[node.GetPluginIdentifier(pluginName)] = true - } - for _, pluginName := range conf.Strings(CfgEnablePlugins) { - node.EnabledPlugins[node.GetPluginIdentifier(pluginName)] = true - } - - return *skipConfigAvailable, nil -} diff --git a/plugins/dashboard/plugin.go b/plugins/dashboard/component.go similarity index 77% rename from plugins/dashboard/plugin.go rename to plugins/dashboard/component.go index 35e1efdc05..177e5c6ca6 100644 --- a/plugins/dashboard/plugin.go +++ b/plugins/dashboard/component.go @@ -10,9 +10,14 @@ import ( "strings" "time" - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" + "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" + "github.com/labstack/gommon/log" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/core/chains" + "github.com/iotaledger/wasp/core/peering" + "github.com/iotaledger/wasp/core/registry" "github.com/iotaledger/wasp/packages/authentication" "github.com/iotaledger/wasp/packages/authentication/shared/permissions" "github.com/iotaledger/wasp/packages/chain" @@ -21,26 +26,57 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/kv/optimism" "github.com/iotaledger/wasp/packages/metrics/nodeconnmetrics" - "github.com/iotaledger/wasp/packages/parameters" registry_pkg "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/packages/vm/viewcontext" - "github.com/iotaledger/wasp/plugins/chains" - "github.com/iotaledger/wasp/plugins/peering" - "github.com/iotaledger/wasp/plugins/registry" - "github.com/labstack/echo/v4" - "github.com/labstack/echo/v4/middleware" ) -const PluginName = "Dashboard" +func init() { + Plugin = &app.Plugin{ + Component: &app.Component{ + Name: "Dashboard", + Params: params, + Configure: configure, + Run: run, + }, + IsEnabled: func() bool { + return ParamsDashboard.Enabled + }, + } +} var ( + Plugin *app.Plugin Server = echo.New() - log *logger.Logger d *dashboard.Dashboard ) -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) +func configure() error { + Server.HideBanner = true + Server.HidePort = true + Server.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ + Format: `${time_rfc3339_nano} ${remote_ip} ${method} ${uri} ${status} error="${error}"` + "\n", + })) + Server.Use(middleware.Recover()) + + claimValidator := func(claims *authentication.WaspClaims) bool { + // The Dashboard will be accessible if the token has a 'Dashboard' claim + return claims.HasPermission(permissions.Dashboard) + } + + authentication.AddAuthentication(Server, registry.DefaultRegistry, ParamsDashboard.Auth, claimValidator) + + d = dashboard.Init(Server, &waspServices{}, Plugin.Logger()) + + return nil +} + +func run() error { + log.Infof("Starting %s ...", Plugin.Name) + if err := Plugin.Daemon().BackgroundWorker(Plugin.Name, worker); err != nil { + log.Errorf("error starting as daemon: %s", err) + } + + return nil } type waspServices struct{} @@ -48,12 +84,12 @@ type waspServices struct{} var _ dashboard.WaspServices = &waspServices{} func (w *waspServices) ConfigDump() map[string]interface{} { - return parameters.Dump() + return Plugin.App().Config().Koanf().All() } func (*waspServices) WebAPIPort() string { port := "80" - parts := strings.Split(parameters.GetString(parameters.WebAPIBindAddress), ":") + parts := strings.Split(ParamsDashboard.BindAddress, ":") if len(parts) == 2 { port = parts[1] } @@ -61,12 +97,7 @@ func (*waspServices) WebAPIPort() string { } func (w *waspServices) ExploreAddressBaseURL() string { - baseURL := parameters.GetString(parameters.DashboardExploreAddressURL) - if baseURL != "" { - return baseURL - } - // TODO what should be this URL? - return exploreAddressURLFromL1URI(parameters.GetString("TODO")) + return ParamsDashboard.ExploreAddressURL } func (w *waspServices) PeeringStats() (*dashboard.PeeringStats, error) { @@ -165,47 +196,12 @@ func (w *waspServices) CallView(chainID *isc.ChainID, scName, funName string, pa return ret, err } -func exploreAddressURLFromL1URI(uri string) string { - url := strings.Split(uri, ":")[0] + ":8081/explorer/address" - if !strings.HasPrefix(url, "http") { - return "http://" + url - } - return url -} - -func configure(*node.Plugin) { - log = logger.NewLogger(PluginName) - - Server.HideBanner = true - Server.HidePort = true - Server.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ - Format: `${time_rfc3339_nano} ${remote_ip} ${method} ${uri} ${status} error="${error}"` + "\n", - })) - Server.Use(middleware.Recover()) - - claimValidator := func(claims *authentication.WaspClaims) bool { - // The Dashboard will be accessible if the token has a 'Dashboard' claim - return claims.HasPermission(permissions.Dashboard) - } - - authentication.AddAuthentication(Server, registry.DefaultRegistry, parameters.DashboardAuth, claimValidator) - - d = dashboard.Init(Server, &waspServices{}, log) -} - -func run(_ *node.Plugin) { - log.Infof("Starting %s ...", PluginName) - if err := daemon.BackgroundWorker(PluginName, worker); err != nil { - log.Errorf("error starting as daemon: %s", err) - } -} - func worker(ctx context.Context) { stopped := make(chan struct{}) go func() { defer close(stopped) - bindAddr := parameters.GetString(parameters.DashboardBindAddress) - log.Infof("%s started, bind address=%s", PluginName, bindAddr) + bindAddr := ParamsDashboard.BindAddress + log.Infof("%s started, bind address=%s", Plugin.Name, bindAddr) if err := Server.Start(bindAddr); err != nil { if !errors.Is(err, http.ErrServerClosed) { log.Errorf("error serving: %s", err) @@ -218,14 +214,14 @@ func worker(ctx context.Context) { case <-stopped: } - log.Infof("Stopping %s ...", PluginName) - defer log.Infof("Stopping %s ... done", PluginName) + log.Infof("Stopping %s ...", Plugin.Name) + defer log.Infof("Stopping %s ... done", Plugin.Name) d.Stop() ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - if err := Server.Shutdown(ctx); err != nil { + if err := Server.Shutdown(ctx); err != nil { //nolint:contextcheck // false positive log.Errorf("error stopping: %s", err) } } diff --git a/plugins/dashboard/params.go b/plugins/dashboard/params.go new file mode 100644 index 0000000000..375388d21d --- /dev/null +++ b/plugins/dashboard/params.go @@ -0,0 +1,26 @@ +package dashboard + +import ( + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/packages/authentication" +) + +type ParametersDashboard struct { + Enabled bool `default:"true" usage:"whether the dashboard plugin is enabled"` + BindAddress string `default:"127.0.0.1:7000" usage:"the bind address for the node dashboard"` + ExploreAddressURL string `default:"" usage:"URL to add as href to addresses in the dashboard"` + Auth authentication.AuthConfiguration `usage:"configures the authentication for the dashboard service"` +} + +var ParamsDashboard = &ParametersDashboard{ + Auth: authentication.AuthConfiguration{ + Scheme: "basic", + }, +} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "dashboard": ParamsDashboard, + }, + Masked: nil, +} diff --git a/plugins/database/plugin.go b/plugins/database/plugin.go deleted file mode 100644 index 1d47ca7de7..0000000000 --- a/plugins/database/plugin.go +++ /dev/null @@ -1,67 +0,0 @@ -// Package database is a plugin that manages the badger database (e.g. garbage collection). -package database - -import ( - "context" - - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/database/dbmanager" - "github.com/iotaledger/wasp/packages/isc" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/packages/registry" -) - -const pluginName = "Database" - -var log *logger.Logger - -var dbm *dbmanager.DBManager - -// Init is an entry point for the plugin. -func Init() *node.Plugin { - return node.NewPlugin(pluginName, nil, node.Enabled, configure, run) -} - -func configure(_ *node.Plugin) { - log = logger.NewLogger(pluginName) - dbm = dbmanager.NewDBManager(logger.NewLogger("dbmanager"), parameters.GetBool(parameters.DatabaseInMemory), registryConfig()) - - // we open the database in the configure, so we must also make sure it's closed here - err := daemon.BackgroundWorker(pluginName, func(ctx context.Context) { - <-ctx.Done() - log.Infof("syncing database to disk...") - dbm.Close() - log.Infof("syncing database to disk... done") - }, parameters.PriorityDatabase) - if err != nil { - log.Panicf("failed to start a daemon: %s", err) - } -} - -func run(_ *node.Plugin) { - err := daemon.BackgroundWorker(pluginName+"[GC]", dbm.RunGC, parameters.PriorityDBGarbageCollection) - if err != nil { - log.Errorf("failed to start as daemon: %s", err) - } -} - -func registryConfig() *registry.Config { - useText := parameters.GetBool(parameters.RegistryUseText) - filename := parameters.GetString(parameters.RegistryFile) - return ®istry.Config{UseText: useText, Filename: filename} -} - -func GetRegistryKVStore() kvstore.KVStore { - return dbm.GetRegistryKVStore() -} - -func GetOrCreateKVStore(chainID *isc.ChainID) kvstore.KVStore { - return dbm.GetOrCreateKVStore(chainID) -} - -func GetKVStore(chainID *isc.ChainID) kvstore.KVStore { - return dbm.GetKVStore(chainID) -} diff --git a/plugins/dkg/plugin.go b/plugins/dkg/plugin.go deleted file mode 100644 index 4a38415b4f..0000000000 --- a/plugins/dkg/plugin.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2020 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -package dkg - -import ( - "github.com/iotaledger/hive.go/logger" - hive_node "github.com/iotaledger/hive.go/node" - dkg_pkg "github.com/iotaledger/wasp/packages/dkg" - "github.com/iotaledger/wasp/plugins/peering" - "github.com/iotaledger/wasp/plugins/registry" - "go.uber.org/zap" - "golang.org/x/xerrors" -) - -const pluginName = "DKG" - -var defaultNode *dkg_pkg.Node // A singleton. - -// Init is an entry point for the plugin. -func Init() *hive_node.Plugin { - configure := func(_ *hive_node.Plugin) { - log := logger.NewLogger(pluginName) - reg := registry.DefaultRegistry() - peeringProvider := peering.DefaultNetworkProvider() - var err error - defaultNode, err = dkg_pkg.NewNode( - reg.GetNodeIdentity(), - peeringProvider, - reg, - log.Desugar().WithOptions(zap.IncreaseLevel(logger.LevelWarn)).Sugar(), - ) - if err != nil { - panic(xerrors.Errorf("failed to initialize the DKG node: %w", err)) - } - } - run := func(_ *hive_node.Plugin) { - // Nothing to run here. - } - return hive_node.NewPlugin(pluginName, nil, hive_node.Enabled, configure, run) -} - -// DefaultNode returns the default instance of the DKG Node Provider. -// It should be used to access all the DKG Node functions (not the DKG Initiator's). -func DefaultNode() *dkg_pkg.Node { - return defaultNode -} diff --git a/plugins/gracefulshutdown/plugin.go b/plugins/gracefulshutdown/plugin.go deleted file mode 100644 index 75154500d4..0000000000 --- a/plugins/gracefulshutdown/plugin.go +++ /dev/null @@ -1,75 +0,0 @@ -package gracefulshutdown - -import ( - "os" - "os/signal" - "strings" - "syscall" - "time" - - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" -) - -// PluginName is the name of the graceful shutdown plugin. -const PluginName = "Graceful Shutdown" - -// WaitToKillTimeInSeconds is the maximum amount of time to wait for background processes to terminate. -// After that the process is killed. -const WaitToKillTimeInSeconds = 60 - -var ( - log *logger.Logger - gracefulStop chan os.Signal -) - -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure) -} - -func configure(plugin *node.Plugin) { - log = logger.NewLogger(PluginName) - gracefulStop = make(chan os.Signal) - - signal.Notify(gracefulStop, syscall.SIGTERM) - signal.Notify(gracefulStop, syscall.SIGINT) - - go func() { - <-gracefulStop - - log.Warnf("Received shutdown request - waiting (max %d) to finish processing ...", WaitToKillTimeInSeconds) - - go func() { - start := time.Now() - for x := range time.NewTicker(1 * time.Second).C { - secondsSinceStart := x.Sub(start).Seconds() - - if secondsSinceStart <= WaitToKillTimeInSeconds { - processList := "" - runningBackgroundWorkers := daemon.GetRunningBackgroundWorkers() - if len(runningBackgroundWorkers) >= 1 { - processList = "(" + strings.Join(runningBackgroundWorkers, ", ") + ") " - } - log.Warnf("Received shutdown request - waiting (max %d seconds) to finish processing %s...", WaitToKillTimeInSeconds-int(secondsSinceStart), processList) - } else { - log.Error("Background processes did not terminate in time! Forcing shutdown ...") - os.Exit(1) - } - } - }() - - daemon.Shutdown() - }() -} - -// Shutdown shuts down the default daemon instance. -func Shutdown() { - gracefulStop <- syscall.SIGINT -} - -// ShutdownWithError prints out an error message and shuts down the default daemon instance. -func ShutdownWithError(err error) { - log.Error(err) - Shutdown() -} diff --git a/plugins/logger/plugin.go b/plugins/logger/plugin.go deleted file mode 100644 index ed8f024179..0000000000 --- a/plugins/logger/plugin.go +++ /dev/null @@ -1,25 +0,0 @@ -package logger - -import ( - "github.com/iotaledger/hive.go/configuration" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "go.uber.org/dig" -) - -// PluginName is the name of the logger plugin. -const PluginName = "Logger" - -func Init(conf *configuration.Configuration) *node.Plugin { - Plugin := node.NewPlugin(PluginName, nil, node.Enabled) - - Plugin.Events.Init.Attach(events.NewClosure(func(*node.Plugin, *dig.Container) { - if err := logger.InitGlobalLogger(conf); err != nil { - panic(err) - } - initGoEthLogger(logger.NewLogger("go-ethereum")) - })) - - return Plugin -} diff --git a/plugins/metrics/component.go b/plugins/metrics/component.go new file mode 100644 index 0000000000..5c8d305f1f --- /dev/null +++ b/plugins/metrics/component.go @@ -0,0 +1,86 @@ +package metrics + +import ( + "context" + + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/packages/metrics" + "github.com/iotaledger/wasp/packages/parameters" +) + +func init() { + Plugin = &app.Plugin{ + Component: &app.Component{ + Name: "Metrics", + Params: params, + InitConfigPars: initConfigPars, + Configure: configure, + Run: run, + }, + IsEnabled: func() bool { + return ParamsMetrics.Enabled + }, + } +} + +var ( + Plugin *app.Plugin + allMetrics *metrics.Metrics +) + +func initConfigPars(c *dig.Container) error { + type cfgResult struct { + dig.Out + MetricsEnabled bool `name:"metricsEnabled"` + } + + if err := c.Provide(func() cfgResult { + return cfgResult{ + MetricsEnabled: ParamsMetrics.Enabled, + } + }); err != nil { + Plugin.LogPanic(err) + } + + return nil +} + +func configure() error { + allMetrics = metrics.New(Plugin.Logger()) + + return nil +} + +func run() error { + Plugin.LogInfof("Starting %s ...", Plugin.Name) + if err := Plugin.Daemon().BackgroundWorker("Prometheus exporter", func(ctx context.Context) { + Plugin.LogInfo("Starting Prometheus exporter ... done") + + stopped := make(chan struct{}) + go func() { + defer close(stopped) + allMetrics.Start(ParamsMetrics.BindAddress) + }() + + select { + case <-ctx.Done(): + case <-stopped: + } + Plugin.LogInfof("Stopping %s ...", Plugin.Name) + defer Plugin.LogInfof("Stopping %s ... done", Plugin.Name) + + if err := allMetrics.Stop(); err != nil { //nolint:contextcheck // false positive + Plugin.LogErrorf("error stopping: %s", err) + } + }, parameters.PriorityMetrics); err != nil { + Plugin.LogWarnf("error starting as daemon: %s", err) + } + + return nil +} + +func AllMetrics() *metrics.Metrics { + return allMetrics +} diff --git a/plugins/metrics/params.go b/plugins/metrics/params.go new file mode 100644 index 0000000000..dfa6f971c7 --- /dev/null +++ b/plugins/metrics/params.go @@ -0,0 +1,19 @@ +package metrics + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersMetrics struct { + Enabled bool `default:"true" usage:"whether the metrics plugin is enabled"` + BindAddress string `default:"127.0.0.1:2112" usage:"the bind address for the node dashboard"` +} + +var ParamsMetrics = &ParametersMetrics{} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "metrics": ParamsMetrics, + }, + Masked: nil, +} diff --git a/plugins/metrics/plugin.go b/plugins/metrics/plugin.go deleted file mode 100644 index 3f7dfb3404..0000000000 --- a/plugins/metrics/plugin.go +++ /dev/null @@ -1,61 +0,0 @@ -package metrics - -import ( - "context" - - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/metrics" - "github.com/iotaledger/wasp/packages/parameters" -) - -const PluginName = "Metrics" - -var ( - log *logger.Logger - allMetrics *metrics.Metrics -) - -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func configure(_ *node.Plugin) { - log = logger.NewLogger(PluginName) - allMetrics = metrics.New(log) -} - -func run(_ *node.Plugin) { - if !parameters.GetBool(parameters.MetricsEnabled) { - return - } - - log.Infof("Starting %s ...", PluginName) - if err := daemon.BackgroundWorker("Prometheus exporter", func(ctx context.Context) { - log.Info("Starting Prometheus exporter ... done") - - bindAddr := parameters.GetString(parameters.MetricsBindAddress) - stopped := make(chan struct{}) - go func() { - defer close(stopped) - allMetrics.Start(bindAddr) - }() - - select { - case <-ctx.Done(): - case <-stopped: - } - log.Infof("Stopping %s ...", PluginName) - defer log.Infof("Stopping %s ... done", PluginName) - if err := allMetrics.Stop(); err != nil { - log.Errorf("error stopping: %s", err) - } - }, parameters.PriorityMetrics); err != nil { - log.Warnf("error starting as daemon: %s", err) - } -} - -func AllMetrics() *metrics.Metrics { - return allMetrics -} diff --git a/plugins/nodeconn/plugin.go b/plugins/nodeconn/plugin.go deleted file mode 100644 index 5f3821fb42..0000000000 --- a/plugins/nodeconn/plugin.go +++ /dev/null @@ -1,63 +0,0 @@ -package nodeconn - -import ( - "context" - "time" - - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/chain" - "github.com/iotaledger/wasp/packages/nodeconn" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/packages/util/ready" - "github.com/iotaledger/wasp/plugins/metrics" -) - -// PluginName is the name of the NodeConn plugin. -const PluginName = "NodeConn" - -var ( - log *logger.Logger - - nc chain.NodeConnection - initialized = ready.New("NodeConn") -) - -// Init initializes the plugin -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func NodeConnection() chain.NodeConnection { - initialized.MustWait(5 * time.Second) - return nc -} - -func configure(_ *node.Plugin) { - log = logger.NewLogger(PluginName) - nc = nodeconn.New( - nodeconn.ChainL1Config{ - INXAddress: parameters.GetString(parameters.L1INXAddress), - }, - log, - ) -} - -func run(_ *node.Plugin) { - err := daemon.BackgroundWorker(PluginName, func(ctx context.Context) { - if parameters.GetBool(parameters.MetricsEnabled) { - nc.SetMetrics(metrics.AllMetrics().GetNodeConnectionMetrics()) - } - defer nc.Close() - - initialized.SetReady() - - <-ctx.Done() - - log.Info("Stopping node connection..") - }, parameters.PriorityNodeConnection) - if err != nil { - log.Errorf("failed to start NodeConn worker") - } -} diff --git a/plugins/peering/plugin.go b/plugins/peering/plugin.go deleted file mode 100644 index c5a5340290..0000000000 --- a/plugins/peering/plugin.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2020 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -package peering - -import ( - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/parameters" - peering_pkg "github.com/iotaledger/wasp/packages/peering" - peering_lpp "github.com/iotaledger/wasp/packages/peering/lpp" - "github.com/iotaledger/wasp/plugins/registry" -) - -const ( - pluginName = "Peering" -) - -var ( - log *logger.Logger - defaultNetworkProvider peering_pkg.NetworkProvider // A singleton instance. - defaultTrustedNetworkManager peering_pkg.TrustedNetworkManager // A singleton instance. -) - -// Init is an entry point for this plugin. -func Init() *node.Plugin { - configure := func(_ *node.Plugin) { - log = logger.NewLogger(pluginName) - netID := parameters.GetString(parameters.PeeringMyNetID) - netImpl, tnmImpl, err := peering_lpp.NewNetworkProvider( - netID, - parameters.GetInt(parameters.PeeringPort), - registry.DefaultRegistry().GetNodeIdentity(), - registry.DefaultRegistry(), - log, - ) - if err != nil { - log.Panicf("Init.peering: %v", err) - } - defaultNetworkProvider = netImpl - defaultTrustedNetworkManager = tnmImpl - log.Infof("------------- NetID is %s ------------------", netID) - } - run := func(_ *node.Plugin) { - err := daemon.BackgroundWorker( - "WaspPeering", - defaultNetworkProvider.Run, - parameters.PriorityPeering, - ) - if err != nil { - panic(err) - } - } - return node.NewPlugin(pluginName, nil, node.Enabled, configure, run) -} - -// DefaultNetworkProvider returns the default network provider implementation. -func DefaultNetworkProvider() peering_pkg.NetworkProvider { - return defaultNetworkProvider -} - -func DefaultTrustedNetworkManager() peering_pkg.TrustedNetworkManager { - return defaultTrustedNetworkManager -} diff --git a/plugins/profiling/plugin.go b/plugins/profiling/plugin.go deleted file mode 100644 index 3b292bec90..0000000000 --- a/plugins/profiling/plugin.go +++ /dev/null @@ -1,76 +0,0 @@ -package profiling - -import ( - "context" - "net/http" - - // import required to profile - _ "net/http/pprof" - "runtime" - - profile "github.com/bygui86/multi-profile/v2" - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/parameters" -) - -const PluginName = "Profiling" - -var log *logger.Logger - -// Init gets the plugin instance. -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func configure(_ *node.Plugin) { - log = logger.NewLogger(PluginName) -} - -func run(_ *node.Plugin) { - if !parameters.GetBool(parameters.ProfilingEnabled) { - return - } - - runtime.SetMutexProfileFraction(5) - runtime.SetBlockProfileRate(5) - runtime.SetCPUProfileRate(5) - - if parameters.GetBool(parameters.ProfilingWriteProfiles) { - profConfig := &profile.Config{ - Path: "./profiles", - EnableInterruptHook: true, - } - - profs := make([]*profile.Profile, 7) - profs[0] = profile.CPUProfile(profConfig).Start() - profs[1] = profile.MemProfile(profConfig).Start() - profs[2] = profile.GoroutineProfile(profConfig).Start() - profs[3] = profile.MutexProfile(profConfig).Start() - profs[4] = profile.BlockProfile(profConfig).Start() - profs[5] = profile.TraceProfile(profConfig).Start() - profs[6] = profile.ThreadCreationProfile(profConfig).Start() - - err := daemon.BackgroundWorker(PluginName, func(ctx context.Context) { - <-ctx.Done() - for _, p := range profs { - p.Stop() - } - log.Infof("%s shutdown,writing performance profiles", PluginName) - }) - if err != nil { - panic(err) - } - } - - go func() { - bindAddr := parameters.GetString(parameters.ProfilingBindAddress) - log.Infof("%s started, bind-address=%s", PluginName, bindAddr) - //nolint:gosec // false positive, we don't care about timeouts since this is just for testing purposes - err := http.ListenAndServe(bindAddr, nil) - if err != nil { - panic(err) - } - }() -} diff --git a/plugins/profiling/profiling.md b/plugins/profiling/profiling.md deleted file mode 100644 index 6aada67814..0000000000 --- a/plugins/profiling/profiling.md +++ /dev/null @@ -1,48 +0,0 @@ -# Profiling - -Profiling is disabled by default. - -Running a node with `profiling.enabled = true` (in config.json or via command -line) will spawn a pprof server running on `profiling.bindAddress` -(`http://localhost:6060` by default). - -By accessing `http:///debug/pprof/` there are some -profiles available, but the best way to visualize this data is using `go tool` -(requires `graphviz` installed). - -Examples: - -```shell -go tool pprof -http=:8080 http://localhost:6060/debug/pprof/ -``` - -```shell -wget -O trace.out http://localhost:6060/debug/pprof/trace?seconds=5 -go tool trace trace.out -``` - -(for the above we need to manually download the trace profile from the pprof -page, not sure if there is an automatic way) hint: use `?` to see keyboard -shortcuts when on the trace page. - -Upon node shutdown there will be some profile files available on `./profiles`: - -- block.pprof -- cpu.pprof -- goroutine.pprof -- mem.pprof -- mutex.pprof -- thread.pprof -- trace.pprof - -These profiles can be explored in the same way as the pprof server resources -(using `go tool`). - -While running cluster tests on Linux, working directory is `/tmp/wasp-cluster/`, thus the profiling data for each node is written in `profiles` subdirectory for each specific node, -e.g., `/tmp/wasp-cluster/wasp0/profiles/`. - -## Notes - -- Profiling has a negative impact on performance. Use when in need. -- Profiles may have no content if the node is not shutdown gracefully. (to use -in tests, the test should fail via assertions, not via `-timeout` parameter) diff --git a/plugins/publishernano/component.go b/plugins/publishernano/component.go new file mode 100644 index 0000000000..e2e294f372 --- /dev/null +++ b/plugins/publishernano/component.go @@ -0,0 +1,108 @@ +package publishernano + +import ( + "context" + "fmt" + "strings" + "time" + + "go.nanomsg.org/mangos/v3" + "go.nanomsg.org/mangos/v3/protocol/pub" + _ "go.nanomsg.org/mangos/v3/transport/all" + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/hive.go/core/events" + "github.com/iotaledger/wasp/packages/publisher" +) + +func init() { + Plugin = &app.Plugin{ + Component: &app.Component{ + Name: "PublisherNano", + Params: params, + InitConfigPars: initConfigPars, + Run: run, + }, + IsEnabled: func() bool { + return ParamsPublisher.Enabled + }, + } +} + +var Plugin *app.Plugin + +func initConfigPars(c *dig.Container) error { + type cfgResult struct { + dig.Out + PublisherPort int `name:"publisherPort"` + } + + if err := c.Provide(func() cfgResult { + return cfgResult{ + PublisherPort: ParamsPublisher.Port, + } + }); err != nil { + Plugin.LogPanic(err) + } + + return nil +} + +func run() error { + messages := make(chan []byte, 100) + + port := ParamsPublisher.Port + socket, err := openSocket(port) + if err != nil { + Plugin.LogErrorf("failed to initialize publisher: %v", err) + return err + } + Plugin.LogInfof("nanomsg publisher is running on port %d", port) + + err = Plugin.Daemon().BackgroundWorker(Plugin.Name, func(ctx context.Context) { + for { + select { + case msg := <-messages: + if socket != nil { + err := socket.Send(msg) + if err != nil { + Plugin.LogErrorf("Failed to publish message: %v", err) + } + } + case <-ctx.Done(): + if socket != nil { + _ = socket.Close() + socket = nil + } + return + } + } + }) + if err != nil { + panic(err) + } + + publisher.Event.Hook(events.NewClosure(func(msgType string, parts []string) { + msg := msgType + " " + strings.Join(parts, " ") + select { + case messages <- []byte(msg): + case <-time.After(1 * time.Second): + Plugin.LogWarnf("Failed to publish message: [%s]", msg) + } + })) + + return nil +} + +func openSocket(port int) (mangos.Socket, error) { + socket, err := pub.NewSocket() + if err != nil { + return nil, err + } + url := fmt.Sprintf("tcp://:%d", port) + if err := socket.Listen(url); err != nil { + return nil, err + } + return socket, nil +} diff --git a/plugins/publishernano/params.go b/plugins/publishernano/params.go new file mode 100644 index 0000000000..f0b4059228 --- /dev/null +++ b/plugins/publishernano/params.go @@ -0,0 +1,19 @@ +package publishernano + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersPublisher struct { + Enabled bool `default:"true" usage:"whether the publisher plugin is enabled"` + Port int `default:"5550" usage:"the port for the nanomsg event publisher"` +} + +var ParamsPublisher = &ParametersPublisher{} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "nanomsg": ParamsPublisher, + }, + Masked: nil, +} diff --git a/plugins/publishernano/plugin.go b/plugins/publishernano/plugin.go deleted file mode 100644 index 417f543940..0000000000 --- a/plugins/publishernano/plugin.go +++ /dev/null @@ -1,87 +0,0 @@ -package publishernano - -import ( - "context" - "fmt" - "strings" - "time" - - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/events" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/packages/publisher" - "go.nanomsg.org/mangos/v3" - "go.nanomsg.org/mangos/v3/protocol/pub" - _ "go.nanomsg.org/mangos/v3/transport/all" -) - -// PluginName is the name of the Publisher plugin. -const PluginName = "PublisherNano" - -var log *logger.Logger - -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func configure(_ *node.Plugin) { - log = logger.NewLogger(PluginName) -} - -func run(_ *node.Plugin) { - messages := make(chan []byte, 100) - - port := parameters.GetInt(parameters.NanomsgPublisherPort) - socket, err := openSocket(port) - if err != nil { - log.Errorf("failed to initialize publisher: %v", err) - return - } - log.Infof("nanomsg publisher is running on port %d", port) - - err = daemon.BackgroundWorker(PluginName, func(ctx context.Context) { - for { - select { - case msg := <-messages: - if socket != nil { - err := socket.Send(msg) - if err != nil { - log.Errorf("Failed to publish message: %v", err) - } - } - case <-ctx.Done(): - if socket != nil { - _ = socket.Close() - socket = nil - } - return - } - } - }) - if err != nil { - panic(err) - } - - publisher.Event.Attach(events.NewClosure(func(msgType string, parts []string) { - msg := msgType + " " + strings.Join(parts, " ") - select { - case messages <- []byte(msg): - case <-time.After(1 * time.Second): - log.Warnf("Failed to publish message: [%s]", msg) - } - })) -} - -func openSocket(port int) (mangos.Socket, error) { - socket, err := pub.NewSocket() - if err != nil { - return nil, err - } - url := fmt.Sprintf("tcp://:%d", port) - if err := socket.Listen(url); err != nil { - return nil, err - } - return socket, nil -} diff --git a/plugins/registry/plugin.go b/plugins/registry/plugin.go deleted file mode 100644 index c6dfcddf0c..0000000000 --- a/plugins/registry/plugin.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2020 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -package registry - -import ( - "github.com/iotaledger/hive.go/logger" - hive_node "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/registry" - "github.com/iotaledger/wasp/plugins/database" -) - -const pluginName = "Registry" - -var defaultRegistry *registry.Impl // A singleton. - -// DefaultRegistry returns an initialized default registry. -func DefaultRegistry() *registry.Impl { - return defaultRegistry -} - -// Init is an entry point for the plugin. -func Init() *hive_node.Plugin { - configure := func(_ *hive_node.Plugin) { - defaultRegistry = registry.NewRegistry( - logger.NewLogger(pluginName), - database.GetRegistryKVStore(), - ) - } - run := func(_ *hive_node.Plugin) { - // Nothing to run here. - } - return hive_node.NewPlugin(pluginName, nil, hive_node.Enabled, configure, run) -} diff --git a/plugins/users/plugin.go b/plugins/users/plugin.go deleted file mode 100644 index f62e13432c..0000000000 --- a/plugins/users/plugin.go +++ /dev/null @@ -1,53 +0,0 @@ -package users - -import ( - "github.com/iotaledger/hive.go/configuration" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/packages/users" -) - -// PluginName is the name of the user plugin. -const PluginName = "Users" - -var userMap map[string]*users.UserData - -var config *configuration.Configuration - -func Init(_config *configuration.Configuration) *node.Plugin { - config = _config - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func run(_ *node.Plugin) { -} - -func configure(plugin *node.Plugin) { - err := loadUsersFromConfiguration() - if err != nil { - plugin.LogErrorf("Failed to pull users: {#err}") - } - - users.InitUsers(userMap) -} - -func loadUsersFromConfiguration() error { - userMap = make(map[string]*users.UserData) - err := config.Unmarshal(parameters.UserList, &userMap) - - for username, userData := range userMap { - userData.Username = username - } - - if len(userMap) == 0 { - // During the transition phase, create a default user when the config is empty. - // This keeps the old authentication working. - userMap["wasp"] = &users.UserData{ - Username: "wasp", - Password: "wasp", - Permissions: []string{"api", "dashboard"}, - } - } - - return err -} diff --git a/plugins/wal/component.go b/plugins/wal/component.go new file mode 100644 index 0000000000..2ffe3b9d16 --- /dev/null +++ b/plugins/wal/component.go @@ -0,0 +1,34 @@ +package wal + +import ( + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + + "github.com/iotaledger/wasp/packages/wal" +) + +func init() { + Plugin = &app.Plugin{ + Component: &app.Component{ + Name: "WAL", + Params: params, + Provide: provide, + }, + IsEnabled: func() bool { + return ParamsWAL.Enabled + }, + } +} + +var Plugin *app.Plugin + +func provide(c *dig.Container) error { + if err := c.Provide(func() *wal.WAL { + return wal.New(Plugin.Logger(), ParamsWAL.Directory) + }); err != nil { + Plugin.LogPanic(err) + } + + return nil +} diff --git a/plugins/wal/params.go b/plugins/wal/params.go new file mode 100644 index 0000000000..23a1972bd4 --- /dev/null +++ b/plugins/wal/params.go @@ -0,0 +1,19 @@ +package wal + +import ( + "github.com/iotaledger/hive.go/core/app" +) + +type ParametersWAL struct { + Enabled bool `default:"true" usage:"whether the WAL plugin is enabled"` + Directory string `default:"wal" usage:"path to logs folder"` +} + +var ParamsWAL = &ParametersWAL{} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "wal": ParamsWAL, + }, + Masked: nil, +} diff --git a/plugins/wal/plugin.go b/plugins/wal/plugin.go deleted file mode 100644 index 6060b1642c..0000000000 --- a/plugins/wal/plugin.go +++ /dev/null @@ -1,35 +0,0 @@ -package wal - -import ( - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" - "github.com/iotaledger/wasp/packages/parameters" - "github.com/iotaledger/wasp/packages/wal" -) - -const PluginName = "Wal" - -var ( - log *logger.Logger - w *wal.WAL -) - -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} - -func configure(_ *node.Plugin) { - if !parameters.GetBool(parameters.WALEnabled) { - return - } - log = logger.NewLogger(PluginName) - walDir := parameters.GetString(parameters.WALDirectory) - w = wal.New(log, walDir) -} - -func run(_ *node.Plugin) { -} - -func GetWAL() *wal.WAL { - return w -} diff --git a/plugins/webapi/plugin.go b/plugins/webapi/component.go similarity index 54% rename from plugins/webapi/plugin.go rename to plugins/webapi/component.go index c00fcc3b79..bc8632d43a 100644 --- a/plugins/webapi/plugin.go +++ b/plugins/webapi/component.go @@ -6,49 +6,65 @@ import ( "net/http" "time" - "github.com/iotaledger/hive.go/daemon" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/hive.go/node" + "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" + "github.com/pangpanglabs/echoswagger/v2" + "go.uber.org/dig" + + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/hive.go/core/app/pkg/shutdown" + "github.com/iotaledger/wasp/core/chains" + "github.com/iotaledger/wasp/core/dkg" + "github.com/iotaledger/wasp/core/peering" + "github.com/iotaledger/wasp/core/registry" metricspkg "github.com/iotaledger/wasp/packages/metrics" "github.com/iotaledger/wasp/packages/parameters" + "github.com/iotaledger/wasp/packages/wal" "github.com/iotaledger/wasp/packages/wasp" "github.com/iotaledger/wasp/packages/webapi" "github.com/iotaledger/wasp/packages/webapi/httperrors" - "github.com/iotaledger/wasp/plugins/chains" - "github.com/iotaledger/wasp/plugins/dkg" - "github.com/iotaledger/wasp/plugins/gracefulshutdown" "github.com/iotaledger/wasp/plugins/metrics" - "github.com/iotaledger/wasp/plugins/peering" - "github.com/iotaledger/wasp/plugins/registry" - "github.com/iotaledger/wasp/plugins/wal" - "github.com/labstack/echo/v4" - "github.com/labstack/echo/v4/middleware" - "github.com/pangpanglabs/echoswagger/v2" ) -// PluginName is the name of the web API plugin. -const PluginName = "WebAPI" +func init() { + Plugin = &app.Plugin{ + Component: &app.Component{ + Name: "WebAPI", + DepsFunc: func(cDeps dependencies) { deps = cDeps }, + Params: params, + Run: run, + }, + IsEnabled: func() bool { + return ParamsWebAPI.Enabled + }, + } +} var ( - Server echoswagger.ApiRoot + Plugin *app.Plugin + deps dependencies - log *logger.Logger + Server echoswagger.ApiRoot allMetrics *metricspkg.Metrics ) -func Init() *node.Plugin { - return node.NewPlugin(PluginName, nil, node.Enabled, configure, run) -} +type dependencies struct { + dig.In -func configure(*node.Plugin) { - log = logger.NewLogger(PluginName) + ShutdownHandler *shutdown.ShutdownHandler + MetricsEnabled bool `name:"metricsEnabled"` + WAL *wal.WAL + APICacheTTL time.Duration `name:"apiCacheTTL"` + PublisherPort int `name:"publisherPort"` } -func run(_ *node.Plugin) { - log.Infof("Starting %s ...", PluginName) - if err := daemon.BackgroundWorker("WebAPI Server", worker, parameters.PriorityWebAPI); err != nil { - log.Errorf("error starting as daemon: %s", err) +func run() error { + Plugin.LogInfof("Starting %s ...", Plugin.Name) + if err := Plugin.Daemon().BackgroundWorker("WebAPI Server", worker, parameters.PriorityWebAPI); err != nil { + Plugin.LogErrorf("error starting as daemon: %s", err) } + + return nil } func worker(ctx context.Context) { @@ -57,11 +73,11 @@ func worker(ctx context.Context) { server := Server.Echo() go func() { defer close(stopped) - bindAddr := parameters.GetString(parameters.WebAPIBindAddress) - log.Infof("%s started, bind-address=%s", PluginName, bindAddr) + bindAddr := ParamsWebAPI.BindAddress + Plugin.LogInfof("%s started, bind-address=%s", Plugin.Name, bindAddr) if err := server.Start(bindAddr); err != nil { if !errors.Is(err, http.ErrServerClosed) { - log.Errorf("error serving: %s", err) + Plugin.LogErrorf("error serving: %s", err) } } }() @@ -72,12 +88,12 @@ func worker(ctx context.Context) { case <-stopped: } - log.Infof("Stopping %s ...", PluginName) - defer log.Infof("Stopping %s ... done", PluginName) + Plugin.LogInfof("Stopping %s ...", Plugin.Name) + defer Plugin.LogInfof("Stopping %s ... done", Plugin.Name) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - if err := server.Shutdown(ctx); err != nil { - log.Errorf("error stopping: %s", err) + if err := server.Shutdown(ctx); err != nil { //nolint:contextcheck // false positive + Plugin.LogErrorf("error stopping: %s", err) } } @@ -108,18 +124,25 @@ func initWebAPI() { if tnm == nil { panic("dependency TrustedNetworkManager is missing in WebAPI") } - if parameters.GetBool(parameters.MetricsEnabled) { + if deps.MetricsEnabled { allMetrics = metrics.AllMetrics() } webapi.Init( + Plugin.App().NewLogger("WebAPI"), Server, network, tnm, registry.DefaultRegistry, chains.AllChains, dkg.DefaultNode, - gracefulshutdown.Shutdown, + func() { + deps.ShutdownHandler.SelfShutdown("wasp was shutdown via API", false) + }, allMetrics, - wal.GetWAL(), + deps.WAL, + ParamsWebAPI.Auth, + ParamsWebAPI.NodeOwnerAddresses, + deps.APICacheTTL, + deps.PublisherPort, ) } diff --git a/plugins/webapi/params.go b/plugins/webapi/params.go new file mode 100644 index 0000000000..d64fa7236d --- /dev/null +++ b/plugins/webapi/params.go @@ -0,0 +1,26 @@ +package webapi + +import ( + "github.com/iotaledger/hive.go/core/app" + "github.com/iotaledger/wasp/packages/authentication" +) + +type ParametersWebAPI struct { + Enabled bool `default:"true" usage:"whether the web api plugin is enabled"` + NodeOwnerAddresses []string `default:"" usage:"defines a list of node owner addresses (bech32)"` + BindAddress string `default:"127.0.0.1:9090" usage:"the bind address for the node web api"` + Auth authentication.AuthConfiguration `usage:"configures the authentication for the dashboard service"` +} + +var ParamsWebAPI = &ParametersWebAPI{ + Auth: authentication.AuthConfiguration{ + Scheme: "jwt", + }, +} + +var params = &app.ComponentParams{ + Params: map[string]any{ + "webapi": ParamsWebAPI, + }, + Masked: nil, +} diff --git a/tools/ask-anchor/main.go b/tools/ask-anchor/main.go index 3bcff42162..9de924fd52 100644 --- a/tools/ask-anchor/main.go +++ b/tools/ask-anchor/main.go @@ -32,7 +32,7 @@ func main() { fmt.Printf("stateIndex: %v\n", stateOutput.StateIndex) fmt.Printf("amount: %v\n", stateOutput.Deposit()) fmt.Printf("foundryCounter: %v\n", stateOutput.FoundryCounter) - l1Commitment, err := state.L1CommitmentFromBytes(*&stateOutput.StateMetadata) + l1Commitment, err := state.L1CommitmentFromBytes(stateOutput.StateMetadata) mustNoErr(err) fmt.Printf("L1Commitment:\n state commitment: %s\n block hash: %s\n", l1Commitment.StateCommitment, l1Commitment.BlockHash) diff --git a/tools/cluster/cluster.go b/tools/cluster/cluster.go index 13b100c796..016fe2abd4 100644 --- a/tools/cluster/cluster.go +++ b/tools/cluster/cluster.go @@ -17,7 +17,9 @@ import ( "text/template" "time" - "github.com/iotaledger/hive.go/logger" + "golang.org/x/xerrors" + + "github.com/iotaledger/hive.go/core/logger" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/client/chainclient" @@ -35,7 +37,6 @@ import ( "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/packages/webapi/routes" "github.com/iotaledger/wasp/tools/cluster/templates" - "golang.org/x/xerrors" ) type Cluster struct { @@ -521,7 +522,7 @@ func (clu *Cluster) startWaspNode(i int, initOk chan<- bool) error { func DoStartWaspNode(cwd string, nodeIndex int, nodeAPIURL string, initOk chan<- bool, t *testing.T) (*exec.Cmd, error) { name := fmt.Sprintf("wasp %d", nodeIndex) - cmd := exec.Command("wasp") + cmd := exec.Command("wasp", "-c", "config.json") // force the wasp processes to close if the cluster tests time out if t != nil { diff --git a/tools/cluster/cluster_unix.go b/tools/cluster/cluster_unix.go deleted file mode 100644 index bbd9af5155..0000000000 --- a/tools/cluster/cluster_unix.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build !windows -// +build !windows - -package cluster - -import ( - "syscall" - - "golang.org/x/xerrors" -) - -func (clu *Cluster) FreezeNode(nodeIndex int) error { - if nodeIndex >= len(clu.waspCmds) { - return xerrors.Errorf("[cluster] Wasp node with index %d not found, active processes: %v", nodeIndex, len(clu.waspCmds)) - } - - process := clu.waspCmds[nodeIndex] - - err := process.Process.Signal(syscall.SIGSTOP) - - return err -} - -func (clu *Cluster) UnfreezeNode(nodeIndex int) error { - if nodeIndex >= len(clu.waspCmds) { - return xerrors.Errorf("[cluster] Wasp node with index %d not found", nodeIndex) - } - - process := clu.waspCmds[nodeIndex] - - err := process.Process.Signal(syscall.SIGCONT) - - return err -} diff --git a/tools/cluster/cluster_windows.go b/tools/cluster/cluster_windows.go deleted file mode 100644 index e1d8768974..0000000000 --- a/tools/cluster/cluster_windows.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build windows -// +build windows - -package cluster - -import ( - "golang.org/x/xerrors" -) - -func (clu *Cluster) FreezeNode(nodeIndex int) error { - return xerrors.Errorf("Freezing is not supported on Windows") -} - -func (clu *Cluster) UnfreezeNode(nodeIndex int) error { - return xerrors.Errorf("Freezing is not supported on Windows") -} diff --git a/tools/cluster/templates/waspconfig.go b/tools/cluster/templates/waspconfig.go index 99109f9522..beb1480645 100644 --- a/tools/cluster/templates/waspconfig.go +++ b/tools/cluster/templates/waspconfig.go @@ -19,67 +19,99 @@ type WaspConfigParams struct { const WaspConfig = ` { - "database": { - "inMemory": false, - "directory": "waspdb" + "app": { + "checkForUpdates": false, + "shutdown": { + "stopGracePeriod": "5m", + "log": { + "enabled": true, + "filePath": "shutdown.log" + } + } }, "logger": { "level": "debug", "disableCaller": false, - "disableStacktrace": true, + "disableStacktrace": false, "encoding": "console", "outputPaths": [ - "stdout", "wasp.log" - ], - "disableEvents": true + ] }, - "network": { - "bindAddress": "0.0.0.0", - "externalAddress": "auto" + "inx": { + "address": "{{.L1INXAddress}}", + "maxConnectionAttempts": 30 }, - "node": { - "disablePlugins": [], - "enablePlugins": [], - "ownerAddresses": ["{{.OwnerAddress}}"] - }, - "webapi": { - "auth": { - "scheme": "none" - }, - "bindAddress": "0.0.0.0:{{.APIPort}}" - }, - "dashboard": { - "auth": { - "scheme": "none" - }, - "bindAddress": "0.0.0.0:{{.DashboardPort}}" + "database": { + "inMemory": false, + "directory": "waspdb" }, - "peering":{ - "port": {{.PeeringPort}}, - "netid": "127.0.0.1:{{.PeeringPort}}" + "registry": { + "useText": false, + "fileName": "chain-registry.json" }, - "l1": { - "inxAddress": "{{.L1INXAddress}}" + "peering": { + "netID": "127.0.0.1:{{.PeeringPort}}", + "port": {{.PeeringPort}} }, - "nanomsg":{ - "port": {{.NanomsgPort}} + "chains": { + "broadcastUpToNPeers": 2, + "broadcastInterval": "5s", + "apiCacheTTL": "5m", + "pullMissingRequestsFromCommittee": true }, - "offledger":{ - "broadcastUpToNPeers": {{.OffledgerBroadcastUpToNPeers}} + "rawBlocks": { + "enabled": false, + "directory": "blocks" }, - "profiling":{ + "profiling": { "bindAddress": "0.0.0.0:{{.ProfilingPort}}", "writeProfiles": true, "enabled": false }, + "wal": { + "enabled": true, + "directory": "wal" + }, "metrics": { "bindAddress": "0.0.0.0:{{.MetricsPort}}", "enabled": false }, - "wal": { - "directory": "wal", - "enabled": true + "webapi": { + "enabled": true, + "nodeOwnerAddresses": ["{{.OwnerAddress}}"], + "bindAddress": "0.0.0.0:{{.APIPort}}", + "auth": { + "scheme": "none" + } + }, + "nanomsg": { + "enabled": true, + "port": {{.NanomsgPort}} + }, + "dashboard": { + "enabled": true, + "bindAddress": "0.0.0.0:{{.DashboardPort}}", + "exploreAddressURL": "", + "auth": { + "scheme": "none" + } + }, + "users": { + "users": { + "wasp": { + "Password": "wasp", + "Permissions": [ + "dashboard", + "api", + "chain.read", + "chain.write" + ] + } + } + }, + "offledger":{ + "broadcastUpToNPeers": {{.OffledgerBroadcastUpToNPeers}} }, "debug": { "rawblocksEnabled": false, diff --git a/tools/cluster/tests/account_test.go b/tools/cluster/tests/account_test.go index ca1e354b8c..fae3ffc16b 100644 --- a/tools/cluster/tests/account_test.go +++ b/tools/cluster/tests/account_test.go @@ -5,6 +5,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/tools/cluster" - "github.com/stretchr/testify/require" ) func TestBasicAccounts(t *testing.T) { diff --git a/tools/cluster/tests/advanced_inccounter_test.go b/tools/cluster/tests/advanced_inccounter_test.go index ea6690b30a..2e04b40e3d 100644 --- a/tools/cluster/tests/advanced_inccounter_test.go +++ b/tools/cluster/tests/advanced_inccounter_test.go @@ -8,6 +8,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/accounts" - "github.com/stretchr/testify/require" ) func setupAdvancedInccounterTest(t *testing.T, clusterSize int, committee []int) *ChainEnv { diff --git a/tools/cluster/tests/blob_test.go b/tools/cluster/tests/blob_test.go index e9ce0898b6..5c639b5618 100644 --- a/tools/cluster/tests/blob_test.go +++ b/tools/cluster/tests/blob_test.go @@ -6,6 +6,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/blob" - "github.com/stretchr/testify/require" ) func setupBlobTest(t *testing.T) *ChainEnv { diff --git a/tools/cluster/tests/cluster.go b/tools/cluster/tests/cluster.go index f3be10d11a..4d0159236c 100644 --- a/tools/cluster/tests/cluster.go +++ b/tools/cluster/tests/cluster.go @@ -6,10 +6,11 @@ import ( "path" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/util/l1starter" "github.com/iotaledger/wasp/tools/cluster" "github.com/iotaledger/wasp/tools/cluster/templates" - "github.com/stretchr/testify/require" ) type waspClusterOpts struct { @@ -22,7 +23,7 @@ type waspClusterOpts struct { // however its possible to run the tests on any compatible network, by providing the L1 node configuration: // example: // go test -timeout 30m github.com/iotaledger/wasp/tools/cluster/tests -layer1-api="http://1.1.1.123:3000" -layer1-faucet="http://1.1.1.123:5000" -var l1 = l1starter.New(flag.CommandLine) +var l1 = l1starter.New(flag.CommandLine, flag.CommandLine) // newCluster starts a new cluster environment for tests. // It is a private function because cluster tests cannot be run in parallel, diff --git a/tools/cluster/tests/cluster_stability_test.go b/tools/cluster/tests/cluster_stability_test.go index ec3cf885f8..5467644192 100644 --- a/tools/cluster/tests/cluster_stability_test.go +++ b/tools/cluster/tests/cluster_stability_test.go @@ -5,15 +5,15 @@ This test will test the recovery capabilities of the clusterized nodes, where so package tests import ( - "runtime" "sync" "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/testutil" "github.com/iotaledger/wasp/packages/util" - "github.com/stretchr/testify/require" ) const OSWindows string = "windows" @@ -52,7 +52,7 @@ func (e *SabotageEnv) sendRequests(numRequests int, messageDelay time.Duration) } } -func (e *SabotageEnv) setSabotageValidators(breakCount int) { +func (e *SabotageEnv) setSabotageValidators(breakCount int) { //nolint:unused // false positive clusterSize := len(e.chainEnv.Clu.Config.Wasp) from := clusterSize - e.NumValidators @@ -68,15 +68,7 @@ func (e *SabotageEnv) setSabotageAll(breakCount int) { e.SabotageList = util.MakeRange(from, to) } -type SabotageOption int - -const ( - SabotageByKill SabotageOption = iota - // Important: Frozen nodes need to get killed/unfrozen manually after the test is done, otherwise they stay alive after the test has finished - SabotageByFreeze SabotageOption = iota -) - -func (e *SabotageEnv) sabotageNodes(sabotageOption SabotageOption, startDelay, inBetweenDelay time.Duration) *sync.WaitGroup { +func (e *SabotageEnv) sabotageNodes(startDelay, inBetweenDelay time.Duration) *sync.WaitGroup { // Give the test time to start var wg sync.WaitGroup @@ -91,13 +83,7 @@ func (e *SabotageEnv) sabotageNodes(sabotageOption SabotageOption, startDelay, i for _, nodeID := range e.SabotageList { e.chainEnv.t.Logf("Breaking node: %v (%s)", nodeID, time.Now()) - var err error - - if sabotageOption == SabotageByKill { - err = e.chainEnv.Clu.KillNodeProcess(nodeID) - } else if sabotageOption == SabotageByFreeze { - err = e.chainEnv.Clu.FreezeNode(nodeID) - } + err := e.chainEnv.Clu.KillNodeProcess(nodeID) require.NoError(e.chainEnv.t, err) @@ -110,16 +96,7 @@ func (e *SabotageEnv) sabotageNodes(sabotageOption SabotageOption, startDelay, i return &wg } -func (e *SabotageEnv) unfreezeNodes() { - for _, nodeID := range e.SabotageList { - e.chainEnv.t.Logf("Unfreezing node %v (%s)", nodeID, time.Now()) - err := e.chainEnv.Clu.UnfreezeNode(nodeID) - - require.NoError(e.chainEnv.t, err) - } -} - -func (e *SabotageEnv) getActiveNodeList() []int { +func (e *SabotageEnv) getActiveNodeList() []int { //nolint:unused // false positive contains := func(x int) bool { for _, n := range e.SabotageList { if n == x { @@ -169,7 +146,7 @@ func TestSuccessfulIncCounterIncreaseWithMildInstability(t *testing.T) { env := initializeStabilityTest(t, numValidators, clusterSize) env.setSabotageValidators(numBrokenNodes) - wg := env.sabotageNodes(SabotageByKill, 4*time.Second, 1*time.Second) + wg := env.sabotageNodes(4*time.Second, 1*time.Second) env.sendRequests(numRequests, time.Millisecond*250) wg.Wait() @@ -181,7 +158,7 @@ func runTestFailsIncCounterIncreaseAsQuorumNotMet(t *testing.T, clusterSize, num env := initializeStabilityTest(t, numValidators, clusterSize) env.setSabotageAll(numBrokenNodes) - wg := env.sabotageNodes(SabotageByKill, 5*time.Second, 500*time.Millisecond) + wg := env.sabotageNodes(5*time.Second, 500*time.Millisecond) env.sendRequests(numRequests, time.Millisecond*250) wg.Wait() @@ -215,237 +192,3 @@ func TestFailsIncCounterIncreaseAsQuorumNotMet(t *testing.T) { runTestFailsIncCounterIncreaseAsQuorumNotMet(t, clusterSize, numValidators, numBrokenNodes, numRequests) }) } - -func testConsenseusReconnectingNodesNoQuorum(t *testing.T, clusterSize, numValidators, numBrokenNodes, numRequestsBeforeFailure, numRequestsAfterFailure int) { - env := initializeStabilityTest(t, numValidators, clusterSize) - env.setSabotageValidators(numBrokenNodes) - - t.Cleanup(func() { - // This hook is just a safety measure to unfreeze all nodes when an error happens. Otherwise they stay in a zombie mode after the tests ended. - if env != nil { - env.unfreezeNodes() - } - }) - - env.sendRequests(numRequestsBeforeFailure, time.Millisecond*250) - waitUntil(t, env.chainEnv.counterEquals(int64(numRequestsBeforeFailure)), env.getActiveNodeList(), 60*time.Second, "incCounter matches expectation") - - wg := env.sabotageNodes(SabotageByFreeze, 5*time.Second, 1*time.Second) - env.sendRequests(numRequestsAfterFailure, time.Millisecond*500) - wg.Wait() - - t.Log("Waiting for network to settle, no incCounter increases should be logged now") - time.Sleep(time.Second * 25) - counter := env.chainEnv.getNativeContractCounter(nativeIncCounterSCHname) - // quorum is not met, work stops, incCounter should not equal numRequests - require.NotEqual(env.chainEnv.t, numRequestsBeforeFailure+numRequestsAfterFailure, int(counter)) - - // unfreeze nodes, after bootstrapping it is expected to reach a full quorum leading to an equal incCounter - env.unfreezeNodes() - - waitUntil(t, env.chainEnv.counterEquals(int64(numRequestsBeforeFailure+numRequestsAfterFailure)), env.chainEnv.Clu.Config.AllNodes(), 60*time.Second, "incCounter matches expectation") - time.Sleep(10 * time.Second) // wait for nodes to be properly shutdown before starting a new test -} - -func testConsenseusReconnectingNodesHighQuorum(t *testing.T, clusterSize, numValidators, numBrokenNodes, numRequestsBeforeFailure, numRequestsAfterFailure int) { - // Windows does not support freezing with SIGSTOP, we skip those for now. - if runtime.GOOS == OSWindows { - t.Skip() - } - - env := initializeStabilityTest(t, numValidators, clusterSize) - env.setSabotageValidators(numBrokenNodes) - - t.Cleanup(func() { - // This hook is just a safety measure to unfreeze all nodes when an error happens. Otherwise they stay in a zombie mode after the tests ended. - if env != nil { - env.unfreezeNodes() - } - }) - - env.sendRequests(numRequestsBeforeFailure, time.Millisecond*250) - waitUntil(t, env.chainEnv.counterEquals(int64(numRequestsBeforeFailure)), env.getActiveNodeList(), 60*time.Second, "incCounter matches expectation") - - wg := env.sabotageNodes(SabotageByFreeze, 5*time.Second, 1*time.Second) - env.sendRequests(numRequestsAfterFailure, time.Millisecond*500) - wg.Wait() - - waitUntil(t, env.chainEnv.counterEquals(int64(numRequestsBeforeFailure+numRequestsAfterFailure)), env.getActiveNodeList(), 60*time.Second, "incCounter matches expectation") - env.unfreezeNodes() - time.Sleep(10 * time.Second) // wait for nodes to be properly shutdown before starting a new test -} - -func TestSuccessfulConsenseusWithReconnectingNodes(t *testing.T) { - /** - * incCounter requests get sent, after reaching a matching counter value, nodes get shut down, new requests get send in parallel. - * If frozen nodes are below the quorum level, the incCounter count should not reach numRequests until unfrozen, otherwise the opposite is expected - **/ - - if testing.Short() { - t.SkipNow() - } - - // Windows does not support freezing with SIGSTOP, we skip those for now. - if runtime.GOOS == OSWindows { - t.Skip() - } - - t.Run("cluster=5,numValidators=4,numBrokenNodes=4,req=35,quorum=NO", func(t *testing.T) { - const clusterSize = 5 - const numValidators = 4 - const numBrokenNodes = 4 - const numRequestsBeforeFailure = 10 - const numRequestsAfterFailure = 25 - - testConsenseusReconnectingNodesNoQuorum(t, clusterSize, numValidators, numBrokenNodes, numRequestsBeforeFailure, numRequestsAfterFailure) - }) - - t.Run("cluster=15,numValidators=13,numBrokenNodes=12,req=35,quorum=NO", func(t *testing.T) { - testutil.RunHeavy(t) - const clusterSize = 15 - const numValidators = 13 - const numBrokenNodes = 12 - const numRequestsBeforeFailure = 10 - const numRequestsAfterFailure = 25 - - testConsenseusReconnectingNodesNoQuorum(t, clusterSize, numValidators, numBrokenNodes, numRequestsBeforeFailure, numRequestsAfterFailure) - }) - - t.Run("cluster=4,numValidators=3,numBrokenNodes=1,req=35,quorum=YES", func(t *testing.T) { - const clusterSize = 4 - const numValidators = 3 - const numBrokenNodes = 1 - const numRequestsBeforeFailure = 10 - const numRequestsAfterFailure = 25 - - testConsenseusReconnectingNodesHighQuorum(t, clusterSize, numValidators, numBrokenNodes, numRequestsBeforeFailure, numRequestsAfterFailure) - }) - - // TODO this seems to be failing - t.Run("cluster=12,numValidators=10,numBrokenNodes=4,req=35,quorum=YES", func(t *testing.T) { - testutil.RunHeavy(t) - const clusterSize = 12 - const numValidators = 10 - const numBrokenNodes = 4 - const numRequestsBeforeFailure = 10 - const numRequestsAfterFailure = 25 - - testConsenseusReconnectingNodesHighQuorum(t, clusterSize, numValidators, numBrokenNodes, numRequestsBeforeFailure, numRequestsAfterFailure) - }) -} - -func runTestOneFailingNodeAfterTheOther(t *testing.T, clusterSize, numValidators, numBrokenNodes, numRequestsEachStep int) { - quorum := (2*numValidators)/3 + 1 - - t.Logf("Quorum: %v", quorum) - t.Logf("Maximum allowed broken nodes: %v", numValidators-quorum) - - requestCounter := 0 - brokenNodes := 0 - - env := initializeStabilityTest(t, numValidators, clusterSize) - env.setSabotageValidators(numBrokenNodes) - - t.Cleanup(func() { - // This hook is just a safety measure to unfreeze all nodes when an error happens. Otherwise they stay in a zombie mode after the tests ended. - if env != nil { - env.unfreezeNodes() - } - }) - - t.Logf("Nodes to break: %v", env.SabotageList) - - for _, nodeID := range env.SabotageList { - requestCounter += numRequestsEachStep - go env.sendRequests(numRequestsEachStep, time.Millisecond*1) - - time.Sleep(time.Millisecond * 1000) - env.chainEnv.Clu.FreezeNode(nodeID) - brokenNodes++ - - t.Logf("on broken node: %v(%v), quorum=%v, match=%v", nodeID, brokenNodes, numValidators-quorum, brokenNodes >= numValidators-quorum) - if brokenNodes >= numValidators-quorum { - // Wait and validate that not all messages have arrived - time.Sleep(15 * time.Second) - - counter := env.chainEnv.getNativeContractCounter(nativeIncCounterSCHname) - require.NotEqual(env.chainEnv.t, requestCounter, int(counter)) - - break - } else { - t.Log("Waiting for requests to come in") - waitUntil(t, env.chainEnv.counterEquals(int64(requestCounter)), env.getActiveNodeList(), 60*time.Second, "incCounter matches expectation") - counter := env.chainEnv.getNativeContractCounter(nativeIncCounterSCHname) - - t.Logf("Seems good? %v", counter) - } - } - - // Either too many nodes are down now and the process has stopped, or quorum is still fine, requiring no further interaction. - - counter := env.chainEnv.getNativeContractCounter(nativeIncCounterSCHname) - - t.Logf("Counter after first iteration: %v", counter) - - if counter == int64(requestCounter) { - return - } - - t.Logf("Counter does not match requestCounter: %v", requestCounter) - - for _, nodeID := range env.SabotageList { - env.chainEnv.Clu.UnfreezeNode(nodeID) - - time.Sleep(time.Second * 15) - counter = env.chainEnv.getNativeContractCounter(nativeIncCounterSCHname) - - if counter == int64(requestCounter) { - t.Logf("After unfreezing, the counter matches the requestCounter: %v", requestCounter) - - break - } - } - - require.Equal(t, requestCounter, int(counter)) - time.Sleep(10 * time.Second) // wait for nodes to be properly shutdown before starting a new test -} - -func TestOneFailingNodeAfterTheOther(t *testing.T) { - // In this test one node after the other gets disabled by either killing or freezing. - // Until quorum is unreachable, messages should all be flowing normally. - - if testing.Short() { - t.SkipNow() - } - - // Windows does not support freezing with SIGSTOP, we skip those for now. - if runtime.GOOS == OSWindows { - t.Skip() - } - t.Run("cluster=5,numValidators=4,numBrokenNodes=1", func(t *testing.T) { - const clusterSize = 5 - const numValidators = 4 - const numBrokenNodes = 1 - const numRequestsEachStep = 10 - - runTestOneFailingNodeAfterTheOther(t, clusterSize, numValidators, numBrokenNodes, numRequestsEachStep) - }) - - t.Run("cluster=9,numValidators=6,numBrokenNodes=1", func(t *testing.T) { - const clusterSize = 5 - const numValidators = 4 - const numBrokenNodes = 1 - const numRequestsEachStep = 10 - - runTestOneFailingNodeAfterTheOther(t, clusterSize, numValidators, numBrokenNodes, numRequestsEachStep) - }) - - t.Run("cluster=10,numValidators=9,numBrokenNodes=2", func(t *testing.T) { - const clusterSize = 10 - const numValidators = 9 - const numBrokenNodes = 2 - const numRequestsEachStep = 10 - - runTestOneFailingNodeAfterTheOther(t, clusterSize, numValidators, numBrokenNodes, numRequestsEachStep) - }) -} diff --git a/tools/cluster/tests/cluster_testutils.go b/tools/cluster/tests/cluster_testutils.go index 9078acdeff..44a2792015 100644 --- a/tools/cluster/tests/cluster_testutils.go +++ b/tools/cluster/tests/cluster_testutils.go @@ -3,11 +3,12 @@ package tests import ( "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/stretchr/testify/require" ) const nativeIncCounterSCName = "NativeIncCounter" diff --git a/tools/cluster/tests/deploy_test.go b/tools/cluster/tests/deploy_test.go index c68046c4c5..40698da031 100644 --- a/tools/cluster/tests/deploy_test.go +++ b/tools/cluster/tests/deploy_test.go @@ -4,13 +4,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/stretchr/testify/require" ) func TestDeployChain(t *testing.T) { diff --git a/tools/cluster/tests/env.go b/tools/cluster/tests/env.go index 7eb9db4994..8a5d05f5be 100644 --- a/tools/cluster/tests/env.go +++ b/tools/cluster/tests/env.go @@ -5,6 +5,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/client/scclient" "github.com/iotaledger/wasp/packages/cryptolib" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/tools/cluster" - "github.com/stretchr/testify/require" ) type env struct { diff --git a/tools/cluster/tests/inccounter_test.go b/tools/cluster/tests/inccounter_test.go index c0132208a9..de9d2f1274 100644 --- a/tools/cluster/tests/inccounter_test.go +++ b/tools/cluster/tests/inccounter_test.go @@ -4,6 +4,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/tools/cluster" - "github.com/stretchr/testify/require" ) const ( diff --git a/tools/cluster/tests/jsonrpc_test.go b/tools/cluster/tests/jsonrpc_test.go index b5216c5c80..26a803cf97 100644 --- a/tools/cluster/tests/jsonrpc_test.go +++ b/tools/cluster/tests/jsonrpc_test.go @@ -13,6 +13,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/evm/evmtest" "github.com/iotaledger/wasp/packages/evm/jsonrpc/jsonrpctest" @@ -25,7 +27,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/evm" "github.com/iotaledger/wasp/packages/webapi/routes" "github.com/iotaledger/wasp/tools/cluster" - "github.com/stretchr/testify/require" ) type clusterTestEnv struct { diff --git a/tools/cluster/tests/maintenance_test.go b/tools/cluster/tests/maintenance_test.go index 745751a3b2..bcbff40c8e 100644 --- a/tools/cluster/tests/maintenance_test.go +++ b/tools/cluster/tests/maintenance_test.go @@ -4,6 +4,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" @@ -11,7 +13,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/gas" - "github.com/stretchr/testify/require" ) func TestMaintenance(t *testing.T) { diff --git a/tools/cluster/tests/missing_requests_test.go b/tools/cluster/tests/missing_requests_test.go index 490253b454..ba886ea450 100644 --- a/tools/cluster/tests/missing_requests_test.go +++ b/tools/cluster/tests/missing_requests_test.go @@ -4,12 +4,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/tools/cluster/templates" - "github.com/stretchr/testify/require" ) func TestMissingRequests(t *testing.T) { diff --git a/tools/cluster/tests/nanopublisher_test.go b/tools/cluster/tests/nanopublisher_test.go index 3bbc73286b..a7184f195c 100644 --- a/tools/cluster/tests/nanopublisher_test.go +++ b/tools/cluster/tests/nanopublisher_test.go @@ -5,14 +5,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.nanomsg.org/mangos/v3" + "go.nanomsg.org/mangos/v3/protocol/sub" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/accounts" - "github.com/stretchr/testify/require" - "go.nanomsg.org/mangos/v3" - "go.nanomsg.org/mangos/v3/protocol/sub" ) type nanoClientTest struct { diff --git a/tools/cluster/tests/nodeconn_test.go b/tools/cluster/tests/nodeconn_test.go index 18e9070480..2d84deed25 100644 --- a/tools/cluster/tests/nodeconn_test.go +++ b/tools/cluster/tests/nodeconn_test.go @@ -7,9 +7,14 @@ package tests import ( + "context" "testing" + "time" - "github.com/iotaledger/hive.go/logger" + "github.com/stretchr/testify/require" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/inx-app/nodebridge" iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/wasp/packages/cryptolib" @@ -20,7 +25,6 @@ import ( "github.com/iotaledger/wasp/packages/testutil/testlogger" "github.com/iotaledger/wasp/packages/testutil/testpeers" "github.com/iotaledger/wasp/packages/transaction" - "github.com/stretchr/testify/require" ) func createChain(t *testing.T) *isc.ChainID { @@ -74,9 +78,13 @@ func TestNodeConn(t *testing.T) { ) t.Logf("Peering network created.") - nc := nodeconn.New(nodeconn.ChainL1Config{ - INXAddress: l1.Config.INXAddress, - }, log) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + nodeBridge, err := nodebridge.NewNodeBridge(ctx, l1.Config.INXAddress, 10, log.Named("NodeBridge")) + require.NoError(t, err) + + nc := nodeconn.New(ctx, log, nodeBridge) // // Check milestone attach/detach. @@ -107,7 +115,7 @@ func TestNodeConn(t *testing.T) { client := l1connection.NewClient(l1.Config, log) // Post a TX directly, and wait for it in the message stream (e.g. a request). - err := client.RequestFunds(chainID.AsAddress()) + err = client.RequestFunds(chainID.AsAddress()) require.NoError(t, err) t.Logf("Waiting for outputs posted via tangle...") oid := <-chainOICh diff --git a/tools/cluster/tests/offledger_requests_test.go b/tools/cluster/tests/offledger_requests_test.go index fe65e270ab..29ca8beb08 100644 --- a/tools/cluster/tests/offledger_requests_test.go +++ b/tools/cluster/tests/offledger_requests_test.go @@ -5,6 +5,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/accounts" "github.com/iotaledger/wasp/packages/vm/core/blob" - "github.com/stretchr/testify/require" ) func (e *ChainEnv) newWalletWithFunds(waspnode int, waitOnNodes ...int) *chainclient.Client { @@ -197,7 +198,7 @@ func TestOffledgerNonce(t *testing.T) { require.NoError(t, err) // send off-ledger request with a much lower nonce - offledgerReq, err = chClient.PostOffLedgerRequest( + _, err = chClient.PostOffLedgerRequest( nativeIncCounterSCHname, inccounter.FuncIncCounter.Hname(), chainclient.PostRequestParams{ @@ -207,7 +208,7 @@ func TestOffledgerNonce(t *testing.T) { require.Regexp(t, "invalid nonce", err.Error()) // try replaying the initial request - offledgerReq, err = chClient.PostOffLedgerRequest( + _, err = chClient.PostOffLedgerRequest( nativeIncCounterSCHname, inccounter.FuncIncCounter.Hname(), chainclient.PostRequestParams{ diff --git a/tools/cluster/tests/post_test.go b/tools/cluster/tests/post_test.go index 134a5d990c..2e6c0ace1b 100644 --- a/tools/cluster/tests/post_test.go +++ b/tools/cluster/tests/post_test.go @@ -4,6 +4,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/stretchr/testify/require" ) const inccounterName = "inc" diff --git a/tools/cluster/tests/privtangle_test.go b/tools/cluster/tests/privtangle_test.go index d62badf9e4..5b9b5c5411 100644 --- a/tools/cluster/tests/privtangle_test.go +++ b/tools/cluster/tests/privtangle_test.go @@ -8,13 +8,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/iota.go/v3/nodeclient" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/l1connection" "github.com/iotaledger/wasp/packages/testutil/testlogger" - "github.com/stretchr/testify/require" - "golang.org/x/xerrors" ) func TestHornetStartup(t *testing.T) { diff --git a/tools/cluster/tests/reboot_test.go b/tools/cluster/tests/reboot_test.go index f1feb40736..5fe3cc87b8 100644 --- a/tools/cluster/tests/reboot_test.go +++ b/tools/cluster/tests/reboot_test.go @@ -3,8 +3,9 @@ package tests import ( "testing" - "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/stretchr/testify/require" + + "github.com/iotaledger/wasp/contracts/native/inccounter" ) // ensures a nodes resumes normal operation after rebooting diff --git a/tools/cluster/tests/return_unlock_condition_test.go b/tools/cluster/tests/return_unlock_condition_test.go index 1c981b7f17..df7485d0ed 100644 --- a/tools/cluster/tests/return_unlock_condition_test.go +++ b/tools/cluster/tests/return_unlock_condition_test.go @@ -5,13 +5,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/transaction" - "github.com/stretchr/testify/require" ) // buils a normal tx to post a request to inccounter, optionally adds SDRC diff --git a/tools/cluster/tests/rotation_test.go b/tools/cluster/tests/rotation_test.go index 0283b1f691..87903a7e55 100644 --- a/tools/cluster/tests/rotation_test.go +++ b/tools/cluster/tests/rotation_test.go @@ -5,6 +5,9 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "golang.org/x/xerrors" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" @@ -17,8 +20,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/tools/cluster" - "github.com/stretchr/testify/require" - "golang.org/x/xerrors" ) func TestBasicRotation(t *testing.T) { @@ -302,28 +303,6 @@ func TestRotationMany(t *testing.T) { } } -func (e *ChainEnv) waitBlockIndex(nodeIndex int, blockIndex uint32, timeout time.Duration) bool { - return waitTrue(timeout, func() bool { - i, err := e.callGetBlockIndex(nodeIndex) - return err == nil && i >= blockIndex - }) -} - -func (e *ChainEnv) callGetBlockIndex(nodeIndex int) (uint32, error) { - ret, err := e.Chain.Cluster.WaspClient(nodeIndex).CallView( - e.Chain.ChainID, - blocklog.Contract.Hname(), - blocklog.ViewGetBlockInfo.Name, - nil, - ) - if err != nil { - return 0, err - } - v, err := codec.DecodeUint32(ret.MustGet(blocklog.ParamBlockIndex)) - require.NoError(e.t, err) - return v, nil -} - func (e *ChainEnv) waitStateControllers(addr iotago.Address, timeout time.Duration) error { for _, nodeIndex := range e.Clu.AllNodes() { if err := e.waitStateController(nodeIndex, addr, timeout); err != nil { diff --git a/tools/cluster/tests/spam_test.go b/tools/cluster/tests/spam_test.go index b9cbad19d2..4c3e0cb4a4 100644 --- a/tools/cluster/tests/spam_test.go +++ b/tools/cluster/tests/spam_test.go @@ -7,6 +7,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/contracts/native/inccounter" @@ -17,7 +19,6 @@ import ( "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/testcore" - "github.com/stretchr/testify/require" ) func TestSpamOnledger(t *testing.T) { diff --git a/tools/cluster/tests/transfer_test.go b/tools/cluster/tests/transfer_test.go index 825a5e6e8c..07d70e0381 100644 --- a/tools/cluster/tests/transfer_test.go +++ b/tools/cluster/tests/transfer_test.go @@ -4,11 +4,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/utxodb" "github.com/iotaledger/wasp/packages/vm/core/accounts" - "github.com/stretchr/testify/require" ) func TestDepositWithdraw(t *testing.T) { diff --git a/tools/cluster/tests/util.go b/tools/cluster/tests/util.go index 30735a138e..1b17134048 100644 --- a/tools/cluster/tests/util.go +++ b/tools/cluster/tests/util.go @@ -6,6 +6,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/contracts/native/inccounter" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" @@ -15,7 +17,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/corecontracts" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/core/root" - "github.com/stretchr/testify/require" ) func (e *ChainEnv) checkCoreContracts() { @@ -252,14 +253,6 @@ func (e *ChainEnv) contractIsDeployed() conditionFn { } } -func (e *ChainEnv) balanceOnChainBaseTokensEquals(agentID isc.AgentID, expected uint64) conditionFn { - return func(t *testing.T, nodeIndex int) bool { - have := e.getBalanceOnChain(agentID, isc.BaseTokenID, nodeIndex) - e.t.Logf("chainEnv::balanceOnChainBaseTokensEquals: node=%v, have=%v, expected=%v", nodeIndex, have, expected) - return expected == have - } -} - type conditionFn func(t *testing.T, nodeIndex int) bool func waitUntil(t *testing.T, fn conditionFn, nodeIndexes []int, timeout time.Duration, logMsg ...string) { diff --git a/tools/cluster/tests/wal_test.go b/tools/cluster/tests/wal_test.go index 073394c05d..8760b54501 100644 --- a/tools/cluster/tests/wal_test.go +++ b/tools/cluster/tests/wal_test.go @@ -6,11 +6,12 @@ import ( "strconv" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/state" "github.com/iotaledger/wasp/packages/vm/core/blocklog" - "github.com/stretchr/testify/require" ) func TestWriteToWAL(t *testing.T) { diff --git a/tools/cluster/tests/wasp-cli.go b/tools/cluster/tests/wasp-cli.go index 06d2c03be7..c5c53e6dad 100644 --- a/tools/cluster/tests/wasp-cli.go +++ b/tools/cluster/tests/wasp-cli.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "os" "os/exec" "path" @@ -13,9 +12,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/tools/cluster" - "github.com/stretchr/testify/require" ) type WaspCLITest struct { @@ -28,7 +28,7 @@ type WaspCLITest struct { func newWaspCLITest(t *testing.T, opt ...waspClusterOpts) *WaspCLITest { clu := newCluster(t, opt...) - dir, err := ioutil.TempDir(os.TempDir(), "wasp-cli-test-*") + dir, err := os.MkdirTemp(os.TempDir(), "wasp-cli-test-*") t.Logf("Using temporary directory %s", dir) require.NoError(t, err) t.Cleanup(func() { diff --git a/tools/cluster/tests/wasp-cli_rotation_test.go b/tools/cluster/tests/wasp-cli_rotation_test.go index 6f1776281a..2fa65c2e6f 100644 --- a/tools/cluster/tests/wasp-cli_rotation_test.go +++ b/tools/cluster/tests/wasp-cli_rotation_test.go @@ -6,12 +6,13 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/vmtypes" "github.com/iotaledger/wasp/tools/cluster/templates" - "github.com/stretchr/testify/require" ) func TestWaspCLIExternalRotation(t *testing.T) { diff --git a/tools/cluster/tests/wasp-cli_test.go b/tools/cluster/tests/wasp-cli_test.go index c792a8d52b..a62ac7d9b5 100644 --- a/tools/cluster/tests/wasp-cli_test.go +++ b/tools/cluster/tests/wasp-cli_test.go @@ -8,9 +8,10 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/iotaledger/wasp/packages/vm/core/blob" "github.com/iotaledger/wasp/packages/vm/vmtypes" - "github.com/stretchr/testify/require" ) const file = "inccounter_bg.wasm" diff --git a/tools/cluster/wasp-cluster/main.go b/tools/cluster/wasp-cluster/main.go index 68f367c883..70fc5d73c7 100644 --- a/tools/cluster/wasp-cluster/main.go +++ b/tools/cluster/wasp-cluster/main.go @@ -3,17 +3,17 @@ package main import ( "flag" "fmt" - "io/ioutil" "log" "os" "os/signal" - "github.com/iotaledger/hive.go/logger" + "github.com/spf13/pflag" + + "github.com/iotaledger/hive.go/core/configuration" + "github.com/iotaledger/hive.go/core/logger" "github.com/iotaledger/wasp/packages/l1connection" - "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/util/l1starter" "github.com/iotaledger/wasp/tools/cluster" - "github.com/spf13/pflag" ) const cmdName = "wasp-cluster" @@ -31,7 +31,7 @@ func usage(flags *pflag.FlagSet) { os.Exit(1) } -//nolint:funlen +//nolint:funlen,gocyclo func main() { commonFlags := pflag.NewFlagSet("common flags", pflag.ExitOnError) @@ -46,8 +46,11 @@ func main() { commonFlags.IntVarP(&waspConfig.FirstDashboardPort, "first-dashboard-port", "h", waspConfig.FirstDashboardPort, "First wasp dashboard port") l1StarterFlags := flag.NewFlagSet("l1", flag.ExitOnError) - l1 := l1starter.New(l1StarterFlags) + inxStarterFlags := flag.NewFlagSet("inx", flag.ExitOnError) + l1 := l1starter.New(l1StarterFlags, inxStarterFlags) + commonFlags.AddGoFlagSet(l1StarterFlags) + commonFlags.AddGoFlagSet(inxStarterFlags) if len(os.Args) < 2 { usage(commonFlags) @@ -58,7 +61,12 @@ func main() { check(err) } - if err := logger.InitGlobalLogger(parameters.Init()); err != nil { + cfg := configuration.New() + if err := cfg.Set("logger.disableStacktrace", true); err != nil { + panic(err) + } + + if err := logger.InitGlobalLogger(cfg); err != nil { panic(err) } @@ -102,7 +110,7 @@ func main() { if flags.NArg() > 1 { fmt.Printf("Usage: %s start [path] [options]\n", os.Args[0]) flags.PrintDefaults() - os.Exit(1) // nolint:gocritic + os.Exit(1) //nolint:gocritic } var err error @@ -119,7 +127,7 @@ func main() { } dataPath = flags.Arg(0) } else if *disposable { - dataPath, err = ioutil.TempDir(os.TempDir(), cmdName+"-*") + dataPath, err = os.MkdirTemp(os.TempDir(), cmdName+"-*") check(err) } diff --git a/tools/dbinspector/main.go b/tools/dbinspector/main.go index 9ad5f80df0..504e44512e 100644 --- a/tools/dbinspector/main.go +++ b/tools/dbinspector/main.go @@ -8,7 +8,7 @@ import ( "io/fs" "os" - "github.com/iotaledger/hive.go/kvstore" + "github.com/iotaledger/hive.go/core/kvstore" "github.com/iotaledger/wasp/packages/database/dbkeys" "github.com/iotaledger/wasp/packages/database/dbmanager" "github.com/iotaledger/wasp/packages/isc" diff --git a/tools/devnet/docker-compose.yml b/tools/devnet/docker-compose.yml index f028f63b6b..fdd5e36058 100644 --- a/tools/devnet/docker-compose.yml +++ b/tools/devnet/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.9" services: hornet-nest: - image: iotaledger/hornet-nest:2.0.0-beta.7 + image: iotaledger/hornet-nest:2.0.0-beta.8 networks: - wasp-net ports: @@ -14,6 +14,11 @@ services: build: context: ../../ dockerfile: Dockerfile + command: + - "--dashboard.auth.scheme=none" + - "--webapi.auth.scheme=none" + - "--inx.address=hornet-nest:9029" + - "--database.directory=/waspdb" container_name: wasp depends_on: - hornet-nest @@ -21,7 +26,7 @@ services: networks: - wasp-net volumes: - - wasp-db:/wasp/waspdb + - wasp-db:/waspdb - ./wasp.config.json:/etc/wasp_config.json expose: - "4000/udp" # Peering diff --git a/tools/devnet/wasp.config.json b/tools/devnet/wasp.config.json index 9398c4d227..65e5f21667 100644 --- a/tools/devnet/wasp.config.json +++ b/tools/devnet/wasp.config.json @@ -2,8 +2,9 @@ "database": { "directory": "/wasp/waspdb" }, - "l1": { - "inxAddress": "hornet-nest:9029" + "inx": { + "address": "hornet-nest:9029", + "maxConnectionAttempts": 30 }, "logger": { "level": "debug", diff --git a/tools/evm-l2-withdraw/.dockerignore b/tools/evm-l2-withdraw/.dockerignore new file mode 100644 index 0000000000..ce7ef6bed2 --- /dev/null +++ b/tools/evm-l2-withdraw/.dockerignore @@ -0,0 +1,2 @@ +node_modules +.vite \ No newline at end of file diff --git a/tools/evm-l2-withdraw/Dockerfile b/tools/evm-l2-withdraw/Dockerfile new file mode 100644 index 0000000000..5f1c54e838 --- /dev/null +++ b/tools/evm-l2-withdraw/Dockerfile @@ -0,0 +1,15 @@ +FROM node:18 AS build + +WORKDIR /app + +COPY package.json ./ +COPY package-lock.json ./ + +RUN npm install + +COPY . ./ + +RUN npm run build --prod + +FROM nginx:1.23-alpine +COPY --from=build /app/dist /usr/share/nginx/html \ No newline at end of file diff --git a/tools/evm-l2-withdraw/src/App.svelte b/tools/evm-l2-withdraw/src/App.svelte index 62606ffde5..ff91774661 100644 --- a/tools/evm-l2-withdraw/src/App.svelte +++ b/tools/evm-l2-withdraw/src/App.svelte @@ -6,20 +6,23 @@ chainId, chainData, defaultEvmStores, - } from "svelte-web3"; + } from 'svelte-web3'; - import { Bech32Helper } from "@iota/iota.js"; + import { Bech32Helper } from '@iota/iota.js'; - import iscAbiAsText from "../../../packages/vm/core/evm/iscmagic/ISC.abi?raw"; + import iscAbiAsText from './assets/ISC.abi?raw'; const waspAddrBinaryFromBech32 = (bech32String: string) => { - // Depending on the network, the human readable part can change (tst, rms, ..). + // Depending on the network, the human readable part can change (tst, rms, ..). // - We need some kind of API that is not the direct Hornet node to fetch it.. // - Maybe over some EVM info route? // For this PoC it should be enough to substr the first three chars. let humanReadablePart = bech32String.substring(0, 3); - let receiverAddr = Bech32Helper.addressFromBech32(bech32String, humanReadablePart); + let receiverAddr = Bech32Helper.addressFromBech32( + bech32String, + humanReadablePart + ); let receiverAddrBinary = $web3.utils.hexToBytes(receiverAddr.pubKeyHash); // // AddressEd25519 denotes an Ed25519 address. // AddressEd25519 AddressType = 0 @@ -32,12 +35,40 @@ return new Uint8Array([0, ...receiverAddrBinary]); }; + const gasFee = 300; const iscAbi = JSON.parse(iscAbiAsText); const iscContractAddress: string = - "0x0000000000000000000000000000000000001074"; + '0x0000000000000000000000000000000000001074'; let chainID; let contract; + let balance = 0; + let amountToSend = 0; + + $: formattedBalance = (balance / 1e6).toFixed(2); + $: formattedAmountToSend = (amountToSend / 1e6).toFixed(2); + $: canSendFunds = balance > 0 && amountToSend > 0; + $: canSetAmountToSend = balance > gasFee+1; + + let addrInput = ''; + + async function pollBalance() { + const addressBalance = await $web3.eth.getBalance( + defaultEvmStores.$selectedAccount + ); + balance = Number(BigInt(addressBalance) / BigInt(1e12)); + + if (amountToSend > balance) { + amountToSend = 0; + } + } + + function subscribeBalance() { + setTimeout(async () => { + pollBalance(); + subscribeBalance(); + }, 2500); + } async function connectToWallet() { await defaultEvmStores.setProvider(); @@ -45,17 +76,19 @@ contract = new $web3.eth.Contract(iscAbi, iscContractAddress, { from: defaultEvmStores.$selectedAccount, }); - } - let addrInput = ""; + await pollBalance(); + subscribeBalance(); + } async function onWithdrawClick() { if (!defaultEvmStores.$selectedAccount) { - console.log("no account selected"); + console.log('no account selected'); return; } - let amount = 1e6; //1 million + console.log(balance, amountToSend); + let parameters = [ { // Receiver @@ -63,7 +96,7 @@ }, { // Fungible Tokens - baseTokens: amount, + baseTokens: balance - gasFee, tokens: [], }, false, @@ -93,8 +126,6 @@ }, ]; - console.log(...parameters); - const result = await contract.methods.send(...parameters).send(); console.log(result); } @@ -106,29 +137,43 @@ {#if !$connected} {:else} - Connected to Chain {$chainId}

-

-
+
+ Connected to Chain {$chainId} +
+
+ Balance {formattedBalance}Mi +
+
+ Receiver address
+ +
+
+ Amount to send: {formattedAmountToSend}Mi +
+
+ +
+
+
+
{/if} diff --git a/tools/evm-l2-withdraw/src/assets/ISC.abi b/tools/evm-l2-withdraw/src/assets/ISC.abi deleted file mode 120000 index ff8192ce97..0000000000 --- a/tools/evm-l2-withdraw/src/assets/ISC.abi +++ /dev/null @@ -1 +0,0 @@ -../../../../packages/vm/core/evm/isccontract/ISC.abi \ No newline at end of file diff --git a/tools/evm-l2-withdraw/src/assets/ISC.abi b/tools/evm-l2-withdraw/src/assets/ISC.abi new file mode 100644 index 0000000000..50ae9f3cfc --- /dev/null +++ b/tools/evm-l2-withdraw/src/assets/ISC.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"target","type":"address"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"allowance","type":"tuple"}],"name":"allow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"ISCHname","name":"contractHname","type":"uint32"},{"internalType":"ISCHname","name":"entryPoint","type":"uint32"},{"components":[{"components":[{"internalType":"bytes","name":"key","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"}],"internalType":"struct ISCDictItem[]","name":"items","type":"tuple[]"}],"internalType":"struct ISCDict","name":"params","type":"tuple"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"allowance","type":"tuple"}],"name":"call","outputs":[{"components":[{"components":[{"internalType":"bytes","name":"key","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"}],"internalType":"struct ISCDictItem[]","name":"items","type":"tuple[]"}],"internalType":"struct ISCDict","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"ISCHname","name":"contractHname","type":"uint32"},{"internalType":"ISCHname","name":"entryPoint","type":"uint32"},{"components":[{"components":[{"internalType":"bytes","name":"key","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"}],"internalType":"struct ISCDictItem[]","name":"items","type":"tuple[]"}],"internalType":"struct ISCDict","name":"params","type":"tuple"}],"name":"callView","outputs":[{"components":[{"components":[{"internalType":"bytes","name":"key","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"}],"internalType":"struct ISCDictItem[]","name":"items","type":"tuple[]"}],"internalType":"struct ISCDict","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getAllowanceFrom","outputs":[{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"getAllowanceTo","outputs":[{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainID","outputs":[{"internalType":"ISCChainID","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainOwnerID","outputs":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ISCAgentID","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEntropy","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"NFTID","name":"id","type":"bytes32"}],"name":"getNFTData","outputs":[{"components":[{"internalType":"NFTID","name":"ID","type":"bytes32"},{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct L1Address","name":"issuer","type":"tuple"},{"internalType":"bytes","name":"metadata","type":"bytes"}],"internalType":"struct ISCNFT","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRequestID","outputs":[{"components":[{"internalType":"ISCTransactionID","name":"transactionID","type":"bytes32"},{"internalType":"uint16","name":"transactionOutputIndex","type":"uint16"}],"internalType":"struct ISCRequestID","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSenderAccount","outputs":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ISCAgentID","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTimestampUnixSeconds","outputs":[{"internalType":"int64","name":"","type":"int64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"s","type":"string"}],"name":"hn","outputs":[{"internalType":"ISCHname","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"s","type":"string"}],"name":"registerError","outputs":[{"internalType":"ISCError","name":"","type":"uint16"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct L1Address","name":"targetAddress","type":"tuple"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"}],"internalType":"struct ISCFungibleTokens","name":"fungibleTokens","type":"tuple"},{"internalType":"bool","name":"adjustMinimumStorageDeposit","type":"bool"},{"components":[{"internalType":"ISCHname","name":"targetContract","type":"uint32"},{"internalType":"ISCHname","name":"entrypoint","type":"uint32"},{"components":[{"components":[{"internalType":"bytes","name":"key","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"}],"internalType":"struct ISCDictItem[]","name":"items","type":"tuple[]"}],"internalType":"struct ISCDict","name":"params","type":"tuple"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"allowance","type":"tuple"},{"internalType":"uint64","name":"gasBudget","type":"uint64"}],"internalType":"struct ISCSendMetadata","name":"metadata","type":"tuple"},{"components":[{"internalType":"int64","name":"timelock","type":"int64"},{"components":[{"internalType":"int64","name":"time","type":"int64"},{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct L1Address","name":"returnAddress","type":"tuple"}],"internalType":"struct ISCExpiration","name":"expiration","type":"tuple"}],"internalType":"struct ISCSendOptions","name":"sendOptions","type":"tuple"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct L1Address","name":"targetAddress","type":"tuple"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"}],"internalType":"struct ISCFungibleTokens","name":"fungibleTokens","type":"tuple"},{"internalType":"NFTID","name":"id","type":"bytes32"},{"internalType":"bool","name":"adjustMinimumStorageDeposit","type":"bool"},{"components":[{"internalType":"ISCHname","name":"targetContract","type":"uint32"},{"internalType":"ISCHname","name":"entrypoint","type":"uint32"},{"components":[{"components":[{"internalType":"bytes","name":"key","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"}],"internalType":"struct ISCDictItem[]","name":"items","type":"tuple[]"}],"internalType":"struct ISCDict","name":"params","type":"tuple"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"allowance","type":"tuple"},{"internalType":"uint64","name":"gasBudget","type":"uint64"}],"internalType":"struct ISCSendMetadata","name":"metadata","type":"tuple"},{"components":[{"internalType":"int64","name":"timelock","type":"int64"},{"components":[{"internalType":"int64","name":"time","type":"int64"},{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct L1Address","name":"returnAddress","type":"tuple"}],"internalType":"struct ISCExpiration","name":"expiration","type":"tuple"}],"internalType":"struct ISCSendOptions","name":"sendOptions","type":"tuple"}],"name":"sendAsNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"components":[{"internalType":"uint64","name":"baseTokens","type":"uint64"},{"components":[{"components":[{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NativeTokenID","name":"ID","type":"tuple"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NativeToken[]","name":"tokens","type":"tuple[]"},{"internalType":"NFTID[]","name":"nfts","type":"bytes32[]"}],"internalType":"struct ISCAllowance","name":"allowance","type":"tuple"}],"name":"takeAllowedFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"s","type":"string"}],"name":"triggerEvent","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/tools/evm-l2-withdraw/wasp-evm-withdraw.nomad.tpl b/tools/evm-l2-withdraw/wasp-evm-withdraw.nomad.tpl new file mode 100644 index 0000000000..a4a3680d76 --- /dev/null +++ b/tools/evm-l2-withdraw/wasp-evm-withdraw.nomad.tpl @@ -0,0 +1,62 @@ +job "isc-evm-withdraw-${workspace}" { + datacenters = ["hcloud"] + + group "web" { + ephemeral_disk { + migrate = false + sticky = true + } + + network { + + port "http" { + host_network = "private" + to = 80 + } + } + + task "worker" { + driver = "docker" + + config { + image = "${artifact.image}:${artifact.tag}" + ports = [ + "http", + ] + + auth { + username = "${auth.username}" + password = "${auth.password}" + server_address = "${auth.server_address}" + } + } + + env { + %{ for k,v in entrypoint.env ~} + ${k} = "${v}" + %{ endfor ~} + + // Ensure we set PORT for the URL service. This is only necessary + // if we want the URL service to function. + PORT = "$${NOMAD_ALLOC_PORT_http}" + } + + service { + tags = ["http"] + port = "http" + check { + type = "http" + port = "http" + path = "/" + interval = "5s" + timeout = "2s" + } + } + + resources { + memory = 256 + cpu = 256 + } + } + } +} \ No newline at end of file diff --git a/tools/evm-l2-withdraw/waypoint.hcl b/tools/evm-l2-withdraw/waypoint.hcl new file mode 100644 index 0000000000..e42948ab31 --- /dev/null +++ b/tools/evm-l2-withdraw/waypoint.hcl @@ -0,0 +1,45 @@ +# The name of your project. A project typically maps 1:1 to a VCS repository. +# This name must be unique for your Waypoint server. If you're running in +# local mode, this must be unique to your machine. +project = "isc" + +# Labels can be specified for organizational purposes. +labels = { "team" = "isc" } + +variable "ghcr" { + type = object({ + username = string + password = string + server_address = string + }) +} + +app "evm-withdraw" { + build { + use "docker" { + disable_entrypoint = false + buildkit = true + dockerfile = "./Dockerfile" + } + + registry { + use "docker" { + image = "ghcr.io/luke-thorne/evm_withdraw_frontend" + tag = gitrefpretty() + encoded_auth = base64encode(jsonencode(var.ghcr)) + } + } + } + + deploy { + use "nomad-jobspec" { + // Templated to perhaps bring in the artifact from a previous + // build/registry, entrypoint env vars, etc. + jobspec = templatefile("${path.app}/wasp-evm-withdraw.nomad.tpl", { + artifact = artifact + auth = var.ghcr + workspace = workspace.name + }) + } + } +} \ No newline at end of file diff --git a/tools/evm_deposit_frontend/Dockerfile b/tools/evm_deposit_frontend/Dockerfile index 097231720b..1e933f09e8 100644 --- a/tools/evm_deposit_frontend/Dockerfile +++ b/tools/evm_deposit_frontend/Dockerfile @@ -11,5 +11,5 @@ COPY . ./ RUN npm run build --prod -FROM nginx:1.19-alpine -COPY --from=build /app/dist /usr/share/nginx/html \ No newline at end of file +FROM nginx:1.23-alpine +COPY --from=build /app/dist /usr/share/nginx/html diff --git a/tools/evm_deposit_frontend/networks.ts b/tools/evm_deposit_frontend/networks.ts index e698e87f22..a732c585c5 100644 --- a/tools/evm_deposit_frontend/networks.ts +++ b/tools/evm_deposit_frontend/networks.ts @@ -2,7 +2,7 @@ export const networkOptions = [ { id: 0, text: 'Shimmer Beta Network', - apiEndpoint: 'https://api.testnet.shimmer.network', + apiEndpoint: 'https://api.hornet.sc.testnet.shimmer.network', faucetEndpoint: 'https://faucet.testnet.shimmer.network', }, { diff --git a/tools/evm_deposit_frontend/wasp-evm-deposit.nomad.tpl b/tools/evm_deposit_frontend/wasp-evm-deposit.nomad.tpl new file mode 100644 index 0000000000..3c00071a3f --- /dev/null +++ b/tools/evm_deposit_frontend/wasp-evm-deposit.nomad.tpl @@ -0,0 +1,62 @@ +job "isc-evm-deposit-${workspace}" { + datacenters = ["hcloud"] + + group "web" { + ephemeral_disk { + migrate = false + sticky = true + } + + network { + + port "http" { + host_network = "private" + to = 80 + } + } + + task "worker" { + driver = "docker" + + config { + image = "${artifact.image}:${artifact.tag}" + ports = [ + "http", + ] + + auth { + username = "${auth.username}" + password = "${auth.password}" + server_address = "${auth.server_address}" + } + } + + env { + %{ for k,v in entrypoint.env ~} + ${k} = "${v}" + %{ endfor ~} + + // Ensure we set PORT for the URL service. This is only necessary + // if we want the URL service to function. + PORT = "$${NOMAD_ALLOC_PORT_http}" + } + + service { + tags = ["http"] + port = "http" + check { + type = "http" + port = "http" + path = "/" + interval = "5s" + timeout = "2s" + } + } + + resources { + memory = 256 + cpu = 256 + } + } + } +} \ No newline at end of file diff --git a/tools/evm_deposit_frontend/waypoint.hcl b/tools/evm_deposit_frontend/waypoint.hcl new file mode 100644 index 0000000000..2a5f47fb7f --- /dev/null +++ b/tools/evm_deposit_frontend/waypoint.hcl @@ -0,0 +1,45 @@ +# The name of your project. A project typically maps 1:1 to a VCS repository. +# This name must be unique for your Waypoint server. If you're running in +# local mode, this must be unique to your machine. +project = "isc" + +# Labels can be specified for organizational purposes. +labels = { "team" = "isc" } + +variable "ghcr" { + type = object({ + username = string + password = string + server_address = string + }) +} + +app "evm-deposit" { + build { + use "docker" { + disable_entrypoint = false + buildkit = true + dockerfile = "./Dockerfile" + } + + registry { + use "docker" { + image = "ghcr.io/luke-thorne/evm_deposit_frontend" + tag = gitrefpretty() + encoded_auth = base64encode(jsonencode(var.ghcr)) + } + } + } + + deploy { + use "nomad-jobspec" { + // Templated to perhaps bring in the artifact from a previous + // build/registry, entrypoint env vars, etc. + jobspec = templatefile("${path.app}/wasp-evm-deposit.nomad.tpl", { + artifact = artifact + auth = var.ghcr + workspace = workspace.name + }) + } + } +} \ No newline at end of file diff --git a/tools/gendoc/configuration_header.md b/tools/gendoc/configuration_header.md new file mode 100644 index 0000000000..f62de1f5c0 --- /dev/null +++ b/tools/gendoc/configuration_header.md @@ -0,0 +1,33 @@ +--- +description: This section describes the configuration parameters and their types for WASP. +keywords: +- IOTA Node +- Hornet Node +- WASP Node +- Smart Contracts +- L2 +- Configuration +- JSON +- Customize +- Config +- reference +--- + + +# Core Configuration + +WASP uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the [official JSON specs](https://www.json.org). + +You can change the path of the config file by using the `-c` or `--config` argument while executing `wasp` executable. + +For example: +```bash +wasp -c config_defaults.json +``` + +You can always get the most up-to-date description of the config parameters by running: + +```bash +wasp -h --full +``` + diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod new file mode 100644 index 0000000000..bc177b62a2 --- /dev/null +++ b/tools/gendoc/go.mod @@ -0,0 +1,196 @@ +module github.com/iotaledger/wasp/tools/gendoc + +go 1.19 + +replace github.com/iotaledger/wasp => ../../ + +replace ( + github.com/anthdm/hbbft => github.com/kape1395/hbbft v0.0.0-20220823095040-07b2628097ef + github.com/ethereum/go-ethereum => github.com/dessaya/go-ethereum v1.10.10-0.20220809124259-a32cc1199f6b + go.dedis.ch/kyber/v3 v3.0.14 => github.com/kape1395/kyber/v3 v3.0.14-0.20210622094514-fefb81148dc3 +) + +require ( + github.com/iotaledger/hive.go/apputils v1.0.0-beta.3 + github.com/iotaledger/hive.go/core v1.0.0-beta.6 + github.com/iotaledger/wasp v0.0.0-00010101000000-000000000000 +) + +require ( + filippo.io/edwards25519 v1.0.0 // indirect + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/NebulousLabs/merkletree v0.0.0-20181203152040-08d5d54b07f5 // indirect + github.com/VictoriaMetrics/fastcache v1.10.0 // indirect + github.com/anthdm/hbbft v0.0.0-20190702061856-0826ffdcf567 // indirect + github.com/benbjohnson/clock v1.3.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/btcsuite/btcd v0.20.1-beta // indirect + github.com/bytecodealliance/wasmtime-go v0.40.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cheekybits/genny v1.0.0 // indirect + github.com/cockroachdb/errors v1.9.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect + github.com/cockroachdb/redact v1.1.3 // indirect + github.com/containerd/cgroups v1.0.4 // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect + github.com/deckarep/golang-set v1.8.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/eclipse/paho.mqtt.golang v1.4.1 // indirect + github.com/edsrzf/mmap-go v1.1.0 // indirect + github.com/elastic/gosigar v0.14.2 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/ethereum/go-ethereum v1.10.23 // indirect + github.com/fatih/structs v1.1.0 // indirect + github.com/fbiville/markdown-table-formatter v0.3.0 // indirect + github.com/flynn/noise v1.0.0 // indirect + github.com/francoispqt/gojay v1.2.13 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/getsentry/sentry-go v0.13.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-stack/stack v1.8.1 // indirect + github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-github v17.0.0+incompatible // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gopacket v1.1.19 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/holiman/uint256 v1.2.0 // indirect + github.com/huin/goupnp v1.0.3 // indirect + github.com/iancoleman/orderedmap v0.2.0 // indirect + github.com/iotaledger/grocksdb v1.7.5-0.20220808142449-1dc0b8ac4d7d // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-beta.3 // indirect + github.com/iotaledger/inx-app v1.0.0-beta.13 // indirect + github.com/iotaledger/inx/go v1.0.0-beta.8 // indirect + github.com/iotaledger/iota.go v1.0.0 // indirect + github.com/iotaledger/iota.go/v3 v3.0.0-beta.9 // indirect + github.com/iotaledger/trie.go v0.0.0-20220913055112-2b1eae4ebed9 // indirect + github.com/ipfs/go-cid v0.3.2 // indirect + github.com/ipfs/go-log/v2 v2.5.1 // indirect + github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect + github.com/klauspost/compress v1.15.9 // indirect + github.com/klauspost/cpuid/v2 v2.1.1 // indirect + github.com/klauspost/reedsolomon v1.10.0 // indirect + github.com/knadh/koanf v1.4.3 // indirect + github.com/koron/go-ssdp v0.0.3 // indirect + github.com/kr/pretty v0.3.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/labstack/echo/v4 v4.9.0 // indirect + github.com/labstack/gommon v0.3.1 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/libp2p/go-cidranger v1.1.0 // indirect + github.com/libp2p/go-flow-metrics v0.1.0 // indirect + github.com/libp2p/go-libp2p v0.22.0 // indirect + github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect + github.com/libp2p/go-msgio v0.2.0 // indirect + github.com/libp2p/go-nat v0.1.0 // indirect + github.com/libp2p/go-netroute v0.2.0 // indirect + github.com/libp2p/go-openssl v0.1.0 // indirect + github.com/libp2p/go-reuseport v0.2.0 // indirect + github.com/libp2p/go-yamux/v3 v3.1.2 // indirect + github.com/lucas-clemente/quic-go v0.28.1 // indirect + github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect + github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect + github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect + github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect + github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-pointer v0.0.1 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/miekg/dns v1.1.50 // indirect + github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect + github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect + github.com/minio/sha256-simd v1.0.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/mr-tron/base58 v1.2.0 // indirect + github.com/multiformats/go-base32 v0.1.0 // indirect + github.com/multiformats/go-base36 v0.1.0 // indirect + github.com/multiformats/go-multiaddr v0.7.0 // indirect + github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect + github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect + github.com/multiformats/go-multibase v0.1.1 // indirect + github.com/multiformats/go-multicodec v0.6.0 // indirect + github.com/multiformats/go-multihash v0.2.1 // indirect + github.com/multiformats/go-multistream v0.3.3 // indirect + github.com/multiformats/go-varint v0.0.6 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/oasisprotocol/ed25519 v0.0.0-20210505154701-76d8c688d86e // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect + github.com/opencontainers/runtime-spec v1.0.2 // indirect + github.com/pangpanglabs/echoswagger/v2 v2.4.1 // indirect + github.com/panjf2000/ants/v2 v2.5.0 // indirect + github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect + github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect + github.com/pelletier/go-toml/v2 v2.0.5 // indirect + github.com/petermattis/goid v0.0.0-20220824145935-af5520614cb6 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.13.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.37.0 // indirect + github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/tsdb v0.10.0 // indirect + github.com/raulk/go-watchdog v1.3.0 // indirect + github.com/rivo/uniseg v0.3.4 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/second-state/WasmEdge-go v0.11.0 // indirect + github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect + github.com/spaolacci/murmur3 v1.1.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/testify v1.8.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e // indirect + github.com/tklauser/go-sysconf v0.3.10 // indirect + github.com/tklauser/numcpus v0.5.0 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.1 // indirect + github.com/wasmerio/wasmer-go v1.0.4 // indirect + github.com/yusufpapurcu/wmi v1.2.2 // indirect + go.dedis.ch/fixbuf v1.0.3 // indirect + go.dedis.ch/kyber/v3 v3.0.14 // indirect + go.dedis.ch/protobuf v1.0.11 // indirect + go.nanomsg.org/mangos/v3 v3.4.2 // indirect + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/dig v1.15.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.23.0 // indirect + golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 // indirect + golang.org/x/sync v0.0.0-20220907140024-f12130a52804 // indirect + golang.org/x/sys v0.0.0-20220908164124-27713097b956 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect + golang.org/x/tools v0.1.12 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 // indirect + google.golang.org/grpc v1.49.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/blake3 v1.1.7 // indirect + nhooyr.io/websocket v1.8.7 // indirect +) diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum new file mode 100644 index 0000000000..49dd1210d3 --- /dev/null +++ b/tools/gendoc/go.sum @@ -0,0 +1,1600 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= +dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= +dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= +github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e h1:9UwdEr0AFI021vXG+hXDGH9ZHGuNtPCdJkRTqcIhJ3A= +github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e h1:n+DcnTNkQnHlwpsrHoQtkrJIO7CBx029fw6oR4vIob4= +github.com/NebulousLabs/merkletree v0.0.0-20181203152040-08d5d54b07f5 h1:pk9SclNGplPbF6YDIDKMhHh9SaUWcoxPkMr7zdu1hfk= +github.com/NebulousLabs/merkletree v0.0.0-20181203152040-08d5d54b07f5/go.mod h1:Cn056wBLKay+uIS9LJn7ymwhgC5mqbOtG6iOhEvyy4M= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/VictoriaMetrics/fastcache v1.10.0 h1:5hDJnLsKLpnUEToub7ETuRu8RCkb40woBZAUiKonXzY= +github.com/VictoriaMetrics/fastcache v1.10.0/go.mod h1:tjiYeEfYXCqacuvYw/7UoDIeJaNxq6132xHICNP77w8= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bytecodealliance/wasmtime-go v0.40.0 h1:7cGLQEctJf09JWBl3Ai0eMl1PTrXVAjkAb27+KHfIq0= +github.com/bytecodealliance/wasmtime-go v0.40.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= +github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v1.0.1-0.20211007161720-b558070c3be0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cockroachdb/datadriven v1.0.1-0.20220214170620-9913f5bc19b7/go.mod h1:hi0MtSY3AYDQNDi83kDkMH5/yqM/CsIrsOITkSoH7KI= +github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= +github.com/cockroachdb/errors v1.8.8/go.mod h1:z6VnEL3hZ/2ONZEvG7S5Ym0bU2AqPcEKnIiA1wbsSu0= +github.com/cockroachdb/errors v1.9.0 h1:B48dYem5SlAY7iU8AKsgedb4gH6mo+bDkbtLIvM/a88= +github.com/cockroachdb/errors v1.9.0/go.mod h1:vaNcEYYqbIqB5JhKBhFV9CneUqeuEbB2OYJBK4GBNYQ= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= +github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= +github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= +github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= +github.com/dessaya/go-ethereum v1.10.10-0.20220809124259-a32cc1199f6b h1:L1BPwd4nVHABiF9uaLM9lrQTsmdBGol2uSfPSZTdS8o= +github.com/dessaya/go-ethereum v1.10.10-0.20220809124259-a32cc1199f6b/go.mod h1:Anj6cxczl+AHy63o4X9O8yWNHuN5wMpfb8MAnHkWn7Y= +github.com/dgraph-io/badger v1.5.4/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= +github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI= +github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= +github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= +github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= +github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fbiville/markdown-table-formatter v0.3.0 h1:PIm1UNgJrFs8q1htGTw+wnnNYvwXQMMMIKNZop2SSho= +github.com/fbiville/markdown-table-formatter v0.3.0/go.mod h1:q89TDtSEVDdTaufgSbfHpNVdPU/bmfvqNkrC5HagmLY= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= +github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= +github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gdamore/optopia v0.2.0/go.mod h1:YKYEwo5C1Pa617H7NlPcmQXl+vG6YnSSNB44n8dNL0Q= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= +github.com/getsentry/sentry-go v0.13.0 h1:20dgTiUSfxRB/EhMPtxcL9ZEbM1ZdR+W/7f7NWD+xWo= +github.com/getsentry/sentry-go v0.13.0/go.mod h1:EOsfu5ZdvKPfeHYV6pTVQnsjfp30+XA7//UooKNumH0= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs= +github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= +github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= +github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= +github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= +github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= +github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/iotaledger/grocksdb v1.7.5-0.20220808142449-1dc0b8ac4d7d h1:KYc/EkMX3CXvsYyUC9EvToUeYc0c74ZwjRg/0Wd27LU= +github.com/iotaledger/grocksdb v1.7.5-0.20220808142449-1dc0b8ac4d7d/go.mod h1:DuNKJ1G/vKugT7WGAoftMTu2aApNNxF4ADFMxLmKS2Y= +github.com/iotaledger/hive.go/apputils v1.0.0-beta.3 h1:W89a1k9vsGjRBacJEbLlVbGlJSQcH9czZfux3N8Ofxk= +github.com/iotaledger/hive.go/apputils v1.0.0-beta.3/go.mod h1:QKZPwO72AbSE/2WFP/nLyth8Y5Xh3i50OQg+04VdeSc= +github.com/iotaledger/hive.go/core v1.0.0-beta.6 h1:y9gP9q5eFib5RI8/kimtdrFVz2tDlRWJqthjtcsPOmo= +github.com/iotaledger/hive.go/core v1.0.0-beta.6/go.mod h1:O0lzYAaP2vTv802PChD+Nop34dkosfmg9MYnHNO2fyY= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-beta.3 h1:o7uLky3LQhNeMHZmNP7iaY67jdDUPRjKGL1GyvALQNM= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-beta.3/go.mod h1:OMyV/ZEKiCzfqxXAmt1IBxl4Xmr6ipZFg6bjnzomtGc= +github.com/iotaledger/inx-app v1.0.0-beta.13 h1:D36WPxMA3vpMvuEQ0ZPoLy1xX6stqgSr5h99nsfrM48= +github.com/iotaledger/inx-app v1.0.0-beta.13/go.mod h1:SX2Wztpb/4JEEpVmXmTJYe9nJF7XbHatxMfaSCLMnuo= +github.com/iotaledger/inx/go v1.0.0-beta.8 h1:+2XJynipziKbjPjS3i2hTp93HE8OXwVKzWGE3jYkYEM= +github.com/iotaledger/inx/go v1.0.0-beta.8/go.mod h1:jK0MxS90aPIYz0KWnV2UrdMqrqmW8TzCT48pNteLALg= +github.com/iotaledger/iota.go v1.0.0 h1:tqm1FxJ/zOdzbrAaQ5BQpVF8dUy2eeGlSeWlNG8GoXY= +github.com/iotaledger/iota.go v1.0.0/go.mod h1:RiKYwDyY7aCD1L0YRzHSjOsJ5mUR9yvQpvhZncNcGQI= +github.com/iotaledger/iota.go/v3 v3.0.0-beta.9 h1:qUn2gO7OUjQYO8U8NmqpjaJEBOVo4Yr0+1V94riF2D8= +github.com/iotaledger/iota.go/v3 v3.0.0-beta.9/go.mod h1:Y1roBqFLNqZMj4C2eBYpW9mkl6e6vsdm5PQJhehpcj8= +github.com/iotaledger/trie.go v0.0.0-20220913055112-2b1eae4ebed9 h1:Oi+8c+rzBgoT5QT7Lxk7WNoPktpCyi4sVjH8gNBEoFY= +github.com/iotaledger/trie.go v0.0.0-20220913055112-2b1eae4ebed9/go.mod h1:PiH9j3MVFwSwF/5Ttcwgz1PatJYggmmGb4H3UZGueJo= +github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= +github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= +github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= +github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= +github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= +github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= +github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= +github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= +github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= +github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/kape1395/hbbft v0.0.0-20220823095040-07b2628097ef h1:XS0PUDq7GWEuc+66yWDpCMKrNrKyGv7sbdXlS5s761M= +github.com/kape1395/hbbft v0.0.0-20220823095040-07b2628097ef/go.mod h1:XadZ7V3kvoIfFGVb8s/ndgVitoHRNRjzgPlHhhb9HlI= +github.com/kape1395/kyber/v3 v3.0.14-0.20210622094514-fefb81148dc3 h1:b7VGpy3biHI8Q0O8BthxiJfOXhx5F0Ej4TNuJ9A1omo= +github.com/kape1395/kyber/v3 v3.0.14-0.20210622094514-fefb81148dc3/go.mod h1:kXy7p3STAurkADD+/aZcsznZGKVHEqbtmdIzvPfrs1U= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= +github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= +github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= +github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= +github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= +github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= +github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.14/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.1.1 h1:t0wUqjowdm8ezddV5k0tLWVklVuvLJpoHeb4WBdydm0= +github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/reedsolomon v1.9.2/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= +github.com/klauspost/reedsolomon v1.10.0 h1:MonMtg979rxSHjwtsla5dZLhreS0Lu42AyQ20bhjIGg= +github.com/klauspost/reedsolomon v1.10.0/go.mod h1:qHMIzMkuZUWqIh8mS/GruPdo3u0qwX2jk/LH440ON7Y= +github.com/knadh/koanf v1.4.3 h1:rSJcSH5LSFhvzBRsAYfT3k7eLP0I4UxeZqjtAatk+wc= +github.com/knadh/koanf v1.4.3/go.mod h1:5FAkuykKXZvLqhAbP4peWgM5CTcZmn7L1d27k/a+kfg= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= +github.com/koron/go-ssdp v0.0.3 h1:JivLMY45N76b4p/vsWGOKewBQu6uf39y8l+AQ7sDKx8= +github.com/koron/go-ssdp v0.0.3/go.mod h1:b2MxI6yh02pKrsyNoQUsk4+YNikaGhe4894J+Q5lDvA= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/echo/v4 v4.1.13/go.mod h1:3WZNypykZ3tnqpF2Qb4fPg27XDunFqgP3HGDmCMgv7U= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= +github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY= +github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o= +github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= +github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= +github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= +github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= +github.com/libp2p/go-libp2p v0.22.0 h1:2Tce0kHOp5zASFKJbNzRElvh0iZwdtG5uZheNW8chIw= +github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= +github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw= +github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= +github.com/libp2p/go-libp2p-testing v0.11.0 h1:+R7FRl/U3Y00neyBSM2qgDzqz3HkWH24U9nMlascHL4= +github.com/libp2p/go-msgio v0.2.0 h1:W6shmB+FeynDrUVl2dgFQvzfBZcXiyqY4VmpQLu9FqU= +github.com/libp2p/go-msgio v0.2.0/go.mod h1:dBVM1gW3Jk9XqHkU4eKdGvVHdLa51hoGfll6jMJMSlY= +github.com/libp2p/go-nat v0.1.0 h1:MfVsH6DLcpa04Xr+p8hmVRG4juse0s3J8HyNWYHffXg= +github.com/libp2p/go-nat v0.1.0/go.mod h1:X7teVkwRHNInVNWQiO/tAiAVRwSr5zoRz4YSTC3uRBM= +github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-netroute v0.2.0 h1:0FpsbsvuSnAhXFnCY0VLFbJOzaK0VnP0r1QT/o4nWRE= +github.com/libp2p/go-netroute v0.2.0/go.mod h1:Vio7LTzZ+6hoT4CMZi5/6CpY3Snzh2vgZhWgxMNwlQI= +github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo= +github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc= +github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560= +github.com/libp2p/go-reuseport v0.2.0/go.mod h1:bvVho6eLMm6Bz5hmU0LYN3ixd3nPPvtIlaURZZgOY4k= +github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= +github.com/libp2p/go-yamux/v3 v3.1.2 h1:lNEy28MBk1HavUAlzKgShp+F6mn/ea1nDYWftZhFW9Q= +github.com/libp2p/go-yamux/v3 v3.1.2/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= +github.com/lucas-clemente/quic-go v0.28.1 h1:Uo0lvVxWg5la9gflIF9lwa39ONq85Xq2D91YNEIslzU= +github.com/lucas-clemente/quic-go v0.28.1/go.mod h1:oGz5DKK41cJt5+773+BSO9BXDsREY4HLf7+0odGAPO0= +github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= +github.com/marten-seemann/qtls-go1-16 v0.1.5 h1:o9JrYPPco/Nukd/HpOHMHZoBDXQqoNtUCmny98/1uqQ= +github.com/marten-seemann/qtls-go1-16 v0.1.5/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= +github.com/marten-seemann/qtls-go1-17 v0.1.2 h1:JADBlm0LYiVbuSySCHeY863dNkcpMmDR7s0bLKJeYlQ= +github.com/marten-seemann/qtls-go1-17 v0.1.2/go.mod h1:C2ekUKcDdz9SDWxec1N/MvcXBpaX9l3Nx67XaR84L5s= +github.com/marten-seemann/qtls-go1-18 v0.1.2 h1:JH6jmzbduz0ITVQ7ShevK10Av5+jBEKAHMntXmIV7kM= +github.com/marten-seemann/qtls-go1-18 v0.1.2/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= +github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= +github.com/marten-seemann/qtls-go1-19 v0.1.0 h1:rLFKD/9mp/uq1SYGYuVZhm83wkmU95pK5df3GufyYYU= +github.com/marten-seemann/qtls-go1-19 v0.1.0/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= +github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= +github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= +github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= +github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= +github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8= +github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= +github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= +github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= +github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= +github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= +github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= +github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= +github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= +github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= +github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= +github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= +github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= +github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= +github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= +github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= +github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= +github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= +github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE= +github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= +github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= +github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= +github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= +github.com/multiformats/go-multistream v0.3.3 h1:d5PZpjwRgVlbwfdTDjife7XszfZd8KYWfROYFlGcR8o= +github.com/multiformats/go-multistream v0.3.3/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= +github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= +github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/ed25519 v0.0.0-20210505154701-76d8c688d86e h1:pHDo+QVA9a72j08pr99Zh91vkQibH0CiNNSp36sOflA= +github.com/oasisprotocol/ed25519 v0.0.0-20210505154701-76d8c688d86e/go.mod h1:IZbb50w3AB72BVobEF6qG93NNSrTw/V2QlboxqSu3Xw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY= +github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/pangpanglabs/echoswagger/v2 v2.4.1 h1:uJA84SgkMgeJRvuX16rym2RDNZOXrVKPp+A+Ed5NvzY= +github.com/pangpanglabs/echoswagger/v2 v2.4.1/go.mod h1:r0rruV8DsOMk/XgJCuij5f1AKW1mmV9LnWS2qzNHRMY= +github.com/panjf2000/ants/v2 v2.5.0 h1:1rWGWSnxCsQBga+nQbA4/iY6VMeNoOIAM0ZWh9u3q2Q= +github.com/panjf2000/ants/v2 v2.5.0/go.mod h1:cU93usDlihJZ5CfRGNDYsiBYvoilLvBF5Qp/BT2GNRE= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= +github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c/go.mod h1:1iCZ0433JJMecYqCa+TdWA9Pax8MGl4ByuNDZ7eSnQY= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20220824145935-af5520614cb6 h1:CoZdAHg4WQNvhnyqCxKEDlRRnsvEafj0RPTF9KBGi58= +github.com/petermattis/goid v0.0.0-20220824145935-af5520614cb6/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= +github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= +github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= +github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/second-state/WasmEdge-go v0.11.0 h1:AJ9N2vzXTKQeut5LPxxUDaAKz/VpNk+OXkGSbLvJRkE= +github.com/second-state/WasmEdge-go v0.11.0/go.mod h1:HyBf9hVj1sRAjklsjc1Yvs9b5RcmthPG9z99dY78TKg= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= +github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= +github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= +github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= +github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= +github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= +github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= +github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= +github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= +github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= +github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= +github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= +github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= +github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= +github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= +github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= +github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= +github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e h1:IWllFTiDjjLIf2oeKxpIUmtiDV5sn71VgeQgg6vcE7k= +github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/tklauser/numcpus v0.5.0 h1:ooe7gN0fg6myJ0EKoTAf5hebTZrH52px3New/D9iJ+A= +github.com/tklauser/numcpus v0.5.0/go.mod h1:OGzpTxpcIMNGYQdit2BYL1pvk/dSOaJWjKoflh+RQjo= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= +github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= +github.com/wasmerio/wasmer-go v1.0.4 h1:MnqHoOGfiQ8MMq2RF6wyCeebKOe84G88h5yv+vmxJgs= +github.com/wasmerio/wasmer-go v1.0.4/go.mod h1:0gzVdSfg6pysA6QVp6iVRPTagC6Wq9pOE8J86WKb2Fk= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= +go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= +go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= +go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= +go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= +go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= +go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= +go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.mongodb.org/mongo-driver v1.0.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.nanomsg.org/mangos/v3 v3.4.2 h1:gHlopxjWvJcVCcUilQIsRQk9jdj6/HB7wrTiUN8Ki7Q= +go.nanomsg.org/mangos/v3 v3.4.2/go.mod h1:8+hjBMQub6HvXmuGvIq6hf19uxGQIjCofmc62lbedLA= +go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/dig v1.15.0 h1:vq3YWr8zRj1eFGC7Gvf907hE0eRjPTZ1d3xHadD6liE= +go.uber.org/dig v1.15.0/go.mod h1:pKHs0wMynzL6brANhB2hLMro+zalv1osARTviTcqHLM= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191119213627-4f8c1d86b1ba/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 h1:1WGATo9HAhkWMbfyuVU0tEFP88OIkUvwaHFveQPvzCQ= +golang.org/x/net v0.0.0-20220907135653-1e95f45603a7/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220907140024-f12130a52804 h1:0SH2R3f1b1VmIMG7BXbEZCBUu2dKmHschSmjqGUrW8A= +golang.org/x/sync v0.0.0-20220907140024-f12130a52804/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956 h1:XeJjHH1KiLpKGb6lvMiksZ9l0fVUh+AmGcm0nOMEBOY= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 h1:bMz0aY2wd9TwUp9M7QfjBWuQqaFD/ZaTtvDpPDCo2Ow= +google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0/go.mod h1:rQWNQYp1kbHR3+n5cARSTCF5rlJOttUn8yIhRklGAWQ= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/h2non/gock.v1 v1.0.14/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= +gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= +lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= +nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/tools/gendoc/main.go b/tools/gendoc/main.go new file mode 100644 index 0000000000..113d44d552 --- /dev/null +++ b/tools/gendoc/main.go @@ -0,0 +1,81 @@ +package main + +import ( + "fmt" + "os" + + "github.com/iotaledger/hive.go/apputils/config" + "github.com/iotaledger/hive.go/core/app" + waspApp "github.com/iotaledger/wasp/core/app" +) + +func createMarkdownFile(app *app.App, markdownHeaderPath string, markdownFilePath string, ignoreFlags map[string]struct{}, replaceTopicNames map[string]string) { + + markdownHeader := []byte(` +`) + + if markdownHeaderPath != "" { + var err error + markdownHeaderFile, err := os.ReadFile(markdownHeaderPath) + if err != nil { + panic(err) + } + + markdownHeader = append(markdownHeader, markdownHeaderFile...) + } + + println(fmt.Sprintf("Create markdown file for %s...", app.Info().Name)) + md := config.GetConfigurationMarkdown(app.Config(), app.FlagSet(), ignoreFlags, replaceTopicNames) + if err := os.WriteFile(markdownFilePath, append(markdownHeader, []byte(md)...), os.ModePerm); err != nil { + panic(err) + } + println(fmt.Sprintf("Markdown file for %s stored: %s", app.Info().Name, markdownFilePath)) +} + +func createDefaultConfigFile(app *app.App, configFilePath string, ignoreFlags map[string]struct{}) { + println(fmt.Sprintf("Create default configuration file for %s...", app.Info().Name)) + conf := config.GetDefaultAppConfigJSON(app.Config(), app.FlagSet(), ignoreFlags) + if err := os.WriteFile(configFilePath, []byte(conf), os.ModePerm); err != nil { + panic(err) + } + println(fmt.Sprintf("Default configuration file for %s stored: %s", app.Info().Name, configFilePath)) +} + +func main() { + + // MUST BE LOWER CASE + ignoreFlags := make(map[string]struct{}) + + replaceTopicNames := make(map[string]string) + replaceTopicNames["app"] = "Application" + replaceTopicNames["inx"] = "INX" + replaceTopicNames["log"] = "Shutdown Log" + replaceTopicNames["db"] = "Database" + replaceTopicNames["jwt"] = "JWT Auth" + replaceTopicNames["ip"] = "IP-based Auth" + replaceTopicNames["basic"] = "Basic Auth" + replaceTopicNames["webapi"] = "Web API" + replaceTopicNames["wal"] = "Write-Ahead Logging" + replaceTopicNames["rawBlocks"] = "Raw Blocks" + replaceTopicNames["nanomsg"] = "nanomsg" + + application := waspApp.App() + + createMarkdownFile( + application, + "configuration_header.md", + "../../documentation/docs/configuration.md", + ignoreFlags, + replaceTopicNames, + ) + + createDefaultConfigFile( + application, + "../../config_defaults.json", + ignoreFlags, + ) +} diff --git a/tools/misc/bls_bench_test.go b/tools/misc/bls_bench_test.go index 880f787583..54f0ae95d9 100644 --- a/tools/misc/bls_bench_test.go +++ b/tools/misc/bls_bench_test.go @@ -4,7 +4,7 @@ import ( "strconv" "testing" - "github.com/iotaledger/hive.go/crypto/bls" + "github.com/iotaledger/hive.go/core/crypto/bls" ) var dataToSign = "Hello BLS Benchmark!" diff --git a/tools/misc/bls_size_test.go b/tools/misc/bls_size_test.go index cf52c6cfac..746676d2d7 100644 --- a/tools/misc/bls_size_test.go +++ b/tools/misc/bls_size_test.go @@ -3,7 +3,7 @@ package misc import ( "testing" - "github.com/iotaledger/hive.go/crypto/bls" + "github.com/iotaledger/hive.go/core/crypto/bls" ) func TestSizes(t *testing.T) { diff --git a/tools/schema/generator/emitter.go b/tools/schema/generator/emitter.go index 4bc56da8b3..29fa9881cc 100644 --- a/tools/schema/generator/emitter.go +++ b/tools/schema/generator/emitter.go @@ -116,6 +116,8 @@ func (g *GenBase) emit(template string) { // emitEach processes "$#each array template" // It processes the template for each item in the array // Produces an error if the array key is unknown +// +//nolint:gocyclo func (g *GenBase) emitEach(line string) { g.log(line) g.indent() @@ -268,7 +270,7 @@ func (g *GenBase) emitFunc(line string) { // It processes the optional elseTemplate when the named condition is false // Produces an error if named condition is unknown -//nolint:funlen +//nolint:funlen,gocyclo func (g *GenBase) emitIf(line string) { g.log(line) g.indent() @@ -465,8 +467,8 @@ func (g *GenBase) setFuncKeys(pad bool, maxCamelLength, maxSnakeLength int) { func (g *GenBase) setMultiKeyValues(key, value string) { value = uncapitalize(value) - g.keys[key] = value - g.keys[capitalize(key)] = capitalize(value) + g.keys[key] = filterIDorVM(value) + g.keys[capitalize(key)] = filterIDorVM(capitalize(value)) g.keys[snake(key)] = snake(value) g.keys[upper(snake(key))] = upper(snake(value)) } diff --git a/tools/schema/generator/gotemplates/consts.go b/tools/schema/generator/gotemplates/consts.go index 23b2fbb889..86ebbfbbcd 100644 --- a/tools/schema/generator/gotemplates/consts.go +++ b/tools/schema/generator/gotemplates/consts.go @@ -6,7 +6,6 @@ package gotemplates var constsGo = map[string]string{ // ******************************* "consts.go": ` -//nolint:revive $#emit goPackage $#emit importWasmTypes diff --git a/tools/schema/generator/gotemplates/params.go b/tools/schema/generator/gotemplates/params.go index 15e0a3b38b..aa5d1159dd 100644 --- a/tools/schema/generator/gotemplates/params.go +++ b/tools/schema/generator/gotemplates/params.go @@ -6,7 +6,6 @@ package gotemplates var paramsGo = map[string]string{ // ******************************* "params.go": ` -//nolint:revive $#emit goPackage $#emit importWasmTypes diff --git a/tools/schema/generator/gotemplates/proxy.go b/tools/schema/generator/gotemplates/proxy.go index 999a8744a4..09df31800b 100644 --- a/tools/schema/generator/gotemplates/proxy.go +++ b/tools/schema/generator/gotemplates/proxy.go @@ -36,7 +36,7 @@ $#if this proxyMapThis proxyMapOther // ******************************* "proxyMapThis": ` func (s $TypeName) $FldName() Map$FldMapKey$+To$mut$FldType { - return Map$FldMapKey$+To$mut$FldType{proxy: s.proxy} + return Map$FldMapKey$+To$mut$FldType(s) } `, // ******************************* diff --git a/tools/schema/generator/gotemplates/results.go b/tools/schema/generator/gotemplates/results.go index 1d58f0838b..0a2d77d8f3 100644 --- a/tools/schema/generator/gotemplates/results.go +++ b/tools/schema/generator/gotemplates/results.go @@ -6,7 +6,6 @@ package gotemplates var resultsGo = map[string]string{ // ******************************* "results.go": ` -//nolint:revive $#emit goPackage $#emit importWasmTypes diff --git a/tools/schema/generator/utils.go b/tools/schema/generator/utils.go index d59c8bf16e..5476f05ed4 100644 --- a/tools/schema/generator/utils.go +++ b/tools/schema/generator/utils.go @@ -9,6 +9,7 @@ import ( "os" "regexp" "strings" + "unicode" ) var ( @@ -27,6 +28,24 @@ func capitalize(name string) string { return upper(name[:1]) + name[1:] } +func filterIDorVM(value string) string { + n := strings.Index(value, "Id") + for n >= 0 { + if n+2 == len(value) || unicode.IsUpper(rune(value[n+2])) { + value = value[:n] + "ID" + value[n+2:] + } + n = strings.Index(value, "Id") + } + n = strings.Index(value, "Vm") + for n >= 0 { + if n+2 == len(value) || unicode.IsUpper(rune(value[n+2])) { + value = value[:n] + "VM" + value[n+2:] + } + n = strings.Index(value, "Vm") + } + return value +} + func FindModulePath() error { cwd, err := os.Getwd() if err != nil { diff --git a/tools/schema/main.go b/tools/schema/main.go index b214ac674c..43f4bc2698 100644 --- a/tools/schema/main.go +++ b/tools/schema/main.go @@ -18,10 +18,11 @@ import ( "strings" "time" + "gopkg.in/yaml.v3" + "github.com/iotaledger/wasp/tools/schema/generator" "github.com/iotaledger/wasp/tools/schema/model" wasp_yaml "github.com/iotaledger/wasp/tools/schema/model/yaml" - "gopkg.in/yaml.v3" ) var ( diff --git a/tools/schema/model/field.go b/tools/schema/model/field.go index 196472a702..8eda4860cd 100644 --- a/tools/schema/model/field.go +++ b/tools/schema/model/field.go @@ -51,6 +51,7 @@ type Field struct { Line int // the line number originally in yaml/json file } +//nolint:gocyclo func (f *Field) Compile(s *Schema, fldNameDef, fldTypeDef *DefElt) error { fldName := strings.TrimSpace(fldNameDef.Val) f.Name = fldName diff --git a/tools/schema/model/schema.go b/tools/schema/model/schema.go index e6a912021c..fcab9eb876 100644 --- a/tools/schema/model/schema.go +++ b/tools/schema/model/schema.go @@ -315,7 +315,7 @@ func sortedFields(dict FieldMap) []string { for key := range dict { keys = append(keys, key) } - sort.Strings(keys) + sort.Slice(keys, func(i, j int) bool { return strings.ToLower(keys[i]) < strings.ToLower(keys[j]) }) return keys } @@ -323,7 +323,7 @@ type DefEltList []DefElt func (l DefEltList) Len() int { return len(l) } func (l DefEltList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l DefEltList) Less(i, j int) bool { return l[i].Val < l[j].Val } +func (l DefEltList) Less(i, j int) bool { return strings.ToLower(l[i].Val) < strings.ToLower(l[j].Val) } func sortedKeys(dict DefMap) []DefElt { keys := make(DefEltList, 0) diff --git a/tools/schema/model/yaml/convert_test.go b/tools/schema/model/yaml/convert_test.go index 4c6b412ecb..fde8581528 100644 --- a/tools/schema/model/yaml/convert_test.go +++ b/tools/schema/model/yaml/convert_test.go @@ -9,9 +9,10 @@ import ( "os" "testing" + "github.com/stretchr/testify/assert" + "github.com/iotaledger/wasp/tools/schema/model" "github.com/iotaledger/wasp/tools/schema/model/yaml" - "github.com/stretchr/testify/assert" ) func TestConvert(t *testing.T) { diff --git a/tools/schema/model/yaml/parser.go b/tools/schema/model/yaml/parser.go index fbbec18866..6b42754061 100644 --- a/tools/schema/model/yaml/parser.go +++ b/tools/schema/model/yaml/parser.go @@ -8,7 +8,7 @@ import ( "strings" ) -//nolint:funlen +//nolint:gocyclo func Parse(in []byte) *Node { var root Node path := []*Node{&root} // Nodes in each hierarchy diff --git a/tools/schema/model/yaml/parser_test.go b/tools/schema/model/yaml/parser_test.go index 1f33c18ec1..830d7bb68a 100644 --- a/tools/schema/model/yaml/parser_test.go +++ b/tools/schema/model/yaml/parser_test.go @@ -9,8 +9,9 @@ import ( "os" "testing" - "github.com/iotaledger/wasp/tools/schema/model/yaml" "github.com/stretchr/testify/assert" + + "github.com/iotaledger/wasp/tools/schema/model/yaml" ) func TestParse(t *testing.T) { diff --git a/tools/snap-cli/main.go b/tools/snap-cli/main.go index fcae7e70f8..e45ee7372d 100644 --- a/tools/snap-cli/main.go +++ b/tools/snap-cli/main.go @@ -103,7 +103,7 @@ func scanFile(fname string) *snapshot.FileProperties { func restoreDb(prop *snapshot.FileProperties) { dbDir := dbdirFromSnapshotFile(prop.FileName) - kvstream, err := kv.OpenKVStreamFile(prop.FileName) + kvstream, err := kv.OpenKVStreamFile(prop.FileName) //nolint:staticcheck // false-positive, kvstream IS used mustNoErr(err) if _, err := os.Stat(dbDir); !os.IsNotExist(err) { fmt.Printf("directory %s already exists. Can't create new database\n", dbDir) @@ -142,7 +142,7 @@ func restoreDb(prop *snapshot.FileProperties) { } func verify(prop *snapshot.FileProperties) { - kvstream, err := kv.OpenKVStreamFile(prop.FileName) + kvstream, err := kv.OpenKVStreamFile(prop.FileName) //nolint:staticcheck // false-positive, kvstream IS used mustNoErr(err) dbDir := dbdirFromSnapshotFile(prop.FileName) if _, err := os.Stat(dbDir); os.IsNotExist(err) { diff --git a/tools/wasp-cli/authentication/cmd.go b/tools/wasp-cli/authentication/cmd.go index a0da61222e..e8c5588327 100644 --- a/tools/wasp-cli/authentication/cmd.go +++ b/tools/wasp-cli/authentication/cmd.go @@ -1,8 +1,9 @@ package authentication import ( - "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/spf13/cobra" + + "github.com/iotaledger/wasp/tools/wasp-cli/log" ) var authCmd = &cobra.Command{ diff --git a/tools/wasp-cli/authentication/info.go b/tools/wasp-cli/authentication/info.go index 651f075959..a6956c7bd1 100644 --- a/tools/wasp-cli/authentication/info.go +++ b/tools/wasp-cli/authentication/info.go @@ -3,9 +3,10 @@ package authentication import ( "encoding/json" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var infoCmd = &cobra.Command{ diff --git a/tools/wasp-cli/authentication/login.go b/tools/wasp-cli/authentication/login.go index 87d16ecea7..3efec4bcce 100644 --- a/tools/wasp-cli/authentication/login.go +++ b/tools/wasp-cli/authentication/login.go @@ -5,10 +5,11 @@ import ( "os" "syscall" - "github.com/iotaledger/wasp/tools/wasp-cli/config" - "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/spf13/cobra" "golang.org/x/term" + + "github.com/iotaledger/wasp/tools/wasp-cli/config" + "github.com/iotaledger/wasp/tools/wasp-cli/log" ) var ( @@ -29,7 +30,7 @@ var loginCmd = &cobra.Command{ username = scanner.Text() log.Printf("Password: ") - passwordBytes, err := term.ReadPassword(int(syscall.Stdin)) //nolint:unconvert // int cast is needed for windows + passwordBytes, err := term.ReadPassword(int(syscall.Stdin)) //nolint:nolintlint,unconvert // int cast is needed for windows if err != nil { panic(err) } diff --git a/tools/wasp-cli/chain/accounts.go b/tools/wasp-cli/chain/accounts.go index d3cc1e5fcd..872612f71d 100644 --- a/tools/wasp-cli/chain/accounts.go +++ b/tools/wasp-cli/chain/accounts.go @@ -3,6 +3,8 @@ package chain import ( "strings" + "github.com/spf13/cobra" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/isc" @@ -12,7 +14,6 @@ import ( "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/util" "github.com/iotaledger/wasp/tools/wasp-cli/wallet" - "github.com/spf13/cobra" ) var listAccountsCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/activate.go b/tools/wasp-cli/chain/activate.go index 5fcef25fcf..a1492e8b25 100644 --- a/tools/wasp-cli/chain/activate.go +++ b/tools/wasp-cli/chain/activate.go @@ -3,9 +3,10 @@ package chain import ( "regexp" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var HTTP404ErrRegexp = regexp.MustCompile(`"Code":404`) diff --git a/tools/wasp-cli/chain/alias.go b/tools/wasp-cli/chain/alias.go index 4c0cb5694b..233f1584e2 100644 --- a/tools/wasp-cli/chain/alias.go +++ b/tools/wasp-cli/chain/alias.go @@ -1,11 +1,12 @@ package chain import ( + "github.com/spf13/cobra" + "github.com/spf13/viper" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" - "github.com/spf13/viper" ) var chainAlias string diff --git a/tools/wasp-cli/chain/blobs.go b/tools/wasp-cli/chain/blobs.go index c182b2b1d6..204619e084 100644 --- a/tools/wasp-cli/chain/blobs.go +++ b/tools/wasp-cli/chain/blobs.go @@ -3,13 +3,14 @@ package chain import ( "fmt" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/blob" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/util" - "github.com/spf13/cobra" ) var uploadQuorum int diff --git a/tools/wasp-cli/chain/blocklog.go b/tools/wasp-cli/chain/blocklog.go index f4e54d53a3..444b8b427c 100644 --- a/tools/wasp-cli/chain/blocklog.go +++ b/tools/wasp-cli/chain/blocklog.go @@ -4,6 +4,8 @@ import ( "strconv" "time" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/codec" "github.com/iotaledger/wasp/packages/kv/collections" @@ -11,7 +13,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/packages/vm/core/errors" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) func blockCmd() *cobra.Command { diff --git a/tools/wasp-cli/chain/callview.go b/tools/wasp-cli/chain/callview.go index 128684b5c2..aa6f7d2b9b 100644 --- a/tools/wasp-cli/chain/callview.go +++ b/tools/wasp-cli/chain/callview.go @@ -1,10 +1,11 @@ package chain import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/util" - "github.com/spf13/cobra" ) var callViewCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/cmd.go b/tools/wasp-cli/chain/cmd.go index ee64a2ee99..3ee8567243 100644 --- a/tools/wasp-cli/chain/cmd.go +++ b/tools/wasp-cli/chain/cmd.go @@ -1,8 +1,9 @@ package chain import ( - "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/spf13/cobra" + + "github.com/iotaledger/wasp/tools/wasp-cli/log" ) var chainCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/deploy.go b/tools/wasp-cli/chain/deploy.go index 8eab92aca2..bff8c4304d 100644 --- a/tools/wasp-cli/chain/deploy.go +++ b/tools/wasp-cli/chain/deploy.go @@ -8,6 +8,9 @@ import ( "os" "strconv" + "github.com/spf13/cobra" + "github.com/spf13/viper" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/packages/apilib" @@ -21,8 +24,6 @@ import ( "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/wallet" - "github.com/spf13/cobra" - "github.com/spf13/viper" ) func getAllWaspNodes() []int { diff --git a/tools/wasp-cli/chain/deploycontract.go b/tools/wasp-cli/chain/deploycontract.go index 87acb197e8..787b903cee 100644 --- a/tools/wasp-cli/chain/deploycontract.go +++ b/tools/wasp-cli/chain/deploycontract.go @@ -1,6 +1,8 @@ package chain import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" @@ -11,7 +13,6 @@ import ( "github.com/iotaledger/wasp/packages/vm/vmtypes" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/util" - "github.com/spf13/cobra" ) var deployContractCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/events.go b/tools/wasp-cli/chain/events.go index 5b4ddaf0f2..a6fdb520c3 100644 --- a/tools/wasp-cli/chain/events.go +++ b/tools/wasp-cli/chain/events.go @@ -1,11 +1,12 @@ package chain import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/vm/core/blocklog" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var eventsCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/evm.go b/tools/wasp-cli/chain/evm.go index 67921be994..0ad8afa2f1 100644 --- a/tools/wasp-cli/chain/evm.go +++ b/tools/wasp-cli/chain/evm.go @@ -7,11 +7,12 @@ import ( "encoding/base64" "github.com/ethereum/go-ethereum/core" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/evm/evmtypes" "github.com/iotaledger/wasp/packages/util" "github.com/iotaledger/wasp/packages/vm/core/evm" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) type evmDeployParams struct { diff --git a/tools/wasp-cli/chain/governance.go b/tools/wasp-cli/chain/governance.go index 4e33b3fe38..5de2d146e6 100644 --- a/tools/wasp-cli/chain/governance.go +++ b/tools/wasp-cli/chain/governance.go @@ -4,11 +4,12 @@ package chain import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) func changeAccessNodesCmd() *cobra.Command { diff --git a/tools/wasp-cli/chain/info.go b/tools/wasp-cli/chain/info.go index 30ff41906b..0bf3652262 100644 --- a/tools/wasp-cli/chain/info.go +++ b/tools/wasp-cli/chain/info.go @@ -8,13 +8,14 @@ import ( "github.com/iotaledger/wasp/tools/wasp-cli/util" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/vm/core/governance" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var infoCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/list.go b/tools/wasp-cli/chain/list.go index e7f842793d..6c6b43fcdc 100644 --- a/tools/wasp-cli/chain/list.go +++ b/tools/wasp-cli/chain/list.go @@ -3,10 +3,11 @@ package chain import ( "fmt" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/registry" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var listCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/listcontracts.go b/tools/wasp-cli/chain/listcontracts.go index 6f0a0d114d..aa2ac8464e 100644 --- a/tools/wasp-cli/chain/listcontracts.go +++ b/tools/wasp-cli/chain/listcontracts.go @@ -1,10 +1,11 @@ package chain import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/kv/collections" "github.com/iotaledger/wasp/packages/vm/core/root" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var listContractsCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/postrequest.go b/tools/wasp-cli/chain/postrequest.go index 2a055a7631..138b4683f3 100644 --- a/tools/wasp-cli/chain/postrequest.go +++ b/tools/wasp-cli/chain/postrequest.go @@ -3,13 +3,14 @@ package chain import ( "time" + "github.com/spf13/cobra" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/client/chainclient" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/packages/vm/gas" "github.com/iotaledger/wasp/tools/wasp-cli/util" - "github.com/spf13/cobra" ) func postRequest(hname, fname string, params chainclient.PostRequestParams, offLedger, adjustStorageDeposit bool) { diff --git a/tools/wasp-cli/chain/rotate.go b/tools/wasp-cli/chain/rotate.go index 42596b314d..c171bdb3b8 100644 --- a/tools/wasp-cli/chain/rotate.go +++ b/tools/wasp-cli/chain/rotate.go @@ -7,13 +7,14 @@ import ( "fmt" "os" + "github.com/spf13/cobra" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/wallet" - "github.com/spf13/cobra" ) var rotateCmd = &cobra.Command{ diff --git a/tools/wasp-cli/chain/rundkg.go b/tools/wasp-cli/chain/rundkg.go index 6ef6c6697e..fdb619b498 100644 --- a/tools/wasp-cli/chain/rundkg.go +++ b/tools/wasp-cli/chain/rundkg.go @@ -8,12 +8,13 @@ import ( "math/rand" "os" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/packages/apilib" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) func runDKGCmd() *cobra.Command { diff --git a/tools/wasp-cli/completion_generator.go b/tools/wasp-cli/completion_generator.go index f0035d5105..4c3ba56d4f 100644 --- a/tools/wasp-cli/completion_generator.go +++ b/tools/wasp-cli/completion_generator.go @@ -4,8 +4,9 @@ import ( "fmt" "os" - "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/spf13/cobra" + + "github.com/iotaledger/wasp/tools/wasp-cli/log" ) func completionCmd(name string) *cobra.Command { diff --git a/tools/wasp-cli/config/checkversions.go b/tools/wasp-cli/config/checkversions.go index 7a1d51bc94..f8a5c30ead 100644 --- a/tools/wasp-cli/config/checkversions.go +++ b/tools/wasp-cli/config/checkversions.go @@ -1,10 +1,11 @@ package config import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/packages/wasp" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var checkVersionsCmd = &cobra.Command{ diff --git a/tools/wasp-cli/config/config.go b/tools/wasp-cli/config/config.go index 1fb63820e2..fb2423b2cb 100644 --- a/tools/wasp-cli/config/config.go +++ b/tools/wasp-cli/config/config.go @@ -4,13 +4,14 @@ import ( "fmt" "time" + "github.com/spf13/cobra" + "github.com/spf13/viper" + "github.com/iotaledger/wasp/client" "github.com/iotaledger/wasp/packages/l1connection" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/packages/testutil/privtangle/privtangledefaults" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" - "github.com/spf13/viper" ) var ( diff --git a/tools/wasp-cli/decode/cmd.go b/tools/wasp-cli/decode/cmd.go index 8740431c99..58338db20a 100644 --- a/tools/wasp-cli/decode/cmd.go +++ b/tools/wasp-cli/decode/cmd.go @@ -1,10 +1,11 @@ package decode import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/kv" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/util" - "github.com/spf13/cobra" ) func Init(rootCmd *cobra.Command) { diff --git a/tools/wasp-cli/log/log.go b/tools/wasp-cli/log/log.go index 89d2e03214..b61bf00d92 100644 --- a/tools/wasp-cli/log/log.go +++ b/tools/wasp-cli/log/log.go @@ -7,9 +7,10 @@ import ( "strings" "text/tabwriter" - "github.com/iotaledger/hive.go/logger" - "github.com/iotaledger/wasp/packages/kv/dict" "github.com/spf13/cobra" + + "github.com/iotaledger/hive.go/core/logger" + "github.com/iotaledger/wasp/packages/kv/dict" ) var ( diff --git a/tools/wasp-cli/main.go b/tools/wasp-cli/main.go index 8c2c4a01b9..62e064f9a8 100644 --- a/tools/wasp-cli/main.go +++ b/tools/wasp-cli/main.go @@ -4,6 +4,8 @@ package main import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/wasp" "github.com/iotaledger/wasp/tools/wasp-cli/authentication" "github.com/iotaledger/wasp/tools/wasp-cli/chain" @@ -13,7 +15,6 @@ import ( "github.com/iotaledger/wasp/tools/wasp-cli/metrics" "github.com/iotaledger/wasp/tools/wasp-cli/peering" "github.com/iotaledger/wasp/tools/wasp-cli/wallet" - "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ diff --git a/tools/wasp-cli/metrics/consensus.go b/tools/wasp-cli/metrics/consensus.go index 592b15eb37..199a3bab08 100644 --- a/tools/wasp-cli/metrics/consensus.go +++ b/tools/wasp-cli/metrics/consensus.go @@ -4,11 +4,12 @@ import ( "fmt" "time" + "github.com/spf13/cobra" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var timestampNeverConst = time.Time{} diff --git a/tools/wasp-cli/metrics/metrics.go b/tools/wasp-cli/metrics/metrics.go index 7e43dd1c7e..820f9d9785 100644 --- a/tools/wasp-cli/metrics/metrics.go +++ b/tools/wasp-cli/metrics/metrics.go @@ -1,8 +1,9 @@ package metrics import ( - "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/spf13/cobra" + + "github.com/iotaledger/wasp/tools/wasp-cli/log" ) var metricsCmd = &cobra.Command{ diff --git a/tools/wasp-cli/metrics/nodeconn.go b/tools/wasp-cli/metrics/nodeconn.go index cc1a3cbfe5..7214b76b02 100644 --- a/tools/wasp-cli/metrics/nodeconn.go +++ b/tools/wasp-cli/metrics/nodeconn.go @@ -4,11 +4,12 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/webapi/model" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) const maxMessageLen = 80 diff --git a/tools/wasp-cli/peering/cmd.go b/tools/wasp-cli/peering/cmd.go index 685b2204aa..2fd465073e 100644 --- a/tools/wasp-cli/peering/cmd.go +++ b/tools/wasp-cli/peering/cmd.go @@ -4,8 +4,9 @@ package peering import ( - "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/spf13/cobra" + + "github.com/iotaledger/wasp/tools/wasp-cli/log" ) var peeringCmd = &cobra.Command{ diff --git a/tools/wasp-cli/peering/distrust.go b/tools/wasp-cli/peering/distrust.go index 33c518c9b4..5bbf28c377 100644 --- a/tools/wasp-cli/peering/distrust.go +++ b/tools/wasp-cli/peering/distrust.go @@ -4,10 +4,11 @@ package peering import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var distrustCmd = &cobra.Command{ diff --git a/tools/wasp-cli/peering/info.go b/tools/wasp-cli/peering/info.go index b9fe475162..11ac97802f 100644 --- a/tools/wasp-cli/peering/info.go +++ b/tools/wasp-cli/peering/info.go @@ -4,9 +4,10 @@ package peering import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var infoCmd = &cobra.Command{ diff --git a/tools/wasp-cli/peering/listtrusted.go b/tools/wasp-cli/peering/listtrusted.go index af65254f70..8c551859cc 100644 --- a/tools/wasp-cli/peering/listtrusted.go +++ b/tools/wasp-cli/peering/listtrusted.go @@ -4,9 +4,10 @@ package peering import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var listTrustedCmd = &cobra.Command{ diff --git a/tools/wasp-cli/peering/trust.go b/tools/wasp-cli/peering/trust.go index 077befa93e..c38574a5c6 100644 --- a/tools/wasp-cli/peering/trust.go +++ b/tools/wasp-cli/peering/trust.go @@ -4,11 +4,12 @@ package peering import ( + "github.com/mr-tron/base58" + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/peering" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/mr-tron/base58" - "github.com/spf13/cobra" ) var trustCmd = &cobra.Command{ diff --git a/tools/wasp-cli/util/types.go b/tools/wasp-cli/util/types.go index b36a9db7eb..d4bc3cbc6f 100644 --- a/tools/wasp-cli/util/types.go +++ b/tools/wasp-cli/util/types.go @@ -7,6 +7,8 @@ import ( "os" "strconv" + "github.com/mr-tron/base58" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/hashing" "github.com/iotaledger/wasp/packages/isc" @@ -15,10 +17,9 @@ import ( "github.com/iotaledger/wasp/packages/kv/dict" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/mr-tron/base58" ) -//nolint:funlen +//nolint:funlen,gocyclo func ValueFromString(vtype, s string) []byte { switch vtype { case "address": @@ -109,7 +110,7 @@ func ValueFromString(vtype, s string) []byte { return nil } -//nolint:funlen +//nolint:funlen,gocyclo func ValueToString(vtype string, v []byte) string { switch vtype { case "address": diff --git a/tools/wasp-cli/wallet/info.go b/tools/wasp-cli/wallet/info.go index 15eddce04b..94fae4fce6 100644 --- a/tools/wasp-cli/wallet/info.go +++ b/tools/wasp-cli/wallet/info.go @@ -1,12 +1,13 @@ package wallet import ( + "github.com/spf13/cobra" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var addressCmd = &cobra.Command{ diff --git a/tools/wasp-cli/wallet/request-funds.go b/tools/wasp-cli/wallet/request-funds.go index 7e148bde05..dce7e331e5 100644 --- a/tools/wasp-cli/wallet/request-funds.go +++ b/tools/wasp-cli/wallet/request-funds.go @@ -1,10 +1,11 @@ package wallet import ( + "github.com/spf13/cobra" + "github.com/iotaledger/wasp/packages/parameters" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/spf13/cobra" ) var requestFundsCmd = &cobra.Command{ diff --git a/tools/wasp-cli/wallet/send.go b/tools/wasp-cli/wallet/send.go index aff3aadac8..f3ee099cdd 100644 --- a/tools/wasp-cli/wallet/send.go +++ b/tools/wasp-cli/wallet/send.go @@ -1,13 +1,14 @@ package wallet import ( + "github.com/spf13/cobra" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/isc" "github.com/iotaledger/wasp/packages/transaction" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" "github.com/iotaledger/wasp/tools/wasp-cli/util" - "github.com/spf13/cobra" ) func sendFundsCmd() *cobra.Command { diff --git a/tools/wasp-cli/wallet/wallet.go b/tools/wasp-cli/wallet/wallet.go index e272c85b89..dac7e71dce 100644 --- a/tools/wasp-cli/wallet/wallet.go +++ b/tools/wasp-cli/wallet/wallet.go @@ -1,13 +1,14 @@ package wallet import ( + "github.com/mr-tron/base58" + "github.com/spf13/cobra" + "github.com/spf13/viper" + iotago "github.com/iotaledger/iota.go/v3" "github.com/iotaledger/wasp/packages/cryptolib" "github.com/iotaledger/wasp/tools/wasp-cli/config" "github.com/iotaledger/wasp/tools/wasp-cli/log" - "github.com/mr-tron/base58" - "github.com/spf13/cobra" - "github.com/spf13/viper" ) type WalletConfig struct { diff --git a/wasp.nomad.tpl b/wasp.nomad.tpl index f9c3da85fa..ee4821dfbb 100644 --- a/wasp.nomad.tpl +++ b/wasp.nomad.tpl @@ -76,8 +76,9 @@ variable "wasp_config" { "enabled": false, "bindAddress": "{{ env "NOMAD_ADDR_profiling" }}" }, - "l1": { - "inxAddress": "10.0.0.2:31171" + "inx": { + "address": "{{ range service "inx.tangle-testnet-hornet" }}{{ .Address }}:{{ .Port }}{{ end }}", + "maxConnectionAttempts": 30 }, "nanomsg":{ "port": {{ env "NOMAD_PORT_nanomsg" }} @@ -115,7 +116,7 @@ job "isc-${workspace}" { sticky = true } - count = 5 + count = 0 network { mode = "host" @@ -224,7 +225,7 @@ job "isc-${workspace}" { sticky = true } - count = 1 + count = 4 network { mode = "host"