diff --git a/.codecov.yml b/.codecov.yml index 1e2a8275a0..e5fe644ed7 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -45,6 +45,7 @@ flags: cctp-relayer: paths: - services/cctp-relayer/ + carryforward: true rfq: paths: - services/rfq/ diff --git a/.github/actions/add-label/action.yml b/.github/actions/add-label/action.yml index d9503ff11e..79f48aa1f3 100644 --- a/.github/actions/add-label/action.yml +++ b/.github/actions/add-label/action.yml @@ -32,7 +32,7 @@ runs: shell: bash - name: Add Label - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | github.rest.issues.addLabels({ diff --git a/.github/actions/remove-label/action.yml b/.github/actions/remove-label/action.yml index 02da1ef5de..f648a21af5 100644 --- a/.github/actions/remove-label/action.yml +++ b/.github/actions/remove-label/action.yml @@ -32,7 +32,7 @@ runs: shell: bash - name: Remove Label - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | async function removeLabel() { diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml index 8cc6cd5529..4a42c502c1 100644 --- a/.github/workflows/close-stale.yml +++ b/.github/workflows/close-stale.yml @@ -11,7 +11,7 @@ jobs: stale-prs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: stale-pr-message: 'This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.' exempt-pr-labels: exempt-stale diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 7513210ee7..d9c23327b2 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -25,10 +25,10 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 - name: Install Go if: ${{ matrix.language == 'go' }} - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.work' @@ -42,7 +42,7 @@ jobs: - name: Go modules cache if: ${{ matrix.language == 'go' }} - uses: actions/cache@v3 + uses: actions/cache@v4 with: # see https://github.com/mvdan/github-actions-golang path: | diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0f9698011e..de5090c565 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -107,11 +107,11 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 submodules: 'recursive' - name: Go modules cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: # see https://github.com/mvdan/github-actions-golang # also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night) @@ -125,7 +125,7 @@ jobs: ${{ runner.os }}-test-${{matrix.package}} - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} @@ -259,14 +259,14 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Go modules cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: # see https://github.com/mvdan/github-actions-golang # also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night) @@ -301,7 +301,7 @@ jobs: # e.g. ['package1', 'package2'] if both package folders contains changes package: ${{ fromJSON(needs.changes.outputs.packages_nodeps) }} steps: - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: 1.22.x @@ -379,7 +379,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 submodules: 'recursive' - name: Setup NodeJS @@ -396,12 +396,12 @@ jobs: run: npx lerna exec npm run build:go --parallel # Setup Go - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: 1.22.x - name: Go modules cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: # see https://github.com/mvdan/github-actions-golang # also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night) @@ -474,7 +474,7 @@ jobs: - uses: actions/checkout@v4 if: ${{ contains(fromJson(needs.pr_metadata.outputs.labels), format('needs-go-generate-{0}', matrix.package)) }} with: - fetch-depth: 1 + fetch-depth: 2 - name: Remove Label if: ${{ contains(fromJson(needs.pr_metadata.outputs.labels), format('needs-go-generate-{0}', matrix.package)) }} uses: ./.github/actions/remove-label @@ -496,7 +496,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 submodules: 'recursive' - name: Setup NodeJS @@ -519,12 +519,12 @@ jobs: if: ${{ contains(matrix.package, 'agents') || contains(matrix.package, 'services/rfq') }} # Setup Go - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: 1.22.x - name: Go modules cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: ${{ !contains(matrix.package, 'services/cctp-relayer') }} with: # see https://github.com/mvdan/github-actions-golang @@ -541,7 +541,7 @@ jobs: ${{ runner.os }}-go-generate-${{matrix.package}} - name: Cache Linuxbrew - uses: actions/cache@v3 + uses: actions/cache@v4 if: ${{ contains(matrix.package, 'scribe') }} with: path: | diff --git a/.github/workflows/goreleaser-actions.yml b/.github/workflows/goreleaser-actions.yml index 47397e2b5b..60af3fd5d8 100644 --- a/.github/workflows/goreleaser-actions.yml +++ b/.github/workflows/goreleaser-actions.yml @@ -136,7 +136,7 @@ jobs: submodules: 'recursive' - name: Set up cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/go-build diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index 37c24daf67..8cb1536b8c 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -40,3 +40,4 @@ jobs: CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' with: charts_dir: charts + pages_branch: master diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 92f37ec9b8..846b70f4cf 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -39,7 +39,7 @@ jobs: with: version: v3.9.2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.7 diff --git a/.github/workflows/lerna.yaml b/.github/workflows/lerna.yaml index db37434f7d..55ef37a387 100644 --- a/.github/workflows/lerna.yaml +++ b/.github/workflows/lerna.yaml @@ -37,6 +37,9 @@ jobs: - name: 'Version and publish' # Interesting step env: GH_TOKEN: ${{ secrets.LERNA_FGPAT }} + CODECOV_TOKEN: ${{ secrets.CODECOV }} + GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} + # branch is protected so this must be an admin token, this will expire on 03/01/2024 # replacement should be done by a service account with a fine-grained personal access token run: | diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 6357ec42f1..12d43abc36 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -26,7 +26,7 @@ jobs: - name: 'Checkout' uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 submodules: 'recursive' - name: Setup NodeJS @@ -40,6 +40,7 @@ jobs: - name: Run tests # Run tests of all packages run: npx lerna exec npm run ci:lint --parallel + test: runs-on: ubuntu-latest env: @@ -49,12 +50,18 @@ jobs: - name: 'Checkout' uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 submodules: 'recursive' - name: Setup NodeJS uses: ./.github/actions/setup-nodejs + # Foundry is required for build + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + - name: Verify Changed files uses: tj-actions/verify-changed-files@v11.1 id: verify-yarn-lock @@ -97,3 +104,9 @@ jobs: files: lcov.info attempt_limit: 5 attempt_delay: 30000 + + - name: Run build # Run tests of all packages + run: npx lerna exec npm run build --parallel || true # only for codecov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV }} + GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index 8a5efdb22a..499aa0bf98 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -141,7 +141,7 @@ jobs: if: ${{ matrix.package != 'solidity-devops' }} uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 2 submodules: 'recursive' - name: Setup NodeJS diff --git a/.github/workflows/ui-preview.yaml b/.github/workflows/ui-preview.yaml index 2b5a059997..0a1418449e 100644 --- a/.github/workflows/ui-preview.yaml +++ b/.github/workflows/ui-preview.yaml @@ -88,12 +88,18 @@ jobs: export DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_ENV echo "::set-output name=url::$DEPLOY_URL" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV }} + GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} - name: Deploy to Vercel (Output Prod) if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }} run: | vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} vercel build --token=${{ secrets.VERCEL_TOKEN }} --prod vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --prod + env: + CODECOV_TOKEN: ${{ secrets.CODECOV }} + GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} - name: Update PR Description if: ${{ github.event_name == 'pull_request' && format('refs/heads/{0}', github.event.repository.default_branch) != github.ref }} diff --git a/.golangci.yml b/.golangci.yml index e3e8a211cf..a789c11a26 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,6 +5,7 @@ run: - grpc/client/rest/* - bundle/* - generated/* + - otelginmetrics/* timeout: 15m skip-files: - '.*\\.abigen\\.go$' diff --git a/.vscode/settings.json b/.vscode/settings.json index 19bbfe56d3..ed3d2aeafe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.fontLigatures": "'calt', 'liga', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'ss09'", - "editor.formatOnSave": true, + // "editor.formatOnSave": true, "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, diff --git a/.yamllint.yml b/.yamllint.yml index 224200f36d..7e1b58b3c5 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -3,6 +3,7 @@ ignore: | **/charts/** **/swagger.yaml **/openapi.yaml + index.yaml rules: document-start: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37ba6e88c9..24a7ce7297 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -285,3 +285,7 @@ func TestEventDBSuite(t *testing.T) { } ``` + +## Github Actions + +If you want to do a shallow clone, use `fetch-depth: 2` rather than `fetch-depth: 1`. This allows [some actions](https://docs.codecov.com/docs/environment-specific-requirements) (though not all of them) to determine the correct sha. diff --git a/README.md b/README.md index 8bad25066f..35bfaeef94 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ There are a variety of different packages in this repo, covered comprehensively - [Contracts](https://github.com/synapsecns/synapse-contracts): The contracts used to power the synapse bridge. - [Frontend](packages/synapse-interface): The frontend used to interact with the bridge. - [SDK](packages/sdk-router): The SDK used to interact with the bridge. + - [Widget](packages/widget): The widget used to access the synapse bridge externally. - Explorer: A bridge explorer that allows users to view on-chain data state about the bridge. - [Backend](services/explorer): The backend used to power the explorer. - [Frontend](packages/explorer-ui): The frontend used to interact with the explorer. diff --git a/agents/go.mod b/agents/go.mod index 9591fca78a..d6e44b9b2d 100644 --- a/agents/go.mod +++ b/agents/go.mod @@ -5,7 +5,7 @@ go 1.22 toolchain go1.22.4 require ( - github.com/BurntSushi/toml v1.3.2 + github.com/BurntSushi/toml v1.4.0 github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/MichaelMure/go-term-markdown v0.1.4 github.com/aws/smithy-go v1.15.0 @@ -33,8 +33,8 @@ require ( github.com/vburenin/ifacemaker v1.2.0 github.com/vektra/mockery/v2 v2.14.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 golang.org/x/sync v0.7.0 google.golang.org/grpc v1.64.0 gopkg.in/yaml.v2 v2.4.0 @@ -77,7 +77,7 @@ require ( github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/flock v0.12.0 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go v1.1.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect @@ -101,8 +101,8 @@ require ( github.com/uptrace/opentelemetry-go-extra/otelzap v0.3.1 // indirect github.com/valyala/fastjson v1.6.4 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) @@ -115,7 +115,6 @@ require ( github.com/99designs/gqlgen v0.17.36 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect - github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect github.com/MichaelMure/go-term-text v0.3.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect @@ -191,7 +190,7 @@ require ( github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-resty/resty/v2 v2.13.1 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect + github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -204,7 +203,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.4 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/consul/sdk v0.14.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -226,7 +225,7 @@ require ( github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kyokomi/emoji/v2 v2.2.8 // indirect github.com/leodido/go-urn v1.4.0 // indirect @@ -261,12 +260,12 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.54.0 // indirect github.com/prometheus/procfs v0.15.0 // indirect - github.com/puzpuzpuz/xsync v1.4.3 // indirect + github.com/puzpuzpuz/xsync v1.5.2 // indirect github.com/ravilushqa/otelgqlgen v0.13.1 // indirect github.com/rbretecher/go-postman-collection v0.9.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.27.0 // indirect + github.com/rs/zerolog v1.28.0 // indirect github.com/rung/go-safecast v1.0.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/segmentio/fasthash v1.0.3 // indirect @@ -301,23 +300,23 @@ require ( go.opentelemetry.io/contrib v1.16.1 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/image v0.6.0 // indirect - golang.org/x/mod v0.18.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.21.0 // indirect @@ -327,7 +326,7 @@ require ( golang.org/x/tools v0.22.0 // indirect google.golang.org/api v0.183.0 // indirect google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/hedzr/errors.v3 v3.1.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/agents/go.sum b/agents/go.sum index 42b39c65d7..0401fc2217 100644 --- a/agents/go.sum +++ b/agents/go.sum @@ -77,8 +77,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN 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/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= @@ -92,10 +92,6 @@ github.com/Flaque/filet v0.0.0-20201012163910-45f684403088/go.mod h1:TK+jB3mBs+8 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 h1:ClzzXMDDuUbWfNNZqGeYq4PnYOlwlOVIvSyNaIy0ykg= github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3/go.mod h1:we0YA5CsBbH5+/NUzC/AlMmxaDtWlXeNsqrwXjTzmzA= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:sg9CWNOhr58hMGmJ0q7x7jQ/B1RK/GyHNmeaYCJos9M= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:uHbOgfPowb74TKlV4AR5Az2haG6evxzM8Lmj1Xil25E= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:mD+/7fgGmTO9w3g8xYfovo7GBSkyjkmQiacVj9VPx+0= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:sAFuaugbNEiH1k50YhFNuD2+Gwga8oetKMT2RSFpglU= github.com/MichaelMure/go-term-markdown v0.1.4 h1:Ir3kBXDUtOX7dEv0EaQV8CNPpH+T7AfTh0eniMOtNcs= github.com/MichaelMure/go-term-markdown v0.1.4/go.mod h1:EhcA3+pKYnlUsxYKBJ5Sn1cTQmmBMjeNlpV8nRb+JxA= github.com/MichaelMure/go-term-text v0.3.1 h1:Kw9kZanyZWiCHOYu9v/8pWEgDQ6UVN9/ix2Vd2zzWf0= @@ -510,12 +506,12 @@ github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22 github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.0 h1:xHW8t8GPAiGtqz7KxiSqfOEXwpOaqhpYZrTE2MQBgXY= +github.com/gofrs/flock v0.12.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= @@ -626,8 +622,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 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.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= @@ -720,8 +716,8 @@ github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrO github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 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/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= -github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= @@ -771,8 +767,8 @@ github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -1015,8 +1011,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/puzpuzpuz/xsync v1.4.3 h1:nS/Iqc4EnpJ8jm/MzJ+e3MUaP2Ys2mqXeEfoxoU0HaM= -github.com/puzpuzpuz/xsync v1.4.3/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= +github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY= +github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU= github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU= github.com/ravilushqa/otelgqlgen v0.13.1 h1:V+zFE75iDd2/CSzy5kKnb+Fi09SsE5535wv9U2nUEFE= @@ -1043,9 +1039,9 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= -github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/rung/go-safecast v1.0.1 h1:7rkt2qO4JGdOkWKdPEBFLaEwQy20y0IhhWJNFxmH0p0= github.com/rung/go-safecast v1.0.1/go.mod h1:dzUcUS2UMtbfVc7w6mx/Ur3UYcpXEZC+WilISksJ4P8= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1232,36 +1228,36 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1363,8 +1359,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/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= @@ -1730,10 +1726,10 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20240528184218-531527333157 h1:u7WMYrIrVvs0TF5yaKwKNbcJyySYf+HAIFXxWltJOXE= google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1768,8 +1764,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= diff --git a/contrib/git-changes-action/go.mod b/contrib/git-changes-action/go.mod index 381f06dddc..559a10a733 100644 --- a/contrib/git-changes-action/go.mod +++ b/contrib/git-changes-action/go.mod @@ -25,7 +25,7 @@ require ( github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c github.com/xlab/treeprint v1.2.0 golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 - golang.org/x/mod v0.18.0 + golang.org/x/mod v0.19.0 golang.org/x/oauth2 v0.21.0 ) diff --git a/contrib/git-changes-action/go.sum b/contrib/git-changes-action/go.sum index 91d17fe5d5..0bf0b64325 100644 --- a/contrib/git-changes-action/go.sum +++ b/contrib/git-changes-action/go.sum @@ -343,8 +343,8 @@ 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/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/contrib/opbot/botmd/botmd.go b/contrib/opbot/botmd/botmd.go index 25b4041e64..cba277b6f9 100644 --- a/contrib/opbot/botmd/botmd.go +++ b/contrib/opbot/botmd/botmd.go @@ -2,22 +2,34 @@ package botmd import ( "context" + "fmt" "github.com/slack-io/slacker" "github.com/synapsecns/sanguine/contrib/opbot/config" "github.com/synapsecns/sanguine/contrib/opbot/signoz" + "github.com/synapsecns/sanguine/core/dbcommon" "github.com/synapsecns/sanguine/core/metrics" + signerConfig "github.com/synapsecns/sanguine/ethergo/signer/config" + "github.com/synapsecns/sanguine/ethergo/signer/signer" + "github.com/synapsecns/sanguine/ethergo/submitter" + cctpSql "github.com/synapsecns/sanguine/services/cctp-relayer/db/sql" + omnirpcClient "github.com/synapsecns/sanguine/services/omnirpc/client" + "golang.org/x/sync/errgroup" ) // Bot represents the bot server. type Bot struct { - handler metrics.Handler - server *slacker.Slacker - cfg config.Config - signozClient *signoz.Client + handler metrics.Handler + server *slacker.Slacker + cfg config.Config + signozClient *signoz.Client + signozEnabled bool + rpcClient omnirpcClient.RPCClient + signer signer.Signer + submitter submitter.TransactionSubmitter } // NewBot creates a new bot server. -func NewBot(handler metrics.Handler, cfg config.Config) Bot { +func NewBot(handler metrics.Handler, cfg config.Config) *Bot { server := slacker.NewClient(cfg.SlackBotToken, cfg.SlackAppToken) bot := Bot{ handler: handler, @@ -25,11 +37,24 @@ func NewBot(handler metrics.Handler, cfg config.Config) Bot { server: server, } - bot.signozClient = signoz.NewClientFromUser(handler, cfg.SignozBaseURL, cfg.SignozEmail, cfg.SignozPassword) + // you should be able to run opbot even without signoz. + if cfg.SignozPassword != "" && cfg.SignozEmail != "" && cfg.SignozBaseURL != "" { + bot.signozClient = signoz.NewClientFromUser(handler, cfg.SignozBaseURL, cfg.SignozEmail, cfg.SignozPassword) + bot.signozEnabled = true + } + + bot.rpcClient = omnirpcClient.NewOmnirpcClient(cfg.OmniRPCURL, handler, omnirpcClient.WithCaptureReqRes()) - bot.addCommands(bot.traceCommand(), bot.rfqLookupCommand()) + bot.addMiddleware(bot.tracingMiddleware(), bot.metricsMiddleware()) + bot.addCommands(bot.traceCommand(), bot.rfqLookupCommand(), bot.rfqRefund()) - return bot + return &bot +} + +func (b *Bot) addMiddleware(middlewares ...slacker.CommandMiddlewareHandler) { + for _, middleware := range middlewares { + b.server.AddCommandMiddleware(middleware) + } } func (b *Bot) addCommands(commands ...*slacker.CommandDefinition) { @@ -41,6 +66,33 @@ func (b *Bot) addCommands(commands ...*slacker.CommandDefinition) { // Start starts the bot server. // nolint: wrapcheck func (b *Bot) Start(ctx context.Context) error { + var err error + b.signer, err = signerConfig.SignerFromConfig(ctx, b.cfg.Signer) + if err != nil { + return fmt.Errorf("failed to create signer: %w", err) + } + + dbType, err := dbcommon.DBTypeFromString(b.cfg.Database.Type) + if err != nil { + return fmt.Errorf("could not get db type: %w", err) + } + + store, err := cctpSql.Connect(ctx, dbType, b.cfg.Database.DSN, b.handler) + if err != nil { + return fmt.Errorf("could not connect to database: %w", err) + } + + b.submitter = submitter.NewTransactionSubmitter(b.handler, b.signer, b.rpcClient, store.SubmitterDB(), &b.cfg.SubmitterConfig) + + g, ctx := errgroup.WithContext(ctx) + g.Go(func() error { + return b.submitter.Start(ctx) + }) + + g.Go(func() error { + return b.server.Listen(ctx) + }) + // nolint: wrapcheck - return b.server.Listen(ctx) + return g.Wait() } diff --git a/contrib/opbot/botmd/commands.go b/contrib/opbot/botmd/commands.go index 09939360cd..41c38cf429 100644 --- a/contrib/opbot/botmd/commands.go +++ b/contrib/opbot/botmd/commands.go @@ -3,25 +3,49 @@ package botmd import ( + "context" + "errors" "fmt" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/hako/durafmt" "github.com/slack-go/slack" "github.com/slack-io/slacker" "github.com/synapsecns/sanguine/contrib/opbot/signoz" "github.com/synapsecns/sanguine/ethergo/chaindata" + rfqClient "github.com/synapsecns/sanguine/services/rfq/api/client" + "github.com/synapsecns/sanguine/services/rfq/contracts/fastbridge" "github.com/synapsecns/sanguine/services/rfq/relayer/relapi" "log" + "math/big" "regexp" "strings" "sync" "time" ) +func (b *Bot) requiresSignoz(definition *slacker.CommandDefinition) *slacker.CommandDefinition { + if b.signozEnabled { + return definition + } + return &slacker.CommandDefinition{ + Command: definition.Command, + Description: fmt.Sprintf("normally this would \"%s\", but signoz is not configured", definition.Description), + Examples: definition.Examples, + Handler: func(ctx *slacker.CommandContext) { + _, err := ctx.Response().Reply("cannot run command: signoz is not configured") + if err != nil { + log.Println(err) + } + }, + } +} + // nolint: traceCommand, gocognit // TODO: add trace middleware. func (b *Bot) traceCommand() *slacker.CommandDefinition { - return &slacker.CommandDefinition{ + return b.requiresSignoz(&slacker.CommandDefinition{ Command: "trace ", Description: "find a transaction in signoz", Examples: []string{ @@ -85,8 +109,7 @@ func (b *Bot) traceCommand() *slacker.CommandDefinition { spanID := results.Data["spanID"].(string) serviceName := results.Data["serviceName"].(string) - // anon.to is used here to prevent unfurl https://github.com/slack-io/slacker/issues/11 - url := fmt.Sprintf("https://anon.to/?%s/trace/%s?spanId=%s", b.cfg.SignozBaseURL, trace, spanID) + url := fmt.Sprintf("%s/trace/%s?spanId=%s", b.cfg.SignozBaseURL, trace, spanID) traceName := fmt.Sprintf("<%s|%s>", url, results.Data["name"].(string)) relativeTime := durafmt.Parse(time.Since(results.Timestamp)).LimitFirstN(1).String() @@ -107,12 +130,12 @@ func (b *Bot) traceCommand() *slacker.CommandDefinition { }, nil)) } - _, err = ctx.Response().ReplyBlocks(slackBlocks) + _, err = ctx.Response().ReplyBlocks(slackBlocks, slacker.WithUnfurlLinks(false)) if err != nil { log.Println(err) } }, - } + }) } func (b *Bot) rfqLookupCommand() *slacker.CommandDefinition { @@ -216,13 +239,101 @@ func (b *Bot) rfqLookupCommand() *slacker.CommandDefinition { slackBlocks = append(slackBlocks, slack.NewSectionBlock(nil, objects, nil)) } - _, err := ctx.Response().ReplyBlocks(slackBlocks) + _, err := ctx.Response().ReplyBlocks(slackBlocks, slacker.WithUnfurlLinks(false)) if err != nil { log.Println(err) } }} } +// nolint: gocognit, cyclop. +func (b *Bot) rfqRefund() *slacker.CommandDefinition { + return &slacker.CommandDefinition{ + Command: "refund ", + Description: "refund a quote request", + Examples: []string{"refund 0x1234"}, + Handler: func(ctx *slacker.CommandContext) { + tx := stripLinks(ctx.Request().Param("tx")) + + if len(tx) == 0 { + _, err := ctx.Response().Reply("please provide a tx hash") + if err != nil { + log.Println(err) + } + return + } + + for _, relayer := range b.cfg.RelayerURLS { + relClient := relapi.NewRelayerClient(b.handler, relayer) + + rawRequest, err := getQuoteRequest(ctx.Context(), relClient, tx) + if err != nil { + _, err := ctx.Response().Reply("error fetching quote request") + if err != nil { + log.Println(err) + } + return + } + + fastBridgeContract, err := b.makeFastBridge(ctx.Context(), rawRequest) + if err != nil { + _, err := ctx.Response().Reply(err.Error()) + if err != nil { + log.Println(err) + } + return + } + nonce, err := b.submitter.SubmitTransaction(ctx.Context(), big.NewInt(int64(rawRequest.OriginChainID)), func(transactor *bind.TransactOpts) (tx *types.Transaction, err error) { + tx, err = fastBridgeContract.Refund(transactor, common.Hex2Bytes(rawRequest.QuoteRequestRaw)) + if err != nil { + return nil, fmt.Errorf("error submitting refund: %w", err) + } + return tx, nil + }) + if err != nil { + log.Printf("error submitting refund: %v\n", err) + continue + } + + // TODO: follow the lead of https://github.com/synapsecns/sanguine/pull/2845 + _, err = ctx.Response().Reply(fmt.Sprintf("refund submitted with nonce %d", nonce)) + if err != nil { + log.Println(err) + } + return + } + }, + } +} + +func (b *Bot) makeFastBridge(ctx context.Context, req *relapi.GetQuoteRequestResponse) (*fastbridge.FastBridge, error) { + client, err := rfqClient.NewUnauthenticatedClient(b.handler, b.cfg.RFQApiURL) + if err != nil { + return nil, fmt.Errorf("error creating rfq client: %w", err) + } + + contracts, err := client.GetRFQContracts(ctx) + if err != nil { + return nil, fmt.Errorf("error fetching rfq contracts: %w", err) + } + + chainClient, err := b.rpcClient.GetChainClient(ctx, int(req.OriginChainID)) + if err != nil { + return nil, fmt.Errorf("error getting chain client: %w", err) + } + + contractAddress, ok := contracts.Contracts[req.OriginChainID] + if !ok { + return nil, errors.New("contract address not found") + } + + fastBridgeHandle, err := fastbridge.NewFastBridge(common.HexToAddress(contractAddress), chainClient) + if err != nil { + return nil, fmt.Errorf("error creating fast bridge: %w", err) + } + return fastBridgeHandle, nil +} + func toExplorerSlackLink(ogHash string) string { rfqHash := strings.ToUpper(ogHash) // cut off 0x @@ -230,7 +341,7 @@ func toExplorerSlackLink(ogHash string) string { rfqHash = strings.ToLower(rfqHash[2:]) } - return fmt.Sprintf("", rfqHash, ogHash) + return fmt.Sprintf("", rfqHash, ogHash) } // produce a salck link if the explorer exists. @@ -241,10 +352,27 @@ func toTXSlackLink(txHash string, chainID uint32) string { } // TODO: remove when we can contorl unfurl - return fmt.Sprintf("", url, txHash) + return fmt.Sprintf("<%s|%s>", url, txHash) } func stripLinks(input string) string { linkRegex := regexp.MustCompile(`]+\|([^>]+)>`) return linkRegex.ReplaceAllString(input, "$1") } + +func getQuoteRequest(ctx context.Context, client relapi.RelayerClient, tx string) (*relapi.GetQuoteRequestResponse, error) { + // at this point tx can be a txid or a has, we try both + txRequest, err := client.GetQuoteRequestStatusByTxHash(ctx, tx) + if err == nil { + // override tx with txid + tx = txRequest.TxID + } + + // look up quote request + qr, err := client.GetQuoteRequestByTXID(ctx, tx) + if err != nil { + return nil, fmt.Errorf("error fetching quote request: %w", err) + } + + return qr, nil +} diff --git a/contrib/opbot/botmd/middleware.go b/contrib/opbot/botmd/middleware.go new file mode 100644 index 0000000000..88de5e8809 --- /dev/null +++ b/contrib/opbot/botmd/middleware.go @@ -0,0 +1,117 @@ +package botmd + +import ( + "context" + "fmt" + "github.com/hedzr/log" + "github.com/slack-io/slacker" + "github.com/synapsecns/sanguine/core/metrics" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" + "time" +) + +const ( + instrumentationName = "github.com/synapsecns/sanguine/contrib/opbot/botmd" + instrumentationVersion = "0.1.0" +) + +func (b *Bot) tracingMiddleware() slacker.CommandMiddlewareHandler { + return func(next slacker.CommandHandler) slacker.CommandHandler { + return func(cmdCtx *slacker.CommandContext) { + ctx, span := b.handler.Tracer().Start(cmdCtx.Context(), fmt.Sprintf("command.%s", cmdCtx.Definition().Command), trace.WithAttributes( + attribute.String("user_id", cmdCtx.Event().UserID), + attribute.String("channel_id", retrieveChannelIfExists(cmdCtx.Event())), + )) + + cmdCtx.WithContext(ctx) + + defer func() { + metrics.EndSpan(span) + }() + + next(cmdCtx) + } + } +} + +const unknownChannel = "unknown" + +func retrieveChannelIfExists(event *slacker.MessageEvent) string { + if event != nil && event.Channel != nil { + return event.Channel.ID + } + return unknownChannel +} + +// assumes method is only called once. +type otelRecorder struct { + attemptsCounter metric.Int64UpDownCounter + totalDuration metric.Int64Histogram + activeRequestsCounter metric.Int64UpDownCounter +} + +func newOtelRecorder() otelRecorder { + otr := otelRecorder{} + meter := otel.Meter(instrumentationName, metric.WithInstrumentationVersion(instrumentationVersion)) + + // todo: make an option + metricName := func(metricName string) string { + return metricName + } + + var err error + otr.attemptsCounter, err = meter.Int64UpDownCounter(metricName("slacker.request_count"), metric.WithDescription("Number of Requests"), metric.WithUnit("Count")) + if err != nil { + log.Warnf("failed to create counter: %v", err) + } + otr.totalDuration, err = meter.Int64Histogram(metricName("slacker.duration"), metric.WithDescription("Time Taken by request"), metric.WithUnit("Milliseconds")) + if err != nil { + log.Warnf("failed to create histogram: %v", err) + } + + otr.activeRequestsCounter, err = meter.Int64UpDownCounter("slacker.active_requests") + if err != nil { + log.Warnf("failed to create histogram: %v", err) + } + + return otr +} + +// AddRequests increments the number of requests being processed. +func (r *otelRecorder) AddRequests(ctx context.Context, quantity int64, attributes []attribute.KeyValue) { + r.attemptsCounter.Add(ctx, quantity, metric.WithAttributes(attributes...)) +} + +// AddInflightRequests increments and decrements the number of inflight request being processed. +func (r *otelRecorder) AddInflightRequests(ctx context.Context, quantity int64, attributes []attribute.KeyValue) { + r.activeRequestsCounter.Add(ctx, quantity, metric.WithAttributes(attributes...)) +} + +// ObserverCommandDuration measures the duration of an HTTP request. +func (r *otelRecorder) ObserverCommandDuration(ctx context.Context, duration time.Duration, attributes []attribute.KeyValue) { + r.totalDuration.Record(ctx, int64(duration/time.Millisecond), metric.WithAttributes(attributes...)) +} + +func (b *Bot) metricsMiddleware() slacker.CommandMiddlewareHandler { + // assumes method is only called once. + otr := newOtelRecorder() + + return func(next slacker.CommandHandler) slacker.CommandHandler { + return func(cmdCtx *slacker.CommandContext) { + attributes := []attribute.KeyValue{ + attribute.String("command", cmdCtx.Definition().Command), + } + start := time.Now() + otr.AddInflightRequests(cmdCtx.Context(), 1, attributes) + otr.AddRequests(cmdCtx.Context(), 1, attributes) + defer func() { + otr.AddInflightRequests(cmdCtx.Context(), -1, attributes) + }() + next(cmdCtx) + otr.ObserverCommandDuration(cmdCtx.Context(), time.Since(start), attributes) + } + } +} diff --git a/contrib/opbot/cmd/commands.go b/contrib/opbot/cmd/commands.go index 7d09a59924..3b7001f0ad 100644 --- a/contrib/opbot/cmd/commands.go +++ b/contrib/opbot/cmd/commands.go @@ -3,6 +3,7 @@ package cmd import ( "fmt" "github.com/synapsecns/sanguine/contrib/opbot/botmd" + "github.com/synapsecns/sanguine/core" "github.com/synapsecns/sanguine/core/metrics" // used for testing. @@ -23,7 +24,7 @@ var slackBotCommand = &cli.Command{ Usage: "start the slack bot", Flags: []cli.Flag{fileFlag}, Action: func(c *cli.Context) error { - configFile, err := os.ReadFile(c.String(fileFlag.Name)) + configFile, err := os.ReadFile(core.ExpandOrReturnPath(c.String(fileFlag.Name))) if err != nil { return fmt.Errorf("failed to open config file: %w", err) } diff --git a/contrib/opbot/config/config.go b/contrib/opbot/config/config.go index 7a6e1d9800..606e413c09 100644 --- a/contrib/opbot/config/config.go +++ b/contrib/opbot/config/config.go @@ -1,6 +1,11 @@ // Package config provides a simple way to read and write configuration files. package config +import ( + "github.com/synapsecns/sanguine/ethergo/signer/config" + submitterConfig "github.com/synapsecns/sanguine/ethergo/submitter/config" +) + // Config represents the configuration of the application. type Config struct { // SlackBotToken is the token of the slack bot. @@ -15,6 +20,23 @@ type Config struct { // inject only with init container! SignozPassword string `yaml:"signoz_password"` // SignozBaseURL is the base url of the signoz instance. - SignozBaseURL string `yaml:"signoz_base_url"` - RelayerURLS []string `yaml:"rfq_relayer_urls"` + SignozBaseURL string `yaml:"signoz_base_url"` + // RelayerURLS is the list of RFQ relayer URLs. + RelayerURLS []string `yaml:"rfq_relayer_urls"` + // RFQApiURL is the URL of the RFQ API. + RFQApiURL string `yaml:"rfq_api_url"` + // OmniRPCURL is the URL of the Omni RPC. + OmniRPCURL string `yaml:"omnirpc_url"` + // Signer is the signer config. + Signer config.SignerConfig `yaml:"signer"` + // SubmitterConfig is the submitter config. + SubmitterConfig submitterConfig.Config `yaml:"submitter_config"` + // Database is the database config. + Database DatabaseConfig `yaml:"database"` +} + +// DatabaseConfig represents the configuration for the database. +type DatabaseConfig struct { + Type string `yaml:"type"` + DSN string `yaml:"dsn"` // Data Source Name } diff --git a/contrib/opbot/go.mod b/contrib/opbot/go.mod index 089ef3ea02..1cdcc292e0 100644 --- a/contrib/opbot/go.mod +++ b/contrib/opbot/go.mod @@ -7,12 +7,14 @@ require ( github.com/charmbracelet/huh v0.4.2 github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d github.com/davidmytton/url-verifier v1.0.1 - github.com/dubonzi/otelresty v1.2.0 + github.com/dubonzi/otelresty v1.3.0 github.com/ethereum/go-ethereum v1.13.8 github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a github.com/go-resty/resty/v2 v2.13.1 github.com/google/uuid v1.6.0 github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b + github.com/hedzr/log v1.6.3 + github.com/ipfs/go-log v1.0.5 github.com/joho/godotenv v1.5.1 github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 github.com/mailru/easyjson v0.7.7 @@ -22,10 +24,19 @@ require ( github.com/slack-io/slacker v0.1.0 github.com/synapsecns/sanguine/core v0.0.0-00010101000000-000000000000 github.com/synapsecns/sanguine/ethergo v0.1.0 + github.com/synapsecns/sanguine/services/cctp-relayer v0.0.0-00010101000000-000000000000 + github.com/synapsecns/sanguine/services/omnirpc v0.0.0-00010101000000-000000000000 github.com/synapsecns/sanguine/services/rfq v0.0.0-00010101000000-000000000000 github.com/urfave/cli/v2 v2.27.2 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 + golang.org/x/sync v0.7.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 + gorm.io/driver/mysql v1.5.6 + gorm.io/driver/sqlite v1.5.6 + gorm.io/gorm v1.25.10 k8s.io/apimachinery v0.29.3 ) @@ -40,7 +51,7 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect - github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect + github.com/KyleBanks/depth v1.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect @@ -124,11 +135,16 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/spec v0.20.14 // indirect + github.com/go-openapi/swag v0.22.9 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/go-sql-driver/mysql v1.7.0 // indirect + github.com/goccy/go-json v0.10.3 // indirect + github.com/gofrs/flock v0.12.0 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -136,7 +152,7 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.4 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go v1.1.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect @@ -146,11 +162,12 @@ require ( github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/imkira/go-interpol v1.1.0 // indirect github.com/integralist/go-findroot v0.0.0-20160518114804-ac90681525dc // indirect - github.com/ipfs/go-log v1.0.5 // 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-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jellydator/ttlcache/v3 v3.1.1 // indirect github.com/jftuga/ellipsis v1.0.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -158,7 +175,7 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -170,6 +187,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/mattn/go-tty v0.0.3 // indirect github.com/miguelmota/go-ethereum-hdwallet v0.1.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -199,13 +217,15 @@ require ( github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/shomali11/commander v0.0.0-20230730023802-0b64f620037d // indirect - github.com/shomali11/proper v0.0.0-20190608032528-6e70a05688e7 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/skeema/knownhosts v1.2.2 // indirect + github.com/slack-io/commander v0.0.0-20231120025847-9fd78b4b2d54 // indirect + github.com/slack-io/proper v0.0.0-20231119200853-f78ba4fc878f // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/supranational/blst v0.3.11 // indirect - github.com/synapsecns/sanguine/services/cctp-relayer v0.0.0-00010101000000-000000000000 // indirect - github.com/synapsecns/sanguine/services/omnirpc v0.0.0-00010101000000-000000000000 // indirect + github.com/swaggo/files v1.0.1 // indirect + github.com/swaggo/gin-swagger v1.6.0 // indirect + github.com/swaggo/swag v1.16.3 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/teivah/onecontext v1.3.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -226,41 +246,36 @@ require ( go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/mod v0.18.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/api v0.183.0 // indirect google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gorm.io/gorm v1.25.10 // indirect k8s.io/klog/v2 v2.120.1 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect rsc.io/tmplfunc v0.0.3 // indirect @@ -271,8 +286,7 @@ replace ( // later versions give errors on uint64 being too high. github.com/brianvoe/gofakeit/v6 => github.com/brianvoe/gofakeit/v6 v6.9.0 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - // required by slacker - github.com/slack-go/slack => github.com/slack-go/slack v0.12.2 + github.com/slack-io/slacker => github.com/slack-io/slacker v0.1.1-0.20240701203341-bd3ee211e9d2 github.com/synapsecns/sanguine/core => ./../../core github.com/synapsecns/sanguine/ethergo => ./../../ethergo github.com/synapsecns/sanguine/services/cctp-relayer => ./../../services/cctp-relayer diff --git a/contrib/opbot/go.sum b/contrib/opbot/go.sum index 3559587205..a374969705 100644 --- a/contrib/opbot/go.sum +++ b/contrib/opbot/go.sum @@ -72,10 +72,8 @@ github.com/Flaque/filet v0.0.0-20201012163910-45f684403088/go.mod h1:TK+jB3mBs+8 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 h1:ClzzXMDDuUbWfNNZqGeYq4PnYOlwlOVIvSyNaIy0ykg= github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3/go.mod h1:we0YA5CsBbH5+/NUzC/AlMmxaDtWlXeNsqrwXjTzmzA= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:sg9CWNOhr58hMGmJ0q7x7jQ/B1RK/GyHNmeaYCJos9M= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:uHbOgfPowb74TKlV4AR5Az2haG6evxzM8Lmj1Xil25E= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:mD+/7fgGmTO9w3g8xYfovo7GBSkyjkmQiacVj9VPx+0= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:sAFuaugbNEiH1k50YhFNuD2+Gwga8oetKMT2RSFpglU= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -94,12 +92,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk 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/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/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-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= @@ -347,8 +339,8 @@ github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6 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-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dubonzi/otelresty v1.2.0 h1:tLWW1J0paY4Fugh5cD3qhMFHNWgM5LSXEfPCW03jyi0= -github.com/dubonzi/otelresty v1.2.0/go.mod h1:oMTNjqB31Fh8nFEWqrk+4diB4YwSmEy3zpBzxGHeLXA= +github.com/dubonzi/otelresty v1.3.0 h1:CxQEPCn26DaDJLV/1kmbxud1m5Gv4ZY0n9rXHD6cMmw= +github.com/dubonzi/otelresty v1.3.0/go.mod h1:vUZlU7AozHcWC2KWDAJssyQLboSBrOgUhYQgM5mJ1PE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -403,6 +395,8 @@ github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkN github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw= github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= +github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= github.com/gin-contrib/requestid v0.0.6 h1:mGcxTnHQ45F6QU5HQRgQUDsAfHprD3P7g2uZ4cSZo9o= github.com/gin-contrib/requestid v0.0.6/go.mod h1:9i4vKATX/CdggbkY252dPVasgVucy/ggBeELXuQztm4= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= @@ -452,6 +446,14 @@ github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dT github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= +github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -477,10 +479,10 @@ github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22 github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/gofrs/flock v0.12.0 h1:xHW8t8GPAiGtqz7KxiSqfOEXwpOaqhpYZrTE2MQBgXY= +github.com/gofrs/flock v0.12.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= @@ -573,8 +575,8 @@ github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoF github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 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.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= @@ -659,11 +661,13 @@ github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrO github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 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/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= -github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/jellydator/ttlcache/v3 v3.1.1 h1:RCgYJqo3jgvhl+fEWvjNW8thxGWsgxi+TPhRir1Y9y8= +github.com/jellydator/ttlcache/v3 v3.1.1/go.mod h1:hi7MGFdMAwZna5n2tuvh63DvFLzVKySzCVW6+0gA2n4= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jftuga/ellipsis v1.0.0 h1:ERi1XBFERM2YpadkvM1P9bxQKgOC40Hr6TCKkvLBDtY= @@ -711,8 +715,8 @@ github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -940,8 +944,8 @@ github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4V github.com/prometheus/prometheus v0.53.0 h1:vOnhpUKrDv954jnVBvhG/ZQJ3kqscnKI+Hbdwo2tAhc= github.com/prometheus/prometheus v0.53.0/go.mod h1:RZDkzs+ShMBDkAPQkLEaLBXpjmDcjhNxU2drUVPgKUU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/puzpuzpuz/xsync v1.4.3 h1:nS/Iqc4EnpJ8jm/MzJ+e3MUaP2Ys2mqXeEfoxoU0HaM= -github.com/puzpuzpuz/xsync v1.4.3/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= +github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY= +github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU= github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU= github.com/rbretecher/go-postman-collection v0.9.0 h1:vXw6KBhASpz0L0igH3OsJCx5pjKbWXn9RiYMMnOO4QQ= @@ -985,11 +989,6 @@ github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0/go.mod h1:7Awj 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/shomali11/commander v0.0.0-20230730023802-0b64f620037d h1:IImd1gV+EdlKWWi8RoHSaccjLQtSi4tJiFOjq6mM+ZQ= -github.com/shomali11/commander v0.0.0-20230730023802-0b64f620037d/go.mod h1:bYyJw/Aj9fK+qoFmRbPJeWsDgq7WGO8f/Qof95qPug4= -github.com/shomali11/proper v0.0.0-20180607004733-233a9a872c30/go.mod h1:O723XwIZBX3FR45rBic/Eyp/DKo/YtchYFURzpUWY2c= -github.com/shomali11/proper v0.0.0-20190608032528-6e70a05688e7 h1:wAyBXFZOcLkbaoDlDbMpTCw9xy3yP2YJDMRrbTVuVKU= -github.com/shomali11/proper v0.0.0-20190608032528-6e70a05688e7/go.mod h1:cg2VM85Y+0BcVSICzB+OafOlTcJ9QPbtF4qtuhuR/GA= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -999,10 +998,14 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= -github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= -github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/slack-io/slacker v0.1.0 h1:im8hrddzZEnkpavutIc5/It+zmQIybjhceFGJix0MTY= -github.com/slack-io/slacker v0.1.0/go.mod h1:VPW+xhTrmB4lUoxA5tiB180fmWFt6UFW+96ZWYtj0Qg= +github.com/slack-go/slack v0.13.0 h1:7my/pR2ubZJ9912p9FtvALYpbt0cQPAqkRy2jaSI1PQ= +github.com/slack-go/slack v0.13.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= +github.com/slack-io/commander v0.0.0-20231120025847-9fd78b4b2d54 h1:aRc+G2mUb697z6bR09Roq6kP08suJulgNo00SGhAsfM= +github.com/slack-io/commander v0.0.0-20231120025847-9fd78b4b2d54/go.mod h1:aHmXZnL/ELKlfMybblXnnCl+IeHQ+gMb++DT7ujIGlA= +github.com/slack-io/proper v0.0.0-20231119200853-f78ba4fc878f h1:wiEJBKJKvMOeE9KtLV7iwtHOsNXDBZloL+FPlkZ6vnA= +github.com/slack-io/proper v0.0.0-20231119200853-f78ba4fc878f/go.mod h1:q+erLGESzGsEP/cJeGoDxfdLKDstT4caj/JvAShLEt4= +github.com/slack-io/slacker v0.1.1-0.20240701203341-bd3ee211e9d2 h1:+ZbW5lFQj1CyetlFrrd4KmNCxfSxzTX873PrZSkRoDc= +github.com/slack-io/slacker v0.1.1-0.20240701203341-bd3ee211e9d2/go.mod h1:0dIY7rxW5j4aSRq+rg79dpg3My012uZdGrzFmewSKUA= 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/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1027,7 +1030,6 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/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= @@ -1042,6 +1044,12 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= +github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= +github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= +github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= +github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= +github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= github.com/synapsecns/fasthttp-http2 v1.0.0 h1:G1/8AKgAzVImHpGbCGZo8w4c0kUBXb4eRKkMlWUW4eA= github.com/synapsecns/fasthttp-http2 v1.0.0/go.mod h1:QM9mQS/FygGB3PdvmW8a0/70FirWmEZVvj6Dlo1pisw= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= @@ -1135,36 +1143,36 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1245,8 +1253,8 @@ 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/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/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= @@ -1281,6 +1289,7 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= @@ -1489,10 +1498,10 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20240528184218-531527333157 h1:u7WMYrIrVvs0TF5yaKwKNbcJyySYf+HAIFXxWltJOXE= google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1518,8 +1527,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -1560,6 +1569,7 @@ gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8= gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= gorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE= gorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s= gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= diff --git a/contrib/opbot/sql/base/base.go b/contrib/opbot/sql/base/base.go new file mode 100644 index 0000000000..e73ca70a4e --- /dev/null +++ b/contrib/opbot/sql/base/base.go @@ -0,0 +1,38 @@ +package base + +import ( + "github.com/synapsecns/sanguine/core/metrics" + submitterDB "github.com/synapsecns/sanguine/ethergo/submitter/db" + "github.com/synapsecns/sanguine/ethergo/submitter/db/txdb" + "gorm.io/gorm" +) + +// Store is a store that implements an underlying gorm db. +type Store struct { + db *gorm.DB + metrics metrics.Handler + submitterStore submitterDB.Service +} + +// NewStore creates a new store. +func NewStore(db *gorm.DB, metrics metrics.Handler) *Store { + txDB := txdb.NewTXStore(db, metrics) + return &Store{db: db, metrics: metrics, submitterStore: txDB} +} + +// DB gets the database object for mutation outside of the lib. +func (s Store) DB() *gorm.DB { + return s.db +} + +// SubmitterDB gets the submitter database object for mutation outside of the lib. +func (s Store) SubmitterDB() submitterDB.Service { + return s.submitterStore +} + +// GetAllModels gets all models to migrate. +// see: https://medium.com/@SaifAbid/slice-interfaces-8c78f8b6345d for an explanation of why we can't do this at initialization time +func GetAllModels() (allModels []interface{}) { + allModels = append(allModels, txdb.GetAllModels()...) + return allModels +} diff --git a/contrib/opbot/sql/base/doc.go b/contrib/opbot/sql/base/doc.go new file mode 100644 index 0000000000..9b758883a1 --- /dev/null +++ b/contrib/opbot/sql/base/doc.go @@ -0,0 +1,2 @@ +// Package base contains the base sql implementation +package base diff --git a/contrib/opbot/sql/doc.go b/contrib/opbot/sql/doc.go new file mode 100644 index 0000000000..9c3daf2957 --- /dev/null +++ b/contrib/opbot/sql/doc.go @@ -0,0 +1,2 @@ +// Package sql provides a common interface for starting sql-lite databases +package sql diff --git a/contrib/opbot/sql/mysql/doc.go b/contrib/opbot/sql/mysql/doc.go new file mode 100644 index 0000000000..a6b8106850 --- /dev/null +++ b/contrib/opbot/sql/mysql/doc.go @@ -0,0 +1,2 @@ +// Package mysql contains a mysql db +package mysql diff --git a/contrib/opbot/sql/mysql/store.go b/contrib/opbot/sql/mysql/store.go new file mode 100644 index 0000000000..5ee8625a81 --- /dev/null +++ b/contrib/opbot/sql/mysql/store.go @@ -0,0 +1,66 @@ +package mysql + +import ( + "context" + "fmt" + "github.com/synapsecns/sanguine/contrib/opbot/sql/base" + submitterDB "github.com/synapsecns/sanguine/ethergo/submitter/db" + "time" + + "github.com/ipfs/go-log" + common_base "github.com/synapsecns/sanguine/core/dbcommon" + "github.com/synapsecns/sanguine/core/metrics" + "gorm.io/driver/mysql" + "gorm.io/gorm" + "gorm.io/gorm/schema" +) + +// Logger is the mysql logger. +var logger = log.Logger("synapse-mysql") + +// NewMysqlStore creates a new mysql store for a given data store. +func NewMysqlStore(ctx context.Context, dbURL string, handler metrics.Handler) (*Store, error) { + logger.Debug("create mysql store") + + gdb, err := gorm.Open(mysql.Open(dbURL), &gorm.Config{ + Logger: common_base.GetGormLogger(logger), + FullSaveAssociations: true, + NamingStrategy: NamingStrategy, + NowFunc: time.Now, + }) + + if err != nil { + return nil, fmt.Errorf("could not create mysql connection: %w", err) + } + + sqlDB, err := gdb.DB() + if err != nil { + return nil, fmt.Errorf("could not get sql db: %w", err) + } + + // fixes a timeout issue https://stackoverflow.com/a/42146536 + sqlDB.SetMaxIdleConns(MaxIdleConns) + sqlDB.SetConnMaxLifetime(time.Hour) + + handler.AddGormCallbacks(gdb) + + err = gdb.WithContext(ctx).AutoMigrate(base.GetAllModels()...) + if err != nil { + return nil, fmt.Errorf("could not migrate on mysql: %w", err) + } + + return &Store{base.NewStore(gdb, handler)}, nil +} + +// Store is the mysql store. It extends the bsae store for mysql queries. +type Store struct { + *base.Store +} + +// MaxIdleConns is exported here for testing. Tests execute too slowly with a reconnect each time. +var MaxIdleConns = 10 + +// NamingStrategy is for table prefixes. +var NamingStrategy = schema.NamingStrategy{} + +var _ submitterDB.SubmitterDBFactory = &Store{} diff --git a/contrib/opbot/sql/sqlite/doc.go b/contrib/opbot/sql/sqlite/doc.go new file mode 100644 index 0000000000..d30fb340b9 --- /dev/null +++ b/contrib/opbot/sql/sqlite/doc.go @@ -0,0 +1,2 @@ +// Package sqlite implements the sqlite package +package sqlite diff --git a/contrib/opbot/sql/sqlite/sqlite.go b/contrib/opbot/sql/sqlite/sqlite.go new file mode 100644 index 0000000000..ea8b070475 --- /dev/null +++ b/contrib/opbot/sql/sqlite/sqlite.go @@ -0,0 +1,63 @@ +package sqlite + +import ( + "context" + "fmt" + "github.com/synapsecns/sanguine/contrib/opbot/sql/base" + submitterDB "github.com/synapsecns/sanguine/ethergo/submitter/db" + "os" + + "github.com/ipfs/go-log" + common_base "github.com/synapsecns/sanguine/core/dbcommon" + "github.com/synapsecns/sanguine/core/metrics" + "gorm.io/driver/sqlite" + "gorm.io/gorm" +) + +// Store is the sqlite store. It extends the base store for sqlite specific queries. +type Store struct { + *base.Store +} + +var logger = log.Logger("scribe-sqlite") + +// NewSqliteStore creates a new sqlite data store. +func NewSqliteStore(parentCtx context.Context, dbPath string, handler metrics.Handler, skipMigrations bool) (_ *Store, err error) { + logger.Debugf("creating sqlite store at %s", dbPath) + + ctx, span := handler.Tracer().Start(parentCtx, "start-sqlite") + defer func() { + metrics.EndSpanWithErr(span, err) + }() + + // create the directory to the store if it doesn't exist + //nolint: gosec. + err = os.MkdirAll(dbPath, os.ModePerm) + if err != nil { + return nil, fmt.Errorf("could not create sqlite store") + } + + logger.Warnf("database is at %s/synapse.db", dbPath) + + gdb, err := gorm.Open(sqlite.Open(fmt.Sprintf("%s/%s", dbPath, "synapse.db")), &gorm.Config{ + DisableForeignKeyConstraintWhenMigrating: true, + Logger: common_base.GetGormLogger(logger), + FullSaveAssociations: true, + SkipDefaultTransaction: true, + }) + if err != nil { + return nil, fmt.Errorf("could not connect to db %s: %w", dbPath, err) + } + + handler.AddGormCallbacks(gdb) + + if !skipMigrations { + err = gdb.WithContext(ctx).AutoMigrate(base.GetAllModels()...) + if err != nil { + return nil, fmt.Errorf("could not migrate models: %w", err) + } + } + return &Store{base.NewStore(gdb, handler)}, nil +} + +var _ submitterDB.SubmitterDBFactory = &Store{} diff --git a/contrib/opbot/sql/store.go b/contrib/opbot/sql/store.go new file mode 100644 index 0000000000..a2d524b332 --- /dev/null +++ b/contrib/opbot/sql/store.go @@ -0,0 +1,36 @@ +package sql + +import ( + "context" + "errors" + "fmt" + "github.com/synapsecns/sanguine/contrib/opbot/sql/mysql" + "github.com/synapsecns/sanguine/contrib/opbot/sql/sqlite" + "github.com/synapsecns/sanguine/core/dbcommon" + "github.com/synapsecns/sanguine/core/metrics" + submitterDB "github.com/synapsecns/sanguine/ethergo/submitter/db" +) + +// Connect connects to the database. +func Connect(ctx context.Context, dbType dbcommon.DBType, path string, metrics metrics.Handler) (submitterDB.SubmitterDBFactory, error) { + switch dbType { + case dbcommon.Mysql: + store, err := mysql.NewMysqlStore(ctx, path, metrics) + if err != nil { + return nil, fmt.Errorf("could not create mysql store: %w", err) + } + + return store, nil + case dbcommon.Sqlite: + store, err := sqlite.NewSqliteStore(ctx, path, metrics, false) + if err != nil { + return nil, fmt.Errorf("could not create sqlite store: %w", err) + } + + return store, nil + case dbcommon.Clickhouse: + return nil, errors.New("driver not supported") + default: + return nil, fmt.Errorf("unsupported driver: %s", dbType) + } +} diff --git a/contrib/promexporter/exporters/exporter.go b/contrib/promexporter/exporters/exporter.go index c645dffea5..5255d3da27 100644 --- a/contrib/promexporter/exporters/exporter.go +++ b/contrib/promexporter/exporters/exporter.go @@ -15,7 +15,7 @@ import ( "github.com/synapsecns/sanguine/core" "github.com/synapsecns/sanguine/core/ginhelper" "github.com/synapsecns/sanguine/core/metrics" - "github.com/synapsecns/sanguine/core/metrics/instrumentation" + "github.com/synapsecns/sanguine/core/metrics/instrumentation/httpcapture" "github.com/synapsecns/sanguine/core/retry" omnirpcClient "github.com/synapsecns/sanguine/services/omnirpc/client" "go.opentelemetry.io/otel/attribute" @@ -41,7 +41,7 @@ func makeHTTPClient(handler metrics.Handler) *http.Client { httpClient := new(http.Client) handler.ConfigureHTTPClient(httpClient) - httpClient.Transport = instrumentation.NewCaptureTransport(httpClient.Transport, handler) + httpClient.Transport = httpcapture.NewCaptureTransport(httpClient.Transport, handler) return httpClient } @@ -60,7 +60,7 @@ func StartExporterServer(ctx context.Context, handler metrics.Handler, cfg confi _ = os.Setenv(metrics.MetricsPortEnabledEnv, "false") router := ginhelper.New(logger) - router.Use(handler.Gin()) + router.Use(handler.Gin()...) router.GET(metrics.MetricsPathDefault, gin.WrapH(handler.Handler())) var lc net.ListenConfig diff --git a/contrib/promexporter/go.mod b/contrib/promexporter/go.mod index e8808188a0..eb58e6a17d 100644 --- a/contrib/promexporter/go.mod +++ b/contrib/promexporter/go.mod @@ -35,9 +35,9 @@ require ( github.com/synapsecns/sanguine/services/explorer v0.0.0-00010101000000-000000000000 github.com/synapsecns/sanguine/services/omnirpc v0.0.0-00010101000000-000000000000 github.com/urfave/cli/v2 v2.27.2 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/metric v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 golang.org/x/sync v0.7.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -46,11 +46,10 @@ require ( bitbucket.org/tentontrain/math v0.0.0-20220519191623-a4e86beba92a // indirect dario.cat/mergo v1.0.0 // indirect github.com/ClickHouse/ch-go v0.61.5 // indirect - github.com/ClickHouse/clickhouse-go/v2 v2.23.2 // indirect + github.com/ClickHouse/clickhouse-go/v2 v2.26.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/DenrianWeiss/tracely v0.0.0-20220624070317-49cf8afaaf18 // indirect github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect - github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect @@ -117,14 +116,13 @@ require ( github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/goccy/go-json v0.10.3 // indirect + github.com/gofrs/flock v0.12.0 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go v1.1.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect @@ -146,7 +144,7 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -211,31 +209,31 @@ require ( go.opentelemetry.io/contrib v1.16.1 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/mod v0.18.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.22.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/driver/clickhouse v0.6.1 // indirect diff --git a/contrib/promexporter/go.sum b/contrib/promexporter/go.sum index 88ea2b28c7..033406ddd5 100644 --- a/contrib/promexporter/go.sum +++ b/contrib/promexporter/go.sum @@ -81,8 +81,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4= github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg= -github.com/ClickHouse/clickhouse-go/v2 v2.23.2 h1:+DAKPMnxLS7pduQZsrJc8OhdLS2L9MfDEJ2TS+hpYDM= -github.com/ClickHouse/clickhouse-go/v2 v2.23.2/go.mod h1:aNap51J1OM3yxQJRgM+AlP/MPkGBCL8A74uQThoQhR0= +github.com/ClickHouse/clickhouse-go/v2 v2.26.0 h1:j4/y6NYaCcFkJwN/TU700ebW+nmsIy34RmUAAcZKy9w= +github.com/ClickHouse/clickhouse-go/v2 v2.26.0/go.mod h1:iDTViXk2Fgvf1jn2dbJd1ys+fBkdD1UMRnXlwmhijhQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= 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= @@ -95,10 +95,6 @@ github.com/Flaque/filet v0.0.0-20201012163910-45f684403088/go.mod h1:TK+jB3mBs+8 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 h1:ClzzXMDDuUbWfNNZqGeYq4PnYOlwlOVIvSyNaIy0ykg= github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3/go.mod h1:we0YA5CsBbH5+/NUzC/AlMmxaDtWlXeNsqrwXjTzmzA= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:sg9CWNOhr58hMGmJ0q7x7jQ/B1RK/GyHNmeaYCJos9M= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:uHbOgfPowb74TKlV4AR5Az2haG6evxzM8Lmj1Xil25E= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:mD+/7fgGmTO9w3g8xYfovo7GBSkyjkmQiacVj9VPx+0= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:sAFuaugbNEiH1k50YhFNuD2+Gwga8oetKMT2RSFpglU= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -457,10 +453,10 @@ github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22 github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/gofrs/flock v0.12.0 h1:xHW8t8GPAiGtqz7KxiSqfOEXwpOaqhpYZrTE2MQBgXY= +github.com/gofrs/flock v0.12.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= @@ -566,8 +562,8 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 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.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= @@ -654,8 +650,8 @@ github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrO github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 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/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= -github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= @@ -701,8 +697,8 @@ github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -917,8 +913,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/puzpuzpuz/xsync v1.4.3 h1:nS/Iqc4EnpJ8jm/MzJ+e3MUaP2Ys2mqXeEfoxoU0HaM= -github.com/puzpuzpuz/xsync v1.4.3/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= +github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY= +github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg= github.com/puzpuzpuz/xsync/v2 v2.5.1 h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU= github.com/puzpuzpuz/xsync/v2 v2.5.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU= github.com/ravilushqa/otelgqlgen v0.13.1 h1:V+zFE75iDd2/CSzy5kKnb+Fi09SsE5535wv9U2nUEFE= @@ -1121,36 +1117,36 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1240,8 +1236,8 @@ 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/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/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= @@ -1572,10 +1568,10 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20240528184218-531527333157 h1:u7WMYrIrVvs0TF5yaKwKNbcJyySYf+HAIFXxWltJOXE= google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1610,8 +1606,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= diff --git a/contrib/promexporter/internal/gql/explorer/contrib/main.go b/contrib/promexporter/internal/gql/explorer/contrib/main.go index dc7174f63c..8a79ce52d5 100644 --- a/contrib/promexporter/internal/gql/explorer/contrib/main.go +++ b/contrib/promexporter/internal/gql/explorer/contrib/main.go @@ -55,7 +55,7 @@ func main() { } }() - err = util2.WaitForStart(ctx, tmpPort) + err = ginhelper.WaitForStart(ctx, tmpPort) if err != nil { panic(err) } diff --git a/contrib/screener-api/config/config.go b/contrib/screener-api/config/config.go index f7d38e3d8c..b4f6beaab5 100644 --- a/contrib/screener-api/config/config.go +++ b/contrib/screener-api/config/config.go @@ -21,6 +21,8 @@ type Config struct { RiskLevels []string `yaml:"risk-levels"` // Whitelist is a list of addresses to whitelist Whitelist []string `yaml:"whitelist"` + // Blacklist is a list of addresses to blacklist + Blacklist []string `yaml:"blacklist"` } // DatabaseConfig represents the configuration for the database. diff --git a/contrib/screener-api/go.mod b/contrib/screener-api/go.mod index 66256e68a6..513dc6a4b6 100644 --- a/contrib/screener-api/go.mod +++ b/contrib/screener-api/go.mod @@ -13,7 +13,7 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/TwiN/gocache/v2 v2.2.2 github.com/brianvoe/gofakeit/v6 v6.27.0 - github.com/dubonzi/otelresty v1.2.0 + github.com/dubonzi/otelresty v1.3.0 github.com/gin-gonic/gin v1.10.0 github.com/go-resty/resty/v2 v2.13.1 github.com/google/uuid v1.6.0 @@ -26,8 +26,8 @@ require ( github.com/synapsecns/sanguine/core v0.0.0-00010101000000-000000000000 github.com/urfave/cli/v2 v2.27.2 github.com/valyala/fastjson v1.6.4 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 golang.org/x/sync v0.7.0 gopkg.in/yaml.v2 v2.4.0 gorm.io/driver/mysql v1.5.6 @@ -40,7 +40,6 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect github.com/KyleBanks/depth v1.2.1 // indirect - github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect @@ -87,12 +86,12 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect + github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go v1.1.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect @@ -107,7 +106,7 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -161,31 +160,31 @@ require ( github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/mod v0.18.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/tools v0.22.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apimachinery v0.29.3 // indirect diff --git a/contrib/screener-api/go.sum b/contrib/screener-api/go.sum index 4b6741c579..a60c41c532 100644 --- a/contrib/screener-api/go.sum +++ b/contrib/screener-api/go.sum @@ -48,10 +48,6 @@ github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 h1:ClzzXMDDuUbWfNN github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3/go.mod h1:we0YA5CsBbH5+/NUzC/AlMmxaDtWlXeNsqrwXjTzmzA= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:sg9CWNOhr58hMGmJ0q7x7jQ/B1RK/GyHNmeaYCJos9M= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:uHbOgfPowb74TKlV4AR5Az2haG6evxzM8Lmj1Xil25E= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:mD+/7fgGmTO9w3g8xYfovo7GBSkyjkmQiacVj9VPx+0= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:sAFuaugbNEiH1k50YhFNuD2+Gwga8oetKMT2RSFpglU= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -140,8 +136,8 @@ github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6 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/dubonzi/otelresty v1.2.0 h1:tLWW1J0paY4Fugh5cD3qhMFHNWgM5LSXEfPCW03jyi0= -github.com/dubonzi/otelresty v1.2.0/go.mod h1:oMTNjqB31Fh8nFEWqrk+4diB4YwSmEy3zpBzxGHeLXA= +github.com/dubonzi/otelresty v1.3.0 h1:CxQEPCn26DaDJLV/1kmbxud1m5Gv4ZY0n9rXHD6cMmw= +github.com/dubonzi/otelresty v1.3.0/go.mod h1:vUZlU7AozHcWC2KWDAJssyQLboSBrOgUhYQgM5mJ1PE= github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= @@ -226,8 +222,8 @@ github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96 github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -296,8 +292,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ 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/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= @@ -338,8 +334,8 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF 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/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -551,36 +547,36 @@ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0. go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0/go.mod h1:vsyxiwPzPlijgouF1SRZRGqbuHod8fV6+MRCH7ltxDE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -652,8 +648,8 @@ 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/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -945,10 +941,10 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D 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/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= 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= @@ -980,8 +976,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= diff --git a/contrib/screener-api/screener/screener.go b/contrib/screener-api/screener/screener.go index eea846b8ef..55be30fa65 100644 --- a/contrib/screener-api/screener/screener.go +++ b/contrib/screener-api/screener/screener.go @@ -37,6 +37,11 @@ import ( ginSwagger "github.com/swaggo/gin-swagger" ) +const ( + okResponse = "OK" + errResponse = "ERROR" +) + // Screener is the interface for the screener. type Screener interface { Start(ctx context.Context) error @@ -49,7 +54,7 @@ type screenerImpl struct { cfg config.Config client chainalysis.Client whitelist map[string]bool - blacklistCache map[string]bool + blacklist map[string]bool blacklistCacheMux sync.RWMutex requestMux mapmutex.StringMapMutex } @@ -69,12 +74,16 @@ func NewScreener(ctx context.Context, cfg config.Config, metricHandler metrics.H screener.client = chainalysis.NewClient(metricHandler, cfg.RiskLevels, cfg.ChainalysisKey, core.GetEnv("CHAINALYSIS_URL", cfg.ChainalysisURL)) - screener.blacklistCache = make(map[string]bool) + screener.blacklist = make(map[string]bool) screener.whitelist = make(map[string]bool) for _, item := range cfg.Whitelist { screener.whitelist[strings.ToLower(item)] = true } + for _, item := range cfg.Blacklist { + screener.blacklist[strings.ToLower(item)] = true + } + dbType, err := dbcommon.DBTypeFromString(cfg.Database.Type) if err != nil { return nil, fmt.Errorf("could not get db type: %w", err) @@ -85,7 +94,7 @@ func NewScreener(ctx context.Context, cfg config.Config, metricHandler metrics.H } screener.router = ginhelper.New(logger) - screener.router.Use(screener.metrics.Gin()) + screener.router.Use(screener.metrics.Gin()...) // Blacklist route screener.router.POST("/api/data/sync", ginhelper.TraceMiddleware(metricHandler.Tracer(), true), screener.authMiddleware(cfg), screener.blacklistAddress) @@ -161,7 +170,7 @@ func (s *screenerImpl) fetchBlacklist(ctx context.Context) { s.blacklistCacheMux.Lock() defer s.blacklistCacheMux.Unlock() for _, item := range blacklist { - s.blacklistCache[strings.ToLower(item)] = true + s.blacklist[strings.ToLower(item)] = true } } @@ -245,7 +254,7 @@ func (s *screenerImpl) isDBBlacklisted(ctx context.Context, address string) (boo func (s *screenerImpl) isBlacklistedCache(address string) bool { s.blacklistCacheMux.RLock() defer s.blacklistCacheMux.RUnlock() - return s.blacklistCache[address] + return s.blacklist[address] } // @dev Protected Method @@ -269,7 +278,7 @@ func (s *screenerImpl) blacklistAddress(c *gin.Context) { // Grab the body of the JSON request and unmarshal it into the blacklistBody struct. if err := c.ShouldBindBodyWith(&blacklistBody, binding.JSON); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) + c.JSON(http.StatusBadRequest, gin.H{"error": errResponse}) return } @@ -293,44 +302,44 @@ func (s *screenerImpl) blacklistAddress(c *gin.Context) { s.blacklistCacheMux.Lock() defer s.blacklistCacheMux.Unlock() - s.blacklistCache[blacklistBody.Data.Address] = true + s.blacklist[blacklistBody.Data.Address] = true switch blacklistBody.Type { case "create": if err := s.db.PutBlacklistedAddress(ctx, blacklistedAddress); err != nil { span.AddEvent("error", trace.WithAttributes(attribute.String("error", err.Error()))) - c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"error": errResponse}) return } span.AddEvent("blacklistedAddress", trace.WithAttributes(attribute.String("address", blacklistBody.Data.Address))) - c.JSON(http.StatusOK, gin.H{"status": "success"}) + c.JSON(http.StatusOK, gin.H{"status": okResponse}) return case "update": if err := s.db.UpdateBlacklistedAddress(ctx, blacklistedAddress.ID, blacklistedAddress); err != nil { span.AddEvent("error", trace.WithAttributes(attribute.String("error", err.Error()))) - c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"error": errResponse}) return } span.AddEvent("blacklistedAddress", trace.WithAttributes(attribute.String("address", blacklistBody.Data.Address))) - c.JSON(http.StatusOK, gin.H{"status": "success"}) + c.JSON(http.StatusOK, gin.H{"status": okResponse}) return case "delete": if err := s.db.DeleteBlacklistedAddress(ctx, blacklistedAddress.ID); err != nil { span.AddEvent("error", trace.WithAttributes(attribute.String("error", err.Error()))) - c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"error": errResponse}) return } span.AddEvent("blacklistedAddress", trace.WithAttributes(attribute.String("address", blacklistBody.Data.Address))) - c.JSON(http.StatusOK, gin.H{"status": "success"}) + c.JSON(http.StatusOK, gin.H{"status": okResponse}) return default: - c.JSON(http.StatusBadRequest, gin.H{"error": "invalid type"}) + c.JSON(http.StatusBadRequest, gin.H{"error": errResponse}) return } } @@ -351,7 +360,7 @@ func (s *screenerImpl) authMiddleware(cfg config.Config) gin.HandlerFunc { bodyBz, err := io.ReadAll(c.Request.Body) if err != nil { - c.JSON(http.StatusBadRequest, gin.H{"error": "could not read request body"}) + c.JSON(http.StatusBadRequest, gin.H{"error": errResponse}) c.Abort() return } @@ -360,7 +369,7 @@ func (s *screenerImpl) authMiddleware(cfg config.Config) gin.HandlerFunc { bodyStr, err := core.BytesToJSONString(bodyBz) if err != nil { - c.JSON(http.StatusBadRequest, gin.H{"error": "could not convert bytes to json"}) + c.JSON(http.StatusBadRequest, gin.H{"error": errResponse}) c.Abort() return } @@ -396,7 +405,7 @@ func (s *screenerImpl) authMiddleware(cfg config.Config) gin.HandlerFunc { "error", trace.WithAttributes(attribute.String("error", "Invalid signature"+expectedSignature)), ) - c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid signature"}) + c.JSON(http.StatusUnauthorized, gin.H{"error": errResponse}) c.Abort() return } diff --git a/contrib/screener-api/screener/suite_test.go b/contrib/screener-api/screener/suite_test.go index 83fe94cf04..9871df9c01 100644 --- a/contrib/screener-api/screener/suite_test.go +++ b/contrib/screener-api/screener/suite_test.go @@ -53,6 +53,8 @@ func (s *ScreenerSuite) SetupSuite() { if useMetrics { localmetrics.SetupTestJaeger(s.GetSuiteContext(), s.T()) metricsHandler = metrics.Jaeger + } else { + metricsHandler = metrics.OTLP } var err error @@ -174,19 +176,8 @@ func (s *ScreenerSuite) TestScreener() { // unauthorized, return on err so statuses will be only one cfg.AppSecret = "BAD" - statuses, err = blacklistTestWithOperation(s.T(), "create", apiClient, cfg) - all(s.T(), statuses, func(status string) bool { - return status == "401 Unauthorized" - }) - Equal(s.T(), len(statuses), 1) - NotNil(s.T(), err) - - c := chainalysis.NewClient(s.metrics, []string{"Severe", "High"}, "key", "url") - NotNil(s.T(), c) - - ot, err := c.ScreenAddress(s.GetTestContext(), "0x123") + _, err = blacklistTestWithOperation(s.T(), "create", apiClient, cfg) NotNil(s.T(), err) - False(s.T(), ot) } func blacklistTestWithOperation(t *testing.T, operation string, apiClient client.ScreenerClient, cfg config.Config) (statuses []string, err error) { @@ -269,8 +260,6 @@ func (m mockClient) RegisterAddress(ctx context.Context, address string) error { return nil } -var _ chainalysis.Client = mockClient{} - type Exposure struct { Category string `json:"category"` Value float64 `json:"value"` @@ -303,4 +292,6 @@ func all(t *testing.T, statuses []string, f func(string) bool) { } } -const success = "success" +const success = "OK" + +var _ chainalysis.Client = mockClient{} diff --git a/core/commandline/shell.go b/core/commandline/shell.go index ad4f54291b..ef5f10b2da 100644 --- a/core/commandline/shell.go +++ b/core/commandline/shell.go @@ -3,15 +3,16 @@ package commandline import ( "context" "fmt" - "github.com/c-bata/go-prompt" - "github.com/c-bata/go-prompt/completer" - "github.com/pkg/errors" - "github.com/urfave/cli/v2" "os" "os/signal" "os/user" "strings" "syscall" + + "github.com/c-bata/go-prompt" + "github.com/c-bata/go-prompt/completer" + "github.com/pkg/errors" + "github.com/urfave/cli/v2" ) const shellCommandName = "shell" @@ -50,14 +51,16 @@ func GenerateShellCommand(shellCommands []*cli.Command) *cli.Command { } } - // warn user about sigterms sigs := make(chan os.Signal) + ctx, cancel := context.WithCancel(c.Context) go func() { - for range sigs { - fmt.Printf("\n(type \"%s\", \"%s\" or \"%s\" to exit)\n\n >", quitCommand, exitCommand, quitCommandShort) + for sig := range sigs { + if sig == syscall.SIGINT || sig == syscall.SIGTERM { + cancel() + fmt.Printf("\n(type \"%s\", \"%s\" or \"%s\" to exit)\n\n >", quitCommand, exitCommand, quitCommandShort) + } } }() - //nolint: govet signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) defer func() { signal.Stop(sigs) @@ -69,7 +72,7 @@ func GenerateShellCommand(shellCommands []*cli.Command) *cli.Command { return nil } - interactive := newInteractiveClient(c.Context, capturedCommands, console) + interactive := newInteractiveClient(ctx, capturedCommands, console) for { p := prompt.New( interactive.executor, diff --git a/core/ginhelper/export_test.go b/core/ginhelper/export_test.go new file mode 100644 index 0000000000..c2bf34c6fd --- /dev/null +++ b/core/ginhelper/export_test.go @@ -0,0 +1,17 @@ +package ginhelper + +import "time" + +// DefaultServerTimeout is the default timeout for the server to start +// this copies the original timeout for testing. +var DefaultServerTimeout = serverStartTimeout + +// ResetServerTimeout resets the server timeout to the default value. +func ResetServerTimeout() { + serverStartTimeout = DefaultServerTimeout +} + +// SetServerTimeout sets the server timeout to the given value. +func SetServerTimeout(timeout time.Duration) { + serverStartTimeout = timeout +} diff --git a/core/ginhelper/server.go b/core/ginhelper/server.go index f9c3b5c725..771f0409c1 100644 --- a/core/ginhelper/server.go +++ b/core/ginhelper/server.go @@ -92,7 +92,7 @@ func newBase() *gin.Engine { server.Use(cors.New(cors.Config{ AllowAllOrigins: true, AllowHeaders: []string{"*"}, - AllowMethods: []string{"GET", "PUT", "POST", "PATCH", "DELETE", "OPTIONS"}, + AllowMethods: []string{http.MethodGet, http.MethodPut, http.MethodPost, http.MethodPatch, http.MethodDelete, http.MethodOptions}, MaxAge: 12 * time.Hour, })) diff --git a/contrib/promexporter/internal/gql/util/server.go b/core/ginhelper/testing.go similarity index 74% rename from contrib/promexporter/internal/gql/util/server.go rename to core/ginhelper/testing.go index 0b081ff9da..4573070d2b 100644 --- a/contrib/promexporter/internal/gql/util/server.go +++ b/core/ginhelper/testing.go @@ -1,9 +1,8 @@ -package util +package ginhelper import ( "context" "fmt" - "github.com/synapsecns/sanguine/core/ginhelper" "github.com/synapsecns/sanguine/core/retry" "net/http" "time" @@ -11,10 +10,13 @@ import ( // WaitForStart waits for the connection to be ready on a ginhelper like server // times out after serverStartTimeout. -func WaitForStart(ctx context.Context, port int) error { +func WaitForStart(parentCtx context.Context, port int) error { + ctx, cancel := context.WithTimeout(parentCtx, serverStartTimeout) + defer cancel() + err := retry.WithBackoff(ctx, func(ctx context.Context) error { client := http.DefaultClient - req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d%s", port, ginhelper.HealthCheck), nil) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d%s", port, HealthCheck), nil) if err != nil { return fmt.Errorf("could not create request: %w", err) } @@ -36,4 +38,4 @@ func WaitForStart(ctx context.Context, port int) error { return nil } -const serverStartTimeout = time.Second * 5 +var serverStartTimeout = time.Second * 5 diff --git a/contrib/promexporter/internal/gql/util/server_test.go b/core/ginhelper/wait_test.go similarity index 68% rename from contrib/promexporter/internal/gql/util/server_test.go rename to core/ginhelper/wait_test.go index 8999fbf2e0..3966fb9c68 100644 --- a/contrib/promexporter/internal/gql/util/server_test.go +++ b/core/ginhelper/wait_test.go @@ -1,27 +1,27 @@ -package util_test +package ginhelper_test import ( "fmt" "github.com/ipfs/go-log" "github.com/phayes/freeport" "github.com/stretchr/testify/suite" - "github.com/synapsecns/sanguine/contrib/promexporter/internal/gql/util" "github.com/synapsecns/sanguine/core/ginhelper" baseServer "github.com/synapsecns/sanguine/core/server" "github.com/synapsecns/sanguine/core/testsuite" "testing" + "time" ) -// UtilSuite defines the basic test suite. -type UtilSuite struct { +// WaitSuite defines the basic test suite. +type WaitSuite struct { *testsuite.TestSuite } // NewTestSuite creates a new test suite and performs some basic checks afterward. // Every test suite in the synapse library should inherit from this suite and override where necessary. -func NewUtilSuite(tb testing.TB) *UtilSuite { +func NewUtilSuite(tb testing.TB) *WaitSuite { tb.Helper() - return &UtilSuite{ + return &WaitSuite{ testsuite.NewTestSuite(tb), } } @@ -30,16 +30,22 @@ func TestUtilSuite(t *testing.T) { suite.Run(t, NewUtilSuite(t)) } -func (t *UtilSuite) TestWaitForStartFail() { +func (t *WaitSuite) TearDownTest() { + ginhelper.ResetServerTimeout() +} + +func (t *WaitSuite) TestWaitForStartFail() { port, err := freeport.GetFreePort() t.Require().NoError(err) + ginhelper.SetServerTimeout(time.Millisecond) + // make sure this errors on non existent server - t.Require().NotNil(util.WaitForStart(t.GetTestContext(), port)) + t.Require().NotNil(ginhelper.WaitForStart(t.GetTestContext(), port)) } // make sure a working server passes. -func (t *UtilSuite) TestWaitForStartSucceed() { +func (t *WaitSuite) TestWaitForStartSucceed() { testLogger := log.Logger("test") tmpPort, err := freeport.GetFreePort() @@ -53,6 +59,6 @@ func (t *UtilSuite) TestWaitForStartSucceed() { _ = connection.ListenAndServe(t.GetTestContext(), fmt.Sprintf(":%d", tmpPort), router) }() - err = util.WaitForStart(t.GetTestContext(), tmpPort) + err = ginhelper.WaitForStart(t.GetTestContext(), tmpPort) t.Require().NoError(err) } diff --git a/core/go.mod b/core/go.mod index a4ba9767f3..6c32da15ba 100644 --- a/core/go.mod +++ b/core/go.mod @@ -9,7 +9,6 @@ replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alp require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 - github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 github.com/Soft/iter v0.1.0 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/c-bata/go-prompt v0.2.6 @@ -45,17 +44,18 @@ require ( github.com/valyala/fastjson v1.6.4 go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 - go.opentelemetry.io/otel v1.27.0 + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 + go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 go.opentelemetry.io/otel/exporters/prometheus v0.49.0 - go.opentelemetry.io/otel/metric v1.27.0 - go.opentelemetry.io/otel/sdk v1.27.0 - go.opentelemetry.io/otel/sdk/metric v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/sdk/metric v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 gorm.io/driver/sqlite v1.5.6 @@ -66,7 +66,6 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect @@ -103,11 +102,11 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect + github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect @@ -117,7 +116,7 @@ require ( github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/lib/pq v1.10.6 // indirect @@ -163,20 +162,20 @@ require ( github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/mod v0.18.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/tools v0.22.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/core/go.sum b/core/go.sum index 466cb3283e..038ea0a0fb 100644 --- a/core/go.sum +++ b/core/go.sum @@ -46,10 +46,6 @@ github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 h1:PnnQln5IGbhLeJOi6h github.com/Flaque/filet v0.0.0-20201012163910-45f684403088/go.mod h1:TK+jB3mBs+8ZMWhU5BqZKnZWJ1MrLo8etNVg51ueTBo= github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 h1:ClzzXMDDuUbWfNNZqGeYq4PnYOlwlOVIvSyNaIy0ykg= github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3/go.mod h1:we0YA5CsBbH5+/NUzC/AlMmxaDtWlXeNsqrwXjTzmzA= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:sg9CWNOhr58hMGmJ0q7x7jQ/B1RK/GyHNmeaYCJos9M= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:uHbOgfPowb74TKlV4AR5Az2haG6evxzM8Lmj1Xil25E= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:mD+/7fgGmTO9w3g8xYfovo7GBSkyjkmQiacVj9VPx+0= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:sAFuaugbNEiH1k50YhFNuD2+Gwga8oetKMT2RSFpglU= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -216,8 +212,8 @@ github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaC github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -286,8 +282,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ 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/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= @@ -326,8 +322,8 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF 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/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -531,36 +527,38 @@ go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0. go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0/go.mod h1:vsyxiwPzPlijgouF1SRZRGqbuHod8fV6+MRCH7ltxDE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0 h1:BJee2iLkfRfl9lc7aFmBwkWxY/RI1RDdXepSF6y8TPE= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0/go.mod h1:DIzlHs3DRscCIBU3Y9YSzPfScwnYnzfnCd4g8zA7bZc= go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -630,8 +628,8 @@ 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/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -909,10 +907,10 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D 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/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= 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= @@ -944,8 +942,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= diff --git a/core/mapmutex/mapmutex.go b/core/mapmutex/mapmutex.go index 65e824371a..fb19ea3270 100644 --- a/core/mapmutex/mapmutex.go +++ b/core/mapmutex/mapmutex.go @@ -2,7 +2,6 @@ package mapmutex import ( "fmt" - "github.com/LK4d4/trylock" "sync" ) @@ -13,6 +12,7 @@ import ( type untypedMapMutex interface { Lock(key interface{}) Unlocker TryLock(key interface{}) (Unlocker, bool) + Keys() []interface{} } type untypedMapMutexImpl struct { @@ -24,7 +24,7 @@ type mentry struct { // m point back to untypedMapMutexImpl, so we can synchronize removing this mentry when cnt==0 m *untypedMapMutexImpl // el is an entry-specific lock - el trylock.Mutex + el sync.Mutex // cnt is the reference count cnt int // key is the key of the memory entry @@ -82,6 +82,18 @@ func (m *untypedMapMutexImpl) TryLock(key interface{}) (Unlocker, bool) { return nil, false } +// Keys returns all keys in the map. +func (m *untypedMapMutexImpl) Keys() []interface{} { + m.ml.Lock() + defer m.ml.Unlock() + + keys := make([]interface{}, 0, len(m.ma)) + for k := range m.ma { + keys = append(keys, k) + } + return keys +} + // Unlock releases the lock for this entry. func (me *mentry) Unlock() { m := me.m diff --git a/core/mapmutex/mapmutex_test.go b/core/mapmutex/mapmutex_test.go index 2555e4b58a..4dc7df2a52 100644 --- a/core/mapmutex/mapmutex_test.go +++ b/core/mapmutex/mapmutex_test.go @@ -52,6 +52,28 @@ func (s MapMutexSuite) TestExampleMapMutex() { NotPanics(s.T(), ExampleStringMapMutex) } +func (s MapMutexSuite) TestKeys() { + s.T().Run("StringMapMutexKeys", func(t *testing.T) { + mapMutex := mapmutex.NewStringMapMutex() + mapMutex.Lock("lock1") + Equal(t, "lock1", mapMutex.Keys()[0]) + Equal(t, 1, len(mapMutex.Keys())) + }) + s.T().Run("StringerMapMutexKeys", func(t *testing.T) { + mapMutex := mapmutex.NewStringerMapMutex() + vitalik := common.HexToAddress("0xab5801a7d398351b8be11c439e05c5b3259aec9b") + mapMutex.Lock(vitalik) + Equal(t, vitalik.String(), mapMutex.Keys()[0]) + Equal(t, 1, len(mapMutex.Keys())) + }) + s.T().Run("IntMapMutexKeys", func(t *testing.T) { + mapMutex := mapmutex.NewIntMapMutex() + mapMutex.Lock(1) + Equal(t, 1, mapMutex.Keys()[0]) + Equal(t, 1, len(mapMutex.Keys())) + }) +} + func (s MapMutexSuite) TestMapMutex() { //nolint:gosec r := rand.New(rand.NewSource(42)) diff --git a/core/mapmutex/stringer.go b/core/mapmutex/stringer.go index 02afaffc4d..e415ade7ef 100644 --- a/core/mapmutex/stringer.go +++ b/core/mapmutex/stringer.go @@ -1,11 +1,14 @@ package mapmutex -import "fmt" +import ( + "fmt" +) // StringerMapMutex is an implementation of mapMutex for the fmt.Stringer conforming types. type StringerMapMutex interface { Lock(key fmt.Stringer) Unlocker TryLock(key fmt.Stringer) (Unlocker, bool) + Keys() []string } // stringerLockerImpl is the implementation of StringerMapMutex. @@ -22,6 +25,16 @@ func (s stringerLockerImpl) Lock(key fmt.Stringer) Unlocker { return s.mapMux.Lock(key.String()) } +// Keys returns the keys of the map. +func (s stringerLockerImpl) Keys() []string { + var keys []string + for _, key := range s.mapMux.Keys() { + // nolint: forcetypeassert + keys = append(keys, key.(string)) + } + return keys +} + // NewStringerMapMutex creates an initialized locker that locks on fmt.String. func NewStringerMapMutex() StringerMapMutex { return &stringerLockerImpl{ @@ -33,6 +46,7 @@ func NewStringerMapMutex() StringerMapMutex { type StringMapMutex interface { Lock(key string) Unlocker TryLock(key string) (Unlocker, bool) + Keys() []string } // stringMutexImpl locks on a string type. @@ -57,10 +71,21 @@ func (s stringMutexImpl) TryLock(key string) (Unlocker, bool) { return s.mapMux.TryLock(key) } +// Keys returns the keys of the map. +func (s stringMutexImpl) Keys() []string { + keys := []string{} + for _, key := range s.mapMux.Keys() { + // nolint: forcetypeassert + keys = append(keys, key.(string)) + } + return keys +} + // IntMapMutex is a map mutex that allows locking on an int. type IntMapMutex interface { Lock(key int) Unlocker TryLock(key int) (Unlocker, bool) + Keys() []int } // intMapMux locks on an int. @@ -77,6 +102,16 @@ func (i intMapMux) Lock(key int) Unlocker { return i.mapMux.Lock(key) } +// Keys returns the keys of the map. +func (i intMapMux) Keys() []int { + var keys []int + for _, key := range i.mapMux.Keys() { + // nolint: forcetypeassert + keys = append(keys, key.(int)) + } + return keys +} + // NewIntMapMutex creates a map mutex for locking on an integer. func NewIntMapMutex() IntMapMutex { return &intMapMux{ diff --git a/core/metrics/base.go b/core/metrics/base.go index 91d2cadae2..38f01be5bd 100644 --- a/core/metrics/base.go +++ b/core/metrics/base.go @@ -3,11 +3,14 @@ package metrics import ( "context" "fmt" + "net/http" + "github.com/gin-gonic/gin" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/synapsecns/sanguine/core" "github.com/synapsecns/sanguine/core/config" "github.com/synapsecns/sanguine/core/ginhelper" + "github.com/synapsecns/sanguine/core/metrics/instrumentation/otelginmetrics" "github.com/synapsecns/sanguine/core/metrics/internal" experimentalLogger "github.com/synapsecns/sanguine/core/metrics/logger" baseServer "github.com/synapsecns/sanguine/core/server" @@ -24,10 +27,9 @@ import ( sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" tracesdk "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "go.opentelemetry.io/otel/trace" "gorm.io/gorm" - "net/http" ) const pyroscopeEndpoint = internal.PyroscopeEndpoint @@ -115,7 +117,7 @@ func (b *baseHandler) startMetricsServer(ctx context.Context) { // note: this is a global setter, so it will affect all gin servers. // this is probably not wise, but a better workaround is required. gin.SetMode(gin.ReleaseMode) - server.Use(b.Gin()) + server.Use(b.Gin()...) server.GET(path, gin.WrapH(b.handler)) connection := baseServer.Server{} @@ -125,8 +127,11 @@ func (b *baseHandler) startMetricsServer(ctx context.Context) { } } -func (b *baseHandler) Gin() gin.HandlerFunc { - return otelgin.Middleware(b.name, otelgin.WithTracerProvider(b.tp), otelgin.WithPropagators(b.propagator)) +func (b *baseHandler) Gin() []gin.HandlerFunc { + traceMiddleware := otelgin.Middleware(b.name, otelgin.WithTracerProvider(b.tp), otelgin.WithPropagators(b.propagator)) + metricsMiddleware := otelginmetrics.Middleware(b.name) + + return []gin.HandlerFunc{traceMiddleware, metricsMiddleware} } func (b *baseHandler) Propagator() propagation.TextMapPropagator { diff --git a/core/metrics/instrumentation/http.go b/core/metrics/instrumentation/httpcapture/http.go similarity index 96% rename from core/metrics/instrumentation/http.go rename to core/metrics/instrumentation/httpcapture/http.go index 160d6956f2..7faf1f49dc 100644 --- a/core/metrics/instrumentation/http.go +++ b/core/metrics/instrumentation/httpcapture/http.go @@ -1,4 +1,5 @@ -package instrumentation +// Package httpcapture provides an http.RoundTripper that captures requests and responses. +package httpcapture import ( "bytes" @@ -12,7 +13,6 @@ import ( ) // NewCaptureTransport returns a new http.Transport that captures requests and responses. -// TODO: add tests. func NewCaptureTransport(underlyingTransport http.RoundTripper, handler metrics.Handler) http.RoundTripper { return &captureTransport{ transport: underlyingTransport, diff --git a/core/metrics/instrumentation/httpcapture/http_test.go b/core/metrics/instrumentation/httpcapture/http_test.go new file mode 100644 index 0000000000..c2bca86383 --- /dev/null +++ b/core/metrics/instrumentation/httpcapture/http_test.go @@ -0,0 +1,86 @@ +package httpcapture_test + +import ( + "fmt" + "github.com/gin-gonic/gin" + "github.com/ipfs/go-log" + "github.com/phayes/freeport" + "github.com/stretchr/testify/suite" + "github.com/synapsecns/sanguine/core/ginhelper" + "github.com/synapsecns/sanguine/core/metrics" + "github.com/synapsecns/sanguine/core/metrics/instrumentation/httpcapture" + baseServer "github.com/synapsecns/sanguine/core/server" + "github.com/synapsecns/sanguine/core/testsuite" + "net/http" + "strings" + "testing" +) + +type HTTPCaptureSuite struct { + *testsuite.TestSuite + server *gin.Engine + port int +} + +// NewCaptureSuite creates a new HTTPCaptureSuite. +func NewCaptureSuite(t *testing.T) *HTTPCaptureSuite { + t.Helper() + return &HTTPCaptureSuite{ + TestSuite: testsuite.NewTestSuite(t), + } +} + +func (t *HTTPCaptureSuite) SetupTest() { + t.TestSuite.SetupTest() + var logger = log.Logger("httpcapture-test") + t.server = ginhelper.New(logger) + t.server.POST("/test", func(c *gin.Context) { + c.JSON(200, gin.H{"message": "hello world"}) + }) + + var err error + t.port, err = freeport.GetFreePort() + t.Require().NoError(err) + + go func() { + connection := baseServer.Server{} + _ = connection.ListenAndServe(t.GetTestContext(), fmt.Sprintf(":%d", t.port), t.server) + }() + + err = ginhelper.WaitForStart(t.GetTestContext(), t.port) + t.Require().NoError(err) +} + +func (t *HTTPCaptureSuite) TestCaptureTransport() { + httpClient := new(http.Client) + + mocktracer := metrics.NewTestTracer(t.GetTestContext(), t.T()) + + httpClient.Transport = httpcapture.NewCaptureTransport(httpClient.Transport, mocktracer) + + const testRequestBody = "hi" + req, err := http.NewRequestWithContext(t.GetTestContext(), http.MethodPost, fmt.Sprintf("http://localhost:%d/test", t.port), strings.NewReader(testRequestBody)) + t.Require().NoError(err) + + res, err := httpClient.Do(req) + defer func() { + if res != nil && res.Body != nil { + _ = res.Body.Close() + _ = req.Body.Close() + } + }() + t.Require().NoError(err) + t.Require().NotNil(res) + + span := mocktracer.GetSpansByName(httpcapture.RequestSpanName)[0] + + reqBody := metrics.SpanEventByName(span, httpcapture.RequestEventName) + t.Equal(reqBody.AsString(), testRequestBody) + + respBody := metrics.SpanEventByName(span, httpcapture.ResponseEventName) + t.Equal(respBody.AsString(), `{"message":"hello world"}`) +} + +func TestCaptureSuite(t *testing.T) { + suite.Run(t, NewCaptureSuite(t)) +} diff --git a/core/metrics/instrumentation/otelginmetrics/README.md b/core/metrics/instrumentation/otelginmetrics/README.md new file mode 100644 index 0000000000..03216bac83 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/README.md @@ -0,0 +1,3 @@ +# Otel Gin Metrics + +This package is copied from [here](https://github.com/technologize/otel-go-contrib) under the same license. All credits go to the original authors. This package will be removed once [otelcontrib includes it](https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5096) diff --git a/core/metrics/instrumentation/otelginmetrics/config.go b/core/metrics/instrumentation/otelginmetrics/config.go new file mode 100644 index 0000000000..1429438936 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/config.go @@ -0,0 +1,45 @@ +package otelginmetrics + +import ( + "net/http" + + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" +) + +type config struct { + recordInFlight bool + recordSize bool + recordDuration bool + groupedStatus bool + recorder Recorder + attributes func(serverName, route string, request *http.Request) []attribute.KeyValue + shouldRecord func(serverName, route string, request *http.Request) bool +} + +func defaultConfig() *config { + return &config{ + recordInFlight: true, + recordDuration: true, + recordSize: true, + groupedStatus: true, + attributes: DefaultAttributes, + shouldRecord: func(_, _ string, _ *http.Request) bool { + return true + }, + } +} + +var DefaultAttributes = func(serverName, route string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{ + semconv.HTTPRequestMethodKey.String(request.Method), + } + + if serverName != "" { + attrs = append(attrs, semconv.ServiceNameKey.String(serverName)) + } + if route != "" { + attrs = append(attrs, semconv.HTTPRouteKey.String(route)) + } + return attrs +} diff --git a/core/metrics/instrumentation/otelginmetrics/example/main.go b/core/metrics/instrumentation/otelginmetrics/example/main.go new file mode 100644 index 0000000000..019298d4c2 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/example/main.go @@ -0,0 +1,70 @@ +package main + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/gin-gonic/gin" + "github.com/synapsecns/sanguine/core/metrics/instrumentation/otelginmetrics" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/resource" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" +) + +func initMetrics() { + metricExporter, err := stdoutmetric.New() + if err != nil { + panic(err) + } + reader := metric.NewPeriodicReader(metricExporter, metric.WithInterval(1*time.Second)) + + fmt.Println(metricExporter) + res, err := resource.New(context.Background(), + resource.WithAttributes(semconv.ServiceNameKey.String("PG2")), + resource.WithAttributes(semconv.ServiceNamespaceKey.String("Spark")), + resource.WithSchemaURL(semconv.SchemaURL), + ) + if err != nil { + panic(err) + } + metricProvider := metric.NewMeterProvider(metric.WithReader(reader), metric.WithResource(res)) + otel.SetMeterProvider(metricProvider) +} + +func main() { + router := gin.New() + initMetrics() + router.Use(otelginmetrics.Middleware( + "TEST-SERVICE", + // Custom attributes + otelginmetrics.WithAttributes(func(serverName, route string, request *http.Request) []attribute.KeyValue { + return append(otelginmetrics.DefaultAttributes(serverName, route, request), attribute.String("Custom-attribute", "value")) + }), + )) + + logic := func(ctx *gin.Context, sleep int) { + // xxx, _ := strconv.Atoi(ctx.Param("xxx")) + time.Sleep(time.Duration(sleep) * time.Second) + } + + router.GET("/test/:xxx", func(ctx *gin.Context) { + logic(ctx, 1) + ctx.JSON(200, map[string]string{ + "productId": ctx.Param("xxx"), + }) + }) + + go func() { + for { + _, _ = http.DefaultClient.Get("http://localhost:9199/test/1") + } + }() + + _ = router.Run(":9199") + +} diff --git a/core/metrics/instrumentation/otelginmetrics/middleware.go b/core/metrics/instrumentation/otelginmetrics/middleware.go new file mode 100644 index 0000000000..95e8e3aca7 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/middleware.go @@ -0,0 +1,97 @@ +package otelginmetrics + +import ( + "go.opentelemetry.io/otel/attribute" + "net/http" + "time" + + "github.com/gin-gonic/gin" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" +) + +const statusKey = attribute.Key("http.status_code") + +// Middleware returns middleware that will trace incoming requests. +// The service parameter should describe the name of the (virtual) +// server handling the request. +func Middleware(service string, options ...Option) gin.HandlerFunc { + cfg := defaultConfig() + for _, option := range options { + option.apply(cfg) + } + recorder := cfg.recorder + if recorder == nil { + recorder = GetRecorder("") + } + return func(ginCtx *gin.Context) { + + ctx := ginCtx.Request.Context() + + route := ginCtx.FullPath() + if len(route) <= 0 { + route = "nonconfigured" + } + if !cfg.shouldRecord(service, route, ginCtx.Request) { + ginCtx.Next() + return + } + + start := time.Now() + reqAttributes := cfg.attributes(service, route, ginCtx.Request) + + if cfg.recordInFlight { + recorder.AddInflightRequests(ctx, 1, reqAttributes) + defer recorder.AddInflightRequests(ctx, -1, reqAttributes) + } + + defer func() { + + resAttributes := append(reqAttributes[0:0], reqAttributes...) + + if cfg.groupedStatus { + code := int(ginCtx.Writer.Status()/100) * 100 + resAttributes = append(resAttributes, statusKey.Int(code)) + } else { + resAttributes = append(resAttributes, semconv.HTTPResponseStatusCodeKey.Int(ginCtx.Writer.Status())) + } + + recorder.AddRequests(ctx, 1, resAttributes) + + if cfg.recordSize { + requestSize := computeApproximateRequestSize(ginCtx.Request) + recorder.ObserveHTTPRequestSize(ctx, requestSize, resAttributes) + recorder.ObserveHTTPResponseSize(ctx, int64(ginCtx.Writer.Size()), resAttributes) + } + + if cfg.recordDuration { + recorder.ObserveHTTPRequestDuration(ctx, time.Since(start), resAttributes) + } + }() + + ginCtx.Next() + } +} + +func computeApproximateRequestSize(r *http.Request) int64 { + s := 0 + if r.URL != nil { + s = len(r.URL.Path) + } + + s += len(r.Method) + s += len(r.Proto) + for name, values := range r.Header { + s += len(name) + for _, value := range values { + s += len(value) + } + } + s += len(r.Host) + + // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. + + if r.ContentLength != -1 { + s += int(r.ContentLength) + } + return int64(s) +} diff --git a/core/metrics/instrumentation/otelginmetrics/option.go b/core/metrics/instrumentation/otelginmetrics/option.go new file mode 100644 index 0000000000..144ef93784 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/option.go @@ -0,0 +1,74 @@ +package otelginmetrics + +import ( + "net/http" + + "go.opentelemetry.io/otel/attribute" +) + +// Option applies a configuration to the given config +type Option interface { + apply(cfg *config) +} + +type optionFunc func(cfg *config) + +func (fn optionFunc) apply(cfg *config) { + fn(cfg) +} + +// WithAttributes sets a func using which what attributes to be recorded can be specified. +// By default the DefaultAttributes is used +func WithAttributes(attributes func(serverName, route string, request *http.Request) []attribute.KeyValue) Option { + return optionFunc(func(cfg *config) { + cfg.attributes = attributes + }) +} + +// WithRecordInFlight determines whether to record In Flight Requests or not +// By default the recordInFlight is true +func WithRecordInFlightDisabled() Option { + return optionFunc(func(cfg *config) { + cfg.recordInFlight = false + }) +} + +// WithRecordDuration determines whether to record Duration of Requests or not +// By default the recordDuration is true +func WithRecordDurationDisabled() Option { + return optionFunc(func(cfg *config) { + cfg.recordDuration = false + }) +} + +// WithRecordSize determines whether to record Size of Requests and Responses or not +// By default the recordSize is true +func WithRecordSizeDisabled() Option { + return optionFunc(func(cfg *config) { + cfg.recordSize = false + }) +} + +// WithGroupedStatus determines whether to group the response status codes or not. If true 2xx, 3xx will be stored +// By default the groupedStatus is true +func WithGroupedStatusDisabled() Option { + return optionFunc(func(cfg *config) { + cfg.groupedStatus = false + }) +} + +// WithRecorder sets a recorder for recording requests +// By default the open telemetry recorder is used +func WithRecorder(recorder Recorder) Option { + return optionFunc(func(cfg *config) { + cfg.recorder = recorder + }) +} + +// WithShouldRecordFunc sets a func using which whether a record should be recorded +// By default the all api calls are recorded +func WithShouldRecordFunc(shouldRecord func(serverName, route string, request *http.Request) bool) Option { + return optionFunc(func(cfg *config) { + cfg.shouldRecord = shouldRecord + }) +} diff --git a/core/metrics/instrumentation/otelginmetrics/otelrecorder.go b/core/metrics/instrumentation/otelginmetrics/otelrecorder.go new file mode 100644 index 0000000000..efdc96ffde --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/otelrecorder.go @@ -0,0 +1,70 @@ +package otelginmetrics + +import ( + "context" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" +) + +const instrumentationName = "github.com/technologize/otel-go-contrib/otelginmetrics" + +// Recorder knows how to record and measure the metrics. This +// has the required methods to be used with the HTTP +// middlewares. +type otelRecorder struct { + attemptsCounter metric.Int64UpDownCounter + totalDuration metric.Int64Histogram + activeRequestsCounter metric.Int64UpDownCounter + requestSize metric.Int64Histogram + responseSize metric.Int64Histogram +} + +func GetRecorder(metricsPrefix string) Recorder { + metricName := func(metricName string) string { + if len(metricsPrefix) > 0 { + return metricsPrefix + "." + metricName + } + return metricName + } + meter := otel.Meter(instrumentationName, metric.WithInstrumentationVersion(SemVersion())) + attemptsCounter, _ := meter.Int64UpDownCounter(metricName("http.server.request_count"), metric.WithDescription("Number of Requests"), metric.WithUnit("Count")) + totalDuration, _ := meter.Int64Histogram(metricName("http.server.duration"), metric.WithDescription("Time Taken by request"), metric.WithUnit("Milliseconds")) + activeRequestsCounter, _ := meter.Int64UpDownCounter(metricName("http.server.active_requests"), metric.WithDescription("Number of requests inflight"), metric.WithUnit("Count")) + requestSize, _ := meter.Int64Histogram(metricName("http.server.request_content_length"), metric.WithDescription("Request Size"), metric.WithUnit("Bytes")) + responseSize, _ := meter.Int64Histogram(metricName("http.server.response_content_length"), metric.WithDescription("Response Size"), metric.WithUnit("Bytes")) + return &otelRecorder{ + attemptsCounter: attemptsCounter, + totalDuration: totalDuration, + activeRequestsCounter: activeRequestsCounter, + requestSize: requestSize, + responseSize: responseSize, + } +} + +// AddRequests increments the number of requests being processed. +func (r *otelRecorder) AddRequests(ctx context.Context, quantity int64, attributes []attribute.KeyValue) { + r.attemptsCounter.Add(ctx, quantity, metric.WithAttributes(attributes...)) +} + +// ObserveHTTPRequestDuration measures the duration of an HTTP request. +func (r *otelRecorder) ObserveHTTPRequestDuration(ctx context.Context, duration time.Duration, attributes []attribute.KeyValue) { + r.totalDuration.Record(ctx, int64(duration/time.Millisecond), metric.WithAttributes(attributes...)) +} + +// ObserveHTTPRequestSize measures the size of an HTTP request in bytes. +func (r *otelRecorder) ObserveHTTPRequestSize(ctx context.Context, sizeBytes int64, attributes []attribute.KeyValue) { + r.requestSize.Record(ctx, sizeBytes, metric.WithAttributes(attributes...)) +} + +// ObserveHTTPResponseSize measures the size of an HTTP response in bytes. +func (r *otelRecorder) ObserveHTTPResponseSize(ctx context.Context, sizeBytes int64, attributes []attribute.KeyValue) { + r.responseSize.Record(ctx, sizeBytes, metric.WithAttributes(attributes...)) +} + +// AddInflightRequests increments and decrements the number of inflight request being processed. +func (r *otelRecorder) AddInflightRequests(ctx context.Context, quantity int64, attributes []attribute.KeyValue) { + r.activeRequestsCounter.Add(ctx, quantity, metric.WithAttributes(attributes...)) +} diff --git a/core/metrics/instrumentation/otelginmetrics/recorder.go b/core/metrics/instrumentation/otelginmetrics/recorder.go new file mode 100644 index 0000000000..7fadeff386 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/recorder.go @@ -0,0 +1,25 @@ +package otelginmetrics + +import ( + "context" + "time" + + "go.opentelemetry.io/otel/attribute" +) + +type Recorder interface { + // AddRequests increments the number of requests being processed. + AddRequests(ctx context.Context, quantity int64, attributes []attribute.KeyValue) + + // ObserveHTTPRequestDuration measures the duration of an HTTP request. + ObserveHTTPRequestDuration(ctx context.Context, duration time.Duration, attributes []attribute.KeyValue) + + // ObserveHTTPRequestSize measures the size of an HTTP request in bytes. + ObserveHTTPRequestSize(ctx context.Context, sizeBytes int64, attributes []attribute.KeyValue) + + // ObserveHTTPResponseSize measures the size of an HTTP response in bytes. + ObserveHTTPResponseSize(ctx context.Context, sizeBytes int64, attributes []attribute.KeyValue) + + // AddInflightRequests increments and decrements the number of inflight request being processed. + AddInflightRequests(ctx context.Context, quantity int64, attributes []attribute.KeyValue) +} diff --git a/core/metrics/instrumentation/otelginmetrics/version.go b/core/metrics/instrumentation/otelginmetrics/version.go new file mode 100644 index 0000000000..323e1a4c15 --- /dev/null +++ b/core/metrics/instrumentation/otelginmetrics/version.go @@ -0,0 +1,11 @@ +package otelginmetrics + +// Version is the current release version of the gin instrumentation. +func Version() string { + return "1.0.0" +} + +// SemVersion is the semantic version to be supplied to tracer/meter creation. +func SemVersion() string { + return "semver:" + Version() +} diff --git a/core/metrics/metrics.go b/core/metrics/metrics.go index 6f030985d7..f3f6bf8da3 100644 --- a/core/metrics/metrics.go +++ b/core/metrics/metrics.go @@ -3,6 +3,10 @@ package metrics import ( "context" "fmt" + "net/http" + "os" + "strings" + "github.com/gin-gonic/gin" "github.com/synapsecns/sanguine/core/config" experimentalLogger "github.com/synapsecns/sanguine/core/metrics/logger" @@ -11,16 +15,13 @@ import ( "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" "gorm.io/gorm" - "net/http" - "os" - "strings" ) // Handler collects metrics. type Handler interface { Start(ctx context.Context) error - // Gin gets a gin middleware for tracing. - Gin() gin.HandlerFunc + // Gin gets all gin middlewares for tracing. + Gin() []gin.HandlerFunc // ConfigureHTTPClient configures tracing on an http client ConfigureHTTPClient(client *http.Client, opts ...otelhttp.Option) // AddGormCallbacks adds gorm callbacks for tracing. diff --git a/core/metrics/null.go b/core/metrics/null.go index e79ecd4330..3c4f50dce1 100644 --- a/core/metrics/null.go +++ b/core/metrics/null.go @@ -57,10 +57,8 @@ func (n nullHandler) ConfigureHTTPClient(client *http.Client, opts ...otelhttp.O // Do nothing } -func (n nullHandler) Gin() gin.HandlerFunc { - return func(c *gin.Context) { - c.Next() - } +func (n nullHandler) Gin() []gin.HandlerFunc { + return []gin.HandlerFunc{} } func (n nullHandler) Start(_ context.Context) error { diff --git a/core/metrics/tester.go b/core/metrics/tester.go index 23e7b6653b..470c4595d4 100644 --- a/core/metrics/tester.go +++ b/core/metrics/tester.go @@ -4,6 +4,7 @@ import ( "context" "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/core/config" + "go.opentelemetry.io/otel/attribute" tracesdk "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" "testing" @@ -51,3 +52,36 @@ func (t *testHandler) GetSpansByName(name string) (spans []tracetest.SpanStub) { } return } + +// SpanEventByName returns the value of the first event with the given name. +// it is a helper function for tests. +func SpanEventByName(stub tracetest.SpanStub, name string) *attribute.Value { + for _, event := range stub.Events { + if event.Name == name { + return &event.Attributes[0].Value + } + } + return nil +} + +// SpanAttributeByName returns the value of the first attribute with the given name. +// it is a helper function for tests. +func SpanAttributeByName(stub tracetest.SpanStub, name string) *attribute.Value { + for _, attr := range stub.Attributes { + if attr.Key == attribute.Key(name) { + return &attr.Value + } + } + return nil +} + +// SpanHasException returns true if the span has an exception event. +// it is a helper function for tests. +func SpanHasException(stub tracetest.SpanStub) bool { + for _, event := range stub.Events { + if event.Name == "exception" { + return true + } + } + return false +} diff --git a/docker/goreleaser/Dockerfile b/docker/goreleaser/Dockerfile index 0cb62b3a31..37c9dafc6d 100644 --- a/docker/goreleaser/Dockerfile +++ b/docker/goreleaser/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 debian:11-slim +FROM --platform=linux/amd64 debian:12-slim ARG VERSION_ARG=1.24.0-pro ARG SHA_ARG=01237f7151d2c46c307f21de183eb863ce47a4b5244507487ec663640b077d7d diff --git a/docs/bridge/CHANGELOG.md b/docs/bridge/CHANGELOG.md index ca7db92ffe..2b96cb02e8 100644 --- a/docs/bridge/CHANGELOG.md +++ b/docs/bridge/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.6](https://github.com/synapsecns/sanguine/compare/@synapsecns/bridge-docs@0.1.5...@synapsecns/bridge-docs@0.1.6) (2024-07-11) + +**Note:** Version bump only for package @synapsecns/bridge-docs + + + + + +## [0.1.5](https://github.com/synapsecns/sanguine/compare/@synapsecns/bridge-docs@0.1.4...@synapsecns/bridge-docs@0.1.5) (2024-07-03) + +**Note:** Version bump only for package @synapsecns/bridge-docs + + + + + ## [0.1.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/bridge-docs@0.1.3...@synapsecns/bridge-docs@0.1.4) (2024-06-27) **Note:** Version bump only for package @synapsecns/bridge-docs diff --git a/docs/bridge/docs/CCTP/Relayer.md b/docs/bridge/docs/CCTP/Relayer.md index 56444d2776..35a309cbfc 100644 --- a/docs/bridge/docs/CCTP/Relayer.md +++ b/docs/bridge/docs/CCTP/Relayer.md @@ -10,7 +10,7 @@ At a high level, the relayer works like this: 1. Poll for new transactions from the CCTP contracts and add them to the database as [Pending](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) 2. Fetch the attestation from the Circle API. Once successful add attestation to the database and update status to be [Attested](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) -3. Submit the attestation to the CCTP contracts. Once the transaction has been added to [Submitter](../Services/Submitter.md), mark as [Submitted](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) +3. Submit the attestation to the CCTP contracts. Once the transaction has been added to [Submitter](../Services/Submitter#Observability), mark as [Submitted](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) 4. Poll for the transaction receipt and mark as [Confirmed](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) ### Modes @@ -104,4 +104,4 @@ The CCTP Relayer is configured with a yaml file. The following is an example con ### Observability -The CCTP relayer implements open telemetry for both tracing and metrics. Please see the [Observability](../Observability) page for more info. +The CCTP relayer implements open telemetry for both tracing and metrics. Please see the [Observability](../Observability) page for more info. We'd also highly recommend setting up the [submitter dashboard](../Services/Submitter) as well. diff --git a/docs/bridge/docs/Services/Signer.md b/docs/bridge/docs/Services/Signer.md index 44d6778004..9c0b18f018 100644 --- a/docs/bridge/docs/Services/Signer.md +++ b/docs/bridge/docs/Services/Signer.md @@ -9,23 +9,23 @@ In order to setup the signer with AWS KMS, you will need to create a KMS key and ### Create an IAM User 1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam. -![IAM Dashboard](img/iam-dash.png) +![IAM Dashboard](img/signer/aws/iam-dash.png) 2. Click on `Users` in the left-hand menu and then click on `Add user`. -![Create User](img/kms-user.png) +![Create User](img/signer/aws/kms-user.png) 3. Leave Permissions empty and click `Next` -![img.png](img/perms.png) +![img/signer/aws.png](img/signer/aws/perms.png) 4. Add tags if you want and click `Create User` -![IAM Preview User](img/iam-preview-user.png) +![IAM Preview User](img/signer/aws/iam-preview-user.png) 5. The user will be create and appear in the list of users. Click on the user to view the user details. -![User List](img/user-list.png) +![User List](img/signer/aws/user-list.png) 6. Click on 'Create access key'. @@ -39,22 +39,22 @@ In the example above, we use access keys & secrets to authenticate the user. Thi 7. Skip the description page -![user-perms.png](img/user-perms.png) +![user-perms.png](img/signer/aws/user-perms.png) 8. Click on `Create access key` -![Create Access Key](img/create-acces-key.png) +![Create Access Key](img/signer/aws/create-acces-key.png) Note down the `Access key ID` and `Secret access key` as you will need these to configure the signer. ### Create a KMS Key 1. Sign in to the AWS Management Console and open the KMS console at https://console.aws.amazon.com/kms. -![KMS Key](img/kms-1.png) +![KMS Key](img/signer/aws/kms-1.png) 2. Choose `Create key` and fill in the following options: -![Create Key](img/kms-2.png) +![Create Key](img/signer/aws/kms-2.png) - Key Type: `Asymmetric`: Since ethereum uses [ECDSA](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm) keys, we need to use an asymmetric key. - Key Usage: `Sign and verify`: We will be using the key to sign transactions so we select this option. @@ -62,11 +62,11 @@ Note down the `Access key ID` and `Secret access key` as you will need these to Note: The advanced options are not required for this setup. You can leave them as default: -![Advanced Options](img/kms-advanced.png) +![Advanced Options](img/signer/aws/kms-advanced.png) 3. Choose `Next` and fill in the following options: -![KMS Creation Step 2](img/kms-labels.png) +![KMS Creation Step 2](img/signer/aws/kms-labels.png) - Alias: This is an alias that will be used to reference the key in the signer. The field is required but the value doesn't matter. - Description: This is a description that will be used to describe the key in the signer. This is only optional and only for your reference. @@ -74,21 +74,21 @@ Note: The advanced options are not required for this setup. You can leave them a 4. Choose `Next` and define your key admin permissions. These are *not* required by the signer itself but are required to manage the key. You can use whatever you like here. -![KMS Permissions](img/kms-permissons.png) +![KMS Permissions](img/signer/aws/kms-permissons.png) 5. Choose `Next` and define your user permissions. Here you should set your user as a user. -![KMS User Permissions](img/kms-user-permissions.png) +![KMS User Permissions](img/signer/aws/kms-user-permissions.png) 6. Choose `Next` and review your key settings. If everything looks good, choose `Finish`. -![Review](img/review.png) +![Review](img/signer/aws/review.png) 7. Your key will be created and you will be redirected to the key details page. Note down the `Key ID` as you will need this to configure the signer. 8. You will be redirected to the key details page. Click on the key alias to view the key details. -![Key Details](img/key-details.png) +![Key Details](img/signer/aws/key-details.png) 9. Using Your Key (AWS) diff --git a/docs/bridge/docs/Services/Submitter.md b/docs/bridge/docs/Services/Submitter.md index 24d536144e..daa6c447a3 100644 --- a/docs/bridge/docs/Services/Submitter.md +++ b/docs/bridge/docs/Services/Submitter.md @@ -2,8 +2,38 @@ This section is still in progress, please see [here](https://pkg.go.dev/github.com/synapsecns/sanguine/ethergo/submitter#section-readme) for details. +# Ethergo Submitter + +## Overview + +The Ethergo Submitter module is designed to submit transactions to an EVM-based blockchain. It handles gas bumping and confirmation checking to ensure that transactions are eventually confirmed. This module is essential because the EVM does not specify transaction submission or consensus, and rate limits can affect transaction submission. + +## Key Features + +- **Transaction Submission**: The main function of the module is the `SubmitTransaction` method, which returns a nonce and ensures that the transaction will eventually be confirmed. +- **Gas Bumping**: Automatically adjusts the gas price to ensure timely transaction confirmation. +- **Confirmation Checking**: Continuously checks the status of submitted transactions to confirm their inclusion in the blockchain. +- **Reaper Functionality**: Flushes old entries in the database that have reached a terminal state. + +### Reaper + The submitter also has "reaper" functionality, which flushes old entries in the database that have reached a terminal state (`Replaced`, `ReplacedOrConfirmed`, `Confirmed`). By default, entries are flushed after a week, but this functionality is configurable by the `MaxRecordAge` config value. ### Submitter Config This section is still in progress, please see [here](https://pkg.go.dev/github.com/synapsecns/sanguine/ethergo@v0.9.0/submitter/config) for details. + +### Observability + +Submitter exposes metrics for Prometheus. The metrics are: + + - `num_pending_txs`: The number of pending transactions. + - `current_nonce`: The current nonce. + - `oldest_pending_tx`: The age of the oldest pending transaction. + - `confirmed_queue`: The number of confirmed transactions. + - `gas_balance`: The current gas balance. + + +The metrics can be used in a dashboard [here](https://raw.githubusercontent.com/synapsecns/sanguine/master/ethergo/dashboard.json). It looks like this: + +![Submitter Dashboard](img/submitter/metrics.png) diff --git a/docs/bridge/docs/Services/img/create-acces-key.png b/docs/bridge/docs/Services/img/signer/aws/create-acces-key.png similarity index 100% rename from docs/bridge/docs/Services/img/create-acces-key.png rename to docs/bridge/docs/Services/img/signer/aws/create-acces-key.png diff --git a/docs/bridge/docs/Services/img/create-access-key.png b/docs/bridge/docs/Services/img/signer/aws/create-access-key.png similarity index 100% rename from docs/bridge/docs/Services/img/create-access-key.png rename to docs/bridge/docs/Services/img/signer/aws/create-access-key.png diff --git a/docs/bridge/docs/Services/img/iam-dash.png b/docs/bridge/docs/Services/img/signer/aws/iam-dash.png similarity index 100% rename from docs/bridge/docs/Services/img/iam-dash.png rename to docs/bridge/docs/Services/img/signer/aws/iam-dash.png diff --git a/docs/bridge/docs/Services/img/iam-preview-user.png b/docs/bridge/docs/Services/img/signer/aws/iam-preview-user.png similarity index 100% rename from docs/bridge/docs/Services/img/iam-preview-user.png rename to docs/bridge/docs/Services/img/signer/aws/iam-preview-user.png diff --git a/docs/bridge/docs/Services/img/key-details.png b/docs/bridge/docs/Services/img/signer/aws/key-details.png similarity index 100% rename from docs/bridge/docs/Services/img/key-details.png rename to docs/bridge/docs/Services/img/signer/aws/key-details.png diff --git a/docs/bridge/docs/Services/img/kms-1.png b/docs/bridge/docs/Services/img/signer/aws/kms-1.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-1.png rename to docs/bridge/docs/Services/img/signer/aws/kms-1.png diff --git a/docs/bridge/docs/Services/img/kms-2.png b/docs/bridge/docs/Services/img/signer/aws/kms-2.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-2.png rename to docs/bridge/docs/Services/img/signer/aws/kms-2.png diff --git a/docs/bridge/docs/Services/img/kms-advanced.png b/docs/bridge/docs/Services/img/signer/aws/kms-advanced.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-advanced.png rename to docs/bridge/docs/Services/img/signer/aws/kms-advanced.png diff --git a/docs/bridge/docs/Services/img/kms-labels.png b/docs/bridge/docs/Services/img/signer/aws/kms-labels.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-labels.png rename to docs/bridge/docs/Services/img/signer/aws/kms-labels.png diff --git a/docs/bridge/docs/Services/img/kms-permissons.png b/docs/bridge/docs/Services/img/signer/aws/kms-permissons.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-permissons.png rename to docs/bridge/docs/Services/img/signer/aws/kms-permissons.png diff --git a/docs/bridge/docs/Services/img/kms-user-permissions.png b/docs/bridge/docs/Services/img/signer/aws/kms-user-permissions.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-user-permissions.png rename to docs/bridge/docs/Services/img/signer/aws/kms-user-permissions.png diff --git a/docs/bridge/docs/Services/img/kms-user.png b/docs/bridge/docs/Services/img/signer/aws/kms-user.png similarity index 100% rename from docs/bridge/docs/Services/img/kms-user.png rename to docs/bridge/docs/Services/img/signer/aws/kms-user.png diff --git a/docs/bridge/docs/Services/img/perms.png b/docs/bridge/docs/Services/img/signer/aws/perms.png similarity index 100% rename from docs/bridge/docs/Services/img/perms.png rename to docs/bridge/docs/Services/img/signer/aws/perms.png diff --git a/docs/bridge/docs/Services/img/review.png b/docs/bridge/docs/Services/img/signer/aws/review.png similarity index 100% rename from docs/bridge/docs/Services/img/review.png rename to docs/bridge/docs/Services/img/signer/aws/review.png diff --git a/docs/bridge/docs/Services/img/user-list.png b/docs/bridge/docs/Services/img/signer/aws/user-list.png similarity index 100% rename from docs/bridge/docs/Services/img/user-list.png rename to docs/bridge/docs/Services/img/signer/aws/user-list.png diff --git a/docs/bridge/docs/Services/img/user-perms.png b/docs/bridge/docs/Services/img/signer/aws/user-perms.png similarity index 100% rename from docs/bridge/docs/Services/img/user-perms.png rename to docs/bridge/docs/Services/img/signer/aws/user-perms.png diff --git a/docs/bridge/docs/Services/img/submitter/metrics.png b/docs/bridge/docs/Services/img/submitter/metrics.png new file mode 100644 index 0000000000..6fcec96c09 Binary files /dev/null and b/docs/bridge/docs/Services/img/submitter/metrics.png differ diff --git a/docs/bridge/docs/rfq/API/get-contract-addresses.api.mdx b/docs/bridge/docs/rfq/API/get-contract-addresses.api.mdx new file mode 100644 index 0000000000..9bc7fb21b3 --- /dev/null +++ b/docs/bridge/docs/rfq/API/get-contract-addresses.api.mdx @@ -0,0 +1,179 @@ +--- +id: get-contract-addresses +title: "Get contract addresses" +description: "get quotes from all relayers." +sidebar_label: "Get contract addresses" +hide_title: true +hide_table_of_contents: true +api: eJyFUrtuwzAM/BWBs9EEHbMVRZGhQzu0U5CBkZlYqWwpEh3UMPzvJe2keXToZD5OR97RPZSUbXKRXWhgATtic2gDUzbbFGqD3ptEHjtK+QEKSJRjaDJlWPTwOJ/r55bh7VVgNjRMDWsXY/TOonZn+6yQHrKtqEaNHFM9csUUIiV2E7O+T2h5TLAsnT5H/34D4i6SDMycXLODobhb5PnMYVw2aGqMJmyNrdA1xpWGgzlPMTJBhGVZ/MQZNnuyDMPwp/JbwJSwE8QwgnAnK61gsg7WBdTEVSgnR4U3IleSzC7CCnDNNpzFSklCZXLslV76R/F8kqJjY8hc42hfg7VClnKrewmkxDc+9Jdj/HvdkzSmb55FL0bp4Db58UCjgtXVaURlJUtpse83mOkz+WHQ8qGl1EldwiMmhxuVtFoLWUVYUpKkhy8SCDxZS1EdOqJvR1/v/5fh2s3ly4d4/gO22+/e +sidebar_class_name: "get api-method" +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + + + + + + + + + + +get quotes from all relayers. + +
+
+ + +
+ + + OK + + +
+ + + + +
+ + + Schema + +
+ +
    +
  • +
    + Array [ +
    +
  • +
    + + + + contracts + + object + + +
    +
    + + + Contracts is a map of chain id to contract address + + +
    + + +
    +
    +
  • +
    + ] +
    +
  • +
+
+
+ + + + +
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/docs/bridge/docs/rfq/API/relay-ack.api.mdx b/docs/bridge/docs/rfq/API/relay-ack.api.mdx new file mode 100644 index 0000000000..5888fc61f1 --- /dev/null +++ b/docs/bridge/docs/rfq/API/relay-ack.api.mdx @@ -0,0 +1,202 @@ +--- +id: relay-ack +title: "Relay ack" +description: "cache an ack request to synchronize relayer actions." +sidebar_label: "Relay ack" +hide_title: true +hide_table_of_contents: true +api: eJydVMGOm0AM/RU057SJesyxVU89tFrtntIVcsCB2cDM1GO2oYh/rw3shpYsqgoSmvE822/8bDqTY8zIBrbemb3JICsxAZdAdk4IfzQYOWGfxNZlJXlnf6GYK2iRBKJO8b3ZmAn50eet2Xcm847RsS4hhMpmoMjtU9QcnYmSowZdBfIBiS1G3QkVTqH2zejKbUChFJmsK0y/Gc+zEqxLbT5DWMlWIL1CTiCfI9m8wBTynDDGt+OxP6MbYDcxJ3vBPD0h3jyt4ZJ6soUwWuE9IdaZT6B/5T7BV9kLbLL44xNmLJbx1jPBRTdqkwAEdZyEtITCkanBXg0xiMijQB92u0mnWYSvX8ZMUAjmYKRxzKNUBrn0EsaEhiVuAC5ls9XTjdFGuLu2zOcL1KHCRQu8XGSh/G5N6L+85hW6Hs1kvRpvqHk9XIi4W9ds4XmLiNTNupN/mRmZKFlqMS1rPYx4PyPFsdCKDj5yDcMUOagVcqfTmIx1/UOY2Rj+71hP3cN44W2o5OJKoaFqGN1B0Ve9SyGm2647QsQHqvpezUN7iV2Wz0AWjnqtw6OEKRFy6fz9oTNnFIj5NLJ9d69JFV41mnzxA+nn3fXt4V6wx+m/U/tcXQh+aivLd2++y6saDEUZmniwd6YCVzRQKH4Mq89v8jPG1Q== +sidebar_class_name: "put api-method" +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + + + + + + + + + + +cache an ack request to synchronize relayer actions. + + + + + + +
+ +

+ Body +

+ required + +
+
+ + + query params + + +
+
    + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + +
+ + + OK + + +
+ +
+
+
+
+
+ \ No newline at end of file diff --git a/docs/bridge/docs/rfq/API/upsert-quotes.api.mdx b/docs/bridge/docs/rfq/API/upsert-quotes.api.mdx new file mode 100644 index 0000000000..c001ef8ea1 --- /dev/null +++ b/docs/bridge/docs/rfq/API/upsert-quotes.api.mdx @@ -0,0 +1,244 @@ +--- +id: upsert-quotes +title: "Upsert quotes" +description: "upsert bulk quotes from relayer." +sidebar_label: "Upsert quotes" +hide_title: true +hide_table_of_contents: true +api: eJyNVMGOmzAQ/RXkc9pEPea4VU89tKo2p3SFBhjAG8DesdkNQvx7ZzDZ0IRFCxIy4+fx87w37lWGLiVtvTaN2qvWOiQfJW11il5a49FFOZk6IqygQ/qqNorwpUXnH0zWqX2vUtN4bLwMwdpKpyCpts9O8vXKpSXWICNLxnJujU7+QnIZaY+1uwcwLx9DbdqQ23cWmZ/zpJtCDZswn5agm1hnM4RmOgXSOyQH/iSkswJjyDJC5z7O580JmxG2iMn1GbM4R1ycreEcG9IFM1rhPSHWmU+gz3Kf4KvsGTZFTPKMqVfXABBBt4QYQl1m/mDpqYssELBmwQuakE/hqcVBAs6axgUJv+12k5KzDL9+hp2gYMzx4oMnLh/60nAmZVvPqS34kn+2YsV4Qm2U2OrP1YA/zlDbCueGOt5Y51KAO8fs1gxys2pe2evUzA7X4IILrpN34u/Wtb5buURkeOJ66iY3l3aEVKwnRdZeiqN4/SuSCwKI8NY4X8PYoA3UAjmExn8v9H+izbr8MzfE5CKPZ7+1FR9VtmypGpt8lPWo5rKy+CUTknDfJ+DwQNUwSHi0G8d5+AqkIZHjHOW8JULGvSJyn5Ah6ntg+OVRNhd41Y7evr2ThrnVfh8eGZtMV1ltMllC8CbW5u9e/eVXqj8WYjT1GO9VBU3RQiH4kFaefxaR3uo= +sidebar_class_name: "put api-method" +custom_edit_url: null +--- + +import ApiTabs from "@theme/ApiTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import Markdown from "@theme/Markdown"; +import Heading from "@theme/Heading"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; + + + + + + + + + + +upsert bulk quotes from relayer. + + + + + + +
+ +

+ Body +

+ required + +
+
+ + + query params + + +
+
    + +
    + + + + quotes + + object[] + + +
    +
  • +
    + Array [ +
    +
  • + + + + + + + + + + + + + + + + + +
  • +
    + ] +
    +
  • +
    +
    +
    +
+
+
+
+
+ + +
+ + + OK + + +
+ +
+
+
+
+
+ \ No newline at end of file diff --git a/docs/bridge/docs/rfq/Relayer/Relayer.md b/docs/bridge/docs/rfq/Relayer/Relayer.md index f8ca8f07a4..b2969fd683 100644 --- a/docs/bridge/docs/rfq/Relayer/Relayer.md +++ b/docs/bridge/docs/rfq/Relayer/Relayer.md @@ -183,7 +183,7 @@ The relayer is configured with a yaml file. The following is an example configur - - `submitter_config` - This is covered [here](../../Services/Submitter). At a high level this controls gas parameters used for on-chain transactions. + - `submitter_config` - This is covered [here](../../Services/Submitter#Observability). At a high level this controls gas parameters used for on-chain transactions. - `database` - The database settings for the API backend. A database is required to store quotes and other information. Using SQLite with a dsn set to a `/tmp/` directory is recommended for development. - `type` - the database driver to use, can be `mysql` or `sqlite`. - `dsn` - the dsn of your database. If using sqlite, this can be a path, if using mysql please see [here](https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration.html) for more information. @@ -193,6 +193,8 @@ The relayer is configured with a yaml file. The following is an example configur - `rebalance_interval` - How often to rebalance, formatted as (s = seconds, m = minutes, h = hours) - `relayer_api_port` - the relayer api is used to control the relayer. This api should be secured/not public. - `base_chain_config`: Base chain config is the default config applied for each chain if the other chains do not override it. This is covered in the chains section. + - `enable_guard` - Run a guard on the same instance. + - `submit_single_quotes` - Wether to use the batch endpoint for posting quotes to the api. This can be useful for debugging. - `chains` - each chain has a different config that overrides base_chain_config. Here are the parameters for each chain - `rfq_address` - the address of the rfq contract on this chain. These addresses are available [here](../Contracts.md). @@ -221,6 +223,12 @@ The relayer is configured with a yaml file. The following is an example configur ### Observability -The RFQ relayer implements open telemetry for both tracing and metrics. Please see the [Observability](../../Observability) page for more info. There is also a custom [grafana dashboard](https://github.com/synapsecns/sanguine/tree/master/services/rfq/relayer/dashboards/grafana.json) available for the relayer. +The RFQ relayer implements open telemetry for both tracing and metrics. Please see the [Observability](../../Observability) page for more info. There is also a custom [grafana dashboard](https://github.com/synapsecns/sanguine/tree/master/services/rfq/relayer/dashboards/dashboard.json) available for the relayer. We'd also highly recommend setting up the [submitter dashboard](../../Services/Submitter) as well. ![Relayer Grafana Dashboard](dashboard.png) + +The metrics exposed by the relayer are: + +- `inventory_balance`: The balance of the inventory on the chain for a given `token_name` and `relayer`. +- `quote_amount`: The amount quoted for a given `token_name` and `relayer`. +- `status_count`: The distribution of non-terminal `QuoteRequestStatus` values over time. diff --git a/docs/bridge/docs/rfq/Relayer/dashboard.png b/docs/bridge/docs/rfq/Relayer/dashboard.png index 2d7a70a3c9..7c4d204132 100644 Binary files a/docs/bridge/docs/rfq/Relayer/dashboard.png and b/docs/bridge/docs/rfq/Relayer/dashboard.png differ diff --git a/docs/bridge/docusaurus.config.ts b/docs/bridge/docusaurus.config.ts index 63a90080b5..d7ed74fca7 100644 --- a/docs/bridge/docusaurus.config.ts +++ b/docs/bridge/docusaurus.config.ts @@ -2,6 +2,7 @@ import {themes as prismThemes} from 'prism-react-renderer'; import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; import * as path from "path"; +import {codecovWebpackPlugin} from "@codecov/webpack-plugin"; const config: Config = { title: 'Synapse Bridge Docs', @@ -129,7 +130,7 @@ const config: Config = { config: { rfqapi: { // the referenced when running CLI commands specPath: "../../services/rfq/api/docs/swagger.yaml", // path to OpenAPI spec, URLs supported - baseUrl: "https://https://rfq-api.omnirpc.io/", + baseUrl: "https://rfq-api.omnirpc.io/", outputDir: "docs/rfq/API", // output directory for generated files sidebarOptions: { // optional, instructs plugin to generate sidebar.js groupPathsBy: "tag", // group sidebar items by operation "tag" @@ -152,6 +153,20 @@ const config: Config = { }; }, }), + () => ({ + name: 'bundle-analyzer', + configureWebpack() { + return { + plugins: [ + codecovWebpackPlugin({ + enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + bundleName: "docs-bridge", + uploadToken: process.env.CODECOV_TOKEN, + }), + ] + }; + } + }), ], }; diff --git a/docs/bridge/package.json b/docs/bridge/package.json index 52f0e24202..67f130f701 100644 --- a/docs/bridge/package.json +++ b/docs/bridge/package.json @@ -1,6 +1,6 @@ { "name": "@synapsecns/bridge-docs", - "version": "0.1.4", + "version": "0.1.6", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -19,6 +19,7 @@ "typecheck": "tsc" }, "dependencies": { + "@codecov/webpack-plugin": "^0.0.1-beta.10", "@docusaurus/core": "3.1.1", "@docusaurus/logger": "3.1.1", "@docusaurus/plugin-content-docs": "3.1.1", diff --git a/ethergo/backends/anvil/anvil.go b/ethergo/backends/anvil/anvil.go index 9c95d15da9..2f631bedec 100644 --- a/ethergo/backends/anvil/anvil.go +++ b/ethergo/backends/anvil/anvil.go @@ -80,8 +80,10 @@ func NewAnvilBackend(ctx context.Context, t *testing.T, args *OptionBuilder) *Ba runOptions := &dockertest.RunOptions{ Repository: "ghcr.io/foundry-rs/foundry", - Tag: "nightly-deb3116955eea4333f9e4e4516104be4182e9ee2", - Cmd: []string{strings.Join(append([]string{"anvil"}, commandArgs...), " ")}, + Tag: "nightly-1bac1b3d79243cea755800bf396c30a3d74741bf", + Platform: "linux/amd64", + + Cmd: []string{strings.Join(append([]string{"anvil"}, commandArgs...), " ")}, Labels: map[string]string{ "test-id": uuid.New().String(), }, diff --git a/ethergo/chaindata/chaindata.go b/ethergo/chaindata/chaindata.go index 5b9a2f791a..0fab04a166 100644 --- a/ethergo/chaindata/chaindata.go +++ b/ethergo/chaindata/chaindata.go @@ -164,6 +164,17 @@ var ChainMetadataList = []ChainMetadata{ }, } +// ChainNameToChainID converts the chain name to the chain id. +// It returns 0 if the chain name is not found. +func ChainNameToChainID(chainName string) uint64 { + for _, chainMetadata := range ChainMetadataList { + if strings.EqualFold(chainMetadata.ChainName, chainName) { + return uint64(chainMetadata.ChainID) + } + } + return 0 +} + // ChainIDToChainName converts the chain id to the chain name. func ChainIDToChainName(chainID int64, isUpper bool) string { for _, chainMetadata := range ChainMetadataList { diff --git a/ethergo/client/capture_client.go b/ethergo/client/capture_client.go index 6fd2c5010b..9c484bdb35 100644 --- a/ethergo/client/capture_client.go +++ b/ethergo/client/capture_client.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/lmittmann/w3" "github.com/synapsecns/sanguine/core/metrics" - "github.com/synapsecns/sanguine/core/metrics/instrumentation" + "github.com/synapsecns/sanguine/core/metrics/instrumentation/httpcapture" "net/http" ) @@ -22,7 +22,7 @@ func newCaptureClient(ctx context.Context, url string, handler metrics.Handler, client := new(http.Client) if capture { - client.Transport = instrumentation.NewCaptureTransport(client.Transport, handler) + client.Transport = httpcapture.NewCaptureTransport(client.Transport, handler) } c, err := metrics.RPCClient(ctx, handler, url, client) if err != nil { diff --git a/ethergo/client/client_test.go b/ethergo/client/client_test.go index cdd94e98e8..0b3b374fd9 100644 --- a/ethergo/client/client_test.go +++ b/ethergo/client/client_test.go @@ -9,12 +9,10 @@ import ( "github.com/lmittmann/w3/w3types" . "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/core/metrics" - "github.com/synapsecns/sanguine/core/metrics/instrumentation" + "github.com/synapsecns/sanguine/core/metrics/instrumentation/httpcapture" "github.com/synapsecns/sanguine/ethergo/client" "github.com/synapsecns/sanguine/ethergo/mocks" "github.com/synapsecns/sanguine/ethergo/parser/rpc" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/trace/tracetest" _ "go.opentelemetry.io/otel/sdk/trace/tracetest" "io" "math/big" @@ -81,7 +79,7 @@ func (c *ClientSuite) checkRequest(makeReq func(client TestEVM)) { <-doneChan spans := mockTracer.GetSpansByName(rpcRequest.Method()) - requestSpans := mockTracer.GetSpansByName(instrumentation.RequestSpanName) + requestSpans := mockTracer.GetSpansByName(httpcapture.RequestSpanName) // make sure we got at most 1 span c.Require().Equal(len(spans), 1, "expected 1 span, got %d", len(spans)) span := spans[0] @@ -90,36 +88,9 @@ func (c *ClientSuite) checkRequest(makeReq func(client TestEVM)) { requestSpan := requestSpans[0] // make sure the span has an exception - c.Require().True(spanHasException(span), "expected exception event, got none") - Equal(c.T(), spanAttributeByName(span, "endpoint").AsString(), server.URL) - Equal(c.T(), spanEventByName(requestSpan, instrumentation.RequestEventName).AsString(), string(body)) -} - -func spanEventByName(stub tracetest.SpanStub, name string) *attribute.Value { - for _, event := range stub.Events { - if event.Name == name { - return &event.Attributes[0].Value - } - } - return nil -} - -func spanAttributeByName(stub tracetest.SpanStub, name string) *attribute.Value { - for _, attr := range stub.Attributes { - if attr.Key == attribute.Key(name) { - return &attr.Value - } - } - return nil -} - -func spanHasException(stub tracetest.SpanStub) bool { - for _, event := range stub.Events { - if event.Name == "exception" { - return true - } - } - return false + c.Require().True(metrics.SpanHasException(span), "expected exception event, got none") + Equal(c.T(), metrics.SpanAttributeByName(span, "endpoint").AsString(), server.URL) + Equal(c.T(), metrics.SpanEventByName(requestSpan, httpcapture.RequestEventName).AsString(), string(body)) } // Test parsing. diff --git a/ethergo/go.mod b/ethergo/go.mod index a603d4dd08..28211cd6fa 100644 --- a/ethergo/go.mod +++ b/ethergo/go.mod @@ -24,7 +24,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/dgraph-io/ristretto v0.1.0 github.com/ethereum/go-ethereum v1.13.8 - github.com/goccy/go-json v0.10.2 + github.com/goccy/go-json v0.10.3 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/googleapis/gax-go/v2 v2.12.4 @@ -34,7 +34,7 @@ require ( github.com/integralist/go-findroot v0.0.0-20160518114804-ac90681525dc github.com/invopop/jsonschema v0.7.0 github.com/ipfs/go-log v1.0.5 - github.com/jarcoal/httpmock v1.2.0 + github.com/jarcoal/httpmock v1.3.1 github.com/jftuga/ellipsis v1.0.0 github.com/jpillora/backoff v1.0.0 github.com/libp2p/go-libp2p v0.33.0 @@ -56,17 +56,17 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 github.com/urfave/cli/v2 v2.27.2 github.com/viant/toolbox v0.24.0 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/metric v1.27.0 - go.opentelemetry.io/otel/sdk v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 golang.org/x/sync v0.7.0 golang.org/x/time v0.5.0 google.golang.org/api v0.183.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/mysql v1.5.6 @@ -85,8 +85,8 @@ require ( cloud.google.com/go/longrunning v0.5.7 // indirect dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect - github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect @@ -164,7 +164,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/flock v0.12.0 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/glog v1.2.0 // indirect @@ -174,7 +174,7 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go v1.1.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect @@ -198,7 +198,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -261,27 +261,27 @@ require ( go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.24.0 // indirect - golang.org/x/mod v0.18.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.64.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/ethergo/go.sum b/ethergo/go.sum index 6b0d66ec1f..69727a3305 100644 --- a/ethergo/go.sum +++ b/ethergo/go.sum @@ -73,8 +73,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN 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/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= @@ -88,10 +88,6 @@ github.com/Flaque/filet v0.0.0-20201012163910-45f684403088/go.mod h1:TK+jB3mBs+8 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 h1:ClzzXMDDuUbWfNNZqGeYq4PnYOlwlOVIvSyNaIy0ykg= github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3/go.mod h1:we0YA5CsBbH5+/NUzC/AlMmxaDtWlXeNsqrwXjTzmzA= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:sg9CWNOhr58hMGmJ0q7x7jQ/B1RK/GyHNmeaYCJos9M= -github.com/LK4D4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:uHbOgfPowb74TKlV4AR5Az2haG6evxzM8Lmj1Xil25E= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 h1:mD+/7fgGmTO9w3g8xYfovo7GBSkyjkmQiacVj9VPx+0= -github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54/go.mod h1:sAFuaugbNEiH1k50YhFNuD2+Gwga8oetKMT2RSFpglU= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -452,12 +448,12 @@ github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22 github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.0 h1:xHW8t8GPAiGtqz7KxiSqfOEXwpOaqhpYZrTE2MQBgXY= +github.com/gofrs/flock v0.12.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= 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= @@ -565,8 +561,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 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.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= @@ -647,8 +643,8 @@ github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrO github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= 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/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= -github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk= +github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= +github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= @@ -694,8 +690,8 @@ github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -770,8 +766,8 @@ github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW 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/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/maxatome/go-testdeep v1.11.0 h1:Tgh5efyCYyJFGUYiT0qxBSIDeXw0F5zSoatlou685kk= -github.com/maxatome/go-testdeep v1.11.0/go.mod h1:011SgQ6efzZYAen6fDn4BqQ+lUR72ysdyKe7Dyogw70= +github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miguelmota/go-ethereum-hdwallet v0.1.1 h1:zdXGlHao7idpCBjEGTXThVAtMKs+IxAgivZ75xqkWK0= @@ -1092,36 +1088,36 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.4 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= go.opentelemetry.io/otel/log v0.3.0 h1:kJRFkpUFYtny37NQzL386WbznUByZx186DpEMKhEGZs= go.opentelemetry.io/otel/log v0.3.0/go.mod h1:ziCwqZr9soYDwGNbIL+6kAvQC+ANvjgG367HVcyR/ys= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1213,8 +1209,8 @@ 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/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/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= @@ -1556,10 +1552,10 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20240528184218-531527333157 h1:u7WMYrIrVvs0TF5yaKwKNbcJyySYf+HAIFXxWltJOXE= google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1594,8 +1590,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= diff --git a/ethergo/listener/listener.go b/ethergo/listener/listener.go index 63cef6e48e..25ed10d1d0 100644 --- a/ethergo/listener/listener.go +++ b/ethergo/listener/listener.go @@ -51,6 +51,8 @@ type chainListener struct { newBlockHandler NewBlockHandler finalityMode rpc.BlockNumber blockWait uint64 + // otelRecorder is the recorder for the otel metrics. + otelRecorder iOtelRecorder } var ( @@ -77,6 +79,12 @@ func NewChainListener(omnirpcClient client.EVM, store listenerDB.ChainListenerDB option(c) } + var err error + c.otelRecorder, err = newOtelRecorder(handler, int(c.chainID)) + if err != nil { + return nil, fmt.Errorf("could not create otel recorder: %w", err) + } + return c, nil } @@ -183,6 +191,7 @@ func (c *chainListener) doPoll(parentCtx context.Context, handler HandleLog) (er if err != nil { return fmt.Errorf("could not put latest block: %w", err) } + c.otelRecorder.RecordLastBlock(endBlock) c.startBlock = lastUnconfirmedBlock return nil diff --git a/ethergo/listener/options.go b/ethergo/listener/options.go index b8032e0ec1..8511d9eb0c 100644 --- a/ethergo/listener/options.go +++ b/ethergo/listener/options.go @@ -39,7 +39,7 @@ func WithFinalityMode(mode string) Option { case "finalized": c.finalityMode = rpc.FinalizedBlockNumber default: - c.finalityMode = rpc.SafeBlockNumber + c.finalityMode = rpc.LatestBlockNumber } } } diff --git a/ethergo/listener/otel.go b/ethergo/listener/otel.go new file mode 100644 index 0000000000..d308b466cd --- /dev/null +++ b/ethergo/listener/otel.go @@ -0,0 +1,118 @@ +package listener + +import ( + "context" + "fmt" + "time" + + "github.com/synapsecns/sanguine/core/metrics" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" +) + +const meterName = "github.com/synapsecns/sanguine/ethergo/listener" + +// generate an interface for otelRecorder that exports the public method. +// this allows us to avoid using recordX externally anad makes the package less confusing. +// +// ============================================================================= +// ============================================================================= +// IMPORTANT: DO NOT REMOVE THIS COMMENT. +// NOTICE: PLEASE MAKE SURE YOU UPDATE BOTH THE DOCS AND THE GRAFANA DASHBOARD (IF NEEDED) AFTER UPDATING METRICS. +// ============================================================================= +// ============================================================================= +// +//go:generate go run github.com/vburenin/ifacemaker -f otel.go -s otelRecorder -i iOtelRecorder -p listener -o otel_generated.go -c "autogenerated file" +type otelRecorder struct { + metrics metrics.Handler + // meter is the metrics meter. + meter metric.Meter + // lastBlockGauge is the gauge for the last block. + lastBlockGauge metric.Int64ObservableGauge + // lastFetchedBlockAgeGauge is the gauge for the last block age. + lastFetchedBlockAgeGauge metric.Float64ObservableGauge + // lastBlock is the last block processed by the listener. + lastBlock *uint64 + // lastBlockFetchTime is the time the last block was fetched (used to calculate last block age). + lastBlockFetchTime *time.Time + // chainID is the chain ID for the listener. + chainID int +} + +func newOtelRecorder(meterHandler metrics.Handler, chainID int) (_ iOtelRecorder, err error) { + or := otelRecorder{ + metrics: meterHandler, + meter: meterHandler.Meter(meterName), + lastBlock: nil, + lastBlockFetchTime: nil, + chainID: chainID, + } + + or.lastBlockGauge, err = or.meter.Int64ObservableGauge("last_block") + if err != nil { + return nil, fmt.Errorf("could not create last block gauge") + } + + or.lastFetchedBlockAgeGauge, err = or.meter.Float64ObservableGauge("last_block_age") + if err != nil { + return nil, fmt.Errorf("could not create last block age gauge") + } + + _, err = or.meter.RegisterCallback(or.recordLastBlock, or.lastBlockGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for last block gauge") + } + + _, err = or.meter.RegisterCallback(or.recordLastFetchedBlockAge, or.lastFetchedBlockAgeGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for last block age gauge") + } + + return &or, nil +} + +func (o *otelRecorder) recordLastBlock(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.lastBlockGauge == nil || o.lastBlock == nil { + return nil + } + + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, o.chainID), + ) + observer.ObserveInt64(o.lastBlockGauge, int64(*o.lastBlock), opts) + + return nil +} + +func (o *otelRecorder) recordLastFetchedBlockAge(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.lastFetchedBlockAgeGauge == nil || o.lastBlockFetchTime == nil { + return nil + } + + age := time.Since(*o.lastBlockFetchTime).Seconds() + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, o.chainID), + ) + observer.ObserveFloat64(o.lastFetchedBlockAgeGauge, age, opts) + + return nil +} + +// RecordLastBlock records the last block processed by the listener. +func (o *otelRecorder) RecordLastBlock(lastBlock uint64) { + // verify if the last block has changed + var hasChanged bool + if o.lastBlock == nil { + hasChanged = true + } else { + hasChanged = *o.lastBlock != lastBlock + } + if !hasChanged { + return + } + + // record the block + o.lastBlock = &lastBlock + fetchTime := time.Now() + o.lastBlockFetchTime = &fetchTime +} diff --git a/ethergo/listener/otel_generated.go b/ethergo/listener/otel_generated.go new file mode 100644 index 0000000000..2da743e466 --- /dev/null +++ b/ethergo/listener/otel_generated.go @@ -0,0 +1,9 @@ +// autogenerated file + +package listener + +// iOtelRecorder ... +type iOtelRecorder interface { + // RecordLastBlock records the last block processed by the listener. + RecordLastBlock(lastBlock uint64) +} diff --git a/ethergo/signer/wallet/import.go b/ethergo/signer/wallet/import.go index d872adad13..3488506ada 100644 --- a/ethergo/signer/wallet/import.go +++ b/ethergo/signer/wallet/import.go @@ -58,6 +58,11 @@ func FromKeyFile(keyFile string) (Wallet, error) { // FromHex gets the wallet from the private key. func FromHex(privateKey string) (Wallet, error) { + // Check for '0x' prefix and remove it if it exists + if len(privateKey) >= 2 && strings.EqualFold(privateKey[:2], "0x") { + privateKey = privateKey[2:] + } + privKey, err := crypto.HexToECDSA(privateKey) if err != nil { return nil, fmt.Errorf("could not decode key: %w", err) diff --git a/ethergo/submitter/README.md b/ethergo/submitter/README.md index 5367fce60c..93a110a48e 100644 --- a/ethergo/submitter/README.md +++ b/ethergo/submitter/README.md @@ -53,3 +53,7 @@ You'll now notice that there are two failure cases for this method: if either th + +## Grafana Dashboard + +The submitter exposes a number of metrics that can be used to monitor the health of the submitter. You can find the dashboard at [dashboard.json](dashboard.json). diff --git a/ethergo/submitter/chain_queue.go b/ethergo/submitter/chain_queue.go index b3a0c98793..635c061bb5 100644 --- a/ethergo/submitter/chain_queue.go +++ b/ethergo/submitter/chain_queue.go @@ -3,6 +3,7 @@ package submitter import ( "context" "fmt" + "github.com/ethereum/go-ethereum/params" "math/big" "sort" "sync" @@ -19,7 +20,6 @@ import ( "github.com/synapsecns/sanguine/ethergo/client" "github.com/synapsecns/sanguine/ethergo/submitter/db" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" ) @@ -63,7 +63,11 @@ func (t *txSubmitterImpl) chainPendingQueue(parentCtx context.Context, chainID * return fmt.Errorf("could not get nonce: %w", err) } span.SetAttributes(attribute.Int("nonce", int(currentNonce))) - t.currentNonces.Set(uint32(chainID.Int64()), currentNonce) + + // record metrics for txes. + t.otelRecorder.RecordNonceForChain(uint32(chainID.Int64()), currentNonce) + t.otelRecorder.RecordNumPendingTxes(uint32(chainID.Int64()), calculatePendingTxes(txes, currentNonce)) + t.otelRecorder.RecordOldestPendingTx(uint32(chainID.Int64()), time.Since(fetchOldestPendingTx(txes, currentNonce))) wg := &sync.WaitGroup{} @@ -84,7 +88,9 @@ func (t *txSubmitterImpl) chainPendingQueue(parentCtx context.Context, chainID * if err != nil { return fmt.Errorf("could not get gas balance: %w", err) } + t.otelRecorder.RecordGasBalanceForChain(uint32(chainID.Int64()), core.CopyBigInt(gasBalance)) span.SetAttributes(attribute.String("gas_balance", gasBalance.String())) + for i := range txes { tx := txes[i] @@ -119,7 +125,6 @@ func (t *txSubmitterImpl) chainPendingQueue(parentCtx context.Context, chainID * logger.Errorf("could not update old tx statuses: %v", updateErr) } }() - wg.Wait() sort.Slice(cq.reprocessQueue, func(i, j int) bool { @@ -133,44 +138,17 @@ func (t *txSubmitterImpl) chainPendingQueue(parentCtx context.Context, chainID * } cq.storeAndSubmit(ctx, calls, span) - t.numPendingTxes.Set(uint32(chainID.Int64()), len(cq.reprocessQueue)) return nil } -func (t *txSubmitterImpl) recordNumPending(_ context.Context, observer metric.Observer) (err error) { - if t.metrics == nil || t.numPendingGauge == nil || t.numPendingTxes == nil { - return nil - } +func toFloat(wei *big.Int) float64 { + // Convert wei to float64 + weiFloat := new(big.Float).SetInt(wei) + weiAsFloat64, _ := weiFloat.Float64() - t.numPendingTxes.Range(func(chainID uint32, numPending int) bool { - opts := metric.WithAttributes( - attribute.Int(metrics.ChainID, int(chainID)), - attribute.String("wallet", t.signer.Address().Hex()), - ) - observer.ObserveInt64(t.numPendingGauge, int64(numPending), opts) - - return true - }) - - return nil -} - -func (t *txSubmitterImpl) recordNonces(_ context.Context, observer metric.Observer) (err error) { - if t.metrics == nil || t.nonceGauge == nil || t.currentNonces == nil { - return nil - } - - t.currentNonces.Range(func(chainID uint32, nonce uint64) bool { - opts := metric.WithAttributes( - attribute.Int(metrics.ChainID, int(chainID)), - attribute.String("wallet", t.signer.Address().Hex()), - ) - observer.ObserveInt64(t.nonceGauge, int64(nonce), opts) - return true - }) - - return nil + // Perform the division to convert wei to ether + return weiAsFloat64 / params.Ether } // storeAndSubmit stores the txes in the database and submits them to the chain. diff --git a/ethergo/submitter/dashboard.json b/ethergo/submitter/dashboard.json new file mode 100644 index 0000000000..48911e8aa9 --- /dev/null +++ b/ethergo/submitter/dashboard.json @@ -0,0 +1,639 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.1.2" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 9, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "This is the submitter dashboard. It is used to track metrics common to submitter. \n\nIf you update this dashboard please be sure to update the [docs](https://bridge-docs-theta.vercel.app/docs/Services/Submitter) at `docs/bridge/` and the dashboard folder in `ethergo/submitter/dashboard.json`", + "mode": "markdown" + }, + "pluginVersion": "10.1.2", + "title": "Submitter Dashboard", + "type": "text" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 8, + "panels": [], + "title": "Submitter", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "max by(chain_id) (num_pending_txes{wallet=\"$wallet\"})", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Pending Transactions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "max by(chain_id) (current_nonce{wallet=\"$wallet\"})", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Nonce", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "symlog" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 12 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "max by(chain_id) (oldest_pending_tx_seconds{wallet=\"$wallet\"})", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Oldest Pending TX", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "symlog" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "max by(chain_id) (confirmed_queue{wallet=\"$wallet\"})", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Confirmed Queue Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "symlog" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "max by(chain_id) (gas_balance{wallet=\"$wallet\"})", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Gas Balance Per Chain", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(num_pending_txes,wallet)", + "hide": 0, + "includeAll": false, + "label": "Wallet", + "multi": false, + "name": "wallet", + "options": [], + "query": { + "query": "label_values(num_pending_txes,wallet)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-12h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Submitter", + "uid": "b9ac906d-0210-4808-92ff-1430ae7199fb", + "version": 4, + "weekStart": "" +} diff --git a/ethergo/submitter/db/mocks/service.go b/ethergo/submitter/db/mocks/service.go index c489c8c754..30e2527588 100644 --- a/ethergo/submitter/db/mocks/service.go +++ b/ethergo/submitter/db/mocks/service.go @@ -115,6 +115,29 @@ func (_m *Service) GetChainIDsByStatus(ctx context.Context, fromAddress common.A return r0, r1 } +// GetDistinctChainIDs provides a mock function with given fields: ctx +func (_m *Service) GetDistinctChainIDs(ctx context.Context) ([]*big.Int, error) { + ret := _m.Called(ctx) + + var r0 []*big.Int + if rf, ok := ret.Get(0).(func(context.Context) []*big.Int); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*big.Int) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetNonceAttemptsByStatus provides a mock function with given fields: ctx, fromAddress, chainID, nonce, matchStatuses func (_m *Service) GetNonceAttemptsByStatus(ctx context.Context, fromAddress common.Address, chainID *big.Int, nonce uint64, matchStatuses ...db.Status) ([]db.TX, error) { _va := make([]interface{}, len(matchStatuses)) diff --git a/ethergo/submitter/db/service.go b/ethergo/submitter/db/service.go index 103b885f1f..ad2bbd78d2 100644 --- a/ethergo/submitter/db/service.go +++ b/ethergo/submitter/db/service.go @@ -40,11 +40,18 @@ type Service interface { GetChainIDsByStatus(ctx context.Context, fromAddress common.Address, matchStatuses ...Status) (chainIDs []*big.Int, err error) // DeleteTXS deletes txs that are older than a given duration. DeleteTXS(ctx context.Context, maxAge time.Duration, matchStatuses ...Status) error + // GetDistinctChainIDs gets the distinct chain ids for all txs. + GetDistinctChainIDs(ctx context.Context) ([]*big.Int, error) } // TransactionFunc is a function that can be passed to DBTransaction. type TransactionFunc func(ctx context.Context, svc Service) error +// SubmitterDBFactory is the interface for the tx queue database factory. +type SubmitterDBFactory interface { + SubmitterDB() Service +} + // Status is the status of a tx. // //go:generate go run golang.org/x/tools/cmd/stringer -type=Status -linecomment diff --git a/ethergo/submitter/db/txdb/store.go b/ethergo/submitter/db/txdb/store.go index 295a00b70f..06fb999a45 100644 --- a/ethergo/submitter/db/txdb/store.go +++ b/ethergo/submitter/db/txdb/store.go @@ -100,6 +100,26 @@ func convertTXS(ethTxes []ETHTX) (txs []db.TX, err error) { return txs, nil } +// GetDistinctChainIDs gets a list of all chains that have been used. +func (s *Store) GetDistinctChainIDs(ctx context.Context) ([]*big.Int, error) { + var chainIDs []string + err := s.db.WithContext(ctx). + Model(ÐTX{}). + Distinct(chainIDFieldName). + Pluck(chainIDFieldName, &chainIDs).Error + if err != nil { + return nil, err + } + + var result []*big.Int + for _, chainIDStr := range chainIDs { + chainID := new(big.Int) + chainID.SetString(chainIDStr, 10) + result = append(result, chainID) + } + return result, nil +} + // GetTXS returns all transactions for a given address on a given (or any) chain id that match a given status. // there is a limit of 50 transactions per chain id. The limit does not make any guarantees about the number of nonces per chain. // the submitter will get only the most recent tx submitted for each chain so this can be used for gas pricing. diff --git a/ethergo/submitter/db_test.go b/ethergo/submitter/db_test.go index 61b4b7ec51..8f402d96ac 100644 --- a/ethergo/submitter/db_test.go +++ b/ethergo/submitter/db_test.go @@ -50,6 +50,11 @@ func (t *TXSubmitterDBSuite) TestGetNonceForChainID() { } } } + + distinctChains, err := testDB.GetDistinctChainIDs(t.GetTestContext()) + t.Require().NoError(err) + + t.Require().Equal(len(t.testBackends), len(distinctChains)) }) } diff --git a/ethergo/submitter/export_test.go b/ethergo/submitter/export_test.go index e04dd69fbc..3eb3d476ce 100644 --- a/ethergo/submitter/export_test.go +++ b/ethergo/submitter/export_test.go @@ -39,8 +39,8 @@ func TxToAttributes(transaction *types.Transaction, UUID string) []attribute.Key } // SortTxes exports sortTxesByChainID for testing. -func SortTxes(txs []db.TX) map[uint64][]db.TX { - return sortTxesByChainID(txs) +func SortTxes(txs []db.TX, maxPerChain int) map[uint64][]db.TX { + return sortTxesByChainID(txs, maxPerChain) } // GroupTxesByNonce exports groupTxesByNonce for testing. @@ -114,3 +114,13 @@ func (t *txSubmitterImpl) GetNonce(parentCtx context.Context, chainID *big.Int, func (t *txSubmitterImpl) CheckAndSetConfirmation(ctx context.Context, chainClient client.EVM, txes []db.TX) error { return t.checkAndSetConfirmation(ctx, chainClient, txes) } + +// Outersection exports outersection for testing. +func Outersection(set, superset []*big.Int) []*big.Int { + return outersection(set, superset) +} + +// MapToBigIntSlice exports mapToBigIntSlice for testing. +func MapToBigIntSlice[T any](m map[uint64]T) []*big.Int { + return mapToBigIntSlice(m) +} diff --git a/ethergo/submitter/metrics.go b/ethergo/submitter/metrics.go new file mode 100644 index 0000000000..4131ae1870 --- /dev/null +++ b/ethergo/submitter/metrics.go @@ -0,0 +1,280 @@ +package submitter + +import ( + "context" + "fmt" + "github.com/cornelk/hashmap" + "github.com/synapsecns/sanguine/core/metrics" + "github.com/synapsecns/sanguine/ethergo/signer/signer" + "github.com/synapsecns/sanguine/ethergo/submitter/db" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "math/big" + "time" +) + +const meterName = "github.com/synapsecns/sanguine/ethergo/submitter" + +// generate an interface for otelRecorder that exports the public method. +// this allows us to avoid using recordX externally anad makes the package less confusing. +// +// ============================================================================= +// ============================================================================= +// IMPORTANT: DO NOT REMOVE THIS COMMENT. +// NOTICE: PLEASE MAKE SURE YOU UPDATE BOTH THE DOCS AND THE GRAFANA DASHBOARD (IF NEEDED) AFTER UPDATING METRICS. +// ============================================================================= +// ============================================================================= +// +//go:generate go run github.com/vburenin/ifacemaker -f metrics.go -s otelRecorder -i iOtelRecorder -p submitter -o metrics_generated.go -c "autogenerated file" +type otelRecorder struct { + metrics metrics.Handler + // meter is the metrics meter. + meter metric.Meter + // confirmedQueueGauge is the gauge for the confirmed queue. + confirmedQueueGauge metric.Int64ObservableGauge + // oldestPendingGauge is the gauge for the oldest pending transaction. + oldestPendingGauge metric.Float64ObservableGauge + // numPendingGauge is the gauge for the number of pending transactions. + numPendingGauge metric.Int64ObservableGauge + // nonceGauge is the gauge for the current nonce. + nonceGauge metric.Int64ObservableGauge + // gasBalanceGauge is the gauge for the gas balance. + gasBalanceGauge metric.Float64ObservableGauge + // numPendingTxes is used for metrics. + // note: numPendingTxes will stop counting at MaxResultsPerChain. + numPendingTxes *hashmap.Map[uint32, int] + // currentNonces is used for metrics. + // chainID -> nonce + currentNonces *hashmap.Map[uint32, uint64] + // currentGasBalance is used for metrics. + // chainID -> balance + currentGasBalances *hashmap.Map[uint32, *big.Int] + // oldestPendingPerChain is the oldest pending transaction. + // chainID -> time + oldestPendingPerChain *hashmap.Map[uint32, time.Duration] + // confirmedQueueCount is the count of the confirmed queue. + confirmedQueueCount *hashmap.Map[uint32, int] + // signer is the signer for signing transactions. + signer signer.Signer +} + +// nolint: cyclop +func newOtelRecorder(meterHandler metrics.Handler, signerT signer.Signer) (_ iOtelRecorder, err error) { + or := otelRecorder{ + metrics: meterHandler, + meter: meterHandler.Meter(meterName), + numPendingTxes: hashmap.New[uint32, int](), + currentNonces: hashmap.New[uint32, uint64](), + currentGasBalances: hashmap.New[uint32, *big.Int](), + oldestPendingPerChain: hashmap.New[uint32, time.Duration](), + confirmedQueueCount: hashmap.New[uint32, int](), + signer: signerT, + } + + or.numPendingGauge, err = or.meter.Int64ObservableGauge("num_pending_txes") + if err != nil { + return nil, fmt.Errorf("could not create num pending txes gauge: %w", err) + } + + _, err = or.meter.RegisterCallback(or.recordNumPending, or.numPendingGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for num pending txes gauge: %w", err) + } + + or.nonceGauge, err = or.meter.Int64ObservableGauge("current_nonce") + if err != nil { + return nil, fmt.Errorf("could not create nonce gauge: %w", err) + } + + _, err = or.meter.RegisterCallback(or.recordNonces, or.nonceGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for nonce gauge: %w", err) + } + + or.gasBalanceGauge, err = or.meter.Float64ObservableGauge("gas_balance") + if err != nil { + return nil, fmt.Errorf("could not create gas balance gauge: %w", err) + } + + _, err = or.meter.RegisterCallback(or.recordBalance, or.gasBalanceGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for gas balance gauge: %w", err) + } + + or.oldestPendingGauge, err = or.meter.Float64ObservableGauge("oldest_pending_tx", metric.WithUnit("s")) + if err != nil { + return nil, fmt.Errorf("could not create oldest pending gauge: %w", err) + } + + _, err = or.meter.RegisterCallback(or.recordOldestPendingTx, or.oldestPendingGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for oldest pending gauge: %w", err) + } + + or.confirmedQueueGauge, err = or.meter.Int64ObservableGauge("confirmed_queue") + if err != nil { + return nil, fmt.Errorf("could not create confirmed queue gauge: %w", err) + } + + _, err = or.meter.RegisterCallback(or.recordConfirmedQueue, or.confirmedQueueGauge) + if err != nil { + return nil, fmt.Errorf("could not register callback for confirmed queue gauge: %w", err) + } + + return &or, nil +} + +func (o *otelRecorder) recordNumPending(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.numPendingGauge == nil || o.numPendingTxes == nil { + return nil + } + + o.numPendingTxes.Range(func(chainID uint32, numPending int) bool { + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, int(chainID)), + attribute.String("wallet", o.signer.Address().Hex()), + ) + observer.ObserveInt64(o.numPendingGauge, int64(numPending), opts) + + return true + }) + + return nil +} + +func (o *otelRecorder) recordNonces(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.nonceGauge == nil || o.currentNonces == nil { + return nil + } + + o.currentNonces.Range(func(chainID uint32, nonce uint64) bool { + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, int(chainID)), + attribute.String("wallet", o.signer.Address().Hex()), + ) + observer.ObserveInt64(o.nonceGauge, int64(nonce), opts) + return true + }) + + return nil +} + +func (o *otelRecorder) recordConfirmedQueue(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.nonceGauge == nil || o.currentNonces == nil { + return nil + } + + o.confirmedQueueCount.Range(func(chainID uint32, queueSize int) bool { + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, int(chainID)), + attribute.String("wallet", o.signer.Address().Hex()), + ) + observer.ObserveInt64(o.confirmedQueueGauge, int64(queueSize), opts) + return true + }) + + return nil +} + +func (o *otelRecorder) recordBalance(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.gasBalanceGauge == nil { + return nil + } + + o.currentGasBalances.Range(func(chainID uint32, gasPrice *big.Int) bool { + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, int(chainID)), + attribute.String("wallet", o.signer.Address().Hex()), + ) + + observer.ObserveFloat64(o.gasBalanceGauge, toFloat(gasPrice), opts) + return true + }) + + return nil +} + +func (o *otelRecorder) recordOldestPendingTx(_ context.Context, observer metric.Observer) (err error) { + if o.metrics == nil || o.oldestPendingGauge == nil { + return nil + } + + o.oldestPendingPerChain.Range(func(chainID uint32, oldestPendingTx time.Duration) bool { + opts := metric.WithAttributes( + attribute.Int(metrics.ChainID, int(chainID)), + attribute.String("wallet", o.signer.Address().Hex()), + ) + observer.ObserveFloat64(o.oldestPendingGauge, oldestPendingTx.Seconds(), opts) + + return true + }) + + return nil +} + +// RecordNonceForChain sets the nonce for a chain. +func (o *otelRecorder) RecordNonceForChain(chainID uint32, nonce uint64) { + o.currentNonces.Set(chainID, nonce) +} + +// RecordGasBalanceForChain sets the gas balance for a chain. +func (o *otelRecorder) RecordGasBalanceForChain(chainID uint32, balance *big.Int) { + o.currentGasBalances.Set(chainID, balance) +} + +// RecordOldestPendingTx sets the oldest pending tx. +func (o *otelRecorder) RecordOldestPendingTx(chainID uint32, lastPending time.Duration) { + o.oldestPendingPerChain.Set(chainID, lastPending) +} + +// RecordNumPendingTxes sets the number of pending txes. +func (o *otelRecorder) RecordNumPendingTxes(chainID uint32, numPending int) { + o.numPendingTxes.Set(chainID, numPending) +} + +// RecordConfirmedQueue sets the confirmed queue count. +func (o *otelRecorder) RecordConfirmedQueue(chainID uint32, queueSize int) { + o.confirmedQueueCount.Set(chainID, queueSize) +} + +// HasNonceForChain checks if a nonce exists for a chain. +func (o *otelRecorder) HasNonceForChain(chainID uint32) bool { + _, ok := o.currentNonces.Get(chainID) + return ok +} + +// HasGasBalanceForChain checks if a gas balance exists for a chain. +func (o *otelRecorder) HasGasBalanceForChain(chainID uint32) bool { + _, ok := o.currentGasBalances.Get(chainID) + return ok +} + +// fetchOldestPendingTx fetches the oldest pending tx in the queue. +func fetchOldestPendingTx(txes []db.TX, nonce uint64) time.Time { + oldestPendingTx := time.Now() + for _, tx := range txes { + if tx.Nonce() >= nonce { + continue + } + + if tx.CreationTime().Before(oldestPendingTx) { + oldestPendingTx = tx.CreationTime() + } + } + + return oldestPendingTx +} + +// calculatePendingTxes calculates the number of pending txes in the queue. +func calculatePendingTxes(txes []db.TX, nonce uint64) int { + realPendingCount := 0 + for _, tx := range txes { + // current nonce is going to be transaction count (nonces are offset by -1 since first nonce is 0) + // so we use equal to here + if tx.Nonce() >= nonce { + realPendingCount++ + } + } + + return realPendingCount +} diff --git a/ethergo/submitter/metrics_generated.go b/ethergo/submitter/metrics_generated.go new file mode 100644 index 0000000000..16ece2837c --- /dev/null +++ b/ethergo/submitter/metrics_generated.go @@ -0,0 +1,26 @@ +// autogenerated file + +package submitter + +import ( + "math/big" + "time" +) + +// iOtelRecorder ... +type iOtelRecorder interface { + // RecordNonceForChain sets the nonce for a chain. + RecordNonceForChain(chainID uint32, nonce uint64) + // RecordGasBalanceForChain sets the gas balance for a chain. + RecordGasBalanceForChain(chainID uint32, balance *big.Int) + // RecordOldestPendingTx sets the oldest pending tx. + RecordOldestPendingTx(chainID uint32, lastPending time.Duration) + // RecordNumPendingTxes sets the number of pending txes. + RecordNumPendingTxes(chainID uint32, numPending int) + // RecordConfirmedQueue sets the confirmed queue count. + RecordConfirmedQueue(chainID uint32, queueSize int) + // HasNonceForChain checks if a nonce exists for a chain. + HasNonceForChain(chainID uint32) bool + // HasGasBalanceForChain checks if a gas balance exists for a chain. + HasGasBalanceForChain(chainID uint32) bool +} diff --git a/ethergo/submitter/queue.go b/ethergo/submitter/queue.go index 7cfc46f243..2e271fe9fb 100644 --- a/ethergo/submitter/queue.go +++ b/ethergo/submitter/queue.go @@ -66,6 +66,10 @@ func (t *txSubmitterImpl) processQueue(parentCtx context.Context) (err error) { return fmt.Errorf("could not get pendingChainIDs: %w", err) } + t.distinctChainIDMux.RLock() + noOpChainIDs := outersection(pendingChainIDs, t.distinctChainIDs) + t.distinctChainIDMux.RUnlock() + pendingChainIDs64 := make([]int64, len(pendingChainIDs)) for i, chainID := range pendingChainIDs { pendingChainIDs64[i] = chainID.Int64() @@ -94,11 +98,55 @@ func (t *txSubmitterImpl) processQueue(parentCtx context.Context) (err error) { } }(chainID) } + + for _, chainID := range noOpChainIDs { + t.otelRecorder.RecordOldestPendingTx(uint32(chainID.Int64()), 0) + t.otelRecorder.RecordNumPendingTxes(uint32(chainID.Int64()), 0) + + if !t.otelRecorder.HasNonceForChain(uint32(chainID.Int64())) { + wg.Add(1) + go func() { + defer wg.Done() + evmClient, err := t.fetcher.GetClient(ctx, chainID) + if err != nil { + logger.Warn("could not get client", "error", err) + return + } + nonce, err := evmClient.NonceAt(ctx, t.signer.Address(), nil) + if err != nil { + logger.Warn("could not get nonce", "error", err) + return + } + t.otelRecorder.RecordNonceForChain(uint32(chainID.Int64()), nonce) + }() + } + + if !t.otelRecorder.HasGasBalanceForChain(uint32(chainID.Int64())) { + wg.Add(1) + go func() { + defer wg.Done() + evmClient, err := t.fetcher.GetClient(ctx, chainID) + if err != nil { + logger.Warn("could not get client", "error", err) + return + } + balance, err := evmClient.BalanceAt(ctx, t.signer.Address(), nil) + if err != nil { + logger.Warn("could not get balance", "error", err) + return + } + t.otelRecorder.RecordGasBalanceForChain(uint32(chainID.Int64()), balance) + }() + } + } + wg.Wait() return nil } +const maxTxesPerChain = 100 + func (t *txSubmitterImpl) processConfirmedQueue(parentCtx context.Context) (err error) { ctx, span := t.metrics.Tracer().Start(parentCtx, "submitter.processConfirmedQueue") defer func() { @@ -110,7 +158,11 @@ func (t *txSubmitterImpl) processConfirmedQueue(parentCtx context.Context) (err return fmt.Errorf("could not get txs: %w", err) } - sortedTXsByChainID := sortTxesByChainID(txs) + sortedTXsByChainID := sortTxesByChainID(txs, maxTxesPerChain) + + t.distinctChainIDMux.RLock() + noOpChainIDs := outersection(mapToBigIntSlice(sortedTXsByChainID), t.distinctChainIDs) + t.distinctChainIDMux.RUnlock() var wg sync.WaitGroup wg.Add(len(sortedTXsByChainID)) @@ -126,6 +178,10 @@ func (t *txSubmitterImpl) processConfirmedQueue(parentCtx context.Context) (err }(chainID) } + for _, chainID := range noOpChainIDs { + t.otelRecorder.RecordConfirmedQueue(uint32(chainID.Int64()), 0) + } + wg.Wait() return nil } @@ -136,6 +192,8 @@ func (t *txSubmitterImpl) chainConfirmQueue(parentCtx context.Context, chainID * metrics.EndSpanWithErr(span, err) }() + t.otelRecorder.RecordConfirmedQueue(uint32(chainID.Int64()), len(txes)) + // chainClient is the client for the chain we're working on chainClient, err := t.fetcher.GetClient(ctx, chainID) if err != nil { diff --git a/ethergo/submitter/submitter.go b/ethergo/submitter/submitter.go index 8d2cd95028..2d0a781688 100644 --- a/ethergo/submitter/submitter.go +++ b/ethergo/submitter/submitter.go @@ -11,8 +11,6 @@ import ( "sync" "time" - "github.com/cornelk/hashmap" - "github.com/google/uuid" "github.com/puzpuzpuz/xsync/v2" @@ -32,15 +30,12 @@ import ( "github.com/synapsecns/sanguine/ethergo/submitter/db" "github.com/synapsecns/sanguine/ethergo/util" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" "golang.org/x/sync/errgroup" ) var logger = log.Logger("ethergo-submitter") -const meterName = "github.com/synapsecns/sanguine/services/rfq/api/rest" - // TransactionSubmitter is the interface for submitting transactions to the chain. type TransactionSubmitter interface { // Start starts the transaction submitter. @@ -51,12 +46,15 @@ type TransactionSubmitter interface { SubmitTransaction(ctx context.Context, chainID *big.Int, call ContractCallType) (nonce uint64, err error) // GetSubmissionStatus returns the status of a transaction and any metadata associated with it if it is complete. GetSubmissionStatus(ctx context.Context, chainID *big.Int, nonce uint64) (status SubmissionStatus, err error) + // Address returns the address of the signer. + Address() common.Address + // Started returns whether the submitter is running. + Started() bool } // txSubmitterImpl is the implementation of the transaction submitter. type txSubmitterImpl struct { metrics metrics.Handler - meter metric.Meter // signer is the signer for signing transactions. signer signer.Signer // nonceMux is the mutex for the nonces. It is keyed by chain. @@ -69,6 +67,8 @@ type txSubmitterImpl struct { db db.Service // retryOnce is used to return 0 on the first call to GetRetryInterval. retryOnce sync.Once + // distinctOnce is used to return 0 on the first call to GetDistinctInterval. + distinctOnce sync.Once // retryNow is used to trigger a retry immediately. // it circumvents the retry interval. // to prevent memory leaks, this has a buffer of 1. @@ -78,14 +78,17 @@ type txSubmitterImpl struct { lastGasBlockCache *xsync.MapOf[int, *types.Header] // config is the config for the transaction submitter. config config.IConfig - // numPendingGauge is the gauge for the number of pending transactions. - numPendingGauge metric.Int64ObservableGauge - // nonceGauge is the gauge for the current nonce. - nonceGauge metric.Int64ObservableGauge - // numPendingTxes is used for metrics. - numPendingTxes *hashmap.Map[uint32, int] - // currentNonces is used for metrics. - currentNonces *hashmap.Map[uint32, uint64] + // otelRecorder is the recorder for the otel metrics. + otelRecorder iOtelRecorder + // distinctChainIDMux is the mutex for the distinct chain ids. + distinctChainIDMux sync.RWMutex + // distinctChainIDs is the distinct chain ids for the transaction submitter. + // note: this map should not be appended to! + distinctChainIDs []*big.Int + // started indicates whether the submitter has started. + started bool + // startMux is the mutex for started. + startMux sync.RWMutex } // ClientFetcher is the interface for fetching a chain client. @@ -97,23 +100,26 @@ type ClientFetcher interface { // NewTransactionSubmitter creates a new transaction submitter. func NewTransactionSubmitter(metrics metrics.Handler, signer signer.Signer, fetcher ClientFetcher, db db.Service, config config.IConfig) TransactionSubmitter { - return &txSubmitterImpl{ db: db, config: config, metrics: metrics, - meter: metrics.Meter(meterName), signer: signer, fetcher: fetcher, nonceMux: mapmutex.NewStringerMapMutex(), statusMux: mapmutex.NewStringMapMutex(), retryNow: make(chan bool, 1), lastGasBlockCache: xsync.NewIntegerMapOf[int, *types.Header](), - numPendingTxes: hashmap.New[uint32, int](), - currentNonces: hashmap.New[uint32, uint64](), } } +// Started returns whether the submitter is running. +func (t *txSubmitterImpl) Started() bool { + t.startMux.RLock() + defer t.startMux.RUnlock() + return t.started +} + // GetRetryInterval returns the retry interval for the transaction submitter. func (t *txSubmitterImpl) GetRetryInterval() time.Duration { retryInterval := time.Second * 2 @@ -123,10 +129,42 @@ func (t *txSubmitterImpl) GetRetryInterval() time.Duration { return retryInterval } +// GetDistinctInterval returns the interval at which distinct chain ids should be queried. +// this is used for metric updates. +func (t *txSubmitterImpl) GetDistinctInterval() time.Duration { + retryInterval := time.Minute + t.distinctOnce.Do(func() { + retryInterval = time.Duration(0) + }) + return retryInterval +} + +// attemptMarkStarted attempts to mark the submitter as started. +// if the submitter is already started, an error is returned. +func (t *txSubmitterImpl) attemptMarkStarted() error { + t.startMux.Lock() + defer t.startMux.Unlock() + if t.started { + return ErrSubmitterAlreadyStarted + } + t.started = true + return nil +} + +// ErrSubmitterAlreadyStarted is the error for when the submitter is already started. +var ErrSubmitterAlreadyStarted = errors.New("submitter already started") + +// Start starts the transaction submitter. +// nolint: cyclop func (t *txSubmitterImpl) Start(parentCtx context.Context) (err error) { - err = t.setupMetrics() + err = t.attemptMarkStarted() + if err != nil { + return err + } + + t.otelRecorder, err = newOtelRecorder(t.metrics, t.signer) if err != nil { - return fmt.Errorf("could not setup metrics: %w", err) + return fmt.Errorf("could not create otel recorder: %w", err) } // start reaper process @@ -145,6 +183,23 @@ func (t *txSubmitterImpl) Start(parentCtx context.Context) (err error) { } }() + go func() { + for { + select { + case <-ctx.Done(): + return + case <-time.After(t.GetDistinctInterval()): + tmpChainIDs, err := t.db.GetDistinctChainIDs(ctx) + if err != nil { + logger.Errorf("could not update distinct chain ids: %v", err) + } + t.distinctChainIDMux.Lock() + t.distinctChainIDs = tmpChainIDs + t.distinctChainIDMux.Unlock() + } + } + }() + i := 0 for { i++ @@ -160,30 +215,6 @@ func (t *txSubmitterImpl) Start(parentCtx context.Context) (err error) { } } -func (t *txSubmitterImpl) setupMetrics() (err error) { - t.numPendingGauge, err = t.meter.Int64ObservableGauge("num_pending_txes") - if err != nil { - return fmt.Errorf("could not create num pending txes gauge: %w", err) - } - - _, err = t.meter.RegisterCallback(t.recordNumPending, t.numPendingGauge) - if err != nil { - return fmt.Errorf("could not register callback: %w", err) - } - - t.nonceGauge, err = t.meter.Int64ObservableGauge("current_nonce") - if err != nil { - return fmt.Errorf("could not create nonce gauge: %w", err) - } - - _, err = t.meter.RegisterCallback(t.recordNonces, t.nonceGauge) - if err != nil { - return fmt.Errorf("could not register callback: %w", err) - } - - return nil -} - func (t *txSubmitterImpl) GetSubmissionStatus(ctx context.Context, chainID *big.Int, nonce uint64) (status SubmissionStatus, err error) { nonceStatus, err := t.db.GetNonceStatus(ctx, t.signer.Address(), chainID, nonce) if err != nil { @@ -315,6 +346,9 @@ func (t *txSubmitterImpl) triggerProcessQueue(ctx context.Context) { } } +// ErrNotStarted is the error for when the submitter is not started. +var ErrNotStarted = errors.New("submitter is not started") + // nolint: cyclop func (t *txSubmitterImpl) SubmitTransaction(parentCtx context.Context, chainID *big.Int, call ContractCallType) (nonce uint64, err error) { ctx, span := t.metrics.Tracer().Start(parentCtx, "submitter.SubmitTransaction", trace.WithAttributes( @@ -326,6 +360,10 @@ func (t *txSubmitterImpl) SubmitTransaction(parentCtx context.Context, chainID * metrics.EndSpanWithErr(span, err) }() + if !t.Started() { + logger.Errorf("%v in a future version, this will hard error", ErrNotStarted.Error()) + } + // make sure we have a client for this chain. chainClient, err := t.fetcher.GetClient(ctx, chainID) if err != nil { @@ -669,4 +707,8 @@ func (t *txSubmitterImpl) getGasEstimate(ctx context.Context, chainClient client return gasEstimate, nil } +func (t *txSubmitterImpl) Address() common.Address { + return t.signer.Address() +} + var _ TransactionSubmitter = &txSubmitterImpl{} diff --git a/ethergo/submitter/util.go b/ethergo/submitter/util.go index 83c97ffb3e..63d43c92d4 100644 --- a/ethergo/submitter/util.go +++ b/ethergo/submitter/util.go @@ -103,7 +103,7 @@ func bigPtrToString(num *big.Int) string { } // sortTxesByChainID sorts a slice of transactions by nonce. -func sortTxesByChainID(txs []db.TX) map[uint64][]db.TX { +func sortTxesByChainID(txs []db.TX, maxPerChain int) map[uint64][]db.TX { txesByChainID := make(map[uint64][]db.TX) // put the transactions in a map by chain id for _, t := range txs { @@ -128,6 +128,13 @@ func sortTxesByChainID(txs []db.TX) map[uint64][]db.TX { }) } + // cap the number of txes per chain + for chainID, txes := range txesByChainID { + if len(txes) > maxPerChain { + txesByChainID[chainID] = txes[:maxPerChain] + } + } + return txesByChainID } @@ -141,3 +148,34 @@ func groupTxesByNonce(txs []db.TX) map[uint64][]db.TX { return txesByNonce } + +// Function to check if a slice contains a given big integer. +func contains(slice []*big.Int, elem *big.Int) bool { + for _, v := range slice { + if v.Cmp(elem) == 0 { + return true + } + } + return false +} + +// Function to get the outersection of two slices of big.Int. +func outersection(set, superset []*big.Int) []*big.Int { + var result []*big.Int + for _, elem := range superset { + if !contains(set, elem) { + result = append(result, elem) + } + } + return result +} + +// Generic function to convert a map[uint64]T to []*big.Int. +func mapToBigIntSlice[T any](m map[uint64]T) []*big.Int { + var result []*big.Int + for k := range m { + bigIntKey := new(big.Int).SetUint64(k) + result = append(result, bigIntKey) + } + return result +} diff --git a/ethergo/submitter/util_test.go b/ethergo/submitter/util_test.go index 5614760382..8e664e155b 100644 --- a/ethergo/submitter/util_test.go +++ b/ethergo/submitter/util_test.go @@ -5,6 +5,7 @@ import ( "fmt" "math/big" "math/rand" + "sort" "sync" "testing" "time" @@ -238,13 +239,24 @@ func (s *SubmitterSuite) TestSortTxes() { } wg.Wait() - sorted := submitter.SortTxes(allTxes) + sorted := submitter.SortTxes(allTxes, 50) assert.Equal(s.T(), len(sorted), len(expected)) for chainID, txes := range expected { for i := range txes { assert.Equal(s.T(), sorted[chainID][i].Hash(), txes[i].Hash()) } } + + // check tx cap + numTxes := 10 + sorted = submitter.SortTxes(allTxes, numTxes) + assert.Equal(s.T(), len(sorted), len(expected)) + for chainID, txes := range expected { + chainTxes := txes[:numTxes] + for i := range chainTxes { + assert.Equal(s.T(), sorted[chainID][i].Hash(), txes[i].Hash()) + } + } } func (s *SubmitterSuite) TestGroupTxesByNonce() { @@ -285,3 +297,106 @@ func makeAttrMap(tx *types.Transaction, UUID string) map[string]attribute.Value } return mapAttr } + +// Test for the outersection function. +func TestOutersection(t *testing.T) { + set := []*big.Int{ + big.NewInt(2), + big.NewInt(4), + } + + superset := []*big.Int{ + big.NewInt(1), + big.NewInt(2), + big.NewInt(3), + big.NewInt(4), + big.NewInt(5), + } + + expected := []*big.Int{ + big.NewInt(1), + big.NewInt(3), + big.NewInt(5), + } + + result := submitter.Outersection(set, superset) + + if len(result) != len(expected) { + t.Fatalf("Expected %d elements, but got %d", len(expected), len(result)) + } + + for i, v := range result { + if v.Cmp(expected[i]) != 0 { + t.Errorf("Expected %s but got %s at index %d", expected[i], v, i) + } + } +} + +// bigIntSlice is a type for sorting []*big.Int. +type bigIntSlice []*big.Int + +func (p bigIntSlice) Len() int { return len(p) } +func (p bigIntSlice) Less(i, j int) bool { return p[i].Cmp(p[j]) < 0 } +func (p bigIntSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// Test for the MapToBigIntSlice function with generics. +func TestMapToBigIntSlice(t *testing.T) { + m := map[uint64]struct{}{ + 1: {}, + 2: {}, + 3: {}, + } + + expected := []*big.Int{ + big.NewInt(1), + big.NewInt(2), + big.NewInt(3), + } + + result := submitter.MapToBigIntSlice(m) + + if len(result) != len(expected) { + t.Fatalf("Expected %d elements, but got %d", len(expected), len(result)) + } + + sort.Sort(bigIntSlice(result)) + sort.Sort(bigIntSlice(expected)) + + for i, v := range result { + if v.Cmp(expected[i]) != 0 { + t.Errorf("Expected %s but got %s at index %d", expected[i], v, i) + } + } +} + +func TestMapToBigIntSliceWithStruct(t *testing.T) { + type MyStruct struct { + Value int + } + m := map[uint64]MyStruct{ + 1: {Value: 10}, + 2: {Value: 20}, + 3: {Value: 30}, + } + + expected := []*big.Int{ + big.NewInt(1), + big.NewInt(2), + big.NewInt(3), + } + + result := submitter.MapToBigIntSlice(m) + + if len(result) != len(expected) { + t.Fatalf("Expected %d elements, but got %d", len(expected), len(result)) + } + + sort.Sort(bigIntSlice(result)) + sort.Sort(bigIntSlice(expected)) + + for i, v := range result { + if v.Cmp(expected[i]) != 0 { + t.Errorf("Expected %s but got %s at index %d", expected[i], v, i) + } + } +} diff --git a/go.work.sum b/go.work.sum index a9ab7743f0..e9e27d4e17 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1638,6 +1638,7 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/ClickHouse/clickhouse-go v1.5.4 h1:cKjXeYLNWVJIx2J1K6H2CqyRmfwVJVY1OV1coaaFcI0= github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= @@ -1724,6 +1725,8 @@ github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGW github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw= github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kingpin/v2 v2.3.1 h1:ANLJcKmQm4nIaog7xdr/id6FM6zm5hHnfZrvtKPxqGg= github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= @@ -1731,6 +1734,7 @@ github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HR github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae h1:C4Q9m+oXOxcSWwYk9XzzafY2xAVAaeubZbUHJkw3PlY= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -1848,6 +1852,7 @@ github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRt github.com/celo-org/celo-blockchain v0.0.0-20210222234634-f8c8f6744526 h1:rdY1F8vUybjjsv+V58eaSYsYPTNO+AXK9o7l+BQuhhU= github.com/celo-org/celo-bls-go v0.2.4 h1:V1y92kM5IRJWQZ6DCwqiKLW7swmUA5y/dPJ9YbU4HfA= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= @@ -1993,6 +1998,7 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/crate-crypto/go-ipa v0.0.0-20220523130400-f11357ae11c7 h1:6IrxszG5G+O7zhtkWxq6+unVvnrm1fqV2Pe+T95DUzw= @@ -2125,6 +2131,7 @@ github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1S github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:DddqAaWDpywytcG8w/qoQ5sAN8X12d3Z3koB0C3Rxsc= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c h1:CndMRAH4JIwxbW8KYq6Q+cGWcGHz0FjGR3QqcInWcW0= @@ -2256,6 +2263,7 @@ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4 github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.8+incompatible h1:BKZuG6mCnRj5AOaWJXoCgf6rqTYnYJLe4en2hxT7r9o= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -2666,6 +2674,8 @@ github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/kathiouchka/slacker v0.0.0-20240629123301-04d4e71c3a96 h1:/RfYfEL6WutfEvEGx7JM3lG7dKdeKT/tnhXpaiaBILw= +github.com/kathiouchka/slacker v0.0.0-20240629123301-04d4e71c3a96/go.mod h1:VPW+xhTrmB4lUoxA5tiB180fmWFt6UFW+96ZWYtj0Qg= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/keep-network/keep-common v1.7.1-0.20211012131917-7102d7b9c6a0 h1:pQ6IV5wK1v5GESbLUQlQASCBorc13FJHFYoO1O7ftNU= @@ -3254,6 +3264,7 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 h1:3hxavr+IHMsQBrYUPQM5v0CgENFktkkbg1sfpgM3h20= github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= +github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= @@ -3301,6 +3312,10 @@ github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFt github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shomali11/commander v0.0.0-20230730023802-0b64f620037d h1:IImd1gV+EdlKWWi8RoHSaccjLQtSi4tJiFOjq6mM+ZQ= +github.com/shomali11/commander v0.0.0-20230730023802-0b64f620037d/go.mod h1:bYyJw/Aj9fK+qoFmRbPJeWsDgq7WGO8f/Qof95qPug4= +github.com/shomali11/proper v0.0.0-20190608032528-6e70a05688e7 h1:wAyBXFZOcLkbaoDlDbMpTCw9xy3yP2YJDMRrbTVuVKU= +github.com/shomali11/proper v0.0.0-20190608032528-6e70a05688e7/go.mod h1:cg2VM85Y+0BcVSICzB+OafOlTcJ9QPbtF4qtuhuR/GA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4 h1:Fth6mevc5rX7glNLpbAMJnqKlfIkcTjZCSHEeqvKbcI= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48 h1:vabduItPAIz9px5iryD5peyx7O3Ya8TBThapgXim98o= github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470 h1:qb9IthCFBmROJ6YBS31BEMeSYjOscSiG+EO+JVNTz64= @@ -3332,6 +3347,8 @@ github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvq github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133 h1:JtcyT0rk/9PKOdnKQzuDR+FSjh7SGtJwpgVpfZBRKlQ= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= +github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= @@ -3570,6 +3587,7 @@ go.opentelemetry.io/collector/semconv v0.101.0 h1:tOe9iTe9dDCnvz/bqgfNRr4w80kXG8 go.opentelemetry.io/collector/semconv v0.101.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= @@ -3658,6 +3676,7 @@ golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= @@ -3716,6 +3735,7 @@ golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2 golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852 h1:xYq6+9AtI+xP3M4r0N1hCkHrInHDBohhquRgx9Kk6gI= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= @@ -3763,6 +3783,7 @@ golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= @@ -3868,6 +3889,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= diff --git a/index.yaml b/index.yaml new file mode 100644 index 0000000000..d27e6a6015 --- /dev/null +++ b/index.yaml @@ -0,0 +1,1696 @@ +apiVersion: v1 +entries: + agents: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-15T16:05:28.619441468Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.92 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.16 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 2e5a511213a71d779bc019c9da89b3ec55ff11a86fbac91de8dcf26dd7bb73e0 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.30/agents-0.1.30.tgz + version: 0.1.30 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-04T02:29:43.471160828Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.91 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.15 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 0d35207b4437dd7bf1c2499efd6c8be9db4d7204b80c9bd36554949763819051 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.29/agents-0.1.29.tgz + version: 0.1.29 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-07T00:24:26.86440696Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.9 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.14 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: dd5f2c486141e712edfd6420e0fe659cac6e7cb778af701d8a9b103f255d67b2 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.28/agents-0.1.28.tgz + version: 0.1.28 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-06T23:02:22.41007833Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.8 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.13 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 92695a7205b7b92de7aa768ffd37167684aba0034f6efff9299ef8f156188c40 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.27/agents-0.1.27.tgz + version: 0.1.27 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-02T00:15:52.615661508Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.7 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.12 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 1fcfbaa7310e7031c2767ea177e1e42c184afecad57da28b2b105843923764f9 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.26/agents-0.1.26.tgz + version: 0.1.26 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-01T23:31:24.558063132Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.7 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.11 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 4c33a8ae520ba98ab0d1533b3fcfddc36c2b67b6aec958b0d1a6476c554f43de + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.25/agents-0.1.25.tgz + version: 0.1.25 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-31T14:37:49.065445479Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.6 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.10 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 55a8313a4da0da43a1c17a95faa7b7625c577aba2180fcc37565155a69a21075 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.24/agents-0.1.24.tgz + version: 0.1.24 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-05T21:20:54.016694746Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.9 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: d065aad107e72d8dadf047a3ee355c3662147ba1a08fec25655cc0976e3c673d + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.23/agents-0.1.23.tgz + version: 0.1.23 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-28T07:59:32.695340284Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.8 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: d60f9f9f850cbee824a46818a1eb897c9f31d2980e01531c3e81aa076077f1e7 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.22/agents-0.1.22.tgz + version: 0.1.22 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-22T22:57:13.838710338Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.7 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 75d05fbe2fada76665bf9371d227f3c4321ada50888e646d498cfaf697c3f0c6 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.21/agents-0.1.21.tgz + version: 0.1.21 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T20:02:44.991817377Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.2 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.5 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 87e4b18c2e7f3ebc09e7ba25e69cdb26ea1af2e8eb4d6b6a6828af9bd7016178 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.19/agents-0.1.19.tgz + version: 0.1.19 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T06:11:40.680782393Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.1 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.4 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 10fc8cd84d3d1c423fa532e1e9f8beb8afc9f8128ad07fd9ea11aa50d0dc1b60 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.18/agents-0.1.18.tgz + version: 0.1.18 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-07T23:13:31.086967042Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 15950d3ca38b0fcc0816aa3beb4a4576bf8b7c3807922998aa3da071f491fc64 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.17/agents-0.1.17.tgz + version: 0.1.17 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-05T22:35:40.482371209Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 160e5817fb893d7abe88b16c36e3d5e009eb6a3f9ce707b08abc48f806a95bc7 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.16/agents-0.1.16.tgz + version: 0.1.16 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-05T21:47:43.153922967Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 431a4e053867244109c5130ca4efe18e05faba1890489beba51e8e78432ee392 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.15/agents-0.1.15.tgz + version: 0.1.15 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-05T21:28:44.179469733Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + - condition: jaeger.enabled + name: jaeger + repository: https://jaegertracing.github.io/helm-charts + version: 0.69.1 + description: A Helm chart for Kubernetes + digest: 4260256bcb65c5b7d5ff2d3c9901dad651963924e0340a3ac00837f89da6e385 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.14/agents-0.1.14.tgz + version: 0.1.14 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-03-23T18:58:15.577289188Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: f71aa70f700ccca485f9b63c3fcb9a7f21d946ae5eb1fc8652f73591ba570837 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.13/agents-0.1.13.tgz + version: 0.1.13 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-03-18T10:14:29.686093103Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: ff2633fa90eb0f5d443f23406382d88d920c47f39cd33e8a34ebd28b78cbae5e + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.12/agents-0.1.12.tgz + version: 0.1.12 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-28T18:39:25.27662422Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: 3c5380e3b9f17168dd631dc20dbfd2d963f9916a4c4259b1df1a7cb646112877 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.9/agents-0.1.9.tgz + version: 0.1.9 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-27T22:43:40.467317512Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: 74ef93c34c2b47b7b8b21f2307754dc256539b90570a0786ab6f93e7587831b4 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.8/agents-0.1.8.tgz + version: 0.1.8 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-27T17:31:34.607173414Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: 865a7d0acf8db64abd8c7a7252067ddd5a5137d9c4f9f98ebe691979bacfbfc0 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.7/agents-0.1.7.tgz + version: 0.1.7 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-24T22:45:29.104211539Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: ab85342440c372e6275bb2bc15439df01a51f6d3b288f1293839ceec96df33ea + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.6/agents-0.1.6.tgz + version: 0.1.6 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-23T22:47:39.149175118Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.3 + description: A Helm chart for Kubernetes + digest: a82f439d967b940299368470c74293906e7f2b8a51634406b69cc038ec0c45af + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.5/agents-0.1.5.tgz + version: 0.1.5 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-21T14:19:59.432989239Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.2 + description: A Helm chart for Kubernetes + digest: 25b64b5cc3b642b737f597272f170015d7e243df138d8d6d6b421eabc1f24b6d + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.4/agents-0.1.4.tgz + version: 0.1.4 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-12T02:23:46.956947784Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.1 + description: A Helm chart for Kubernetes + digest: cf66309561337ad98b7787b38fa2a4fb595a54fb9049552ce983c2224fd2d01f + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.3/agents-0.1.3.tgz + version: 0.1.3 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-11T12:49:09.636325559Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.1 + description: A Helm chart for Kubernetes + digest: 5e440d40ac081c49493ec23fc5b6896d196812b5effb4df2d8b0f4194a40b642 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.2/agents-0.1.2.tgz + version: 0.1.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-11T06:11:11.494990736Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.1 + description: A Helm chart for Kubernetes + digest: e5e5a86befe1137a0d2ea57dec6b5146fc270a62346e075be98764f6ba49fa4b + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.1/agents-0.1.1.tgz + version: 0.1.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-11T05:50:32.77252133Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: scribe.enabled + name: scribe + repository: file://../scribe/ + version: 0.2.1 + description: A Helm chart for Kubernetes + digest: 84f155f98d850f831ca0ad3735b1b8a014e9efc87569518613e3e625ae0b6cf1 + name: agents + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/agents-0.1.0/agents-0.1.0.tgz + version: 0.1.0 + cctp: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2024-06-21T00:00:46.389701199Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A cctp chart + digest: 0e73c8cfc9276a9da18d06f3703cfd96d24d63a90d22116d5395e7f63417cd3b + name: cctp + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/cctp-0.3.0/cctp-0.3.0.tgz + version: 0.3.0 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-07T00:24:26.989065439Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A cctp chart + digest: 9e91b5a4b391b1d58ab8e13b74f8bdde5723369505b723a7b7f3741f3c7f074f + name: cctp + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/cctp-0.2.2/cctp-0.2.2.tgz + version: 0.2.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-06T23:02:22.641575931Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A cctp chart + digest: 7e43487b68d10acaa9109c7211cd18ab65bba31ec5887eab46d3cb89dc0249e3 + name: cctp + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/cctp-0.2.1/cctp-0.2.1.tgz + version: 0.2.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-06-28T04:24:31.546235076Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A cctp chart + digest: 9817f3a9ed3e3f2cb8ea8f509c98a32d79264125a21871638a1349ccb14cd593 + name: cctp + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/cctp-0.2.0/cctp-0.2.0.tgz + version: 0.2.0 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-06-28T02:19:57.551825666Z" + description: A cctp chart + digest: 6077103a98218c069d8080cb070deff146b960947cc5a504a9f062560e07b31a + name: cctp + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/cctp-0.1.0/cctp-0.1.0.tgz + version: 0.1.0 + explorer: + - apiVersion: v2 + appVersion: 1.17.0 + created: "2023-11-15T16:05:28.862756733Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.92 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: d3dd67692e7cd58dc1d6d917438abe8e72df266264fea1096fd5d6ea2c1fcd18 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.16/explorer-0.2.16.tgz + version: 0.2.16 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-04T02:29:43.624804939Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.91 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 8b798f6986099576aa289734aa7138673efebdea9e5b3b85eff735d021214fe6 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.15/explorer-0.2.15.tgz + version: 0.2.15 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-07T00:24:27.111992917Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.9 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 8c915a24f815b8f850c682701dd28ee423502dd43419e8542654723a41403e94 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.14/explorer-0.2.14.tgz + version: 0.2.14 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-06T23:02:22.852502558Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.8 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: e1ea3c1cf595bb3858e274f77efdc53a2ce6cb370ad7038b3c1a61ca8852e2b0 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.13/explorer-0.2.13.tgz + version: 0.2.13 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-02T00:15:52.741152138Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.7 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 5eb58a8cb154f20d314d2f4d42383516f5e138d5757139ff9c1d05a83dc6ec63 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.11/explorer-0.2.11.tgz + version: 0.2.11 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-01T23:31:24.709647185Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.7 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: a756d2d70a4293500ccac729ba3bb0404df296080b48edb0d2c41a2acd485947 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.10/explorer-0.2.10.tgz + version: 0.2.10 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-31T14:37:49.248836717Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.6 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 1ec6c23795cc39e5b952ac76dfbdf5c326a4c4018ec959a726da5118910414ca + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.9/explorer-0.2.9.tgz + version: 0.2.9 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-28T07:59:32.934369068Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 94bc23b14cd383ece2ed9053132729848bd4f889393da182195890d180146706 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.8/explorer-0.2.8.tgz + version: 0.2.8 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-22T22:57:14.006505763Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 25e36b24ecf8387b01028c50442d569422057d10d6249a7c3d0dc06e457b903e + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.6/explorer-0.2.6.tgz + version: 0.2.6 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-29T19:45:11.845123398Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.2 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 442ac97b546b21e930852e27ac8d9aff32c0dd91542c8f3a6b1a43dc2df15452 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.4/explorer-0.2.4.tgz + version: 0.2.4 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T20:02:45.162467004Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.2 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: bfab5ccfa0a0382fc27dde36a221bdc1c5852612902dec99c7124271f4fccb8d + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.3/explorer-0.2.3.tgz + version: 0.2.3 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T06:11:40.843897998Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.1 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: 9b1cd48a2ef25d1df617fbd03e198eca447fe104ffdf73c66f95086d6e168588 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.2/explorer-0.2.2.tgz + version: 0.2.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-03-28T18:17:01.71620633Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: bf58332fc09570b4d754dcf2dbfe6a586fc04a18222090444410ce51c5d4ac0d + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.1/explorer-0.2.1.tgz + version: 0.2.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-06T09:50:34.459022548Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: f60be11d1d4576349fdbf8efd15865189bc160624f51af058303a31e71107574 + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.2.0/explorer-0.2.0.tgz + version: 0.2.0 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-11-16T06:03:51.699960931Z" + dependencies: + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.1.2 + - condition: clickhouse.enabled + name: clickhouse + repository: https://sentry-kubernetes.github.io/charts + version: 3.1.3 + description: A Helm chart for Kubernetes + digest: e1ac290809782c0dd408c9eababac726e819f5a7b4680c75acd86bb9db675c8b + name: explorer + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/explorer-0.1.0/explorer-0.1.0.tgz + version: 0.1.0 + omnirpc: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-15T16:05:29.111877183Z" + description: A omnirpc chart + digest: 2db90ef5abc0c65405cdeaf3a09bd1ef39a95a8d68e679ee7d7b1a6070df6e18 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.92/omnirpc-0.2.92.tgz + version: 0.2.92 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-04T02:29:43.780936178Z" + description: A omnirpc chart + digest: 4b2662599281d738f93a6e1bfa1920d13619dfa3a0328abf9ead8ebe88e330d8 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.91/omnirpc-0.2.91.tgz + version: 0.2.91 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-07T00:24:27.25942821Z" + description: A omnirpc chart + digest: 7ee45a04207a68884d3d6c1a09a1352b53f250c250e3a8b0e55f80b0595f7e32 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.9/omnirpc-0.2.9.tgz + version: 0.2.9 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-06T23:02:23.072373847Z" + description: A omnirpc chart + digest: 8a2838f846e6b45f1c46bd05d779aa76c359a39179bfad8a6e34610b9c863175 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.8/omnirpc-0.2.8.tgz + version: 0.2.8 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-01T23:31:24.812489114Z" + description: A omnirpc chart + digest: c038dd3bcf43966bec7d424e8847b48bc279fc8589a892decf411d7ab0aa1ea3 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.7/omnirpc-0.2.7.tgz + version: 0.2.7 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-31T14:37:49.639673176Z" + description: A omnirpc chart + digest: 175688d8b1b62bd5ff6e979316688874edcd3270da8cdf8cd485982af1d986ab + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.6/omnirpc-0.2.6.tgz + version: 0.2.6 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-22T22:57:14.202542779Z" + description: A omnirpc chart + digest: 307bea1edaa83f4051c5dd3560e80bc3971d9d446b8f309fd94dfde7c5ab2c40 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.5/omnirpc-0.2.5.tgz + version: 0.2.5 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T20:02:45.319190781Z" + description: A omnirpc chart + digest: c324d35a6179c3c16d621a0edde53089495f69da7d9926ca39f76a9faf90ebb0 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.2/omnirpc-0.2.2.tgz + version: 0.2.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T06:11:40.999043161Z" + description: A omnirpc chart + digest: 387c62731ef9523cd926922b3f9aa18b3beb85679d3b61b4d2f45ec720731aba + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.1/omnirpc-0.2.1.tgz + version: 0.2.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-06T09:50:34.635840202Z" + description: A omnirpc chart + digest: 20da3ba54ef20c816f423de32f0b0520f11636d33b6a2f789d48eeb3d83abac9 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.2.0/omnirpc-0.2.0.tgz + version: 0.2.0 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-10-02T23:39:23.019587423Z" + description: A omnirpc chart + digest: 2c68a02d9385416b3d450418f5ca2f5ac95ea4ef59bc7c5ca3c22c64884414d8 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.1.2/omnirpc-0.1.2.tgz + version: 0.1.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-09-24T18:28:04.257746986Z" + description: A omnirpc chart + digest: 09f4be6103d5177c254a8c87feafd8104d87305a235598011e23cedcec6ebde5 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.1.1/omnirpc-0.1.1.tgz + version: 0.1.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-09-13T00:24:26.127889892Z" + description: A omnirpc chart + digest: 0dec1e3c2d1938e5c09f8dcd3d2f431c2d34c6507cc2b13c5814bf726c43ddc2 + name: omnirpc + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/omnirpc-0.1.0/omnirpc-0.1.0.tgz + version: 0.1.0 + promexporter: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-31T14:37:49.860260817Z" + description: A Helm chart for Kubernetes + digest: 5c72bb016b643e2fbbaf862377eaa513ded7c8345dc406edfc66ee2c7e36e35d + name: promexporter + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/promexporter-0.1.1/promexporter-0.1.1.tgz + version: 0.1.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-29T17:08:46.1889086Z" + description: A Helm chart for Kubernetes + digest: 0bb3189d4504f71a4c6bd43a0ee48dc89bf3c0aaec6ac796772dcf0de8137429 + name: promexporter + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/promexporter-0.1.0/promexporter-0.1.0.tgz + version: 0.1.0 + screener: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2024-05-09T14:50:37.286253669Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A screener chart + digest: b2f8bed4bff3132ff693f5853a38896548f1b1fefdc76bf6d8f8f72507f3bcc3 + name: screener + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/screener-0.2.5/screener-0.2.5.tgz + version: 0.2.5 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2024-01-24T13:18:33.237615192Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A screener chart + digest: 41ee1d2db705b54d517a4d9de49697ccfac9b6ba0fee1446b022d3d4e792d5cf + name: screener + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/screener-0.2.4/screener-0.2.4.tgz + version: 0.2.4 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2024-01-24T07:08:52.641499318Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A screener chart + digest: db7a3c75a450cacc3db94a23dca397e1d1ab8a2b510f784aa6ddcc5bbd7bbbfd + name: screener + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/screener-0.2.3/screener-0.2.3.tgz + version: 0.2.3 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2024-01-24T03:29:48.086520729Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A screener chart + digest: 567b48e162925ebee712a87a8e5f05ef9e4b6b4d1437ddcf0f641b16a3dc6ca1 + name: screener + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/screener-0.2.2/screener-0.2.2.tgz + version: 0.2.2 + scribe: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-15T16:05:29.3521351Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.92 + description: A Helm chart for Kubernetes + digest: 05ca8f618d459e5b0d993064ad284a5b29050b2910fce56e79ebe9e5259137cd + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.16/scribe-0.2.16.tgz + version: 0.2.16 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-04T02:29:43.922126851Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.91 + description: A Helm chart for Kubernetes + digest: 96ee0eceb0b7154caad836d068c76c624b04e6d67a1e52bac746a9fecfef65b4 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.15/scribe-0.2.15.tgz + version: 0.2.15 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-07T00:24:27.38527069Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.9 + description: A Helm chart for Kubernetes + digest: e132297875b080e704462ce8f2b10284c13a1fc3431eda48ed11752edf338f79 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.14/scribe-0.2.14.tgz + version: 0.2.14 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-10-06T23:02:23.310749973Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.8 + description: A Helm chart for Kubernetes + digest: a77a5762283eb2e4393e46151f40068ac4069464b8ac6ac9f316e9724cd9fd8c + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.13/scribe-0.2.13.tgz + version: 0.2.13 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-02T00:15:52.875210519Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.7 + description: A Helm chart for Kubernetes + digest: 0dbb3afd8dd7c351e415f8db969133df7275a3ee7380d6b7633ea9f4ff310bab + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.12/scribe-0.2.12.tgz + version: 0.2.12 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-08-01T23:31:24.945332688Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.7 + description: A Helm chart for Kubernetes + digest: 5749715debf1b12ea8995789b1cd13a4d0f859987d41a3dafa35aabdb2c86578 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.11/scribe-0.2.11.tgz + version: 0.2.11 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-31T14:37:50.071207584Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.6 + description: A Helm chart for Kubernetes + digest: d393b266408abe7d51fd2606cf0ddff429c65a040c8fbd46b86367ad9eb04efa + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.10/scribe-0.2.10.tgz + version: 0.2.10 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-07-05T21:20:54.251606246Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + description: A Helm chart for Kubernetes + digest: 8b626fb80dc24514de6e7c480783fd897f9dd0e8c0970dc44815f6ba0c6948a4 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.9/scribe-0.2.9.tgz + version: 0.2.9 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-28T07:59:33.193453847Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + description: A Helm chart for Kubernetes + digest: 771ba42a4ddf34d14d4e9dded31c9f570f0c5f87614777124e3b9023629d6cc0 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.8/scribe-0.2.8.tgz + version: 0.2.8 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-05-22T22:57:14.371893721Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.5 + description: A Helm chart for Kubernetes + digest: 9ec7d3a18b2ba4a98c677a7b67fd3556048887e703cd307c0da2d722f402c734 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.7/scribe-0.2.7.tgz + version: 0.2.7 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T20:02:45.49637282Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.2 + description: A Helm chart for Kubernetes + digest: f3ff884024f821b97b6c77ed1902a1238284fa6488a07fad98e76da0baa35add + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.5/scribe-0.2.5.tgz + version: 0.2.5 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-04-26T06:11:41.159766791Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.1 + description: A Helm chart for Kubernetes + digest: c554c761138aefb522bcc9915b72c32e67216bcc9fe1020e712d9988d9a39862 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.4/scribe-0.2.4.tgz + version: 0.2.4 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-23T22:47:39.401562759Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + description: A Helm chart for Kubernetes + digest: 953242c1b65d218b4946a0211bec24cffc851897360982d0d334ab1791a72f56 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.3/scribe-0.2.3.tgz + version: 0.2.3 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-21T14:19:59.69319414Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + description: A Helm chart for Kubernetes + digest: 917f3c35f76dc167960c4cd437a04e11d8ef09c1074c7cf0fff66a2a1b7760d7 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.2/scribe-0.2.2.tgz + version: 0.2.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-11T05:50:32.924330225Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + description: A Helm chart for Kubernetes + digest: 0d48abc1c7731cc92a73edf5cac6cbdcd53f9b5e2fc7dfb795f2763614a13c91 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.1/scribe-0.2.1.tgz + version: 0.2.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-02-06T09:50:34.858627506Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.2.0 + description: A Helm chart for Kubernetes + digest: 547bd80952bccf395cff03801f59cd9db0eda55c606b68fb6e3c2bd6e4ee398a + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.2.0/scribe-0.2.0.tgz + version: 0.2.0 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-10-31T21:51:36.54619327Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.1.2 + description: A Helm chart for Kubernetes + digest: e44d612e2ca73c7fdc2751bf10453f8dca956e4952c855349683811404d7f5d5 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.1.4/scribe-0.1.4.tgz + version: 0.1.4 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-10-30T21:21:47.714458959Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.1.2 + description: A Helm chart for Kubernetes + digest: 0804370c394ca56b8a00de2cde8bf5873f7eb1313f19bb512e8a19ed79867aab + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.1.3/scribe-0.1.3.tgz + version: 0.1.3 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-10-02T23:39:23.169811556Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.1.2 + description: A Helm chart for Kubernetes + digest: bb485b556e227da97c40e92bb8fc833c412ad892cfe28d5545fbc2375f8e9d5a + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.1.2/scribe-0.1.2.tgz + version: 0.1.2 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-09-28T18:11:37.712727887Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - condition: omnirpc.enabled + name: omnirpc + repository: file://../omnirpc/ + version: 0.1.1 + description: A Helm chart for Kubernetes + digest: 2d99eb9cf2eaf1babf6702e534ab9540dbe6394c4dd4496639cc63a379408be8 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.1.1/scribe-0.1.1.tgz + version: 0.1.1 + - apiVersion: v2 + appVersion: 1.16.0 + created: "2022-09-24T18:28:04.408531267Z" + dependencies: + - name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + - name: omnirpc + repository: file://../omnirpc/ + version: 0.1.1 + description: A Helm chart for Kubernetes + digest: 7218a26e133275337eff731fbb2a9ebd119e11e476cbe5b6de1412ca5685d394 + name: scribe + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/scribe-0.1.0/scribe-0.1.0.tgz + version: 0.1.0 + sinner: + - apiVersion: v2 + appVersion: 1.16.0 + created: "2023-11-04T02:29:44.056013742Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.3.2 + description: A Helm chart for Kubernetes + digest: 583766bb829f18c1f419cb8c4830888f4618e00fbcc85176571caec6e7cfdbee + name: sinner + type: application + urls: + - https://github.com/synapsecns/sanguine/releases/download/sinner-0.1.0/sinner-0.1.0.tgz + version: 0.1.0 +generated: "2024-06-21T00:00:46.389969799Z" diff --git a/packages/contracts-rfq/CHANGELOG.md b/packages/contracts-rfq/CHANGELOG.md index 2d903b0c17..8d5041301d 100644 --- a/packages/contracts-rfq/CHANGELOG.md +++ b/packages/contracts-rfq/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.10](https://github.com/synapsecns/sanguine/compare/FastBridge@0.2.9...FastBridge@0.2.10) (2024-07-03) + +**Note:** Version bump only for package FastBridge + + + + + ## [0.2.9](https://github.com/synapsecns/sanguine/compare/FastBridge@0.2.8...FastBridge@0.2.9) (2024-06-09) diff --git a/packages/contracts-rfq/package.json b/packages/contracts-rfq/package.json index 7f9c914644..66d4623b5c 100644 --- a/packages/contracts-rfq/package.json +++ b/packages/contracts-rfq/package.json @@ -1,7 +1,7 @@ { "name": "FastBridge", "license": "UNLICENSED", - "version": "0.2.9", + "version": "0.2.10", "description": "FastBridge contracts.", "private": true, "files": [ @@ -11,12 +11,13 @@ "@openzeppelin/contracts": "5.0.1" }, "devDependencies": { - "@synapsecns/solidity-devops": "^0.4.2", + "@synapsecns/solidity-devops": "^0.4.3", "prettier": "^2.5.1", "prettier-plugin-solidity": "^1.0.0-beta.19", "solhint": "^3.3.6" }, "scripts": { + "build": " ", "build:contracts": "forge build", "build:slither": "forge build --out=out --build-info --force", "test:coverage": "echo 'Please use foundry'", diff --git a/packages/explorer-ui/CHANGELOG.md b/packages/explorer-ui/CHANGELOG.md index 038e6ec2e4..20f6adca7d 100644 --- a/packages/explorer-ui/CHANGELOG.md +++ b/packages/explorer-ui/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.1.47](https://github.com/synapsecns/sanguine/compare/@synapsecns/explorer-ui@0.1.46...@synapsecns/explorer-ui@0.1.47) (2024-07-03) + +**Note:** Version bump only for package @synapsecns/explorer-ui + + + + + +## [0.1.46](https://github.com/synapsecns/sanguine/compare/@synapsecns/explorer-ui@0.1.45...@synapsecns/explorer-ui@0.1.46) (2024-06-28) + +**Note:** Version bump only for package @synapsecns/explorer-ui + + + + + ## [0.1.45](https://github.com/synapsecns/sanguine/compare/@synapsecns/explorer-ui@0.1.44...@synapsecns/explorer-ui@0.1.45) (2024-06-16) **Note:** Version bump only for package @synapsecns/explorer-ui diff --git a/packages/explorer-ui/components/BridgeTransaction/BridgeTransactionTable.tsx b/packages/explorer-ui/components/BridgeTransaction/BridgeTransactionTable.tsx index 574f7badfd..d1d8610f42 100644 --- a/packages/explorer-ui/components/BridgeTransaction/BridgeTransactionTable.tsx +++ b/packages/explorer-ui/components/BridgeTransaction/BridgeTransactionTable.tsx @@ -1,95 +1,118 @@ -import _ from 'lodash' import { Table } from '@components/TransactionTable/Table' import { StyleAddress } from '@components/misc/StyleAddress' import { IconAndAmount } from '@components/misc/IconAndAmount' import { ChainInfo } from '@components/misc/ChainInfo' import { timeAgo } from '@utils/timeAgo' -import { getBridgeTransactionUrl } from '@urls' -import { ellipsizeString } from '@utils/ellipsizeString' import { addressToSymbol } from '@utils/addressToSymbol' -import { formatDateTime } from '@utils/formatDate' +import { formatDate } from '@utils/formatDate' +import Arrow from '@components/icons/Arrow' +import { getBridgeTransactionUrl } from '@urls' import Link from 'next/link' -export function BridgeTransactionTable({ queryResult }) { - const handlePending = (date) => { - const now = new Date().getTime() - const timeDiff = now - date * 1000 - if (timeDiff > 86400000) { - return

Indexing

- } else { - return

Pending

- } - } - +export const BridgeTransactionTable = ({ queryResult }) => { const tableRows = [] queryResult?.map((txn) => { const { kappa, pending, fromInfo, toInfo } = txn - // ] const items = [ -
-
- - sent - - on - -
-
- to - {pending ? ( + hash: txn.kappa, + chainIdFrom: txn.fromInfo.chainID, + chainIdTo: txn.toInfo?.chainID, + })} + className="block w-full no-underline group" + > +
+
+ + {new Date(fromInfo.time * 1000).toDateString() === + new Date().toDateString() + ? 'Today' + : formatDate( + new Date(fromInfo.time * 1000).toISOString().split('T')[0] + )} + + + {new Date(fromInfo.time * 1000).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + })} + +
+
- ) : ( - - )} - on {pending ? ( - + ) : fromInfo.address === toInfo.address ? ( + to Self + ) : ( + + )} +
+
+ - ) : ( - - )} -
-
- {fromInfo.time - ? timeAgo({ timestamp: fromInfo.time }) + ' ago' - : timeAgo({ timestamp: toInfo?.time }) + ' ago'} -
+
+
+ +
+
+ + +
+
+ {fromInfo.time + ? timeAgo({ timestamp: fromInfo.time }) + ' ago' + : timeAgo({ timestamp: toInfo?.time }) + ' ago'} +
+
+ â–¶ +
- + , ] const row = { items, diff --git a/packages/explorer-ui/components/TransactionTable/TableBody.tsx b/packages/explorer-ui/components/TransactionTable/TableBody.tsx index 99d9533805..8aee1c94ed 100644 --- a/packages/explorer-ui/components/TransactionTable/TableBody.tsx +++ b/packages/explorer-ui/components/TransactionTable/TableBody.tsx @@ -7,9 +7,9 @@ export function TableBody({ rows }) { ))} diff --git a/packages/explorer-ui/components/icons/Arrow.tsx b/packages/explorer-ui/components/icons/Arrow.tsx new file mode 100644 index 0000000000..24d71fb0eb --- /dev/null +++ b/packages/explorer-ui/components/icons/Arrow.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +interface ArrowProps { + className?: string; + color?: string; +} + +const Arrow: React.FC = ({ className, color = 'currentColor' }) => ( + + + +); + +export default Arrow; diff --git a/packages/explorer-ui/components/misc/ChainInfo.tsx b/packages/explorer-ui/components/misc/ChainInfo.tsx index 0221667f3b..038a070255 100644 --- a/packages/explorer-ui/components/misc/ChainInfo.tsx +++ b/packages/explorer-ui/components/misc/ChainInfo.tsx @@ -2,6 +2,7 @@ import { QuestionMarkCircleIcon } from '@heroicons/react/outline' import { getChainUrl, getExplorerTxUrl } from '@urls' import Image from 'next/image' import { CHAINS } from 'synapse-constants' +import Link from 'next/link' const CHAINS_BY_ID = CHAINS.CHAINS_BY_ID @@ -13,6 +14,7 @@ interface ChainInfoProps { txHash?: string useExplorerLink?: boolean noLink?: boolean + className?: string } export function ChainInfo({ @@ -23,6 +25,7 @@ export function ChainInfo({ txHash, useExplorerLink = false, noLink = false, + className = '', }: ChainInfoProps) { const chain = CHAINS_BY_ID[chainId] let link = '' @@ -35,34 +38,34 @@ export function ChainInfo({ link = getChainUrl({ chainId }) } - if (chain) { + const content = ( + <> + {chain?.name} +

{chain.name}

+ + ) return ( -
-
- {chain?.name} -

{chain.name}

- {/* we should just add this link to the text */} - {/* {noLink ? null : ( - - ↗ - - )} */} -
+
+ +
+ {chain?.name} +

{chain.name}

+
+
) } else { return ( -
+
{ + const t = + chainId && tokenAddress && tokenAddressToToken(chainId, tokenAddress) let styledCoinClass if (styledCoin === true) { @@ -24,18 +26,18 @@ export function IconAndAmount({ } else { styledCoinClass = t && `${getCoinTextColor(t)} ${textSize}` } -2 + 2 let amount let showToken if (tokenSymbol) { - const displaySymbol = addressToSymbol({ tokenAddress, chainId }) || tokenSymbol + const displaySymbol = + addressToSymbol({ tokenAddress, chainId }) || tokenSymbol showToken =
{displaySymbol}
const dec = 10 ** addressToDecimals({ tokenAddress, chainId }) // Need a cleaner way of doing this. if (formattedValue > 10000000) { amount = formattedValue / (dec / 10 ** 6) - } - else { + } else { amount = formattedValue } } else { @@ -50,23 +52,23 @@ export function IconAndAmount({ } return ( -
-
+
+
{formatAmount(amount)}
- {showToken} + {tokenSymbol}
) diff --git a/packages/explorer-ui/components/misc/StyleAddress.tsx b/packages/explorer-ui/components/misc/StyleAddress.tsx index a81f21e88b..c35084a46f 100644 --- a/packages/explorer-ui/components/misc/StyleAddress.tsx +++ b/packages/explorer-ui/components/misc/StyleAddress.tsx @@ -1,10 +1,11 @@ import { ellipsizeString } from '@utils/ellipsizeString' import { getAddressesUrl } from '@urls' + export function StyleAddress({ sourceInfo, limiter = 4 }) { if (sourceInfo.address) { return ( ) } else { diff --git a/packages/explorer-ui/components/pages/Home/index.tsx b/packages/explorer-ui/components/pages/Home/index.tsx index 9f41560eb0..991599b077 100644 --- a/packages/explorer-ui/components/pages/Home/index.tsx +++ b/packages/explorer-ui/components/pages/Home/index.tsx @@ -30,7 +30,7 @@ const platformTitles = { MESSAGE_BUS: 'Message Bus', } -export function Home() { +export const Home = () => { const [currentTooltipIndex, setCurrentTooltipIndex] = useState(0) const [platform, setPlatform] = useState('ALL') const [transactionsArr, setTransactionsArr] = useState([]) @@ -148,16 +148,16 @@ export function Home() { />
- -
+ +
-
+
-
+
-
+
{platform === 'MESSAGE_BUS' ? null : (
-
+
-
+