Skip to content

Commit 7259cbd

Browse files
Marko BaricevicMarko Baricevic
authored andcommitted
Merge branch 'main' into marko/kill_tendermint
2 parents 730e445 + 6d9c6c0 commit 7259cbd

7 files changed

Lines changed: 35 additions & 33 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
**/**.go
2424
go.mod
2525
go.sum
26-
- uses: golangci/golangci-lint-action@v6.3.2
26+
- uses: golangci/golangci-lint-action@v6.5.0
2727
with:
2828
version: latest
2929
args: --timeout 10m

go.mod

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,25 @@ require (
88
github.com/BurntSushi/toml v1.4.0
99
github.com/btcsuite/btcd/btcec/v2 v2.3.4
1010
github.com/celestiaorg/go-header v0.6.4
11-
github.com/celestiaorg/utils v0.1.0
1211
github.com/cometbft/cometbft v0.38.15
1312
github.com/cosmos/gogoproto v1.7.0
1413
github.com/go-kit/kit v0.13.0
1514
github.com/gogo/protobuf v1.3.2
1615
github.com/gorilla/rpc v1.2.1
1716
github.com/gorilla/websocket v1.5.3
18-
github.com/ipfs/go-datastore v0.6.0
17+
github.com/ipfs/go-datastore v0.7.0
1918
github.com/ipfs/go-ds-badger4 v0.1.5
2019
github.com/ipfs/go-log v1.0.5
2120
github.com/libp2p/go-libp2p v0.38.2
2221
github.com/libp2p/go-libp2p-kad-dht v0.29.0
2322
github.com/libp2p/go-libp2p-pubsub v0.13.0
2423
github.com/mitchellh/mapstructure v1.5.0
2524
github.com/multiformats/go-multiaddr v0.14.0
26-
github.com/prometheus/client_golang v1.20.5
25+
github.com/prometheus/client_golang v1.21.0
2726
github.com/rollkit/go-da v0.9.0
2827
github.com/rollkit/go-sequencing v0.4.1
2928
github.com/rs/cors v1.11.1
30-
github.com/spf13/cobra v1.8.1
29+
github.com/spf13/cobra v1.9.1
3130
github.com/spf13/viper v1.19.0
3231
github.com/stretchr/testify v1.10.0
3332
golang.org/x/net v0.35.0
@@ -51,7 +50,7 @@ require (
5150
github.com/cometbft/cometbft-db v0.14.1 // indirect
5251
github.com/containerd/cgroups v1.1.0 // indirect
5352
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
54-
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
53+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
5554
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5655
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
5756
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
@@ -181,7 +180,7 @@ require (
181180
github.com/spaolacci/murmur3 v1.1.0 // indirect
182181
github.com/spf13/afero v1.11.0 // indirect
183182
github.com/spf13/cast v1.6.0 // indirect
184-
github.com/spf13/pflag v1.0.5 // indirect
183+
github.com/spf13/pflag v1.0.6 // indirect
185184
github.com/stretchr/objx v0.5.2 // indirect
186185
github.com/subosito/gotenv v1.6.0 // indirect
187186
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect

go.sum

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ github.com/celestiaorg/go-header v0.6.4 h1:3kXi7N3qBc4SCmT+tNVWhLi0Ilw5e/7qq2cxV
116116
github.com/celestiaorg/go-header v0.6.4/go.mod h1:Az4S4NxMOJ1eAzOaF8u5AZt5UzsSzg92uqpdXS3yOZE=
117117
github.com/celestiaorg/go-libp2p-messenger v0.2.0 h1:/0MuPDcFamQMbw9xTZ73yImqgTO3jHV7wKHvWD/Irao=
118118
github.com/celestiaorg/go-libp2p-messenger v0.2.0/go.mod h1:s9PIhMi7ApOauIsfBcQwbr7m+HBzmVfDIS+QLdgzDSo=
119-
github.com/celestiaorg/utils v0.1.0 h1:WsP3O8jF7jKRgLNFmlDCwdThwOFMFxg0MnqhkLFVxPo=
120-
github.com/celestiaorg/utils v0.1.0/go.mod h1:vQTh7MHnvpIeCQZ2/Ph+w7K1R2UerDheZbgJEJD2hSU=
121119
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
122120
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
123121
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -182,8 +180,8 @@ github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgb
182180
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
183181
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
184182
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
185-
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
186-
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
183+
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
184+
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
187185
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
188186
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
189187
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -467,8 +465,8 @@ github.com/ipfs/go-cid v0.5.0 h1:goEKKhaGm0ul11IHA7I6p1GmKz8kEYniqFopaB5Otwg=
467465
github.com/ipfs/go-cid v0.5.0/go.mod h1:0L7vmeNXpQpUS9vt+yEARkJ8rOg43DF3iPgn4GIN0mk=
468466
github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk=
469467
github.com/ipfs/go-datastore v0.5.1/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk=
470-
github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk=
471-
github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8=
468+
github.com/ipfs/go-datastore v0.7.0 h1:a6JMuRFKYhw6XXmIVoTthF8ZFm4QQXvLDXFhXRVv8Go=
469+
github.com/ipfs/go-datastore v0.7.0/go.mod h1:ucOWMfbOPI6ZEyaIB1q/+78RPLBPERfuUVYX1EPnNpQ=
472470
github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=
473471
github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=
474472
github.com/ipfs/go-ds-badger v0.3.0/go.mod h1:1ke6mXNqeV8K3y5Ak2bAA0osoTfmxUdupVCGm4QUIek=
@@ -955,8 +953,8 @@ github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66Id
955953
github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU=
956954
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
957955
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
958-
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
959-
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
956+
github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA=
957+
github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
960958
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
961959
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
962960
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -1083,13 +1081,13 @@ github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
10831081
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
10841082
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
10851083
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
1086-
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
1087-
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
1084+
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
1085+
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
10881086
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
10891087
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
10901088
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
1091-
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1092-
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1089+
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
1090+
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
10931091
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
10941092
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
10951093
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=

node/full_node_integration_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
cryptoenc "github.com/cometbft/cometbft/crypto/encoding"
1919
"github.com/stretchr/testify/assert"
2020

21-
testutils "github.com/celestiaorg/utils/test"
2221
abci "github.com/cometbft/cometbft/abci/types"
2322
"github.com/cometbft/cometbft/libs/log"
2423
"github.com/cometbft/cometbft/proxy"
@@ -284,7 +283,7 @@ func TestFastDASync(t *testing.T) {
284283
// Check that the nodes are synced in a loop. We don't use the helper
285284
// function here so that we can catch if the channel is closed to exit
286285
// the test quickly.
287-
require.NoError(testutils.Retry(300, 100*time.Millisecond, func() error {
286+
require.NoError(Retry(300, 100*time.Millisecond, func() error {
288287
select {
289288
case <-ch:
290289
require.FailNow("channel closed")
@@ -509,7 +508,7 @@ func TestSubmitBlocksToDA(t *testing.T) {
509508

510509
//Make sure all produced blocks made it to DA
511510
for i := uint64(1); i <= numberOfBlocksToSyncTill; i++ {
512-
require.NoError(testutils.Retry(300, 100*time.Millisecond, func() error {
511+
require.NoError(Retry(300, 100*time.Millisecond, func() error {
513512
header, _, err := seq.Store.GetBlockData(ctx, i)
514513
if err != nil {
515514
return err
@@ -962,7 +961,7 @@ func startNodes(nodes []*FullNode, apps []*mocks.Application, t *testing.T) {
962961
// We don't need to check any specific arguments to FinalizeBlock
963962
// so just use a function that returns "true" for matching the args
964963
matcher := mock.MatchedBy(func(i interface{}) bool { return true })
965-
err := testutils.Retry(300, 100*time.Millisecond, func() error {
964+
err := Retry(300, 100*time.Millisecond, func() error {
966965
for i := 0; i < len(apps); i++ {
967966
if !apps[i].AssertCalled(m, "FinalizeBlock", matcher, matcher) {
968967
return errors.New("FinalizeBlock hasn't been called yet")

node/full_node_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ import (
2525
"github.com/libp2p/go-libp2p/core/crypto"
2626
"github.com/libp2p/go-libp2p/core/peer"
2727

28-
testutils "github.com/celestiaorg/utils/test"
29-
3028
goDA "github.com/rollkit/go-da"
3129
damock "github.com/rollkit/go-da/mocks"
3230
"github.com/rollkit/rollkit/block"
@@ -535,7 +533,7 @@ func verifyTransactions(node *FullNode, peerID peer.ID, t *testing.T) {
535533

536534
// verifyMempoolSize checks if the mempool size is as expected
537535
func verifyMempoolSize(node *FullNode, t *testing.T) {
538-
assert.NoError(t, testutils.Retry(300, 100*time.Millisecond, func() error {
536+
assert.NoError(t, Retry(300, 100*time.Millisecond, func() error {
539537
expectedSize := uint64(4 * len("tx*"))
540538
actualSize := uint64(node.Mempool.SizeBytes())
541539
if expectedSize == actualSize {

node/helpers.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import (
66
"testing"
77
"time"
88

9-
testutils "github.com/celestiaorg/utils/test"
10-
119
"github.com/rollkit/rollkit/config"
1210
)
1311

@@ -105,7 +103,7 @@ func safeClose(ch chan struct{}) {
105103
}
106104

107105
func verifyNodesSynced(node1, node2 Node, source Source) error {
108-
return testutils.Retry(300, 100*time.Millisecond, func() error {
106+
return Retry(300, 100*time.Millisecond, func() error {
109107
n1Height, err := getNodeHeight(node1, source)
110108
if err != nil {
111109
return err
@@ -122,7 +120,7 @@ func verifyNodesSynced(node1, node2 Node, source Source) error {
122120
}
123121

124122
func waitForAtLeastNBlocks(node Node, n int, source Source) error {
125-
return testutils.Retry(300, 100*time.Millisecond, func() error {
123+
return Retry(300, 100*time.Millisecond, func() error {
126124
nHeight, err := getNodeHeight(node, source)
127125
if err != nil {
128126
return err
@@ -135,10 +133,21 @@ func waitForAtLeastNBlocks(node Node, n int, source Source) error {
135133
}
136134

137135
func waitUntilBlockHashSeen(node Node, blockHash string) error {
138-
return testutils.Retry(300, 100*time.Millisecond, func() error {
136+
return Retry(300, 100*time.Millisecond, func() error {
139137
if isBlockHashSeen(node, blockHash) {
140138
return nil
141139
}
142140
return fmt.Errorf("block hash %v not seen", blockHash)
143141
})
144142
}
143+
144+
func Retry(tries int, durationBetweenAttempts time.Duration, fn func() error) (err error) {
145+
for i := 1; i < tries; i++ {
146+
err = fn()
147+
if err == nil {
148+
return nil
149+
}
150+
time.Sleep(durationBetweenAttempts)
151+
}
152+
return fn()
153+
}

node/helpers_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"testing"
99
"time"
1010

11-
testutils "github.com/celestiaorg/utils/test"
1211
"github.com/cometbft/cometbft/libs/log"
1312
"github.com/libp2p/go-libp2p/core/crypto"
1413
"github.com/stretchr/testify/require"
@@ -64,7 +63,7 @@ func TestGetNodeHeight(t *testing.T) {
6463

6564
for _, tc := range cases {
6665
t.Run(tc.desc, func(t *testing.T) {
67-
require.NoError(testutils.Retry(1000, 100*time.Millisecond, func() error {
66+
require.NoError(Retry(1000, 100*time.Millisecond, func() error {
6867
num, err := getNodeHeight(tc.node, tc.source)
6968
if err != nil {
7069
return err

0 commit comments

Comments
 (0)