diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..bcb0192 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,32 @@ +name: Build Rarimo TSS service docker image +on: + workflow_dispatch: + +jobs: + converge: + name: Converge + runs-on: ubuntu-latest + steps: + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install werf + uses: werf/actions/install@v1.2 + + - name: Log in to registry + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + + - name: Run echo + run: | + werf version + docker version + echo $GITHUB_REPOSITORY + echo $GITHUB_SHA + - name: Run Build + run: | + . $(werf ci-env github --as-file) + werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA \ No newline at end of file diff --git a/.github/workflows/actions_onlymain.yml b/.github/workflows/actions_onlymain.yml new file mode 100644 index 0000000..27c7b93 --- /dev/null +++ b/.github/workflows/actions_onlymain.yml @@ -0,0 +1,37 @@ +name: Build Rarimo TSS service docker image +on: + push: + branches: + - 'main' + - 'master' + - 'chains/mainnet' + - 'chains/mainnet-beta' + +jobs: + converge: + name: Converge + runs-on: ubuntu-latest + steps: + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install werf + uses: werf/actions/install@v1.2 + + - name: Log in to registry + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + + - name: Run echo + run: | + werf version + docker version + echo $GITHUB_REPOSITORY + echo $GITHUB_SHA + - name: Run Build + run: | + . $(werf ci-env github --as-file) + werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..af81140 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,34 @@ +name: Build Rarimo TSS service docker image tag +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + converge: + name: Converge + runs-on: ubuntu-latest + steps: + + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install werf + uses: werf/actions/install@v1.2 + + - name: Log in to registry + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + + - name: Run echo + run: | + werf version + docker version + echo $GITHUB_REPOSITORY + echo $GITHUB_REF_NAME + - name: Run Build + run: | + . $(werf ci-env github --as-file) + werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9d6476b..de49cb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM golang:1.18-alpine as buildbase -WORKDIR /go/src/gitlab.com/rarimo/savers/sol-saver-svc +WORKDIR /go/src/github.com/rarimo/sol-saver-svc COPY vendor . COPY . . @@ -8,7 +8,7 @@ ENV GO111MODULE="on" ENV CGO_ENABLED=0 ENV GOOS="linux" -RUN go build -o /usr/local/bin/sol-saver-svc gitlab.com/rarimo/savers/sol-saver-svc +RUN go build -o /usr/local/bin/sol-saver-svc github.com/rarimo/sol-saver-svc ### diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9a6ca12 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright 2023 Zero Block Global Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 355a5c6..1d8374c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,64 @@ # sol-saver-svc -Run service +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Saver service (oracle) to observe Solana bridge program deposit events. + +## Configuration + +To run that service you need a configuration file `config.yaml` with the following structure: + +```yaml +log: + disable_sentry: true + level: debug +listener: + addr: :8000 +rpc: + url: "" # solana node address +ws: + url: "" # solana node address + +listen: + chain: Solana + from_tx: "" + program_id: "" +broadcaster: + addr: "ip:8000" # broadcaster service address + sender_account: "" # account used in the broadcaster service +core: + addr: tcp://ip:26657 # your rarimo node address +cosmos: + addr: "ip:9090" # your rarimo node address +subscriber: + min_retry_period: 1s + max_retry_period: 10s +``` + +Also, some environment variables is required to run: +```yaml +- name: KV_VIPER_FILE + value: /config/config.yaml is the path to your config file +``` + +## Run + +* Vote mode: +```shell +sol-saver-svc run voter +``` + +* Saver mode +```shell +sol-saver-svc run saver +``` + +* Full mode (saver + voter) +```shell +sol-saver-svc run service +``` + +* Catchup old transactions from Solana +```shell +sol-saver-svc run saver-catchup +``` \ No newline at end of file diff --git a/go.mod b/go.mod index 00d391c..0eb9334 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module gitlab.com/rarimo/savers/sol-saver-svc +module github.com/rarimo/sol-saver-svc go 1.18 @@ -8,17 +8,17 @@ require ( github.com/gagliardetto/binary v0.7.1 github.com/gogo/protobuf v1.3.3 github.com/near/borsh-go v0.3.1 - github.com/olegfomenko/solana-go v1.4.2-0.20220825130821-a1f0ac7c5b0a + github.com/olegfomenko/solana-go v1.4.2-0.20221104112355-eb3546bb0e15 + github.com/rarimo/rarimo-core v1.0.6 + github.com/rarimo/saver-grpc-lib v1.0.0 + github.com/rarimo/solana-program-go v1.0.0 github.com/spf13/cast v1.5.1 github.com/tendermint/tendermint v0.34.27 gitlab.com/distributed_lab/figure v2.1.0+incompatible gitlab.com/distributed_lab/kit v1.11.1 gitlab.com/distributed_lab/logan v3.8.1+incompatible gitlab.com/distributed_lab/running v0.0.0-20200706131153-4af0e83eb96c - gitlab.com/rarimo/rarimo-core v0.0.0-20230709130226-0707c00fa5cd - gitlab.com/rarimo/savers/saver-grpc-lib v0.0.0-20230621141315-a8a8ba3ce626 - gitlab.com/rarimo/solana-program-go v0.0.0-20230201224757-533c0edcb066 - google.golang.org/grpc v1.55.0 + google.golang.org/grpc v1.58.0 ) require ( @@ -115,6 +115,7 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/rarimo/broadcaster-svc v1.0.2 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect @@ -136,23 +137,22 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect - gitlab.com/rarimo/broadcaster-svc v0.0.0-20221130133449-dfacd1486515 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -163,7 +163,7 @@ replace ( github.com/agl/ed25519 => github.com/bnb-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43 github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.0-beta github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => gitlab.com/rarimo/cosmos-sdk v0.46.7-rc.6 + github.com/cosmos/cosmos-sdk => github.com/rarimo/cosmos-sdk v0.46.7 github.com/cosmos/iavl => github.com/cosmos/iavl v0.19.4 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/tendermint/tendermint => github.com/tendermint/tendermint v0.34.24 diff --git a/go.sum b/go.sum index 7ae0c89..af9327e 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34h cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -146,7 +146,7 @@ cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -268,7 +268,7 @@ cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQE cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= +cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -456,8 +456,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= @@ -521,6 +521,7 @@ cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAm cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= @@ -864,7 +865,7 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -884,7 +885,7 @@ github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -1108,8 +1109,8 @@ github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYX github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olegfomenko/solana-go v1.4.2-0.20220825130821-a1f0ac7c5b0a h1:Ws7if5rXlW7Nc0w0esiTFG2JZLmcB0B9noHR9A2wNyA= -github.com/olegfomenko/solana-go v1.4.2-0.20220825130821-a1f0ac7c5b0a/go.mod h1:UTSTTiLq4f8/gZ0o/00xcbCRdHpKg1JjGaZUh2WC134= +github.com/olegfomenko/solana-go v1.4.2-0.20221104112355-eb3546bb0e15 h1:AYe5c0QcEMVhiEUp0Ba+dCoYf9exyczQMcx91LiwClE= +github.com/olegfomenko/solana-go v1.4.2-0.20221104112355-eb3546bb0e15/go.mod h1:lQf4ND5GWsypR38bHe2elYMGBTkJsYiwasvrhGN5cK0= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -1170,6 +1171,16 @@ github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJf github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= +github.com/rarimo/broadcaster-svc v1.0.2 h1:ExQcjjWCRP5+POLDlZHrTD1ffUsBH+Dgv5FAgcP3BXc= +github.com/rarimo/broadcaster-svc v1.0.2/go.mod h1:lYIHy+X4IqQt4eBdtMN/V352H3EV0/gO8G+32SFwUWI= +github.com/rarimo/cosmos-sdk v0.46.7 h1:jU2PiWzc+19SF02cXM0O0puKPeH1C6Q6t2lzJ9s1ejc= +github.com/rarimo/cosmos-sdk v0.46.7/go.mod h1:fqKqz39U5IlEFb4nbQ72951myztsDzFKKDtffYJ63nk= +github.com/rarimo/rarimo-core v1.0.6 h1:b1V6OSoI4i8CVnF3lVluH6XdYLswK/tUBjgnbrPvgG8= +github.com/rarimo/rarimo-core v1.0.6/go.mod h1:Onkd0EJP94hw4dT/2KH7QXRwDG4eIGeaMffSjA1i6/s= +github.com/rarimo/saver-grpc-lib v1.0.0 h1:MGUVjYg7unmodYczVsLqlqZNkT4CIgKqdo6aQtL1qdE= +github.com/rarimo/saver-grpc-lib v1.0.0/go.mod h1:DpugWK5B7Hi0bdC3MPe/9FD2zCxaRwsyykdwxtF1Zgg= +github.com/rarimo/solana-program-go v1.0.0 h1:i64ykqd0quN2FHeukJSzs4XuMHkOpGYS9i5lR4UBH+4= +github.com/rarimo/solana-program-go v1.0.0/go.mod h1:/5bSwRXg2ERN8rSMjp2rsoOnaW6pzqX8FkQ4SCnDPjk= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= @@ -1316,18 +1327,6 @@ gitlab.com/distributed_lab/logan v3.8.1+incompatible h1:bYiP3P0AA0cpAL/fyOYWGq1a gitlab.com/distributed_lab/logan v3.8.1+incompatible/go.mod h1:25oL/FPFXmyYzWeA6vahMvnFJV8P7mOx0jZhRP7nhlc= gitlab.com/distributed_lab/running v0.0.0-20200706131153-4af0e83eb96c h1:cpIjV8C//7sLVvMcBaFGopI8sMcCw8Za7T0HIf52esU= gitlab.com/distributed_lab/running v0.0.0-20200706131153-4af0e83eb96c/go.mod h1:4TnADX84dQjQMRHKIMPCVL0L97rD/Jxv0xDbrN6aKzk= -gitlab.com/rarimo/broadcaster-svc v0.0.0-20221130133449-dfacd1486515 h1:TNIHf2/50EpuMLBM4WP0/5IgQjeGmJIKl40r3iKhMRo= -gitlab.com/rarimo/broadcaster-svc v0.0.0-20221130133449-dfacd1486515/go.mod h1:dqIQPbo4EaIofCrTiv97IUGxLtq9IJkLecuBpdRErIY= -gitlab.com/rarimo/cosmos-sdk v0.46.7-rc.6 h1:+rleF7jtwnoqPepJuiBexpebQmW63qi/V60sN4F1ANE= -gitlab.com/rarimo/cosmos-sdk v0.46.7-rc.6/go.mod h1:fqKqz39U5IlEFb4nbQ72951myztsDzFKKDtffYJ63nk= -gitlab.com/rarimo/rarimo-core v0.0.0-20230621113332-c70c7e194a9d h1:+MfeQJK49MHqx8lcYZxWBW6CkJc6231KjZsbYXnqzkY= -gitlab.com/rarimo/rarimo-core v0.0.0-20230621113332-c70c7e194a9d/go.mod h1:MjIRrlh4WsHLxwKMldD6lap0CzO5GeuUKpbGl091lec= -gitlab.com/rarimo/rarimo-core v0.0.0-20230709130226-0707c00fa5cd h1:tL/a+JqzqbBKGhyIfpzwufnlb52gNX/hpBsFuttjTNo= -gitlab.com/rarimo/rarimo-core v0.0.0-20230709130226-0707c00fa5cd/go.mod h1:gu7K/hnfTAHPVzy/kj0r4M6oCuZ70SS96jbnsNekbkc= -gitlab.com/rarimo/savers/saver-grpc-lib v0.0.0-20230621141315-a8a8ba3ce626 h1:Yv82irrDWg6qhBPpV3hRz2sl++7Jxi5FQNkRxs9/mwM= -gitlab.com/rarimo/savers/saver-grpc-lib v0.0.0-20230621141315-a8a8ba3ce626/go.mod h1:HD+aTxRoy9vGfYfEgNtoV/00vQiUVJy8Ggd4+sHazpM= -gitlab.com/rarimo/solana-program-go v0.0.0-20230201224757-533c0edcb066 h1:Tq8DrAKsnAFpiE+QaQkHsWURylXS5N0GG88ksH67EKk= -gitlab.com/rarimo/solana-program-go v0.0.0-20230201224757-533c0edcb066/go.mod h1:Fivs168ovoGl0rvOb2HIfwRPebK4i7EDJrcHxguT4gw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= @@ -1383,8 +1382,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1509,8 +1508,8 @@ golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= 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 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1538,7 +1537,7 @@ golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1651,8 +1650,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1660,8 +1659,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1676,8 +1675,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1827,7 +1826,7 @@ google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/ google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -1964,12 +1963,12 @@ google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e h1:Ao9GzfUMPH3zjVfzXG5rlWlk+Q8MXWKwWpwVQE1MXfw= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1988,8 +1987,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ 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.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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/internal/cli/main.go b/internal/cli/main.go index a468fa1..a92fb98 100644 --- a/internal/cli/main.go +++ b/internal/cli/main.go @@ -4,16 +4,16 @@ import ( "context" "github.com/alecthomas/kingpin" + rarimotypes "github.com/rarimo/rarimo-core/x/rarimocore/types" + "github.com/rarimo/saver-grpc-lib/voter" + "github.com/rarimo/saver-grpc-lib/voter/verifiers" + "github.com/rarimo/sol-saver-svc/internal/config" + "github.com/rarimo/sol-saver-svc/internal/service/grpc" + "github.com/rarimo/sol-saver-svc/internal/service/saver/catchup" + "github.com/rarimo/sol-saver-svc/internal/service/saver/listener" + voterservice "github.com/rarimo/sol-saver-svc/internal/service/voter" "gitlab.com/distributed_lab/kit/kv" "gitlab.com/distributed_lab/logan/v3" - rarimotypes "gitlab.com/rarimo/rarimo-core/x/rarimocore/types" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter/verifiers" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/config" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/grpc" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/saver/catchup" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/saver/listener" - voterservice "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/voter" ) func Run(args []string) bool { diff --git a/internal/config/main.go b/internal/config/main.go index 7cfeef6..c40dc1e 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -2,12 +2,12 @@ package config import ( "github.com/olegfomenko/solana-go/rpc" + "github.com/rarimo/saver-grpc-lib/broadcaster" + "github.com/rarimo/saver-grpc-lib/metrics" + "github.com/rarimo/saver-grpc-lib/voter" "github.com/tendermint/tendermint/rpc/client/http" "gitlab.com/distributed_lab/kit/comfig" "gitlab.com/distributed_lab/kit/kv" - "gitlab.com/rarimo/savers/saver-grpc-lib/broadcaster" - "gitlab.com/rarimo/savers/saver-grpc-lib/metrics" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter" "google.golang.org/grpc" ) diff --git a/internal/service/grpc/grpc_impl.go b/internal/service/grpc/grpc_impl.go index bca20bf..cb94770 100644 --- a/internal/service/grpc/grpc_impl.go +++ b/internal/service/grpc/grpc_impl.go @@ -4,10 +4,10 @@ import ( "context" "net" + rarimotypes "github.com/rarimo/rarimo-core/x/rarimocore/types" + lib "github.com/rarimo/saver-grpc-lib/grpc" + "github.com/rarimo/saver-grpc-lib/voter" "gitlab.com/distributed_lab/logan/v3" - rarimotypes "gitlab.com/rarimo/rarimo-core/x/rarimocore/types" - lib "gitlab.com/rarimo/savers/saver-grpc-lib/grpc" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/service/saver/catchup/main.go b/internal/service/saver/catchup/main.go index f3a4508..73faadb 100644 --- a/internal/service/saver/catchup/main.go +++ b/internal/service/saver/catchup/main.go @@ -6,11 +6,11 @@ import ( "github.com/olegfomenko/solana-go" "github.com/olegfomenko/solana-go/rpc" + "github.com/rarimo/sol-saver-svc/internal/config" + "github.com/rarimo/sol-saver-svc/internal/service" + "github.com/rarimo/sol-saver-svc/internal/service/saver" "gitlab.com/distributed_lab/logan/v3" "gitlab.com/distributed_lab/logan/v3/errors" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/config" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/saver" ) type Service struct { diff --git a/internal/service/saver/listener/main.go b/internal/service/saver/listener/main.go index ba976d9..fbe2b72 100644 --- a/internal/service/saver/listener/main.go +++ b/internal/service/saver/listener/main.go @@ -7,13 +7,13 @@ import ( "github.com/olegfomenko/solana-go" "github.com/olegfomenko/solana-go/rpc" "github.com/olegfomenko/solana-go/rpc/ws" + "github.com/rarimo/saver-grpc-lib/metrics" + "github.com/rarimo/sol-saver-svc/internal/config" + "github.com/rarimo/sol-saver-svc/internal/service" + "github.com/rarimo/sol-saver-svc/internal/service/saver" "gitlab.com/distributed_lab/logan/v3" "gitlab.com/distributed_lab/logan/v3/errors" "gitlab.com/distributed_lab/running" - "gitlab.com/rarimo/savers/saver-grpc-lib/metrics" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/config" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/saver" ) const runnerName = "bridge-listener" diff --git a/internal/service/saver/main.go b/internal/service/saver/main.go index 9f0c612..030fcdf 100644 --- a/internal/service/saver/main.go +++ b/internal/service/saver/main.go @@ -5,14 +5,14 @@ import ( "fmt" "github.com/olegfomenko/solana-go" + oracletypes "github.com/rarimo/rarimo-core/x/oraclemanager/types" + "github.com/rarimo/saver-grpc-lib/broadcaster" + "github.com/rarimo/sol-saver-svc/internal/config" + "github.com/rarimo/sol-saver-svc/internal/service" + "github.com/rarimo/sol-saver-svc/internal/service/voter" + "github.com/rarimo/solana-program-go/contracts/bridge" "gitlab.com/distributed_lab/logan/v3" "gitlab.com/distributed_lab/logan/v3/errors" - oracletypes "gitlab.com/rarimo/rarimo-core/x/oraclemanager/types" - "gitlab.com/rarimo/savers/saver-grpc-lib/broadcaster" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/config" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service/voter" - "gitlab.com/rarimo/solana-program-go/contract" ) const ( @@ -26,7 +26,7 @@ type IOperator interface { type TxProcessor struct { log *logan.Entry program solana.PublicKey - operators map[contract.Instruction]IOperator + operators map[bridge.Instruction]IOperator broadcaster broadcaster.Broadcaster } @@ -35,10 +35,10 @@ func NewTxProcessor(cfg config.Config) *TxProcessor { log: cfg.Log(), program: cfg.ListenConf().ProgramId, broadcaster: cfg.Broadcaster(), - operators: map[contract.Instruction]IOperator{ - contract.InstructionDepositNative: voter.NewNativeOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), - contract.InstructionDepositFT: voter.NewFTOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), - contract.InstructionDepositNFT: voter.NewNFTOperator(cfg.ListenConf().Chain, cfg.SolanaRPC(), cfg.Cosmos()), + operators: map[bridge.Instruction]IOperator{ + bridge.InstructionDepositNative: voter.NewNativeOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), + bridge.InstructionDepositFT: voter.NewFTOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), + bridge.InstructionDepositNFT: voter.NewNFTOperator(cfg.ListenConf().Chain, cfg.SolanaRPC(), cfg.Cosmos()), }, } } @@ -49,7 +49,7 @@ func (s *TxProcessor) ProcessTransaction(ctx context.Context, sig solana.Signatu for index, instruction := range tx.Message.Instructions { if accounts[instruction.ProgramIDIndex] == s.program { - if operator, ok := s.operators[contract.Instruction(instruction.Data[DataInstructionCodeIndex])]; ok { + if operator, ok := s.operators[bridge.Instruction(instruction.Data[DataInstructionCodeIndex])]; ok { msg, err := operator.GetMessage(ctx, service.GetInstructionAccounts(accounts, instruction.Accounts), instruction) if err != nil { return errors.Wrap(err, "error getting message") diff --git a/internal/service/voter/t_ft.go b/internal/service/voter/t_ft.go index 16b85c0..6a365c1 100644 --- a/internal/service/voter/t_ft.go +++ b/internal/service/voter/t_ft.go @@ -8,13 +8,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/near/borsh-go" "github.com/olegfomenko/solana-go" + oracletypes "github.com/rarimo/rarimo-core/x/oraclemanager/types" + rarimotypes "github.com/rarimo/rarimo-core/x/rarimocore/types" + tokentypes "github.com/rarimo/rarimo-core/x/tokenmanager/types" + "github.com/rarimo/saver-grpc-lib/voter/verifiers" + "github.com/rarimo/solana-program-go/contracts/bridge" "gitlab.com/distributed_lab/logan/v3" "gitlab.com/distributed_lab/logan/v3/errors" - oracletypes "gitlab.com/rarimo/rarimo-core/x/oraclemanager/types" - rarimotypes "gitlab.com/rarimo/rarimo-core/x/rarimocore/types" - tokentypes "gitlab.com/rarimo/rarimo-core/x/tokenmanager/types" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter/verifiers" - "gitlab.com/rarimo/solana-program-go/contract" "google.golang.org/grpc" ) @@ -54,12 +54,12 @@ func (f *ftOperator) ParseTransaction(ctx context.Context, accounts []solana.Pub } func (f *ftOperator) GetMessage(ctx context.Context, accounts []solana.PublicKey, instruction solana.CompiledInstruction) (*oracletypes.MsgCreateTransferOp, error) { - var args contract.DepositFTArgs + var args bridge.DepositFTArgs if err := borsh.Deserialize(&args, instruction.Data); err != nil { return nil, errors.Wrap(err, "error desser tx args") } - address := hexutil.Encode(accounts[contract.DepositFTMintIndex].Bytes()) + address := hexutil.Encode(accounts[bridge.DepositFTMintIndex].Bytes()) from := tokentypes.OnChainItemIndex{ Chain: f.chain, @@ -73,7 +73,7 @@ func (f *ftOperator) GetMessage(ctx context.Context, accounts []solana.PublicKey } msg := &oracletypes.MsgCreateTransferOp{ - Sender: accounts[contract.DepositFTOwnerIndex].String(), + Sender: accounts[bridge.DepositFTOwnerIndex].String(), Receiver: args.ReceiverAddress, Amount: fmt.Sprint(args.Amount), From: from, diff --git a/internal/service/voter/t_native.go b/internal/service/voter/t_native.go index 321b6e7..39ca395 100644 --- a/internal/service/voter/t_native.go +++ b/internal/service/voter/t_native.go @@ -8,13 +8,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/near/borsh-go" "github.com/olegfomenko/solana-go" + oracletypes "github.com/rarimo/rarimo-core/x/oraclemanager/types" + rarimotypes "github.com/rarimo/rarimo-core/x/rarimocore/types" + tokentypes "github.com/rarimo/rarimo-core/x/tokenmanager/types" + "github.com/rarimo/saver-grpc-lib/voter/verifiers" + "github.com/rarimo/solana-program-go/contracts/bridge" "gitlab.com/distributed_lab/logan/v3" "gitlab.com/distributed_lab/logan/v3/errors" - oracletypes "gitlab.com/rarimo/rarimo-core/x/oraclemanager/types" - rarimotypes "gitlab.com/rarimo/rarimo-core/x/rarimocore/types" - tokentypes "gitlab.com/rarimo/rarimo-core/x/tokenmanager/types" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter/verifiers" - "gitlab.com/rarimo/solana-program-go/contract" "google.golang.org/grpc" ) @@ -54,7 +54,7 @@ func (n *nativeOperator) ParseTransaction(ctx context.Context, accounts []solana } func (n *nativeOperator) GetMessage(ctx context.Context, accounts []solana.PublicKey, instruction solana.CompiledInstruction) (*oracletypes.MsgCreateTransferOp, error) { - var args contract.DepositNativeArgs + var args bridge.DepositNativeArgs if err := borsh.Deserialize(&args, instruction.Data); err != nil { return nil, errors.Wrap(err, "error desser tx args") } @@ -72,7 +72,7 @@ func (n *nativeOperator) GetMessage(ctx context.Context, accounts []solana.Publi msg := &oracletypes.MsgCreateTransferOp{ Receiver: args.ReceiverAddress, - Sender: accounts[contract.DepositNativeOwnerIndex].String(), + Sender: accounts[bridge.DepositNativeOwnerIndex].String(), Amount: fmt.Sprint(args.Amount), From: from, To: *to, diff --git a/internal/service/voter/t_nft.go b/internal/service/voter/t_nft.go index 76a171e..fbf37c7 100644 --- a/internal/service/voter/t_nft.go +++ b/internal/service/voter/t_nft.go @@ -8,13 +8,13 @@ import ( "github.com/near/borsh-go" "github.com/olegfomenko/solana-go" "github.com/olegfomenko/solana-go/rpc" + oracletypes "github.com/rarimo/rarimo-core/x/oraclemanager/types" + rarimotypes "github.com/rarimo/rarimo-core/x/rarimocore/types" + tokentypes "github.com/rarimo/rarimo-core/x/tokenmanager/types" + "github.com/rarimo/saver-grpc-lib/voter/verifiers" + "github.com/rarimo/solana-program-go/contracts/bridge" + "github.com/rarimo/solana-program-go/metaplex" "gitlab.com/distributed_lab/logan/v3/errors" - oracletypes "gitlab.com/rarimo/rarimo-core/x/oraclemanager/types" - rarimotypes "gitlab.com/rarimo/rarimo-core/x/rarimocore/types" - tokentypes "gitlab.com/rarimo/rarimo-core/x/tokenmanager/types" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter/verifiers" - "gitlab.com/rarimo/solana-program-go/contract" - "gitlab.com/rarimo/solana-program-go/metaplex" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -56,13 +56,13 @@ func (f *nftOperator) ParseTransaction(ctx context.Context, accounts []solana.Pu } func (f *nftOperator) GetMessage(ctx context.Context, accounts []solana.PublicKey, instruction solana.CompiledInstruction) (*oracletypes.MsgCreateTransferOp, error) { - var args contract.DepositNFTArgs + var args bridge.DepositNFTArgs if err := borsh.Deserialize(&args, instruction.Data); err != nil { return nil, errors.Wrap(err, "error desser tx args") } - tokenId := hexutil.Encode(accounts[contract.DepositNFTMintIndex].Bytes()) - address, err := f.getTokenCollectionAddress(accounts[contract.DepositNFTMintIndex]) + tokenId := hexutil.Encode(accounts[bridge.DepositNFTMintIndex].Bytes()) + address, err := f.getTokenCollectionAddress(accounts[bridge.DepositNFTMintIndex]) if err != nil { return nil, errors.Wrap(err, "error getting collection address") } @@ -89,7 +89,7 @@ func (f *nftOperator) GetMessage(ctx context.Context, accounts []solana.PublicKe msg := &oracletypes.MsgCreateTransferOp{ Receiver: args.ReceiverAddress, - Sender: accounts[contract.DepositNFTOwnerIndex].String(), + Sender: accounts[bridge.DepositNFTOwnerIndex].String(), Amount: "1", From: from, To: *to, diff --git a/internal/service/voter/transfer.go b/internal/service/voter/transfer.go index a077ae2..1090189 100644 --- a/internal/service/voter/transfer.go +++ b/internal/service/voter/transfer.go @@ -6,11 +6,11 @@ import ( "github.com/olegfomenko/solana-go" "github.com/olegfomenko/solana-go/rpc" - rarimotypes "gitlab.com/rarimo/rarimo-core/x/rarimocore/types" - "gitlab.com/rarimo/savers/saver-grpc-lib/voter/verifiers" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/config" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/service" - "gitlab.com/rarimo/solana-program-go/contract" + rarimotypes "github.com/rarimo/rarimo-core/x/rarimocore/types" + "github.com/rarimo/saver-grpc-lib/voter/verifiers" + "github.com/rarimo/sol-saver-svc/internal/config" + "github.com/rarimo/sol-saver-svc/internal/service" + "github.com/rarimo/solana-program-go/contracts/bridge" ) const DataInstructionCodeIndex = 0 @@ -23,7 +23,7 @@ type TransferOperator struct { solana *rpc.Client program solana.PublicKey chain string - operators map[contract.Instruction]IOperator + operators map[bridge.Instruction]IOperator } func NewTransferOperator(cfg config.Config) *TransferOperator { @@ -31,10 +31,10 @@ func NewTransferOperator(cfg config.Config) *TransferOperator { solana: cfg.SolanaRPC(), program: cfg.ListenConf().ProgramId, chain: cfg.ListenConf().Chain, - operators: map[contract.Instruction]IOperator{ - contract.InstructionDepositNative: NewNativeOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), - contract.InstructionDepositFT: NewFTOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), - contract.InstructionDepositNFT: NewNFTOperator(cfg.ListenConf().Chain, cfg.SolanaRPC(), cfg.Cosmos()), + operators: map[bridge.Instruction]IOperator{ + bridge.InstructionDepositNative: NewNativeOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), + bridge.InstructionDepositFT: NewFTOperator(cfg.ListenConf().Chain, cfg.Log(), cfg.Cosmos()), + bridge.InstructionDepositNFT: NewNFTOperator(cfg.ListenConf().Chain, cfg.SolanaRPC(), cfg.Cosmos()), }, } } @@ -68,7 +68,7 @@ func (t *TransferOperator) VerifyTransfer(ctx context.Context, tx, eventId strin return verifiers.ErrWrongOperationContent } - operator, ok := t.operators[contract.Instruction(instruction.Data[DataInstructionCodeIndex])] + operator, ok := t.operators[bridge.Instruction(instruction.Data[DataInstructionCodeIndex])] if !ok { return verifiers.ErrWrongOperationContent } diff --git a/main.go b/main.go index bf6758c..65085bf 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "gitlab.com/rarimo/savers/sol-saver-svc/internal/cli" + "github.com/rarimo/sol-saver-svc/internal/cli" ) func main() { diff --git a/werf-giterminism.yaml b/werf-giterminism.yaml deleted file mode 100644 index 30f1fdc..0000000 --- a/werf-giterminism.yaml +++ /dev/null @@ -1,4 +0,0 @@ -giterminismConfigVersion: 1 -config: - goTemplateRendering: - allowEnvVariables: ["CI_JOB_TOKEN"] diff --git a/werf.yaml b/werf.yaml index cfef87d..5b91581 100644 --- a/werf.yaml +++ b/werf.yaml @@ -4,30 +4,28 @@ project: "backend" image: builder from: golang:1.18-alpine docker: - WORKDIR: /go/src/gitlab.com/rarimo/savers/sol-saver-svc + WORKDIR: /go/src/github.com/rarimo/sol-saver-svc git: - add: / - to: /go/src/gitlab.com/rarimo/savers/sol-saver-svc + to: /go/src/github.com/rarimo/sol-saver-svc stageDependencies: setup: - "**/*" shell: install: - apk add git build-base - - git config --global url."https://gitlab-ci-token:{{ env "CI_JOB_TOKEN" }}@gitlab.com/".insteadOf https://gitlab.com/ - - echo "machine gitlab.com login gitlab-ci-token password {{ env "CI_JOB_TOKEN" }}" > ~/.netrc - - go env -w GOPRIVATE=gitlab.com/* - - go env -w GONOSUMDB=gitlab.com/* - - go env -w GONOPROXY=gitlab.com/* - - cd /go/src/gitlab.com/rarimo/savers/sol-saver-svc + - go env -w GOPRIVATE=github.com/* + - go env -w GONOSUMDB=github.com/* + - go env -w GONOPROXY=github.com/* + - cd /go/src/github.com/rarimo/sol-saver-svc - go mod tidy - go mod vendor setup: - export CGO_ENABLED=0 - export GO111MODULE=on - export GOOS=linux - - cd /go/src/gitlab.com/rarimo/savers/sol-saver-svc - - go build -o /usr/local/bin/sol-saver-svc /go/src/gitlab.com/rarimo/savers/sol-saver-svc + - cd /go/src/github.com/rarimo/sol-saver-svc + - go build -o /usr/local/bin/sol-saver-svc /go/src/github.com/rarimo/sol-saver-svc --- image: service