From 98163d67d415401e345b91af2bccaeda041e72e6 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Thu, 22 Aug 2024 18:13:04 +0200 Subject: [PATCH] rollback to openrpc v0.3.0 --- da/celestia/celestia.go | 21 +++++++----- da/celestia/celestia_test.go | 4 +-- da/celestia/rpc.go | 10 +++--- da/celestia/rpc_test.go | 4 +-- da/celestia/types/rpc.go | 10 +++--- da/da.go | 2 +- go.mod | 8 ++--- go.sum | 34 +++++++++---------- .../celestia/types/mock_CelestiaRPCClient.go | 25 +++++++------- 9 files changed, 61 insertions(+), 57 deletions(-) diff --git a/da/celestia/celestia.go b/da/celestia/celestia.go index 4ae2a959f..9a26d9333 100644 --- a/da/celestia/celestia.go +++ b/da/celestia/celestia.go @@ -9,15 +9,15 @@ import ( "time" "github.com/avast/retry-go/v4" - "github.com/celestiaorg/celestia-openrpc/types/blob" - "github.com/celestiaorg/celestia-openrpc/types/header" "github.com/celestiaorg/nmt" "github.com/dymensionxyz/gerr-cosmos/gerrc" "github.com/gogo/protobuf/proto" + "github.com/rollkit/celestia-openrpc/types/blob" + "github.com/rollkit/celestia-openrpc/types/header" "github.com/tendermint/tendermint/libs/pubsub" - openrpc "github.com/celestiaorg/celestia-openrpc" - "github.com/celestiaorg/celestia-openrpc/types/share" + openrpc "github.com/rollkit/celestia-openrpc" + "github.com/rollkit/celestia-openrpc/types/share" "github.com/dymensionxyz/dymint/da" celtypes "github.com/dymensionxyz/dymint/da/celestia/types" @@ -110,9 +110,9 @@ func createConfig(bz []byte) (c Config, err error) { return c, fmt.Errorf("init namespace id: %w", err) } - if c.GasPrices == 0 { + /*if c.GasPrices == 0 { return c, errors.New("gas prices must be set") - } + }*/ // NOTE: 0 is valid value for RetryAttempts @@ -548,7 +548,7 @@ func (c *DataAvailabilityLayerClient) submit(daBlob da.Blob) (uint64, da.Commitm ctx, cancel := context.WithTimeout(c.ctx, c.config.Timeout) defer cancel() - height, err := c.rpc.Submit(ctx, blobs, blob.NewSubmitOptions()) + height, err := c.rpc.Submit(ctx, blobs, openrpc.DefaultSubmitOptions()) if err != nil { return 0, nil, fmt.Errorf("do rpc submit: %w", err) } @@ -577,8 +577,11 @@ func (c *DataAvailabilityLayerClient) blobsAndCommitments(daBlob da.Blob) ([]*bl return nil, nil, err } blobs = append(blobs, b) - - commitments = append(commitments, b.Commitment) + commitment, err := blob.CreateCommitment(b) + if err != nil { + return nil, nil, fmt.Errorf("create commitment: %w", err) + } + commitments = append(commitments, commitment) return blobs, commitments, nil } diff --git a/da/celestia/celestia_test.go b/da/celestia/celestia_test.go index 862832e3b..860165d82 100644 --- a/da/celestia/celestia_test.go +++ b/da/celestia/celestia_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/celestiaorg/celestia-openrpc/types/blob" - "github.com/celestiaorg/celestia-openrpc/types/header" "github.com/celestiaorg/nmt" + "github.com/rollkit/celestia-openrpc/types/blob" + "github.com/rollkit/celestia-openrpc/types/header" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/da/celestia/rpc.go b/da/celestia/rpc.go index 74673e6a6..a7ab03b84 100644 --- a/da/celestia/rpc.go +++ b/da/celestia/rpc.go @@ -3,10 +3,10 @@ package celestia import ( "context" - openrpc "github.com/celestiaorg/celestia-openrpc" - "github.com/celestiaorg/celestia-openrpc/types/blob" - "github.com/celestiaorg/celestia-openrpc/types/header" - "github.com/celestiaorg/celestia-openrpc/types/share" + openrpc "github.com/rollkit/celestia-openrpc" + "github.com/rollkit/celestia-openrpc/types/blob" + "github.com/rollkit/celestia-openrpc/types/header" + "github.com/rollkit/celestia-openrpc/types/share" "github.com/dymensionxyz/dymint/da/celestia/types" ) @@ -31,7 +31,7 @@ func (c *OpenRPC) GetAll(ctx context.Context, height uint64, namespaces []share. } // Submit blobs. -func (c *OpenRPC) Submit(ctx context.Context, blobs []*blob.Blob, options *blob.SubmitOptions) (uint64, error) { +func (c *OpenRPC) Submit(ctx context.Context, blobs []*blob.Blob, options *openrpc.SubmitOptions) (uint64, error) { return c.rpc.Blob.Submit(ctx, blobs, options) } diff --git a/da/celestia/rpc_test.go b/da/celestia/rpc_test.go index 7b6f9eee6..ae6564a2a 100644 --- a/da/celestia/rpc_test.go +++ b/da/celestia/rpc_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/celestiaorg/celestia-openrpc/types/blob" - "github.com/celestiaorg/celestia-openrpc/types/header" uretry "github.com/dymensionxyz/dymint/utils/retry" + "github.com/rollkit/celestia-openrpc/types/blob" + "github.com/rollkit/celestia-openrpc/types/header" "github.com/dymensionxyz/dymint/da" "github.com/dymensionxyz/dymint/da/celestia" diff --git a/da/celestia/types/rpc.go b/da/celestia/types/rpc.go index efde9c9a4..f86e0446a 100644 --- a/da/celestia/types/rpc.go +++ b/da/celestia/types/rpc.go @@ -3,9 +3,11 @@ package types import ( "context" - "github.com/celestiaorg/celestia-openrpc/types/blob" - "github.com/celestiaorg/celestia-openrpc/types/header" - "github.com/celestiaorg/celestia-openrpc/types/share" + openrpc "github.com/rollkit/celestia-openrpc" + + "github.com/rollkit/celestia-openrpc/types/blob" + "github.com/rollkit/celestia-openrpc/types/header" + "github.com/rollkit/celestia-openrpc/types/share" ) type CelestiaRPCClient interface { @@ -14,7 +16,7 @@ type CelestiaRPCClient interface { GetAll(context.Context, uint64, []share.Namespace) ([]*blob.Blob, error) GetProof(ctx context.Context, height uint64, namespace share.Namespace, commitment blob.Commitment) (*blob.Proof, error) Included(ctx context.Context, height uint64, namespace share.Namespace, proof *blob.Proof, commitment blob.Commitment) (bool, error) - Submit(ctx context.Context, blobs []*blob.Blob, options *blob.SubmitOptions) (uint64, error) + Submit(ctx context.Context, blobs []*blob.Blob, options *openrpc.SubmitOptions) (uint64, error) /* --------------------------------- header --------------------------------- */ GetByHeight(ctx context.Context, height uint64) (*header.ExtendedHeader, error) diff --git a/da/da.go b/da/da.go index 1d0a7de6e..692e84e5c 100644 --- a/da/da.go +++ b/da/da.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - "github.com/celestiaorg/celestia-openrpc/types/blob" "github.com/cometbft/cometbft/crypto/merkle" "github.com/dymensionxyz/dymint/store" "github.com/dymensionxyz/dymint/types" + "github.com/rollkit/celestia-openrpc/types/blob" "github.com/tendermint/tendermint/libs/pubsub" ) diff --git a/go.mod b/go.mod index 7a7b5beb9..e43aef653 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.4 require ( cosmossdk.io/errors v1.0.1 github.com/avast/retry-go/v4 v4.5.0 - github.com/celestiaorg/celestia-openrpc v0.4.0-rc.1 + github.com/celestiaorg/celestia-openrpc v0.4.0 github.com/celestiaorg/go-cnc v0.4.2 github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12 github.com/cosmos/cosmos-sdk v0.46.16 @@ -30,6 +30,7 @@ require ( github.com/libp2p/go-libp2p-routing-helpers v0.7.3 github.com/multiformats/go-multiaddr v0.12.2 github.com/prometheus/client_golang v1.18.0 + github.com/rollkit/celestia-openrpc v0.0.0-00010101000000-000000000000 github.com/rs/cors v1.9.0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.15.0 @@ -43,8 +44,6 @@ require ( ) require ( - github.com/celestiaorg/go-square v1.0.1 // indirect - github.com/celestiaorg/go-square/merkle v0.0.0-20240429192549-dea967e1533b // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/ipfs/go-block-format v0.2.0 // indirect @@ -292,12 +291,13 @@ require ( ) replace ( - github.com/celestiaorg/celestia-openrpc => ../../celestia/celestia-openrpc github.com/centrifuge/go-substrate-rpc-client/v4 => github.com/availproject/go-substrate-rpc-client/v4 v4.0.12-avail-1.4.0-rc1-5e286e3 github.com/evmos/evmos/v12 => github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.3 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4 github.com/gorilla/rpc => github.com/dymensionxyz/rpc v1.3.1 + github.com/rollkit/celestia-openrpc => github.com/celestiaorg/celestia-openrpc v0.3.0 github.com/tendermint/tendermint => github.com/dymensionxyz/cometbft v0.34.29-0.20240807121422-5299b866061c + ) replace github.com/osmosis-labs/osmosis/v15 => github.com/dymensionxyz/osmosis/v15 v15.2.0-dymension-v1.1.2 diff --git a/go.sum b/go.sum index f56318d4c..535b24c4e 100644 --- a/go.sum +++ b/go.sum @@ -149,18 +149,16 @@ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/celestiaorg/celestia-openrpc v0.4.1-0.20240814133318-48e1a5ce1765 h1:NAjhu070wNJ8AnnrtyKqRdDQf+GkU+HrVzGehJDl0kQ= -github.com/celestiaorg/celestia-openrpc v0.4.1-0.20240814133318-48e1a5ce1765/go.mod h1:1k214DI2RlnkyYHYILZd6gY9wW2FNeDPrLvY2rmYLVs= +github.com/celestiaorg/celestia-openrpc v0.3.0 h1:/0lzmgg1v/9ONwFs9fNVti3x11kI/Sk87dsYLcms43Q= +github.com/celestiaorg/celestia-openrpc v0.3.0/go.mod h1:2ZhU01YF2hsHIROWzxfMZOYM09Kgyy4roH5JWoNJzp0= +github.com/celestiaorg/celestia-openrpc v0.4.0 h1:yJP3y0V1f+2494KXkELxz6hXNFxhdHMkGqGLnoE/iK0= +github.com/celestiaorg/celestia-openrpc v0.4.0/go.mod h1:/c3s26V6GaQg4v4tR+tErM15n5Uo5M++1H+Bd1spIo8= github.com/celestiaorg/go-cnc v0.4.2 h1:7ixf3tevMB7Lvz2mbyRG0ZOK+8qoPm7wNhdgpi8VreU= github.com/celestiaorg/go-cnc v0.4.2/go.mod h1:zYzvHudSd1iNPuHBMyvZ1YvWou5aT9JXgtch9Tkaf70= github.com/celestiaorg/go-fraud v0.2.0 h1:aaq2JiW0gTnhEdac3l51UCqSyJ4+VjFGTTpN83V4q7I= github.com/celestiaorg/go-fraud v0.2.0/go.mod h1:lNY1i4K6kUeeE60Z2VK8WXd+qXb8KRzfBhvwPkK6aUc= github.com/celestiaorg/go-header v0.4.1 h1:bjbUcKDnhrJJ9EoE7vtPpgleNLVjc2S+cB4/qe8nQmo= github.com/celestiaorg/go-header v0.4.1/go.mod h1:H8xhnDLDLbkpwmWPhCaZyTnIV3dlVxBHPnxNXS2Qu6c= -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-20240429192549-dea967e1533b h1:jo6M4RJnr33sQC/TTraP5gA6ZgbFO/QqzX8e/lIQC7Q= -github.com/celestiaorg/go-square/merkle v0.0.0-20240429192549-dea967e1533b/go.mod h1:86qIYnEhmn/hfW+xvw98NOI3zGaDEB3x8JGjYo2FqLs= github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 h1:CJdIpo8n5MFP2MwK0gSRcOVlDlFdQJO1p+FqdxYzmvc= github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4/go.mod h1:fzuHnhzj1pUygGz+1ZkB3uQbEUL4htqCGJ4Qs2LwMZA= github.com/celestiaorg/nmt v0.21.0 h1:81MBqxNn3orByoiCtdNVjwi5WsLgMkzHwP02ZMhTBHM= @@ -214,8 +212,8 @@ github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= +github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -289,10 +287,10 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= -github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= -github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM= +github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= +github.com/docker/docker v24.0.2+incompatible/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-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -577,8 +575,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ignite/cli v0.26.1 h1:T4qMjM9H38JOBsgCruilGcsfrlDGHO2K1V88gIe0ubs= github.com/ignite/cli v0.26.1/go.mod h1:0BQcJCseK0O5RG8HYP/lvVTFbZQjkw+AY8B+wDklj38= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -755,8 +753,8 @@ github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -821,8 +819,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 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/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= -github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= +github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= diff --git a/mocks/github.com/dymensionxyz/dymint/da/celestia/types/mock_CelestiaRPCClient.go b/mocks/github.com/dymensionxyz/dymint/da/celestia/types/mock_CelestiaRPCClient.go index 4935cc66a..a0b2778ec 100644 --- a/mocks/github.com/dymensionxyz/dymint/da/celestia/types/mock_CelestiaRPCClient.go +++ b/mocks/github.com/dymensionxyz/dymint/da/celestia/types/mock_CelestiaRPCClient.go @@ -3,15 +3,16 @@ package types import ( - context "context" + client "github.com/rollkit/celestia-openrpc" + blob "github.com/rollkit/celestia-openrpc/types/blob" - blob "github.com/celestiaorg/celestia-openrpc/types/blob" + context "context" - header "github.com/celestiaorg/celestia-openrpc/types/header" + header "github.com/rollkit/celestia-openrpc/types/header" mock "github.com/stretchr/testify/mock" - share "github.com/celestiaorg/celestia-openrpc/types/share" + share "github.com/rollkit/celestia-openrpc/types/share" ) // MockCelestiaRPCClient is an autogenerated mock type for the CelestiaRPCClient type @@ -329,7 +330,7 @@ func (_c *MockCelestiaRPCClient_Included_Call) RunAndReturn(run func(context.Con } // Submit provides a mock function with given fields: ctx, blobs, options -func (_m *MockCelestiaRPCClient) Submit(ctx context.Context, blobs []*blob.Blob, options *blob.SubmitOptions) (uint64, error) { +func (_m *MockCelestiaRPCClient) Submit(ctx context.Context, blobs []*blob.Blob, options *client.SubmitOptions) (uint64, error) { ret := _m.Called(ctx, blobs, options) if len(ret) == 0 { @@ -338,16 +339,16 @@ func (_m *MockCelestiaRPCClient) Submit(ctx context.Context, blobs []*blob.Blob, var r0 uint64 var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []*blob.Blob, *blob.SubmitOptions) (uint64, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, []*blob.Blob, *client.SubmitOptions) (uint64, error)); ok { return rf(ctx, blobs, options) } - if rf, ok := ret.Get(0).(func(context.Context, []*blob.Blob, *blob.SubmitOptions) uint64); ok { + if rf, ok := ret.Get(0).(func(context.Context, []*blob.Blob, *client.SubmitOptions) uint64); ok { r0 = rf(ctx, blobs, options) } else { r0 = ret.Get(0).(uint64) } - if rf, ok := ret.Get(1).(func(context.Context, []*blob.Blob, *blob.SubmitOptions) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, []*blob.Blob, *client.SubmitOptions) error); ok { r1 = rf(ctx, blobs, options) } else { r1 = ret.Error(1) @@ -364,14 +365,14 @@ type MockCelestiaRPCClient_Submit_Call struct { // Submit is a helper method to define mock.On call // - ctx context.Context // - blobs []*blob.Blob -// - options *blob.SubmitOptions +// - options *client.SubmitOptions func (_e *MockCelestiaRPCClient_Expecter) Submit(ctx interface{}, blobs interface{}, options interface{}) *MockCelestiaRPCClient_Submit_Call { return &MockCelestiaRPCClient_Submit_Call{Call: _e.mock.On("Submit", ctx, blobs, options)} } -func (_c *MockCelestiaRPCClient_Submit_Call) Run(run func(ctx context.Context, blobs []*blob.Blob, options *blob.SubmitOptions)) *MockCelestiaRPCClient_Submit_Call { +func (_c *MockCelestiaRPCClient_Submit_Call) Run(run func(ctx context.Context, blobs []*blob.Blob, options *client.SubmitOptions)) *MockCelestiaRPCClient_Submit_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]*blob.Blob), args[2].(*blob.SubmitOptions)) + run(args[0].(context.Context), args[1].([]*blob.Blob), args[2].(*client.SubmitOptions)) }) return _c } @@ -381,7 +382,7 @@ func (_c *MockCelestiaRPCClient_Submit_Call) Return(_a0 uint64, _a1 error) *Mock return _c } -func (_c *MockCelestiaRPCClient_Submit_Call) RunAndReturn(run func(context.Context, []*blob.Blob, *blob.SubmitOptions) (uint64, error)) *MockCelestiaRPCClient_Submit_Call { +func (_c *MockCelestiaRPCClient_Submit_Call) RunAndReturn(run func(context.Context, []*blob.Blob, *client.SubmitOptions) (uint64, error)) *MockCelestiaRPCClient_Submit_Call { _c.Call.Return(run) return _c }