diff --git a/config/config.go b/config/config.go index 2f2677c5..7082786a 100644 --- a/config/config.go +++ b/config/config.go @@ -14,30 +14,32 @@ import ( ) type Config struct { - Env string - Git string - LogLevel string - ZapLevel zapcore.Level - ReadDbUrl string - ReadDbReplicas []string - WriteDbUrl string - RunMigrations bool - EsUrl string - Nodes []Node - DeadNodes []string - DelegatePrivateKey string - AxiomToken string - AxiomDataset string - NetworkTakeRate float64 - SolanaConfig SolanaConfig - AntiAbuseOracles []string - Rewards []rewards.Reward - AudiusdURL string - ChainId string - BirdeyeToken string - SolanaIndexerWorkers int - SolanaIndexerRetryInterval time.Duration - CommsMessagePush bool + Env string + Git string + LogLevel string + ZapLevel zapcore.Level + ReadDbUrl string + ReadDbReplicas []string + WriteDbUrl string + RunMigrations bool + EsUrl string + Nodes []Node + DeadNodes []string + DelegatePrivateKey string + AxiomToken string + AxiomDataset string + NetworkTakeRate float64 + SolanaConfig SolanaConfig + AntiAbuseOracles []string + Rewards []rewards.Reward + AudiusdURL string + ChainId string + BirdeyeToken string + SolanaIndexerWorkers int + SolanaIndexerRetryInterval time.Duration + CommsMessagePush bool + AudiusdChainID uint + AudiusdEntityManagerAddress string } var Cfg = Config{ @@ -86,6 +88,9 @@ func init() { Cfg.AudiusdURL = "http://audius-protocol-creator-node-1" Cfg.ChainId = "audius-devnet" Cfg.SolanaIndexerWorkers = 1 + + Cfg.AudiusdChainID = core_config.DevAcdcChainID + Cfg.AudiusdEntityManagerAddress = core_config.DevAcdcAddress case "stage": fallthrough case "staging": @@ -98,6 +103,9 @@ func init() { Cfg.Rewards = core_config.MakeRewards(core_config.StageClaimAuthorities, core_config.StageRewardExtensions) Cfg.AudiusdURL = "creatornode11.staging.audius.co" Cfg.ChainId = "audius-testnet-alpha" + + Cfg.AudiusdChainID = core_config.StageAcdcChainID + Cfg.AudiusdEntityManagerAddress = core_config.StageAcdcAddress case "prod": fallthrough case "production": @@ -112,6 +120,9 @@ func init() { Cfg.Rewards = core_config.MakeRewards(core_config.ProdClaimAuthorities, core_config.ProdRewardExtensions) Cfg.AudiusdURL = "creatornode.audius.co" Cfg.ChainId = "audius-mainnet-alpha-beta" + + Cfg.AudiusdChainID = core_config.ProdAcdcChainID + Cfg.AudiusdEntityManagerAddress = core_config.ProdAcdcAddress default: log.Fatalf("Unknown environment: %s", env) } diff --git a/database/seed.go b/database/seed.go index 857e294c..29e3b5ee 100644 --- a/database/seed.go +++ b/database/seed.go @@ -570,6 +570,15 @@ var ( "created_at": time.Now(), "updated_at": time.Now(), }, + "indexing_checkpoints": { + "tablename": nil, + "last_checkpoint": nil, + "signature": nil, + }, + "user_pubkeys": { + "user_id": nil, + "pubkey_base64": nil, + }, } ) diff --git a/go.mod b/go.mod index 3260184f..79bd84e5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,8 @@ module api.audius.co go 1.24.3 require ( - github.com/AudiusProject/audiusd v0.0.0-20250604041839-b2c3c6c47a69 + connectrpc.com/connect v1.18.1 + github.com/AudiusProject/audiusd v0.0.0-20250929223156-971e493d9d95 github.com/Doist/unfurlist v0.0.0-20250409100812-515f2735f8e5 github.com/aquasecurity/esquery v0.2.0 github.com/axiomhq/axiom-go v0.23.0 @@ -44,9 +45,10 @@ require ( ) require ( - connectrpc.com/connect v1.18.1 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/DataDog/zstd v1.5.2 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/StackExchange/wmi v1.2.1 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/andybalholm/brotli v1.2.0 // indirect github.com/artyom/autoflags v1.1.1 // indirect @@ -74,6 +76,7 @@ require ( github.com/cosmos/gogoproto v1.7.0 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/dgraph-io/badger/v4 v4.5.1 // indirect github.com/dgraph-io/ristretto/v2 v2.1.0 // indirect @@ -81,6 +84,7 @@ require ( github.com/dolthub/maphash v0.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dyatlov/go-opengraph v0.0.0-20210112100619-dae8665a5b09 // indirect + github.com/ebitengine/purego v0.8.2 // indirect github.com/elastic/elastic-transport-go/v8 v8.7.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.6.0 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect @@ -89,14 +93,17 @@ require ( github.com/fatih/color v1.18.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.9 // indirect github.com/gagliardetto/anchor-go v1.0.0 // indirect github.com/gammazero/deque v1.0.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect 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/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.4 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect @@ -112,6 +119,7 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect + github.com/golang-migrate/migrate/v4 v4.18.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -119,11 +127,16 @@ require ( github.com/google/flatbuffers v24.12.23+incompatible // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/rpc v1.2.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/holiman/uint256 v1.3.2 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect @@ -137,12 +150,15 @@ require ( github.com/labstack/echo/v4 v4.12.0 // indirect github.com/labstack/gommon v0.4.2 // indirect github.com/leodido/go-urn v1.4.0 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // indirect github.com/logrusorgru/aurora v2.0.3+incompatible // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/minio/highwayhash v1.0.3 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -155,6 +171,7 @@ require ( github.com/petermattis/goid v0.0.0-20250319124200-ccd6737f222a // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.62.0 // indirect @@ -162,18 +179,25 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rubenv/sql-migrate v1.7.0 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/savsgio/gotils v0.0.0-20250408102913-196191ec6287 // indirect github.com/segmentio/asm v1.2.0 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/supranational/blst v0.3.14 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tidwall/match v1.1.1 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.65.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect go.opencensus.io v0.24.0 // indirect @@ -186,7 +210,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect golang.org/x/crypto v0.41.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/net v0.43.0 // indirect golang.org/x/sys v0.35.0 // indirect golang.org/x/term v0.34.0 // indirect diff --git a/go.sum b/go.sum index 8de0d929..9e1bf574 100644 --- a/go.sum +++ b/go.sum @@ -5,17 +5,25 @@ filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmG filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/AudiusProject/audiusd v0.0.0-20250604041839-b2c3c6c47a69 h1:6ks4C2msYsj4/feeZC0hHHXMm80YqSpUPqZ0yTZFlDw= -github.com/AudiusProject/audiusd v0.0.0-20250604041839-b2c3c6c47a69/go.mod h1:a+CqkqLsNUhPJ1XwrLwKc+Hw9hwyuZrxpHQNWmKY38k= +github.com/AudiusProject/audiusd v0.0.0-20250929223156-971e493d9d95 h1:WFsRgyiZS8nBoVf7J3+IomwdPd4BxWvLp688wVqUYc0= +github.com/AudiusProject/audiusd v0.0.0-20250929223156-971e493d9d95/go.mod h1:mAuQqE/8xhN1ttRfMnyzCF5ewypUEpLY4OaEewPeUcI= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Doist/unfurlist v0.0.0-20250409100812-515f2735f8e5 h1:H6UB7AS+PZjJIET8jAdCrNwDgiytAFAkzZEcaOEHrvY= github.com/Doist/unfurlist v0.0.0-20250409100812-515f2735f8e5/go.mod h1:0+psOGlhok8Re5d2R6X+4HYcqQ9VvMNB866cyMoA/Z8= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= +github.com/adlio/schema v1.3.6/go.mod h1:qkxwLgPBd1FgLRHYVCmQT/rrBr3JH38J9LjmVzWNudg= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= @@ -48,9 +56,13 @@ github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/ github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -79,8 +91,12 @@ github.com/consensys/bavard v0.1.22 h1:Uw2CGvbXSZWhqK59X0VG/zOjpTFuOMcPLStrp1ihI github.com/consensys/bavard v0.1.22/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= github.com/consensys/gnark-crypto v0.14.0 h1:DDBdl4HaBtdQsq/wfMwJvZNE80sHidrK3Nfrefatm0E= github.com/consensys/gnark-crypto v0.14.0/go.mod h1:CU4UijNPsHawiVGNxe9co07FkzCeWHHrb1li/n1XoU0= +github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= +github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= @@ -90,10 +106,14 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= +github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/dgraph-io/badger/v4 v4.5.1 h1:7DCIXrQjo1LKmM96YD+hLVJ2EEsyyoWxJfpdd56HLps= github.com/dgraph-io/badger/v4 v4.5.1/go.mod h1:qn3Be0j3TfV4kPbVoK0arXCD1/nr1ftth6sbL5jxdoA= github.com/dgraph-io/ristretto/v2 v2.1.0 h1:59LjpOJLNDULHh8MC4UaegN52lC4JnO2dITsie/Pa8I= @@ -102,12 +122,24 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsYAX0YjD+8suexZDga5CctH4CCTx2+8= github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= +github.com/dhui/dktest v0.4.5 h1:uUfYBIVREmj/Rw6MvgmqNAYzTiKOHJak+enB5Di73MM= +github.com/dhui/dktest v0.4.5/go.mod h1:tmcyeHDKagvlDrz7gDKq4UAJOLIfVZYkfD5OnHDwcCo= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= +github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +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/dolthub/maphash v0.1.0 h1:bsQ7JsF4FkkWyrP3oCnFJgrCUAFbFf3kOl4L/QxPDyQ= github.com/dolthub/maphash v0.1.0/go.mod h1:gkg4Ch4CdCDu5h6PMriVLawB7koZ+5ijb9puGMV50a4= 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= github.com/dyatlov/go-opengraph v0.0.0-20210112100619-dae8665a5b09 h1:AQLr//nh20BzN3hIWj2+/Gt3FwSs8Nwo/nz4hMIcLPg= github.com/dyatlov/go-opengraph v0.0.0-20210112100619-dae8665a5b09/go.mod h1:nYia/MIs9OyvXXYboPmNOj0gVWo97Wx0sde+ZuKkoM4= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE= github.com/elastic/elastic-transport-go/v8 v8.7.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/go-elasticsearch/v7 v7.6.0 h1:sYpGLpEFHgLUKLsZUBfuaVI9QgHjS3JdH9fX4/z8QI8= @@ -132,6 +164,8 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -150,10 +184,14 @@ github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdF github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34= github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= +github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= @@ -163,6 +201,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +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/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= @@ -204,6 +244,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofiber/contrib/fiberzap/v2 v2.1.5 h1:mJnuTFd1gQw/DFUz1mkJlMmiwPGJ5cEfjuOxYugKmT4= @@ -220,6 +262,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-migrate/migrate/v4 v4.18.3 h1:EYGkoOsvgHHfm5U/naS1RP/6PL/Xv3S4B/swMiAmDLs= +github.com/golang-migrate/migrate/v4 v4.18.3/go.mod h1:99BKpIi6ruaaXRM1A77eqZ+FWPQ3cfRa+ZVy5bmWMaY= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -252,11 +298,14 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -268,13 +317,36 @@ github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= 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/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0= github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= @@ -287,6 +359,8 @@ github.com/jackc/pgxlisten v0.0.0-20241106001234-1d6f6656415c h1:bTgmg761ac9Ki27 github.com/jackc/pgxlisten v0.0.0-20241106001234-1d6f6656415c/go.mod h1:N4E1APLOYrbM11HH5kdqAjDa8RJWVwD3JqWpvH22h64= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +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/jgroeneveld/schema v1.0.0 h1:J0E10CrOkiSEsw6dfb1IfrDJD14pf6QLVJ3tRPl/syI= github.com/jgroeneveld/schema v1.0.0/go.mod h1:M14lv7sNMtGvo3ops1MwslaSYgDYxrSmbzWIQ0Mr5rs= github.com/jgroeneveld/trial v2.0.0+incompatible h1:d59ctdgor+VqdZCAiUfVN8K13s0ALDioG5DWwZNtRuQ= @@ -307,6 +381,8 @@ github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -333,6 +409,8 @@ github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9i github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -344,27 +422,39 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/maypok86/otter v1.2.4 h1:HhW1Pq6VdJkmWwcZZq19BlEQkHtI8xgsQzBVXJU0nfc= github.com/maypok86/otter v1.2.4/go.mod h1:mKLfoI7v1HOmQMwFgX4QkRk23mX6ge3RDvjdHOWG4R4= github.com/mcuadros/go-defaults v1.2.0 h1:FODb8WSf0uGaY8elWJAkoLL0Ri6AlZ1bFlenk56oZtc= github.com/mcuadros/go-defaults v1.2.0/go.mod h1:WEZtHEVIGYVDqkKSWBdWKUVdRyKlMfulPaGDWIVeCWY= github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= @@ -383,18 +473,42 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.15.0 h1:WjP/FQ/sk43MRmnEcT+MlDw2TFvkrXlprrPST/IudjU= +github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pashagolub/pgxmock/v4 v4.8.0 h1:RBtNUZXNG/ZwyOT7sJdSEx9RlAw19sgVPlnmEdlpT08= github.com/pashagolub/pgxmock/v4 v4.8.0/go.mod h1:9L57pC193h2aKRHVyiiE817avasIPZnPwPlw3JczWvM= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/petermattis/goid v0.0.0-20250319124200-ccd6737f222a h1:S+AGcmAESQ0pXCUNnRH7V+bOUIgkSX5qVt2cNKCrm0Q= github.com/petermattis/goid v0.0.0-20250319124200-ccd6737f222a/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= +github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= +github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -402,6 +516,10 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= +github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -427,6 +545,10 @@ github.com/rpcpool/yellowstone-grpc/examples/golang v0.0.0-20250605231917-29d62c github.com/rpcpool/yellowstone-grpc/examples/golang v0.0.0-20250605231917-29d62ca5d4ae/go.mod h1:dDiynCK1mRAhOOqTVuWYd+MpR2TVq47yVHwGL/lR+iM= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rubenv/sql-migrate v1.7.0 h1:HtQq1xyTN2ISmQDggnh0c9U3JlP8apWh8YO2jzlXpTI= +github.com/rubenv/sql-migrate v1.7.0/go.mod h1:S4wtDEG1CKn+0ShpTtzWhFpHHI5PvCUtiGI+C+Z2THE= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/savsgio/gotils v0.0.0-20250408102913-196191ec6287 h1:qIQ0tWF9vxGtkJa24bR+2i53WBCz1nW/Pc47oVYauC4= @@ -437,9 +559,13 @@ github.com/segmentio/encoding v0.4.1 h1:KLGaLSW0jrmhB58Nn4+98spfvPvmo4Ci1P/WIQ9w github.com/segmentio/encoding v0.4.1/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/speps/go-hashids/v2 v2.0.1 h1:ViWOEqWES/pdOSq+C1SLVa8/Tnsd52XC34RY7lt7m4g= github.com/speps/go-hashids/v2 v2.0.1/go.mod h1:47LKunwvDZki/uRVD6NImtyk712yFzIs3UF3KlHohGw= github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 h1:RN5mrigyirb8anBEtdjtHFIufXdacyTi6i4KBfeNXeo= @@ -478,6 +604,8 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g= +github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.65.0 h1:j/u3uzFEGFfRxw79iYzJN+TteTJwbYkru9uDp3d0Yf8= @@ -487,6 +615,8 @@ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+ github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= @@ -495,6 +625,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68= github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -547,8 +679,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -587,6 +719,7 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -594,11 +727,16 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.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/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -628,8 +766,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -663,6 +799,8 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/indexer/index_comment.go b/indexer/index_comment.go deleted file mode 100644 index 57556278..00000000 --- a/indexer/index_comment.go +++ /dev/null @@ -1,29 +0,0 @@ -package indexer - -import ( - "encoding/json" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/jackc/pgx/v5" -) - -func (ci *CoreIndexer) createComment(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var metadata GenericMetadata - if err := json.Unmarshal([]byte(em.Metadata), &metadata); err != nil { - return err - } - - args := pgx.NamedArgs{ - "comment_id": metadata.Data["comment_id"], - "user_id": em.UserId, - "text": metadata.Data["body"], - "entity_type": "track", - "entity_id": metadata.Data["track_id"], - - "txhash": txInfo.txhash, - "blockhash": txInfo.blockhash, - "blocknumber": txInfo.blocknumber, - } - - return ci.doInsert("comments", args) -} diff --git a/indexer/index_playlist.go b/indexer/index_playlist.go deleted file mode 100644 index f0afee47..00000000 --- a/indexer/index_playlist.go +++ /dev/null @@ -1,56 +0,0 @@ -package indexer - -import ( - "encoding/json" - - "maps" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/jackc/pgx/v5" -) - -func (ci *CoreIndexer) createPlaylist(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var metadata GenericMetadata - if err := json.Unmarshal([]byte(em.Metadata), &metadata); err != nil { - return err - } - - args := pgx.NamedArgs{ - "playlist_id": em.EntityId, - "playlist_owner_id": em.UserId, - "is_album": em.EntityType == "Album", - "is_private": false, - "playlist_contents": "{}", - "is_current": true, - "is_delete": false, - "created_at": txInfo.timestamp, - "updated_at": txInfo.timestamp, - "txhash": txInfo.txhash, - "is_image_autogenerated": false, - "is_scheduled_release": false, - } - maps.Copy(args, metadata.Data) - - delete(args, "cover_art_cid") - delete(args, "license") - - args["playlist_id"] = em.EntityId - args["playlist_owner_id"] = em.UserId - - return ci.doInsert("playlists", args) -} - -func (ci *CoreIndexer) updatePlaylist(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var metadata GenericMetadata - json.Unmarshal([]byte(em.Metadata), &metadata) - - args := pgx.NamedArgs{} - maps.Copy(args, metadata.Data) - - delete(args, "cover_art_cid") - - return ci.doUpdate("playlists", args, pgx.NamedArgs{ - "playlist_id": em.EntityId, - "playlist_owner_id": em.UserId, - }) -} diff --git a/indexer/index_playlist_test.go b/indexer/index_playlist_test.go deleted file mode 100644 index 1087548a..00000000 --- a/indexer/index_playlist_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package indexer - -import ( - "testing" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/stretchr/testify/assert" -) - -func TestUpdatePlaylist(t *testing.T) { - - txInfo := TxInfo{} - - err := ci.createPlaylist(txInfo, &core_proto.ManageEntityLegacy{ - EntityId: 1, - UserId: 1, - Metadata: toMetadata(map[string]any{ - "playlist_name": "Test Playlist", - }), - }) - assert.NoError(t, err) - assertCount(t, 1, `select count(*) from playlists where playlist_name = 'Test Playlist'`) - - err = ci.updatePlaylist(txInfo, &core_proto.ManageEntityLegacy{ - EntityId: 1, - UserId: 1, - Metadata: toMetadata(map[string]any{ - "playlist_name": "Test Playlist 2", - // "description": "A test playlist description", - // "cover_art_cid": "QmTestCID", - // "extra_field": "extra_value", - }), - }) - assert.NoError(t, err) - assertCount(t, 1, `select count(*) from playlists where playlist_name = 'Test Playlist 2'`) -} diff --git a/indexer/index_social_actions.go b/indexer/index_social_actions.go deleted file mode 100644 index 904cc22a..00000000 --- a/indexer/index_social_actions.go +++ /dev/null @@ -1,93 +0,0 @@ -package indexer - -import ( - "strings" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/jackc/pgx/v5" -) - -func (ci *CoreIndexer) followUser(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - args := pgx.NamedArgs{ - "blockhash": txInfo.blockhash, - "blocknumber": txInfo.blocknumber, - "follower_user_id": em.UserId, - "followee_user_id": em.EntityId, - "is_current": true, - "is_delete": false, - "created_at": txInfo.timestamp, - "txhash": txInfo.txhash, - "slot": 500, // TODO - } - return ci.doInsert("follows", args) -} - -func (ci *CoreIndexer) unfollowUser(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - return ci.doUpdate("follows", - pgx.NamedArgs{ - "is_delete": true, - }, - pgx.NamedArgs{ - "follower_user_id": em.UserId, - "followee_user_id": em.EntityId, - }) -} - -func (ci *CoreIndexer) repost(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - args := pgx.NamedArgs{ - "blockhash": txInfo.blockhash, - "blocknumber": txInfo.blocknumber, - "user_id": em.UserId, - "repost_item_id": em.EntityId, - "repost_type": strings.ToLower(em.EntityType), - "is_current": true, - "is_delete": false, - "created_at": txInfo.timestamp, - "txhash": txInfo.txhash, - "slot": 500, - "is_repost_of_repost": false, // todo - } - return ci.doInsert("reposts", args) -} - -func (ci *CoreIndexer) favorite(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - args := pgx.NamedArgs{ - "blockhash": txInfo.blockhash, - "blocknumber": txInfo.blocknumber, - "user_id": em.UserId, - "save_item_id": em.EntityId, - "save_type": strings.ToLower(em.EntityType), - "is_current": true, - "is_delete": false, - "created_at": txInfo.timestamp, - "txhash": txInfo.txhash, - "slot": 500, - } - return ci.doInsert("saves", args) -} - -func (ci *CoreIndexer) unfavorite(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - args := pgx.NamedArgs{ - "blockhash": txInfo.blockhash, - "blocknumber": txInfo.blocknumber, - "is_delete": true, - "txhash": txInfo.txhash, - "slot": 500, // TODO - } - return ci.doUpdate("saves", args, pgx.NamedArgs{ - "user_id": em.UserId, - "save_item_id": em.EntityId, - "save_type": strings.ToLower(em.EntityType), - }) -} - -func (ci *CoreIndexer) viewNotification(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - args := pgx.NamedArgs{ - "user_id": em.UserId, - "seen_at": txInfo.timestamp, - "blocknumber": txInfo.blocknumber, - "blockhash": txInfo.blockhash, - "txhash": txInfo.txhash, - } - return ci.doInsert("notification_seen", args) -} diff --git a/indexer/index_social_actions_test.go b/indexer/index_social_actions_test.go deleted file mode 100644 index f6f19a1c..00000000 --- a/indexer/index_social_actions_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package indexer - -import ( - "testing" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/stretchr/testify/assert" -) - -func TestFollows(t *testing.T) { - txInfo := TxInfo{} - err := ci.followUser(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 21, - EntityId: 22, - }) - assert.NoError(t, err) - - assertCount(t, 1, `select count(*) from follows where follower_user_id = 21 and followee_user_id = 22 and is_delete = false`) - assertCount(t, 1, `select follower_count from aggregate_user where user_id = 22`) - assertCount(t, 1, `select following_count from aggregate_user where user_id = 21`) - - err = ci.unfollowUser(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 21, - EntityId: 22, - }) - assert.NoError(t, err) - - assertCount(t, 1, `select count(*) from follows where follower_user_id = 21 and followee_user_id = 22 and is_delete = true`) - assertCount(t, 0, `select count(*) from follows where follower_user_id = 21 and followee_user_id = 22 and is_delete = false`) - - // triggers don't actually handle unfollow? - // assertCount(t, 0, `select follower_count from aggregate_user where user_id = 22`) - // assertCount(t, 0, `select following_count from aggregate_user where user_id = 21`) -} diff --git a/indexer/index_track.go b/indexer/index_track.go deleted file mode 100644 index cc5939e9..00000000 --- a/indexer/index_track.go +++ /dev/null @@ -1,85 +0,0 @@ -package indexer - -import ( - "encoding/json" - "maps" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/jackc/pgx/v5" -) - -func (ci *CoreIndexer) createTrack(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var meta GenericMetadata - json.Unmarshal([]byte(em.Metadata), &meta) - - args := pgx.NamedArgs{ - "blockhash": txInfo.blockhash, - "track_id": em.EntityId, - "is_current": true, - "is_delete": false, - "owner_id": em.UserId, - "title": "@title", - "created_at": txInfo.timestamp, - "updated_at": txInfo.timestamp, - "txhash": txInfo.txhash, - "is_unlisted": false, - "is_available": true, - "track_segments": "[]", // JSONB string - "is_scheduled_release": false, - "is_downloadable": false, - "is_original_available": false, - "playlists_containing_track": "{}", // JSONB string - "playlists_previously_containing_track": map[string]any{}, - "audio_analysis_error_count": 0, - "is_owned_by_user": false, - } - - for k, v := range meta.Data { - args[k] = v - } - - return ci.doInsert("tracks", args) -} - -func (ci *CoreIndexer) updateTrack(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var metadata GenericMetadata - json.Unmarshal([]byte(em.Metadata), &metadata) - - // todo: verify this user is authorized to edit - - args := pgx.NamedArgs{} - maps.Copy(args, metadata.Data) - - return ci.doUpdate("tracks", args, pgx.NamedArgs{ - "track_id": em.EntityId, - "owner_id": em.UserId, - }) -} - -func (ci *CoreIndexer) deleteTrack(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - return ci.doUpdate("tracks", - pgx.NamedArgs{ - "is_delete": true, - }, - pgx.NamedArgs{ - "track_id": em.EntityId, - "owner_id": em.UserId, - }) -} - -func (ci *CoreIndexer) downloadTrack(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var meta GenericMetadata - json.Unmarshal([]byte(em.Metadata), &meta) - - args := pgx.NamedArgs{ - "blocknumber": txInfo.blocknumber, - "txhash": txInfo.txhash, - "created_at": txInfo.timestamp, - "user_id": em.UserId, - "parent_track_id": em.EntityId, - "track_id": em.EntityId, - } - - maps.Copy(args, meta.Data) - return ci.doInsert("track_downloads", args) -} diff --git a/indexer/index_track_test.go b/indexer/index_track_test.go deleted file mode 100644 index 6549ad09..00000000 --- a/indexer/index_track_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package indexer - -import ( - "testing" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/stretchr/testify/assert" -) - -func TestIndexTrack(t *testing.T) { - var txInfo TxInfo - - // CREATE - err := ci.createTrack(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 51, - EntityId: 51, - Metadata: toMetadata(map[string]any{ - "title": "track51", - }), - }) - assert.NoError(t, err) - assertCount(t, 1, `select count(*) from tracks where title = 'track51'`) - - // UPDATE - err = ci.updateTrack(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 51, - EntityId: 51, - Metadata: toMetadata(map[string]any{ - "title": "track51 update", - }), - }) - assert.NoError(t, err) - assertCount(t, 1, `select count(*) from tracks where title = 'track51 update'`) - - // DELETE - err = ci.deleteTrack(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 51, - EntityId: 51, - }) - assert.NoError(t, err) - assertCount(t, 1, `select count(*) from tracks where title = 'track51 update' and is_delete = true`) -} diff --git a/indexer/index_user.go b/indexer/index_user.go index 1aaecefd..a033c398 100644 --- a/indexer/index_user.go +++ b/indexer/index_user.go @@ -1,67 +1,41 @@ package indexer import ( - "encoding/json" - "strings" + "context" + "crypto/ecdsa" + "encoding/base64" - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/jackc/pgx/v5" -) - -func (ci *CoreIndexer) createUser(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var metadata GenericMetadata - json.Unmarshal([]byte(em.Metadata), &metadata) + dbv1 "api.audius.co/database" + "go.uber.org/zap" - args := pgx.NamedArgs{ - "user_id": em.EntityId, - "handle_lc": strings.ToLower(metadata.Data["handle"].(string)), - "is_current": true, - "is_verified": false, - "created_at": txInfo.timestamp, - "updated_at": txInfo.timestamp, - "has_collectibles": false, - "txhash": txInfo.txhash, - "is_deactivated": false, - "is_available": true, - "is_storage_v2": false, - "allow_ai_attribution": false, - } - - for k, v := range metadata.Data { - if k == "events" { - continue - } - args[k] = v - } - - return ci.doInsert("users", args) -} + corev1 "github.com/AudiusProject/audiusd/pkg/api/core/v1" + core_config "github.com/AudiusProject/audiusd/pkg/core/config" + "github.com/AudiusProject/audiusd/pkg/core/server" + "github.com/ethereum/go-ethereum/crypto" +) -func (ci *CoreIndexer) updateUser(txInfo TxInfo, em *core_proto.ManageEntityLegacy) error { - var metadata GenericMetadata - json.Unmarshal([]byte(em.Metadata), &metadata) +func (ci *CoreIndexer) setPubkeyForUser(dbTx dbv1.DBTX, logger *zap.Logger, userId int32, pubkey *ecdsa.PublicKey) { + pubkeyBytes := crypto.FromECDSAPub(pubkey) + pubkeyBase64 := base64.StdEncoding.EncodeToString(pubkeyBytes) - args := pgx.NamedArgs{} + logger.Info("CreateUser, setting pubkey", zap.Int32("userId", userId), zap.String("pubkeyBase64", pubkeyBase64)) - // todo: verify this user is authorized to edit - // todo: better validation of fields + values + _, err := dbTx.Exec(context.Background(), `insert into user_pubkeys values ($1, $2) on conflict do nothing`, userId, pubkeyBase64) - for k, v := range metadata.Data { - if k == "events" || k == "handle" { - continue - } - args[k] = v + if err != nil { + logger.Warn("failed to set pubkey for user", zap.Int32("userId", userId), zap.String("pubkeyBase64", pubkeyBase64), zap.Error(err)) } +} - if _, exists := args["isDeactivated"]; exists { - // sometimes metadata is camelCase - // which breaks doUpdate - // so silently skip for now... - // todo: better validation - return nil +func (ci *CoreIndexer) createUser(dbTx dbv1.DBTX, logger *zap.Logger, em *corev1.ManageEntityLegacy) error { + _, pubkey, err := server.RecoverPubkeyFromCoreTx(&core_config.Config{ + AcdcChainID: ci.Config.AudiusdChainID, + AcdcEntityManagerAddress: ci.Config.AudiusdEntityManagerAddress, + }, em) + if err != nil { + return err } - return ci.doUpdate("users", args, pgx.NamedArgs{ - "user_id": em.EntityId, - }) + ci.setPubkeyForUser(dbTx, logger, int32(em.EntityId), pubkey) + return nil } diff --git a/indexer/index_user_test.go b/indexer/index_user_test.go index a9a80110..7e5b7b7a 100644 --- a/indexer/index_user_test.go +++ b/indexer/index_user_test.go @@ -3,36 +3,106 @@ package indexer import ( "testing" - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" + "api.audius.co/api/testdata" + "api.audius.co/config" + "api.audius.co/database" + corev1 "github.com/AudiusProject/audiusd/pkg/api/core/v1" + core_config "github.com/AudiusProject/audiusd/pkg/core/config" + core_server "github.com/AudiusProject/audiusd/pkg/core/server" "github.com/stretchr/testify/assert" + "go.uber.org/zap" ) -func TestUser(t *testing.T) { - txInfo := TxInfo{} - err := ci.createUser(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 33, - EntityId: 33, - Metadata: toMetadata(map[string]any{ - "handle": "test33", - "name": "test33_before", - }), - }) +// dummy pkeys generated from ganache "test test...junk" seed +var user1WalletKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" + +func TestIndexCreateUserPubkey(t *testing.T) { + pool := database.CreateTestDatabase(t, "test_indexer") + defer pool.Close() + logger := zap.NewNop() + + config := config.Config{ + WriteDbUrl: pool.Config().ConnString(), + AudiusdChainID: core_config.DevAcdcChainID, + AudiusdEntityManagerAddress: core_config.DevAcdcAddress, + } + + ci := NewIndexer(config) + defer ci.Close() + + wallet := testdata.CreateTestWallet(t, user1WalletKey) + + em := &corev1.ManageEntityLegacy{ + UserId: 1, + EntityId: 1, + EntityType: "User", + Action: "Create", + Metadata: "{}", + Nonce: "1", + } + + core_server.SignManageEntity(&core_config.Config{ + AcdcChainID: config.AudiusdChainID, + AcdcEntityManagerAddress: config.AudiusdEntityManagerAddress, + }, em, wallet.PrivateKey) + + err := ci.handleManageEntity(pool, logger, em) assert.NoError(t, err) - assertCount(t, 1, `select count(*) from users where name = 'test33_before'`) - - err = ci.updateUser(txInfo, &core_proto.ManageEntityLegacy{ - UserId: 33, - EntityId: 33, - Metadata: toMetadata(map[string]any{ - "handle": "test33_after", // should ignore handle edits - "name": "test33_after", - }), - }) + + var pubkey string + err = pool.QueryRow(t.Context(), ` + SELECT pubkey_base64 FROM user_pubkeys WHERE user_id = 1 + `).Scan(&pubkey) assert.NoError(t, err) - assertCount(t, 1, `select count(*) from users where name = 'test33_after'`) + assert.Equal(t, pubkey, "BIMYU1tUEF1Keq5gwI/EX5aHGBtP38YlvRp1P6c5f+11NUfxHKhpZkby86ywjjEBavrCPmMMXRH1n2H+9XsNKqU=") +} - // handle edit ignored - assertCount(t, 0, `select count(*) from users where handle = 'test33_after'`) - assertCount(t, 1, `select count(*) from users where handle = 'test33'`) +func TestIndexCreateUserExistingPubkey(t *testing.T) { + pool := database.CreateTestDatabase(t, "test_indexer") + defer pool.Close() + logger := zap.NewNop() + database.Seed(pool, database.FixtureMap{ + "user_pubkeys": { + { + "user_id": 1, + "pubkey_base64": "existing_pubkey", + }, + }, + }) + + config := config.Config{ + WriteDbUrl: pool.Config().ConnString(), + AudiusdChainID: core_config.DevAcdcChainID, + AudiusdEntityManagerAddress: core_config.DevAcdcAddress, + } + + ci := NewIndexer(config) + defer ci.Close() + + wallet := testdata.CreateTestWallet(t, user1WalletKey) + + em := &corev1.ManageEntityLegacy{ + UserId: 1, + EntityId: 1, + EntityType: "User", + Action: "Create", + Metadata: "{}", + Nonce: "1", + } + + core_server.SignManageEntity(&core_config.Config{ + AcdcChainID: config.AudiusdChainID, + AcdcEntityManagerAddress: config.AudiusdEntityManagerAddress, + }, em, wallet.PrivateKey) + + err := ci.handleManageEntity(pool, logger, em) + assert.NoError(t, err) + + var pubkey string + err = pool.QueryRow(t.Context(), ` + SELECT pubkey_base64 FROM user_pubkeys WHERE user_id = 1 + `).Scan(&pubkey) + assert.NoError(t, err) + assert.Equal(t, pubkey, "existing_pubkey") } diff --git a/indexer/indexer.go b/indexer/indexer.go index 5dc7398b..a83424ed 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -3,169 +3,157 @@ package indexer import ( "context" "fmt" - "maps" - "strings" + "log" "time" - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/AudiusProject/audiusd/pkg/common" + "api.audius.co/config" + dbv1 "api.audius.co/database" + "api.audius.co/logging" + "connectrpc.com/connect" + corev1 "github.com/AudiusProject/audiusd/pkg/api/core/v1" + "github.com/AudiusProject/audiusd/pkg/sdk" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" + "go.uber.org/zap" ) type CoreIndexer struct { - ctx context.Context - pool *pgxpool.Pool + pool dbv1.DbPool + Config config.Config + logger *zap.Logger + closeCh chan struct{} } -type CoreIndexerConfig struct { - DbUrl string -} +const ( + coreIndexerCheckpointName = "api_core_indexer_last_height" +) + +func NewIndexer(config config.Config) *CoreIndexer { -func NewIndexer(config CoreIndexerConfig) (*CoreIndexer, error) { - bg := context.Background() - pool, err := pgxpool.New(bg, config.DbUrl) + connConfig, err := pgxpool.ParseConfig(config.WriteDbUrl) if err != nil { - return nil, err + panic(fmt.Errorf("error parsing database URL: %w", err)) + } + + pool, err := pgxpool.NewWithConfig(context.Background(), connConfig) + if err != nil { + panic(fmt.Errorf("error connecting to database: %w", err)) } ci := &CoreIndexer{ - bg, - pool, + pool: pool, + Config: config, + logger: logging.NewZapLogger(config). + Named("CoreIndexer"), } - return ci, nil + return ci } -func (ci *CoreIndexer) handleTx(signedTx *core_proto.SignedTransaction) error { +func (ci *CoreIndexer) Start(ctx context.Context) error { + sdk := sdk.NewAudiusdSDK(ci.Config.AudiusdURL) - // txInfo contains some context around the tx: - // blockhash + blocknumber - // also need block timestamp - // todo: where best place to get? - txHash, err := common.ToTxHash(signedTx) + var height int64 + err := ci.pool.QueryRow(context.Background(), `select last_checkpoint from indexing_checkpoints where tablename = $1`, coreIndexerCheckpointName).Scan(&height) if err != nil { - return err + if err == pgx.ErrNoRows { + nodeInfo, err := sdk.Core.GetNodeInfo(context.Background(), connect.NewRequest(&corev1.GetNodeInfoRequest{})) + if err != nil { + return err + } + height = nodeInfo.Msg.CurrentHeight + } else { + return err + } + } else { + // If we have a checkpoint, we need to start at the next block + height++ } - txInfo := TxInfo{ - txhash: txHash, - blockhash: "todo", - blocknumber: 123, - timestamp: time.Now(), - } + ci.logger.Info("Core indexer started", zap.Int64("blockHeight", height)) - switch signedTx.GetTransaction().(type) { - case *core_proto.SignedTransaction_Plays: - // play := signedTx.GetPlays() - // fmt.Println("PLAY", play) - - case *core_proto.SignedTransaction_ManageEntity: - em := signedTx.GetManageEntity() - action := em.Action + em.EntityType - var err error - - // TODO: verify signature - // TODO: and that em.Signer is authorized for em.UserId - - switch action { - case "CreateUser": - err = ci.createUser(txInfo, em) - case "UpdateUser": - err = ci.updateUser(txInfo, em) - - case "CreateTrack": - err = ci.createTrack(txInfo, em) - case "UpdateTrack": - err = ci.updateTrack(txInfo, em) - case "DeleteTrack": - err = ci.deleteTrack(txInfo, em) - case "DownloadTrack": - err = ci.downloadTrack(txInfo, em) - - case "CreatePlaylist": - err = ci.createPlaylist(txInfo, em) - case "UpdatePlaylist": - err = ci.updatePlaylist(txInfo, em) - - case "CreateComment": - err = ci.createComment(txInfo, em) - - case "FollowUser": - err = ci.followUser(txInfo, em) - case "UnfollowUser": - err = ci.unfollowUser(txInfo, em) - case "RepostPlaylist", "RepostTrack": - err = ci.repost(txInfo, em) - case "SaveTrack", "SavePlaylist": - err = ci.favorite(txInfo, em) - case "UnsaveTrack", "UnsavePlaylist": - err = ci.unfavorite(txInfo, em) - case "ViewNotification": - err = ci.viewNotification(txInfo, em) + for { + select { + case <-ctx.Done(): + ci.logger.Info("Shutting down core indexer") + return nil default: - fmt.Println("no handler for ", action) + } + block, err := sdk.Core.GetBlock(context.Background(), connect.NewRequest(&corev1.GetBlockRequest{ + Height: height, + })) + if err != nil { + log.Fatal(err) } - return err - - default: - // fmt.Println("Unknown transaction type") - } - - return nil -} + if block.Msg.Block.Height < 0 { + time.Sleep(1 * time.Second) + continue + } -type TxInfo struct { - blockhash string - blocknumber int - txhash string - timestamp time.Time -} + err = ci.handleBlock(block.Msg.Block) + if err != nil { + log.Fatal(err) + } -type GenericMetadata struct { - CID string `json:"cid"` - Data map[string]any `json:"data"` + height++ + } } -func (ci *CoreIndexer) doInsert(tableName string, args pgx.NamedArgs) error { - fields := []string{} - placeholders := []string{} - for field := range args { - fields = append(fields, field) - placeholders = append(placeholders, "@"+field) +func (ci *CoreIndexer) handleBlock(block *corev1.Block) error { + dbTx, err := ci.pool.Begin(context.Background()) + if err != nil { + return err } - stmt := fmt.Sprintf("insert into %s (%s) values (%s)", - tableName, - strings.Join(fields, ", "), - strings.Join(placeholders, ", "), - ) - - _, err := ci.pool.Exec(ci.ctx, stmt, args) - return err -} + defer dbTx.Rollback(context.Background()) + + for _, tx := range block.Transactions { + if txData := tx.GetTransaction(); txData != nil { + logger := ci.logger.With(zap.String("txHash", tx.GetHash()), zap.Int64("blockHeight", block.Height)) + switch txData.GetTransaction().(type) { + case *corev1.SignedTransaction_ManageEntity: + em := txData.GetManageEntity() + if em == nil { + ci.logger.Error("ManageEntity transaction with empty data", zap.Any("tx", tx)) + continue + } + err := ci.handleManageEntity(dbTx, logger, em) + if err != nil { + logger.Error("Error processing manage entity tx", zap.Error(err)) + continue + } + } + } + } + _, err = dbTx.Exec(context.Background(), ` + insert into indexing_checkpoints values ($1, $2) + on conflict (tablename) do update set last_checkpoint = excluded.last_checkpoint + `, coreIndexerCheckpointName, block.Height) -func (ci *CoreIndexer) doUpdate(tableName string, args pgx.NamedArgs, where pgx.NamedArgs) error { - fields := []string{} - for field := range args { - fields = append(fields, fmt.Sprintf("%s = @%s", field, field)) + if err != nil { + return err } - wheres := []string{} - for field := range where { - wheres = append(wheres, fmt.Sprintf("%s = @%s", field, field)) + err = dbTx.Commit(context.Background()) + if err != nil { + return err } - stmt := fmt.Sprintf("update %s set %s where %s", - tableName, - strings.Join(fields, ", "), - strings.Join(wheres, " AND "), - ) + ci.logger.Debug("Indexed block", zap.Int64("blockHeight", block.Height)) - maps.Copy(args, where) + return nil +} - // fmt.Println(stmt, args) +func (ci *CoreIndexer) handleManageEntity(dbTx dbv1.DBTX, logger *zap.Logger, em *corev1.ManageEntityLegacy) error { + operation := em.Action + em.EntityType + switch operation { + case "CreateUser": + return ci.createUser(dbTx, logger, em) + default: + return nil + } +} - _, err := ci.pool.Exec(ci.ctx, stmt, args) - return err +func (ci *CoreIndexer) Close() { + ci.pool.Close() } diff --git a/indexer/indexer_test.go b/indexer/indexer_test.go deleted file mode 100644 index 907e4f9c..00000000 --- a/indexer/indexer_test.go +++ /dev/null @@ -1,108 +0,0 @@ -package indexer - -import ( - "encoding/binary" - "encoding/json" - "fmt" - "os" - "testing" - - "api.audius.co/database" - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/stretchr/testify/assert" - "google.golang.org/protobuf/proto" -) - -func checkErr(err error) { - if err != nil { - panic(err) - } -} - -var ( - ci *CoreIndexer -) - -func TestMain(m *testing.M) { - var err error - pool := database.CreateTestDatabase(nil, "test_indexer") - ci, err = NewIndexer(CoreIndexerConfig{ - DbUrl: pool.Config().ConnString(), - }) - checkErr(err) - ci.pool.Close() - ci.pool = pool - - // relax schema a bit... - _, err = ci.pool.Exec(ci.ctx, ` - alter table follows drop constraint follows_blocknumber_fkey; - alter table reposts drop constraint reposts_blocknumber_fkey; - alter table saves drop constraint saves_blocknumber_fkey; - alter table notification_seen drop constraint notification_seen_blocknumber_fkey; - alter table track_downloads drop constraint track_downloads_blocknumber_fkey; - alter table comments drop constraint comments_blocknumber_fkey; - `) - checkErr(err) - - code := m.Run() - - // shutdown() - os.Exit(code) -} - -func TestIndexer(t *testing.T) { - assert.Equal(t, 1, 1) -} - -func TestReadProtoFile(t *testing.T) { - t.Skip() - - file, err := os.Open("testdata/take1.pb") - if err != nil { - panic(err) - } - defer file.Close() - - for { - var length uint32 - err := binary.Read(file, binary.LittleEndian, &length) - if err != nil { - if err.Error() == "EOF" { - break - } - panic(err) - } - - data := make([]byte, length) - _, err = file.Read(data) - if err != nil { - fmt.Println(err) - break - } - - var signedTx core_proto.SignedTransaction - if err := proto.Unmarshal(data, &signedTx); err != nil { - assert.NoError(t, err) - } - - err = ci.handleTx(&signedTx) - assert.NoError(t, err) - - } - -} - -func assertCount(t *testing.T, expected int, sql string) { - count := -1 - err := ci.pool.QueryRow(ci.ctx, sql).Scan(&count) - assert.NoError(t, err) - assert.Equal(t, expected, count) -} - -func toMetadata(data map[string]any) string { - b, err := json.Marshal(GenericMetadata{Data: data}) - if err != nil { - panic(err) - } - return string(b) -} diff --git a/indexer/testdata/main.go b/indexer/testdata/main.go deleted file mode 100644 index d1deeae1..00000000 --- a/indexer/testdata/main.go +++ /dev/null @@ -1,93 +0,0 @@ -package main - -import ( - "context" - "encoding/binary" - "fmt" - "os" - - core_proto "github.com/AudiusProject/audiusd/pkg/api/core/v1" - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgxpool" - "google.golang.org/protobuf/proto" - - _ "github.com/joho/godotenv/autoload" -) - -func writeStuff() { - ctx := context.Background() - dbUrl := os.Getenv("discoveryDbUrl") - pool, err := pgxpool.New(context.Background(), dbUrl) - if err != nil { - panic(err) - } - - file, err := os.Create("indexer/testdata/take1.pb") - if err != nil { - panic(err) - } - - startBlock := 0 - count := 0 - - for startBlock < 5000 { - fmt.Println("START BLOCK", startBlock) - - rows, err := pool.Query(ctx, ` - select block_id, transaction - from core_transactions - where block_id > $1 - order by block_id asc - limit 1000`, startBlock) - if err != nil { - panic(err) - } - - var blockId int - var pb []byte - _, err = pgx.ForEachRow(rows, []any{&blockId, &pb}, func() error { - startBlock = blockId - - // Serialize the protobuf message length and data to the file - length := uint32(len(pb)) - if err := binary.Write(file, binary.LittleEndian, length); err != nil { - return err - } - if _, err := file.Write(pb); err != nil { - return err - } - count++ - - var signedTx core_proto.SignedTransaction - if err := proto.Unmarshal(pb, &signedTx); err != nil { - return err - } - - switch signedTx.GetTransaction().(type) { - case *core_proto.SignedTransaction_Plays: - // play := signedTx.GetPlays() - // fmt.Println("PLAY", play) - case *core_proto.SignedTransaction_ManageEntity: - // em := signedTx.GetManageEntity() - // fmt.Println("-------------") - // fmt.Println("EM", em.UserId, em.Action, em.EntityType, em.EntityId) - // fmt.Println(em.Metadata) - } - - return nil - }) - if err != nil { - panic(err) - } - - } - - file.Close() - - fmt.Println("WROTE", count) -} - -func main() { - writeStuff() - // readStuff() -} diff --git a/indexer/testdata/take1.pb b/indexer/testdata/take1.pb deleted file mode 100644 index d91536f6..00000000 Binary files a/indexer/testdata/take1.pb and /dev/null differ diff --git a/main.go b/main.go index d74b7274..b8560362 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,7 @@ import ( "api.audius.co/config" "api.audius.co/ddl" "api.audius.co/esindexer" - "api.audius.co/indexer" + core_indexer "api.audius.co/indexer" solana_indexer "api.audius.co/solana/indexer" ) @@ -40,12 +40,19 @@ func main() { case "indexer": { fmt.Println("Running indexer...") - _, err := indexer.NewIndexer(indexer.CoreIndexerConfig{ - DbUrl: config.Cfg.WriteDbUrl, - }) - if err != nil { - fmt.Println("Error creating indexer:", err) - os.Exit(1) + + indexer := core_indexer.NewIndexer(config.Cfg) + + defer indexer.Close() + + // Capture termination signals for graceful shutdown of the indexer + ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGINT, os.Interrupt) + defer stop() + + if err := indexer.Start(ctx); err != nil { + if !errors.Is(err, context.Canceled) { + panic(err) + } } } case "es-indexer":