From 63bc2881b2ed4e924fd6205b755b3d3dc60b3957 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 31 May 2024 12:51:35 -0400 Subject: [PATCH 01/75] fix: imports --- api/gateway/share.go | 2 +- api/gateway/share_test.go | 4 +- blob/blob.go | 4 +- blob/blob_test.go | 2 +- blob/blobtest/testing.go | 6 +- blob/helper.go | 2 +- blob/parser.go | 2 +- blob/service.go | 6 +- blob/service_test.go | 4 +- cmd/cel-key/main.go | 4 +- cmd/start.go | 4 +- core/eds.go | 10 +- core/eds_test.go | 4 +- core/exchange_test.go | 2 +- core/testing.go | 2 +- go.mod | 85 +++---- go.sum | 233 +++++++++---------- header/header.go | 6 +- header/headertest/fraud/testing.go | 2 +- header/headertest/testing.go | 2 +- header/pb/extended_header.pb.go | 2 +- header/serde.go | 2 +- libs/edssser/edssser.go | 2 +- libs/keystore/map_keystore.go | 4 +- nodebuilder/da/service.go | 2 +- nodebuilder/init.go | 4 +- nodebuilder/init_test.go | 4 +- nodebuilder/share/constructors.go | 2 +- nodebuilder/store_test.go | 4 +- nodebuilder/tests/da_test.go | 2 +- nodebuilder/tests/swamp/config.go | 2 +- nodebuilder/tests/swamp/swamp.go | 2 +- nodebuilder/tests/swamp/swamp_tx.go | 2 +- share/availability.go | 2 +- share/availability/full/availability_test.go | 2 +- share/eds/byzantine/bad_encoding.go | 2 +- share/eds/byzantine/bad_encoding_test.go | 4 +- share/eds/byzantine/byzantine.go | 2 +- share/eds/byzantine/share_proof_test.go | 2 +- share/eds/eds.go | 2 +- share/eds/eds_test.go | 4 +- share/eds/edstest/testing.go | 2 +- share/eds/retriever.go | 4 +- share/eds/retriever_no_race_test.go | 4 +- share/eds/retriever_quadrant.go | 2 +- share/eds/retriever_test.go | 2 +- share/eds/store_test.go | 2 +- share/empty.go | 6 +- share/getters/getter_test.go | 4 +- share/getters/testing.go | 2 +- share/ipld/add.go | 2 +- share/ipld/get_shares_test.go | 2 +- share/ipld/nmt.go | 4 +- share/ipld/nmt_test.go | 2 +- share/namespace.go | 2 +- share/namespace_test.go | 2 +- share/share.go | 2 +- share/sharetest/testing.go | 2 +- state/core_access.go | 12 +- state/core_access_test.go | 8 +- state/integration_test.go | 6 +- 61 files changed, 257 insertions(+), 255 deletions(-) diff --git a/api/gateway/share.go b/api/gateway/share.go index 36c1f94a0a..cdd40e1d2b 100644 --- a/api/gateway/share.go +++ b/api/gateway/share.go @@ -9,7 +9,7 @@ import ( "github.com/gorilla/mux" - "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share" ) diff --git a/api/gateway/share_test.go b/api/gateway/share_test.go index 9b12240f62..10904c3414 100644 --- a/api/gateway/share_test.go +++ b/api/gateway/share_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" coretypes "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share/sharetest" ) diff --git a/blob/blob.go b/blob/blob.go index 89177b713e..89d35659dc 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -8,8 +8,8 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/x/blob/types" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/x/blob/types" "github.com/celestiaorg/nmt" "github.com/celestiaorg/celestia-node/share" diff --git a/blob/blob_test.go b/blob/blob_test.go index 665abb7d89..b9cbfcd87d 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/types" - apptypes "github.com/celestiaorg/celestia-app/x/blob/types" + apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" "github.com/celestiaorg/celestia-node/blob/blobtest" ) diff --git a/blob/blobtest/testing.go b/blob/blobtest/testing.go index a22f22f790..ff3fdfdbee 100644 --- a/blob/blobtest/testing.go +++ b/blob/blobtest/testing.go @@ -4,9 +4,9 @@ import ( tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/shares" - "github.com/celestiaorg/celestia-app/test/util/testfactory" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/test/util/testfactory" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share" ) diff --git a/blob/helper.go b/blob/helper.go index d3b418e8ba..c02a5a16a8 100644 --- a/blob/helper.go +++ b/blob/helper.go @@ -6,7 +6,7 @@ import ( "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share" ) diff --git a/blob/parser.go b/blob/parser.go index 6c103698b0..8ca2690023 100644 --- a/blob/parser.go +++ b/blob/parser.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/go-square/shares" ) // parser helps to collect shares and transform them into a blob. diff --git a/blob/service.go b/blob/service.go index 25bf48fd1f..ce50a23c05 100644 --- a/blob/service.go +++ b/blob/service.go @@ -16,9 +16,9 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/shares" - blobtypes "github.com/celestiaorg/celestia-app/x/blob/types" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + blobtypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/header" "github.com/celestiaorg/celestia-node/libs/utils" diff --git a/blob/service_test.go b/blob/service_test.go index b1d9c78998..d95bf7f91c 100644 --- a/blob/service_test.go +++ b/blob/service_test.go @@ -15,9 +15,9 @@ import ( "github.com/stretchr/testify/require" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/go-header/store" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/blob/blobtest" "github.com/celestiaorg/celestia-node/header" diff --git a/cmd/cel-key/main.go b/cmd/cel-key/main.go index 736ea9d7f5..5db3f4bc7c 100644 --- a/cmd/cel-key/main.go +++ b/cmd/cel-key/main.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/spf13/cobra" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/app/encoding" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" ) var encodingConfig = encoding.MakeConfig(app.ModuleEncodingRegisters...) diff --git a/cmd/start.go b/cmd/start.go index c3ee37fe72..29b0841eda 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -10,8 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/spf13/cobra" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/app/encoding" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" "github.com/celestiaorg/celestia-node/nodebuilder" ) diff --git a/core/eds.go b/core/eds.go index daab35fe8f..81cfd4c5fd 100644 --- a/core/eds.go +++ b/core/eds.go @@ -8,11 +8,11 @@ import ( "github.com/filecoin-project/dagstore" "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/shares" - "github.com/celestiaorg/celestia-app/pkg/square" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" + "github.com/celestiaorg/go-square/shares" + "github.com/celestiaorg/go-square/square" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/core/eds_test.go b/core/eds_test.go index e8528eebe0..f6df18c4be 100644 --- a/core/eds_test.go +++ b/core/eds_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-node/share" ) diff --git a/core/exchange_test.go b/core/exchange_test.go index f397ed6a5b..1843421751 100644 --- a/core/exchange_test.go +++ b/core/exchange_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/test/util/testnode" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" "github.com/celestiaorg/celestia-node/header" "github.com/celestiaorg/celestia-node/pruner" diff --git a/core/testing.go b/core/testing.go index 8d29ce9bbc..bde792bf1e 100644 --- a/core/testing.go +++ b/core/testing.go @@ -10,7 +10,7 @@ import ( tmconfig "github.com/tendermint/tendermint/config" tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/celestiaorg/celestia-app/test/util/testnode" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" ) // DefaultTestConfig returns the default testing configuration for Tendermint + Celestia App tandem. diff --git a/go.mod b/go.mod index 122fa8b449..ea2d356469 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/celestiaorg/celestia-node -go 1.22.0 +go 1.22.3 require ( cosmossdk.io/errors v1.0.1 @@ -8,10 +8,12 @@ require ( github.com/BurntSushi/toml v1.3.2 github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b github.com/benbjohnson/clock v1.3.5 - github.com/celestiaorg/celestia-app v1.9.0 + github.com/celestiaorg/celestia-app v1.10.1 + github.com/celestiaorg/celestia-app/v2 v2.0.0-rc1 github.com/celestiaorg/go-fraud v0.2.1 github.com/celestiaorg/go-header v0.6.1 github.com/celestiaorg/go-libp2p-messenger v0.2.0 + github.com/celestiaorg/go-square v1.0.1 github.com/celestiaorg/nmt v0.21.0 github.com/celestiaorg/rsmt2d v0.13.1 github.com/cosmos/cosmos-sdk v0.46.16 @@ -73,24 +75,22 @@ require ( golang.org/x/exp v0.0.0-20240213143201-ec583247a57a golang.org/x/sync v0.7.0 golang.org/x/text v0.15.0 - google.golang.org/grpc v1.63.2 + google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.1 ) require ( - cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.24.0 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.25.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.36.0 // indirect + cloud.google.com/go/storage v1.38.0 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect + github.com/99designs/keyring v1.2.2 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/Jorropo/jsync v1.0.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -98,10 +98,11 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 // indirect + github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 // indirect github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26 // indirect - github.com/celestiaorg/quantum-gravity-bridge/v2 v2.1.2 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -115,18 +116,19 @@ require ( github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-alpha8 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.6 // indirect + github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2 // indirect github.com/cosmos/ibc-go/v6 v6.3.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.2 // indirect - github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect @@ -140,24 +142,23 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect github.com/etclabscore/go-jsonschema-walk v0.0.6 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/ethereum/go-ethereum v1.13.2 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect + github.com/ethereum/go-ethereum v1.14.3 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gammazero/deque v0.2.0 // indirect github.com/go-kit/kit v0.12.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.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.4 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/spec v0.19.11 // indirect - github.com/go-openapi/swag v0.19.11 // indirect - github.com/go-stack/stack v1.8.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect @@ -175,8 +176,8 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -196,9 +197,9 @@ require ( github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect - github.com/iancoleman/orderedmap v0.1.0 // indirect + github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/influxdata/influxdb-client-go/v2 v2.12.2 // indirect @@ -267,11 +268,11 @@ require ( github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/common v0.47.0 // indirect @@ -284,15 +285,15 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.31.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.6+incompatible // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.15.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect @@ -309,26 +310,26 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.21.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect + golang.org/x/tools v0.20.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/api v0.162.0 // indirect + google.golang.org/api v0.169.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -340,7 +341,7 @@ require ( ) replace ( - github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.20.1-sdk-v0.46.16 + github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.22.0-sdk-v0.46.16 github.com/filecoin-project/dagstore => github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // broken goleveldb needs to be replaced for the cosmos-sdk and celestia-app diff --git a/go.sum b/go.sum index fbd22f780d..630b4ab111 100644 --- a/go.sum +++ b/go.sum @@ -6,7 +6,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -20,7 +19,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -36,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -75,8 +73,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= -cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -175,12 +173,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= 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.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= -cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -210,8 +207,8 @@ git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFN git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= @@ -244,9 +241,7 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -254,8 +249,9 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU 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/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= @@ -315,8 +311,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1U github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= @@ -358,12 +354,16 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/celestiaorg/celestia-app v1.9.0 h1:B0Sou7uGsAwRXMzVwMpb2wVXtMFC4FR9ODfXrWTIDaw= -github.com/celestiaorg/celestia-app v1.9.0/go.mod h1:Z50B4+LvY0JIusd0qlQvA4/bNM2GzkFyDloYGU6A3fw= +github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 h1:h1Y4V3EMQ2mFmNtWt2sIhZIuyASInj1a9ExI8xOsTOw= +github.com/celestiaorg/blobstream-contracts/v3 v3.1.0/go.mod h1:x4DKyfKOSv1ZJM9NwV+Pw01kH2CD7N5zTFclXIVJ6GQ= +github.com/celestiaorg/celestia-app v1.10.1 h1:Aw5tgotgLPxzNoy4lytsvnliUtNqQXCZme27o7Ks3PM= +github.com/celestiaorg/celestia-app v1.10.1/go.mod h1:SKsXFo1gdhq6EoGeE4kuc8ZZpZOi2XVKrXI2PwE7eso= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc1 h1:LOZpqGKIDP4om7HPph0EwjD+LbDc4gdskADjc6Rx9Qo= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc1/go.mod h1:yvWZPr1aWsXyUXCPIoqqBYE4YaPU6yX9yLUjFxyJcRE= github.com/celestiaorg/celestia-core v1.35.0-tm-v0.34.29 h1:sXERzNXgyHyqTKNQx4S29C/NMDzgav62DaQDNF49HUQ= github.com/celestiaorg/celestia-core v1.35.0-tm-v0.34.29/go.mod h1:weZR4wYx1Vcw3g1Jc5G8VipG4M+KUDSqeIzyyWszmsQ= -github.com/celestiaorg/cosmos-sdk v1.20.1-sdk-v0.46.16 h1:9U9UthIJSOyVjabD5PkD6aczvqlWOyAFTOXw0duPT5k= -github.com/celestiaorg/cosmos-sdk v1.20.1-sdk-v0.46.16/go.mod h1:Tvsc3YnqvflXTYC8xIy/Q07Es95xZ1pZC/imoKogtbg= +github.com/celestiaorg/cosmos-sdk v1.22.0-sdk-v0.46.16 h1:THZrswVVqGtMo2dMdW9R+5JGxjfD7+eaGZIJ7ne0ejE= +github.com/celestiaorg/cosmos-sdk v1.22.0-sdk-v0.46.16/go.mod h1:AmuR63HTlX8vNV3+NGWNPIZa95J1UweTUmWDHSdTGj0= github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403 h1:Lj73O3S+KJx5/hgZ+IeOLEIoLsAveJN/7/ZtQQtPSVw= github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403/go.mod h1:cCGM1UoMvyTk8k62mkc+ReVu8iHBCtSBAAL4wYU7KEI= github.com/celestiaorg/go-fraud v0.2.1 h1:oYhxI0gM/EpGRgbVQdRI/LSlqyT65g/WhQGSVGfx09w= @@ -372,12 +372,14 @@ github.com/celestiaorg/go-header v0.6.1 h1:bbmfNTpL9BA7dZU4/pdzH4DlOnxHTd9F5LLVK github.com/celestiaorg/go-header v0.6.1/go.mod h1:PAEtQmVDqw0nhvkVgfhq2JB7oLnv3GqephFUOeaJqIs= github.com/celestiaorg/go-libp2p-messenger v0.2.0 h1:/0MuPDcFamQMbw9xTZ73yImqgTO3jHV7wKHvWD/Irao= github.com/celestiaorg/go-libp2p-messenger v0.2.0/go.mod h1:s9PIhMi7ApOauIsfBcQwbr7m+HBzmVfDIS+QLdgzDSo= +github.com/celestiaorg/go-square v1.0.1 h1:LEG1zrw4i03VBMElQF8GAbKYgh1bT1uGzWxasU2ePuo= +github.com/celestiaorg/go-square v1.0.1/go.mod h1:XMv5SGCeGSkynW2OOsedugaW/rQlvzxGzWGxTKsyYOU= +github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 h1:PYInrsYzrDIsZW9Yb86OTi2aEKuPcpgJt6Mc0Jlc/yg= +github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076/go.mod h1:hlidgivKyvv7m4Yl2Fdf2mSTmazZYxX8+bnr5IQrI98= github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26 h1:P2RI1xJ49EZ8cuHMcH+ZSBonfRDtBS8OS9Jdt1BWX3k= github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26/go.mod h1:2m8ukndOegwB0PU0AfJCwDUQHqd7QQRlSXvQL5VToVY= github.com/celestiaorg/nmt v0.21.0 h1:81MBqxNn3orByoiCtdNVjwi5WsLgMkzHwP02ZMhTBHM= github.com/celestiaorg/nmt v0.21.0/go.mod h1:ia/EpCk0enD5yO5frcxoNoFToz2Ghtk2i+blmCRjIY8= -github.com/celestiaorg/quantum-gravity-bridge/v2 v2.1.2 h1:Q8nr5SAtDW5gocrBwqwDJcSS/JedqU58WwQA2SP+nXw= -github.com/celestiaorg/quantum-gravity-bridge/v2 v2.1.2/go.mod h1:s/LzLUw0WeYPJ6qdk4q46jKLOq7rc9Z5Mdrxtfpcigw= github.com/celestiaorg/rsmt2d v0.13.1 h1:eRhp79DKTkDojwInKVs1lRK6f6zJc1BVlmZfUfI19yQ= github.com/celestiaorg/rsmt2d v0.13.1/go.mod h1:P7t92OATXbBmc/P5uR+GCOBv+PV8wLb0vU32ucrb148= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -424,21 +426,19 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06 h1:T+Np/xtzIjYM/P5NAw0e2Rf1FGvzDau1h54MKvx8G7w= -github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06/go.mod h1:bynZ3gvVyhlvjLI7PT6dmZ7g76xzJ7HpxfjgkzCGz6s= -github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= @@ -479,17 +479,19 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/corpix/uarand v0.1.1/go.mod h1:SFKZvkcRoLqVRFZ4u25xPmp6m9ktANfbpXZ7SJ0/FNU= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= github.com/cosmos/iavl v0.19.6/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2 h1:Hz4nkpStoXIHrC77CIEyu2mRiN2qysGEZPFRf0fpv7w= +github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2/go.mod h1:Jo934o/sW7fNxuOa/TjCalSalz+1Fd649eLyANaJx8g= github.com/cosmos/ibc-go/v6 v6.3.0 h1:2EkkqDEd9hTQvzB/BsPhYZsu7T/dzAVA8+VD2UuJLSQ= github.com/cosmos/ibc-go/v6 v6.3.0/go.mod h1:Dm14j9s094bGyCEE8W4fD+2t8IneHv+cz+80Mvwjr1w= github.com/cosmos/ledger-cosmos-go v0.13.2 h1:aY0KZSmUwNKbBm9OvbIjvf7Ozz2YzzpAbgvN2C8x2T0= @@ -503,8 +505,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668 h1:ZFUue+PNxmHlu7pYv+IYMtqlaO/0VwaGEqKepZf9JpA= github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= -github.com/crate-crypto/go-kzg-4844 v0.3.0/go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -519,8 +523,9 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/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/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= @@ -598,17 +603,15 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/etclabscore/go-jsonschema-walk v0.0.6 h1:DrNzoKWKd8f8XB5nFGBY00IcjakRE22OTI12k+2LkyY= github.com/etclabscore/go-jsonschema-walk v0.0.6/go.mod h1:VdfDY72AFAiUhy0ZXEaWSpveGjMT5JcDIm903NGqFwQ= github.com/etclabscore/go-openrpc-reflect v0.0.37 h1:IH0e7JqIvR9OhbbFWi/BHIkXrqbR3Zyia3RJ733eT6c= github.com/etclabscore/go-openrpc-reflect v0.0.37/go.mod h1:0404Ky3igAasAOpyj1eESjstTyneBAIk5PgJFbK4s5E= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= -github.com/ethereum/go-ethereum v1.13.2 h1:g9mCpfPWqCA1OL4e6C98PeVttb0HadfBRuKTGvMnOvw= -github.com/ethereum/go-ethereum v1.13.2/go.mod h1:gkQ5Ygi64ZBh9M/4iXY1R8WqoNCx1Ey0CkYn2BD4/fw= +github.com/ethereum/go-ethereum v1.14.3 h1:5zvnAqLtnCZrU9uod1JCvHWJbPMURzYFHfc2eHz4PHA= +github.com/ethereum/go-ethereum v1.14.3/go.mod h1:1STrq471D0BQbCX9He0hUj4bHxX2k6mt5nOQJhDNOJ8= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -619,13 +622,13 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/filecoin-project/go-jsonrpc v0.4.0 h1:W6kEt8YCQGUZpmvDOvLF+vKwRhrLPBN+kaSHYLEio+c= github.com/filecoin-project/go-jsonrpc v0.4.0/go.mod h1:/n/niXcS4ZQua6i37LcVbY1TmlJR0UIK9mDFQq2ICek= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= @@ -649,8 +652,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= github.com/gammazero/deque v0.2.0 h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA= github.com/gammazero/deque v0.2.0/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= @@ -658,8 +661,12 @@ github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44 github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= 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/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= +github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -700,38 +707,39 @@ 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.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.11 h1:ogU5q8dtp3MMPn59a9VRrPKVxvJHEs5P7yNMR5sNnis= github.com/go-openapi/spec v0.19.11/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.11 h1:RFTu/dlFySpyVvJDfp/7674JY4SDglYWKztbiIGFpmc= github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= +github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= @@ -757,8 +765,9 @@ github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -860,7 +869,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -897,16 +905,15 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= 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.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= 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= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -1005,13 +1012,13 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +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.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= @@ -1021,8 +1028,9 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= -github.com/iancoleman/orderedmap v0.1.0 h1:2orAxZBJsvimgEBmMWfXaFlzSG2fbQil5qzP3F6cCkg= github.com/iancoleman/orderedmap v0.1.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= +github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -1375,7 +1383,6 @@ github.com/koron/go-ssdp v0.0.2/go.mod h1:XoLfkAiA2KeZsYh4DbHxD7h3nR2AZNqVQOa+LJ github.com/koron/go-ssdp v0.0.3/go.mod h1:b2MxI6yh02pKrsyNoQUsk4+YNikaGhe4894J+Q5lDvA= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -1745,8 +1752,8 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -2004,8 +2011,8 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= -github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= @@ -2024,10 +2031,10 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= @@ -2132,8 +2139,8 @@ github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -2202,11 +2209,11 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -2249,8 +2256,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -2298,8 +2305,9 @@ github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb/go.mod h1:ikPs9bRW github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= +github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -2388,10 +2396,10 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 h1:2JydY5UiDpqvj2p7sO9bgHuhTy4hgTZ0ymehdq/Ob0Q= go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0/go.mod h1:ch3a5QxOqVWxas4CzjCFFOOQe+7HgAXC/N1oVxS9DK4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= @@ -2508,12 +2516,10 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -2583,8 +2589,8 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2639,7 +2645,6 @@ golang.org/x/net v0.0.0-20201022231255-08b38378de70/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -2676,8 +2681,8 @@ golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= 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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2705,8 +2710,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2804,7 +2809,6 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2816,7 +2820,6 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210511113859-b0526f3d8744/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2858,7 +2861,6 @@ golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2969,7 +2971,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -2983,8 +2984,8 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -3055,8 +3056,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= -google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -3112,10 +3113,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -3183,8 +3182,8 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -3232,8 +3231,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -3312,8 +3311,8 @@ lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1 nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= -pgregory.net/rapid v0.5.3/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/header/header.go b/header/header.go index 01a84a2c0a..c1d11dafce 100644 --- a/header/header.go +++ b/header/header.go @@ -12,7 +12,9 @@ import ( core "github.com/tendermint/tendermint/types" "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/da" + v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" + v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2" + "github.com/celestiaorg/celestia-app/v2/pkg/da" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/rsmt2d" ) @@ -114,7 +116,7 @@ func (eh *ExtendedHeader) Validate() error { return fmt.Errorf("ValidateBasic error on RawHeader at height %d: %w", eh.Height(), err) } - if eh.RawHeader.Version.App != appconsts.LatestVersion { + if eh.RawHeader.Version.App != v1.Version && eh.RawHeader.Version.App != v2.Version { return fmt.Errorf("app version mismatch, expected: %d, got %d", appconsts.LatestVersion, eh.RawHeader.Version.App) } diff --git a/header/headertest/fraud/testing.go b/header/headertest/fraud/testing.go index 66965cf178..7a876c7ecf 100644 --- a/header/headertest/fraud/testing.go +++ b/header/headertest/fraud/testing.go @@ -11,7 +11,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/header/headertest/testing.go b/header/headertest/testing.go index 22d8230382..c53e3b21c5 100644 --- a/header/headertest/testing.go +++ b/header/headertest/testing.go @@ -17,7 +17,7 @@ import ( "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/go-header/headertest" "github.com/celestiaorg/rsmt2d" diff --git a/header/pb/extended_header.pb.go b/header/pb/extended_header.pb.go index 59fdee0d72..03ca6cba06 100644 --- a/header/pb/extended_header.pb.go +++ b/header/pb/extended_header.pb.go @@ -5,7 +5,7 @@ package header_pb import ( fmt "fmt" - da "github.com/celestiaorg/celestia-app/proto/celestia/da" + da "github.com/celestiaorg/celestia-app/v2/proto/celestia/core/v1/da" proto "github.com/gogo/protobuf/proto" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" diff --git a/header/serde.go b/header/serde.go index a511a1352b..fae310457b 100644 --- a/header/serde.go +++ b/header/serde.go @@ -5,7 +5,7 @@ import ( core "github.com/tendermint/tendermint/types" "golang.org/x/crypto/blake2b" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" header_pb "github.com/celestiaorg/celestia-node/header/pb" ) diff --git a/libs/edssser/edssser.go b/libs/edssser/edssser.go index 34712b785a..10c9c6b3bd 100644 --- a/libs/edssser/edssser.go +++ b/libs/edssser/edssser.go @@ -11,7 +11,7 @@ import ( "github.com/ipfs/go-datastore" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/celestia-node/share/eds" "github.com/celestiaorg/celestia-node/share/eds/edstest" diff --git a/libs/keystore/map_keystore.go b/libs/keystore/map_keystore.go index 84de91458e..9efd21f88b 100644 --- a/libs/keystore/map_keystore.go +++ b/libs/keystore/map_keystore.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/app/encoding" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" ) // mapKeystore is a simple in-memory Keystore implementation. diff --git a/nodebuilder/da/service.go b/nodebuilder/da/service.go index d43ba694a6..b436cbff32 100644 --- a/nodebuilder/da/service.go +++ b/nodebuilder/da/service.go @@ -10,7 +10,7 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/rollkit/go-da" - "github.com/celestiaorg/celestia-app/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-node/blob" nodeblob "github.com/celestiaorg/celestia-node/nodebuilder/blob" diff --git a/nodebuilder/init.go b/nodebuilder/init.go index 9ac6741b91..c255ac77db 100644 --- a/nodebuilder/init.go +++ b/nodebuilder/init.go @@ -10,8 +10,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/gofrs/flock" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/app/encoding" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" "github.com/celestiaorg/celestia-node/libs/utils" "github.com/celestiaorg/celestia-node/nodebuilder/node" diff --git a/nodebuilder/init_test.go b/nodebuilder/init_test.go index dcac1466af..b391ec11d3 100644 --- a/nodebuilder/init_test.go +++ b/nodebuilder/init_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/app/encoding" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" "github.com/celestiaorg/celestia-node/nodebuilder/node" ) diff --git a/nodebuilder/share/constructors.go b/nodebuilder/share/constructors.go index 12c6b9c628..8f6d5464f4 100644 --- a/nodebuilder/share/constructors.go +++ b/nodebuilder/share/constructors.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/dagstore" "github.com/ipfs/boxo/blockservice" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/celestia-node/share" "github.com/celestiaorg/celestia-node/share/eds" diff --git a/nodebuilder/store_test.go b/nodebuilder/store_test.go index 17d15f8a6f..d944dc29ff 100644 --- a/nodebuilder/store_test.go +++ b/nodebuilder/store_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/nodebuilder/tests/da_test.go b/nodebuilder/tests/da_test.go index 12cbe17fdd..b2ced9d49d 100644 --- a/nodebuilder/tests/da_test.go +++ b/nodebuilder/tests/da_test.go @@ -12,7 +12,7 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-node/blob" "github.com/celestiaorg/celestia-node/blob/blobtest" diff --git a/nodebuilder/tests/swamp/config.go b/nodebuilder/tests/swamp/config.go index 047baa9f59..39740c6d18 100644 --- a/nodebuilder/tests/swamp/config.go +++ b/nodebuilder/tests/swamp/config.go @@ -3,7 +3,7 @@ package swamp import ( "time" - "github.com/celestiaorg/celestia-app/test/util/testnode" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" "github.com/celestiaorg/celestia-node/core" ) diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index 93879c4425..c7dc6d299e 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -21,7 +21,7 @@ import ( "go.uber.org/fx" "golang.org/x/exp/maps" - "github.com/celestiaorg/celestia-app/test/util/testnode" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/celestia-node/core" diff --git a/nodebuilder/tests/swamp/swamp_tx.go b/nodebuilder/tests/swamp/swamp_tx.go index 656b2f341d..be0c3bb593 100644 --- a/nodebuilder/tests/swamp/swamp_tx.go +++ b/nodebuilder/tests/swamp/swamp_tx.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/celestiaorg/celestia-app/test/util/testnode" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" ) // FillBlocks produces the given amount of contiguous blocks with customizable size. diff --git a/share/availability.go b/share/availability.go index f3511da450..84ae08bc53 100644 --- a/share/availability.go +++ b/share/availability.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/header" diff --git a/share/availability/full/availability_test.go b/share/availability/full/availability_test.go index 8ac0648a87..400acfa087 100644 --- a/share/availability/full/availability_test.go +++ b/share/availability/full/availability_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/celestia-node/header/headertest" "github.com/celestiaorg/celestia-node/share" diff --git a/share/eds/byzantine/bad_encoding.go b/share/eds/byzantine/bad_encoding.go index 9c754eaf47..7e1386a863 100644 --- a/share/eds/byzantine/bad_encoding.go +++ b/share/eds/byzantine/bad_encoding.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/go-fraud" "github.com/celestiaorg/rsmt2d" diff --git a/share/eds/byzantine/bad_encoding_test.go b/share/eds/byzantine/bad_encoding_test.go index d54ed23940..59ac24ad55 100644 --- a/share/eds/byzantine/bad_encoding_test.go +++ b/share/eds/byzantine/bad_encoding_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/require" core "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-app/test/util/malicious" + "github.com/celestiaorg/celestia-app/v2/pkg/da" + "github.com/celestiaorg/celestia-app/v2/test/util/malicious" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/share/eds/byzantine/byzantine.go b/share/eds/byzantine/byzantine.go index 030453c31a..44307138c5 100644 --- a/share/eds/byzantine/byzantine.go +++ b/share/eds/byzantine/byzantine.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/boxo/blockstore" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/share/ipld" diff --git a/share/eds/byzantine/share_proof_test.go b/share/eds/byzantine/share_proof_test.go index 170ba591e2..2b5cb57bb9 100644 --- a/share/eds/byzantine/share_proof_test.go +++ b/share/eds/byzantine/share_proof_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/share" diff --git a/share/eds/eds.go b/share/eds/eds.go index b8a332f275..94aaf34a46 100644 --- a/share/eds/eds.go +++ b/share/eds/eds.go @@ -12,7 +12,7 @@ import ( "github.com/ipld/go-car" "github.com/ipld/go-car/util" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/share/eds/eds_test.go b/share/eds/eds_test.go index b5e02fe14a..4b534070ac 100644 --- a/share/eds/eds_test.go +++ b/share/eds/eds_test.go @@ -16,8 +16,8 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/rand" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/share" diff --git a/share/eds/edstest/testing.go b/share/eds/edstest/testing.go index bf5e664f90..347dc87962 100644 --- a/share/eds/edstest/testing.go +++ b/share/eds/edstest/testing.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/share/eds/retriever.go b/share/eds/retriever.go index 989da376f7..606746cbc8 100644 --- a/share/eds/retriever.go +++ b/share/eds/retriever.go @@ -15,8 +15,8 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/share/eds/retriever_no_race_test.go b/share/eds/retriever_no_race_test.go index 6b2667ee6f..73f86d555a 100644 --- a/share/eds/retriever_no_race_test.go +++ b/share/eds/retriever_no_race_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/share/eds/retriever_quadrant.go b/share/eds/retriever_quadrant.go index a7328f5de2..64cab6366c 100644 --- a/share/eds/retriever_quadrant.go +++ b/share/eds/retriever_quadrant.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/go-cid" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/share/ipld" diff --git a/share/eds/retriever_test.go b/share/eds/retriever_test.go index 6bf6b45900..3c0763f62a 100644 --- a/share/eds/retriever_test.go +++ b/share/eds/retriever_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/header" diff --git a/share/eds/store_test.go b/share/eds/store_test.go index 6bc6972bb4..c5d87f7352 100644 --- a/share/eds/store_test.go +++ b/share/eds/store_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/share" diff --git a/share/empty.go b/share/empty.go index ef3d088e1d..75df506c78 100644 --- a/share/empty.go +++ b/share/empty.go @@ -5,9 +5,9 @@ import ( "fmt" "sync" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/da" + "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/rsmt2d" ) diff --git a/share/getters/getter_test.go b/share/getters/getter_test.go index 9ca3f2ace2..18d2e0d6f1 100644 --- a/share/getters/getter_test.go +++ b/share/getters/getter_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/header" diff --git a/share/getters/testing.go b/share/getters/testing.go index fafeb0541c..665690ffe3 100644 --- a/share/getters/testing.go +++ b/share/getters/testing.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/header" diff --git a/share/ipld/add.go b/share/ipld/add.go index 4dc5f1cf47..42705557ae 100644 --- a/share/ipld/add.go +++ b/share/ipld/add.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/boxo/blockservice" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/nmt" "github.com/celestiaorg/rsmt2d" diff --git a/share/ipld/get_shares_test.go b/share/ipld/get_shares_test.go index 2f5d630473..93a697ffde 100644 --- a/share/ipld/get_shares_test.go +++ b/share/ipld/get_shares_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/wrapper" + "github.com/celestiaorg/celestia-app/v2/pkg/wrapper" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/libs/utils" diff --git a/share/ipld/nmt.go b/share/ipld/nmt.go index 6140d569df..767c1686ea 100644 --- a/share/ipld/nmt.go +++ b/share/ipld/nmt.go @@ -16,8 +16,8 @@ import ( mh "github.com/multiformats/go-multihash" mhcore "github.com/multiformats/go-multihash/core" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/nmt" "github.com/celestiaorg/celestia-node/share" diff --git a/share/ipld/nmt_test.go b/share/ipld/nmt_test.go index ecff64bf15..76d67bd2a8 100644 --- a/share/ipld/nmt_test.go +++ b/share/ipld/nmt_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/rsmt2d" "github.com/celestiaorg/celestia-node/share/eds/edstest" diff --git a/share/namespace.go b/share/namespace.go index df4ad74058..24188ecb9b 100644 --- a/share/namespace.go +++ b/share/namespace.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "fmt" - appns "github.com/celestiaorg/celestia-app/pkg/namespace" + appns "github.com/celestiaorg/go-square/namespace" "github.com/celestiaorg/nmt/namespace" ) diff --git a/share/namespace_test.go b/share/namespace_test.go index 9593319f00..e6007c245e 100644 --- a/share/namespace_test.go +++ b/share/namespace_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - appns "github.com/celestiaorg/celestia-app/pkg/namespace" + appns "github.com/celestiaorg/go-square/namespace" ) var ( diff --git a/share/share.go b/share/share.go index 298c3d46d4..6ad4bbf40f 100644 --- a/share/share.go +++ b/share/share.go @@ -7,7 +7,7 @@ import ( "fmt" "hash" - "github.com/celestiaorg/celestia-app/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" ) // DefaultRSMT2DCodec sets the default rsmt2d.Codec for shares. diff --git a/share/sharetest/testing.go b/share/sharetest/testing.go index 3889260393..15b05d5543 100644 --- a/share/sharetest/testing.go +++ b/share/sharetest/testing.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/namespace" + "github.com/celestiaorg/go-square/namespace" "github.com/celestiaorg/celestia-node/share" ) diff --git a/state/core_access.go b/state/core_access.go index e0b72886ca..231c4ef4ed 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -26,12 +26,12 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/app/encoding" - apperrors "github.com/celestiaorg/celestia-app/app/errors" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/pkg/user" - apptypes "github.com/celestiaorg/celestia-app/x/blob/types" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" + apperrors "github.com/celestiaorg/celestia-app/v2/app/errors" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/pkg/user" + apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/celestia-node/blob" diff --git a/state/core_access_test.go b/state/core_access_test.go index c9bb60f26a..dbb52b2394 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -14,10 +14,10 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/test/util/testnode" - blobtypes "github.com/celestiaorg/celestia-app/x/blob/types" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" + blobtypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" "github.com/celestiaorg/celestia-node/blob" "github.com/celestiaorg/celestia-node/share" diff --git a/state/integration_test.go b/state/integration_test.go index 8025d7b2f2..dae79eadf5 100644 --- a/state/integration_test.go +++ b/state/integration_test.go @@ -16,9 +16,9 @@ import ( rpcclient "github.com/tendermint/tendermint/rpc/client" "google.golang.org/grpc" - "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/test/util/testfactory" - "github.com/celestiaorg/celestia-app/test/util/testnode" + "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/test/util/testfactory" + "github.com/celestiaorg/celestia-app/v2/test/util/testnode" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/celestia-node/core" From 926e5a34333db8a2a1cc8cdf2986a5ccef0b2b1a Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 31 May 2024 13:24:25 -0400 Subject: [PATCH 02/75] fix: error message --- header/header.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/header/header.go b/header/header.go index c1d11dafce..e2010802b5 100644 --- a/header/header.go +++ b/header/header.go @@ -11,7 +11,6 @@ import ( "github.com/tendermint/tendermint/light" core "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/appconsts" v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2" "github.com/celestiaorg/celestia-app/v2/pkg/da" @@ -117,8 +116,7 @@ func (eh *ExtendedHeader) Validate() error { } if eh.RawHeader.Version.App != v1.Version && eh.RawHeader.Version.App != v2.Version { - return fmt.Errorf("app version mismatch, expected: %d, got %d", appconsts.LatestVersion, - eh.RawHeader.Version.App) + return fmt.Errorf("app version mismatch, expected: %d or %d, got %d", v1.Version, v2.Version, eh.RawHeader.Version.App) } err = eh.Commit.ValidateBasic() From 8c75d6a28a939bac3df7cafe2bb7ab495273ae4e Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 31 May 2024 14:30:25 -0400 Subject: [PATCH 03/75] wip: adapt to v2 --- api/gateway/share_test.go | 12 ++++++------ blob/blob.go | 12 +++++++----- blob/blob_test.go | 17 +++++++++++++---- blob/blobtest/testing.go | 12 ++++++------ blob/helper.go | 23 +++++++++++------------ blob/service_test.go | 4 ++-- core/eds.go | 2 +- core/exchange_test.go | 6 +++--- core/listener_no_race_test.go | 5 +++-- core/listener_test.go | 6 +++--- core/testing.go | 4 ++-- nodebuilder/tests/swamp/swamp.go | 12 +++++++++++- nodebuilder/tests/swamp/swamp_tx.go | 2 +- state/core_access.go | 9 +++++---- state/core_access_test.go | 2 +- state/integration_test.go | 15 +++++++++++---- 16 files changed, 86 insertions(+), 57 deletions(-) diff --git a/api/gateway/share_test.go b/api/gateway/share_test.go index 10904c3414..6310120eb6 100644 --- a/api/gateway/share_test.go +++ b/api/gateway/share_test.go @@ -5,12 +5,12 @@ import ( "testing" "github.com/stretchr/testify/require" - coretypes "github.com/tendermint/tendermint/types" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share/sharetest" + "github.com/celestiaorg/go-square/blob" ) func Test_dataFromShares(t *testing.T) { @@ -23,13 +23,13 @@ func Test_dataFromShares(t *testing.T) { ns := sharetest.RandV0Namespace() sss := shares.NewSparseShareSplitter() for _, data := range testData { - b := coretypes.Blob{ + b := blob.Blob{ Data: data, - NamespaceID: ns.ID(), - NamespaceVersion: ns.Version(), - ShareVersion: appconsts.ShareVersionZero, + NamespaceId: ns.ID(), + NamespaceVersion: uint32(ns.Version()), + ShareVersion: uint32(appconsts.ShareVersionZero), } - err := sss.Write(b) + err := sss.Write(&b) require.NoError(t, err) } diff --git a/blob/blob.go b/blob/blob.go index 89d35659dc..cdaf96b488 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -6,10 +6,12 @@ import ( "errors" "fmt" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/crypto/merkle" + v1 "github.com/celestiaorg/celestia-app/pkg/appconsts/v1" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" - "github.com/celestiaorg/celestia-app/v2/x/blob/types" + "github.com/celestiaorg/go-square/blob" + "github.com/celestiaorg/go-square/inclusion" "github.com/celestiaorg/nmt" "github.com/celestiaorg/celestia-node/share" @@ -69,7 +71,7 @@ func (p Proof) equal(input Proof) error { // Blob represents any application-specific binary data that anyone can submit to Celestia. type Blob struct { - types.Blob `json:"blob"` + blob.Blob `json:"blob"` Commitment Commitment `json:"commitment"` @@ -97,14 +99,14 @@ func NewBlob(shareVersion uint8, namespace share.Namespace, data []byte) (*Blob, return nil, err } - blob := tmproto.Blob{ + blob := blob.Blob{ NamespaceId: namespace.ID(), Data: data, ShareVersion: uint32(shareVersion), NamespaceVersion: uint32(namespace.Version()), } - com, err := types.CreateCommitment(&blob) + com, err := inclusion.CreateCommitment(&blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(v1.Version)) if err != nil { return nil, err } diff --git a/blob/blob_test.go b/blob/blob_test.go index b9cbfcd87d..0a6305c361 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -2,13 +2,19 @@ package blob import ( "bytes" + "fmt" + "math" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/types" + "github.com/celestiaorg/celestia-app/pkg/appconsts" + v1 "github.com/celestiaorg/celestia-app/pkg/appconsts/v1" apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" + "github.com/celestiaorg/go-square/blob" + "github.com/celestiaorg/go-square/inclusion" + "github.com/celestiaorg/go-square/merkle" "github.com/celestiaorg/celestia-node/blob/blobtest" ) @@ -35,7 +41,7 @@ func TestBlob(t *testing.T) { { name: "compare commitments", expectedRes: func(t *testing.T) { - comm, err := apptypes.CreateCommitment(&blob[0].Blob) + comm, err := inclusion.CreateCommitment(&blob[0].Blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(v1.Version)) require.NoError(t, err) assert.Equal(t, blob[0].Commitment, Commitment(comm)) }, @@ -80,10 +86,13 @@ func TestBlob(t *testing.T) { } } -func convertBlobs(appBlobs ...types.Blob) ([]*Blob, error) { +func convertBlobs(appBlobs ...blob.Blob) ([]*Blob, error) { blobs := make([]*Blob, 0, len(appBlobs)) for _, b := range appBlobs { - blob, err := NewBlob(b.ShareVersion, append([]byte{b.NamespaceVersion}, b.NamespaceID...), b.Data) + if b.ShareVersion > math.MaxUint8 { + return nil, fmt.Errorf("share version must be <= %d, but it was %d", math.MaxUint8, b.ShareVersion) + } + blob, err := NewBlob(uint8(b.ShareVersion), b.Namespace().Bytes(), b.Data) if err != nil { return nil, err } diff --git a/blob/blobtest/testing.go b/blob/blobtest/testing.go index ff3fdfdbee..5cbf5381e2 100644 --- a/blob/blobtest/testing.go +++ b/blob/blobtest/testing.go @@ -2,19 +2,19 @@ package blobtest import ( tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/types" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-app/v2/test/util/testfactory" "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share" + "github.com/celestiaorg/go-square/blob" ) // GenerateV0Blobs is a test utility producing v0 share formatted blobs with the // requested size and random namespaces. -func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]types.Blob, error) { - blobs := make([]types.Blob, 0, len(sizes)) +func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]blob.Blob, error) { + blobs := make([]blob.Blob, 0, len(sizes)) for _, size := range sizes { size := rawBlobSize(appconsts.FirstSparseShareContentSize * size) @@ -24,11 +24,11 @@ func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]types.Blob, error) { if err != nil { return nil, err } - appBlob.NamespaceVersion = nid[0] - appBlob.NamespaceID = nid[1:] + appBlob.NamespaceVersion = uint32(nid[0]) + appBlob.NamespaceId = nid[1:] } - blobs = append(blobs, appBlob) + blobs = append(blobs, *appBlob) } return blobs, nil } diff --git a/blob/helper.go b/blob/helper.go index c02a5a16a8..a4f5561c26 100644 --- a/blob/helper.go +++ b/blob/helper.go @@ -4,28 +4,27 @@ import ( "bytes" "sort" - "github.com/tendermint/tendermint/types" - + "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share" ) // BlobsToShares accepts blobs and convert them to the Shares. -func BlobsToShares(blobs ...*Blob) ([]share.Share, error) { - b := make([]types.Blob, len(blobs)) - for i, blob := range blobs { - namespace := blob.Namespace() - b[i] = types.Blob{ - NamespaceVersion: namespace[0], - NamespaceID: namespace[1:], - Data: blob.Data, - ShareVersion: uint8(blob.ShareVersion), +func BlobsToShares(nodeBlobs ...*Blob) ([]share.Share, error) { + b := make([]*blob.Blob, len(nodeBlobs)) + for i, nodeBlob := range nodeBlobs { + namespace := nodeBlob.Namespace() + b[i] = &blob.Blob{ + NamespaceVersion: uint32(namespace[0]), + NamespaceId: namespace[1:], + Data: nodeBlob.Data, + ShareVersion: uint32(nodeBlob.ShareVersion), } } sort.Slice(b, func(i, j int) bool { - val := bytes.Compare(b[i].NamespaceID, b[j].NamespaceID) + val := bytes.Compare(b[i].Namespace().Bytes(), b[j].Namespace().Bytes()) return val < 0 }) diff --git a/blob/service_test.go b/blob/service_test.go index d95bf7f91c..6efdf3aecf 100644 --- a/blob/service_test.go +++ b/blob/service_test.go @@ -539,8 +539,8 @@ func TestSkipPaddingsAndRetrieveBlob(t *testing.T) { appBlob, err := blobtest.GenerateV0Blobs([]int{6}, true) require.NoError(t, err) - appBlob[0].NamespaceVersion = nid[0] - appBlob[0].NamespaceID = nid[1:] + appBlob[0].NamespaceVersion = uint32(nid[0]) + appBlob[0].NamespaceId = nid[1:] blobs, err := convertBlobs(appBlob...) require.NoError(t, err) diff --git a/core/eds.go b/core/eds.go index 81cfd4c5fd..7c10300eba 100644 --- a/core/eds.go +++ b/core/eds.go @@ -32,7 +32,7 @@ func extendBlock(data types.Data, appVersion uint64, options ...nmt.Option) (*rs } // Construct the data square from the block's transactions - dataSquare, err := square.Construct(data.Txs.ToSliceOfBytes(), appVersion, appconsts.SquareSizeUpperBound(appVersion)) + dataSquare, err := square.Construct(data.Txs.ToSliceOfBytes(), appconsts.SquareSizeUpperBound(appVersion), appconsts.SubtreeRootThreshold(appVersion)) if err != nil { return nil, err } diff --git a/core/exchange_test.go b/core/exchange_test.go index 1843421751..248b77cd06 100644 --- a/core/exchange_test.go +++ b/core/exchange_test.go @@ -25,7 +25,7 @@ func TestCoreExchange_RequestHeaders(t *testing.T) { t.Cleanup(cancel) cfg := DefaultTestConfig() - cfg.ChainID = testChainID + cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) generateNonEmptyBlocks(t, ctx, fetcher, cfg, cctx) @@ -69,7 +69,7 @@ func TestExchange_DoNotStoreHistoric(t *testing.T) { t.Cleanup(cancel) cfg := DefaultTestConfig() - cfg.ChainID = testChainID + cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) generateNonEmptyBlocks(t, ctx, fetcher, cfg, cctx) @@ -154,7 +154,7 @@ func fillBlocks( default: } - _, err := cctx.FillBlock(16, cfg.Accounts, flags.BroadcastBlock) + _, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].PubKey.String(), flags.BroadcastBlock) require.NoError(t, err) } } diff --git a/core/listener_no_race_test.go b/core/listener_no_race_test.go index 3c261a7261..2441a7f2d1 100644 --- a/core/listener_no_race_test.go +++ b/core/listener_no_race_test.go @@ -25,7 +25,7 @@ func TestListenerWithNonEmptyBlocks(t *testing.T) { // create one block to store as Head in local store and then unsubscribe from block events cfg := DefaultTestConfig() - cfg.ChainID = testChainID + cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) eds := createEdsPubSub(ctx, t) @@ -45,7 +45,8 @@ func TestListenerWithNonEmptyBlocks(t *testing.T) { empty := share.EmptyRoot() // TODO extract 16 for i := 0; i < 16; i++ { - _, err := cctx.FillBlock(16, cfg.Accounts, flags.BroadcastBlock) + cfg.Genesis.Accounts() + _, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].PubKey.String(), flags.BroadcastBlock) require.NoError(t, err) msg, err := sub.Next(ctx) require.NoError(t, err) diff --git a/core/listener_test.go b/core/listener_test.go index 9850efec5b..60b6600468 100644 --- a/core/listener_test.go +++ b/core/listener_test.go @@ -46,7 +46,7 @@ func TestListener(t *testing.T) { // create one block to store as Head in local store and then unsubscribe from block events cfg := DefaultTestConfig() - cfg.ChainID = testChainID + cfg.Genesis.ChainID = testChainID fetcher, _ := createCoreFetcher(t, cfg) eds := createEdsPubSub(ctx, t) @@ -80,7 +80,7 @@ func TestListenerWithWrongChainRPC(t *testing.T) { // create one block to store as Head in local store and then unsubscribe from block events cfg := DefaultTestConfig() - cfg.ChainID = testChainID + cfg.Genesis.ChainID = testChainID fetcher, _ := createCoreFetcher(t, cfg) eds := createEdsPubSub(ctx, t) @@ -107,7 +107,7 @@ func TestListener_DoesNotStoreHistoric(t *testing.T) { // create one block to store as Head in local store and then unsubscribe from block events cfg := DefaultTestConfig() - cfg.ChainID = testChainID + cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) eds := createEdsPubSub(ctx, t) diff --git a/core/testing.go b/core/testing.go index bde792bf1e..6f9bc98cba 100644 --- a/core/testing.go +++ b/core/testing.go @@ -33,8 +33,8 @@ func DefaultTestConfig() *testnode.Config { cfg.TmConfig.Consensus.TimeoutCommit = time.Millisecond * 200 cfg = cfg. - WithAccounts(accounts). - WithSupressLogs(true) + WithFundedAccounts(accounts...). + WithSuppressLogs(true) return cfg } diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index c7dc6d299e..99e32fc08c 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -21,6 +21,7 @@ import ( "go.uber.org/fx" "golang.org/x/exp/maps" + "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" libhead "github.com/celestiaorg/go-header" @@ -74,6 +75,8 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { option(ic) } + accounts := getAccountPubKeys(ic.Genesis.Accounts()) + // Now, we are making an assumption that consensus mechanism is already tested out // so, we are not creating bridge nodes with each one containing its own core client // instead we are assigning all created BNs to 1 Core from the swamp @@ -84,7 +87,7 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { cfg: ic, Network: mocknet.New(), ClientContext: cctx, - Accounts: ic.Accounts, + Accounts: accounts, nodes: map[*nodebuilder.Node]struct{}{}, } @@ -93,6 +96,13 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { return swp } +func getAccountPubKeys(accounts []genesis.Account) (pubKeys []string) { + for _, account := range accounts { + pubKeys = append(pubKeys, account.PubKey.String()) + } + return pubKeys +} + // cleanup frees up all the resources // including stop of all created nodes func (s *Swamp) cleanup() { diff --git a/nodebuilder/tests/swamp/swamp_tx.go b/nodebuilder/tests/swamp/swamp_tx.go index be0c3bb593..b87e02fe16 100644 --- a/nodebuilder/tests/swamp/swamp_tx.go +++ b/nodebuilder/tests/swamp/swamp_tx.go @@ -19,7 +19,7 @@ func FillBlocks(ctx context.Context, cctx testnode.Context, accounts []string, b time.Sleep(time.Millisecond * 50) var err error for i := 0; i < blocks; i++ { - _, err = cctx.FillBlock(bsize, accounts, flags.BroadcastBlock) + _, err = cctx.FillBlock(bsize, accounts[0], flags.BroadcastBlock) if err != nil { break } diff --git a/state/core_access.go b/state/core_access.go index 231c4ef4ed..891a2476a6 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -34,8 +34,9 @@ import ( apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" libhead "github.com/celestiaorg/go-header" - "github.com/celestiaorg/celestia-node/blob" + nodeblob "github.com/celestiaorg/celestia-node/blob" "github.com/celestiaorg/celestia-node/header" + squareblob "github.com/celestiaorg/go-square/blob" ) const ( @@ -216,7 +217,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( ctx context.Context, fee Int, gasLim uint64, - blobs []*blob.Blob, + blobs []*nodeblob.Blob, ) (*TxResponse, error) { signer, err := ca.getSigner(ctx) if err != nil { @@ -227,7 +228,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( return nil, errors.New("state: no blobs provided") } - appblobs := make([]*apptypes.Blob, len(blobs)) + appblobs := make([]*squareblob.Blob, len(blobs)) for i := range blobs { if err := blobs[i].Namespace().ValidateForBlob(); err != nil { return nil, err @@ -402,7 +403,7 @@ func (ca *CoreAccessor) SubmitTxWithBroadcastMode( tx Tx, mode sdktx.BroadcastMode, ) (*TxResponse, error) { - txResp, err := apptypes.BroadcastTx(ctx, ca.coreConn, mode, tx) + txResp, err := ca.signer.BroadcastTx(ctx, tx) if err != nil { return nil, err } diff --git a/state/core_access_test.go b/state/core_access_test.go index dbb52b2394..7776442b4b 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -31,7 +31,7 @@ func TestSubmitPayForBlob(t *testing.T) { appConf.API.Enable = true appConf.MinGasPrices = fmt.Sprintf("0.002%s", app.BondDenom) - config := testnode.DefaultConfig().WithTendermintConfig(tmCfg).WithAppConfig(appConf).WithAccounts(accounts) + config := testnode.DefaultConfig().WithTendermintConfig(tmCfg).WithAppConfig(appConf).WithFundedAccounts(accounts...) cctx, _, grpcAddr := testnode.NewNetwork(t, config) ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/state/integration_test.go b/state/integration_test.go index dae79eadf5..bc27d085a7 100644 --- a/state/integration_test.go +++ b/state/integration_test.go @@ -17,7 +17,7 @@ import ( "google.golang.org/grpc" "github.com/celestiaorg/celestia-app/v2/app" - "github.com/celestiaorg/celestia-app/v2/test/util/testfactory" + "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" libhead "github.com/celestiaorg/go-header" @@ -47,7 +47,7 @@ func (s *IntegrationTestSuite) SetupSuite() { cfg := core.DefaultTestConfig() s.cctx = core.StartTestNodeWithConfig(s.T(), cfg) - s.accounts = cfg.Accounts + s.accounts = getAccountPubKeys(cfg.Genesis.Accounts()) accessor, err := NewCoreAccessor(s.cctx.Keyring, s.accounts[0], localHeader{s.cctx.Client}, "", "") require.NoError(s.T(), err) @@ -59,6 +59,13 @@ func (s *IntegrationTestSuite) SetupSuite() { require.NoError(s.T(), err) } +func getAccountPubKeys(accounts []genesis.Account) (pubKeys []string) { + for _, account := range accounts { + pubKeys = append(pubKeys, account.PubKey.String()) + } + return pubKeys +} + func setClients(ca *CoreAccessor, conn *grpc.ClientConn) { ca.coreConn = conn // create the staking query client @@ -121,14 +128,14 @@ func (s *IntegrationTestSuite) TestGetBalance() { func (s *IntegrationTestSuite) TestGenerateJSONBlock() { t := s.T() t.Skip("skipping testdata generation test") - resp, err := s.cctx.FillBlock(4, s.accounts, flags.BroadcastSync) + resp, err := s.cctx.FillBlock(4, s.accounts[0], flags.BroadcastSync) require := s.Require() require.NoError(err) require.Equal(abci.CodeTypeOK, resp.Code) require.NoError(s.cctx.WaitForNextBlock()) // download the block that the tx was in - res, err := testfactory.QueryWithoutProof(s.cctx.Context, resp.TxHash) + res, err := testnode.QueryWithoutProof(s.cctx.Context, resp.TxHash) require.NoError(err) block, err := s.cctx.Client.Block(s.cctx.GoContext(), &res.Height) From 8c9fc088b14ab7d964960b8b5caf449b4ff58aa5 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 6 Jun 2024 15:01:17 -0400 Subject: [PATCH 04/75] fix: copy broadcastTx from v1.x celestia-app --- state/core_access.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/state/core_access.go b/state/core_access.go index 891a2476a6..1d69f87d92 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -391,7 +391,7 @@ func (ca *CoreAccessor) BalanceForAddress(ctx context.Context, addr Address) (*B } func (ca *CoreAccessor) SubmitTx(ctx context.Context, tx Tx) (*TxResponse, error) { - txResp, err := apptypes.BroadcastTx(ctx, ca.coreConn, sdktx.BroadcastMode_BROADCAST_MODE_BLOCK, tx) + txResp, err := broadcastTx(ctx, ca.coreConn, sdktx.BroadcastMode_BROADCAST_MODE_BLOCK, tx) if err != nil { return nil, err } @@ -403,13 +403,27 @@ func (ca *CoreAccessor) SubmitTxWithBroadcastMode( tx Tx, mode sdktx.BroadcastMode, ) (*TxResponse, error) { - txResp, err := ca.signer.BroadcastTx(ctx, tx) + txResp, err := broadcastTx(ctx, ca.coreConn, mode, tx) if err != nil { return nil, err } return unsetTx(txResp.TxResponse), nil } +// broadcastTx uses the provided grpc connection to broadcast a signed and +// encoded transaction. +func broadcastTx(ctx context.Context, conn *grpc.ClientConn, mode sdktx.BroadcastMode, txBytes []byte) (*sdktx.BroadcastTxResponse, error) { + txClient := sdktx.NewServiceClient(conn) + + return txClient.BroadcastTx( + ctx, + &sdktx.BroadcastTxRequest{ + Mode: mode, + TxBytes: txBytes, + }, + ) +} + func (ca *CoreAccessor) Transfer( ctx context.Context, addr AccAddress, From c3e84e18b76851462d8d331228c6d6c9a8c060a6 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 6 Jun 2024 15:02:46 -0400 Subject: [PATCH 05/75] go mod tidy --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index ea2d356469..57f0d7511f 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/celestiaorg/go-header v0.6.1 github.com/celestiaorg/go-libp2p-messenger v0.2.0 github.com/celestiaorg/go-square v1.0.1 + github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 github.com/celestiaorg/nmt v0.21.0 github.com/celestiaorg/rsmt2d v0.13.1 github.com/cosmos/cosmos-sdk v0.46.16 @@ -101,7 +102,6 @@ require ( github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 // indirect - github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 // indirect github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect From fc8dac34a4ada83b990a3dd2a912cb0553c39176 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 6 Jun 2024 15:15:37 -0400 Subject: [PATCH 06/75] refactor: error msg --- blob/blob_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blob/blob_test.go b/blob/blob_test.go index 0a6305c361..df6c672352 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -90,7 +90,7 @@ func convertBlobs(appBlobs ...blob.Blob) ([]*Blob, error) { blobs := make([]*Blob, 0, len(appBlobs)) for _, b := range appBlobs { if b.ShareVersion > math.MaxUint8 { - return nil, fmt.Errorf("share version must be <= %d, but it was %d", math.MaxUint8, b.ShareVersion) + return nil, fmt.Errorf("share version %d is greater than max share version %d", b.ShareVersion, math.MaxUint8) } blob, err := NewBlob(uint8(b.ShareVersion), b.Namespace().Bytes(), b.Data) if err != nil { From 44e65e0250bfbd552f7222d4af63744b2d1aec1f Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 6 Jun 2024 15:16:06 -0400 Subject: [PATCH 07/75] refactor: rename to namespace --- blob/blobtest/testing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blob/blobtest/testing.go b/blob/blobtest/testing.go index 5cbf5381e2..c943fc0103 100644 --- a/blob/blobtest/testing.go +++ b/blob/blobtest/testing.go @@ -20,12 +20,12 @@ func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]blob.Blob, error) { size := rawBlobSize(appconsts.FirstSparseShareContentSize * size) appBlob := testfactory.GenerateRandomBlob(size) if !sameNamespace { - nid, err := share.NewBlobNamespaceV0(tmrand.Bytes(7)) + namespace, err := share.NewBlobNamespaceV0(tmrand.Bytes(7)) if err != nil { return nil, err } - appBlob.NamespaceVersion = uint32(nid[0]) - appBlob.NamespaceId = nid[1:] + appBlob.NamespaceVersion = uint32(namespace[0]) + appBlob.NamespaceId = namespace[1:] } blobs = append(blobs, *appBlob) From e1286a47df6c3db26716425fa0ccc6c16fc7a0bd Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 6 Jun 2024 16:22:50 -0400 Subject: [PATCH 08/75] test: validate extended header --- header/headertest/validate_test.go | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 header/headertest/validate_test.go diff --git a/header/headertest/validate_test.go b/header/headertest/validate_test.go new file mode 100644 index 0000000000..5cdd993d8e --- /dev/null +++ b/header/headertest/validate_test.go @@ -0,0 +1,52 @@ +package headertest + +import ( + "strconv" + "testing" + "time" + + "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-node/header" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/types" +) + +func TestValidate(t *testing.T) { + testCases := []struct { + extendedHeader *header.ExtendedHeader + wantErr error + }{ + { + extendedHeader: getExtendedHeader(t, 1), + wantErr: nil, + }, + } + + for i, test := range testCases { + t.Run(strconv.Itoa(i), func(t *testing.T) { + got := test.extendedHeader.Validate() + assert.Equal(t, test.wantErr, got) + }) + } +} + +func getExtendedHeader(t *testing.T, appVersion uint64) *header.ExtendedHeader { + validatorSet, privValidators := RandValidatorSet(1, 1) + rawHeader := RandRawHeader(t) + rawHeader.ValidatorsHash = validatorSet.Hash() + + minHeader := da.MinDataAvailabilityHeader() + rawHeader.DataHash = minHeader.Hash() + + blockID := RandBlockID(t) + blockID.Hash = rawHeader.Hash() + voteSet := types.NewVoteSet(rawHeader.ChainID, rawHeader.Height, 0, tmproto.PrecommitType, validatorSet) + commit, err := MakeCommit(blockID, rawHeader.Height, 0, voteSet, privValidators, time.Now()) + require.NoError(t, err) + + result, err := header.MakeExtendedHeader(rawHeader, commit, validatorSet, nil) + require.NoError(t, err) + return result +} From 866cd1e3141c6cbb3bf6ef095deabb8bd6bc0bc0 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 6 Jun 2024 16:24:31 -0400 Subject: [PATCH 09/75] test: extended header validate --- header/headertest/validate_test.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/header/headertest/validate_test.go b/header/headertest/validate_test.go index 5cdd993d8e..c5a23bb734 100644 --- a/header/headertest/validate_test.go +++ b/header/headertest/validate_test.go @@ -1,6 +1,7 @@ package headertest import ( + "fmt" "strconv" "testing" "time" @@ -22,12 +23,20 @@ func TestValidate(t *testing.T) { extendedHeader: getExtendedHeader(t, 1), wantErr: nil, }, + { + extendedHeader: getExtendedHeader(t, 2), + wantErr: nil, + }, + { + extendedHeader: getExtendedHeader(t, 3), + wantErr: fmt.Errorf("app version mismatch, expected: 1 or 2, got 3"), + }, } - for i, test := range testCases { + for i, tc := range testCases { t.Run(strconv.Itoa(i), func(t *testing.T) { - got := test.extendedHeader.Validate() - assert.Equal(t, test.wantErr, got) + got := tc.extendedHeader.Validate() + assert.Equal(t, tc.wantErr, got) }) } } @@ -35,6 +44,7 @@ func TestValidate(t *testing.T) { func getExtendedHeader(t *testing.T, appVersion uint64) *header.ExtendedHeader { validatorSet, privValidators := RandValidatorSet(1, 1) rawHeader := RandRawHeader(t) + rawHeader.Version.App = appVersion rawHeader.ValidatorsHash = validatorSet.Hash() minHeader := da.MinDataAvailabilityHeader() From 99b0b29fb253a2b16cc53ceff53a40f147580a79 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 7 Jun 2024 13:53:35 -0400 Subject: [PATCH 10/75] fix: most lint errors --- api/gateway/share_test.go | 2 +- blob/blob_test.go | 14 +++++++++----- blob/blobtest/testing.go | 2 +- blob/helper.go | 2 +- core/eds.go | 6 +++++- header/header.go | 7 ++++++- header/headertest/validate_test.go | 6 ++++-- state/core_access.go | 9 +++++++-- 8 files changed, 34 insertions(+), 14 deletions(-) diff --git a/api/gateway/share_test.go b/api/gateway/share_test.go index 6310120eb6..1928c721ec 100644 --- a/api/gateway/share_test.go +++ b/api/gateway/share_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/require" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share/sharetest" - "github.com/celestiaorg/go-square/blob" ) func Test_dataFromShares(t *testing.T) { diff --git a/blob/blob_test.go b/blob/blob_test.go index df6c672352..475f2df89f 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -41,7 +41,11 @@ func TestBlob(t *testing.T) { { name: "compare commitments", expectedRes: func(t *testing.T) { - comm, err := inclusion.CreateCommitment(&blob[0].Blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(v1.Version)) + comm, err := inclusion.CreateCommitment( + &blob[0].Blob, + merkle.HashFromByteSlices, + appconsts.SubtreeRootThreshold(v1.Version), + ) require.NoError(t, err) assert.Equal(t, blob[0].Commitment, Commitment(comm)) }, @@ -75,7 +79,7 @@ func TestBlob(t *testing.T) { newBlob := &Blob{} require.NoError(t, newBlob.UnmarshalJSON(data)) - require.True(t, bytes.Equal(blob[0].Blob.Data, newBlob.Data)) + require.True(t, bytes.Equal(blob[0].Blob.GetData(), newBlob.Data)) require.True(t, bytes.Equal(blob[0].Commitment, newBlob.Commitment)) }, }, @@ -89,10 +93,10 @@ func TestBlob(t *testing.T) { func convertBlobs(appBlobs ...blob.Blob) ([]*Blob, error) { blobs := make([]*Blob, 0, len(appBlobs)) for _, b := range appBlobs { - if b.ShareVersion > math.MaxUint8 { - return nil, fmt.Errorf("share version %d is greater than max share version %d", b.ShareVersion, math.MaxUint8) + if shareVersion := b.GetShareVersion(); shareVersion > math.MaxUint8 { + return nil, fmt.Errorf("share version %d is greater than max share version %d", shareVersion, math.MaxUint8) } - blob, err := NewBlob(uint8(b.ShareVersion), b.Namespace().Bytes(), b.Data) + blob, err := NewBlob(uint8(b.GetShareVersion()), b.Namespace().Bytes(), b.GetData()) if err != nil { return nil, err } diff --git a/blob/blobtest/testing.go b/blob/blobtest/testing.go index c943fc0103..2597ffd6f6 100644 --- a/blob/blobtest/testing.go +++ b/blob/blobtest/testing.go @@ -5,10 +5,10 @@ import ( "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-app/v2/test/util/testfactory" + "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/shares" "github.com/celestiaorg/celestia-node/share" - "github.com/celestiaorg/go-square/blob" ) // GenerateV0Blobs is a test utility producing v0 share formatted blobs with the diff --git a/blob/helper.go b/blob/helper.go index a4f5561c26..34c5b32de2 100644 --- a/blob/helper.go +++ b/blob/helper.go @@ -19,7 +19,7 @@ func BlobsToShares(nodeBlobs ...*Blob) ([]share.Share, error) { NamespaceVersion: uint32(namespace[0]), NamespaceId: namespace[1:], Data: nodeBlob.Data, - ShareVersion: uint32(nodeBlob.ShareVersion), + ShareVersion: nodeBlob.ShareVersion, } } diff --git a/core/eds.go b/core/eds.go index 7c10300eba..bb53178e09 100644 --- a/core/eds.go +++ b/core/eds.go @@ -32,7 +32,11 @@ func extendBlock(data types.Data, appVersion uint64, options ...nmt.Option) (*rs } // Construct the data square from the block's transactions - dataSquare, err := square.Construct(data.Txs.ToSliceOfBytes(), appconsts.SquareSizeUpperBound(appVersion), appconsts.SubtreeRootThreshold(appVersion)) + dataSquare, err := square.Construct( + data.Txs.ToSliceOfBytes(), + appconsts.SquareSizeUpperBound(appVersion), + appconsts.SubtreeRootThreshold(appVersion), + ) if err != nil { return nil, err } diff --git a/header/header.go b/header/header.go index e2010802b5..3ec691307d 100644 --- a/header/header.go +++ b/header/header.go @@ -116,7 +116,12 @@ func (eh *ExtendedHeader) Validate() error { } if eh.RawHeader.Version.App != v1.Version && eh.RawHeader.Version.App != v2.Version { - return fmt.Errorf("app version mismatch, expected: %d or %d, got %d", v1.Version, v2.Version, eh.RawHeader.Version.App) + return fmt.Errorf( + "app version mismatch, expected: %d or %d, got %d", + v1.Version, + v2.Version, + eh.RawHeader.Version.App, + ) } err = eh.Commit.ValidateBasic() diff --git a/header/headertest/validate_test.go b/header/headertest/validate_test.go index c5a23bb734..2dd61736f3 100644 --- a/header/headertest/validate_test.go +++ b/header/headertest/validate_test.go @@ -6,12 +6,14 @@ import ( "testing" "time" - "github.com/celestiaorg/celestia-app/pkg/da" - "github.com/celestiaorg/celestia-node/header" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" + + "github.com/celestiaorg/celestia-app/pkg/da" + + "github.com/celestiaorg/celestia-node/header" ) func TestValidate(t *testing.T) { diff --git a/state/core_access.go b/state/core_access.go index 9990231799..d78586c5c9 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -34,10 +34,10 @@ import ( "github.com/celestiaorg/celestia-app/v2/pkg/user" apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" libhead "github.com/celestiaorg/go-header" + squareblob "github.com/celestiaorg/go-square/blob" nodeblob "github.com/celestiaorg/celestia-node/blob" "github.com/celestiaorg/celestia-node/header" - squareblob "github.com/celestiaorg/go-square/blob" ) const ( @@ -419,7 +419,12 @@ func (ca *CoreAccessor) SubmitTxWithBroadcastMode( // broadcastTx uses the provided grpc connection to broadcast a signed and // encoded transaction. -func broadcastTx(ctx context.Context, conn *grpc.ClientConn, mode sdktx.BroadcastMode, txBytes []byte) (*sdktx.BroadcastTxResponse, error) { +func broadcastTx( + ctx context.Context, + conn *grpc.ClientConn, + mode sdktx.BroadcastMode, + txBytes []byte, +) (*sdktx.BroadcastTxResponse, error) { txClient := sdktx.NewServiceClient(conn) return txClient.BroadcastTx( From b0401f3f89ce3eb8985bbdc7bea37532265eeb80 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 7 Jun 2024 14:06:39 -0400 Subject: [PATCH 11/75] refactor: rename b to appBlob --- blob/blob_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blob/blob_test.go b/blob/blob_test.go index 475f2df89f..0382f58383 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -92,11 +92,11 @@ func TestBlob(t *testing.T) { func convertBlobs(appBlobs ...blob.Blob) ([]*Blob, error) { blobs := make([]*Blob, 0, len(appBlobs)) - for _, b := range appBlobs { - if shareVersion := b.GetShareVersion(); shareVersion > math.MaxUint8 { + for _, appBlob := range appBlobs { + if shareVersion := appBlob.GetShareVersion(); shareVersion > math.MaxUint8 { return nil, fmt.Errorf("share version %d is greater than max share version %d", shareVersion, math.MaxUint8) } - blob, err := NewBlob(uint8(b.GetShareVersion()), b.Namespace().Bytes(), b.GetData()) + blob, err := NewBlob(uint8(appBlob.GetShareVersion()), appBlob.Namespace().Bytes(), appBlob.GetData()) if err != nil { return nil, err } From 54eadb760cea56b13dcf4bcca68702b31bd4ce63 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 7 Jun 2024 14:13:47 -0400 Subject: [PATCH 12/75] fix: last linter warning about copying mutexes blob/blobtest/testing.go:31:25: copylocks: call of append copies lock value: github.com/celestiaorg/go-square/blob.Blob contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (govet) blobs = append(blobs, *appBlob) --- blob/blob.go | 4 ++-- blob/blob_test.go | 4 ++-- blob/blobtest/testing.go | 6 +++--- state/core_access.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blob/blob.go b/blob/blob.go index cdaf96b488..21107a1752 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -71,7 +71,7 @@ func (p Proof) equal(input Proof) error { // Blob represents any application-specific binary data that anyone can submit to Celestia. type Blob struct { - blob.Blob `json:"blob"` + *blob.Blob `json:"blob"` Commitment Commitment `json:"commitment"` @@ -110,7 +110,7 @@ func NewBlob(shareVersion uint8, namespace share.Namespace, data []byte) (*Blob, if err != nil { return nil, err } - return &Blob{Blob: blob, Commitment: com, namespace: namespace, index: -1}, nil + return &Blob{Blob: &blob, Commitment: com, namespace: namespace, index: -1}, nil } // Namespace returns blob's namespace. diff --git a/blob/blob_test.go b/blob/blob_test.go index 0382f58383..1768bdf59a 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -42,7 +42,7 @@ func TestBlob(t *testing.T) { name: "compare commitments", expectedRes: func(t *testing.T) { comm, err := inclusion.CreateCommitment( - &blob[0].Blob, + blob[0].Blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(v1.Version), ) @@ -90,7 +90,7 @@ func TestBlob(t *testing.T) { } } -func convertBlobs(appBlobs ...blob.Blob) ([]*Blob, error) { +func convertBlobs(appBlobs ...*blob.Blob) ([]*Blob, error) { blobs := make([]*Blob, 0, len(appBlobs)) for _, appBlob := range appBlobs { if shareVersion := appBlob.GetShareVersion(); shareVersion > math.MaxUint8 { diff --git a/blob/blobtest/testing.go b/blob/blobtest/testing.go index 2597ffd6f6..eb85bead27 100644 --- a/blob/blobtest/testing.go +++ b/blob/blobtest/testing.go @@ -13,8 +13,8 @@ import ( // GenerateV0Blobs is a test utility producing v0 share formatted blobs with the // requested size and random namespaces. -func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]blob.Blob, error) { - blobs := make([]blob.Blob, 0, len(sizes)) +func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]*blob.Blob, error) { + blobs := make([]*blob.Blob, 0, len(sizes)) for _, size := range sizes { size := rawBlobSize(appconsts.FirstSparseShareContentSize * size) @@ -28,7 +28,7 @@ func GenerateV0Blobs(sizes []int, sameNamespace bool) ([]blob.Blob, error) { appBlob.NamespaceId = namespace[1:] } - blobs = append(blobs, *appBlob) + blobs = append(blobs, appBlob) } return blobs, nil } diff --git a/state/core_access.go b/state/core_access.go index d78586c5c9..40e8bf4e92 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -240,7 +240,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( if err := blobs[i].Namespace().ValidateForBlob(); err != nil { return nil, err } - appblobs[i] = &blobs[i].Blob + appblobs[i] = blobs[i].Blob } // we only estimate gas if the user wants us to (by setting the gasLim to 0). In the future we may From 9c9ff4e4fc38af556b1a01baa91a056753b90781 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 25 Jun 2024 11:54:23 -0400 Subject: [PATCH 13/75] bump to celestia-app v2.0.0-rc2 --- blob/blob.go | 2 +- blob/blob_test.go | 4 +- go.mod | 21 +++++----- go.sum | 64 ++++++++++++++---------------- header/headertest/validate_test.go | 2 +- 5 files changed, 44 insertions(+), 49 deletions(-) diff --git a/blob/blob.go b/blob/blob.go index 21107a1752..66724ff1d7 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -8,8 +8,8 @@ import ( "github.com/tendermint/tendermint/crypto/merkle" - v1 "github.com/celestiaorg/celestia-app/pkg/appconsts/v1" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/inclusion" "github.com/celestiaorg/nmt" diff --git a/blob/blob_test.go b/blob/blob_test.go index 1768bdf59a..8d091529aa 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/celestiaorg/celestia-app/pkg/appconsts" - v1 "github.com/celestiaorg/celestia-app/pkg/appconsts/v1" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/inclusion" diff --git a/go.mod b/go.mod index b67c951bb2..17d2e11d16 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/celestiaorg/celestia-node -go 1.22.3 +go 1.22.4 require ( cosmossdk.io/errors v1.0.1 @@ -8,12 +8,11 @@ require ( github.com/BurntSushi/toml v1.4.0 github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b github.com/benbjohnson/clock v1.3.5 - github.com/celestiaorg/celestia-app v1.11.0 - github.com/celestiaorg/celestia-app/v2 v2.0.0-rc1 + github.com/celestiaorg/celestia-app/v2 v2.0.0-rc2 github.com/celestiaorg/go-fraud v0.2.1 github.com/celestiaorg/go-header v0.6.2 github.com/celestiaorg/go-libp2p-messenger v0.2.0 - github.com/celestiaorg/go-square v1.0.1 + github.com/celestiaorg/go-square v1.1.0 github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 github.com/celestiaorg/nmt v0.21.0 github.com/celestiaorg/rsmt2d v0.13.1 @@ -76,7 +75,7 @@ require ( golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 ) require ( @@ -89,7 +88,7 @@ require ( github.com/99designs/keyring v1.2.2 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/Jorropo/jsync v1.0.1 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -116,7 +115,7 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogoproto v1.4.12 // indirect + github.com/cosmos/gogoproto v1.5.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.6 // indirect github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2 // indirect @@ -128,7 +127,7 @@ require ( github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect - github.com/deckarep/golang-set/v2 v2.1.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -140,7 +139,7 @@ require ( github.com/elastic/gosigar v0.14.2 // indirect github.com/etclabscore/go-jsonschema-walk v0.0.6 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect - github.com/ethereum/go-ethereum v1.14.3 // indirect + github.com/ethereum/go-ethereum v1.14.5 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect @@ -297,7 +296,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.6+incompatible // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect @@ -357,5 +356,5 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // broken goleveldb needs to be replaced for the cosmos-sdk and celestia-app github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.36.1-tm-v0.34.29 + github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29 ) diff --git a/go.sum b/go.sum index 0f99143534..3c2b18d95e 100644 --- a/go.sum +++ b/go.sum @@ -233,8 +233,8 @@ github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETF github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +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/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= @@ -248,8 +248,8 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= -github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= @@ -354,12 +354,10 @@ github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOC github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 h1:h1Y4V3EMQ2mFmNtWt2sIhZIuyASInj1a9ExI8xOsTOw= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0/go.mod h1:x4DKyfKOSv1ZJM9NwV+Pw01kH2CD7N5zTFclXIVJ6GQ= -github.com/celestiaorg/celestia-app v1.11.0 h1:NV2nWR4r75qWY0reawrzoMnVRRbUgVtrgtFT9+ytmGQ= -github.com/celestiaorg/celestia-app v1.11.0/go.mod h1:aKJkApIZnGt/q5ZYtsf6UM21MJR+D62rwWn2mCHKBNE= -github.com/celestiaorg/celestia-app/v2 v2.0.0-rc1 h1:LOZpqGKIDP4om7HPph0EwjD+LbDc4gdskADjc6Rx9Qo= -github.com/celestiaorg/celestia-app/v2 v2.0.0-rc1/go.mod h1:yvWZPr1aWsXyUXCPIoqqBYE4YaPU6yX9yLUjFxyJcRE= -github.com/celestiaorg/celestia-core v1.36.1-tm-v0.34.29 h1:BuYworCMtFxAYyM5l1C0gx6PT/ViHosVRydvYd7vCqs= -github.com/celestiaorg/celestia-core v1.36.1-tm-v0.34.29/go.mod h1:AL7kotb6ucKF4bpKKhGIzGhGL7dwYj2nFstiFC6PGxM= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc2 h1:jdezDe/Lh+Sf7iepZbYg45edtQN0js1f04NWVhE3GZU= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc2/go.mod h1:fhpOoCIxMX8ziB2eNKEgdlZ891K38uBYV0QCtonOWU0= +github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29 h1:9nJDE37cTg/Cx+f4FS2g7yYeoLrsaNJg36XsQ47sS1A= +github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29/go.mod h1:IIdMu9gnDtjUmZkFuBN4Bf11z/rBtlL2rtwbQxdbRAU= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 h1:N2uETI13szEKnGAdKhtTR0EsrpcW0AwRKYER74WLnuw= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16/go.mod h1:Bpl1LSWiDpQumgOhhMTZBMopqa0j7fRasIhvTZB44P0= github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403 h1:Lj73O3S+KJx5/hgZ+IeOLEIoLsAveJN/7/ZtQQtPSVw= @@ -370,16 +368,14 @@ github.com/celestiaorg/go-header v0.6.2 h1:qgWyJQg+/x6k4QAfN1rPt2HXHZjQOmCqD0ct4 github.com/celestiaorg/go-header v0.6.2/go.mod h1:Az4S4NxMOJ1eAzOaF8u5AZt5UzsSzg92uqpdXS3yOZE= github.com/celestiaorg/go-libp2p-messenger v0.2.0 h1:/0MuPDcFamQMbw9xTZ73yImqgTO3jHV7wKHvWD/Irao= github.com/celestiaorg/go-libp2p-messenger v0.2.0/go.mod h1:s9PIhMi7ApOauIsfBcQwbr7m+HBzmVfDIS+QLdgzDSo= -github.com/celestiaorg/go-square v1.0.1 h1:LEG1zrw4i03VBMElQF8GAbKYgh1bT1uGzWxasU2ePuo= -github.com/celestiaorg/go-square v1.0.1/go.mod h1:XMv5SGCeGSkynW2OOsedugaW/rQlvzxGzWGxTKsyYOU= +github.com/celestiaorg/go-square v1.1.0 h1:K4tBL5PCJwDtpBfyDxxZ3N962aC9VYb5/bw3LjagEtY= +github.com/celestiaorg/go-square v1.1.0/go.mod h1:1EXMErhDrWJM8B8V9hN7dqJ2kUTClfwdqMOmF9yQUa0= github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 h1:PYInrsYzrDIsZW9Yb86OTi2aEKuPcpgJt6Mc0Jlc/yg= github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076/go.mod h1:hlidgivKyvv7m4Yl2Fdf2mSTmazZYxX8+bnr5IQrI98= github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26 h1:P2RI1xJ49EZ8cuHMcH+ZSBonfRDtBS8OS9Jdt1BWX3k= github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26/go.mod h1:2m8ukndOegwB0PU0AfJCwDUQHqd7QQRlSXvQL5VToVY= github.com/celestiaorg/nmt v0.21.0 h1:81MBqxNn3orByoiCtdNVjwi5WsLgMkzHwP02ZMhTBHM= github.com/celestiaorg/nmt v0.21.0/go.mod h1:ia/EpCk0enD5yO5frcxoNoFToz2Ghtk2i+blmCRjIY8= -github.com/celestiaorg/quantum-gravity-bridge/v2 v2.1.2 h1:Q8nr5SAtDW5gocrBwqwDJcSS/JedqU58WwQA2SP+nXw= -github.com/celestiaorg/quantum-gravity-bridge/v2 v2.1.2/go.mod h1:s/LzLUw0WeYPJ6qdk4q46jKLOq7rc9Z5Mdrxtfpcigw= github.com/celestiaorg/rsmt2d v0.13.1 h1:eRhp79DKTkDojwInKVs1lRK6f6zJc1BVlmZfUfI19yQ= github.com/celestiaorg/rsmt2d v0.13.1/go.mod h1:P7t92OATXbBmc/P5uR+GCOBv+PV8wLb0vU32ucrb148= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -485,8 +481,8 @@ github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRAp github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= -github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= +github.com/cosmos/gogoproto v1.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o= +github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= @@ -506,8 +502,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668 h1:ZFUue+PNxmHlu7pYv+IYMtqlaO/0VwaGEqKepZf9JpA= github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= -github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= @@ -531,8 +527,8 @@ github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQY github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= -github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +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.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -571,8 +567,8 @@ github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwu github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= +github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -610,8 +606,10 @@ github.com/etclabscore/go-openrpc-reflect v0.0.37/go.mod h1:0404Ky3igAasAOpyj1eE github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= -github.com/ethereum/go-ethereum v1.14.3 h1:5zvnAqLtnCZrU9uod1JCvHWJbPMURzYFHfc2eHz4PHA= -github.com/ethereum/go-ethereum v1.14.3/go.mod h1:1STrq471D0BQbCX9He0hUj4bHxX2k6mt5nOQJhDNOJ8= +github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw= +github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -661,8 +659,6 @@ github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44 github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= 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/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= -github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= @@ -1982,8 +1978,8 @@ github.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333 h1:CznVS40zms github.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333/go.mod h1:Ag6rSXkHIckQmjFBCweJEEt1mrTPBv8b9W4aU/NQWfI= 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.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= -github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= +github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -2184,8 +2180,8 @@ github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -3324,8 +3320,8 @@ 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.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -3342,8 +3338,8 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +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/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= diff --git a/header/headertest/validate_test.go b/header/headertest/validate_test.go index 2dd61736f3..8d95c357de 100644 --- a/header/headertest/validate_test.go +++ b/header/headertest/validate_test.go @@ -11,7 +11,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/da" + "github.com/celestiaorg/celestia-app/v2/pkg/da" "github.com/celestiaorg/celestia-node/header" ) From a59a373ba272412acde01dd006fcbc7f44ebf47e Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 25 Jun 2024 15:47:17 -0400 Subject: [PATCH 14/75] fix: split txClient from signer --- state/core_access.go | 115 ++++++++++--------------------------------- 1 file changed, 26 insertions(+), 89 deletions(-) diff --git a/state/core_access.go b/state/core_access.go index 40e8bf4e92..704a40006a 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -71,11 +71,8 @@ type CoreAccessor struct { keyring keyring.Keyring addr sdktypes.AccAddress - // TODO: (@cmwaters) - once multiple keys within a signer is supported, - // this will no longer be necessary. - // ref: https://github.com/celestiaorg/celestia-app/issues/3259 - signerMu sync.Mutex - signer *user.Signer + + txClient *user.TxClient getter libhead.Head[*header.ExtendedHeader] @@ -176,10 +173,11 @@ func (ca *CoreAccessor) Start(ctx context.Context) error { // create ABCI query client ca.abciQueryCli = tmservice.NewServiceClient(ca.coreConn) - // set up signer to handle tx submission - ca.signer, err = ca.setupSigner(ctx) + // set up txClient to handle tx submission + encCfg := encoding.MakeConfig(app.ModuleEncodingRegisters...) + ca.txClient, err = user.SetupTxClient(ctx, ca.keyring, ca.coreConn, encCfg) if err != nil { - log.Warnw("failed to set up signer, check if node's account is funded", "err", err) + log.Warnw("failed to set up tx client, check if node's account is funded", "err", err) } ca.minGasPrice, err = ca.queryMinimumGasPrice(ctx) @@ -226,11 +224,6 @@ func (ca *CoreAccessor) SubmitPayForBlob( gasLim uint64, blobs []*nodeblob.Blob, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - if len(blobs) == 0 { return nil, errors.New("state: no blobs provided") } @@ -278,7 +271,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( if feeGrant != nil { options = append(options, feeGrant) } - response, err := signer.SubmitPayForBlob( + response, err := ca.txClient.SubmitPayForBlob( ctx, appblobs, options..., @@ -443,25 +436,20 @@ func (ca *CoreAccessor) Transfer( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - if amount.IsNil() || amount.Int64() <= 0 { return nil, ErrInvalidAmount } coins := sdktypes.NewCoins(sdktypes.NewCoin(app.BondDenom, amount)) - msg := banktypes.NewMsgSend(signer.Address(), addr, coins) + msg := banktypes.NewMsgSend(ca.txClient.DefaultAddress(), addr, coins) if gasLim == 0 { var err error - gasLim, err = signer.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -473,26 +461,21 @@ func (ca *CoreAccessor) CancelUnbondingDelegation( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - if amount.IsNil() || amount.Int64() <= 0 { return nil, ErrInvalidAmount } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgCancelUnbondingDelegation(signer.Address(), valAddr, height.Int64(), coins) + msg := stakingtypes.NewMsgCancelUnbondingDelegation(ca.txClient.DefaultAddress(), valAddr, height.Int64(), coins) if gasLim == 0 { var err error - gasLim, err = signer.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -504,26 +487,21 @@ func (ca *CoreAccessor) BeginRedelegate( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - if amount.IsNil() || amount.Int64() <= 0 { return nil, ErrInvalidAmount } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgBeginRedelegate(signer.Address(), srcValAddr, dstValAddr, coins) + msg := stakingtypes.NewMsgBeginRedelegate(ca.txClient.DefaultAddress(), srcValAddr, dstValAddr, coins) if gasLim == 0 { var err error - gasLim, err = signer.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -534,25 +512,20 @@ func (ca *CoreAccessor) Undelegate( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - if amount.IsNil() || amount.Int64() <= 0 { return nil, ErrInvalidAmount } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgUndelegate(signer.Address(), delAddr, coins) + msg := stakingtypes.NewMsgUndelegate(ca.txClient.DefaultAddress(), delAddr, coins) if gasLim == 0 { var err error - gasLim, err = signer.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -563,25 +536,20 @@ func (ca *CoreAccessor) Delegate( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - if amount.IsNil() || amount.Int64() <= 0 { return nil, ErrInvalidAmount } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgDelegate(signer.Address(), delAddr, coins) + msg := stakingtypes.NewMsgDelegate(ca.txClient.DefaultAddress(), delAddr, coins) if gasLim == 0 { var err error - gasLim, err = signer.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -627,12 +595,7 @@ func (ca *CoreAccessor) GrantFee( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - - granter := signer.Address() + granter := ca.txClient.DefaultAddress() allowance := &feegrant.BasicAllowance{} if !amount.IsZero() { @@ -645,7 +608,7 @@ func (ca *CoreAccessor) GrantFee( return nil, err } - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), withFee(fee)) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), withFee(fee)) return unsetTx(resp), err } @@ -655,15 +618,10 @@ func (ca *CoreAccessor) RevokeGrantFee( fee Int, gasLim uint64, ) (*TxResponse, error) { - signer, err := ca.getSigner(ctx) - if err != nil { - return nil, err - } - - granter := signer.Address() + granter := ca.txClient.DefaultAddress() msg := feegrant.NewMsgRevokeAllowance(granter, grantee) - resp, err := signer.SubmitTx(ctx, []sdktypes.Msg{&msg}, user.SetGasLimit(gasLim), withFee(fee)) + resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{&msg}, user.SetGasLimit(gasLim), withFee(fee)) return unsetTx(resp), err } @@ -714,27 +672,6 @@ func (ca *CoreAccessor) queryMinimumGasPrice( return coins.AmountOf(app.BondDenom).MustFloat64(), nil } -// getSigner returns the signer if it has already been constructed, otherwise -// it will attempt to set it up. The signer can only be constructed if the account -// exists / is funded. -func (ca *CoreAccessor) getSigner(ctx context.Context) (*user.Signer, error) { - ca.signerMu.Lock() - defer ca.signerMu.Unlock() - - if ca.signer != nil { - return ca.signer, nil - } - - var err error - ca.signer, err = ca.setupSigner(ctx) - return ca.signer, err -} - -func (ca *CoreAccessor) setupSigner(ctx context.Context) (*user.Signer, error) { - encCfg := encoding.MakeConfig(app.ModuleEncodingRegisters...) - return user.SetupSigner(ctx, ca.keyring, ca.coreConn, ca.addr, encCfg) -} - func withFee(fee Int) user.TxOption { gasFee := sdktypes.NewCoins(sdktypes.NewCoin(app.BondDenom, fee)) return user.SetFeeAmount(gasFee) From ae72d69d32f23578d63567f4cea2155584930487 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 25 Jun 2024 15:47:20 -0400 Subject: [PATCH 15/75] fix: lint --- nodebuilder/fraud/lifecycle.go | 2 +- share/eds/cache/noop.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nodebuilder/fraud/lifecycle.go b/nodebuilder/fraud/lifecycle.go index e89eaee3cc..13fcddbd9d 100644 --- a/nodebuilder/fraud/lifecycle.go +++ b/nodebuilder/fraud/lifecycle.go @@ -69,7 +69,7 @@ func (breaker *ServiceBreaker[S, H]) Stop(ctx context.Context) error { if breaker.ctx.Err() != nil { // short circuit if the service was already stopped - return nil + return nil //nolint:nilerr } breaker.sub.Cancel() diff --git a/share/eds/cache/noop.go b/share/eds/cache/noop.go index 5d7444054e..8e1c17924a 100644 --- a/share/eds/cache/noop.go +++ b/share/eds/cache/noop.go @@ -38,7 +38,7 @@ var _ Accessor = (*NoopAccessor)(nil) type NoopAccessor struct{} func (n NoopAccessor) Blockstore() (dagstore.ReadBlockstore, error) { - return nil, nil //nolint:nilnil + return nil, nil } func (n NoopAccessor) Reader() io.Reader { From b7633c91fe924486520596cc84907c8f37773242 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 25 Jun 2024 15:50:41 -0400 Subject: [PATCH 16/75] chore(deps): upgrade to Go 1.22.4 --- .github/workflows/ci_release.yml | 2 +- Dockerfile | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 6e3cdd0681..8efcf094b9 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest env: # upgrade go version throughout pipeline here - GO_VERSION: "1.22" + GO_VERSION: "1.22.4" outputs: go-version: ${{ steps.set-vars.outputs.go-version }} branch: ${{ steps.trim_ref.outputs.branch }} diff --git a/Dockerfile b/Dockerfile index bb90920e58..7dcaaf5f81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM docker.io/golang:1.22-alpine3.18 as builder +FROM --platform=$BUILDPLATFORM docker.io/golang:1.22.4-alpine3.20 as builder ARG TARGETPLATFORM ARG BUILDPLATFORM diff --git a/README.md b/README.md index 423ec17615..c671ccb6a9 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Continue reading [here](https://blog.celestia.org/celestia-mvp-release-data-avai | Requirement | Notes | | ----------- |----------------| -| Go version | 1.22 or higher | +| Go version | 1.22.4 or higher | ## System Requirements From dff037eafe69cf31364967e8856594a50e06bb44 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 25 Jun 2024 15:58:56 -0400 Subject: [PATCH 17/75] fix: lint --- share/eds/cache/noop.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/eds/cache/noop.go b/share/eds/cache/noop.go index 8e1c17924a..5d7444054e 100644 --- a/share/eds/cache/noop.go +++ b/share/eds/cache/noop.go @@ -38,7 +38,7 @@ var _ Accessor = (*NoopAccessor)(nil) type NoopAccessor struct{} func (n NoopAccessor) Blockstore() (dagstore.ReadBlockstore, error) { - return nil, nil + return nil, nil //nolint:nilnil } func (n NoopAccessor) Reader() io.Reader { From efb6c9d793da918162ba5ee89b1726eb853af164 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 27 Jun 2024 12:18:06 -0400 Subject: [PATCH 18/75] try to fix lint --- nodebuilder/fraud/lifecycle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder/fraud/lifecycle.go b/nodebuilder/fraud/lifecycle.go index 13fcddbd9d..e89eaee3cc 100644 --- a/nodebuilder/fraud/lifecycle.go +++ b/nodebuilder/fraud/lifecycle.go @@ -69,7 +69,7 @@ func (breaker *ServiceBreaker[S, H]) Stop(ctx context.Context) error { if breaker.ctx.Err() != nil { // short circuit if the service was already stopped - return nil //nolint:nilerr + return nil } breaker.sub.Cancel() From f95d9c7ad268c62069c5b953319c048225cddc16 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 2 Jul 2024 15:29:04 -0400 Subject: [PATCH 19/75] refactor: update core_access.go implementation Based on https://github.com/celestiaorg/celestia-node/pull/3453 --- state/core_access.go | 128 +++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 71 deletions(-) diff --git a/state/core_access.go b/state/core_access.go index 704a40006a..91bf449f4e 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -24,7 +24,6 @@ import ( "github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/proto/tendermint/crypto" "google.golang.org/grpc" - "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials/insecure" "github.com/celestiaorg/celestia-app/v2/app" @@ -36,7 +35,7 @@ import ( libhead "github.com/celestiaorg/go-header" squareblob "github.com/celestiaorg/go-square/blob" - nodeblob "github.com/celestiaorg/celestia-node/blob" + "github.com/celestiaorg/celestia-node/blob" "github.com/celestiaorg/celestia-node/header" ) @@ -70,9 +69,8 @@ type CoreAccessor struct { cancel context.CancelFunc keyring keyring.Keyring - addr sdktypes.AccAddress - - txClient *user.TxClient + keyname string + client *user.TxClient getter libhead.Head[*header.ExtendedHeader] @@ -118,18 +116,9 @@ func NewCoreAccessor( prt.RegisterOpDecoder(storetypes.ProofOpIAVLCommitment, storetypes.CommitmentOpDecoder) prt.RegisterOpDecoder(storetypes.ProofOpSimpleMerkleCommitment, storetypes.CommitmentOpDecoder) - record, err := keyring.Key(keyname) - if err != nil { - return nil, fmt.Errorf("getting key %s: %w", keyname, err) - } - addr, err := record.GetAddress() - if err != nil { - return nil, fmt.Errorf("getting address for key %s: %w", keyname, err) - } - ca := &CoreAccessor{ keyring: keyring, - addr: addr, + keyname: keyname, getter: getter, coreIP: coreIP, grpcPort: grpcPort, @@ -157,13 +146,6 @@ func (ca *CoreAccessor) Start(ctx context.Context) error { if err != nil { return err } - // this ensures we can't start the node without core connection - client.Connect() - if !client.WaitForStateChange(ctx, connectivity.Ready) { - // hits the case when context is canceled - return fmt.Errorf("couldn't connect to core endpoint(%s): %w", endpoint, ctx.Err()) - } - ca.coreConn = client // create the staking query client @@ -173,11 +155,10 @@ func (ca *CoreAccessor) Start(ctx context.Context) error { // create ABCI query client ca.abciQueryCli = tmservice.NewServiceClient(ca.coreConn) - // set up txClient to handle tx submission - encCfg := encoding.MakeConfig(app.ModuleEncodingRegisters...) - ca.txClient, err = user.SetupTxClient(ctx, ca.keyring, ca.coreConn, encCfg) + // set up signer to handle tx submission + ca.client, err = ca.setupTxClient(ctx, ca.keyname) if err != nil { - log.Warnw("failed to set up tx client, check if node's account is funded", "err", err) + log.Warnw("failed to set up signer, check if node's account is funded", "err", err) } ca.minGasPrice, err = ca.queryMinimumGasPrice(ctx) @@ -222,7 +203,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( ctx context.Context, fee Int, gasLim uint64, - blobs []*nodeblob.Blob, + blobs []*blob.Blob, ) (*TxResponse, error) { if len(blobs) == 0 { return nil, errors.New("state: no blobs provided") @@ -271,7 +252,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( if feeGrant != nil { options = append(options, feeGrant) } - response, err := ca.txClient.SubmitPayForBlob( + response, err := ca.client.SubmitPayForBlob( ctx, appblobs, options..., @@ -310,11 +291,11 @@ func (ca *CoreAccessor) SubmitPayForBlob( } func (ca *CoreAccessor) AccountAddress(context.Context) (Address, error) { - return Address{ca.addr}, nil + return Address{ca.client.DefaultAddress()}, nil } func (ca *CoreAccessor) Balance(ctx context.Context) (*Balance, error) { - return ca.BalanceForAddress(ctx, Address{ca.addr}) + return ca.BalanceForAddress(ctx, Address{ca.client.DefaultAddress()}) } func (ca *CoreAccessor) BalanceForAddress(ctx context.Context, addr Address) (*Balance, error) { @@ -410,25 +391,6 @@ func (ca *CoreAccessor) SubmitTxWithBroadcastMode( return unsetTx(txResp.TxResponse), nil } -// broadcastTx uses the provided grpc connection to broadcast a signed and -// encoded transaction. -func broadcastTx( - ctx context.Context, - conn *grpc.ClientConn, - mode sdktx.BroadcastMode, - txBytes []byte, -) (*sdktx.BroadcastTxResponse, error) { - txClient := sdktx.NewServiceClient(conn) - - return txClient.BroadcastTx( - ctx, - &sdktx.BroadcastTxRequest{ - Mode: mode, - TxBytes: txBytes, - }, - ) -} - func (ca *CoreAccessor) Transfer( ctx context.Context, addr AccAddress, @@ -441,15 +403,15 @@ func (ca *CoreAccessor) Transfer( } coins := sdktypes.NewCoins(sdktypes.NewCoin(app.BondDenom, amount)) - msg := banktypes.NewMsgSend(ca.txClient.DefaultAddress(), addr, coins) + msg := banktypes.NewMsgSend(ca.client.DefaultAddress(), addr, coins) if gasLim == 0 { var err error - gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.client.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -466,16 +428,16 @@ func (ca *CoreAccessor) CancelUnbondingDelegation( } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgCancelUnbondingDelegation(ca.txClient.DefaultAddress(), valAddr, height.Int64(), coins) + msg := stakingtypes.NewMsgCancelUnbondingDelegation(ca.client.DefaultAddress(), valAddr, height.Int64(), coins) if gasLim == 0 { var err error - gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.client.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -492,16 +454,16 @@ func (ca *CoreAccessor) BeginRedelegate( } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgBeginRedelegate(ca.txClient.DefaultAddress(), srcValAddr, dstValAddr, coins) + msg := stakingtypes.NewMsgBeginRedelegate(ca.client.DefaultAddress(), srcValAddr, dstValAddr, coins) if gasLim == 0 { var err error - gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.client.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -517,15 +479,15 @@ func (ca *CoreAccessor) Undelegate( } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgUndelegate(ca.txClient.DefaultAddress(), delAddr, coins) + msg := stakingtypes.NewMsgUndelegate(ca.client.DefaultAddress(), delAddr, coins) if gasLim == 0 { var err error - gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.client.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -541,15 +503,15 @@ func (ca *CoreAccessor) Delegate( } coins := sdktypes.NewCoin(app.BondDenom, amount) - msg := stakingtypes.NewMsgDelegate(ca.txClient.DefaultAddress(), delAddr, coins) + msg := stakingtypes.NewMsgDelegate(ca.client.DefaultAddress(), delAddr, coins) if gasLim == 0 { var err error - gasLim, err = ca.txClient.EstimateGas(ctx, []sdktypes.Msg{msg}) + gasLim, err = ca.client.EstimateGas(ctx, []sdktypes.Msg{msg}) if err != nil { return nil, fmt.Errorf("estimating gas: %w", err) } } - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), user.SetFee(fee.Uint64())) return unsetTx(resp), err } @@ -557,7 +519,7 @@ func (ca *CoreAccessor) QueryDelegation( ctx context.Context, valAddr ValAddress, ) (*stakingtypes.QueryDelegationResponse, error) { - delAddr := ca.addr + delAddr := ca.client.DefaultAddress() return ca.stakingCli.Delegation(ctx, &stakingtypes.QueryDelegationRequest{ DelegatorAddr: delAddr.String(), ValidatorAddr: valAddr.String(), @@ -568,7 +530,7 @@ func (ca *CoreAccessor) QueryUnbonding( ctx context.Context, valAddr ValAddress, ) (*stakingtypes.QueryUnbondingDelegationResponse, error) { - delAddr := ca.addr + delAddr := ca.client.DefaultAddress() return ca.stakingCli.UnbondingDelegation(ctx, &stakingtypes.QueryUnbondingDelegationRequest{ DelegatorAddr: delAddr.String(), ValidatorAddr: valAddr.String(), @@ -580,7 +542,7 @@ func (ca *CoreAccessor) QueryRedelegations( srcValAddr, dstValAddr ValAddress, ) (*stakingtypes.QueryRedelegationsResponse, error) { - delAddr := ca.addr + delAddr := ca.client.DefaultAddress() return ca.stakingCli.Redelegations(ctx, &stakingtypes.QueryRedelegationsRequest{ DelegatorAddr: delAddr.String(), SrcValidatorAddr: srcValAddr.String(), @@ -595,7 +557,7 @@ func (ca *CoreAccessor) GrantFee( fee Int, gasLim uint64, ) (*TxResponse, error) { - granter := ca.txClient.DefaultAddress() + granter := ca.client.DefaultAddress() allowance := &feegrant.BasicAllowance{} if !amount.IsZero() { @@ -608,7 +570,7 @@ func (ca *CoreAccessor) GrantFee( return nil, err } - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), withFee(fee)) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{msg}, user.SetGasLimit(gasLim), withFee(fee)) return unsetTx(resp), err } @@ -618,10 +580,10 @@ func (ca *CoreAccessor) RevokeGrantFee( fee Int, gasLim uint64, ) (*TxResponse, error) { - granter := ca.txClient.DefaultAddress() + granter := ca.client.DefaultAddress() msg := feegrant.NewMsgRevokeAllowance(granter, grantee) - resp, err := ca.txClient.SubmitTx(ctx, []sdktypes.Msg{&msg}, user.SetGasLimit(gasLim), withFee(fee)) + resp, err := ca.client.SubmitTx(ctx, []sdktypes.Msg{&msg}, user.SetGasLimit(gasLim), withFee(fee)) return unsetTx(resp), err } @@ -672,6 +634,11 @@ func (ca *CoreAccessor) queryMinimumGasPrice( return coins.AmountOf(app.BondDenom).MustFloat64(), nil } +func (ca *CoreAccessor) setupTxClient(ctx context.Context, keyName string) (*user.TxClient, error) { + encCfg := encoding.MakeConfig(app.ModuleEncodingRegisters...) + return user.SetupTxClient(ctx, ca.keyring, ca.coreConn, encCfg, user.WithDefaultAccount(keyName)) +} + func withFee(fee Int) user.TxOption { gasFee := sdktypes.NewCoins(sdktypes.NewCoin(app.BondDenom, fee)) return user.SetFeeAmount(gasFee) @@ -690,3 +657,22 @@ func unsetTx(txResponse *TxResponse) *TxResponse { } return txResponse } + +// broadcastTx uses the provided grpc connection to broadcast a signed and +// encoded transaction. +func broadcastTx( + ctx context.Context, + conn *grpc.ClientConn, + mode sdktx.BroadcastMode, + txBytes []byte, +) (*sdktx.BroadcastTxResponse, error) { + txClient := sdktx.NewServiceClient(conn) + + return txClient.BroadcastTx( + ctx, + &sdktx.BroadcastTxRequest{ + Mode: mode, + TxBytes: txBytes, + }, + ) +} From bccc2b4dcbf23eda44d2fd0d536884bea950afff Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 2 Jul 2024 16:15:30 -0400 Subject: [PATCH 20/75] test: remove min gas price assertion b/c TODO There's a TODO that states celestia-app isn't set up. The assertion fails because the min gas price returned is "" even though the app config attempts to set it to .002 --- state/core_access_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/state/core_access_test.go b/state/core_access_test.go index 7776442b4b..80e375b70f 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -15,7 +15,6 @@ import ( "github.com/stretchr/testify/require" "github.com/celestiaorg/celestia-app/v2/app" - "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" blobtypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" @@ -50,10 +49,6 @@ func TestSubmitPayForBlob(t *testing.T) { blobbyTheBlob, err := blob.NewBlobV0(ns, []byte("data")) require.NoError(t, err) - minGas, err := ca.queryMinimumGasPrice(ctx) - require.NoError(t, err) - require.Equal(t, appconsts.DefaultMinGasPrice, minGas) - testcases := []struct { name string blobs []*blob.Blob From f147fb6419820bfde56b42515ed9c3b50e48e40d Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 2 Jul 2024 16:34:06 -0400 Subject: [PATCH 21/75] fix: tests by converting squareblob to nodeblob --- nodebuilder/tests/api_test.go | 6 +----- nodebuilder/tests/blob_test.go | 23 +++++++++++------------ nodebuilder/tests/da_test.go | 4 ++-- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/nodebuilder/tests/api_test.go b/nodebuilder/tests/api_test.go index 56c26382ff..4a85f82d08 100644 --- a/nodebuilder/tests/api_test.go +++ b/nodebuilder/tests/api_test.go @@ -109,11 +109,7 @@ func TestBlobRPC(t *testing.T) { appBlobs, err := blobtest.GenerateV0Blobs([]int{8}, false) require.NoError(t, err) - newBlob, err := blob.NewBlob( - appBlobs[0].ShareVersion, - append([]byte{appBlobs[0].NamespaceVersion}, appBlobs[0].NamespaceID...), - appBlobs[0].Data, - ) + newBlob, err := convert(appBlobs[0]) require.NoError(t, err) height, err := rpcClient.Blob.Submit(ctx, []*blob.Blob{newBlob}, blob.DefaultGasPrice()) diff --git a/nodebuilder/tests/blob_test.go b/nodebuilder/tests/blob_test.go index 60af146f67..ad932789e4 100644 --- a/nodebuilder/tests/blob_test.go +++ b/nodebuilder/tests/blob_test.go @@ -13,6 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + squareblob "github.com/celestiaorg/go-square/blob" + "github.com/celestiaorg/celestia-node/blob" "github.com/celestiaorg/celestia-node/blob/blobtest" "github.com/celestiaorg/celestia-node/nodebuilder/node" @@ -31,8 +33,8 @@ func TestBlobModule(t *testing.T) { require.NoError(t, err) blobs := make([]*blob.Blob, 0, len(appBlobs0)+len(appBlobs1)) - for _, b := range append(appBlobs0, appBlobs1...) { - blob, err := blob.NewBlob(b.ShareVersion, append([]byte{b.NamespaceVersion}, b.NamespaceID...), b.Data) + for _, squareBlob := range append(appBlobs0, appBlobs1...) { + blob, err := convert(squareBlob) require.NoError(t, err) blobs = append(blobs, blob) } @@ -116,11 +118,7 @@ func TestBlobModule(t *testing.T) { doFn: func(t *testing.T) { appBlob, err := blobtest.GenerateV0Blobs([]int{4}, false) require.NoError(t, err) - newBlob, err := blob.NewBlob( - appBlob[0].ShareVersion, - append([]byte{appBlob[0].NamespaceVersion}, appBlob[0].NamespaceID...), - appBlob[0].Data, - ) + newBlob, err := convert(appBlob[0]) require.NoError(t, err) b, err := fullClient.Blob.Get(ctx, height, newBlob.Namespace(), newBlob.Commitment) @@ -134,11 +132,7 @@ func TestBlobModule(t *testing.T) { doFn: func(t *testing.T) { appBlob, err := blobtest.GenerateV0Blobs([]int{8, 4}, true) require.NoError(t, err) - b, err := blob.NewBlob( - appBlob[0].ShareVersion, - append([]byte{appBlob[0].NamespaceVersion}, appBlob[0].NamespaceID...), - appBlob[0].Data, - ) + b, err := convert(appBlob[0]) require.NoError(t, err) height, err := fullClient.Blob.Submit(ctx, []*blob.Blob{b, b}, blob.DefaultGasPrice()) @@ -202,3 +196,8 @@ func TestBlobModule(t *testing.T) { }) } } + +// convert converts a squareblob.Blob to a blob.Blob. +func convert(squareBlob *squareblob.Blob) (nodeBlob *blob.Blob, err error) { + return blob.NewBlob(uint8(squareBlob.GetShareVersion()), squareBlob.Namespace().Bytes(), squareBlob.GetData()) +} diff --git a/nodebuilder/tests/da_test.go b/nodebuilder/tests/da_test.go index b2ced9d49d..c67c5f61a7 100644 --- a/nodebuilder/tests/da_test.go +++ b/nodebuilder/tests/da_test.go @@ -37,8 +37,8 @@ func TestDaModule(t *testing.T) { blobs := make([]*blob.Blob, 0, len(appBlobs0)+len(appBlobs1)) daBlobs := make([][]byte, 0, len(appBlobs0)+len(appBlobs1)) - for _, b := range append(appBlobs0, appBlobs1...) { - blob, err := blob.NewBlob(b.ShareVersion, namespace, b.Data) + for _, squareBlob := range append(appBlobs0, appBlobs1...) { + blob, err := convert(squareBlob) require.NoError(t, err) blobs = append(blobs, blob) daBlobs = append(daBlobs, blob.Data) From 3e3fedd0e09207e329e23c93383773f980897a04 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 3 Jul 2024 22:55:19 -0400 Subject: [PATCH 22/75] refactor: stop using convert because it doesn't appear to be compiled based on build flags --- nodebuilder/tests/api_test.go | 6 +++++- nodebuilder/tests/da_test.go | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nodebuilder/tests/api_test.go b/nodebuilder/tests/api_test.go index 4a85f82d08..c0317ba6e6 100644 --- a/nodebuilder/tests/api_test.go +++ b/nodebuilder/tests/api_test.go @@ -109,7 +109,11 @@ func TestBlobRPC(t *testing.T) { appBlobs, err := blobtest.GenerateV0Blobs([]int{8}, false) require.NoError(t, err) - newBlob, err := convert(appBlobs[0]) + newBlob, err := blob.NewBlob( + uint8(appBlobs[0].GetShareVersion()), + appBlobs[0].Namespace().Bytes(), + appBlobs[0].GetData(), + ) require.NoError(t, err) height, err := rpcClient.Blob.Submit(ctx, []*blob.Blob{newBlob}, blob.DefaultGasPrice()) diff --git a/nodebuilder/tests/da_test.go b/nodebuilder/tests/da_test.go index c67c5f61a7..66eb4ff216 100644 --- a/nodebuilder/tests/da_test.go +++ b/nodebuilder/tests/da_test.go @@ -38,7 +38,11 @@ func TestDaModule(t *testing.T) { daBlobs := make([][]byte, 0, len(appBlobs0)+len(appBlobs1)) for _, squareBlob := range append(appBlobs0, appBlobs1...) { - blob, err := convert(squareBlob) + blob, err := blob.NewBlob( + uint8(squareBlob.GetShareVersion()), + squareBlob.Namespace().Bytes(), + squareBlob.GetData() + ) require.NoError(t, err) blobs = append(blobs, blob) daBlobs = append(daBlobs, blob.Data) From 8b5ef8f094877d202d130b12876a5bbcb6d84032 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 3 Jul 2024 23:33:03 -0400 Subject: [PATCH 23/75] test: attempt to fix TestCoreExchange_RequestHeaders --- core/exchange_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/exchange_test.go b/core/exchange_test.go index 248b77cd06..c2858f35e5 100644 --- a/core/exchange_test.go +++ b/core/exchange_test.go @@ -25,7 +25,6 @@ func TestCoreExchange_RequestHeaders(t *testing.T) { t.Cleanup(cancel) cfg := DefaultTestConfig() - cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) generateNonEmptyBlocks(t, ctx, fetcher, cfg, cctx) From 383490c730217326a45503d9a7f03b0a326896f1 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 3 Jul 2024 23:37:52 -0400 Subject: [PATCH 24/75] fix: da_test comma --- nodebuilder/tests/da_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder/tests/da_test.go b/nodebuilder/tests/da_test.go index 66eb4ff216..292227881d 100644 --- a/nodebuilder/tests/da_test.go +++ b/nodebuilder/tests/da_test.go @@ -41,7 +41,7 @@ func TestDaModule(t *testing.T) { blob, err := blob.NewBlob( uint8(squareBlob.GetShareVersion()), squareBlob.Namespace().Bytes(), - squareBlob.GetData() + squareBlob.GetData(), ) require.NoError(t, err) blobs = append(blobs, blob) From 4857abe4d6295836056dfd9ed6853df2c67a3333 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 3 Jul 2024 23:46:42 -0400 Subject: [PATCH 25/75] fix: TestBlob --- blob/blob.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/blob/blob.go b/blob/blob.go index 66724ff1d7..a00a4f1160 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -148,18 +148,19 @@ func (b *Blob) MarshalJSON() ([]byte, error) { } func (b *Blob) UnmarshalJSON(data []byte) error { - var blob jsonBlob - err := json.Unmarshal(data, &blob) + var jsonBlob jsonBlob + err := json.Unmarshal(data, &jsonBlob) if err != nil { return err } - b.Blob.NamespaceVersion = uint32(blob.Namespace.Version()) - b.Blob.NamespaceId = blob.Namespace.ID() - b.Blob.Data = blob.Data - b.Blob.ShareVersion = blob.ShareVersion - b.Commitment = blob.Commitment - b.namespace = blob.Namespace - b.index = blob.Index + b.Blob = &blob.Blob{} + b.Blob.NamespaceVersion = uint32(jsonBlob.Namespace.Version()) + b.Blob.NamespaceId = jsonBlob.Namespace.ID() + b.Blob.Data = jsonBlob.Data + b.Blob.ShareVersion = jsonBlob.ShareVersion + b.Commitment = jsonBlob.Commitment + b.namespace = jsonBlob.Namespace + b.index = jsonBlob.Index return nil } From a5650ac03585b73ff97a1a863048ec550c460287 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 3 Jul 2024 23:59:32 -0400 Subject: [PATCH 26/75] HACKHACK: I think bug in celestia-app testnode that prevents custom chain-ids --- nodebuilder/tests/swamp/swamp.go | 1 - 1 file changed, 1 deletion(-) diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index b858c50abb..3e3b27e099 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -80,7 +80,6 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { // Now, we are making an assumption that consensus mechanism is already tested out // so, we are not creating bridge nodes with each one containing its own core client // instead we are assigning all created BNs to 1 Core from the swamp - ic.WithChainID("private") cctx := core.StartTestNodeWithConfig(t, ic) swp := &Swamp{ t: t, From e2eb8e96b3632f96d2c19ca18835322e0cd1b7fa Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 4 Jul 2024 00:09:06 -0400 Subject: [PATCH 27/75] Revert "HACKHACK: I think bug in celestia-app testnode that prevents custom chain-ids" This reverts commit a5650ac03585b73ff97a1a863048ec550c460287. --- nodebuilder/tests/swamp/swamp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index 3e3b27e099..b858c50abb 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -80,6 +80,7 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { // Now, we are making an assumption that consensus mechanism is already tested out // so, we are not creating bridge nodes with each one containing its own core client // instead we are assigning all created BNs to 1 Core from the swamp + ic.WithChainID("private") cctx := core.StartTestNodeWithConfig(t, ic) swp := &Swamp{ t: t, From 9e0f501978dec4a17c2d7250364f4555c6984e31 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 9 Jul 2024 14:42:56 -0400 Subject: [PATCH 28/75] test: attempt to fix integration tests --- core/testing.go | 12 +++++++++++- state/core_access_test.go | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/core/testing.go b/core/testing.go index 6f9bc98cba..6cd32f68a9 100644 --- a/core/testing.go +++ b/core/testing.go @@ -10,9 +10,12 @@ import ( tmconfig "github.com/tendermint/tendermint/config" tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" ) +const chainID = "private" + // DefaultTestConfig returns the default testing configuration for Tendermint + Celestia App tandem. // // It fetches free ports from OS and sets them into configs, s.t. @@ -32,9 +35,16 @@ func DefaultTestConfig() *testnode.Config { cfg.TmConfig.Consensus.TimeoutCommit = time.Millisecond * 200 + genesis := genesis.NewDefaultGenesis(). + WithChainID(chainID). + WithValidators(genesis.NewDefaultValidator(testnode.DefaultValidatorAccountName)). + WithConsensusParams(testnode.DefaultConsensusParams()) + cfg = cfg. + WithChainID(chainID). WithFundedAccounts(accounts...). - WithSuppressLogs(true) + WithSuppressLogs(true). + WithGenesis(genesis) return cfg } diff --git a/state/core_access_test.go b/state/core_access_test.go index 628d410e68..1758c40e79 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -211,6 +211,8 @@ func extractPort(addr string) string { } func buildAccessor(t *testing.T) (*CoreAccessor, []string) { + chainID := "private" + t.Helper() accounts := []genesis.KeyringAccount{ { @@ -238,10 +240,12 @@ func buildAccessor(t *testing.T) (*CoreAccessor, []string) { appConf.MinGasPrices = fmt.Sprintf("0.002%s", app.BondDenom) g := genesis.NewDefaultGenesis(). + WithChainID(chainID). WithValidators(genesis.NewDefaultValidator(testnode.DefaultValidatorAccountName)). WithConsensusParams(testnode.DefaultConsensusParams()).WithKeyringAccounts(accounts...) config := testnode.DefaultConfig(). + WithChainID(chainID). WithTendermintConfig(tmCfg). WithAppConfig(appConf). WithGenesis(g) From c120fd2890f775c70552d7ca0525ddb113dd3506 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 9 Jul 2024 14:47:29 -0400 Subject: [PATCH 29/75] wip: fix some lint issues --- blob/service.go | 2 +- state/core_access.go | 22 +--------------------- state/core_access_test.go | 2 +- state/state.go | 7 +++---- 4 files changed, 6 insertions(+), 27 deletions(-) diff --git a/blob/service.go b/blob/service.go index 50abbc5d74..5cc3aa91f4 100644 --- a/blob/service.go +++ b/blob/service.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "slices" "sync" "github.com/cosmos/cosmos-sdk/types" @@ -13,6 +12,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" + "slices" "github.com/celestiaorg/go-square/shares" diff --git a/state/core_access.go b/state/core_access.go index 840e68ed00..f2d65f49e8 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -13,7 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdktypes "github.com/cosmos/cosmos-sdk/types" - sdktx "github.com/cosmos/cosmos-sdk/types/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/feegrant" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -202,7 +201,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( if gas == 0 { blobSizes := make([]uint32, len(appblobs)) for i, blob := range appblobs { - blobSizes[i] = uint32(len(blob.Data)) + blobSizes[i] = uint32(len(blob.GetData())) } gas = estimateGasForBlobs(blobSizes) } @@ -651,22 +650,3 @@ func unsetTx(txResponse *TxResponse) *TxResponse { } return txResponse } - -// broadcastTx uses the provided grpc connection to broadcast a signed and -// encoded transaction. -func broadcastTx( - ctx context.Context, - conn *grpc.ClientConn, - mode sdktx.BroadcastMode, - txBytes []byte, -) (*sdktx.BroadcastTxResponse, error) { - txClient := sdktx.NewServiceClient(conn) - - return txClient.BroadcastTx( - ctx, - &sdktx.BroadcastTxRequest{ - Mode: mode, - TxBytes: txBytes, - }, - ) -} diff --git a/state/core_access_test.go b/state/core_access_test.go index 1758c40e79..0ed64a9f35 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -56,7 +56,7 @@ func TestSubmitPayForBlob(t *testing.T) { name: "good blob with user provided gas and fees", blobs: []*squareblob.Blob{blobbyTheBlob}, gasPrice: 0.005, - gasLim: apptypes.DefaultEstimateGas([]uint32{uint32(len(blobbyTheBlob.Data))}), + gasLim: apptypes.DefaultEstimateGas([]uint32{uint32(len(blobbyTheBlob.GetData()))}), expErr: nil, }, // TODO: add more test cases. The problem right now is that the celestia-app doesn't diff --git a/state/state.go b/state/state.go index e43b97bf23..3a6fa33fa7 100644 --- a/state/state.go +++ b/state/state.go @@ -8,8 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/tendermint/tendermint/types" - // apptypes "github.com/celestiaorg/celestia-app/x/blob/types" - squaretypes "github.com/celestiaorg/go-square/blob" + apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" ) // Balance is an alias to the Coin type from Cosmos-SDK. @@ -27,8 +26,8 @@ type Address struct { sdk.Address } -// Blob is an alias of Blob from go-square. -type Blob = squaretypes.Blob +// Blob is an alias of Blob from celestia-app. +type Blob = apptypes.Blob // ValAddress is an alias to the ValAddress type from Cosmos-SDK. type ValAddress = sdk.ValAddress From 4eddd433e0c7124470c3b9a0b5eae35734b1c38c Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 9 Jul 2024 17:43:00 -0400 Subject: [PATCH 30/75] fix: build --- state/state.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/state/state.go b/state/state.go index 3a6fa33fa7..5f09bcc19b 100644 --- a/state/state.go +++ b/state/state.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/tendermint/tendermint/types" - apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" + squareblob "github.com/celestiaorg/go-square/blob" ) // Balance is an alias to the Coin type from Cosmos-SDK. @@ -26,8 +26,8 @@ type Address struct { sdk.Address } -// Blob is an alias of Blob from celestia-app. -type Blob = apptypes.Blob +// Blob is an alias of Blob from go-square. +type Blob = squareblob.Blob // ValAddress is an alias to the ValAddress type from Cosmos-SDK. type ValAddress = sdk.ValAddress From b8fbd4b2e0a1d68ca4249ac340dee28b0755c6ec Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 9 Jul 2024 17:55:07 -0400 Subject: [PATCH 31/75] fix: manual re-review --- core/exchange_test.go | 1 - core/listener_no_race_test.go | 1 - state/core_access.go | 8 ++++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/exchange_test.go b/core/exchange_test.go index c2858f35e5..4859b0130a 100644 --- a/core/exchange_test.go +++ b/core/exchange_test.go @@ -68,7 +68,6 @@ func TestExchange_DoNotStoreHistoric(t *testing.T) { t.Cleanup(cancel) cfg := DefaultTestConfig() - cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) generateNonEmptyBlocks(t, ctx, fetcher, cfg, cctx) diff --git a/core/listener_no_race_test.go b/core/listener_no_race_test.go index 2441a7f2d1..0a08e89a30 100644 --- a/core/listener_no_race_test.go +++ b/core/listener_no_race_test.go @@ -25,7 +25,6 @@ func TestListenerWithNonEmptyBlocks(t *testing.T) { // create one block to store as Head in local store and then unsubscribe from block events cfg := DefaultTestConfig() - cfg.Genesis.ChainID = testChainID fetcher, cctx := createCoreFetcher(t, cfg) eds := createEdsPubSub(ctx, t) diff --git a/state/core_access.go b/state/core_access.go index f2d65f49e8..8ec41bb7c8 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -20,6 +20,7 @@ import ( "github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/proto/tendermint/crypto" "google.golang.org/grpc" + "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials/insecure" "github.com/celestiaorg/celestia-app/v2/app" @@ -127,6 +128,13 @@ func (ca *CoreAccessor) Start(ctx context.Context) error { if err != nil { return err } + // this ensures we can't start the node without core connection + client.Connect() + if !client.WaitForStateChange(ctx, connectivity.Ready) { + // hits the case when context is canceled + return fmt.Errorf("couldn't connect to core endpoint(%s): %w", endpoint, ctx.Err()) + } + ca.coreConn = client // create the staking query client From daf1a81d1d386ff176018f34bd9d5b5fff06c1f8 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 9 Jul 2024 18:01:02 -0400 Subject: [PATCH 32/75] attempt to fix import order --- blob/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blob/service.go b/blob/service.go index 5cc3aa91f4..50abbc5d74 100644 --- a/blob/service.go +++ b/blob/service.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "slices" "sync" "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +13,6 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" - "slices" "github.com/celestiaorg/go-square/shares" From 0f48e13aab511293f410261aeafcaf44639a2464 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 13:43:02 -0400 Subject: [PATCH 33/75] chore(deps): bump to v2.0.0-rc3 --- go.mod | 2 +- go.sum | 4 ++-- scripts/celestia-node.sh | 41 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100755 scripts/celestia-node.sh diff --git a/go.mod b/go.mod index ed1daca62a..a08dbee1f5 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/BurntSushi/toml v1.4.0 github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b github.com/benbjohnson/clock v1.3.5 - github.com/celestiaorg/celestia-app/v2 v2.0.0-rc2 + github.com/celestiaorg/celestia-app/v2 v2.0.0-rc3 github.com/celestiaorg/go-fraud v0.2.1 github.com/celestiaorg/go-header v0.6.2 github.com/celestiaorg/go-libp2p-messenger v0.2.0 diff --git a/go.sum b/go.sum index 4606cebedb..5582e6db3d 100644 --- a/go.sum +++ b/go.sum @@ -354,8 +354,8 @@ github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOC github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 h1:h1Y4V3EMQ2mFmNtWt2sIhZIuyASInj1a9ExI8xOsTOw= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0/go.mod h1:x4DKyfKOSv1ZJM9NwV+Pw01kH2CD7N5zTFclXIVJ6GQ= -github.com/celestiaorg/celestia-app/v2 v2.0.0-rc2 h1:jdezDe/Lh+Sf7iepZbYg45edtQN0js1f04NWVhE3GZU= -github.com/celestiaorg/celestia-app/v2 v2.0.0-rc2/go.mod h1:fhpOoCIxMX8ziB2eNKEgdlZ891K38uBYV0QCtonOWU0= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc3 h1:bgm+1SgXiKSQm8aN0LSMGKDzexkuOqZ4ORj2/KzXlRU= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc3/go.mod h1:t/balaAQzi5r/68uHqwEBPc9vofN9CDhtkp3cNEvo2w= github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29 h1:9nJDE37cTg/Cx+f4FS2g7yYeoLrsaNJg36XsQ47sS1A= github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29/go.mod h1:IIdMu9gnDtjUmZkFuBN4Bf11z/rBtlL2rtwbQxdbRAU= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 h1:N2uETI13szEKnGAdKhtTR0EsrpcW0AwRKYER74WLnuw= diff --git a/scripts/celestia-node.sh b/scripts/celestia-node.sh new file mode 100755 index 0000000000..8ea62c1acf --- /dev/null +++ b/scripts/celestia-node.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +CHAIN_ID="test" +APP_PATH="${HOME}/.celestia-app" +NODE_PATH="${HOME}/.celestia-bridge-test/" +CELESTIA_VERSION=$(celestia version 2>&1) + +echo "node_path: ${NODE_PATH}" +echo "celestia version: ${CELESTIA_VERSION}" +echo "" + +echo "Deleting $NODE_PATH..." +rm -r "$NODE_PATH" + +echo "Creating $NODE_PATH/keys..." +mkdir -p $NODE_PATH/keys + +echo "Copying keys..." +cp -r $APP_PATH/keyring-test/ $NODE_PATH/keys/keyring-test/ + +# Try to get the genesis hash. Usually first request returns an empty string (port is not open, curl fails), later attempts +# returns "null" if block was not yet produced. +GENESIS= +CNT=0 +MAX=30 +while [ "${#GENESIS}" -le 4 -a $CNT -ne $MAX ]; do + GENESIS=$(curl -s http://127.0.0.1:26657/block?height=1 | jq '.result.block_id.hash' | tr -d '"') + ((CNT++)) + sleep 1 +done + +export CELESTIA_CUSTOM=test:$GENESIS +echo "$CELESTIA_CUSTOM" + +celestia bridge init --node.store $NODE_PATH +celestia bridge start \ + --node.store $NODE_PATH --gateway \ + --core.ip 127.0.0.1 \ + --keyring.keyname validator \ + --gateway.addr 0.0.0.0 \ + --rpc.addr 0.0.0.0 From 8b8efd28e23a867e08a380d8bf1fda7bb89cfe4d Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 13:50:24 -0400 Subject: [PATCH 34/75] fix: core access test --- state/core_access.go | 4 ++-- state/core_access_test.go | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/state/core_access.go b/state/core_access.go index 8ec41bb7c8..16216cb85f 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -235,7 +235,7 @@ func (ca *CoreAccessor) SubmitPayForBlob( var lastErr error for attempt := 0; attempt < maxRetries; attempt++ { - opts := []user.TxOption{user.SetGasLimitAndFee(gas, gasPrice)} + opts := []user.TxOption{user.SetGasLimitAndGasPrice(gas, gasPrice)} if feeGrant != nil { opts = append(opts, feeGrant) } @@ -620,7 +620,7 @@ func (ca *CoreAccessor) submitMsg( gasPrice = ca.minGasPrice } - txConfig = append(txConfig, user.SetGasLimitAndFee(gas, gasPrice)) + txConfig = append(txConfig, user.SetGasLimitAndGasPrice(gas, gasPrice)) if cfg.FeeGranterAddress() != "" { granter, err := parseAccAddressFromString(cfg.FeeGranterAddress()) diff --git a/state/core_access_test.go b/state/core_access_test.go index 0ed64a9f35..768ab82eca 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -6,14 +6,21 @@ import ( "context" "errors" "fmt" + "io" "strings" "testing" "time" + "github.com/cosmos/cosmos-sdk/baseapp" + sdkservertypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/simapp" sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + tmlog "github.com/tendermint/tendermint/libs/log" + tmdb "github.com/tendermint/tm-db" "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/app/encoding" appconsts "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" genesis "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" @@ -237,7 +244,8 @@ func buildAccessor(t *testing.T) (*CoreAccessor, []string) { appConf := testnode.DefaultAppConfig() appConf.API.Enable = true - appConf.MinGasPrices = fmt.Sprintf("0.002%s", app.BondDenom) + + appCreator := customAppCreator(fmt.Sprintf("0.002%s", app.BondDenom)) g := genesis.NewDefaultGenesis(). WithChainID(chainID). @@ -248,7 +256,8 @@ func buildAccessor(t *testing.T) (*CoreAccessor, []string) { WithChainID(chainID). WithTendermintConfig(tmCfg). WithAppConfig(appConf). - WithGenesis(g) + WithGenesis(g). + WithAppCreator(appCreator) // needed until https://github.com/celestiaorg/celestia-app/pull/3680 merges cctx, _, grpcAddr := testnode.NewNetwork(t, config) ca, err := NewCoreAccessor(cctx.Keyring, accounts[0].Name, nil, "127.0.0.1", extractPort(grpcAddr)) @@ -262,3 +271,19 @@ func getNames(accounts []genesis.KeyringAccount) (names []string) { } return names } + +func customAppCreator(minGasPrice string) sdkservertypes.AppCreator { + return func(_ tmlog.Logger, _ tmdb.DB, _ io.Writer, _ sdkservertypes.AppOptions) sdkservertypes.Application { + encodingConfig := encoding.MakeConfig(app.ModuleEncodingRegisters...) + return app.New( + tmlog.NewNopLogger(), + tmdb.NewMemDB(), + nil, // trace store + 0, // invCheckPerid + encodingConfig, + 0, // v2 upgrade height + simapp.EmptyAppOptions{}, + baseapp.SetMinGasPrices(minGasPrice), + ) + } +} From 6bd366f82c1bb40ef1475166b61fd20003b7c77d Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 13:51:59 -0400 Subject: [PATCH 35/75] refactor: add comment --- state/core_access_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/state/core_access_test.go b/state/core_access_test.go index 768ab82eca..a9e69781e0 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -272,6 +272,12 @@ func getNames(accounts []genesis.KeyringAccount) (names []string) { return names } +// customAppCreator is a temporary workaround to set the min gas price for the +// testnode. +// +// This can be removed after +// https://github.com/celestiaorg/celestia-app/pull/3680 merges and is +// backported to celestia-app v2.x.x. func customAppCreator(minGasPrice string) sdkservertypes.AppCreator { return func(_ tmlog.Logger, _ tmdb.DB, _ io.Writer, _ sdkservertypes.AppOptions) sdkservertypes.Application { encodingConfig := encoding.MakeConfig(app.ModuleEncodingRegisters...) From 9db2d2c5485d3d752084608d10af49c6bf181d5b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 13:53:27 -0400 Subject: [PATCH 36/75] go mod tidy --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a08dbee1f5..ae870d2260 100644 --- a/go.mod +++ b/go.mod @@ -58,6 +58,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 github.com/tendermint/tendermint v0.34.29 + github.com/tendermint/tm-db v0.6.7 go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 @@ -309,7 +310,6 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/tm-db v0.6.7 // indirect github.com/tidwall/btree v1.5.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect From 69be2c96b65b700e2dfba7f99538398cea453712 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 13:54:47 -0400 Subject: [PATCH 37/75] make fmt --- blob/service.go | 4 ++-- nodebuilder/blob/blob.go | 4 ++-- state/core_access.go | 9 +++++---- state/tx_config.go | 8 +++++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/blob/service.go b/blob/service.go index 50abbc5d74..2b7f51c6af 100644 --- a/blob/service.go +++ b/blob/service.go @@ -141,8 +141,8 @@ func (s *Service) GetProof( // If all blobs were found without any errors, the user will receive a list of blobs. // If the BlobService couldn't find any blobs under the requested namespaces, // the user will receive an empty list of blobs along with an empty error. -// If some of the requested namespaces were not found, the user will receive all the found blobs and an empty error. -// If there were internal errors during some of the requests, +// If some of the requested namespaces were not found, the user will receive all the found blobs +// and an empty error. If there were internal errors during some of the requests, // the user will receive all found blobs along with a combined error message. // // All blobs will preserve the order of the namespaces that were requested. diff --git a/nodebuilder/blob/blob.go b/nodebuilder/blob/blob.go index c4c0352516..0837aa23d2 100644 --- a/nodebuilder/blob/blob.go +++ b/nodebuilder/blob/blob.go @@ -23,8 +23,8 @@ type Module interface { // If all blobs were found without any errors, the user will receive a list of blobs. // If the BlobService couldn't find any blobs under the requested namespaces, // the user will receive an empty list of blobs along with an empty error. - // If some of the requested namespaces were not found, the user will receive all the found blobs and an empty error. - // If there were internal errors during some of the requests, + // If some of the requested namespaces were not found, the user will receive all the found blobs + // and an empty error. If there were internal errors during some of the requests, // the user will receive all found blobs along with a combined error message. // // All blobs will preserve the order of the namespaces that were requested. diff --git a/state/core_access.go b/state/core_access.go index 16216cb85f..11eb72bea5 100644 --- a/state/core_access.go +++ b/state/core_access.go @@ -184,9 +184,9 @@ func (ca *CoreAccessor) cancelCtx() { ca.cancel = nil } -// SubmitPayForBlob builds, signs, and synchronously submits a MsgPayForBlob with additional options defined -// in `TxConfig`. It blocks until the transaction is committed and returns the TxResponse. -// The user can specify additional options that can bee applied to the Tx. +// SubmitPayForBlob builds, signs, and synchronously submits a MsgPayForBlob with additional +// options defined in `TxConfig`. It blocks until the transaction is committed and returns the +// TxResponse. The user can specify additional options that can bee applied to the Tx. func (ca *CoreAccessor) SubmitPayForBlob( ctx context.Context, appblobs []*Blob, @@ -583,7 +583,8 @@ func (ca *CoreAccessor) queryMinimumGasPrice( func (ca *CoreAccessor) setupTxClient(ctx context.Context, keyName string) (*user.TxClient, error) { encCfg := encoding.MakeConfig(app.ModuleEncodingRegisters...) - // explicitly set default address. Otherwise, there could be a mismatch between defaultKey and defaultAddress. + // explicitly set default address. Otherwise, there could be a mismatch between defaultKey and + // defaultAddress. rec, err := ca.keyring.Key(keyName) if err != nil { return nil, err diff --git a/state/tx_config.go b/state/tx_config.go index 33c0946c59..0c0ea5e372 100644 --- a/state/tx_config.go +++ b/state/tx_config.go @@ -108,7 +108,8 @@ func (cfg *TxConfig) UnmarshalJSON(data []byte) error { } // estimateGas estimates gas in case it has not been set. -// NOTE: final result of the estimation will be multiplied by the `gasMultiplier`(1.1) to cover additional costs. +// NOTE: final result of the estimation will be multiplied by the `gasMultiplier`(1.1) to cover +// additional costs. func estimateGas(ctx context.Context, client *user.TxClient, msg sdktypes.Msg) (uint64, error) { // set fee as 1utia helps to simulate the tx more reliably. gas, err := client.EstimateGas(ctx, []sdktypes.Msg{msg}, user.SetFee(1)) @@ -171,8 +172,9 @@ func WithKeyName(key string) ConfigOption { } } -// WithSignerAddress is an option that allows you to specify an address, that will sign the transaction. -// This address must be stored locally in the key store. Default signerAddress will be used in case it wasn't specified. +// WithSignerAddress is an option that allows you to specify an address, that will sign the +// transaction. This address must be stored locally in the key store. Default signerAddress will be +// used in case it wasn't specified. func WithSignerAddress(address string) ConfigOption { return func(cfg *TxConfig) { cfg.signerAddress = address From 587914a1c9d23aea423b91347bfd7dd31eeed794 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 15:16:12 -0400 Subject: [PATCH 38/75] fix: TestGetBalance --- state/integration_test.go | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/state/integration_test.go b/state/integration_test.go index bc27d085a7..07fb3a65b1 100644 --- a/state/integration_test.go +++ b/state/integration_test.go @@ -16,7 +16,7 @@ import ( rpcclient "github.com/tendermint/tendermint/rpc/client" "google.golang.org/grpc" - "github.com/celestiaorg/celestia-app/v2/app" + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" libhead "github.com/celestiaorg/go-header" @@ -33,7 +33,9 @@ type IntegrationTestSuite struct { suite.Suite cleanups []func() error - accounts []string + accounts []genesis.Account + pubKeys []string + keyname string cctx testnode.Context accessor *CoreAccessor @@ -47,9 +49,15 @@ func (s *IntegrationTestSuite) SetupSuite() { cfg := core.DefaultTestConfig() s.cctx = core.StartTestNodeWithConfig(s.T(), cfg) - s.accounts = getAccountPubKeys(cfg.Genesis.Accounts()) + s.accounts = cfg.Genesis.Accounts() + s.pubKeys = getPubKeys(cfg.Genesis.Accounts()) - accessor, err := NewCoreAccessor(s.cctx.Keyring, s.accounts[0], localHeader{s.cctx.Client}, "", "") + records, err := cfg.Genesis.Keyring().List() + s.Require().NoError(err) + keyname := records[0].Name + s.keyname = keyname + + accessor, err := NewCoreAccessor(s.cctx.Keyring, keyname, localHeader{s.cctx.Client}, "", "") require.NoError(s.T(), err) setClients(accessor, s.cctx.GRPCClient) s.accessor = accessor @@ -59,7 +67,7 @@ func (s *IntegrationTestSuite) SetupSuite() { require.NoError(s.T(), err) } -func getAccountPubKeys(accounts []genesis.Account) (pubKeys []string) { +func getPubKeys(accounts []genesis.Account) (pubKeys []string) { for _, account := range accounts { pubKeys = append(pubKeys, account.PubKey.String()) } @@ -115,11 +123,16 @@ func (l localHeader) Head( func (s *IntegrationTestSuite) TestGetBalance() { require := s.Require() - expectedBal := sdk.NewCoin(app.BondDenom, sdk.NewInt(int64(99999999999999999))) - for _, acc := range s.accounts { - bal, err := s.accessor.BalanceForAddress(context.Background(), Address{s.getAddress(acc)}) + + for _, account := range s.accounts { + hexAddress := account.PubKey.Address().String() + sdkAddress, err := sdk.AccAddressFromHexUnsafe(hexAddress) + require.NoError(err) + + bal, err := s.accessor.BalanceForAddress(context.Background(), Address{sdkAddress}) require.NoError(err) - require.Equal(&expectedBal, bal) + require.Equal(bal.Denom, appconsts.BondDenom) + require.True(bal.Amount.GT(sdk.NewInt(1))) // verify that each account has some balance } } @@ -128,7 +141,7 @@ func (s *IntegrationTestSuite) TestGetBalance() { func (s *IntegrationTestSuite) TestGenerateJSONBlock() { t := s.T() t.Skip("skipping testdata generation test") - resp, err := s.cctx.FillBlock(4, s.accounts[0], flags.BroadcastSync) + resp, err := s.cctx.FillBlock(4, s.keyname, flags.BroadcastSync) require := s.Require() require.NoError(err) require.Equal(abci.CodeTypeOK, resp.Code) From 8fb0d04d76a0c9a6bbce0d0790765a9548cd312b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 15:39:33 -0400 Subject: [PATCH 39/75] fix: lint --- state/integration_test.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/state/integration_test.go b/state/integration_test.go index 07fb3a65b1..3b12df2385 100644 --- a/state/integration_test.go +++ b/state/integration_test.go @@ -93,16 +93,6 @@ func (s *IntegrationTestSuite) TearDownSuite() { } } -func (s *IntegrationTestSuite) getAddress(acc string) sdk.Address { - rec, err := s.cctx.Keyring.Key(acc) - require.NoError(s.T(), err) - - addr, err := rec.GetAddress() - require.NoError(s.T(), err) - - return addr -} - type localHeader struct { client rpcclient.Client } From 4df424050335def7d4230b114d7bcf054bfd1ef1 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 15:54:50 -0400 Subject: [PATCH 40/75] debug: attempt to initialize tx client mtx --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index ae870d2260..edf6b4ac1f 100644 --- a/go.mod +++ b/go.mod @@ -351,6 +351,7 @@ require ( ) replace ( + github.com/celestiaorg/celestia-app/v2 => github.com/rootulp/celestia-app/v2 v2.0.0-rc4 github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 github.com/filecoin-project/dagstore => github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index 5582e6db3d..fbe4c5a365 100644 --- a/go.sum +++ b/go.sum @@ -354,8 +354,6 @@ github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOC github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 h1:h1Y4V3EMQ2mFmNtWt2sIhZIuyASInj1a9ExI8xOsTOw= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0/go.mod h1:x4DKyfKOSv1ZJM9NwV+Pw01kH2CD7N5zTFclXIVJ6GQ= -github.com/celestiaorg/celestia-app/v2 v2.0.0-rc3 h1:bgm+1SgXiKSQm8aN0LSMGKDzexkuOqZ4ORj2/KzXlRU= -github.com/celestiaorg/celestia-app/v2 v2.0.0-rc3/go.mod h1:t/balaAQzi5r/68uHqwEBPc9vofN9CDhtkp3cNEvo2w= github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29 h1:9nJDE37cTg/Cx+f4FS2g7yYeoLrsaNJg36XsQ47sS1A= github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29/go.mod h1:IIdMu9gnDtjUmZkFuBN4Bf11z/rBtlL2rtwbQxdbRAU= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 h1:N2uETI13szEKnGAdKhtTR0EsrpcW0AwRKYER74WLnuw= @@ -2174,6 +2172,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rollkit/go-da v0.4.0 h1:/s7ZrVq7DC2aK8UXIvB7rsXrZ2mVGRw7zrexcxRvhlw= github.com/rollkit/go-da v0.4.0/go.mod h1:Kef0XI5ecEKd3TXzI8S+9knAUJnZg0svh2DuXoCsPlM= +github.com/rootulp/celestia-app/v2 v2.0.0-rc4 h1:PnCit/FGYjhS7n+10VZypoHGbUw5oZUt/FnV1NRFF+M= +github.com/rootulp/celestia-app/v2 v2.0.0-rc4/go.mod h1:t/balaAQzi5r/68uHqwEBPc9vofN9CDhtkp3cNEvo2w= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= From a2b808d52938bda0144eaa0e8c63fa2fc07bc412 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 16:04:51 -0400 Subject: [PATCH 41/75] chore(deps): upgrade to celestia-core v1.38.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index edf6b4ac1f..acd00995e8 100644 --- a/go.mod +++ b/go.mod @@ -357,5 +357,5 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // broken goleveldb needs to be replaced for the cosmos-sdk and celestia-app github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29 + github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v1.38.0-tm-v0.34.29 ) diff --git a/go.sum b/go.sum index fbe4c5a365..9112528a39 100644 --- a/go.sum +++ b/go.sum @@ -354,8 +354,8 @@ github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOC github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 h1:h1Y4V3EMQ2mFmNtWt2sIhZIuyASInj1a9ExI8xOsTOw= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0/go.mod h1:x4DKyfKOSv1ZJM9NwV+Pw01kH2CD7N5zTFclXIVJ6GQ= -github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29 h1:9nJDE37cTg/Cx+f4FS2g7yYeoLrsaNJg36XsQ47sS1A= -github.com/celestiaorg/celestia-core v1.37.0-tm-v0.34.29/go.mod h1:IIdMu9gnDtjUmZkFuBN4Bf11z/rBtlL2rtwbQxdbRAU= +github.com/celestiaorg/celestia-core v1.38.0-tm-v0.34.29 h1:HwbA4OegRvXX0aNchBA7Cmu+oIxnH7xRcOhISuDP0ak= +github.com/celestiaorg/celestia-core v1.38.0-tm-v0.34.29/go.mod h1:MyElURdWAOJkOp84WZnfEUJ+OLvTwOOHG2lbK9E8XRI= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 h1:N2uETI13szEKnGAdKhtTR0EsrpcW0AwRKYER74WLnuw= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16/go.mod h1:Bpl1LSWiDpQumgOhhMTZBMopqa0j7fRasIhvTZB44P0= github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403 h1:Lj73O3S+KJx5/hgZ+IeOLEIoLsAveJN/7/ZtQQtPSVw= From f325abf908f9a8b3206f3d4cc581dab513367440 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 16 Jul 2024 17:10:48 -0400 Subject: [PATCH 42/75] wip: need another change in celestia-app --- nodebuilder/tests/swamp/swamp.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index b858c50abb..aec3c73462 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -21,7 +21,6 @@ import ( "go.uber.org/fx" "golang.org/x/exp/maps" - "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" libhead "github.com/celestiaorg/go-header" @@ -75,8 +74,6 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { option(ic) } - accounts := getAccountPubKeys(ic.Genesis.Accounts()) - // Now, we are making an assumption that consensus mechanism is already tested out // so, we are not creating bridge nodes with each one containing its own core client // instead we are assigning all created BNs to 1 Core from the swamp @@ -87,7 +84,7 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { cfg: ic, Network: mocknet.New(), ClientContext: cctx, - Accounts: accounts, + Accounts: getAccounts(t, ic), nodes: map[*nodebuilder.Node]struct{}{}, } @@ -96,11 +93,12 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { return swp } -func getAccountPubKeys(accounts []genesis.Account) (pubKeys []string) { - for _, account := range accounts { - pubKeys = append(pubKeys, account.PubKey.String()) - } - return pubKeys +func getAccounts(t *testing.T, config *testnode.Config) (accounts []string) { + // for _, account := range config.Genesis.Accounts() { + // // Blocked on https://github.com/celestiaorg/celestia-app/pull/3690 + // // accounts = append(accounts, account.Name) + // } + return accounts } // cleanup frees up all the resources From 99265ec248dff4d795a6e48fe7b98a2b4065910b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:08:06 -0400 Subject: [PATCH 43/75] chore(deps): upgrade to v2.0.0-rc4 --- go.mod | 3 +-- go.sum | 4 ++-- nodebuilder/tests/swamp/swamp.go | 11 +++++------ state/core_access_test.go | 31 +------------------------------ 4 files changed, 9 insertions(+), 40 deletions(-) diff --git a/go.mod b/go.mod index acd00995e8..106e4730be 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/BurntSushi/toml v1.4.0 github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b github.com/benbjohnson/clock v1.3.5 - github.com/celestiaorg/celestia-app/v2 v2.0.0-rc3 + github.com/celestiaorg/celestia-app/v2 v2.0.0-rc4 github.com/celestiaorg/go-fraud v0.2.1 github.com/celestiaorg/go-header v0.6.2 github.com/celestiaorg/go-libp2p-messenger v0.2.0 @@ -351,7 +351,6 @@ require ( ) replace ( - github.com/celestiaorg/celestia-app/v2 => github.com/rootulp/celestia-app/v2 v2.0.0-rc4 github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 github.com/filecoin-project/dagstore => github.com/celestiaorg/dagstore v0.0.0-20230824094345-537c012aa403 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index 9112528a39..a1610c883e 100644 --- a/go.sum +++ b/go.sum @@ -354,6 +354,8 @@ github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOC github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0 h1:h1Y4V3EMQ2mFmNtWt2sIhZIuyASInj1a9ExI8xOsTOw= github.com/celestiaorg/blobstream-contracts/v3 v3.1.0/go.mod h1:x4DKyfKOSv1ZJM9NwV+Pw01kH2CD7N5zTFclXIVJ6GQ= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc4 h1:s+F8q10ir9D5DN0STZhdOKKauzXkt/HizkEOCDUoCXA= +github.com/celestiaorg/celestia-app/v2 v2.0.0-rc4/go.mod h1:t/balaAQzi5r/68uHqwEBPc9vofN9CDhtkp3cNEvo2w= github.com/celestiaorg/celestia-core v1.38.0-tm-v0.34.29 h1:HwbA4OegRvXX0aNchBA7Cmu+oIxnH7xRcOhISuDP0ak= github.com/celestiaorg/celestia-core v1.38.0-tm-v0.34.29/go.mod h1:MyElURdWAOJkOp84WZnfEUJ+OLvTwOOHG2lbK9E8XRI= github.com/celestiaorg/cosmos-sdk v1.23.0-sdk-v0.46.16 h1:N2uETI13szEKnGAdKhtTR0EsrpcW0AwRKYER74WLnuw= @@ -2172,8 +2174,6 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rollkit/go-da v0.4.0 h1:/s7ZrVq7DC2aK8UXIvB7rsXrZ2mVGRw7zrexcxRvhlw= github.com/rollkit/go-da v0.4.0/go.mod h1:Kef0XI5ecEKd3TXzI8S+9knAUJnZg0svh2DuXoCsPlM= -github.com/rootulp/celestia-app/v2 v2.0.0-rc4 h1:PnCit/FGYjhS7n+10VZypoHGbUw5oZUt/FnV1NRFF+M= -github.com/rootulp/celestia-app/v2 v2.0.0-rc4/go.mod h1:t/balaAQzi5r/68uHqwEBPc9vofN9CDhtkp3cNEvo2w= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index aec3c73462..b10c8fdce1 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -84,7 +84,7 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { cfg: ic, Network: mocknet.New(), ClientContext: cctx, - Accounts: getAccounts(t, ic), + Accounts: getAccounts(ic), nodes: map[*nodebuilder.Node]struct{}{}, } @@ -93,11 +93,10 @@ func NewSwamp(t *testing.T, options ...Option) *Swamp { return swp } -func getAccounts(t *testing.T, config *testnode.Config) (accounts []string) { - // for _, account := range config.Genesis.Accounts() { - // // Blocked on https://github.com/celestiaorg/celestia-app/pull/3690 - // // accounts = append(accounts, account.Name) - // } +func getAccounts(config *testnode.Config) (accounts []string) { + for _, account := range config.Genesis.Accounts() { + accounts = append(accounts, account.Name) + } return accounts } diff --git a/state/core_access_test.go b/state/core_access_test.go index a9e69781e0..e8120adc39 100644 --- a/state/core_access_test.go +++ b/state/core_access_test.go @@ -6,21 +6,14 @@ import ( "context" "errors" "fmt" - "io" "strings" "testing" "time" - "github.com/cosmos/cosmos-sdk/baseapp" - sdkservertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - tmlog "github.com/tendermint/tendermint/libs/log" - tmdb "github.com/tendermint/tm-db" "github.com/celestiaorg/celestia-app/v2/app" - "github.com/celestiaorg/celestia-app/v2/app/encoding" appconsts "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" genesis "github.com/celestiaorg/celestia-app/v2/test/util/genesis" "github.com/celestiaorg/celestia-app/v2/test/util/testnode" @@ -245,7 +238,7 @@ func buildAccessor(t *testing.T) (*CoreAccessor, []string) { appConf := testnode.DefaultAppConfig() appConf.API.Enable = true - appCreator := customAppCreator(fmt.Sprintf("0.002%s", app.BondDenom)) + appCreator := testnode.CustomAppCreator(fmt.Sprintf("0.002%s", app.BondDenom)) g := genesis.NewDefaultGenesis(). WithChainID(chainID). @@ -271,25 +264,3 @@ func getNames(accounts []genesis.KeyringAccount) (names []string) { } return names } - -// customAppCreator is a temporary workaround to set the min gas price for the -// testnode. -// -// This can be removed after -// https://github.com/celestiaorg/celestia-app/pull/3680 merges and is -// backported to celestia-app v2.x.x. -func customAppCreator(minGasPrice string) sdkservertypes.AppCreator { - return func(_ tmlog.Logger, _ tmdb.DB, _ io.Writer, _ sdkservertypes.AppOptions) sdkservertypes.Application { - encodingConfig := encoding.MakeConfig(app.ModuleEncodingRegisters...) - return app.New( - tmlog.NewNopLogger(), - tmdb.NewMemDB(), - nil, // trace store - 0, // invCheckPerid - encodingConfig, - 0, // v2 upgrade height - simapp.EmptyAppOptions{}, - baseapp.SetMinGasPrices(minGasPrice), - ) - } -} From 383380adfec6b66c97155d97916c5c65b0c5443b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:14:10 -0400 Subject: [PATCH 44/75] fix: exchange_test --- core/exchange_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/exchange_test.go b/core/exchange_test.go index 4859b0130a..fc43121425 100644 --- a/core/exchange_test.go +++ b/core/exchange_test.go @@ -152,7 +152,7 @@ func fillBlocks( default: } - _, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].PubKey.String(), flags.BroadcastBlock) + _, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].Name, flags.BroadcastBlock) require.NoError(t, err) } } From 4d51a7893e6d901f21999a0aa39975b7ac494a42 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:18:03 -0400 Subject: [PATCH 45/75] refactor: IntegrationTestSuite --- state/integration_test.go | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/state/integration_test.go b/state/integration_test.go index 3b12df2385..54c76fbcd3 100644 --- a/state/integration_test.go +++ b/state/integration_test.go @@ -34,8 +34,6 @@ type IntegrationTestSuite struct { cleanups []func() error accounts []genesis.Account - pubKeys []string - keyname string cctx testnode.Context accessor *CoreAccessor @@ -50,14 +48,11 @@ func (s *IntegrationTestSuite) SetupSuite() { cfg := core.DefaultTestConfig() s.cctx = core.StartTestNodeWithConfig(s.T(), cfg) s.accounts = cfg.Genesis.Accounts() - s.pubKeys = getPubKeys(cfg.Genesis.Accounts()) - records, err := cfg.Genesis.Keyring().List() - s.Require().NoError(err) - keyname := records[0].Name - s.keyname = keyname + s.Require().Greater(len(s.accounts), 0) + accountName := s.accounts[0].Name - accessor, err := NewCoreAccessor(s.cctx.Keyring, keyname, localHeader{s.cctx.Client}, "", "") + accessor, err := NewCoreAccessor(s.cctx.Keyring, accountName, localHeader{s.cctx.Client}, "", "") require.NoError(s.T(), err) setClients(accessor, s.cctx.GRPCClient) s.accessor = accessor @@ -67,13 +62,6 @@ func (s *IntegrationTestSuite) SetupSuite() { require.NoError(s.T(), err) } -func getPubKeys(accounts []genesis.Account) (pubKeys []string) { - for _, account := range accounts { - pubKeys = append(pubKeys, account.PubKey.String()) - } - return pubKeys -} - func setClients(ca *CoreAccessor, conn *grpc.ClientConn) { ca.coreConn = conn // create the staking query client @@ -131,7 +119,9 @@ func (s *IntegrationTestSuite) TestGetBalance() { func (s *IntegrationTestSuite) TestGenerateJSONBlock() { t := s.T() t.Skip("skipping testdata generation test") - resp, err := s.cctx.FillBlock(4, s.keyname, flags.BroadcastSync) + s.Require().Greater(len(s.accounts), 0) + accountName := s.accounts[0].Name + resp, err := s.cctx.FillBlock(4, accountName, flags.BroadcastSync) require := s.Require() require.NoError(err) require.Equal(abci.CodeTypeOK, resp.Code) From 1d826621c952462a6b59ca1e7d08a8c2e33ae25a Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:18:36 -0400 Subject: [PATCH 46/75] go mod tidy --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 106e4730be..1a66836f4e 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,6 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 github.com/tendermint/tendermint v0.34.29 - github.com/tendermint/tm-db v0.6.7 go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 @@ -310,6 +309,7 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tendermint/tm-db v0.6.7 // indirect github.com/tidwall/btree v1.5.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect From dc369f2e7250ea3a5484cc0a55ff2e67d3330802 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:23:36 -0400 Subject: [PATCH 47/75] docs: add comments --- blob/blob.go | 3 +++ blob/blob_test.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/blob/blob.go b/blob/blob.go index a00a4f1160..108b0877bd 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -106,6 +106,9 @@ func NewBlob(shareVersion uint8, namespace share.Namespace, data []byte) (*Blob, NamespaceVersion: uint32(namespace.Version()), } + // The argument to SubtreeRootThreshold is hardcoded to use v1.Version + // because it behaves identically to v2.Version and the containing function + // NewBlob does not have an app version parameter. com, err := inclusion.CreateCommitment(&blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(v1.Version)) if err != nil { return nil, err diff --git a/blob/blob_test.go b/blob/blob_test.go index 8d091529aa..3331e41992 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -44,6 +44,8 @@ func TestBlob(t *testing.T) { comm, err := inclusion.CreateCommitment( blob[0].Blob, merkle.HashFromByteSlices, + // The argument to SubtreeRootThreshold is hardcoded to use + // v1.Version because it behaves identically to v2.Version. appconsts.SubtreeRootThreshold(v1.Version), ) require.NoError(t, err) From 9acbbc85a947fc5ee22b21010308b026d42f94f4 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:25:49 -0400 Subject: [PATCH 48/75] fix: TestListenerWithNonEmptyBlocks --- core/listener_no_race_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/listener_no_race_test.go b/core/listener_no_race_test.go index 0a08e89a30..51b1abe4ca 100644 --- a/core/listener_no_race_test.go +++ b/core/listener_no_race_test.go @@ -44,8 +44,9 @@ func TestListenerWithNonEmptyBlocks(t *testing.T) { empty := share.EmptyRoot() // TODO extract 16 for i := 0; i < 16; i++ { - cfg.Genesis.Accounts() - _, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].PubKey.String(), flags.BroadcastBlock) + accounts := cfg.Genesis.Accounts() + require.Greater(t, len(accounts), 0) + _, err := cctx.FillBlock(16, accounts[0].Name, flags.BroadcastBlock) require.NoError(t, err) msg, err := sub.Next(ctx) require.NoError(t, err) From 052cf18d39eabbb29757880058066ed49be94a32 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 13:56:19 -0400 Subject: [PATCH 49/75] refactor: DefaultTestConfig --- core/testing.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/testing.go b/core/testing.go index 6cd32f68a9..944015c34b 100644 --- a/core/testing.go +++ b/core/testing.go @@ -33,18 +33,20 @@ func DefaultTestConfig() *testnode.Config { accounts[i] = tmrand.Str(9) } - cfg.TmConfig.Consensus.TimeoutCommit = time.Millisecond * 200 - genesis := genesis.NewDefaultGenesis(). WithChainID(chainID). WithValidators(genesis.NewDefaultValidator(testnode.DefaultValidatorAccountName)). WithConsensusParams(testnode.DefaultConsensusParams()) + tmConfig := testnode.DefaultTendermintConfig() + tmConfig.Consensus.TimeoutCommit = time.Millisecond * 200 + cfg = cfg. WithChainID(chainID). WithFundedAccounts(accounts...). WithSuppressLogs(true). - WithGenesis(genesis) + WithGenesis(genesis). + WithTendermintConfig(tmConfig) return cfg } From 38350c3b12a14a6cd84ac3ea6a0b2a395f598e89 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 14:00:40 -0400 Subject: [PATCH 50/75] refactor: DefaultTestConfig more --- core/testing.go | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/core/testing.go b/core/testing.go index 944015c34b..dafeaed756 100644 --- a/core/testing.go +++ b/core/testing.go @@ -24,15 +24,6 @@ const chainID = "private" // // Additionally, it instructs Tendermint + Celestia App tandem to setup 10 funded accounts. func DefaultTestConfig() *testnode.Config { - cfg := testnode.DefaultConfig() - - // instructs creating funded accounts - // 10 usually is enough for testing - accounts := make([]string, 10) - for i := range accounts { - accounts[i] = tmrand.Str(9) - } - genesis := genesis.NewDefaultGenesis(). WithChainID(chainID). WithValidators(genesis.NewDefaultValidator(testnode.DefaultValidatorAccountName)). @@ -41,14 +32,12 @@ func DefaultTestConfig() *testnode.Config { tmConfig := testnode.DefaultTendermintConfig() tmConfig.Consensus.TimeoutCommit = time.Millisecond * 200 - cfg = cfg. + return testnode.DefaultConfig(). WithChainID(chainID). - WithFundedAccounts(accounts...). - WithSuppressLogs(true). + WithFundedAccounts(generateRandomAccounts(10)...). // 10 usually is enough for testing WithGenesis(genesis). - WithTendermintConfig(tmConfig) - - return cfg + WithTendermintConfig(tmConfig). + WithSuppressLogs(true) } // StartTestNode simply starts Tendermint and Celestia App tandem with default testing @@ -91,3 +80,12 @@ func getEndpoint(cfg *tmconfig.Config) (string, string, error) { } return host, url.Port(), nil } + +// generateRandomAccounts generates n random account names. +func generateRandomAccounts(n int) []string { + accounts := make([]string, n) + for i := range accounts { + accounts[i] = tmrand.Str(9) + } + return accounts +} From 5f263a13cd1f23d37111782a494b6b0bcfb9af76 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 14:59:43 -0400 Subject: [PATCH 51/75] fix: TestRemoteClient_StartBlockSubscription_And_GetBlock --- core/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/client_test.go b/core/client_test.go index 8ad9060555..a00c6bb463 100644 --- a/core/client_test.go +++ b/core/client_test.go @@ -20,7 +20,7 @@ func TestRemoteClient_Status(t *testing.T) { } func TestRemoteClient_StartBlockSubscription_And_GetBlock(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*15) t.Cleanup(cancel) client := StartTestNode(t).Client From 125d766adbcd3fcd51876307341835f4a0a7a8ba Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 15:00:17 -0400 Subject: [PATCH 52/75] fix: TestBlockFetcherHeaderValues --- core/fetcher_no_race_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/fetcher_no_race_test.go b/core/fetcher_no_race_test.go index 890b7c35c1..8b3af8e5e1 100644 --- a/core/fetcher_no_race_test.go +++ b/core/fetcher_no_race_test.go @@ -15,7 +15,7 @@ import ( // TestBlockFetcherHeaderValues tests that both the Commit and ValidatorSet // endpoints are working as intended. func TestBlockFetcherHeaderValues(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*15) t.Cleanup(cancel) client := StartTestNode(t).Client From e3dda7881520d9c9b25b74293b01e61b098fcd3b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 15:00:48 -0400 Subject: [PATCH 53/75] fix: TestBlockFetcher_GetBlock_and_SubscribeNewBlockEvent --- core/fetcher_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/fetcher_test.go b/core/fetcher_test.go index 261b84d78c..42afa42bcd 100644 --- a/core/fetcher_test.go +++ b/core/fetcher_test.go @@ -10,7 +10,7 @@ import ( ) func TestBlockFetcher_GetBlock_and_SubscribeNewBlockEvent(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*15) t.Cleanup(cancel) client := StartTestNode(t).Client From e2be6faf761d6f158c8393ba73d5e14244f44f07 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 15:49:50 -0400 Subject: [PATCH 54/75] fix: nd_test by bumping timeout --- nodebuilder/tests/nd_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder/tests/nd_test.go b/nodebuilder/tests/nd_test.go index 338aa6d0c1..ebd48662ce 100644 --- a/nodebuilder/tests/nd_test.go +++ b/nodebuilder/tests/nd_test.go @@ -85,7 +85,7 @@ func TestShrexNDFromLightsWithBadFulls(t *testing.T) { btime = time.Millisecond * 300 bsize = 16 amountOfFulls = 5 - testTimeout = time.Second * 10 + testTimeout = time.Second * 20 ) ctx, cancel := context.WithTimeout(context.Background(), testTimeout) From db1d7cd4f299f518b799823a4ce2ce5c5dcd2cb5 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 17 Jul 2024 15:51:16 -0400 Subject: [PATCH 55/75] debug: double fraud proof test timeoutgs --- nodebuilder/tests/fraud_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder/tests/fraud_test.go b/nodebuilder/tests/fraud_test.go index 2630475820..1063282624 100644 --- a/nodebuilder/tests/fraud_test.go +++ b/nodebuilder/tests/fraud_test.go @@ -46,7 +46,7 @@ Another note: this test disables share exchange to speed up test results. 9. Try to start a Full Node(FN) that contains a BEFP in its store. */ func TestFraudProofHandling(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout) + ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout*2) t.Cleanup(cancel) const ( From cf0569960dae7731c92dba4639ea1154413d103f Mon Sep 17 00:00:00 2001 From: sweexordious Date: Thu, 25 Jul 2024 12:36:59 +0100 Subject: [PATCH 56/75] fix: convert types between app and core --- blob/commitment_proof.go | 7 ++- blob/service.go | 5 +- blob/service_test.go | 5 +- .../blobstream/data_root_tuple_root.go | 3 +- share/eds/eds.go | 51 ++++++++++++++++++- share/eds/eds_test.go | 3 +- 6 files changed, 58 insertions(+), 16 deletions(-) diff --git a/blob/commitment_proof.go b/blob/commitment_proof.go index 5cf419a659..ff08001060 100644 --- a/blob/commitment_proof.go +++ b/blob/commitment_proof.go @@ -4,10 +4,9 @@ import ( "bytes" "fmt" - coretypes "github.com/tendermint/tendermint/types" - "github.com/celestiaorg/celestia-app/pkg/appconsts" "github.com/celestiaorg/celestia-app/pkg/shares" + "github.com/celestiaorg/celestia-app/v2/pkg/proof" "github.com/celestiaorg/nmt" "github.com/celestiaorg/nmt/namespace" @@ -33,8 +32,8 @@ type CommitmentProof struct { NamespaceID namespace.ID `json:"namespace_id"` // RowProof is the proof of the rows containing the blob's data to the // data root. - RowProof coretypes.RowProof `json:"row_proof"` - NamespaceVersion uint8 `json:"namespace_version"` + RowProof proof.RowProof `json:"row_proof"` + NamespaceVersion uint8 `json:"namespace_version"` } func (com Commitment) String() string { diff --git a/blob/service.go b/blob/service.go index 9d157a90e7..249ff3b7d8 100644 --- a/blob/service.go +++ b/blob/service.go @@ -541,9 +541,8 @@ func ProveCommitment( SubtreeRoots: subtreeRoots, SubtreeRootProofs: nmtProofs, NamespaceID: namespace.ID(), - // @rach-id sharesProof.RowProof isn't compatible with the rowProof expected here - RowProof: sharesProof.RowProof, - NamespaceVersion: namespace.Version(), + RowProof: *sharesProof.RowProof, + NamespaceVersion: namespace.Version(), } return &commitmentProof, nil } diff --git a/blob/service_test.go b/blob/service_test.go index 1ce254d699..2ebc9469cd 100644 --- a/blob/service_test.go +++ b/blob/service_test.go @@ -848,9 +848,8 @@ func generateCommitmentProofFromBlock( SubtreeRoots: subtreeRoots, SubtreeRootProofs: nmtProofs, NamespaceID: sharesProof.NamespaceId, - // @rach-id sharesProof.RowProof isn't compatible with the rowProof expected here - RowProof: sharesProof.RowProof, - NamespaceVersion: uint8(sharesProof.NamespaceVersion), + RowProof: *sharesProof.RowProof, + NamespaceVersion: uint8(sharesProof.NamespaceVersion), } return commitmentProof diff --git a/nodebuilder/blobstream/data_root_tuple_root.go b/nodebuilder/blobstream/data_root_tuple_root.go index de2d60c4fa..5596ee2723 100644 --- a/nodebuilder/blobstream/data_root_tuple_root.go +++ b/nodebuilder/blobstream/data_root_tuple_root.go @@ -6,11 +6,10 @@ import ( "fmt" "strconv" - nodeheader "github.com/celestiaorg/celestia-node/header" - "github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/libs/bytes" + nodeheader "github.com/celestiaorg/celestia-node/header" "github.com/celestiaorg/celestia-node/nodebuilder/header" ) diff --git a/share/eds/eds.go b/share/eds/eds.go index cef0f872b8..760b0fb413 100644 --- a/share/eds/eds.go +++ b/share/eds/eds.go @@ -11,6 +11,9 @@ import ( "github.com/ipfs/go-cid" "github.com/ipld/go-car" "github.com/ipld/go-car/util" + "github.com/tendermint/tendermint/crypto/merkle" + corebytes "github.com/tendermint/tendermint/libs/bytes" + coretypes "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" pkgproof "github.com/celestiaorg/celestia-app/v2/pkg/proof" @@ -293,6 +296,50 @@ func ProveShares(eds *rsmt2d.ExtendedDataSquare, start, end int) (*types.SharePr if err != nil { return nil, err } - // @rach-id proof isn't compatible with the proof expected here - return &proof, nil + coreProof := toCoreShareProof(proof) + return &coreProof, nil +} + +// toCoreShareProof utility function that converts a share proof defined in app +// to the share proof defined in node. +// This will be removed once we unify both these proofs. +// Reference issue: https://github.com/celestiaorg/celestia-app/issues/3734 +func toCoreShareProof(appShareProof pkgproof.ShareProof) types.ShareProof { + shareProofs := make([]*coretypes.NMTProof, 0) + for _, proof := range appShareProof.ShareProofs { + shareProofs = append(shareProofs, &coretypes.NMTProof{ + Start: proof.Start, + End: proof.End, + Nodes: proof.Nodes, + LeafHash: proof.LeafHash, + }) + } + + rowRoots := make([]corebytes.HexBytes, 0) + for _, rowRoot := range appShareProof.RowProof.RowRoots { + rowRoots = append(rowRoots, rowRoot) + } + + rowProofs := make([]*merkle.Proof, 0) + for _, proof := range appShareProof.RowProof.Proofs { + rowProofs = append(rowProofs, &merkle.Proof{ + Total: proof.Total, + Index: proof.Index, + LeafHash: proof.LeafHash, + Aunts: proof.Aunts, + }) + } + + return types.ShareProof{ + Data: appShareProof.Data, + ShareProofs: shareProofs, + NamespaceID: appShareProof.NamespaceId, + RowProof: types.RowProof{ + RowRoots: rowRoots, + Proofs: rowProofs, + StartRow: appShareProof.RowProof.StartRow, + EndRow: appShareProof.RowProof.EndRow, + }, + NamespaceVersion: appShareProof.NamespaceVersion, + } } diff --git a/share/eds/eds_test.go b/share/eds/eds_test.go index 688b3e2307..fb1c13eaf1 100644 --- a/share/eds/eds_test.go +++ b/share/eds/eds_test.go @@ -330,8 +330,7 @@ func TestProveShares(t *testing.T) { ) require.NoError(t, err) require.NoError(t, proof.Validate(dataRoot.Hash())) - // @rach-id proof isn't compatible with the proof expected here - return proof + return toCoreShareProof(proof) }(), }, } From a664f3007681bdd11c7d067f7351212e596a6521 Mon Sep 17 00:00:00 2001 From: sweexordious Date: Thu, 25 Jul 2024 16:17:24 +0100 Subject: [PATCH 57/75] refactor: small refactor to use a single loop --- share/eds/eds.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/share/eds/eds.go b/share/eds/eds.go index 760b0fb413..03753bd44c 100644 --- a/share/eds/eds.go +++ b/share/eds/eds.go @@ -316,12 +316,9 @@ func toCoreShareProof(appShareProof pkgproof.ShareProof) types.ShareProof { } rowRoots := make([]corebytes.HexBytes, 0) - for _, rowRoot := range appShareProof.RowProof.RowRoots { - rowRoots = append(rowRoots, rowRoot) - } - rowProofs := make([]*merkle.Proof, 0) - for _, proof := range appShareProof.RowProof.Proofs { + for index, proof := range appShareProof.RowProof.Proofs { + rowRoots = append(rowRoots, appShareProof.RowProof.RowRoots[index]) rowProofs = append(rowProofs, &merkle.Proof{ Total: proof.Total, Index: proof.Index, From 198d02ed49ee9bdb35204644929a37c2192f88c7 Mon Sep 17 00:00:00 2001 From: sweexordious Date: Thu, 25 Jul 2024 16:54:42 +0100 Subject: [PATCH 58/75] fix: remove big test cases --- blob/service_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/blob/service_test.go b/blob/service_test.go index 2ebc9469cd..d91bdd432f 100644 --- a/blob/service_test.go +++ b/blob/service_test.go @@ -720,13 +720,9 @@ func TestProveCommitmentAllCombinations(t *testing.T) { tests := map[string]struct { blobSize int }{ - "very small blobs that take less than a share": {blobSize: 350}, - "small blobs that take 2 shares": {blobSize: 1000}, - "small blobs that take ~10 shares": {blobSize: 5000}, - "large blobs ~100 shares": {blobSize: 50000}, - "large blobs ~150 shares": {blobSize: 75000}, - "large blobs ~300 shares": {blobSize: 150000}, - "very large blobs ~1500 shares": {blobSize: 750000}, + "blobs that take less than a share": {blobSize: 350}, + "blobs that take 2 shares": {blobSize: 1000}, + "blobs that take ~10 shares": {blobSize: 5000}, } for name, tc := range tests { From 87e861278e6b1d2a6f38820d0d0b9f63e3276c36 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 25 Jul 2024 15:14:35 -0400 Subject: [PATCH 59/75] fix: lint --- blob/service_test.go | 6 +++--- share/eds/edstest/testing.go | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/blob/service_test.go b/blob/service_test.go index d91bdd432f..9c2486a372 100644 --- a/blob/service_test.go +++ b/blob/service_test.go @@ -736,7 +736,7 @@ func proveAndVerifyShareCommitments(t *testing.T, blobSize int) { msgs, blobs, nss, eds, _, _, dataRoot := edstest.GenerateTestBlock(t, blobSize, 10) for msgIndex, msg := range msgs { t.Run(fmt.Sprintf("msgIndex=%d", msgIndex), func(t *testing.T) { - blb, err := NewBlob(uint8(blobs[msgIndex].ShareVersion), nss[msgIndex].Bytes(), blobs[msgIndex].Data) + blb, err := NewBlob(uint8(blobs[msgIndex].GetShareVersion()), nss[msgIndex].Bytes(), blobs[msgIndex].GetData()) require.NoError(t, err) blobShares, err := BlobsToShares(blb) require.NoError(t, err) @@ -784,9 +784,9 @@ func generateCommitmentProofFromBlock( ) CommitmentProof { // create the blob from the data blb, err := NewBlob( - uint8(blob.ShareVersion), + uint8(blob.GetShareVersion()), ns, - blob.Data, + blob.GetData(), ) require.NoError(t, err) diff --git a/share/eds/edstest/testing.go b/share/eds/edstest/testing.go index 308cd3d390..69b0889dd4 100644 --- a/share/eds/edstest/testing.go +++ b/share/eds/edstest/testing.go @@ -26,8 +26,10 @@ import ( "github.com/celestiaorg/celestia-node/share/sharetest" ) -const accountName = "test-account" -const testChainID = "private" +const ( + accountName = "test-account" + testChainID = "private" +) func RandByzantineEDS(t testing.TB, size int, options ...nmt.Option) *rsmt2d.ExtendedDataSquare { eds := RandEDS(t, size) From 33fafc9cd77e228805f924f26c7f435cd61bf018 Mon Sep 17 00:00:00 2001 From: sweexordious Date: Fri, 26 Jul 2024 19:15:04 +0100 Subject: [PATCH 60/75] fix: correctly setup the subtreeRoot threshold and re-introduce the not-working tests --- blob/service.go | 6 ++++-- blob/service_test.go | 4 ++++ share/eds/edstest/testing.go | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/blob/service.go b/blob/service.go index 249ff3b7d8..77e52ece9e 100644 --- a/blob/service.go +++ b/blob/service.go @@ -499,10 +499,12 @@ func ProveCommitment( // convert the shares to row root proofs to nmt proofs nmtProofs := make([]*nmt.Proof, 0) for _, proof := range sharesProof.ShareProofs { - nmtProof := nmt.NewInclusionProof(int(proof.Start), + nmtProof := nmt.NewInclusionProof( + int(proof.Start), int(proof.End), proof.Nodes, - true) + true, + ) nmtProofs = append( nmtProofs, &nmtProof, diff --git a/blob/service_test.go b/blob/service_test.go index 9c2486a372..3d6d8a6b35 100644 --- a/blob/service_test.go +++ b/blob/service_test.go @@ -723,6 +723,10 @@ func TestProveCommitmentAllCombinations(t *testing.T) { "blobs that take less than a share": {blobSize: 350}, "blobs that take 2 shares": {blobSize: 1000}, "blobs that take ~10 shares": {blobSize: 5000}, + "large blobs ~100 shares": {blobSize: 50000}, + "large blobs ~150 shares": {blobSize: 75000}, + "large blobs ~300 shares": {blobSize: 150000}, + "very large blobs ~1500 shares": {blobSize: 750000}, } for name, tc := range tests { diff --git a/share/eds/edstest/testing.go b/share/eds/edstest/testing.go index 69b0889dd4..c5131f8656 100644 --- a/share/eds/edstest/testing.go +++ b/share/eds/edstest/testing.go @@ -89,7 +89,7 @@ func GenerateTestBlock( dataSquare, err := square.Construct( txs.ToSliceOfBytes(), appconsts.SquareSizeUpperBound(appconsts.LatestVersion), - appconsts.SquareSizeUpperBound(appconsts.LatestVersion), + appconsts.SubtreeRootThreshold(appconsts.LatestVersion), ) require.NoError(t, err) From 037aa754d7d77763568a718b575cf89900bdac15 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 10:23:44 -0400 Subject: [PATCH 61/75] refactor: one account for FillBlocks --- nodebuilder/tests/fraud_test.go | 2 +- nodebuilder/tests/nd_test.go | 4 ++-- nodebuilder/tests/prune_test.go | 2 +- nodebuilder/tests/reconstruct_test.go | 6 +++--- nodebuilder/tests/swamp/swamp_tx.go | 4 ++-- nodebuilder/tests/sync_test.go | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nodebuilder/tests/fraud_test.go b/nodebuilder/tests/fraud_test.go index 1063282624..40797cf121 100644 --- a/nodebuilder/tests/fraud_test.go +++ b/nodebuilder/tests/fraud_test.go @@ -56,7 +56,7 @@ func TestFraudProofHandling(t *testing.T) { ) sw := swamp.NewSwamp(t, swamp.WithBlockTime(blockTime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, blockSize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], blockSize, blocks) set, val := sw.Validators(t) fMaker := headerfraud.NewFraudMaker(t, 10, []types.PrivValidator{val}, set) diff --git a/nodebuilder/tests/nd_test.go b/nodebuilder/tests/nd_test.go index ebd48662ce..d82f405a0c 100644 --- a/nodebuilder/tests/nd_test.go +++ b/nodebuilder/tests/nd_test.go @@ -33,7 +33,7 @@ func TestShrexNDFromLights(t *testing.T) { t.Cleanup(cancel) sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, blocks) bridge := sw.NewBridgeNode() sw.SetBootstrapper(t, bridge) @@ -92,7 +92,7 @@ func TestShrexNDFromLightsWithBadFulls(t *testing.T) { t.Cleanup(cancel) sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, blocks) bridge := sw.NewBridgeNode() sw.SetBootstrapper(t, bridge) diff --git a/nodebuilder/tests/prune_test.go b/nodebuilder/tests/prune_test.go index 79a20ef1f9..59b665e141 100644 --- a/nodebuilder/tests/prune_test.go +++ b/nodebuilder/tests/prune_test.go @@ -47,7 +47,7 @@ func TestArchivalBlobSync(t *testing.T) { t.Cleanup(cancel) sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, blocks) archivalBN := sw.NewBridgeNode() sw.SetBootstrapper(t, archivalBN) diff --git a/nodebuilder/tests/reconstruct_test.go b/nodebuilder/tests/reconstruct_test.go index d047182669..98789cbcc1 100644 --- a/nodebuilder/tests/reconstruct_test.go +++ b/nodebuilder/tests/reconstruct_test.go @@ -45,7 +45,7 @@ func TestFullReconstructFromBridge(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout) t.Cleanup(cancel) sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, blocks) bridge := sw.NewBridgeNode() err := bridge.Start(ctx) @@ -102,7 +102,7 @@ func TestFullReconstructFromFulls(t *testing.T) { t.Cleanup(cancel) sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, blocks) const defaultTimeInterval = time.Second * 5 bridge := sw.NewBridgeNode() @@ -273,7 +273,7 @@ func TestFullReconstructFromLights(t *testing.T) { t.Cleanup(cancel) sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime)) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, blocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, blocks) const defaultTimeInterval = time.Second * 5 cfg := nodebuilder.DefaultConfig(node.Full) diff --git a/nodebuilder/tests/swamp/swamp_tx.go b/nodebuilder/tests/swamp/swamp_tx.go index b87e02fe16..3cfe904ab1 100644 --- a/nodebuilder/tests/swamp/swamp_tx.go +++ b/nodebuilder/tests/swamp/swamp_tx.go @@ -11,7 +11,7 @@ import ( // FillBlocks produces the given amount of contiguous blocks with customizable size. // The returned channel reports when the process is finished. -func FillBlocks(ctx context.Context, cctx testnode.Context, accounts []string, bsize, blocks int) chan error { +func FillBlocks(ctx context.Context, cctx testnode.Context, account string, bsize, blocks int) chan error { errCh := make(chan error) go func() { // TODO: FillBlock must respect the context @@ -19,7 +19,7 @@ func FillBlocks(ctx context.Context, cctx testnode.Context, accounts []string, b time.Sleep(time.Millisecond * 50) var err error for i := 0; i < blocks; i++ { - _, err = cctx.FillBlock(bsize, accounts[0], flags.BroadcastBlock) + _, err = cctx.FillBlock(bsize, account, flags.BroadcastBlock) if err != nil { break } diff --git a/nodebuilder/tests/sync_test.go b/nodebuilder/tests/sync_test.go index ec8386ea43..90baabd218 100644 --- a/nodebuilder/tests/sync_test.go +++ b/nodebuilder/tests/sync_test.go @@ -49,7 +49,7 @@ func TestSyncAgainstBridge_NonEmptyChain(t *testing.T) { sw := swamp.NewSwamp(t, swamp.WithBlockTime(sbtime)) // wait for core network to fill 20 blocks - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, numBlocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, numBlocks) sw.WaitTillHeight(ctx, numBlocks) // create a bridge node and set it as the bootstrapper for the suite @@ -222,7 +222,7 @@ func TestSyncStartStopLightWithBridge(t *testing.T) { sw := swamp.NewSwamp(t) // wait for core network to fill 20 blocks - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, numBlocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, numBlocks) sw.WaitTillHeight(ctx, numBlocks) // create bridge and set it as a bootstrapper @@ -289,7 +289,7 @@ func TestSyncLightAgainstFull(t *testing.T) { sw := swamp.NewSwamp(t) // wait for the core network to fill up 20 blocks - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, numBlocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, numBlocks) sw.WaitTillHeight(ctx, numBlocks) // create bridge and set it as a bootstrapper @@ -367,7 +367,7 @@ func TestSyncLightWithTrustedPeers(t *testing.T) { t.Cleanup(cancel) sw := swamp.NewSwamp(t) - fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, numBlocks) + fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts[0], bsize, numBlocks) sw.WaitTillHeight(ctx, numBlocks) // create a BN and set as a bootstrapper From 2a8d98ace2e50187430659a2a6a9d9ef306c9534 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 13:40:19 -0400 Subject: [PATCH 62/75] refactor: const for appVersion --- blob/blob.go | 10 +++++----- blob/blob_test.go | 5 +---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/blob/blob.go b/blob/blob.go index 5e4e16ff6a..369d464ef4 100644 --- a/blob/blob.go +++ b/blob/blob.go @@ -9,7 +9,7 @@ import ( "github.com/tendermint/tendermint/crypto/merkle" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" - v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" + v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2" "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/inclusion" "github.com/celestiaorg/go-square/shares" @@ -18,6 +18,9 @@ import ( "github.com/celestiaorg/celestia-node/share" ) +// appVersion is the current application version of celestia-app. +const appVersion = v2.Version + var errEmptyShares = errors.New("empty shares") // The Proof is a set of nmt proofs that can be verified only through @@ -93,10 +96,7 @@ func NewBlob(shareVersion uint8, namespace share.Namespace, data []byte) (*Blob, NamespaceVersion: uint32(namespace.Version()), } - // The argument to SubtreeRootThreshold is hardcoded to use v1.Version - // because it behaves identically to v2.Version and the containing function - // NewBlob does not have an app version parameter. - com, err := inclusion.CreateCommitment(&blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(v1.Version)) + com, err := inclusion.CreateCommitment(&blob, merkle.HashFromByteSlices, appconsts.SubtreeRootThreshold(appVersion)) if err != nil { return nil, err } diff --git a/blob/blob_test.go b/blob/blob_test.go index 94f6a19bc6..f008cd9cf6 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/require" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" - v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" apptypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/inclusion" @@ -45,9 +44,7 @@ func TestBlob(t *testing.T) { comm, err := inclusion.CreateCommitment( blob[0].Blob, merkle.HashFromByteSlices, - // The argument to SubtreeRootThreshold is hardcoded to use - // v1.Version because it behaves identically to v2.Version. - appconsts.SubtreeRootThreshold(v1.Version), + appconsts.SubtreeRootThreshold(appVersion), ) require.NoError(t, err) assert.Equal(t, blob[0].Commitment, Commitment(comm)) From 79d8458b0db4c1e5b8438e8ee597f4e2a249e9d8 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 13:44:05 -0400 Subject: [PATCH 63/75] revert: header support for v2 Because it will be added in https://github.com/celestiaorg/celestia-node/pull/3589 --- header/header.go | 11 ++--- header/headertest/validate_test.go | 64 ------------------------------ 2 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 header/headertest/validate_test.go diff --git a/header/header.go b/header/header.go index 3ec691307d..1e43d3bd13 100644 --- a/header/header.go +++ b/header/header.go @@ -12,7 +12,6 @@ import ( core "github.com/tendermint/tendermint/types" v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" - v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2" "github.com/celestiaorg/celestia-app/v2/pkg/da" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/rsmt2d" @@ -115,13 +114,9 @@ func (eh *ExtendedHeader) Validate() error { return fmt.Errorf("ValidateBasic error on RawHeader at height %d: %w", eh.Height(), err) } - if eh.RawHeader.Version.App != v1.Version && eh.RawHeader.Version.App != v2.Version { - return fmt.Errorf( - "app version mismatch, expected: %d or %d, got %d", - v1.Version, - v2.Version, - eh.RawHeader.Version.App, - ) + if eh.RawHeader.Version.App != v1.Version { + return fmt.Errorf("app version mismatch, expected: %d, got %d", v1.Version, + eh.RawHeader.Version.App) } err = eh.Commit.ValidateBasic() diff --git a/header/headertest/validate_test.go b/header/headertest/validate_test.go deleted file mode 100644 index 8d95c357de..0000000000 --- a/header/headertest/validate_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package headertest - -import ( - "fmt" - "strconv" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/types" - - "github.com/celestiaorg/celestia-app/v2/pkg/da" - - "github.com/celestiaorg/celestia-node/header" -) - -func TestValidate(t *testing.T) { - testCases := []struct { - extendedHeader *header.ExtendedHeader - wantErr error - }{ - { - extendedHeader: getExtendedHeader(t, 1), - wantErr: nil, - }, - { - extendedHeader: getExtendedHeader(t, 2), - wantErr: nil, - }, - { - extendedHeader: getExtendedHeader(t, 3), - wantErr: fmt.Errorf("app version mismatch, expected: 1 or 2, got 3"), - }, - } - - for i, tc := range testCases { - t.Run(strconv.Itoa(i), func(t *testing.T) { - got := tc.extendedHeader.Validate() - assert.Equal(t, tc.wantErr, got) - }) - } -} - -func getExtendedHeader(t *testing.T, appVersion uint64) *header.ExtendedHeader { - validatorSet, privValidators := RandValidatorSet(1, 1) - rawHeader := RandRawHeader(t) - rawHeader.Version.App = appVersion - rawHeader.ValidatorsHash = validatorSet.Hash() - - minHeader := da.MinDataAvailabilityHeader() - rawHeader.DataHash = minHeader.Hash() - - blockID := RandBlockID(t) - blockID.Hash = rawHeader.Hash() - voteSet := types.NewVoteSet(rawHeader.ChainID, rawHeader.Height, 0, tmproto.PrecommitType, validatorSet) - commit, err := MakeCommit(blockID, rawHeader.Height, 0, voteSet, privValidators, time.Now()) - require.NoError(t, err) - - result, err := header.MakeExtendedHeader(rawHeader, commit, validatorSet, nil) - require.NoError(t, err) - return result -} From 7e31762bbb6560939355b43b34f0da43ba2daad9 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 13:53:41 -0400 Subject: [PATCH 64/75] refactor: bump swamp test timeout to 10 mins --- nodebuilder/tests/fraud_test.go | 2 +- nodebuilder/tests/swamp/swamp.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodebuilder/tests/fraud_test.go b/nodebuilder/tests/fraud_test.go index 40797cf121..83375df6b0 100644 --- a/nodebuilder/tests/fraud_test.go +++ b/nodebuilder/tests/fraud_test.go @@ -46,7 +46,7 @@ Another note: this test disables share exchange to speed up test results. 9. Try to start a Full Node(FN) that contains a BEFP in its store. */ func TestFraudProofHandling(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout*2) + ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout) t.Cleanup(cancel) const ( diff --git a/nodebuilder/tests/swamp/swamp.go b/nodebuilder/tests/swamp/swamp.go index b10c8fdce1..e601ba5a13 100644 --- a/nodebuilder/tests/swamp/swamp.go +++ b/nodebuilder/tests/swamp/swamp.go @@ -39,8 +39,8 @@ import ( var blackholeIP6 = net.ParseIP("100::") // DefaultTestTimeout should be used as the default timeout on all the Swamp tests. -// It's generously set to 5 minutes to give enough time for CI. -const DefaultTestTimeout = time.Minute * 5 +// It's generously set to 10 minutes to give enough time for CI. +const DefaultTestTimeout = time.Minute * 10 // Swamp represents the main functionality that is needed for the test-case: // - Network to link the nodes From 6c12f7b1c04de5bc564d67cd063d3f9a264946c4 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 13:55:01 -0400 Subject: [PATCH 65/75] refactor: remove celestia-node.sh script --- scripts/celestia-node.sh | 41 ---------------------------------------- 1 file changed, 41 deletions(-) delete mode 100755 scripts/celestia-node.sh diff --git a/scripts/celestia-node.sh b/scripts/celestia-node.sh deleted file mode 100755 index 8ea62c1acf..0000000000 --- a/scripts/celestia-node.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -CHAIN_ID="test" -APP_PATH="${HOME}/.celestia-app" -NODE_PATH="${HOME}/.celestia-bridge-test/" -CELESTIA_VERSION=$(celestia version 2>&1) - -echo "node_path: ${NODE_PATH}" -echo "celestia version: ${CELESTIA_VERSION}" -echo "" - -echo "Deleting $NODE_PATH..." -rm -r "$NODE_PATH" - -echo "Creating $NODE_PATH/keys..." -mkdir -p $NODE_PATH/keys - -echo "Copying keys..." -cp -r $APP_PATH/keyring-test/ $NODE_PATH/keys/keyring-test/ - -# Try to get the genesis hash. Usually first request returns an empty string (port is not open, curl fails), later attempts -# returns "null" if block was not yet produced. -GENESIS= -CNT=0 -MAX=30 -while [ "${#GENESIS}" -le 4 -a $CNT -ne $MAX ]; do - GENESIS=$(curl -s http://127.0.0.1:26657/block?height=1 | jq '.result.block_id.hash' | tr -d '"') - ((CNT++)) - sleep 1 -done - -export CELESTIA_CUSTOM=test:$GENESIS -echo "$CELESTIA_CUSTOM" - -celestia bridge init --node.store $NODE_PATH -celestia bridge start \ - --node.store $NODE_PATH --gateway \ - --core.ip 127.0.0.1 \ - --keyring.keyname validator \ - --gateway.addr 0.0.0.0 \ - --rpc.addr 0.0.0.0 From f52886c5c0ea8a76a41d8ad056494451e0220f29 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 13:57:52 -0400 Subject: [PATCH 66/75] refactor: provide len to make() --- share/eds/eds.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/eds/eds.go b/share/eds/eds.go index 03753bd44c..d16efd5a3a 100644 --- a/share/eds/eds.go +++ b/share/eds/eds.go @@ -305,7 +305,7 @@ func ProveShares(eds *rsmt2d.ExtendedDataSquare, start, end int) (*types.SharePr // This will be removed once we unify both these proofs. // Reference issue: https://github.com/celestiaorg/celestia-app/issues/3734 func toCoreShareProof(appShareProof pkgproof.ShareProof) types.ShareProof { - shareProofs := make([]*coretypes.NMTProof, 0) + shareProofs := make([]*coretypes.NMTProof, len(appShareProof.ShareProofs)) for _, proof := range appShareProof.ShareProofs { shareProofs = append(shareProofs, &coretypes.NMTProof{ Start: proof.Start, @@ -315,8 +315,8 @@ func toCoreShareProof(appShareProof pkgproof.ShareProof) types.ShareProof { }) } - rowRoots := make([]corebytes.HexBytes, 0) - rowProofs := make([]*merkle.Proof, 0) + rowRoots := make([]corebytes.HexBytes, len(appShareProof.RowProof.Proofs)) + rowProofs := make([]*merkle.Proof, len(appShareProof.RowProof.Proofs)) for index, proof := range appShareProof.RowProof.Proofs { rowRoots = append(rowRoots, appShareProof.RowProof.RowRoots[index]) rowProofs = append(rowProofs, &merkle.Proof{ From 35f51640d2515712a7c443de25288f4747d031e7 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 15:38:12 -0400 Subject: [PATCH 67/75] revert: len in make Because TestProveShares was failing due to nil pointer --- share/eds/eds.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/eds/eds.go b/share/eds/eds.go index d16efd5a3a..03753bd44c 100644 --- a/share/eds/eds.go +++ b/share/eds/eds.go @@ -305,7 +305,7 @@ func ProveShares(eds *rsmt2d.ExtendedDataSquare, start, end int) (*types.SharePr // This will be removed once we unify both these proofs. // Reference issue: https://github.com/celestiaorg/celestia-app/issues/3734 func toCoreShareProof(appShareProof pkgproof.ShareProof) types.ShareProof { - shareProofs := make([]*coretypes.NMTProof, len(appShareProof.ShareProofs)) + shareProofs := make([]*coretypes.NMTProof, 0) for _, proof := range appShareProof.ShareProofs { shareProofs = append(shareProofs, &coretypes.NMTProof{ Start: proof.Start, @@ -315,8 +315,8 @@ func toCoreShareProof(appShareProof pkgproof.ShareProof) types.ShareProof { }) } - rowRoots := make([]corebytes.HexBytes, len(appShareProof.RowProof.Proofs)) - rowProofs := make([]*merkle.Proof, len(appShareProof.RowProof.Proofs)) + rowRoots := make([]corebytes.HexBytes, 0) + rowProofs := make([]*merkle.Proof, 0) for index, proof := range appShareProof.RowProof.Proofs { rowRoots = append(rowRoots, appShareProof.RowProof.RowRoots[index]) rowProofs = append(rowProofs, &merkle.Proof{ From c284dc29ad438fc2ef4cfbc235c832282dd01fe3 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 1 Aug 2024 16:13:18 -0400 Subject: [PATCH 68/75] Revert "revert: header support for v2" This reverts commit 79d8458b0db4c1e5b8438e8ee597f4e2a249e9d8. --- header/header.go | 11 +++-- header/headertest/validate_test.go | 64 ++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 header/headertest/validate_test.go diff --git a/header/header.go b/header/header.go index 1e43d3bd13..3ec691307d 100644 --- a/header/header.go +++ b/header/header.go @@ -12,6 +12,7 @@ import ( core "github.com/tendermint/tendermint/types" v1 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v1" + v2 "github.com/celestiaorg/celestia-app/v2/pkg/appconsts/v2" "github.com/celestiaorg/celestia-app/v2/pkg/da" libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/rsmt2d" @@ -114,9 +115,13 @@ func (eh *ExtendedHeader) Validate() error { return fmt.Errorf("ValidateBasic error on RawHeader at height %d: %w", eh.Height(), err) } - if eh.RawHeader.Version.App != v1.Version { - return fmt.Errorf("app version mismatch, expected: %d, got %d", v1.Version, - eh.RawHeader.Version.App) + if eh.RawHeader.Version.App != v1.Version && eh.RawHeader.Version.App != v2.Version { + return fmt.Errorf( + "app version mismatch, expected: %d or %d, got %d", + v1.Version, + v2.Version, + eh.RawHeader.Version.App, + ) } err = eh.Commit.ValidateBasic() diff --git a/header/headertest/validate_test.go b/header/headertest/validate_test.go new file mode 100644 index 0000000000..8d95c357de --- /dev/null +++ b/header/headertest/validate_test.go @@ -0,0 +1,64 @@ +package headertest + +import ( + "fmt" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/types" + + "github.com/celestiaorg/celestia-app/v2/pkg/da" + + "github.com/celestiaorg/celestia-node/header" +) + +func TestValidate(t *testing.T) { + testCases := []struct { + extendedHeader *header.ExtendedHeader + wantErr error + }{ + { + extendedHeader: getExtendedHeader(t, 1), + wantErr: nil, + }, + { + extendedHeader: getExtendedHeader(t, 2), + wantErr: nil, + }, + { + extendedHeader: getExtendedHeader(t, 3), + wantErr: fmt.Errorf("app version mismatch, expected: 1 or 2, got 3"), + }, + } + + for i, tc := range testCases { + t.Run(strconv.Itoa(i), func(t *testing.T) { + got := tc.extendedHeader.Validate() + assert.Equal(t, tc.wantErr, got) + }) + } +} + +func getExtendedHeader(t *testing.T, appVersion uint64) *header.ExtendedHeader { + validatorSet, privValidators := RandValidatorSet(1, 1) + rawHeader := RandRawHeader(t) + rawHeader.Version.App = appVersion + rawHeader.ValidatorsHash = validatorSet.Hash() + + minHeader := da.MinDataAvailabilityHeader() + rawHeader.DataHash = minHeader.Hash() + + blockID := RandBlockID(t) + blockID.Hash = rawHeader.Hash() + voteSet := types.NewVoteSet(rawHeader.ChainID, rawHeader.Height, 0, tmproto.PrecommitType, validatorSet) + commit, err := MakeCommit(blockID, rawHeader.Height, 0, voteSet, privValidators, time.Now()) + require.NoError(t, err) + + result, err := header.MakeExtendedHeader(rawHeader, commit, validatorSet, nil) + require.NoError(t, err) + return result +} From 6a920279dee23323be671b9df65bb14cecb07f9f Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 2 Aug 2024 10:38:59 -0400 Subject: [PATCH 69/75] docs: comment for convert --- nodebuilder/tests/blob_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/nodebuilder/tests/blob_test.go b/nodebuilder/tests/blob_test.go index d2fb27710b..bd3c94847a 100644 --- a/nodebuilder/tests/blob_test.go +++ b/nodebuilder/tests/blob_test.go @@ -203,6 +203,7 @@ func TestBlobModule(t *testing.T) { } // convert converts a squareblob.Blob to a blob.Blob. +// convert may be deduplicated with convertBlobs from the blob package. func convert(squareBlob *squareblob.Blob) (nodeBlob *blob.Blob, err error) { return blob.NewBlob(uint8(squareBlob.GetShareVersion()), squareBlob.Namespace().Bytes(), squareBlob.GetData()) } From 96e1bcd3a862a815d6b35529219930471d18aac6 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 2 Aug 2024 10:55:56 -0400 Subject: [PATCH 70/75] refactor: use Namespace.Compare() and unit test --- blob/helper.go | 4 +--- blob/helper_test.go | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 blob/helper_test.go diff --git a/blob/helper.go b/blob/helper.go index 21746dbd78..a9c3f7f6c9 100644 --- a/blob/helper.go +++ b/blob/helper.go @@ -1,7 +1,6 @@ package blob import ( - "bytes" "sort" squareblob "github.com/celestiaorg/go-square/blob" @@ -24,8 +23,7 @@ func BlobsToShares(nodeBlobs ...*Blob) ([]share.Share, error) { } sort.Slice(b, func(i, j int) bool { - val := bytes.Compare(b[i].Namespace().Bytes(), b[j].Namespace().Bytes()) - return val < 0 + return b[i].Namespace().Compare(b[j].Namespace()) < 0 }) rawShares, err := shares.SplitBlobs(b...) diff --git a/blob/helper_test.go b/blob/helper_test.go new file mode 100644 index 0000000000..db1adb805e --- /dev/null +++ b/blob/helper_test.go @@ -0,0 +1,29 @@ +package blob + +import ( + "bytes" + "testing" + + "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + "github.com/celestiaorg/go-square/namespace" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestBlobsToShares(t *testing.T) { + t.Run("should sort blobs by namespace in ascending order", func(t *testing.T) { + namespaceA := namespace.MustNewV0(bytes.Repeat([]byte{0xa}, 10)).Bytes() + namespaceB := namespace.MustNewV0(bytes.Repeat([]byte{0xb}, 10)).Bytes() + + blobA, err := NewBlob(appconsts.ShareVersionZero, namespaceA, []byte("dataA")) + require.NoError(t, err) + blobB, err := NewBlob(appconsts.ShareVersionZero, namespaceB, []byte("dataB")) + require.NoError(t, err) + + got, err := BlobsToShares(blobB, blobA) + require.NoError(t, err) + assert.Equal(t, got[0][:appconsts.NamespaceSize], namespaceA) + assert.Equal(t, got[1][:appconsts.NamespaceSize], namespaceB) + assert.IsIncreasing(t, got) + }) +} From cc3ee1dd91500e16ce25b4986a8cbb1d31e01b6d Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 2 Aug 2024 11:24:37 -0400 Subject: [PATCH 71/75] fix: ToAppBlobs --- blob/helper.go | 2 +- blob/helper_test.go | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/blob/helper.go b/blob/helper.go index a9c3f7f6c9..17f0068c9e 100644 --- a/blob/helper.go +++ b/blob/helper.go @@ -35,7 +35,7 @@ func BlobsToShares(nodeBlobs ...*Blob) ([]share.Share, error) { // ToAppBlobs converts node's blob type to the blob type from go-square. func ToAppBlobs(blobs ...*Blob) []*squareblob.Blob { - appBlobs := make([]*squareblob.Blob, 0, len(blobs)) + appBlobs := make([]*squareblob.Blob, len(blobs)) for i := range blobs { appBlobs[i] = blobs[i].Blob } diff --git a/blob/helper_test.go b/blob/helper_test.go index db1adb805e..b2c25ddeae 100644 --- a/blob/helper_test.go +++ b/blob/helper_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/celestiaorg/celestia-app/v2/pkg/appconsts" + squareblob "github.com/celestiaorg/go-square/blob" "github.com/celestiaorg/go-square/namespace" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -27,3 +28,30 @@ func TestBlobsToShares(t *testing.T) { assert.IsIncreasing(t, got) }) } + +func TestToAppBlobs(t *testing.T) { + namespaceA := namespace.MustNewV0(bytes.Repeat([]byte{0xa}, 10)) + namespaceB := namespace.MustNewV0(bytes.Repeat([]byte{0xb}, 10)) + + blobA, err := NewBlob(appconsts.ShareVersionZero, namespaceA.Bytes(), []byte("dataA")) + require.NoError(t, err) + blobB, err := NewBlob(appconsts.ShareVersionZero, namespaceB.Bytes(), []byte("dataB")) + require.NoError(t, err) + + got := ToAppBlobs(blobA, blobB) + want := []*squareblob.Blob{ + { + NamespaceId: blobA.NamespaceId, + NamespaceVersion: blobA.NamespaceVersion, + Data: blobA.Data, + ShareVersion: blobA.ShareVersion, + }, + { + NamespaceId: blobB.NamespaceId, + NamespaceVersion: blobB.NamespaceVersion, + Data: blobB.Data, + ShareVersion: blobB.ShareVersion, + }, + } + assert.Equal(t, want, got) +} From 9a59f26fb434e82585717b92ed937397dbdd9531 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 2 Aug 2024 11:58:11 -0400 Subject: [PATCH 72/75] refactor: use convert --- nodebuilder/tests/da_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nodebuilder/tests/da_test.go b/nodebuilder/tests/da_test.go index 292227881d..c67c5f61a7 100644 --- a/nodebuilder/tests/da_test.go +++ b/nodebuilder/tests/da_test.go @@ -38,11 +38,7 @@ func TestDaModule(t *testing.T) { daBlobs := make([][]byte, 0, len(appBlobs0)+len(appBlobs1)) for _, squareBlob := range append(appBlobs0, appBlobs1...) { - blob, err := blob.NewBlob( - uint8(squareBlob.GetShareVersion()), - squareBlob.Namespace().Bytes(), - squareBlob.GetData(), - ) + blob, err := convert(squareBlob) require.NoError(t, err) blobs = append(blobs, blob) daBlobs = append(daBlobs, blob.Data) From 26da487b3eb1ce547782ba8fde7c7a8a9712a9bd Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 2 Aug 2024 12:04:42 -0400 Subject: [PATCH 73/75] chore(deps): upgrade to nmt v0.22.1 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bd1b324d62..66dc5ab711 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/celestiaorg/go-libp2p-messenger v0.2.0 github.com/celestiaorg/go-square v1.1.0 github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 - github.com/celestiaorg/nmt v0.22.0 + github.com/celestiaorg/nmt v0.22.1 github.com/celestiaorg/rsmt2d v0.13.1 github.com/cosmos/cosmos-sdk v0.46.16 github.com/cristalhq/jwt/v5 v5.4.0 diff --git a/go.sum b/go.sum index cc34628925..a432aa1e32 100644 --- a/go.sum +++ b/go.sum @@ -376,8 +376,8 @@ github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076 h1:PY github.com/celestiaorg/go-square/merkle v0.0.0-20240117232118-fd78256df076/go.mod h1:hlidgivKyvv7m4Yl2Fdf2mSTmazZYxX8+bnr5IQrI98= github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26 h1:P2RI1xJ49EZ8cuHMcH+ZSBonfRDtBS8OS9Jdt1BWX3k= github.com/celestiaorg/merkletree v0.0.0-20230308153949-c33506a7aa26/go.mod h1:2m8ukndOegwB0PU0AfJCwDUQHqd7QQRlSXvQL5VToVY= -github.com/celestiaorg/nmt v0.22.0 h1:AGtfmBiVgreR1KkIV5R7XFNeMp/H4IUDLlBbLjZZ3zk= -github.com/celestiaorg/nmt v0.22.0/go.mod h1:ia/EpCk0enD5yO5frcxoNoFToz2Ghtk2i+blmCRjIY8= +github.com/celestiaorg/nmt v0.22.1 h1:t7fqoP5MJ8mBns5DB2XjfcPxQpS3CKMkY+v+BEkDxYc= +github.com/celestiaorg/nmt v0.22.1/go.mod h1:ia/EpCk0enD5yO5frcxoNoFToz2Ghtk2i+blmCRjIY8= github.com/celestiaorg/rsmt2d v0.13.1 h1:eRhp79DKTkDojwInKVs1lRK6f6zJc1BVlmZfUfI19yQ= github.com/celestiaorg/rsmt2d v0.13.1/go.mod h1:P7t92OATXbBmc/P5uR+GCOBv+PV8wLb0vU32ucrb148= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= From 77d04779f81216015220ab5f0c3c835ee4a73f63 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 2 Aug 2024 13:39:52 -0400 Subject: [PATCH 74/75] revert: convert refactor --- nodebuilder/tests/da_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nodebuilder/tests/da_test.go b/nodebuilder/tests/da_test.go index c67c5f61a7..292227881d 100644 --- a/nodebuilder/tests/da_test.go +++ b/nodebuilder/tests/da_test.go @@ -38,7 +38,11 @@ func TestDaModule(t *testing.T) { daBlobs := make([][]byte, 0, len(appBlobs0)+len(appBlobs1)) for _, squareBlob := range append(appBlobs0, appBlobs1...) { - blob, err := convert(squareBlob) + blob, err := blob.NewBlob( + uint8(squareBlob.GetShareVersion()), + squareBlob.Namespace().Bytes(), + squareBlob.GetData(), + ) require.NoError(t, err) blobs = append(blobs, blob) daBlobs = append(daBlobs, blob.Data) From 167496a6020c8525ea59660a7ed3ef373255fa11 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Mon, 5 Aug 2024 13:42:18 -0400 Subject: [PATCH 75/75] refactor: remove overflow check inside convertBlobs --- blob/blob_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/blob/blob_test.go b/blob/blob_test.go index f008cd9cf6..d747090758 100644 --- a/blob/blob_test.go +++ b/blob/blob_test.go @@ -2,8 +2,6 @@ package blob import ( "bytes" - "fmt" - "math" "testing" "github.com/stretchr/testify/assert" @@ -101,9 +99,6 @@ func TestBlob(t *testing.T) { func convertBlobs(appBlobs ...*blob.Blob) ([]*Blob, error) { blobs := make([]*Blob, 0, len(appBlobs)) for _, appBlob := range appBlobs { - if shareVersion := appBlob.GetShareVersion(); shareVersion > math.MaxUint8 { - return nil, fmt.Errorf("share version %d is greater than max share version %d", shareVersion, math.MaxUint8) - } blob, err := NewBlob(uint8(appBlob.GetShareVersion()), appBlob.Namespace().Bytes(), appBlob.GetData()) if err != nil { return nil, err