Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat pubsub 125 #129

Merged
merged 16 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
faefb92
✨ feat(pubsub): add internal pubsub and lots of refactor >>> ⏰ 2d
logicalangel Apr 17, 2024
d6cd76f
✨ feat(pubsub): ability to send messages based on channels and sub-ch…
logicalangel Apr 22, 2024
bc0e18e
🐛 fix(linters): solve linters problems >>> ⏰ 1h
logicalangel Apr 22, 2024
9254250
♻️ refactor(services): capsulate services using interfaces >>> ⏰ 1h
logicalangel Apr 22, 2024
84660c5
♻️ refactor(ctx): implement ctx passing through project >>> ⏰ 2h
logicalangel Apr 23, 2024
69aeff1
🐛 fix(badge): move badger to services and add unit tests >>> ⏰ 30m
logicalangel Apr 23, 2024
3250ab0
✨ feat(services): add some tests to project >>> ⏰ 3h
logicalangel Apr 23, 2024
67477a5
🐛 fix(models): fix problem of deserializing sia >>> ⏰ 2h
logicalangel Apr 24, 2024
37619a9
🐛 fix(linters): fix linters >>> ⏰ 2m
logicalangel Apr 24, 2024
09c9bb9
🐛 fix(connection): fix the problem of reconnecting to the broker >>> …
logicalangel Apr 24, 2024
491a181
🐛 fix(correctness): delete unused tests temprorary >>> ⏰ 2m
logicalangel Apr 25, 2024
2282504
🔀 merge(develop): merge from develop >>> ⏰ 2h
logicalangel Apr 25, 2024
9b84110
✨ feat(identity): merge and add unit test for identity >>> ⏰ 1h
logicalangel Apr 26, 2024
15447c3
🐛 fix(evmlog): fix mutex problem >>> ⏰ 30m
logicalangel Apr 26, 2024
af364a8
🐛 fix(identity): rename export signer function name >>> ⏰ 2m
logicalangel Apr 27, 2024
1458717
🐛 fix(identity): rename export signer function name >>> ⏰ 2m
logicalangel Apr 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ linters:
- ineffassign
- staticcheck
- typecheck
- dupl
- unused
- asasalint
- asciicheck
Expand Down Expand Up @@ -203,16 +204,16 @@ issues:
- funlen
- forbidigo
- gochecknoinits
- path: "ent"
- path: ".generated.go"
linters:
- gomnd
- forbidigo
- path: "config"
- typecheck
- path: "_mock.go"
linters:
- gomnd
- staticcheck
- path: "_test\\.go"
linters:
- bodyclose
- exhaustive
- funlen
- goconst
- gocognit
Expand Down
4 changes: 2 additions & 2 deletions cmd/handler/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"github.com/TimeleapLabs/unchained/internal/app"
"github.com/TimeleapLabs/unchained/internal/config"
"github.com/TimeleapLabs/unchained/internal/log"
"github.com/TimeleapLabs/unchained/internal/utils"
"github.com/spf13/cobra"
)

Expand All @@ -18,7 +18,7 @@ var broker = &cobra.Command{
panic(err)
}

log.Start(config.App.System.Log)
utils.SetupLogger(config.App.System.Log)
app.Broker()
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/handler/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"github.com/TimeleapLabs/unchained/internal/app"
"github.com/TimeleapLabs/unchained/internal/config"
"github.com/TimeleapLabs/unchained/internal/log"
"github.com/TimeleapLabs/unchained/internal/utils"
"github.com/spf13/cobra"
)

Expand All @@ -24,7 +24,7 @@ var consumer = &cobra.Command{
panic(err)
}

log.Start(config.App.System.Log)
utils.SetupLogger(config.App.System.Log)
app.Consumer()
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/handler/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"github.com/TimeleapLabs/unchained/internal/app"
"github.com/TimeleapLabs/unchained/internal/config"
"github.com/TimeleapLabs/unchained/internal/log"
"github.com/TimeleapLabs/unchained/internal/utils"
"github.com/spf13/cobra"
)

Expand All @@ -23,7 +23,7 @@ var worker = &cobra.Command{
panic(err)
}

log.Start(config.App.System.Log)
utils.SetupLogger(config.App.System.Log)
app.Worker()
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/TimeleapLabs/unchained/cmd/handler"
"github.com/TimeleapLabs/unchained/internal/config"
"github.com/TimeleapLabs/unchained/internal/constants"
"github.com/TimeleapLabs/unchained/internal/consts"
"github.com/spf13/cobra"
)

Expand All @@ -17,7 +17,7 @@ var root = &cobra.Command{
Long: `Unchained is the universal data validation and processing protocol`,
Run: func(_ *cobra.Command, _ []string) {
if config.App.System.PrintVersion {
fmt.Println(constants.Version)
fmt.Println(consts.Version)
} else {
os.Exit(1)
}
Expand Down
45 changes: 44 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ require (
github.com/lib/pq v1.10.9
github.com/lmittmann/tint v1.0.4
github.com/mattn/go-colorable v0.1.13
github.com/pouya-eghbali/go-sia/v2 v2.0.0
github.com/peterldowns/pgtestdb v0.0.14
github.com/pouya-eghbali/go-sia/v2 v2.1.0
github.com/puzpuzpuz/xsync/v3 v3.1.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.9.0
Expand All @@ -33,26 +34,42 @@ require (
require (
ariga.io/atlas v0.20.0 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.8.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.0.8 // indirect
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/fjl/memsize v0.0.2 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-openapi/inflect v0.21.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
Expand All @@ -61,30 +78,55 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.12.0 // indirect
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/sosodev/duration v1.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/urfave/cli/v2 v2.27.1 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
go.opencensus.io v0.24.0 // indirect
Expand All @@ -95,6 +137,7 @@ require (
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading
Loading