Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 2abf2f1

Browse files
authored
chore: update dependabot.yml (#9)
* chore: update dependabot.yml * chore: fix markdownlint errors * chore: update golangci.yml and fix errors
1 parent 71d218a commit 2abf2f1

9 files changed

Lines changed: 52 additions & 25 deletions

File tree

.github/dependabot.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ updates:
77
open-pull-requests-limit: 10
88
labels:
99
- T:dependencies
10+
# Group all patch updates into a single PR
11+
groups:
12+
patch-updates:
13+
applies-to: version-updates
14+
update-types:
15+
- "patch"
1016
- package-ecosystem: gomod
1117
directory: "/"
1218
schedule:
13-
interval: weekly
14-
open-pull-requests-limit: 10
15-
labels:
16-
- T:dependencies
17-
- package-ecosystem: docker
18-
directory: "/docker"
19-
schedule:
20-
interval: weekly
19+
interval: daily
2120
open-pull-requests-limit: 10
2221
labels:
2322
- T:dependencies
23+
# Group all patch updates into a single PR
24+
groups:
25+
patch-updates:
26+
applies-to: version-updates
27+
update-types:
28+
- "patch"

.golangci.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44

55
linters:
66
enable:
7-
- deadcode
7+
- errorlint
88
- errcheck
99
- gofmt
1010
- goimports
@@ -15,18 +15,26 @@ linters:
1515
- misspell
1616
- revive
1717
- staticcheck
18-
- structcheck
1918
- typecheck
19+
- unconvert
2020
- unused
21-
- varcheck
2221

2322
issues:
2423
exclude-use-default: false
24+
# mempool and indexer code is borrowed from Tendermint
25+
exclude-dirs:
26+
- mempool
27+
- state/indexer
28+
- state/txindex
29+
- third_party
2530
include:
26-
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment.
27-
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment.
31+
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
32+
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments
2833

2934
linters-settings:
35+
gosec:
36+
excludes:
37+
- G115
3038
revive:
3139
rules:
3240
- name: package-comments

.yamllint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# Built from docs https://yamllint.readthedocs.io/en/stable/configuration.html
3+
extends: default
4+
5+
rules:
6+
# 120 chars should be enough, but don't fail if a line is longer
7+
line-length:
8+
max: 120
9+
level: warning

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ lint: vet
4646
@golangci-lint run
4747
@echo "--> Running markdownlint"
4848
@markdownlint --config .markdownlint.yaml '**/*.md'
49-
@echo "--> Running hadolint"
50-
@hadolint docker/mockserv.Dockerfile
5149
@echo "--> Running yamllint"
5250
@yamllint --no-warnings . -c .yamllint.yml
5351

@@ -57,6 +55,8 @@ lint: vet
5755
fmt:
5856
@echo "--> Formatting markdownlint"
5957
@markdownlint --config .markdownlint.yaml '**/*.md' -f
58+
@echo "--> Formatting go"
59+
@golangci-lint run --fix
6060
.PHONY: fmt
6161

6262
## vet: Run go vet

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,22 @@ make build
2929

3030
## Usage
3131

32-
centralized-sequencer exposes a gRPC service that can be used with any gRPC client to
33-
sequence rollup transactions to the celestia network.
32+
centralized-sequencer exposes a gRPC service that can be used with any gRPC
33+
client to sequence rollup transactions to the celestia network.
3434

3535
## Example
3636

3737
Run centralized-sequencer by specifying DA network details:
3838

39+
<!-- markdownlint-disable MD013 -->
3940
```sh
4041
./build/centralized-sequencer -da_address <da_address> -da_auth_token <da_auth_token> -da_namespace $(openssl rand -hex 10)
4142
```
43+
<!-- markdownlint-enable MD013 -->
4244

4345
## Flags
4446

47+
<!-- markdownlint-disable MD013 -->
4548
| Flag | Usage | Default |
4649
| ---------------------------- |-----------------------------------------|-----------------------------|
4750
| `batch-time` | time in seconds to wait before generating a new batch | 2 seconds |
@@ -51,6 +54,7 @@ Run centralized-sequencer by specifying DA network details:
5154
| `host` | centralized sequencer host | localhost |
5255
| `port` | centralized sequencer port | 50051 |
5356
| `listen-all` |listen on all network interfaces (0.0.0.0) instead of just localhost|disabled|
57+
<!-- markdownlint-enable MD013 -->
5458

5559
See `./build/centralized-sequencer --help` for details.
5660

@@ -83,8 +87,8 @@ We welcome your contributions! Everyone is welcome to contribute, whether it's
8387
in the form of code, documentation, bug reports, feature
8488
requests, or anything else.
8589

86-
If you're looking for issues to work on, try looking at the
87-
[good first issue list](https://github.com/rollkit/centralized-sequencer/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
90+
If you're looking for issues to work on, try looking at the [good first issue
91+
list](https://github.com/rollkit/centralized-sequencer/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
8892
Issues with this tag are suitable for a new external contributor and is a great
8993
way to find something you can help with!
9094

@@ -94,4 +98,4 @@ to ask questions, discuss your ideas, and connect with other contributors.
9498

9599
## Code of Conduct
96100

97-
See our Code of Conduct [here](https://docs.celestia.org/community/coc).
101+
See our Code of Conduct [here](https://docs.celestia.org/community/coc).

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/rollkit/go-da v0.5.0
1111
github.com/rollkit/go-sequencing v0.0.0-20240906080441-430ed2125493
1212
github.com/rollkit/rollkit v0.13.6
13+
github.com/stretchr/testify v1.9.0
1314
)
1415

1516
require (
@@ -71,7 +72,6 @@ require (
7172
github.com/prometheus/procfs v0.12.0 // indirect
7273
github.com/sasha-s/go-deadlock v0.3.1 // indirect
7374
github.com/spaolacci/murmur3 v1.1.0 // indirect
74-
github.com/stretchr/testify v1.9.0 // indirect
7575
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
7676
go.etcd.io/bbolt v1.3.7 // indirect
7777
go.opencensus.io v0.24.0 // indirect

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
const (
1919
defaultHost = "localhost"
2020
defaultPort = "50051"
21-
defaultBatchTime = time.Duration(2 * time.Second)
21+
defaultBatchTime = 2 * time.Second
2222
defaultDA = "http://localhost:26658"
2323
)
2424

sequencing/sequencer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func NewSequencer(daAddress, daAuthToken string, daNamespace []byte, batchTime t
132132
if err != nil {
133133
return nil, fmt.Errorf("error while establishing connection to DA layer: %w", err)
134134
}
135-
dalc := da.NewDAClient(dac, -1, 0, goda.Namespace(daNamespace))
135+
dalc := da.NewDAClient(dac, -1, 0, goda.Namespace(daNamespace)) // nolint:unconvert
136136
maxBlobSize, err := dalc.DA.MaxBlobSize(ctx)
137137
if err != nil {
138138
return nil, err

sequencing/sequencer_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import (
77
"testing"
88
"time"
99

10+
"github.com/stretchr/testify/assert"
11+
"github.com/stretchr/testify/require"
12+
1013
proxy "github.com/rollkit/go-da/proxy/jsonrpc"
1114
goDATest "github.com/rollkit/go-da/test"
1215
"github.com/rollkit/go-sequencing"
13-
"github.com/stretchr/testify/assert"
14-
"github.com/stretchr/testify/require"
1516
)
1617

1718
const (

0 commit comments

Comments
 (0)